存在已经初始化步骤,重新检测

This commit is contained in:
caozehui
2025-01-04 10:49:05 +08:00
parent 9703d35a3a
commit 2d993b2f73
5 changed files with 120 additions and 143 deletions

View File

@@ -53,6 +53,7 @@ export namespace CheckData {
export interface TreeItem{ export interface TreeItem{
scriptTypeName: string|null, scriptTypeName: string|null,
sourceDesc: string|null, sourceDesc: string|null,
harmNum: number|null,
index:number|null, index:number|null,
fly:number|null, fly:number|null,
children?: TreeItem[] children?: TreeItem[]

View File

@@ -24,7 +24,7 @@ export const getFormData = (params: {
*/ */
export const getTreeData = (params: { export const getTreeData = (params: {
scriptId: string, scriptId: string,
deviceId: string, devId: string,
devNum: string, devNum: string,
scriptType: string | null, scriptType: string | null,
code: string code: string

View File

@@ -150,7 +150,7 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
// 发起请求,查询该测试项的检测结果 // 发起请求,查询该测试项的检测结果
const {data: resTreeDataTemp}: { data: CheckData.TreeItem[] } = await getTreeData({ const {data: resTreeDataTemp}: { data: CheckData.TreeItem[] } = await getTreeData({
scriptId: checkStore.scriptId, scriptId: checkStore.scriptId,
deviceId, devId: deviceId,
devNum: formContent.chnNum + '', devNum: formContent.chnNum + '',
scriptType, scriptType,
code: checkStore.planCode code: checkStore.planCode
@@ -161,36 +161,42 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
{ {
scriptTypeName: "频率准确度检测", scriptTypeName: "频率准确度检测",
sourceDesc: null, sourceDesc: null,
harmNum: null,
index: null, index: null,
fly: null, fly: null,
children: [ children: [
{ {
scriptTypeName: "额定条件下频率准确度测试", scriptTypeName: "额定条件下频率准确度测试",
sourceDesc: null, sourceDesc: null,
harmNum: null,
index: null, index: null,
fly: null, fly: null,
children: [ children: [
{ {
scriptTypeName: "频率=42.5Hz", scriptTypeName: "频率=42.5Hz",
sourceDesc: "频率=42.5Hz", sourceDesc: "频率=42.5Hz",
harmNum: null,
index: 11, index: 11,
fly: 1, fly: 1,
}, },
{ {
scriptTypeName: "频率=50Hz", scriptTypeName: "频率=50Hz",
sourceDesc: "频率=50Hz", sourceDesc: "频率=50Hz",
harmNum: null,
index: 12, index: 12,
fly: 2, fly: 2,
}, },
{ {
scriptTypeName: "频率=50.05Hz", scriptTypeName: "频率=50.05Hz",
sourceDesc: "频率=50.05Hz", sourceDesc: "频率=50.05Hz",
harmNum: null,
index: 13, index: 13,
fly: 1, fly: 1,
}, },
{ {
scriptTypeName: "频率=57.5Hz", scriptTypeName: "频率=57.5Hz",
sourceDesc: "频率=57.5Hz", sourceDesc: "频率=57.5Hz",
harmNum: null,
index: 14, index: 14,
fly: 2, fly: 2,
} }
@@ -199,18 +205,21 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
{ {
scriptTypeName: "单影响量下频率准确度测试", scriptTypeName: "单影响量下频率准确度测试",
sourceDesc: null, sourceDesc: null,
harmNum: null,
index: null, index: null,
fly: null, fly: null,
children: [ children: [
{ {
scriptTypeName: "电压幅值对频率测量的影响", scriptTypeName: "电压幅值对频率测量的影响",
sourceDesc: null, sourceDesc: null,
harmNum: null,
index: null, index: null,
fly: null, fly: null,
children: [ children: [
{ {
scriptTypeName: "10%Un对频率=50.05Hz的影响", scriptTypeName: "10%Un对频率=50.05Hz的影响",
sourceDesc: "10%Un对频率=50.05Hz的影响", sourceDesc: "10%Un对频率=50.05Hz的影响",
harmNum: null,
index: null, index: null,
fly: 1, fly: 1,
} }
@@ -219,12 +228,14 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
{ {
scriptTypeName: "谐波对频率测量的影响", scriptTypeName: "谐波对频率测量的影响",
sourceDesc: null, sourceDesc: null,
harmNum: null,
index: null, index: null,
fly: null, fly: null,
children: [ children: [
{ {
scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响", scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响",
sourceDesc: "叠加多次谐波对频率=50.05Hz的影响", sourceDesc: "叠加多次谐波对频率=50.05Hz的影响",
harmNum: null,
index: null, index: null,
fly: 2, fly: 2,
} }

View File

@@ -24,6 +24,12 @@
:icon="Failed" :icon="Failed"
disabled>预检测失败 disabled>预检测失败
</el-button> </el-button>
<el-button
type="primary"
:icon="RefreshLeft"
v-if="testStatus === 'error'"
@click="emit('sendReCheck')">重新检测
</el-button>
<el-button type="success" v-if="activeIndex >= checkTotal" :icon="Check" disabled>检测完成</el-button> <el-button type="success" v-if="activeIndex >= checkTotal" :icon="Check" disabled>检测完成</el-button>
@@ -36,17 +42,6 @@
>继续检测 >继续检测
</el-button> </el-button>
<el-button type="text" :icon="InfoFilled" @click="showTestLog">检测项进度</el-button> <el-button type="text" :icon="InfoFilled" @click="showTestLog">检测项进度</el-button>
<!-- <el-button
type="warning"
v-if="activeIndex >= checkTotal"
:icon="Refresh"
@click="handleReCheck"
>重新检测</el-button
> -->
<!-- <el-button type="danger" :icon="Close" @click="handleFinishTest"
>停止检测</el-button
> -->
</div> </div>
<div class="dialog-content"> <div class="dialog-content">
@@ -139,7 +134,7 @@
<dataCheckSingleChannelSingleTestPopup ref="dataCheckSingleChannelSingleTestPopupRef"/> <dataCheckSingleChannelSingleTestPopup ref="dataCheckSingleChannelSingleTestPopupRef"/>
</template> </template>
<script lang="tsx" setup name="test"> <script lang="tsx" setup name="test">
import {Check, InfoFilled, Loading, Refresh, VideoPause, Failed} from '@element-plus/icons-vue' import {Check, Failed, InfoFilled, Loading, Refresh, RefreshLeft, VideoPause} from '@element-plus/icons-vue'
import resultPopup from './resultPopup.vue' import resultPopup from './resultPopup.vue'
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue' import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
import {computed, reactive, ref, toRef, watch} from "vue"; import {computed, reactive, ref, toRef, watch} from "vue";
@@ -168,7 +163,7 @@ const props = defineProps({
} }
}) })
const emit = defineEmits(['update:testStatus', 'update:webMsgSend', 'sendPause', 'sendResume']); const emit = defineEmits(['update:testStatus', 'update:webMsgSend', 'sendPause', 'sendResume', 'sendReCheck']);
// 用来保存测试项进度抽屉是否打开 // 用来保存测试项进度抽屉是否打开
const drawer = ref(false) const drawer = ref(false)
@@ -201,7 +196,6 @@ const resultDialogVisible = ref(false)
const scrollContainerRef = ref(); const scrollContainerRef = ref();
const dataCheckSingleChannelSingleTestPopupRef = ref<InstanceType<typeof dataCheckSingleChannelSingleTestPopup>>() const dataCheckSingleChannelSingleTestPopupRef = ref<InstanceType<typeof dataCheckSingleChannelSingleTestPopup>>()
// 总通道数 // 总通道数
const chnSum = computed(() => { const chnSum = computed(() => {
let sum = 0 let sum = 0
@@ -292,56 +286,52 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
watch(testStatus, function (newValue, oldValue) { watch(testStatus, function (newValue, oldValue) {
if (newValue == 'start') { if (newValue == 'start') {
ElMessage.success('预检测开始!') ElMessage.success('预检测开始!')
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测开始!`})
if (oldValue == 'error') {
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
initCheckResult()
activeIndex = 0
percentage.value = 0
}
emit('update:testStatus', 'preTest_process') emit('update:testStatus', 'preTest_process')
//startTimer() // todo 可移除 startTimer() // todo 可移除
//emit('update:testStatus', 'process') // todo 可移除 testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测开始!`})
} }
// if (newValue == 'paused' && oldValue == 'process') {
// handlePauseTest()
// }
// if (newValue === 'process' && oldValue == 'paused') {
//activeIndex++
//handleResumeTest()
// }
}) })
watch(webMsgSend, function (newValue, oldValue) { watch(webMsgSend, function (newValue, oldValue) {
if (activeIndex <= checkTotal) { if (newValue.code == 10552) { //todo 10552之后还会发送消息吗
ElMessageBox.alert('存在已经初始化步骤,执行自动关闭,请重新发起检测', '预检测失败', {
confirmButtonText: '确定',
type: 'error',
})
testLogList.push({
type: 'error',
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`
})
emit('update:testStatus', 'error')
} else {
switch (newValue.requestId) { switch (newValue.requestId) {
case 'connect': // case 'connect':
switch (newValue.operateCode) { // switch (newValue.operateCode) {
case "Source": // case "Source":
ElMessageBox.alert('源通讯失败,请检查源连接情况!', '预检测失败', { // ElMessageBox.alert('源通讯失败,请检查源连接情况!', '预检测失败', {
confirmButtonText: '确定', // confirmButtonText: '确定',
type: 'error', // type: 'error',
}) // })
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`}) // testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`})
break; // break;
case "Dev": // case "Dev":
ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '预检测失败', { // ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '预检测失败', {
confirmButtonText: '确定', // confirmButtonText: '确定',
type: 'error', // type: 'error',
}) // })
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`}) // testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`})
break; // break;
} // }
emit('update:testStatus', 'preTest_fail') // emit('update:testStatus', 'preTest_fail')
break; // break;
case 'yjc_ytxjy':
switch (newValue.operateCode) {
case 'INIT_GATHER':
if (newValue.code == 10552) {
ElMessageBox.alert('源通讯中断,请检查源连接情况!', '预检测失败', {
confirmButtonText: '确定',
type: 'error',
})
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯中断!`})
emit('update:testStatus', 'preTest_fail')
}
break;
}
break;
case 'yjc_sbtxjy': case 'yjc_sbtxjy':
switch (newValue.operateCode) { switch (newValue.operateCode) {
case 'INIT_GATHER$01': case 'INIT_GATHER$01':
@@ -361,17 +351,6 @@ watch(webMsgSend, function (newValue, oldValue) {
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}${newValue.data}设备触发报告异常!`}) testLogList.push({type: 'error', log: `${new Date().toLocaleString()}${newValue.data}设备触发报告异常!`})
emit('update:testStatus', 'preTest_fail') emit('update:testStatus', 'preTest_fail')
} }
if (newValue.code == 10552) {
ElMessageBox.alert('存在已经初始化步骤,执行自动关闭,请重新发起检测', '预检测失败', {
confirmButtonText: '确定',
type: 'error',
})
testLogList.push({
type: 'error',
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`
})
emit('update:testStatus', 'preTest_fail')
}
break; break;
} }
break; break;
@@ -381,7 +360,7 @@ watch(webMsgSend, function (newValue, oldValue) {
ElMessage.success('预检测成功!') ElMessage.success('预检测成功!')
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测成功!`}) testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测成功!`})
activeIndex = getNextActiveIndex()+2 activeIndex = getNextActiveIndex() + 2
startTimer() startTimer()
emit('update:testStatus', 'process') emit('update:testStatus', 'process')
@@ -440,7 +419,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HV') activeIndex = getNextActiveIndex('HV')
// startTimer() startTimer()
} }
break; break;
case 'HI_Start': case 'HI_Start':
@@ -453,7 +432,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HI') activeIndex = getNextActiveIndex('HI')
// startTimer() startTimer()
} }
break; break;
case 'HP_Start': case 'HP_Start':
@@ -466,7 +445,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HP') activeIndex = getNextActiveIndex('HP')
// startTimer() startTimer()
} }
break; break;
case 'HSV_Start': case 'HSV_Start':
@@ -479,7 +458,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HSV') activeIndex = getNextActiveIndex('HSV')
//startTimer() startTimer()
} }
break; break;
case 'HSI_Start': case 'HSI_Start':
@@ -492,7 +471,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('HSI') activeIndex = getNextActiveIndex('HSI')
//startTimer() startTimer()
} }
break; break;
case 'VOLTAGE_Start': case 'VOLTAGE_Start':
@@ -505,7 +484,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('VOLTAGE') activeIndex = getNextActiveIndex('VOLTAGE')
// startTimer() startTimer()
} }
break; break;
case 'I_Start': case 'I_Start':
@@ -518,7 +497,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('I') activeIndex = getNextActiveIndex('I')
//startTimer() startTimer()
} }
break; break;
case 'IMBV_Start': case 'IMBV_Start':
@@ -531,7 +510,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('IMBV') activeIndex = getNextActiveIndex('IMBV')
//startTimer() startTimer()
} }
break; break;
case 'IMBA_Start': case 'IMBA_Start':
@@ -544,7 +523,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('IMBA') activeIndex = getNextActiveIndex('IMBA')
//startTimer() startTimer()
} }
break; break;
case 'F_Start': case 'F_Start':
@@ -557,7 +536,7 @@ watch(webMsgSend, function (newValue, oldValue) {
updateLog(false) updateLog(false)
if (testStatus.value != 'paused') { if (testStatus.value != 'paused') {
activeIndex = getNextActiveIndex('F') activeIndex = getNextActiveIndex('F')
//startTimer() startTimer()
} }
break; break;
case 'Quit': case 'Quit':
@@ -567,6 +546,7 @@ watch(webMsgSend, function (newValue, oldValue) {
break; break;
} }
} }
}, {deep: true}) }, {deep: true})
// 更新进度条 // 更新进度条
@@ -606,7 +586,6 @@ onBeforeMount(async () => {
// todo 可移除end // todo 可移除end
}) })
const showTestLog = () => { const showTestLog = () => {
drawer.value = true drawer.value = true
} }
@@ -639,6 +618,7 @@ const initDeviceList = () => {
// 初始化检测结果 (详细到通道) // 初始化检测结果 (详细到通道)
const initCheckResult = () => { const initCheckResult = () => {
let result: CheckData.ScriptChnItem[] = []
scriptData.forEach(item => { scriptData.forEach(item => {
// 处理当前节点的数据 // 处理当前节点的数据
let temp: CheckData.ScriptChnItem = { let temp: CheckData.ScriptChnItem = {
@@ -657,8 +637,9 @@ const initCheckResult = () => {
chnResult: tempChnResult chnResult: tempChnResult
}) })
} }
checkResult.push(temp) result.push(temp)
}) })
Object.assign(checkResult, result)
} }
// 更新检测结果(详细到通道) // 更新检测结果(详细到通道)
const updateCheckResult = (data: CheckData.ScriptChnItem) => { const updateCheckResult = (data: CheckData.ScriptChnItem) => {
@@ -934,153 +915,134 @@ const startTimer = () => {
case 1: case 1:
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'FREQ_Start', requestId: 'FREQ_Start'
params: {}
}) })
}, 1000) }, 1000)
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'FREQ_End', requestId: 'FREQ_End'
params: {}
}) })
}, 2000); }, 2000);
break; break;
case 2: case 2:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'V_Start', requestId: 'V_Start'
params: {}
}) })
// setTimeout(() => {
// emit('update:webMsgSend', {
// requestId: 'V_Start',
// code: "10552"
// })
// }, 2000)
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'V_End', requestId: 'V_End'
params: {}
}) })
}, 2000); }, 2000);
break; break;
case 3: case 3:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HV_Start', requestId: 'HV_Start',
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HV_End', requestId: 'HV_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 4: case 4:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HI_Start', requestId: 'HI_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HI_End', requestId: 'HI_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 5: case 5:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HP_Start', requestId: 'HP_Start',
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HP_End', requestId: 'HP_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 6: case 6:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HSV_Start', requestId: 'HSV_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HSV_End', requestId: 'HSV_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 7: case 7:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HSI_Start', requestId: 'HSI_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'HSI_End', requestId: 'HSI_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 8: case 8:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'VOLTAGE_Start', requestId: 'VOLTAGE_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'VOLTAGE_End', requestId: 'VOLTAGE_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 9: case 9:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'I_Start', requestId: 'I_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'I_End', requestId: 'I_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 10: case 10:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'IMBV_Start', requestId: 'IMBV_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'IMBV_End', requestId: 'IMBV_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 11: case 11:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'IMBA_Start', requestId: 'IMBA_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'IMBA_End', requestId: 'IMBA_End'
params: {} })
}, 4000) }, 2000)
})
break; break;
case 12: case 12:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'F_Start', requestId: 'F_Start'
params: {}
}) })
setTimeout(() => { setTimeout(() => {
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'F_End', requestId: 'F_End'
params: {}
}) })
}, 2000) }, 2000)
break; break;
case 13: case 13:
emit('update:webMsgSend', { emit('update:webMsgSend', {
requestId: 'Quit', requestId: 'Quit'
params: {}
}) })
break; break;
} }
@@ -1109,18 +1071,11 @@ const handleResumeTest = () => {
console.log('开始继续检测') console.log('开始继续检测')
}; };
//完成检测
const handleFinishTest = () => {
resultDialogVisible.value = true
ElMessage.success("完成检测");
};
const handleReCheck = () => { const handleReCheck = () => {
activeIndex = 0; activeIndex = 0;
percentage.value = 0; percentage.value = 0;
testLogList.length = 0; testLogList.length = 0;
errorCheckItem.length = 0; errorCheckItem.length = 0;
// resumeTimer()
}; };
// 获取当前执行的大测试项序 的 下一个大测试项序号 // 获取当前执行的大测试项序 的 下一个大测试项序号
@@ -1137,7 +1092,7 @@ const getNextActiveIndex = (code: string = ''): number => {
} }
function clear() { function clear() {
errorCheckItem.length = 0; errorCheckItem.length = 0
} }
defineExpose({ defineExpose({

View File

@@ -17,7 +17,7 @@
<preTest ref="preTestRef" v-if="stepsActiveIndex === 0" v-model:testStatus="preTestStatus" :webMsgSend="webMsgSend"></preTest> <preTest ref="preTestRef" v-if="stepsActiveIndex === 0" v-model:testStatus="preTestStatus" :webMsgSend="webMsgSend"></preTest>
<timeTest v-if="stepsActiveIndex === 1 && isTimeCheck" v-model:testStatus="timeTestStatus"></timeTest> <timeTest v-if="stepsActiveIndex === 1 && isTimeCheck" v-model:testStatus="timeTestStatus"></timeTest>
<!-- <channelsTest v-if="stepsActiveIndex === 2" v-model:testStatus="channelsTestStatus"></channelsTest> --> <!-- <channelsTest v-if="stepsActiveIndex === 2" v-model:testStatus="channelsTestStatus"></channelsTest> -->
<test ref="testRef" v-if="stepsActiveIndex >= 2" v-model:testStatus="TestStatus" :webMsgSend="webMsgSend" @update:webMsgSend="webMsgSend=$event" @sendPause="sendPause" @sendResume="sendResume"></test> <test ref="testRef" v-if="stepsActiveIndex >= 2" v-model:testStatus="TestStatus" :webMsgSend="webMsgSend" @update:webMsgSend="webMsgSend=$event" @sendPause="sendPause" @sendResume="sendResume" @sendReCheck="sendReCheck"></test>
<template #footer> <template #footer>
<div> <div>
@@ -296,6 +296,11 @@ const detectionOptions = ref([
// } // }
// }) // })
}else if (TestStatus.value == 'error') {
// 发送重新检测指令
sendReCheck()
} }
break; break;
default: default:
@@ -364,6 +369,11 @@ const detectionOptions = ref([
}) // todo 可移除 }) // todo 可移除
} }
const sendReCheck = () => {
console.log('发送重新检测指令')
TestStatus.value = 'start'
}
const getIcon = (index: number) => { const getIcon = (index: number) => {
if (stepsActiveIndex.value > index) return SuccessFilled; if (stepsActiveIndex.value > index) return SuccessFilled;
switch (index) { switch (index) {