修改冀北现场反馈问题

This commit is contained in:
GGJ
2025-12-15 09:33:34 +08:00
parent d30b8247cf
commit 9f5b2ecc46
28 changed files with 700 additions and 468 deletions

View File

@@ -35,7 +35,7 @@
<el-tab-pane label="谐波频谱" name="4" lazy v-if="!isReload">
<Xiebopingpu v-if="activeName == '4'" />
</el-tab-pane>
<el-tab-pane label="告警数据统计" name="5" lazy v-if="!isReload ">
<el-tab-pane label="告警数据统计" name="5" lazy v-if="!isReload && VITE_FLAG">
<Gaojingshujutongji v-if="activeName == '5'" />
</el-tab-pane>
<el-tab-pane label="监测点运行状态" name="6" lazy v-if="!isReload">
@@ -64,7 +64,7 @@ import { defineOptions, watch, onMounted, ref, nextTick } from 'vue'
import 'splitpanes/dist/splitpanes.css'
import { Splitpanes, Pane } from 'splitpanes'
import PointTree from '@/components/tree/pqs/pointTree.vue'
import { useMonitoringPoint } from '@/stores/monitoringPoint'
import { mainHeight } from '@/utils/layout'
import Wentaizonghepinggu from './wentaizonghepinggu/index.vue'
import Wentaizhibiaohegelv from './wentaizhibiaohegelv/index.vue'
@@ -77,7 +77,8 @@ import { useRoute } from 'vue-router'
import StatisticalReport from './statisticalReport/index.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
import router from '@/router'
import { useMonitoringPoint } from '@/stores/monitoringPoint'
import { id } from 'element-plus/es/locale'
defineOptions({
name: 'harmonic-boot/monitor/online'
})
@@ -140,19 +141,42 @@ watch(
if (route.fullPath.includes('harmonic-boot/monitor/online')) {
let type = (route.query.type as string) || 'null'
let lineId = (route.query.id as string) || 'null'
console.log('🚀 ~ type:', type)
if (type == 'null') {
} else {
setTimeout(() => {
monitoringPoint.setValue('lineId', lineId)
//
// pointTree.value.tree
activeName.value = type
setTimeout(() => {
pointTree.value.scrollToNode(lineId)
monitoringPoint.setValue('lineName', findNodeByTreeId(pointTree.value.tree, lineId).alias)
}, 500)
}, 1000)
}
}
},
{ deep: true, immediate: true }
)
// 递归函数(同上)
const findNodeByTreeId = (treeData: any, id: any) => {
for (const node of treeData) {
if (node.id == id) return node
if (node.children && Array.isArray(node.children) && node.children.length) {
const found: any = findNodeByTreeId(node.children, id)
if (found) return found
}
}
return null
}
// 调用示例
const getTargetNode = () => {
const targetId = '9b7adecf588b4110acb7018f297592a7'
const node = findNodeByTreeId(treeData.value, targetId)
console.log('Vue中找到的节点', node)
}
const changeTab = (e: string) => {
activeName.value = e
}