2024-02-28 14:19:56 +08:00
|
|
|
|
<template>
|
2024-02-28 20:01:21 +08:00
|
|
|
|
<div class="default-main" style="padding: 10px">
|
|
|
|
|
|
<splitpanes :style="height" class="default-theme" id="navigation-splitpanes">
|
|
|
|
|
|
<pane :size="size">
|
2025-03-13 18:26:03 +08:00
|
|
|
|
<PointTree
|
|
|
|
|
|
ref="pointTree"
|
|
|
|
|
|
:default-expand-all="false"
|
2024-02-28 20:01:21 +08:00
|
|
|
|
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
2025-03-13 18:26:03 +08:00
|
|
|
|
:current-node-key="monitoringPoint.state.lineId"
|
|
|
|
|
|
:show-checkbox="monitoringPoint.state.showCheckBox"
|
|
|
|
|
|
:default-checked-keys="monitoringPoint.state.lineIds"
|
|
|
|
|
|
@check="handleCheckChange"
|
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
|
@init="handleNodeClick"
|
|
|
|
|
|
></PointTree>
|
2024-02-28 20:01:21 +08:00
|
|
|
|
</pane>
|
2024-11-21 11:36:36 +08:00
|
|
|
|
<pane>
|
2024-02-28 20:01:21 +08:00
|
|
|
|
<div style="position: relative; height: 100%">
|
2025-03-13 18:26:03 +08:00
|
|
|
|
<el-tabs
|
|
|
|
|
|
v-model="activeName"
|
|
|
|
|
|
type="border-card"
|
|
|
|
|
|
class="demo-tabs"
|
|
|
|
|
|
style="height: 100%"
|
|
|
|
|
|
@tab-change="handleTabChange"
|
|
|
|
|
|
>
|
2024-07-15 14:49:52 +08:00
|
|
|
|
<!-- <el-tab-pane label="稳态综合评估" name="1" lazy v-if="!isReload">
|
2024-02-28 20:01:21 +08:00
|
|
|
|
<Wentaizonghepinggu />
|
2024-07-15 14:49:52 +08:00
|
|
|
|
</el-tab-pane> -->
|
2024-02-28 20:01:21 +08:00
|
|
|
|
<el-tab-pane label="稳态指标合格率" name="2" lazy v-if="!isReload">
|
2025-03-13 18:26:03 +08:00
|
|
|
|
<Wentaizhibiaohegelv v-if="activeName == '2'" />
|
2024-02-28 20:01:21 +08:00
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane label="稳态数据分析" name="3" lazy v-if="!isReload">
|
2025-03-13 18:26:03 +08:00
|
|
|
|
<Wentaishujufenxi v-if="activeName == '3'" />
|
2024-02-28 20:01:21 +08:00
|
|
|
|
</el-tab-pane>
|
2024-11-21 11:36:36 +08:00
|
|
|
|
<el-tab-pane label="谐波频谱" name="4" lazy v-if="!isReload">
|
2025-03-13 18:26:03 +08:00
|
|
|
|
<Xiebopingpu v-if="activeName == '4'" />
|
2024-02-28 20:01:21 +08:00
|
|
|
|
</el-tab-pane>
|
2025-04-16 09:43:27 +08:00
|
|
|
|
<el-tab-pane label="告警数据统计" name="5" lazy v-if="!isReload && VITE_FLAG">
|
|
|
|
|
|
<Gaojingshujutongji v-if="activeName == '5'" />
|
|
|
|
|
|
</el-tab-pane>
|
2024-02-28 20:01:21 +08:00
|
|
|
|
<el-tab-pane label="监测点运行状态" name="6" lazy v-if="!isReload">
|
2025-03-13 18:26:03 +08:00
|
|
|
|
<Yunxingzhuangtai v-if="activeName == '6'" />
|
|
|
|
|
|
</el-tab-pane>
|
2025-04-16 09:43:27 +08:00
|
|
|
|
<el-tab-pane label="实时数据" name="7" lazy v-if="!isReload && !VITE_FLAG">
|
2025-03-13 18:26:03 +08:00
|
|
|
|
<Shishishuju v-if="activeName == '7'" />
|
2024-02-28 20:01:21 +08:00
|
|
|
|
</el-tab-pane>
|
2025-12-01 13:19:18 +08:00
|
|
|
|
<el-tab-pane label="统计报表" name="8" lazy v-if="!isReload && VITE_FLAG">
|
|
|
|
|
|
<StatisticalReport v-if="activeName == '8'" />
|
|
|
|
|
|
</el-tab-pane>
|
2024-02-28 20:01:21 +08:00
|
|
|
|
</el-tabs>
|
2024-03-01 15:11:16 +08:00
|
|
|
|
<!-- <div
|
2024-02-29 16:29:34 +08:00
|
|
|
|
class="monitoring-point"
|
|
|
|
|
|
v-if="!monitoringPoint.state.showCheckBox && monitoringPoint.state.lineName"
|
|
|
|
|
|
>
|
2024-02-29 10:31:32 +08:00
|
|
|
|
当前位置:{{ monitoringPoint.state.lineName }}
|
2024-03-01 15:11:16 +08:00
|
|
|
|
</div> -->
|
2024-02-28 20:01:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</pane>
|
|
|
|
|
|
</splitpanes>
|
2024-02-28 14:19:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
2024-02-28 20:01:21 +08:00
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { defineOptions, watch, onMounted, ref, nextTick } from 'vue'
|
|
|
|
|
|
import 'splitpanes/dist/splitpanes.css'
|
|
|
|
|
|
import { Splitpanes, Pane } from 'splitpanes'
|
2024-03-06 20:37:36 +08:00
|
|
|
|
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
2024-02-28 20:01:21 +08:00
|
|
|
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
2024-02-28 14:19:56 +08:00
|
|
|
|
import { mainHeight } from '@/utils/layout'
|
2024-02-28 14:36:55 +08:00
|
|
|
|
import Wentaizonghepinggu from './wentaizonghepinggu/index.vue'
|
|
|
|
|
|
import Wentaizhibiaohegelv from './wentaizhibiaohegelv/index.vue'
|
|
|
|
|
|
import Wentaishujufenxi from './wentaishujufenxi/index.vue'
|
|
|
|
|
|
import Xiebopingpu from './xiebopingpu/index.vue'
|
|
|
|
|
|
import Gaojingshujutongji from './gaojingshujutongji/index.vue'
|
|
|
|
|
|
import Yunxingzhuangtai from './yunxingzhuangtai/index.vue'
|
|
|
|
|
|
import Shishishuju from './shishishuju/index.vue'
|
2025-12-01 13:19:18 +08:00
|
|
|
|
import StatisticalReport from './statisticalReport/index.vue'
|
2025-04-16 09:43:27 +08:00
|
|
|
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
2024-02-28 14:19:56 +08:00
|
|
|
|
import router from '@/router'
|
|
|
|
|
|
|
|
|
|
|
|
defineOptions({
|
2025-04-16 09:43:27 +08:00
|
|
|
|
name: 'harmonic-boot/monitor/online'
|
2024-02-28 14:19:56 +08:00
|
|
|
|
})
|
2024-02-28 20:01:21 +08:00
|
|
|
|
|
2024-02-28 14:19:56 +08:00
|
|
|
|
const monitoringPoint = useMonitoringPoint()
|
2024-02-29 09:37:31 +08:00
|
|
|
|
const pointTree = ref()
|
2024-02-28 20:01:21 +08:00
|
|
|
|
const size = ref(0)
|
|
|
|
|
|
const isReload = ref(false)
|
|
|
|
|
|
const height = mainHeight(40)
|
2024-07-15 14:49:52 +08:00
|
|
|
|
const activeName = ref('2')
|
2024-02-28 20:01:21 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
const dom = document.getElementById('navigation-splitpanes')
|
|
|
|
|
|
if (dom) {
|
2025-12-09 20:04:55 +08:00
|
|
|
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
2024-02-28 20:01:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
const handleNodeClick = (data: any, node: any) => {
|
|
|
|
|
|
if (data.level === 6) {
|
|
|
|
|
|
monitoringPoint.setValue('lineId', data.id)
|
2025-03-13 18:26:03 +08:00
|
|
|
|
monitoringPoint.setValue('pid', data.pids)
|
2024-02-29 10:31:32 +08:00
|
|
|
|
monitoringPoint.setValue('lineName', data.alias)
|
2025-04-16 09:43:27 +08:00
|
|
|
|
monitoringPoint.setValue('comFlag', data.comFlag)
|
2024-02-28 20:01:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-02-29 09:37:31 +08:00
|
|
|
|
const handleCheckChange = (data: any, node: any) => {
|
2024-02-29 16:29:34 +08:00
|
|
|
|
monitoringPoint.setValue(
|
|
|
|
|
|
'lineIds',
|
|
|
|
|
|
node.checkedNodes.filter((item: any) => item.level === 6).map((item: any) => item.id)
|
|
|
|
|
|
)
|
2024-02-29 09:37:31 +08:00
|
|
|
|
}
|
2025-03-13 18:26:03 +08:00
|
|
|
|
const handleTabChange = () => {
|
|
|
|
|
|
monitoringPoint.setShowCheckBox(false)
|
|
|
|
|
|
}
|
2024-02-28 14:19:56 +08:00
|
|
|
|
watch(
|
|
|
|
|
|
() => router.currentRoute.value.query.lineId,
|
|
|
|
|
|
(newLineId, oldLineId) => {
|
|
|
|
|
|
if (!newLineId) return
|
|
|
|
|
|
// 在这里处理 lineId 的变化
|
|
|
|
|
|
monitoringPoint.setValue('lineId', router.currentRoute.value.query.lineId)
|
|
|
|
|
|
monitoringPoint.setValue('lineName', router.currentRoute.value.query.lineName)
|
|
|
|
|
|
},
|
|
|
|
|
|
{ immediate: true }
|
|
|
|
|
|
)
|
2024-02-28 20:01:21 +08:00
|
|
|
|
watch(
|
|
|
|
|
|
() => monitoringPoint.state.lineId,
|
|
|
|
|
|
() => {
|
|
|
|
|
|
// 刷新页面
|
|
|
|
|
|
isReload.value = true
|
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
isReload.value = false
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
)
|
2024-02-28 14:19:56 +08:00
|
|
|
|
const changeTab = (e: string) => {
|
|
|
|
|
|
activeName.value = e
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2024-02-28 20:01:21 +08:00
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
.splitpanes.default-theme .splitpanes__pane {
|
|
|
|
|
|
background: #eaeef1;
|
|
|
|
|
|
}
|
2024-11-21 11:36:36 +08:00
|
|
|
|
|
2024-02-28 14:19:56 +08:00
|
|
|
|
.monitoring-point {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 12px;
|
|
|
|
|
|
right: 10px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
color: var(--el-color-primary);
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|