diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index a5ec927..f885105 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -213,6 +213,7 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => { defaultOperate() await updateTableData() } + activeTab.value = 'resultTab' }) watch(currentHarmNum, (newVal, oldVal) => { @@ -228,6 +229,7 @@ watch(currentHarmNum, (newVal, oldVal) => { setRawData([]) } } + activeTab.value = 'resultTab' }) watch(currentCheckItem, (newVal, oldVal) => { @@ -244,6 +246,7 @@ watch(currentCheckItem, (newVal, oldVal) => { setRawData([]) } } + activeTab.value = 'resultTab' }) // const handleSwitchChange = async (data: any) => { diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 4a64c10..71121e3 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -306,7 +306,7 @@ watch(testStatus, function (newValue, oldValue) { percentage.value = 0 } emit('update:testStatus', 'test_init') - //startTimer() // todo 可移除 + startTimer() // todo 可移除 testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`}) } }) @@ -357,25 +357,25 @@ watch(webMsgSend, function (newValue, oldValue) { break; } break; - case 'connect': - switch (newValue.operateCode) { - case "Source": - ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', { - confirmButtonText: '确定', - type: 'error', - }) - testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`}) - break; - case "Dev": - ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', { - confirmButtonText: '确定', - type: 'error', - }) - testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`}) - break; - } - emit('update:testStatus', 'test_init_fail') - break; + // case 'connect': + // switch (newValue.operateCode) { + // case "Source": + // ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', { + // confirmButtonText: '确定', + // type: 'error', + // }) + // testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`}) + // break; + // case "Dev": + // ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', { + // confirmButtonText: '确定', + // type: 'error', + // }) + // testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`}) + // break; + // } + // emit('update:testStatus', 'test_init_fail') + // break; case 'yjc_ytxjy': switch (newValue.operateCode) { case 'INIT_GATHER': @@ -414,7 +414,7 @@ watch(webMsgSend, function (newValue, oldValue) { percentage.value = 3 activeIndex = getNextActiveIndex() + 2 - //startTimer() + startTimer() emit('update:testStatus', 'process') } @@ -448,7 +448,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('FREQ') - //startTimer() + startTimer() } break; case 'V_Start': @@ -462,7 +462,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('V') - //startTimer() + startTimer() } break; case 'HV_Start': @@ -476,7 +476,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('HV') - //startTimer() + startTimer() } break; case 'HI_Start': @@ -490,7 +490,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('HI') - //startTimer() + startTimer() } break; case 'HP_Start': @@ -504,7 +504,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('HP') - //startTimer() + startTimer() } break; case 'HSV_Start': @@ -518,7 +518,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('HSV') - //startTimer() + startTimer() } break; case 'HSI_Start': @@ -532,7 +532,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('HSI') - //startTimer() + startTimer() } break; case 'VOLTAGE_Start': @@ -546,7 +546,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('VOLTAGE') - //startTimer() + startTimer() } break; case 'I_Start': @@ -560,7 +560,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('I') - //startTimer() + startTimer() } break; case 'IMBV_Start': @@ -574,7 +574,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('IMBV') - //startTimer() + startTimer() } break; case 'IMBA_Start': @@ -588,7 +588,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('IMBA') - //startTimer() + startTimer() } break; case 'F_Start': @@ -602,7 +602,7 @@ watch(webMsgSend, function (newValue, oldValue) { updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex('F') - //startTimer() + startTimer() } break; case 'Quit': @@ -871,16 +871,16 @@ const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: Ch // deviceId: "80b4b4f52a4c4064a18319525f8ac13c", // deviceName: "240002" // }, - // { - // chnResult: [1, 4, 4, 4], - // deviceId: "df23a4178d194467a432ddf45e835e48", - // deviceName: "240003" - // }, - // { - // chnResult: [1, 1, 1, 1], - // deviceId: "ae5a7628260349c0a5e7c86c81fbd417", - // deviceName: "240004" - // }] + { + chnResult: [1, 1, 1, 1], + deviceId: "df23a4178d194467a432ddf45e835e48", + deviceName: "240003" + }, + { + chnResult: [1, 1, 1, 1], + deviceId: "ae5a7628260349c0a5e7c86c81fbd417", + deviceName: "240004" + }] let temp = null if (isStart) { temp = getLoadingResult(scriptType) @@ -1222,7 +1222,7 @@ const handleResumeTest = () => { type: 'info', log: `${new Date().toLocaleString()}:继续检测`, }) - //startTimer() + startTimer() console.log('开始继续检测') };