Compare commits
13 Commits
051b4dfb15
...
2025-12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd9b82848e | ||
|
|
bcbd274f9d | ||
|
|
6d48942c83 | ||
|
|
a156976302 | ||
|
|
4752caf982 | ||
|
|
a096690917 | ||
|
|
29efbae717 | ||
|
|
a5177860de | ||
|
|
66019e0d3c | ||
|
|
0ca992134f | ||
|
|
128b02c145 | ||
|
|
bbc08679b9 | ||
|
|
bf8b8c9f0f |
@@ -76,6 +76,7 @@ log:
|
||||
report:
|
||||
template: {{APP_DATA_PATH}}\template
|
||||
reportDir: {{APP_DATA_PATH}}\report
|
||||
dateFormat: yyyy年MM月dd日
|
||||
data:
|
||||
homeDir: {{APP_DATA_PATH}}\data
|
||||
qr:
|
||||
|
||||
Binary file not shown.
@@ -234,7 +234,7 @@ const setEchart = () => {
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
color:
|
||||
colorName == 'A' ? '#DAA520' : colorName == 'B' ? '#2E8B57' : colorName == 'C' ? '#A52a2a' : '',
|
||||
colorName == 'A' ? '#DAA520' : colorName == 'B' ? '#2E8B57' : colorName == 'C' ? '#A52a2a' : '#DAA520',
|
||||
symbol: 'none',
|
||||
data: seriesList,
|
||||
lineStyle: lineStyle[lineS],
|
||||
|
||||
@@ -322,6 +322,12 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
type: 'error',
|
||||
})
|
||||
TableInit();
|
||||
} else if (newValue.code == -1) { //todo 10552之后还会发送消息吗?
|
||||
ElMessageBox.alert('源未知异常', '检测失败', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
TableInit();
|
||||
} else {
|
||||
// ==================== 特定业务消息处理 ====================
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ const ts = ref(''); // 内部测试状态,用于向父组件同步
|
||||
/**
|
||||
* 处理致命错误 - 会终止整个检测流程
|
||||
* @param stepRef 当前步骤状态引用
|
||||
* @param logRef 当前步骤日志引用
|
||||
* @param logRef 当前步骤日志引用
|
||||
* @param message 错误消息
|
||||
*/
|
||||
function handleFatalError(stepRef: any, logRef: any, message: string) {
|
||||
@@ -199,7 +199,7 @@ function handleWarningError(stepRef: any, logRef: any, message: string) {
|
||||
* 监听WebSocket消息,根据不同的requestId和operateCode处理各种检测状态
|
||||
* 主要消息类型:
|
||||
* - yjc_ytxjy: 源通讯校验
|
||||
* - yjc_sbtxjy: 设备通讯校验
|
||||
* - yjc_sbtxjy: 设备通讯校验
|
||||
* - yjc_xyjy: 协议校验
|
||||
* - YJC_xujy: 相序校验
|
||||
*/
|
||||
@@ -358,6 +358,14 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
handleFatalError(step4, step4InitLog, '存在已经初始化步骤,执行自动关闭,请重新发起检测!')
|
||||
} else if (newValue.code == 10520) {
|
||||
handleFatalError(step4, step4InitLog, '解析报文异常')
|
||||
}else if (newValue.code == -1) {
|
||||
step4.value = 'error'
|
||||
step4InitLog.value = [{
|
||||
type: 'error',
|
||||
log: '源未知异常!',
|
||||
}];
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
}
|
||||
break;
|
||||
case 'DATA_REQUEST$02':
|
||||
@@ -389,7 +397,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
ts.value = 'success'
|
||||
}
|
||||
activeIndex.value = 5
|
||||
|
||||
|
||||
break
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -260,7 +260,7 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
|
||||
temp.devices.push({
|
||||
deviceId: device.deviceId,
|
||||
deviceName: device.deviceName,
|
||||
chnResult: tempChnBtnResult,
|
||||
chnResult: tempChnBtnResult
|
||||
})
|
||||
})
|
||||
return temp
|
||||
@@ -401,6 +401,16 @@ watch(webMsgSend, function(newValue, oldValue) {
|
||||
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`,
|
||||
})
|
||||
emit('update:testStatus', 'test_init_fail')
|
||||
} else if (newValue.code == -1) {
|
||||
ElMessageBox.alert('源未知异常!', '检测失败!', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
testLogList.push({
|
||||
type: 'error',
|
||||
log: `${new Date().toLocaleString()}:源未知异常!`
|
||||
})
|
||||
emit('update:testStatus', 'error')
|
||||
} else {
|
||||
// ========== 根据请求ID处理不同类型的消息 ==========
|
||||
switch (newValue.requestId) {
|
||||
@@ -637,7 +647,7 @@ watch(webMsgSend, function(newValue, oldValue) {
|
||||
break
|
||||
// 检测结束
|
||||
case 'Quit':
|
||||
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -1121,7 +1131,7 @@ const handleResumeTest = () => {
|
||||
startData.value = new Date()
|
||||
testLogList.push({ type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!` })
|
||||
resumeTimeCount()
|
||||
|
||||
|
||||
}
|
||||
|
||||
// ========== 测试项索引管理函数 ==========
|
||||
@@ -1196,13 +1206,13 @@ onBeforeUnmount(() => {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
|
||||
|
||||
// 清理响应式数组引用,防止内存泄漏
|
||||
deviceList.splice(0)
|
||||
checkResult.splice(0)
|
||||
testLogList.splice(0)
|
||||
errorCheckItem.splice(0)
|
||||
|
||||
|
||||
// 重置其他状态
|
||||
scriptData.splice(0)
|
||||
activeIndex = 0
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
clearable
|
||||
placeholder="请选择设备类型"
|
||||
@change="handleDevTypeChange"
|
||||
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="item in devTypeOptions"
|
||||
@@ -63,7 +63,7 @@
|
||||
v-model="formContent.manufacturer"
|
||||
clearable
|
||||
placeholder="请选择设备厂家"
|
||||
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('Dev_Manufacturers')"
|
||||
@@ -78,7 +78,7 @@
|
||||
v-model="formContent.createDate"
|
||||
:placeholder="`请选择${createDateTitle}`"
|
||||
:disabled-date="disabledDate"
|
||||
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="固件版本" prop="hardwareVersion" v-if="scene === '0'">
|
||||
@@ -92,7 +92,7 @@
|
||||
v-model="formContent.inspectDate"
|
||||
placeholder="请选择定检日期"
|
||||
:disabled-date="disabledDate"
|
||||
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-divider>参数信息</el-divider>
|
||||
@@ -128,7 +128,7 @@
|
||||
v-model="formContent.protocol"
|
||||
clearable
|
||||
placeholder="请选择通讯协议"
|
||||
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('Protocol')"
|
||||
@@ -149,7 +149,7 @@
|
||||
v-model="formContent.encryptionFlag"
|
||||
clearable
|
||||
placeholder="请选择是否加密"
|
||||
|
||||
|
||||
>
|
||||
<el-option label="是" :value="1"></el-option>
|
||||
<el-option label="否" :value="0"></el-option>
|
||||
@@ -160,7 +160,7 @@
|
||||
v-model="formContent.series"
|
||||
placeholder="请输入识别码"
|
||||
show-password
|
||||
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="密钥" prop="devKey" clearable v-if="formContent.encryptionFlag">
|
||||
@@ -168,7 +168,7 @@
|
||||
v-model="formContent.devKey"
|
||||
placeholder="请输入密钥"
|
||||
show-password
|
||||
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="样品编号" prop="sampleId" clearable v-if="DevIsShow && scene === '0'">
|
||||
@@ -196,7 +196,7 @@
|
||||
v-model="formContent.cityName"
|
||||
clearable
|
||||
placeholder="请输入所属地市"
|
||||
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属供电公司" prop="gdName" v-if="MonIsShow">
|
||||
@@ -204,7 +204,7 @@
|
||||
v-model="formContent.gdName"
|
||||
clearable
|
||||
placeholder="请输入所属供电公司"
|
||||
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属电站" prop="subName" v-if="MonIsShow">
|
||||
@@ -212,7 +212,7 @@
|
||||
v-model="formContent.subName"
|
||||
clearable
|
||||
placeholder="请输入所属电站"
|
||||
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@@ -649,6 +649,17 @@ const updateDeviceByType = (devTypeId: string) => {
|
||||
value: String(i + 1),
|
||||
label: String(i + 1)
|
||||
}))
|
||||
if(scene.value === '1'){
|
||||
if (dev.name.includes('NPQS-581') || dev.name.includes('NPQS-580') || dev.name.includes('PQ-COM')) {
|
||||
formContent.encryptionFlag = 1
|
||||
formContent.series = 'Pqs&cn870299'
|
||||
formContent.devKey = '!qaz@wsx3edc4rfv'
|
||||
} else {
|
||||
formContent.encryptionFlag = 0
|
||||
formContent.series = null
|
||||
formContent.devKey = null
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 默认值处理
|
||||
formContent.devChns = 1
|
||||
|
||||
Reference in New Issue
Block a user