修改预检测实时数据详情展示
This commit is contained in:
@@ -34,7 +34,6 @@ const authStore = useAuthStore();
|
|||||||
const { maximize, isCollapse, layout, tabs, footer } = storeToRefs(globalStore);
|
const { maximize, isCollapse, layout, tabs, footer } = storeToRefs(globalStore);
|
||||||
const keepAliveStore = useKeepAliveStore();
|
const keepAliveStore = useKeepAliveStore();
|
||||||
const { keepAliveName } = storeToRefs(keepAliveStore);
|
const { keepAliveName } = storeToRefs(keepAliveStore);
|
||||||
// console.log("🚀 ~ keepAliveName:", keepAliveName)
|
|
||||||
//是否显示导航栏
|
//是否显示导航栏
|
||||||
const showMenuFlag = computed(() => authStore.showMenuFlagGet);
|
const showMenuFlag = computed(() => authStore.showMenuFlagGet);
|
||||||
// 注入刷新页面方法
|
// 注入刷新页面方法
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ const tabsDrop = () => {
|
|||||||
// Tab Click
|
// Tab Click
|
||||||
const tabClick = (tabItem: TabsPaneContext) => {
|
const tabClick = (tabItem: TabsPaneContext) => {
|
||||||
const fullPath = tabItem.props.name as string
|
const fullPath = tabItem.props.name as string
|
||||||
// console.log("🚀 ~ tabClick ~ fullPath:", tabItem)
|
|
||||||
router.push(fullPath)
|
router.push(fullPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export const useCheckStore = defineStore(CHECK_STORE_KEY, {
|
|||||||
this.selectTestItems.test = true
|
this.selectTestItems.test = true
|
||||||
},
|
},
|
||||||
setSelectTestItems(selectTestItems: CheckData.SelectTestItem) {
|
setSelectTestItems(selectTestItems: CheckData.SelectTestItem) {
|
||||||
console.log("🚀 ~ setSelectTestItems ~ selectTestItems:", selectTestItems)
|
|
||||||
this.selectTestItems = selectTestItems
|
this.selectTestItems = selectTestItems
|
||||||
},
|
},
|
||||||
setCheckType(checkType: number) {
|
setCheckType(checkType: number) {
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ const handleNext = async () => {
|
|||||||
},
|
},
|
||||||
{} as Record<string, string>
|
{} as Record<string, string>
|
||||||
)
|
)
|
||||||
generateChannelMapping()
|
await generateChannelMapping()
|
||||||
await checkStore.setChnNum(chnNumList)
|
await checkStore.setChnNum(chnNumList)
|
||||||
return {
|
return {
|
||||||
title: dialogTitle.value,
|
title: dialogTitle.value,
|
||||||
@@ -308,12 +308,13 @@ const generateChannelMapping = () => {
|
|||||||
|
|
||||||
// 查找对应的节点以获取显示名称
|
// 查找对应的节点以获取显示名称
|
||||||
const sourceDeviceNode = nodes.value.find(node => node.id === sourceDeviceId)
|
const sourceDeviceNode = nodes.value.find(node => node.id === sourceDeviceId)
|
||||||
|
|
||||||
const targetDeviceNode = nodes.value.find(node => node.id === targetDeviceId)
|
const targetDeviceNode = nodes.value.find(node => node.id === targetDeviceId)
|
||||||
|
|
||||||
if (sourceDeviceNode && targetDeviceNode) {
|
if (sourceDeviceNode && targetDeviceNode) {
|
||||||
// 提取设备显示文本
|
// 提取设备显示文本
|
||||||
const sourceDeviceText = sourceDeviceNode.data.label.children[1].children
|
const sourceDeviceText = sourceDeviceNode.data.label.children[1].children[0].children
|
||||||
const targetDeviceText = targetDeviceNode.data.label.children[1].children
|
const targetDeviceText = targetDeviceNode.data.label.children[1].children[0].children
|
||||||
|
|
||||||
// 构造键名 - 现在以标准设备为键
|
// 构造键名 - 现在以标准设备为键
|
||||||
const targetKey = `${targetDeviceText}`.replace('设备名称:', '')
|
const targetKey = `${targetDeviceText}`.replace('设备名称:', '')
|
||||||
|
|||||||
@@ -220,7 +220,6 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
|
|||||||
devices: []
|
devices: []
|
||||||
}
|
}
|
||||||
item.devices.forEach(device => {
|
item.devices.forEach(device => {
|
||||||
console.log('🚀 ~ item:', item, CheckData.ChnCheckResultEnum)
|
|
||||||
let tempChnBtnResult: CheckData.ButtonResult[] = []
|
let tempChnBtnResult: CheckData.ButtonResult[] = []
|
||||||
|
|
||||||
if (chnSum.value <= MAX_CHN_SUM) {
|
if (chnSum.value <= MAX_CHN_SUM) {
|
||||||
@@ -299,7 +298,6 @@ let count = 0
|
|||||||
watch(
|
watch(
|
||||||
webMsgSend,
|
webMsgSend,
|
||||||
function (newValue, oldValue) {
|
function (newValue, oldValue) {
|
||||||
console.log('🚀 ~ newValue:', newValue)
|
|
||||||
if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') {
|
if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') {
|
||||||
if (testLogList[0].log == '正在检测,请稍等...' || testLogList[0].log == '暂无数据,等待检测开始') {
|
if (testLogList[0].log == '正在检测,请稍等...' || testLogList[0].log == '暂无数据,等待检测开始') {
|
||||||
testLogList.shift()
|
testLogList.shift()
|
||||||
|
|||||||
@@ -450,7 +450,6 @@ watch(ActiveStatue, function (newValue, oldValue) {
|
|||||||
if (newValue === 'success' && stepsActiveIndex.value === stepsTotalNum.value - 1) {
|
if (newValue === 'success' && stepsActiveIndex.value === stepsTotalNum.value - 1) {
|
||||||
stepsActiveIndex.value += 2
|
stepsActiveIndex.value += 2
|
||||||
nextStepText.value = '检测完成'
|
nextStepText.value = '检测完成'
|
||||||
console.log('🚀 ~ nextStepText.value:', nextStepText.value)
|
|
||||||
}
|
}
|
||||||
if (newValue === 'test_init_fail') {
|
if (newValue === 'test_init_fail') {
|
||||||
stepsActiveIndex.value += 2
|
stepsActiveIndex.value += 2
|
||||||
@@ -581,7 +580,6 @@ const nextStep = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleStepClick = (step: number) => {
|
const handleStepClick = (step: number) => {
|
||||||
console.log('🚀 ~ handleStepClick ~ step > stepsActive.value:', step, stepsActive.value)
|
|
||||||
|
|
||||||
if (step > stepsActive.value) {
|
if (step > stepsActive.value) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ const openTestDialog = async () => {
|
|||||||
generateChannelMapping()
|
generateChannelMapping()
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
testPopup.value?.open(
|
testPopup.value?.open(
|
||||||
dialogTitle.value,
|
dialogTitle.value,
|
||||||
channelMapping.value,
|
channelMapping.value,
|
||||||
|
|||||||
@@ -778,9 +778,6 @@ const handleTest2 = async () => {
|
|||||||
const deviceNames = inconsistentPointDevices.map(d => d.name).join(', ')
|
const deviceNames = inconsistentPointDevices.map(d => d.name).join(', ')
|
||||||
ElMessage.warning(`以下设备存在通道未绑定监测点: ${deviceNames}`)
|
ElMessage.warning(`以下设备存在通道未绑定监测点: ${deviceNames}`)
|
||||||
}
|
}
|
||||||
console.log("🚀 ~ handleTest2 ~ filteredChannelsSelection, pqStandardDevList.value, props.id:", filteredChannelsSelection, )
|
|
||||||
console.log("🚀 ~ handleTest2 ~ filteredChannelsSelection, pqStandardDevList.value, props.id:", pqStandardDevList.value, )
|
|
||||||
console.log("🚀 ~ handleTest2 ~ filteredChannelsSelection, pqStandardDevList.value, props.id:", props.id)
|
|
||||||
|
|
||||||
// 只传递有监测点的设备
|
// 只传递有监测点的设备
|
||||||
deviceConnectionPopupRef.value?.open(filteredChannelsSelection, pqStandardDevList.value, props.id)
|
deviceConnectionPopupRef.value?.open(filteredChannelsSelection, pqStandardDevList.value, props.id)
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ function findTargetCodes(data: any[], targetCodes: string[]) {
|
|||||||
// for (let item of data) {
|
// for (let item of data) {
|
||||||
// // 判断当前项的 scriptTypeCode 是否包含目标值
|
// // 判断当前项的 scriptTypeCode 是否包含目标值
|
||||||
// if (item.scriptTypeCode !=null && targetCodes.includes(item.scriptTypeCode)) {
|
// if (item.scriptTypeCode !=null && targetCodes.includes(item.scriptTypeCode)) {
|
||||||
// console.log("🚀 ~ findTargetCodes ~ targetCodes.includes(item.scriptTypeCode):",item.scriptTypeCode, targetCodes.includes(item.scriptTypeCode))
|
|
||||||
// result.push(item.scriptTypeCode)
|
// result.push(item.scriptTypeCode)
|
||||||
// return result
|
// return result
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -169,7 +169,6 @@ const info = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
//console.log('🚀 ~ item.children.forEach ~ tableData.value:', tableData.value)
|
|
||||||
}
|
}
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
return tableData.value
|
return tableData.value
|
||||||
|
|||||||
@@ -303,7 +303,6 @@ const unit = [
|
|||||||
]
|
]
|
||||||
// 参考设定值添加单位
|
// 参考设定值添加单位
|
||||||
const setUnit = (row: any) => {
|
const setUnit = (row: any) => {
|
||||||
console.log('🚀 ~ setUnit ~ row:', row)
|
|
||||||
let text = ''
|
let text = ''
|
||||||
if (row.pname == '暂态') {
|
if (row.pname == '暂态') {
|
||||||
row.name == '电压幅值' ? (text = '%') : ''
|
row.name == '电压幅值' ? (text = '%') : ''
|
||||||
|
|||||||
@@ -286,7 +286,6 @@ const handleRowClick = async (row: any, column: any) => {
|
|||||||
selectedRow.value = row.name
|
selectedRow.value = row.name
|
||||||
childForm.value.push(form.value.channelList[row.sort * 2])
|
childForm.value.push(form.value.channelList[row.sort * 2])
|
||||||
childForm.value.push(form.value.channelList[row.sort * 2 + 1])
|
childForm.value.push(form.value.channelList[row.sort * 2 + 1])
|
||||||
console.log('🚀 ~ handleRowClick ~ childForm.value:', childForm.value)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// childForm.value = row
|
// childForm.value = row
|
||||||
@@ -606,7 +605,6 @@ const open = (sign: string, row: any) => {
|
|||||||
|
|
||||||
handleRowClick({ name: 'L1', sort: 0 }, { label: '相别' })
|
handleRowClick({ name: 'L1', sort: 0 }, { label: '相别' })
|
||||||
dictStore.getDictData('Script_Value_Type')
|
dictStore.getDictData('Script_Value_Type')
|
||||||
//console.log('🚀 ~ open ~ tabChildren.value:', tabChildren.value)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断后台没有谐波,简谐波值 用于回显
|
// 判断后台没有谐波,简谐波值 用于回显
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ const empty = (index: number) => {
|
|||||||
props.childForm[index].harmList = []
|
props.childForm[index].harmList = []
|
||||||
}
|
}
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
console.log('🚀 ~ onSubmit ~ props.childForm[0]:', props.childForm[0].harmList)
|
|
||||||
if (formInline.value.harm.length == 0 || formInline.value.famp == '' || formInline.value.fphase == '') {
|
if (formInline.value.harm.length == 0 || formInline.value.famp == '' || formInline.value.fphase == '') {
|
||||||
ElMessage.warning('请填写值!')
|
ElMessage.warning('请填写值!')
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ const empty = (index: number) => {
|
|||||||
props.childForm[index].inharmList = []
|
props.childForm[index].inharmList = []
|
||||||
}
|
}
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
console.log('🚀 ~ onSubmit ~ props.childForm[0]:', props.childForm[0].inharmList)
|
|
||||||
if (formInline.value.inharm.length == 0 || formInline.value.famp == '' || formInline.value.fphase == '') {
|
if (formInline.value.inharm.length == 0 || formInline.value.famp == '' || formInline.value.fphase == '') {
|
||||||
ElMessage.warning('请填写值!')
|
ElMessage.warning('请填写值!')
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -224,7 +224,6 @@ const open = async (title: string, row: any) => {
|
|||||||
} else {
|
} else {
|
||||||
let list = JSON.parse(row)
|
let list = JSON.parse(row)
|
||||||
formContent.value = list
|
formContent.value = list
|
||||||
console.log('🚀 ~ open ~ list:', formContent.value)
|
|
||||||
show.value = true
|
show.value = true
|
||||||
}
|
}
|
||||||
// 重置表单
|
// 重置表单
|
||||||
@@ -243,7 +242,6 @@ const treeInfo = async (currentMode: string) => {
|
|||||||
const result = await getDictTreeByCode(data)
|
const result = await getDictTreeByCode(data)
|
||||||
const result1 = (await getDictTreeByCode({ ...data, code: 'Script_Error' })).data[0].children
|
const result1 = (await getDictTreeByCode({ ...data, code: 'Script_Error' })).data[0].children
|
||||||
const allOptions = await convertToOptions(result.data as Dict.ResDictTree[])
|
const allOptions = await convertToOptions(result.data as Dict.ResDictTree[])
|
||||||
//console.log('🚀 ~ treeInfo ~ result1:', allOptions[0]?.children)
|
|
||||||
const setallTree = await setTree(allOptions[0]?.children, result1)
|
const setallTree = await setTree(allOptions[0]?.children, result1)
|
||||||
secondLevelOptions.push(...(setallTree || []))
|
secondLevelOptions.push(...(setallTree || []))
|
||||||
modeId.value = dictStore.getDictData('Pattern').find(item => item.name === currentMode)?.id
|
modeId.value = dictStore.getDictData('Pattern').find(item => item.name === currentMode)?.id
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ function findTargetCodes(data: any[], targetCodes: string[]) {
|
|||||||
// for (let item of data) {
|
// for (let item of data) {
|
||||||
// // 判断当前项的 scriptTypeCode 是否包含目标值
|
// // 判断当前项的 scriptTypeCode 是否包含目标值
|
||||||
// if (item.scriptTypeCode !=null && targetCodes.includes(item.scriptTypeCode)) {
|
// if (item.scriptTypeCode !=null && targetCodes.includes(item.scriptTypeCode)) {
|
||||||
// console.log("🚀 ~ findTargetCodes ~ targetCodes.includes(item.scriptTypeCode):",item.scriptTypeCode, targetCodes.includes(item.scriptTypeCode))
|
|
||||||
// result.push(item.scriptTypeCode)
|
// result.push(item.scriptTypeCode)
|
||||||
// return result
|
// return result
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -281,7 +281,6 @@ const tabVisibilityMap: { [key: string]: { harmVIsShow: boolean, harmAIsShow: bo
|
|||||||
};
|
};
|
||||||
const open = async (row: any,communicationList:any,parentTabName:string,childrenTabName:string) => {
|
const open = async (row: any,communicationList:any,parentTabName:string,childrenTabName:string) => {
|
||||||
|
|
||||||
console.log('🚀 ~ open ~ parentTabName:', parentTabName)
|
|
||||||
//对应表格显示隐藏
|
//对应表格显示隐藏
|
||||||
const visibilitySettings = tabVisibilityMap[parentTabName] || { harmVIsShow: false, harmAIsShow: false, iHarmVIsShow: false, iHarmAIsShow: false };
|
const visibilitySettings = tabVisibilityMap[parentTabName] || { harmVIsShow: false, harmAIsShow: false, iHarmVIsShow: false, iHarmAIsShow: false };
|
||||||
harmVIsShow.value = visibilitySettings.harmVIsShow;
|
harmVIsShow.value = visibilitySettings.harmVIsShow;
|
||||||
@@ -290,7 +289,6 @@ const open = async (row: any,communicationList:any,parentTabName:string,children
|
|||||||
iHarmAIsShow.value = visibilitySettings.iHarmAIsShow;
|
iHarmAIsShow.value = visibilitySettings.iHarmAIsShow;
|
||||||
|
|
||||||
titleType.value = parentTabName + '_' + childrenTabName+ '_详情'
|
titleType.value = parentTabName + '_' + childrenTabName+ '_详情'
|
||||||
//console.log('🚀 ~ open ~ row:', row)
|
|
||||||
tableData.value = row
|
tableData.value = row
|
||||||
copyRowList.value = JSON.parse(JSON.stringify(row))
|
copyRowList.value = JSON.parse(JSON.stringify(row))
|
||||||
|
|
||||||
@@ -327,11 +325,7 @@ const open = async (row: any,communicationList:any,parentTabName:string,children
|
|||||||
let retryCompute = isEqual(form, copyRowList)
|
let retryCompute = isEqual(form, copyRowList)
|
||||||
|
|
||||||
|
|
||||||
console.log('🚀 ~ open ~ 1:', form)
|
|
||||||
console.log('🚀 ~ open ~ 2:', props.formContent?.id)
|
|
||||||
console.log('🚀 ~ open ~ 3:', props.activeName)
|
|
||||||
console.log('🚀 ~ open ~ 4:', checkDataList)
|
|
||||||
console.log('🚀 ~ open ~ 5:', retryCompute)
|
|
||||||
await scriptDtlsCheckDataList({
|
await scriptDtlsCheckDataList({
|
||||||
...form,
|
...form,
|
||||||
scriptId: props.formContent?.id,
|
scriptId: props.formContent?.id,
|
||||||
@@ -346,7 +340,6 @@ const open = async (row: any,communicationList:any,parentTabName:string,children
|
|||||||
item.show = true
|
item.show = true
|
||||||
})
|
})
|
||||||
setValue_TableData.value = res.data
|
setValue_TableData.value = res.data
|
||||||
console.log('🚀 ~ open ~ res.data:', res.data)
|
|
||||||
})
|
})
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user