diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index 1bd4e67..cdb2bdf 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -205,8 +205,8 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => { scriptType: scriptType, code: parseInt(checkStore.planCode) }) - updateTreeFly(resTreeDataTemp, 4) updateTreeFly(resTreeDataTemp, 2) + updateTreeFly(resTreeDataTemp, 4) Object.assign(treeDataAll, resTreeDataTemp) @@ -368,7 +368,8 @@ const open = async (_deviceId: string, chnNum: string, _scriptType: string | nul chnList = resFormContent.chnList.map((item: { value: string, label: string }) => ({ value: item.value, - label: item.label == '1' ? `${item.value}` : `${item.value}(不符合)` + label: item.value + // label: item.label == '1' ? `${item.value}` : `${item.value}(不符合)` })) let dataRuleName = dictStore.getDictData('Data_Rule').find(item => item.id == resFormContent.dataRule)?.name diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index 2b3bd29..c936da6 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -931,7 +931,7 @@ const handleTest = async (val:string) => { const data = reactive({ socketServe: socketClient.Instance, }); - const url = 'ws://192.168.1.127:7777/hello?name=cdf'; + const url = 'ws://localhost:7777/hello?name=cdf'; socketClient.Instance.connect(url); data.socketServe = socketClient.Instance; data.socketServe.registerCallBack('aaa', (res: { code: number; }) => { diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 90cd37a..c91fb5d 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -247,15 +247,15 @@ const checkResultView: ComputedRef = computed(() } } else { let tempChnResult: CheckData.ChnCheckResultEnum = device.chnResult[0] + if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.FAIL)) { + tempChnResult = CheckData.ChnCheckResultEnum.FAIL + } if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.ERRORDATA)) { tempChnResult = CheckData.ChnCheckResultEnum.ERRORDATA } if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.TIMEOUT)) { tempChnResult = CheckData.ChnCheckResultEnum.TIMEOUT } - if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.FAIL)) { - tempChnResult = CheckData.ChnCheckResultEnum.FAIL - } switch (tempChnResult) { case CheckData.ChnCheckResultEnum.UNKNOWN: tempChnBtnResult.push({color: CheckData.ButtonColorEnum.INFO, icon: 'Minus'}) @@ -824,6 +824,9 @@ const setErrorCheckItem = (scriptType: string, devices: CheckData.DeviceCheckRes tempChnResult.push(...devices[i].chnResult) } + if (tempChnResult.some(item => item === CheckData.ChnCheckResultEnum.FAIL)) { + type = CheckData.ChnCheckResultEnum.FAIL + } if (tempChnResult.some(item => item === CheckData.ChnCheckResultEnum.TIMEOUT)) { type = CheckData.ChnCheckResultEnum.TIMEOUT for (let i = 0; i < devices.length; i++) { @@ -838,9 +841,6 @@ const setErrorCheckItem = (scriptType: string, devices: CheckData.DeviceCheckRes if (tempChnResult.some(item => item === CheckData.ChnCheckResultEnum.ERRORDATA)) { type = CheckData.ChnCheckResultEnum.ERRORDATA } - if (tempChnResult.some(item => item === CheckData.ChnCheckResultEnum.FAIL)) { - type = CheckData.ChnCheckResultEnum.FAIL - } errorCheckItem.push({scriptType, type: type}) }