预见测
This commit is contained in:
@@ -87,11 +87,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<RealTimeData ref="realTimeDataRef"/>
|
||||
<RealTimeData ref="realTimeDataRef" />
|
||||
</template>
|
||||
<script lang="tsx" setup name="preTest">
|
||||
import {ElMessage, ElMessageBox, StepProps} from "element-plus";
|
||||
import {defineExpose, ref, toRef, watch} from 'vue';
|
||||
import {defineExpose, PropType, ref, toRef, watch} from 'vue';
|
||||
import RealTimeData from './realTimeDataAlign.vue'
|
||||
|
||||
const realTimeDataRef = ref()
|
||||
@@ -183,6 +183,10 @@ const props = defineProps({
|
||||
webMsgSend: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
mapping: {
|
||||
type: Object as PropType<Record<string, Record<string, string>>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -192,7 +196,10 @@ const webMsgSend = toRef(props, 'webMsgSend');
|
||||
const ts = ref('');
|
||||
|
||||
watch(webMsgSend, function (newValue, oldValue) {
|
||||
console.log('newValue.requestId', newValue.requestId)
|
||||
console.log('testStatus.value', testStatus.value)
|
||||
if (testStatus.value !== 'waiting') {
|
||||
console.log('newValue.requestId', newValue.requestId)
|
||||
switch (newValue.requestId) {
|
||||
case 'yjc_sbtxjy':
|
||||
switch (newValue.operateCode) {
|
||||
@@ -227,7 +234,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
step6.value = 'error'
|
||||
} else if (newValue.code == 10552) {
|
||||
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||
step2InitLog.value = [{
|
||||
step1InitLog.value = [{
|
||||
type: 'wait',
|
||||
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
||||
}];
|
||||
@@ -491,7 +498,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
log: '源服务端连接失败!',
|
||||
}];
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
step6.value = 'error'
|
||||
break;
|
||||
case "Dev":
|
||||
step2.value = 'error'
|
||||
@@ -500,7 +507,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
log: '设备服务端连接失败!',
|
||||
}];
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
step6.value = 'error'
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -513,7 +520,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
type: 'error',
|
||||
})
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
step6.value = 'error'
|
||||
break;
|
||||
case 'socket_timeout':
|
||||
ElMessageBox.alert(`设备连接异常,请检查设备连接情况!`, '检测失败', {
|
||||
@@ -521,7 +528,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
type: 'error',
|
||||
})
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
step6.value = 'error'
|
||||
break;
|
||||
case 'server_error':
|
||||
ElMessageBox.alert('服务端主动关闭连接!', '初始化失败', {
|
||||
@@ -529,7 +536,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
type: 'error',
|
||||
})
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
step6.value = 'error'
|
||||
break;
|
||||
case 'device_error':
|
||||
ElMessageBox.alert('设备主动关闭连接!', '初始化失败', {
|
||||
@@ -537,7 +544,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
type: 'error',
|
||||
})
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
step6.value = 'error'
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -622,7 +629,7 @@ function initializeParameters() {
|
||||
}
|
||||
|
||||
const openDialog = () => {
|
||||
realTimeDataRef.value.open()
|
||||
realTimeDataRef.value.open(props.mapping)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user