This commit is contained in:
caozehui
2024-12-23 13:23:28 +08:00
parent 0a4385f29b
commit fd21d32f4a
6 changed files with 50 additions and 43 deletions

View File

@@ -38,10 +38,10 @@
</div>
<div class="dialog-content">
<el-table :data="checkResultView" :cell-class-name="tableCell" row-key="scriptID" height="450px"
<el-table :data="checkResultView" :cell-class-name="tableCell" row-key="scriptId" height="450px"
:header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%"
border>
<el-table-column fixed prop="scriptItemName" label="检测项目" width="250px">
<el-table-column fixed prop="scriptItemName" label="检测项目" width="140px" align="center">
</el-table-column>
<template v-if="chnSum<=MAX_CHN_SUM">
@@ -57,7 +57,7 @@
:disabled="row.devices[index1].chnResult[index2].resultType=='info'"
:type="row.devices[index1].chnResult[index2].resultType"
size="small"
@click="handleClick(item,chnItem)"
@click="handleClick(row.scriptId,item.deviceId,chnItem)"
>
{{ row.devices[index1].chnResult[index2].resultValue }}
</el-button>
@@ -77,7 +77,7 @@
:disabled="row.devices[index].chnResult[0].resultType=='info'"
:type="row.devices[index].chnResult[0].resultType"
size="small"
@click="handleClick(item,-1)"
@click="handleClick(row.scriptId,item.deviceId,-1)"
>
{{ row.devices[index].chnResult[0].resultValue }}
</el-button>
@@ -628,7 +628,7 @@ const errorCheckItem = reactive<string[]>([]);
// 动态获取表格单元格样式
function tableCell({row, columnIndex}) {
let items = errorCheckItem.filter((item) => item === row.scriptID)
let items = errorCheckItem.filter((item) => item === row.scriptId)
if (columnIndex === 0 && items.length > 0) {
return 'warning-row'
@@ -650,8 +650,8 @@ const resultDialogVisible = ref(false)
function clear() {
}
const updateCheckResultView = (scriptID: string) => {
const temp = simulateCheck(scriptID)
const updateCheckResultView = (scriptId: string) => {
const temp = simulateCheck(scriptId)
updateCheckResult(temp)
// traverseTableData(scriptData, id);
};
@@ -730,8 +730,8 @@ const handlePauseOrContinue = () => {
};
// 点击查看设备通道检测详情。参数1设备信息参数2通道号-1代表查看全部通道
const handleClick = (deviceItem: any, chnNum: number) => {
dataCheckSingleChannelSingleTestPopupRef.value?.open(deviceItem, chnNum);
const handleClick = (scriptId:string,deviceId: any, chnNum: number) => {
dataCheckSingleChannelSingleTestPopupRef.value?.open(scriptId, deviceId, chnNum);
};
const props = defineProps({