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