From ce9b4a4ca4338633081ae685be3bff74a46c1e4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E8=8F=9C?=
<43331987+JiaLiBai@users.noreply.github.com>
Date: Tue, 29 Jul 2025 23:05:58 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=A0=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 3 +-
api/ems/site.js | 76 +++++++
pages.json | 248 +++++++++++++----------
pages/index.vue | 349 +++++++++++++++++---------------
pages/ticket/index.vue | 376 +++++++++++++++++-----------------
pages/work/bmsdcc/index.vue | 238 ++++++++++++++++++++++
pages/work/bmszl/index.vue | 234 ++++++++++++++++++++++
pages/work/db/index.vue | 211 +++++++++++++++++++
pages/work/dtdc/index.vue | 290 +++++++++++++++++++++++++++
pages/work/index.vue | 307 +++++++++++++---------------
pages/work/pcs/index.vue | 390 ++++++++++++++++++++++++++++++++++++
static/scss/global.scss | 12 ++
store/modules/ems.js | 73 ++++++-
13 files changed, 2173 insertions(+), 634 deletions(-)
create mode 100644 api/ems/site.js
create mode 100644 pages/work/bmsdcc/index.vue
create mode 100644 pages/work/bmszl/index.vue
create mode 100644 pages/work/db/index.vue
create mode 100644 pages/work/dtdc/index.vue
create mode 100644 pages/work/pcs/index.vue
diff --git a/App.vue b/App.vue
index 52628e7..1bb1818 100644
--- a/App.vue
+++ b/App.vue
@@ -29,5 +29,6 @@
diff --git a/api/ems/site.js b/api/ems/site.js
new file mode 100644
index 0000000..4d86977
--- /dev/null
+++ b/api/ems/site.js
@@ -0,0 +1,76 @@
+import request from '@/utils/request'
+export function getAllSites() {
+ return request({
+ url: '/ems/homePage/getAllSites',
+ method: 'get'
+ })
+}
+
+//获取BMS总览数据
+export function getBMSOverView(data) {
+ return request({
+ url: `/ems/siteMonitor/getBMSOverView`, //?siteId=${siteId}
+ method: 'get',
+ data
+ })
+}
+
+//获取BMS电池簇总览数据
+export function getBMSBatteryCluster(data) {
+ return request({
+ url: `/ems/siteMonitor/getBMSBatteryCluster`, //?siteId=${siteId}
+ method: 'get',
+ data
+ })
+}
+
+//获取电表数据
+export function getAmmeterDataList(data) {
+ return request({
+ url: `/ems/siteMonitor/getAmmeterDataList`, //?siteId=${siteId}
+ method: 'get',
+ data
+ })
+}
+
+//获取pcs头部的设备信息
+export function getRunningHeadInfo(data) {
+ return request({
+ url: `/ems/siteMonitor/runningHeadInfo`, //?siteId=${siteId}
+ method: 'get',
+ data
+ })
+}
+//获取pcs列表
+export function getPcsDetailInfo(data) {
+ return request({
+ url: `/ems/siteMonitor/getPcsDetailInfo`, //?siteId=${siteId}
+ method: 'get',
+ data
+ })
+}
+
+//获取单体电池 电池堆列表数据
+export function getStackNameList(data) {
+ return request({
+ url: `/ems/siteMonitor/getStackNameList`, //?siteId=${siteId}
+ method: 'get',
+ data
+ })
+}
+//获取单体电池 电池簇列表数据
+export function getClusterNameList(data) {
+ return request({
+ url: `/ems/siteMonitor/getClusterNameList`, //?stackDeviceId=${stackDeviceId}&siteId=${siteId}
+ method: 'get',
+ data
+ })
+}
+//单体电池表格数据
+export function getClusterDataInfoList(data) {
+ return request({
+ url: `/ems/siteMonitor/getClusterDataInfoList?`, //clusterDeviceId=${clusterDeviceId}&siteId=${siteId}&stackDeviceId=${stackDeviceId}&pageSize=${pageSize}&pageNum=${pageNum}
+ method: 'get',
+ data
+ })
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 768b1a3..5a6fad0 100644
--- a/pages.json
+++ b/pages.json
@@ -1,108 +1,140 @@
-{
- "pages": [{
- "path": "pages/login",
- "style": {
- "navigationBarTitleText": "登录"
- }
- }, {
- "path": "pages/register",
- "style": {
- "navigationBarTitleText": "注册"
- }
- }, {
- "path": "pages/index",
- "style": {
- "navigationBarTitleText": "移动端框架",
- "navigationStyle": "custom"
- }
- }, {
- "path": "pages/work/index",
- "style": {
- "navigationBarTitleText": "工作台"
- }
- }, {
- "path": "pages/mine/index",
- "style": {
- "navigationBarTitleText": "我的"
- }
- }, {
- "path": "pages/mine/avatar/index",
- "style": {
- "navigationBarTitleText": "修改头像"
- }
- }, {
- "path": "pages/mine/info/index",
- "style": {
- "navigationBarTitleText": "个人信息"
- }
- }, {
- "path": "pages/mine/info/edit",
- "style": {
- "navigationBarTitleText": "编辑资料"
- }
- }, {
- "path": "pages/mine/pwd/index",
- "style": {
- "navigationBarTitleText": "修改密码"
- }
- }, {
- "path": "pages/mine/setting/index",
- "style": {
- "navigationBarTitleText": "应用设置"
- }
- }, {
- "path": "pages/mine/help/index",
- "style": {
- "navigationBarTitleText": "常见问题"
- }
- }, {
- "path": "pages/mine/about/index",
- "style": {
- "navigationBarTitleText": "关于我们"
- }
- }, {
- "path": "pages/common/webview/index",
- "style": {
- "navigationBarTitleText": "浏览网页"
- }
- }, {
- "path": "pages/common/textview/index",
- "style": {
- "navigationBarTitleText": "浏览文本"
- }
- },
- {
- "path": "pages/ticket/index",
- "style": {
- "navigationBarTitleText": "工单详情"
- }
- }],
- "tabBar": {
- "color": "#000000",
- "selectedColor": "#000000",
- "borderStyle": "white",
- "backgroundColor": "#ffffff",
- "list": [{
- "pagePath": "pages/index",
- "iconPath": "static/images/tabbar/home.png",
- "selectedIconPath": "static/images/tabbar/home_.png",
- "text": "首页"
- }, {
- "pagePath": "pages/work/index",
- "iconPath": "static/images/tabbar/work.png",
- "selectedIconPath": "static/images/tabbar/work_.png",
- "text": "工作台"
- }, {
- "pagePath": "pages/mine/index",
- "iconPath": "static/images/tabbar/mine.png",
- "selectedIconPath": "static/images/tabbar/mine_.png",
- "text": "我的"
- }
- ]
- },
- "globalStyle": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "EMS",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
-}
+{
+ "pages": [{
+ "path": "pages/login",
+ "style": {
+ "navigationBarTitleText": "登录"
+ }
+ }, {
+ "path": "pages/register",
+ "style": {
+ "navigationBarTitleText": "注册"
+ }
+ }, {
+ "path": "pages/index",
+ "style": {
+ "navigationBarTitleText": "移动端框架",
+ "navigationStyle": "custom"
+ }
+ }, {
+ "path": "pages/work/index",
+ "style": {
+ "navigationBarTitleText": "工作台"
+ }
+ }, {
+ "path": "pages/mine/index",
+ "style": {
+ "navigationBarTitleText": "我的"
+ }
+ }, {
+ "path": "pages/mine/avatar/index",
+ "style": {
+ "navigationBarTitleText": "修改头像"
+ }
+ }, {
+ "path": "pages/mine/info/index",
+ "style": {
+ "navigationBarTitleText": "个人信息"
+ }
+ }, {
+ "path": "pages/mine/info/edit",
+ "style": {
+ "navigationBarTitleText": "编辑资料"
+ }
+ }, {
+ "path": "pages/mine/pwd/index",
+ "style": {
+ "navigationBarTitleText": "修改密码"
+ }
+ }, {
+ "path": "pages/mine/setting/index",
+ "style": {
+ "navigationBarTitleText": "应用设置"
+ }
+ }, {
+ "path": "pages/mine/help/index",
+ "style": {
+ "navigationBarTitleText": "常见问题"
+ }
+ }, {
+ "path": "pages/mine/about/index",
+ "style": {
+ "navigationBarTitleText": "关于我们"
+ }
+ }, {
+ "path": "pages/common/webview/index",
+ "style": {
+ "navigationBarTitleText": "浏览网页"
+ }
+ }, {
+ "path": "pages/common/textview/index",
+ "style": {
+ "navigationBarTitleText": "浏览文本"
+ }
+ },
+ {
+ "path": "pages/ticket/index",
+ "style": {
+ "navigationBarTitleText": "工单详情"
+ }
+ },
+ {
+ "path": "pages/work/bmszl/index",
+ "style": {
+ "navigationBarTitleText": "BMS总览"
+ }
+ },
+ {
+ "path": "pages/work/bmsdcc/index",
+ "style": {
+ "navigationBarTitleText": "BMS电池簇"
+ }
+ },
+ {
+ "path": "pages/work/db/index",
+ "style": {
+ "navigationBarTitleText": "电表"
+ }
+ },
+ {
+ "path": "pages/work/pcs/index",
+ "style": {
+ "navigationBarTitleText": "PCS"
+ }
+ },
+ {
+ "path": "pages/work/dtdc/index",
+ "style": {
+ "navigationBarTitleText": "单体电池",
+ "onReachBottomDistance": 100
+ }
+ }
+
+ ],
+ "tabBar": {
+ "color": "#000000",
+ "selectedColor": "#000000",
+ "borderStyle": "white",
+ "backgroundColor": "#ffffff",
+ "list": [{
+ "pagePath": "pages/index",
+ "iconPath": "static/images/tabbar/home.png",
+ "selectedIconPath": "static/images/tabbar/home_.png",
+ "text": "首页"
+ }, {
+ "pagePath": "pages/work/index",
+ "iconPath": "static/images/tabbar/work.png",
+ "selectedIconPath": "static/images/tabbar/work_.png",
+ "text": "工作台"
+ }, {
+ "pagePath": "pages/mine/index",
+ "iconPath": "static/images/tabbar/mine.png",
+ "selectedIconPath": "static/images/tabbar/mine_.png",
+ "text": "我的"
+ }]
+ },
+ "globalStyle": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "EMS",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+}
\ No newline at end of file
diff --git a/pages/index.vue b/pages/index.vue
index e7a40bc..894f112 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1,165 +1,184 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 工单号:{{item.ticketNo}}
-
- 工单标题:{{item.title}}
- 问题描述:{{item.content}}
- 工单状态:{{ticketStatusOptions[item.status]}}
- 预期完成时间:{{item.expectedCompleteTime || '-'}}
- 处理人:{{item.workName || '-'}}
-
-
- 暂无数据
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 工单号:{{item.ticketNo}}
+
+ 工单标题:{{item.title}}
+ 问题描述:{{item.content}}
+ 工单状态:{{ticketStatusOptions[item.status]}}
+ 预期完成时间:{{item.expectedCompleteTime || '-'}}
+ 处理人:{{item.workName || '-'}}
+
+
+ 暂无数据
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/ticket/index.vue b/pages/ticket/index.vue
index 7f8ef48..0939911 100644
--- a/pages/ticket/index.vue
+++ b/pages/ticket/index.vue
@@ -1,183 +1,195 @@
-
-
-
- 工单号
- {{info.ticketNo || ''}}
-
-
- 工单标题
- {{info.title || ''}}
-
-
- 提交用户
- {{info.userName || '-'}}
-
-
- 问题描述
- {{info.content || ''}}
-
-
- 工单状态
- {{ticketStatusOptions[info.status] || ''}}
-
-
- 创建时间
- {{info.createTime || '-'}}
-
-
- 预期完成时间
- {{info.expectedCompleteTime || '-'}}
-
-
- 处理人
- {{info.workName || '-'}}
-
-
- 上传图片
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/work/bmsdcc/index.vue b/pages/work/bmsdcc/index.vue
new file mode 100644
index 0000000..cb89342
--- /dev/null
+++ b/pages/work/bmsdcc/index.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+ 工作状态
+ {{workStatusOptions[item.workStatus]}}
+
+
+
+
+ 与PCS通信
+ {{communicationStatusOptions[item.pcsCommunicationStatus]}}
+
+
+
+
+ 与EMS通信
+ {{communicationStatusOptions[item.emsCommunicationStatus]}}
+
+
+
+
+
+
+
+
+ {{infoDataItem.label}}
+ {{item[infoDataItem.attr]}}
+
+
+
+
+
+
+
+
+
+
+ 名称
+ 单体平均值
+ 单体最小值
+ 单体最小值ID
+ 单体最大值
+ 单体最大值ID
+
+
+
+
+ {{tableItem.avgData}}
+ {{tableItem.minData}}
+ {{tableItem.minDataID}}
+ {{tableItem.maxData}}
+ {{tableItem.maxDataID}}
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/work/bmszl/index.vue b/pages/work/bmszl/index.vue
new file mode 100644
index 0000000..692b090
--- /dev/null
+++ b/pages/work/bmszl/index.vue
@@ -0,0 +1,234 @@
+
+
+
+
+
+
+
+
+
+ 工作状态
+ {{workStatusOptions[item.workStatus]}}
+
+
+
+
+ 与PCS通信
+ {{communicationStatusOptions[item.pcsCommunicationStatus]}}
+
+
+
+
+ 与EMS通信
+ {{communicationStatusOptions[item.emsCommunicationStatus]}}
+
+
+
+
+
+
+
+
+ {{infoDataItem.label}}
+ {{item[infoDataItem.attr]}}
+
+
+
+
+
+
+
+
+
+
+ 簇号
+ 簇电压
+ 簇电流
+ 簇SOC
+ 单体最高电压
+ 单体最低电压
+ 单体最高温度
+ 单体最低温度
+
+
+
+ {{tableItem.clusterId}}
+ {{tableItem.clusterVoltage}}V
+ {{tableItem.clusterCurrent}}A
+ {{tableItem.currentSoc}}%
+ {{tableItem.maxCellVoltage}}V
+ {{tableItem.minCellVoltage}}V
+ {{tableItem.maxCellTemp}}℃
+ {{tableItem.minCellTemp}}℃
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/work/db/index.vue b/pages/work/db/index.vue
new file mode 100644
index 0000000..e0bfdec
--- /dev/null
+++ b/pages/work/db/index.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+ {{`1#${zbInfo.deviceName || ''}`}}
+
+ {{communicationStatusOptions[zbInfo.emsCommunicationStatus] || ''}}
+ 数据更新时间:{{zbInfo.dataUpdateTime || ''}}
+
+
+
+
+
+
+ 总/kWh
+
+
+ {{item.totalKwh}}
+
+
+
+
+ 尖/kWh
+
+
+ {{item.peakKwh}}
+
+
+
+
+ 峰/kWh
+
+
+ {{item.highKwh}}
+
+
+
+
+ 平/kWh
+
+
+ {{item.flatKwh}}
+
+
+
+
+ 谷/kWh
+
+
+ {{item.valleyKwh}}
+
+
+
+
+
+
+
+
+ {{`2#${cnbInfo.deviceName || ''}`}}
+
+ {{communicationStatusOptions[cnbInfo.emsCommunicationStatus] || ''}}
+ 数据更新时间:{{cnbInfo.dataUpdateTime || ''}}
+
+
+
+
+
+
+ 有功功率
+
+
+ {{item.activePower}}
+
+
+
+
+ 无功功率
+
+
+ {{item.reactivePower}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/work/dtdc/index.vue b/pages/work/dtdc/index.vue
new file mode 100644
index 0000000..45e30a1
--- /dev/null
+++ b/pages/work/dtdc/index.vue
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
+ 簇号
+
+
+ {{item.clusterDeviceId}}
+
+
+
+
+ 电压(V)
+
+
+ {{item.voltage}}
+
+
+
+
+
+ 温度(℃)
+
+
+
+ {{item.temperature}}
+
+
+
+
+
+ SOC(%)
+
+
+ {{item.soc}}
+
+
+
+
+ SOH(%)
+
+
+ {{item.soh}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/work/index.vue b/pages/work/index.vue
index d5d555e..3ca024a 100644
--- a/pages/work/index.vue
+++ b/pages/work/index.vue
@@ -1,173 +1,134 @@
-
-
-
-
-
-
-
-
-
-
-
- 用户管理
-
-
-
-
-
- 角色管理
-
-
-
-
-
- 菜单管理
-
-
-
-
-
- 部门管理
-
-
-
-
-
- 岗位管理
-
-
-
-
-
- 字典管理
-
-
-
-
-
- 参数设置
-
-
-
-
-
- 通知公告
-
-
-
-
-
- 日志管理
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.text}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/work/pcs/index.vue b/pages/work/pcs/index.vue
new file mode 100644
index 0000000..f70a2f6
--- /dev/null
+++ b/pages/work/pcs/index.vue
@@ -0,0 +1,390 @@
+
+
+
+
+
+
+ {{item.title}}
+ {{runningHeadInfo[item.attr] || '-'}}
+
+
+
+
+
+
+
+
+ {{index+1}}#{{item.deviceName || ''}}
+
+ {{communicationStatusOptions[item.communicationStatus] || ''}}
+ 数据更新时间:{{item.dataUpdateTime || ''}}
+
+
+
+
+
+
+
+
+ 工作状态
+ {{workStatusOptions[item.workStatus]}}
+
+
+
+
+ 并网状态
+ {{gridStatusOptions[item.gridStatus]}}
+
+
+
+
+ 设备状态
+ {{deviceStatusOptions[item.deviceStatus]}}
+
+
+
+
+ 控制模式
+ {{controlModeOptions[item.controlMode]}}
+
+
+
+
+
+
+
+
+
+ {{infoDataItem.label}}
+ {{item[infoDataItem.attr]}}
+
+
+
+
+
+
+
+
+
+
+
+ 直流功率
+ {{pcsBranchItem.dcPower}}kW
+
+
+
+
+ 直流电压
+ {{pcsBranchItem.dcVoltage}}V
+
+
+
+
+ 直流电流
+ {{pcsBranchItem.dcCurrent}}A
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/scss/global.scss b/static/scss/global.scss
index ac636bd..41a740a 100644
--- a/static/scss/global.scss
+++ b/static/scss/global.scss
@@ -88,3 +88,15 @@
}
}
}
+
+
+
+// 暂无数据通用样式
+.no-data{
+ color:#999;
+ text-align: center;
+ line-height: 100px;
+ height: 100px;
+ background-color: #fff;
+ font-size: 18px;
+}
\ No newline at end of file
diff --git a/store/modules/ems.js b/store/modules/ems.js
index 777ea7c..6e27c7f 100644
--- a/store/modules/ems.js
+++ b/store/modules/ems.js
@@ -1,6 +1,69 @@
-const ems={
- state:{
- ticketStatusOptions:{0:'待处理', 1:'已处理', 2:'处理中'},//工单处理状态
- }
-}
+const ems = {
+ state: {
+ workStatusOptions: {
+ '0': '正常',
+ '1': '异常',
+ '2': '停止'
+ }, //工作状态
+ deviceStatusOptions: {
+ '0': '在线',
+ '1': '离线',
+ '2': '维修中'
+ }, //设备状态
+ gridStatusOptions: {
+ '0': '并网',
+ '1': '未并网'
+ }, //并网状态
+ controlModeOptions: {
+ '0': '远程',
+ '1': '本地'
+ }, //控制模式
+ warnOptions: {
+ 0: '正常',
+ 1: '中断',
+ 2: '不在线',
+ 3: '异常'
+ }, //告警状态
+ communicationStatusOptions: {
+ '0': '正常',
+ '1': '通讯中断',
+ '2': '异常'
+ }, //通讯状态
+ workModeOptions: {
+ '0': '正常',
+ '1': '停止'
+ }, //工作模式
+ alarmLevelOptions: {
+ 'A': '提示',
+ 'B': '一般',
+ 'C': '严重',
+ 'D': '紧急'
+ }, //告警等级
+ alarmStatusOptions: {
+ '0': '待处理',
+ '1': '已处理',
+ '2': '处理中'
+ }, //告警状态
+ deviceTypeOptions: {
+ 'TCP': 'TCP',
+ 'RTU': 'RTU'
+ }, //设备类型
+ ticketStatusOptions: {
+ 0: '待处理',
+ 1: '已处理',
+ 2: '处理中'
+ }, //工单处理状态
+ strategyStatusOptions: {
+ '0': '未启用',
+ '1': '已运行',
+ '2': '已暂停',
+ '3': '禁用',
+ '4': '删除'
+ }, //策略状态
+ chargeStatusOptions: {
+ '1': '充电',
+ '2': '待机'
+ }, //冲放状态
+ }
+}
export default ems
\ No newline at end of file