Browse Source

fix:debug

master
guoapeng 3 months ago
parent
commit
e33c4269ec
  1. 10
      src/components/dialogs/ErrorModal.vue
  2. 1
      src/pages/Index/History.vue
  3. 2
      src/pages/Index/Index.vue
  4. 25
      src/pages/Index/debug.vue
  5. 2
      src/services/debug/index.ts
  6. 2
      vite.config.ts

10
src/components/dialogs/ErrorModal.vue

@ -24,9 +24,10 @@
</div> </div>
<div class="error-stack-details" v-show="isShow"> <div class="error-stack-details" v-show="isShow">
<template v-if="detailInfo && detailInfo.length > 0"> <template v-if="detailInfo && detailInfo.length > 0">
<div class="detail-item">
<div class="detail-item" v-for="(item, index) in detailInfo" :key="index">
<!-- <span class="detail-label">{{ detailInfo }}</span> --> <!-- <span class="detail-label">{{ detailInfo }}</span> -->
<span class="detail-value">{{ detailInfo }}</span>
<span class="detail-value-title">{{ item.name }}</span>
<span class="detail-value">{{ item.description }}</span>
</div> </div>
</template> </template>
<div v-else class="empty-details"> <div v-else class="empty-details">
@ -219,6 +220,11 @@
font-size: 26px; font-size: 26px;
color: #111827; color: #111827;
} }
.detail-value-title {
flex: 0 0 120px;
font-size: 26px;
color: #6b7280;
}
} }
.empty-details { .empty-details {

1
src/pages/Index/History.vue

@ -273,6 +273,7 @@ const showActionConfirm = (actionType: string) => {
} }
} else { } else {
currentAction.value = actions[actionType] currentAction.value = actions[actionType]
showModal.value = true
} }
} }

2
src/pages/Index/Index.vue

@ -423,6 +423,8 @@ console.log(debug.value)
const logoClickCount = ref(0) const logoClickCount = ref(0)
let clickTimeout: any; let clickTimeout: any;
const handleLogoClick = () => { const handleLogoClick = () => {
console.log('logoClickCount:', logoClickCount.value)
console.log('点击:')
if (clickTimeout) { if (clickTimeout) {
clearTimeout(clickTimeout) clearTimeout(clickTimeout)
} }

25
src/pages/Index/debug.vue

@ -131,7 +131,13 @@ const start1 = async () => {
<template> <template>
<div id="debug-view"> <div id="debug-view">
<div class="content-box"> <div class="content-box">
<div class="title">一致性测试</div>
<div class="title">
<span>一致性测试</span>
<div>
<el-button type="primary" @click="save">保存配置</el-button>
<el-button type="primary" @click="start">开始测试</el-button>
</div>
</div>
<div class="content"> <div class="content">
<div v-for="(item, index) in tubeData" :key="index" class="tube-item"> <div v-for="(item, index) in tubeData" :key="index" class="tube-item">
<span>试管{{index + 1}}</span> <span>试管{{index + 1}}</span>
@ -144,13 +150,18 @@ const start1 = async () => {
/> />
</div> </div>
</div> </div>
<el-button type="primary" @click="save">保存配置</el-button>
<el-button type="primary" @click="start">开始测试</el-button>
</div> </div>
<div class="content-box"> <div class="content-box">
<div class="title">加样准确度与重复性</div>
<div class="title">
<span>加样准确度与重复性</span>
<div>
<el-button @click="lostTip">丢弃tip</el-button>
<el-button type="primary" @click="start1">移液操作</el-button>
</div></div>
<div class="content1"> <div class="content1">
<div>移液操作: </div> <div>移液操作: </div>
<el-select v-model="move" style="width: 150px"> <el-select v-model="move" style="width: 150px">
@ -166,8 +177,6 @@ const start1 = async () => {
<el-button @click="lostTip">丢弃tip</el-button>
<el-button type="primary" @click="start1">移液操作</el-button>
</div> </div>
<!-- 键盘 --> <!-- 键盘 -->
@ -228,7 +237,9 @@ const start1 = async () => {
font-size: 20px; font-size: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start;
justify-content: space-between;
padding-bottom: 10px;
box-sizing: border-box;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }

2
src/services/debug/index.ts

@ -59,7 +59,7 @@ export const dropTipBlock = async () => {
export const testOnce = async (params: any) => { export const testOnce = async (params: any) => {
try { try {
const res = await apiClient.post(baseUrl1 + 'testOnce' , params)
const res = await apiClient.post(baseUrl1 + 'testOnce?ul=' + params)
return res.data return res.data
} catch (error) { } catch (error) {
console.log(error) console.log(error)

2
vite.config.ts

@ -37,6 +37,8 @@ export default defineConfig({
}, },
}, },
server: { server: {
port: 5173,
host: '0.0.0.0',
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:8888', target: 'http://localhost:8888',

Loading…
Cancel
Save