微调
This commit is contained in:
@@ -249,9 +249,9 @@ const defaultOperate = () => {
|
|||||||
currentDesc.value = node.sourceDesc
|
currentDesc.value = node.sourceDesc
|
||||||
checkIndex.value = node.index
|
checkIndex.value = node.index
|
||||||
defaultExpandedKeys = [node.index]
|
defaultExpandedKeys = [node.index]
|
||||||
// nextTick(() => {
|
|
||||||
// treeRef.value?.setCurrentKey(node.index);
|
treeRef.value?.setCurrentKey(node.index);
|
||||||
// });
|
|
||||||
} else {
|
} else {
|
||||||
currentScriptTypeName.value = ''
|
currentScriptTypeName.value = ''
|
||||||
currentDesc.value = ''
|
currentDesc.value = ''
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
:disabled="row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.LOADING"
|
:disabled="row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.LOADING"
|
||||||
:color="row.devices[index1].chnResult[index2].color"
|
:color="row.devices[index1].chnResult[index2].color"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleClick(item,chnItem+'',row.scriptType)"
|
@click="handleClick(item,chnItem,row.scriptType)"
|
||||||
style="align-self: center;"
|
style="align-self: center;"
|
||||||
>
|
>
|
||||||
<el-icon v-if="row.devices[index1].chnResult[index2].icon==='Loading'" class="loading-box"
|
<el-icon v-if="row.devices[index1].chnResult[index2].icon==='Loading'" class="loading-box"
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
:disabled="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.LOADING"
|
:disabled="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.LOADING"
|
||||||
:color="row.devices[index1].chnResult[0].color"
|
:color="row.devices[index1].chnResult[0].color"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleClick(item,'-1',row.scriptType)"
|
@click="handleClick(item,-1,row.scriptType)"
|
||||||
>
|
>
|
||||||
<el-icon v-if="row.devices[index1].chnResult[0].icon==='Loading'" class="loading-box"
|
<el-icon v-if="row.devices[index1].chnResult[0].icon==='Loading'" class="loading-box"
|
||||||
style="color: #fff">
|
style="color: #fff">
|
||||||
@@ -794,18 +794,18 @@ const setErrorCheckItem = (scriptType: string, devices: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: any = null) => {
|
const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: any[] = []) => {
|
||||||
let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id
|
let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id
|
||||||
// devices = [{
|
// devices = [{
|
||||||
// chnResult: [2, 2],
|
// chnResult: [1, 1],
|
||||||
// deviceId: "80b4b4f52a4c4064a18319525f8ac13c",
|
// deviceId: "80b4b4f52a4c4064a18319525f8ac13c",
|
||||||
// deviceName: "240002"
|
// deviceName: "240002"
|
||||||
// }]
|
// }]
|
||||||
setErrorCheckItem(scriptType, devices)
|
|
||||||
let temp = null
|
let temp = null
|
||||||
if (isStart) {
|
if (isStart) {
|
||||||
temp = getLoadingResult(scriptType)
|
temp = getLoadingResult(scriptType)
|
||||||
} else {
|
} else {
|
||||||
|
setErrorCheckItem(scriptType, devices)
|
||||||
temp = {
|
temp = {
|
||||||
scriptType,
|
scriptType,
|
||||||
devices
|
devices
|
||||||
@@ -902,11 +902,14 @@ const getCheckResult = (scriptType: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 点击查看(设备)通道检测详情。参数1:设备信息,参数2:通道号,-1:代表查看全部通道
|
// 点击查看(设备)通道检测详情。参数1:设备信息,参数2:通道号,-1:代表查看全部通道
|
||||||
const handleClick = (item: any, chnNum: string, scriptType: string) => {
|
const handleClick = (item: any, chnNum: number, scriptType: string) => {
|
||||||
let checkResultItem = checkResult.find(obj => obj.scriptType === scriptType)
|
let checkResultItem = checkResult.find(obj => obj.scriptType === scriptType)
|
||||||
let chnResult = checkResultItem?.devices.find(obj => obj.deviceId === item.deviceId)?.chnResult
|
|
||||||
let flag = -1
|
let flag = -1
|
||||||
if (chnNum === '-1') {
|
if (checkResultItem) {
|
||||||
|
let device = checkResultItem.devices.find(obj => obj.deviceId === item.deviceId)
|
||||||
|
if (device) {
|
||||||
|
let chnResult = device.chnResult
|
||||||
|
if (chnNum === -1) {
|
||||||
if (chnResult.findIndex(obj => obj === CheckData.ChnCheckResultEnum.UNCONNECTED) !== -1) {
|
if (chnResult.findIndex(obj => obj === CheckData.ChnCheckResultEnum.UNCONNECTED) !== -1) {
|
||||||
flag = 0
|
flag = 0
|
||||||
}
|
}
|
||||||
@@ -921,6 +924,9 @@ const handleClick = (item: any, chnNum: string, scriptType: string) => {
|
|||||||
flag = 1
|
flag = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (flag === 0) {
|
if (flag === 0) {
|
||||||
ElMessageBox.alert('设备通讯中断,请检查设备通讯是否正常', '通讯中断', {
|
ElMessageBox.alert('设备通讯中断,请检查设备通讯是否正常', '通讯中断', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -934,7 +940,7 @@ const handleClick = (item: any, chnNum: string, scriptType: string) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (flag === -1) {
|
if (flag === -1) {
|
||||||
dataCheckSingleChannelSingleTestPopupRef.value?.open(item.deviceId, chnNum, scriptType);
|
dataCheckSingleChannelSingleTestPopupRef.value?.open(item.deviceId, chnNum + '', scriptType);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user