修改正式检测结果展示错误
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
</template>
|
||||
<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-tag type="warning" v-if="scope.row.isDataA === 4">/</el-tag>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -38,7 +38,7 @@
|
||||
</template>
|
||||
<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-tag type="warning" v-if="scope.row.isDataB === 4">/</el-tag>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -55,7 +55,7 @@
|
||||
</template>
|
||||
<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-tag type="warning" v-if="scope.row.isDataC === 4">/</el-tag>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -75,7 +75,7 @@
|
||||
</template>
|
||||
<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-tag type="warning" v-if="scope.row.isDataT === 4">/</el-tag>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -41,7 +41,9 @@
|
||||
@node-click="handleNodeClick" class="custom-tree" ref="treeRef">
|
||||
<template #default="{ node, data }">
|
||||
<el-tooltip effect="dark" :content="data.scriptTypeName" placement="top">
|
||||
<span class="custom-tree-node" :style="data.fly===2? 'color: #F56C6C;':''">{{ data.scriptTypeName }}</span>
|
||||
<span class="custom-tree-node" :style="data.fly===2? 'color: #F56C6C;':data.fly===4? 'color: #e6a23c;':''">{{
|
||||
data.scriptTypeName
|
||||
}}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-tree>
|
||||
@@ -90,7 +92,7 @@
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import {dialogBig} from '@/utils/elementBind'
|
||||
import {nextTick, reactive, ref, watch} from 'vue'
|
||||
import {reactive, ref, watch} from 'vue'
|
||||
import DataCheckResultTable from './dataCheckResultTable.vue'
|
||||
import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
|
||||
import {CheckData} from "@/api/check/interface";
|
||||
@@ -203,6 +205,7 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
|
||||
scriptType: scriptType,
|
||||
code: parseInt(checkStore.planCode)
|
||||
})
|
||||
updateTreeFly(resTreeDataTemp, 4)
|
||||
updateTreeFly(resTreeDataTemp, 2)
|
||||
|
||||
Object.assign(treeDataAll, resTreeDataTemp)
|
||||
|
||||
@@ -287,7 +287,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
log: newValue.data + '设备连接异常!',
|
||||
})
|
||||
step2.value = 'error'
|
||||
ts.value = 'error'
|
||||
// ts.value = 'error'
|
||||
} else if (newValue.code == 10551) {
|
||||
step2InitLog.value.push({
|
||||
type: 'error',
|
||||
@@ -333,7 +333,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
log: newValue.data + '设备连接异常!',
|
||||
})
|
||||
step3.value = 'error'
|
||||
ts.value = 'error'
|
||||
// ts.value = 'error'
|
||||
} else if (newValue.code == 10551) {
|
||||
step3InitLog.value.push({
|
||||
type: 'error',
|
||||
@@ -370,7 +370,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
log: newValue.data + '设备连接异常!',
|
||||
})
|
||||
step3.value = 'error'
|
||||
ts.value = 'error'
|
||||
// ts.value = 'error'
|
||||
} else if (newValue.code == 10551) {
|
||||
step3InitLog.value.push({
|
||||
type: 'error',
|
||||
@@ -403,7 +403,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
log: newValue.data + '设备连接异常!',
|
||||
})
|
||||
step3.value = 'error'
|
||||
ts.value = 'error'
|
||||
// ts.value = 'error'
|
||||
} else if (newValue.code == 10551) {
|
||||
step3InitLog.value.push({
|
||||
type: 'error',
|
||||
|
||||
@@ -701,10 +701,15 @@ const updateCheckResult = (data: CheckData.ScriptChnItem) => {
|
||||
checkResult.forEach(item => {
|
||||
if (item.scriptType == scriptType) {
|
||||
item.devices.forEach((device, index) => {
|
||||
device.chnResult = [...data.devices[index].chnResult]
|
||||
let targetDevice = data.devices.find(dev=>dev.deviceId === device.deviceId)
|
||||
if(targetDevice!== undefined){
|
||||
device.chnResult = [...targetDevice.chnResult]
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
const scrollToBottom = () => {
|
||||
@@ -853,21 +858,21 @@ function getErrorCheckItem(scriptType: string) {
|
||||
const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: CheckData.DeviceCheckResult[] = []) => {
|
||||
let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id
|
||||
// devices = [
|
||||
// {
|
||||
// chnResult: [3, 4],
|
||||
// deviceId: "80b4b4f52a4c4064a18319525f8ac13c",
|
||||
// deviceName: "240002"
|
||||
// },
|
||||
// {
|
||||
// chnResult: [1, 4, 4, 4],
|
||||
// deviceId: "df23a4178d194467a432ddf45e835e48",
|
||||
// deviceName: "240003"
|
||||
// },
|
||||
// {
|
||||
// chnResult: [4, 4, 4, 4],
|
||||
// deviceId: "ae5a7628260349c0a5e7c86c81fbd417",
|
||||
// deviceName: "240004"
|
||||
// }]
|
||||
// {
|
||||
// chnResult: [3, 4],
|
||||
// deviceId: "80b4b4f52a4c4064a18319525f8ac13c",
|
||||
// deviceName: "240002"
|
||||
// },
|
||||
// {
|
||||
// chnResult: [1, 4, 4, 4],
|
||||
// deviceId: "df23a4178d194467a432ddf45e835e48",
|
||||
// deviceName: "240003"
|
||||
// },
|
||||
// {
|
||||
// chnResult: [1, 1, 1, 1],
|
||||
// deviceId: "ae5a7628260349c0a5e7c86c81fbd417",
|
||||
// deviceName: "240004"
|
||||
// }]
|
||||
let temp = null
|
||||
if (isStart) {
|
||||
temp = getLoadingResult(scriptType)
|
||||
|
||||
Reference in New Issue
Block a user