From 8378155ac8be364c8fa991b0ea4f198d8b5362b8 Mon Sep 17 00:00:00 2001 From: Lufaneng Date: Fri, 25 Jul 2025 08:58:47 +0800 Subject: [PATCH] 1 --- src/views/AlarmInformation/index.vue | 12 ++++++------ src/views/Menu/index.vue | 13 ++++++++++--- src/views/Monitoring/index.vue | 22 +++++++++++----------- src/views/ParamsConfig/index.vue | 8 ++++---- 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/views/AlarmInformation/index.vue b/src/views/AlarmInformation/index.vue index 23ece9a..c1c3571 100644 --- a/src/views/AlarmInformation/index.vue +++ b/src/views/AlarmInformation/index.vue @@ -17,7 +17,7 @@
-
+ + + @@ -53,7 +53,7 @@ - +
@@ -100,7 +100,7 @@ const commit_uid = localStorage.getItem('central_control_comm_uid') const loading = ref(false) const total = ref(0) -const pageSize = ref(8) +const pageSize = ref(10) const currentPage = ref(1) const handleSizeChange = () => { currentPage.value = 1 diff --git a/src/views/Menu/index.vue b/src/views/Menu/index.vue index 3e1b9b0..287991b 100644 --- a/src/views/Menu/index.vue +++ b/src/views/Menu/index.vue @@ -35,7 +35,7 @@ 设备号:{{ commit_uid }}
- 版本号:1.0.0 + 版本号:{{ version }}
系统状态:开启 @@ -54,6 +54,7 @@ import { VideoPlay, Bell } from '@element-plus/icons-vue' +import RPC from '@/utils/rpc' const currentTime = ref('') const router = useRouter() const route = useRoute() @@ -61,8 +62,14 @@ const route = useRoute() if (route.query.comm_uid) { localStorage.setItem('central_control_comm_uid', route.query.comm_uid) } - -const commit_uid = localStorage.getItem('central_control_comm_uid') +const version = ref('1.0.0') +const commit_uid = ref('') +RPC.post('/m9z/touchdisplay/getDeviceID').then(res => { + commit_uid.value = res.deviceId + version.value = res.version + localStorage.setItem('central_control_comm_uid', res.deviceId) + localStorage.setItem('central_control_meterAddr', res.meterAddr) +}) const functionCards = [ { key: 'monitor', title: '实时监控', icon: Camera, route: '/monitoring' }, diff --git a/src/views/Monitoring/index.vue b/src/views/Monitoring/index.vue index 98cab15..19b8004 100644 --- a/src/views/Monitoring/index.vue +++ b/src/views/Monitoring/index.vue @@ -140,13 +140,13 @@
-
+
@@ -232,15 +232,15 @@ function transformHourlyData(data) { const lineData = ref([]) const recdDate = ref(dayjs().add(-1, 'day').format('YYYY-MM-DD')) const lineDataLoading = ref(false) -const getLineData = () => { - lineDataLoading.value = true - RPC.post('/lightm/rtu/his', { commUid: commit_uid, recdDate: recdDate.value }).then(res => { - lineData.value = transformHourlyData(res) - }).finally(() => { - lineDataLoading.value = false - }) -} -getLineData() +// const getLineData = () => { +// lineDataLoading.value = true +// RPC.post('/lightm/rtu/his', { commUid: commit_uid, recdDate: recdDate.value }).then(res => { +// lineData.value = transformHourlyData(res) +// }).finally(() => { +// lineDataLoading.value = false +// }) +// } +// getLineData() // 电力参数数据 const powerPhases = ref([ diff --git a/src/views/ParamsConfig/index.vue b/src/views/ParamsConfig/index.vue index 15cd7c4..f7c9897 100644 --- a/src/views/ParamsConfig/index.vue +++ b/src/views/ParamsConfig/index.vue @@ -525,10 +525,10 @@ RPC.post('/m9z/getAllSubLoopParameter', { comm_uid: commit_uid }).then(res => { // } }) -const address = ref('') -RPC.post('/adl400/getMsgAddress', { comm_uid: commit_uid }).then(res => { - address.value = res -}) +const address = ref(localStorage.getItem('central_control_meterAddr') || '') +// RPC.post('/adl400/getMsgAddress', { comm_uid: commit_uid }).then(res => { +// address.value = res +// }) const week = ref('') const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];