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">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差{{scope.row.maxError}} {{unit}}<br/>
误差值{{scope.row.aError}} {{unit}}
最大误差{{ maxErrorView }}<br/>
误差值{{ scope.row.aError }} {{ unit }}
</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>
<span v-if="scope.row.isDataA === 4">/</span>
</el-tooltip>
@@ -40,10 +40,10 @@
<template #default="scope">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差{{scope.row.maxError}} {{unit}}<br/>
误差值{{scope.row.bError}} {{unit}}
最大误差{{ maxErrorView }}<br/>
误差值{{ scope.row.bError }} {{ unit }}
</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>
<span v-if="scope.row.isDataB === 4">/</span>
</el-tooltip>
@@ -64,10 +64,10 @@
<template #default="scope">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差{{scope.row.maxError}} {{unit}}<br/>
误差值{{scope.row.cError}} {{unit}}
最大误差 {{ maxErrorView }}<br/>
误差值{{ scope.row.cError }} {{ unit }}
</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>
<span v-if="scope.row.isDataC === 4">/</span>
</el-tooltip>
@@ -100,10 +100,10 @@
<template #default="scope">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差{{scope.row.maxError}} {{unit}}<br/>
误差值{{scope.row.tError}} {{unit}}
最大误差{{ scope.row.maxError }} {{ unit }}<br/>
误差值{{ scope.row.tError }} {{ unit }}
</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>
<span v-if="scope.row.isDataT === 4">/</span>
</el-tooltip>
@@ -146,6 +146,17 @@ const phaseT = computed(() => {
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>

View File

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

View File

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