This commit is contained in:
caozehui
2025-01-07 17:34:15 +08:00
parent fe04ad1573
commit 7a0626413d
3 changed files with 42 additions and 31 deletions

View File

@@ -16,10 +16,10 @@
<template #default="scope"> <template #default="scope">
<el-tooltip effect="dark" placement="bottom"> <el-tooltip effect="dark" placement="bottom">
<template #content> <template #content>
最大误差{{scope.row.maxError}} {{unit}}<br/> 最大误差{{ maxErrorView }}<br/>
误差值{{ scope.row.aError }} {{ unit }} 误差值{{ scope.row.aError }} {{ unit }}
</template> </template>
<span v-if="scope.row.isDataA === 1">符合</span> <el-tag type="success" v-if="scope.row.isDataA === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataA === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataA === 2">不符合</el-tag>
<span v-if="scope.row.isDataA === 4">/</span> <span v-if="scope.row.isDataA === 4">/</span>
</el-tooltip> </el-tooltip>
@@ -40,10 +40,10 @@
<template #default="scope"> <template #default="scope">
<el-tooltip effect="dark" placement="bottom"> <el-tooltip effect="dark" placement="bottom">
<template #content> <template #content>
最大误差{{scope.row.maxError}} {{unit}}<br/> 最大误差{{ maxErrorView }}<br/>
误差值{{ scope.row.bError }} {{ unit }} 误差值{{ scope.row.bError }} {{ unit }}
</template> </template>
<span v-if="scope.row.isDataB === 1">符合</span> <el-tag type="success" v-if="scope.row.isDataB === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataB === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataB === 2">不符合</el-tag>
<span v-if="scope.row.isDataB === 4">/</span> <span v-if="scope.row.isDataB === 4">/</span>
</el-tooltip> </el-tooltip>
@@ -64,10 +64,10 @@
<template #default="scope"> <template #default="scope">
<el-tooltip effect="dark" placement="bottom"> <el-tooltip effect="dark" placement="bottom">
<template #content> <template #content>
最大误差{{scope.row.maxError}} {{unit}}<br/> 最大误差 {{ maxErrorView }}<br/>
误差值{{ scope.row.cError }} {{ unit }} 误差值{{ scope.row.cError }} {{ unit }}
</template> </template>
<span v-if="scope.row.isDataC === 1">符合</span> <el-tag type="success" v-if="scope.row.isDataC === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataC === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataC === 2">不符合</el-tag>
<span v-if="scope.row.isDataC === 4">/</span> <span v-if="scope.row.isDataC === 4">/</span>
</el-tooltip> </el-tooltip>
@@ -103,7 +103,7 @@
最大误差{{ scope.row.maxError }} {{ unit }}<br/> 最大误差{{ scope.row.maxError }} {{ unit }}<br/>
误差值{{ scope.row.tError }} {{ unit }} 误差值{{ scope.row.tError }} {{ unit }}
</template> </template>
<span v-if="scope.row.isDataT === 1">符合</span> <el-tag type="success" v-if="scope.row.isDataT === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataT === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataT === 2">不符合</el-tag>
<span v-if="scope.row.isDataT === 4">/</span> <span v-if="scope.row.isDataT === 4">/</span>
</el-tooltip> </el-tooltip>
@@ -146,6 +146,17 @@ const phaseT = computed(() => {
return result; return result;
}) })
const maxErrorView = computed((data) => {
let result = '';
if (tableData.length > 0) {
result = tableData[0].maxError ? tableData[0].maxError : '';
}
let idx = result.indexOf('~');
if (idx > 0) {
result = result.substring(0, idx) + unit.value + result.substring(idx, result.length) + unit.value;
}
return result;
})
</script> </script>

View File

@@ -294,7 +294,7 @@ watch(testStatus, function (newValue, oldValue) {
percentage.value = 0 percentage.value = 0
} }
emit('update:testStatus', 'preTest_process') emit('update:testStatus', 'preTest_process')
startTimer() // todo 可移除 //startTimer() // todo 可移除
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测开始!`}) testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测开始!`})
} }
}) })
@@ -345,7 +345,7 @@ watch(webMsgSend, function (newValue, oldValue) {
// } // }
// emit('update:testStatus', 'preTest_fail') // emit('update:testStatus', 'preTest_fail')
// break; // break;
case 'YJC_xyjy': case 'yjc_xyjy':
switch (newValue.operateCode) { switch (newValue.operateCode) {
case 'INIT_GATHER$03': case 'INIT_GATHER$03':
if (newValue.code == 25001) { if (newValue.code == 25001) {
@@ -353,7 +353,7 @@ watch(webMsgSend, function (newValue, oldValue) {
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测成功!`}) testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测成功!`})
activeIndex = getNextActiveIndex() + 2 activeIndex = getNextActiveIndex() + 2
startTimer() //startTimer()
emit('update:testStatus', 'process') emit('update:testStatus', 'process')
} }
@@ -386,7 +386,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('FREQ') activeIndex = getNextActiveIndex('FREQ')
startTimer() //startTimer()
} }
break; break;
case 'V_Start': case 'V_Start':
@@ -399,7 +399,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('V') activeIndex = getNextActiveIndex('V')
startTimer() //startTimer()
} }
break; break;
case 'HV_Start': case 'HV_Start':
@@ -412,7 +412,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HV') activeIndex = getNextActiveIndex('HV')
startTimer() //startTimer()
} }
break; break;
case 'HI_Start': case 'HI_Start':
@@ -425,7 +425,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HI') activeIndex = getNextActiveIndex('HI')
startTimer() //startTimer()
} }
break; break;
case 'HP_Start': case 'HP_Start':
@@ -438,7 +438,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HP') activeIndex = getNextActiveIndex('HP')
startTimer() //startTimer()
} }
break; break;
case 'HSV_Start': case 'HSV_Start':
@@ -451,7 +451,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HSV') activeIndex = getNextActiveIndex('HSV')
startTimer() //startTimer()
} }
break; break;
case 'HSI_Start': case 'HSI_Start':
@@ -464,7 +464,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HSI') activeIndex = getNextActiveIndex('HSI')
startTimer() //startTimer()
} }
break; break;
case 'VOLTAGE_Start': case 'VOLTAGE_Start':
@@ -477,7 +477,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('VOLTAGE') activeIndex = getNextActiveIndex('VOLTAGE')
startTimer() //startTimer()
} }
break; break;
case 'I_Start': case 'I_Start':
@@ -490,7 +490,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('I') activeIndex = getNextActiveIndex('I')
startTimer() //startTimer()
} }
break; break;
case 'IMBV_Start': case 'IMBV_Start':
@@ -503,7 +503,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('IMBV') activeIndex = getNextActiveIndex('IMBV')
startTimer() //startTimer()
} }
break; break;
case 'IMBA_Start': case 'IMBA_Start':
@@ -516,7 +516,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('IMBA') activeIndex = getNextActiveIndex('IMBA')
startTimer() //startTimer()
} }
break; break;
case 'F_Start': case 'F_Start':
@@ -529,7 +529,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('F') activeIndex = getNextActiveIndex('F')
startTimer() //startTimer()
} }
break; break;
case 'Quit': case 'Quit':
@@ -905,7 +905,7 @@ const startTimer = () => {
}, 4000); }, 4000);
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'YJC_xyjy', requestId: 'yjc_xyjy',
operateCode: "INIT_GATHER$03", operateCode: "INIT_GATHER$03",
code: "25001" code: "25001"
}) })
@@ -1066,7 +1066,7 @@ const handleResumeTest = () => {
type: 'info', type: 'info',
log: `${new Date().toLocaleString()}:继续检测`, log: `${new Date().toLocaleString()}:继续检测`,
}) })
startTimer() //startTimer()
console.log('开始继续检测') console.log('开始继续检测')
}; };

View File

@@ -236,7 +236,7 @@ const detectionOptions = ref([
background: 'rgb(255, 255, 255, 0)', background: 'rgb(255, 255, 255, 0)',
})*/ })*/
startPreTest({ startPreTest({
userPageId: "cdfee", userPageId: "cdf",
devIds:deviceIds, devIds:deviceIds,
planId:planId, planId:planId,
errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d', errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d',
@@ -256,7 +256,7 @@ const detectionOptions = ref([
case 2: case 2:
if (TestStatus.value == "waiting") { if (TestStatus.value == "waiting") {
startPreTest({ startPreTest({
userPageId: "cdfee", userPageId: "cdf",
devIds:deviceIds, devIds:deviceIds,
planId:planId, planId:planId,
errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d', errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d',