Compare commits
2 Commits
666fb22c49
...
2025-09
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97d1f08bbe | ||
|
|
7d0053eb71 |
@@ -353,6 +353,7 @@ watch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
||||||
case 'connect':
|
case 'connect':
|
||||||
switch (newValue.operateCode) {
|
switch (newValue.operateCode) {
|
||||||
case 'Contrast_Dev':
|
case 'Contrast_Dev':
|
||||||
@@ -457,6 +458,7 @@ watch(
|
|||||||
case 25001:
|
case 25001:
|
||||||
case 25006:
|
case 25006:
|
||||||
case 25005:
|
case 25005:
|
||||||
|
case 25007:// 添加闪变处理
|
||||||
{
|
{
|
||||||
let result: CheckData.ScriptChnItem[] = []
|
let result: CheckData.ScriptChnItem[] = []
|
||||||
|
|
||||||
@@ -476,6 +478,18 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newValue.code == 25007) {
|
||||||
|
// 设置闪变项目为LOADING状态
|
||||||
|
const flickerResultItem = checkResult.find(item => item.code === 'flicker_data')
|
||||||
|
|
||||||
|
if (flickerResultItem) {
|
||||||
|
flickerResultItem.devices.forEach(device => {
|
||||||
|
device.chnResult.fill(CheckData.ChnCheckResultEnum.LOADING)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
scriptData.forEach(item => {
|
scriptData.forEach(item => {
|
||||||
// 处理当前节点的数据
|
// 处理当前节点的数据
|
||||||
const temp: CheckData.ScriptChnItem = {
|
const temp: CheckData.ScriptChnItem = {
|
||||||
@@ -491,7 +505,14 @@ watch(
|
|||||||
if (existingWaveItem) {
|
if (existingWaveItem) {
|
||||||
temp.devices = [...existingWaveItem.devices] // 保留已设置的devices
|
temp.devices = [...existingWaveItem.devices] // 保留已设置的devices
|
||||||
}
|
}
|
||||||
} else {
|
} // 特殊处理闪变项目 - 如果是25007消息且当前项目是闪变项目,则使用已设置的状态
|
||||||
|
else if (newValue.code == 25007 && item.code === 'PST') {
|
||||||
|
const existingFlickerItem = checkResult.find(checkItem => checkItem.scriptType === 'PST')
|
||||||
|
if (existingFlickerItem) {
|
||||||
|
temp.devices = [...existingFlickerItem.devices] // 保留已设置的devices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
// 找到message中所有scriptName与当前item.code匹配的项
|
// 找到message中所有scriptName与当前item.code匹配的项
|
||||||
const matchedDevices = message
|
const matchedDevices = message
|
||||||
.filter((msg: any) => msg.scriptName === item.code)
|
.filter((msg: any) => msg.scriptName === item.code)
|
||||||
@@ -505,7 +526,7 @@ watch(
|
|||||||
temp.devices.push(...matchedDevices)
|
temp.devices.push(...matchedDevices)
|
||||||
|
|
||||||
// 对于未匹配到的设备,也要添加占位符(特别是录波项目)
|
// 对于未匹配到的设备,也要添加占位符(特别是录波项目)
|
||||||
if (item.code === 'wave_data') {
|
if (item.code === 'wave_data' || item.code === 'PST') {
|
||||||
deviceList.forEach(device => {
|
deviceList.forEach(device => {
|
||||||
const isDeviceExist = matchedDevices.some((matchedDevice: any) => matchedDevice.deviceId === device.deviceId)
|
const isDeviceExist = matchedDevices.some((matchedDevice: any) => matchedDevice.deviceId === device.deviceId)
|
||||||
if (!isDeviceExist) {
|
if (!isDeviceExist) {
|
||||||
@@ -688,7 +709,7 @@ const initCheckResult = (defaultValue: CheckData.ChnCheckResultEnum) => {
|
|||||||
let tempChnResult: CheckData.ChnCheckResultEnum[] = []
|
let tempChnResult: CheckData.ChnCheckResultEnum[] = []
|
||||||
for (let j = 0; j < checkStore.chnNumList.length; j++) {
|
for (let j = 0; j < checkStore.chnNumList.length; j++) {
|
||||||
// 录波项目初始化为UNKNOWN状态,其他项目使用传入的默认值
|
// 录波项目初始化为UNKNOWN状态,其他项目使用传入的默认值
|
||||||
if (item.code === 'wave_data' && checkTotal > 1) {
|
if ((item.code === 'wave_data' || item.code === 'PST')&& checkTotal > 1) {
|
||||||
tempChnResult.push(CheckData.ChnCheckResultEnum.UNKNOWN)
|
tempChnResult.push(CheckData.ChnCheckResultEnum.UNKNOWN)
|
||||||
} else {
|
} else {
|
||||||
tempChnResult.push(defaultValue)
|
tempChnResult.push(defaultValue)
|
||||||
|
|||||||
@@ -162,6 +162,18 @@ const openDialog = (titleType: string, row: Partial<Monitor.ResPqMon> = {}) => {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 新增时检查线路号是否全部被占用
|
||||||
|
if (titleType === 'add') {
|
||||||
|
if(props.DevFormContent.devChns == tableData.value.length){
|
||||||
|
ElMessageBox.confirm(`线路号已全部被占用,无法新增监测点`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
title_Type.value = titleType
|
title_Type.value = titleType
|
||||||
monitorPopup.value?.open(titleType, row, props.DevFormContent, tableData.value, props.selectOptions)
|
monitorPopup.value?.open(titleType, row, props.DevFormContent, tableData.value, props.selectOptions)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user