处理装置配置异常

This commit is contained in:
caozehui
2025-01-10 11:03:29 +08:00
parent 5ebb8549bf
commit b614767b2d

View File

@@ -240,7 +240,7 @@ const handleSubmit = () => {
switch (stepsActiveIndex.value) {
case 0:
preTestStatus.value = 'start'
// preTestStatus.value = 'start'
/* loading = ElLoading.service({
@@ -254,8 +254,16 @@ const handleSubmit = () => {
planId: planId,
operateType: '1' // '1'为预检测、2为正式检测
}).then(res => {
if (res.code === 'A001014') {
ElMessageBox.alert('装置配置异常', '检测失败', {
confirmButtonText: '确定',
type: 'error',
})
TestStatus.value = 'error'
}
if (res.code === 'A0000') {
preTestStatus.value = 'start'
}
})
break;
case 1:
@@ -273,6 +281,16 @@ const handleSubmit = () => {
operateType: '2' // '1'为预检测、2为正式检测
}).then(res => {
console.log(res)
if (res.code === 'A001014') {
ElMessageBox.alert('装置配置异常', '初始化失败', {
confirmButtonText: '确定',
type: 'error',
})
TestStatus.value = 'test_init_fail'
}
if (res.code === 'A0000') {
TestStatus.value = 'start'
}
/* if (res.code === 20000) {
TestStatus.value = 'start'
webMsgSend.value = ''
@@ -280,7 +298,6 @@ const handleSubmit = () => {
ElMessage.error(res.message)
}*/
})
TestStatus.value = 'start'
} else
// if (TestStatus.value == 'process') {
// // 发送暂停指令
@@ -408,15 +425,18 @@ const sendReCheck = () => {
operateType: '2' // 0:'系数校验''1'为预检测、2为正式检测
}).then(res => {
console.log(res)
/* if (res.code === 20000) {
TestStatus.value = 'start'
webMsgSend.value = ''
} else {
ElMessage.error(res.message)
}*/
if (res.code === 'A001014') {
ElMessageBox.alert('装置配置异常', '初始化失败', {
confirmButtonText: '确定',
type: 'error',
})
TestStatus.value = 'test_init_fail'
}
if (res.code === 'A0000') {
TestStatus.value = 'start'
}
})
}
const getIcon = (index: number) => {
if (stepsActiveIndex.value > index) return SuccessFilled;