微调
This commit is contained in:
@@ -235,7 +235,7 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
|
||||
case CheckData.ChnCheckResultEnum.FAIL:
|
||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.DANGER, icon: 'Close'})
|
||||
break;
|
||||
case CheckData.ChnCheckResultEnum.UNCONNECTED:
|
||||
case CheckData.ChnCheckResultEnum.TIMEOUT:
|
||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'Link'})
|
||||
break;
|
||||
case CheckData.ChnCheckResultEnum.ERRORDATA:
|
||||
@@ -263,7 +263,7 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
|
||||
case CheckData.ChnCheckResultEnum.FAIL:
|
||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.DANGER, icon: 'Close'})
|
||||
break;
|
||||
case CheckData.ChnCheckResultEnum.UNCONNECTED:
|
||||
case CheckData.ChnCheckResultEnum.TIMEOUT:
|
||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'Link'})
|
||||
break;
|
||||
case CheckData.ChnCheckResultEnum.ERRORDATA:
|
||||
@@ -289,6 +289,8 @@ watch(testStatus, function (newValue, oldValue) {
|
||||
if (newValue == 'start') {
|
||||
ElMessage.success('初始化开始!')
|
||||
|
||||
showTestLog()
|
||||
|
||||
if (oldValue == 'error') {
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
|
||||
|
||||
@@ -332,10 +334,15 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
case 'socket_timeout':
|
||||
switch (newValue.operateCode) {
|
||||
case "VOLTAGE":
|
||||
// todo 超时处理 页面按钮更新
|
||||
ElMessageBox.alert('连接超时!', '连接超时', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
testLogList.push({
|
||||
type: 'warning',
|
||||
log: `${new Date().toLocaleString()}:连接超时!`
|
||||
})
|
||||
emit('update:testStatus', 'connect_timeout')
|
||||
break;
|
||||
}
|
||||
@@ -364,6 +371,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
case 'INIT_GATHER':
|
||||
if (newValue.code == 10200) {
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:源初始化成功!`})
|
||||
percentage.value = 1
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -373,6 +381,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
case 'INIT_GATHER$01':
|
||||
if (newValue.code == 25001) {
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:设备通讯校验成功!`})
|
||||
percentage.value = 2
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -384,7 +393,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
ElMessage.success('初始化成功!')
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:协议校验成功!`})
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化成功!`})
|
||||
|
||||
percentage.value = 3
|
||||
activeIndex = getNextActiveIndex() + 2
|
||||
// startTimer()
|
||||
|
||||
@@ -928,7 +937,7 @@ const handleClick = (item: any, chnNum: number, scriptType: string) => {
|
||||
}
|
||||
|
||||
if (flag === 0) {
|
||||
ElMessageBox.alert('设备通讯中断,请检查设备通讯是否正常', '通讯中断', {
|
||||
ElMessageBox.alert('连接超时,请检查设备通讯是否正常', '连接超时', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning',
|
||||
})
|
||||
@@ -951,8 +960,9 @@ const startTimer = () => {
|
||||
case 0:
|
||||
// setTimeout(() => {
|
||||
// emit('update:webMsgSend', {
|
||||
// requestId: 'socket_timeout',
|
||||
// operateCode: "VOLTAGE",
|
||||
// requestId: 'yjc_ytxjy',
|
||||
// operateCode: "INIT_GATHER",
|
||||
// code: 10200
|
||||
// })
|
||||
// }, 5000)
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user