diff --git a/package-lock.json b/package-lock.json index a017240..c780bae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,12 @@ "version": "1.0.0", "dependencies": { "axios": "^1.7.9", + "echarts": "^5.6.0", "element-plus": "^2.9.4", "nprogress": "^0.2.0", "pinia": "^2.3.1", "vue": "^3.5.13", + "vue-echarts": "^7.0.3", "vue-router": "^4.5.0" }, "devDependencies": { @@ -2591,6 +2593,22 @@ "node": ">=0.4.0" } }, + "node_modules/echarts": { + "version": "5.6.0", + "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz", + "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.6.1" + } + }, + "node_modules/echarts/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "license": "0BSD" + }, "node_modules/electron-to-chromium": { "version": "1.5.97", "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.97.tgz", @@ -5565,6 +5583,51 @@ } } }, + "node_modules/vue-echarts": { + "version": "7.0.3", + "resolved": "https://registry.npmmirror.com/vue-echarts/-/vue-echarts-7.0.3.tgz", + "integrity": "sha512-/jSxNwOsw5+dYAUcwSfkLwKPuzTQ0Cepz1LxCOpj2QcHrrmUa/Ql0eQqMmc1rTPQVrh2JQ29n2dhq75ZcHvRDw==", + "license": "MIT", + "dependencies": { + "vue-demi": "^0.13.11" + }, + "peerDependencies": { + "@vue/runtime-core": "^3.0.0", + "echarts": "^5.5.1", + "vue": "^2.7.0 || ^3.1.1" + }, + "peerDependenciesMeta": { + "@vue/runtime-core": { + "optional": true + } + } + }, + "node_modules/vue-echarts/node_modules/vue-demi": { + "version": "0.13.11", + "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz", + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/vue-eslint-parser": { "version": "9.4.3", "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz", @@ -5728,6 +5791,21 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zrender": { + "version": "5.6.1", + "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz", + "integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==", + "license": "BSD-3-Clause", + "dependencies": { + "tslib": "2.3.0" + } + }, + "node_modules/zrender/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "license": "0BSD" } } } diff --git a/package.json b/package.json index f816493..8b336ac 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,12 @@ }, "dependencies": { "axios": "^1.7.9", + "echarts": "^5.6.0", "element-plus": "^2.9.4", "nprogress": "^0.2.0", "pinia": "^2.3.1", "vue": "^3.5.13", + "vue-echarts": "^7.0.3", "vue-router": "^4.5.0" }, "devDependencies": { diff --git a/src/components.d.ts b/src/components.d.ts index 09a22b1..2bf71f2 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -21,6 +21,8 @@ declare module 'vue' { ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSlider: typeof import('element-plus/es')['ElSlider'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTimePicker: typeof import('element-plus/es')['ElTimePicker'] Pagination: typeof import('./components/Pagination/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/router/index.js b/src/router/index.js index 9d2e0d6..bf324bd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -53,6 +53,12 @@ export const routes = [ component: () => import('@/views/AutomaticMode/index.vue'), meta: { title: '自动模式' }, }, + { + path: '/alarm-information', + name: 'AlarmInformation', + component: () => import('@/views/AlarmInformation/index.vue'), + meta: { title: '报警预览' }, + }, ] const router = createRouter({ diff --git a/src/views/AlarmInformation/index.vue b/src/views/AlarmInformation/index.vue new file mode 100644 index 0000000..a9bab2b --- /dev/null +++ b/src/views/AlarmInformation/index.vue @@ -0,0 +1,267 @@ + + + + + + + + {{ currentTime }} {{ week }} + + + 报警预览 + + + + + + + + + + + + + + + + + + + + 设备号:{{ commit_uid }} + + + + + + + + + + 刷新 + + + + + + 返回主界面 + + + + + + + + + diff --git a/src/views/Menu/index.vue b/src/views/Menu/index.vue index d9da7a9..ce998a1 100644 --- a/src/views/Menu/index.vue +++ b/src/views/Menu/index.vue @@ -54,7 +54,7 @@ import { const currentTime = ref('') const router = useRouter() const route = useRoute() -console.log(route.query.comm_uid) +// console.log(route.query.comm_uid) if (route.query.comm_uid) { localStorage.setItem('central_control_comm_uid', route.query.comm_uid) } @@ -62,11 +62,11 @@ if (route.query.comm_uid) { const commit_uid = localStorage.getItem('central_control_comm_uid') const functionCards = [ - { key: 'monitor', title: '实时监控', icon: Camera, route: '' }, + { key: 'monitor', title: '实时监控', icon: Camera, route: '/monitoring' }, { key: 'control', title: '手动控制', icon: Operation, route: '/handle-control' }, { key: 'setting', title: '参数设置', icon: Setting, route: '/params-config' }, { key: 'auto', title: '自动模式', icon: VideoPlay, route: '/automatic-mode' }, - { key: 'alarm', title: '报警浏览', icon: Bell, route: '' } + { key: 'alarm', title: '报警浏览', icon: Bell, route: '/alarm-information' } ] const updateTime = () => { diff --git a/src/views/Monitoring/index.vue b/src/views/Monitoring/index.vue index 0cee226..ea0ff00 100644 --- a/src/views/Monitoring/index.vue +++ b/src/views/Monitoring/index.vue @@ -1,11 +1,870 @@ - - 111 + + + + + + + {{ currentTime }} {{ week }} + + + 实时监控 + + + + + + + + + + + + + + {{ phase.name }}相 + + + 电压: + {{ phase.voltage }} + + + 电流: + {{ phase.current }} + + + 有功功率: + {{ phase.power }} + + + 功率因数: + {{ phase.factor }} + + + + + + + 电能参数 + + + DC电压: + {{ energyParams.dcVoltage }} + + + 有功电能: + {{ energyParams.activeEnergy }} + + + 有功功率: + {{ energyParams.activePower }} + + + 功率因数: + {{ energyParams.powerFactor }} + + + + + + + + + + 当前模式 + + {{ info.disable ? '手动' : '自动' }} + + + + + + + + 回路{{ index + 1 }}:{{ circuit.is_open ? '打开' : '关闭' }} + + + + + + + + + + + + + + 回路{{ index + 6 }}:{{ circuit.is_open ? '打开' : '关闭' }} + + + + + + + + + + + + + + + + 调光通道{{ index + 1 }} + + {{ channel.pwm }}% + + + + + + + + 调光通道{{ index + 6 }} + + {{ channel.pwm }}% + + + + + + + + + + + + + 设备号:{{ commit_uid }} + + + + + + + + 返回主界面 + + + + + + + + 亮度值:{{ currentBrightness }}% + + + + + + + + - \ No newline at end of file +