diff --git a/src/components/tree/pms/pointTree.vue b/src/components/tree/pms/pointTree.vue index 362d965b..6eb537d6 100644 --- a/src/components/tree/pms/pointTree.vue +++ b/src/components/tree/pms/pointTree.vue @@ -14,7 +14,7 @@ >
- +
diff --git a/src/stores/monitoringPoint.ts b/src/stores/monitoringPoint.ts index 89a8807e..1c6fb5e7 100644 --- a/src/stores/monitoringPoint.ts +++ b/src/stores/monitoringPoint.ts @@ -4,6 +4,8 @@ import { defineStore } from 'pinia' interface MonitoringPoint { lineId: string lineName: string + lineIds: string[] + showCheckBox: boolean } export const useMonitoringPoint = defineStore( @@ -12,11 +14,21 @@ export const useMonitoringPoint = defineStore( const state: MonitoringPoint = reactive({ lineId: '', lineName: '', + lineIds: [], + showCheckBox: false }) - const setValue = (key: keyof MonitoringPoint, val: any) => { + const setValue = (key: keyof Pick, val: any) => { state[key] = val } - return { state, setValue } + const setShowCheckBox = (val: boolean) => { + if (!val) { + state.lineIds = [] + } else { + state.lineIds = [state.lineId] + } + state.showCheckBox = val + } + return { state, setValue, setShowCheckBox } }, { persist: true diff --git a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/index.vue b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/index.vue index 9b1eafa5..ae22e961 100644 --- a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/index.vue +++ b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/index.vue @@ -3,9 +3,13 @@ @@ -62,10 +66,11 @@ defineOptions({ }) const monitoringPoint = useMonitoringPoint() +const pointTree = ref() const size = ref(0) const isReload = ref(false) const height = mainHeight(40) -const activeName = ref('2') +const activeName = ref('3') onMounted(() => { const dom = document.getElementById('navigation-splitpanes') if (dom) { @@ -77,6 +82,10 @@ const handleNodeClick = (data: any, node: any) => { monitoringPoint.setValue('lineId', data.id) } } +const handleCheckChange = (data: any, node: any) => { + // let checkNodes = pointTree.value.getCheckedNodes() + // console.log(checkNodes) +} watch( () => router.currentRoute.value.query.lineId, (newLineId, oldLineId) => { diff --git a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/wentaishujufenxi/index.vue b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/wentaishujufenxi/index.vue index 8c85bb77..4dfc9e7c 100644 --- a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/wentaishujufenxi/index.vue +++ b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/wentaishujufenxi/index.vue @@ -1,19 +1,22 @@ -