联调实时数据页面

This commit is contained in:
GGJ
2025-03-13 18:26:03 +08:00
parent 5f125afede
commit bcf9c78fac
23 changed files with 2513 additions and 370 deletions

View File

@@ -3,6 +3,7 @@ import { defineStore } from 'pinia'
interface MonitoringPoint {
lineId: string
lineName: string
pid: string
lineIds: string[]
showCheckBox: boolean
}
@@ -13,18 +14,19 @@ export const useMonitoringPoint = defineStore(
const state: MonitoringPoint = reactive({
lineId: '',
lineName: '',
pid: '',
lineIds: [],
showCheckBox: false
})
const setValue = (key: keyof Pick<MonitoringPoint, 'lineId' | 'lineName' | 'lineIds'>, val: any) => {
const setValue = (key: keyof Pick<MonitoringPoint, 'lineId' | 'lineName' | 'lineIds' | 'pid'>, val: any) => {
state[key] = val
}
const setShowCheckBox = (val: boolean) => {
if (val && state.lineIds.length === 0) {
state.lineIds = [state.lineId]
console.log('====================================');
console.log(state.lineIds);
console.log('====================================');
console.log('====================================')
console.log(state.lineIds)
console.log('====================================')
}
state.showCheckBox = val
}