38 Commits

Author SHA1 Message Date
3a26f6312b 更新注释 2026-01-25 17:02:21 +08:00
138b0753af Merge branch 'develop' into single-develop 2026-01-25 16:56:29 +08:00
085f6fd252 Merge branch 'develop' into single-develop 2026-01-24 21:19:27 +08:00
d3e51322ab Merge branch 'develop' into single-develop 2026-01-24 10:37:31 +08:00
81f8f75d7e pcs开关机状态判断更新 2026-01-23 20:06:47 +08:00
fccddab04a Merge branch 'develop' into single-develop 2026-01-23 19:52:13 +08:00
1b712a70f6 Merge branch 'develop' into single-develop 2026-01-21 14:42:02 +08:00
5d84972b8a 菜单 2026-01-16 16:08:54 +08:00
b122ab35ab Merge branch 'develop' into single-develop
# Conflicts:
#	src/router/ems.js
2026-01-16 15:59:17 +08:00
80f07876c6 Merge branch 'develop' into single-develop 2026-01-12 14:17:32 +08:00
bef8f01d0d pcs开关机接口参数更新 2026-01-08 17:14:57 +08:00
b469190d9f Merge branch 'develop' into single-develop 2026-01-08 16:59:47 +08:00
e98b4ed287 Merge branch 'develop' into single-develop 2025-12-31 17:25:47 +08:00
6140ca8f14 Merge branch 'develop' into single-develop 2025-12-26 21:01:54 +08:00
a3d6cf7c55 Merge branch 'develop' into single-develop 2025-12-19 21:51:51 +08:00
6fb706b528 云下展示pcs开关机按钮 2025-12-18 16:37:59 +08:00
579920e007 Merge branch 'develop' into single-develop 2025-12-18 16:35:34 +08:00
d9eeee106f Merge branch 'develop' into single-develop 2025-12-16 13:48:09 +08:00
c90f4f5766 Merge branch 'develop' into single-develop 2025-12-16 11:14:50 +08:00
4a4d26f018 生产、云下环境变量配置 2025-12-15 17:41:29 +08:00
1a11c67aad test 环境变量配置 2025-12-15 14:42:27 +08:00
71fd48918d Merge branch 'develop' into single-develop
# Conflicts:
#	src/assets/styles/common.scss
2025-12-12 17:47:57 +08:00
34d9e038e6 合并代码 2025-12-10 15:09:33 +08:00
b4c49c3e58 Merge branch 'develop' into single-develop 2025-12-05 09:49:54 +08:00
9cfce671a6 Merge branch 'develop' into single-develop 2025-12-05 09:16:54 +08:00
87e3db9f0f 云下使用深色主题区分云上 2025-11-28 15:21:42 +08:00
4132d8e539 合并develop最新代码 2025-11-28 15:18:27 +08:00
28176ce052 Merge branch 'develop' into single-develop 2025-11-13 16:53:19 +08:00
fdcf82e343 Merge branch 'develop' into single-develop 2025-11-12 16:38:00 +08:00
e4c6f1f798 Merge branch 'develop' into single-develop 2025-11-12 10:59:13 +08:00
f4a42c168f Merge branch 'develop' into single-develop 2025-11-07 14:59:56 +08:00
371a2d8be0 菜单更新,单站监控展示 2025-11-05 14:50:11 +08:00
c403922639 Merge branch 'develop' into single-develop 2025-11-05 14:10:00 +08:00
2a3d2fcf63 Merge branch 'develop' into single-develop 2025-09-22 17:59:25 +08:00
25bb28f77a Merge branch 'develop' into single-develop 2025-09-17 14:57:30 +08:00
3d5d8918d7 合并develop最新代码 2025-08-20 17:53:26 +08:00
fe14089562 在路由权限校验中获取设备列表 2025-07-23 21:35:40 +08:00
b68f2608f3 本地 2025-07-21 23:00:41 +08:00
24 changed files with 340 additions and 819 deletions

View File

@ -5,8 +5,9 @@ VUE_APP_TITLE = 上动新能源-EMS管理系统
NODE_ENV = 'production'
# EMS管理系统/生产环境
VUE_APP_BASE_API= 'http://1.15.120.242:8089'
VUE_APP_BASE_API= 'http://127.0.0.1:8089'
# EMS管理系统/生产环境 图片拼接地址
VUE_APP_IMG_URL = 'http://1.15.120.242:8089'
VUE_APP_IMG_URL = 'http://127.0.0.1:8089'

View File

@ -10,7 +10,7 @@ import ThemePicker from "@/components/ThemePicker"
export default {
name: "App",
components: { ThemePicker }
components: { ThemePicker },
}
</script>
<style scoped>

View File

@ -5,7 +5,7 @@
//右侧内容区域
//父元素
.ems-dashboard-editor-container{
background-color: #F1F5FC;
background-color: #FFFFFF;//#F1F5FC
padding: 24px;
font-size: 12px;
}
@ -280,7 +280,7 @@
.ems-third-menu-container {
position: relative;
padding-left: 140px;
padding-left: 160px;
background-color: #ffffff;
.ems-third-menu {
@ -288,9 +288,8 @@
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
height: fit-content;
position: absolute;
top: 0;
left: 0;
top:20px;
left:20px;
.el-menu-item{
line-height: 45px;
height: 45px;

View File

@ -41,6 +41,7 @@
<svg-icon icon-class="more-up"/>
</div>
</div>
<BigDataPopup ref="bigDataPopup"/>
</div>
</template>
@ -52,6 +53,7 @@ import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import BigDataPopup from '@/components/BigDataPopup'
export default {
emits: ['setLayout'],
@ -61,7 +63,8 @@ export default {
Hamburger,
Screenfull,
SizeSelect,
Search
Search,
BigDataPopup
},
computed: {
...mapGetters([
@ -83,10 +86,7 @@ export default {
},
methods: {
showBigDataImg() {
const routeUrl = this.$router.resolve({
path: '/screen'
})
window.open(routeUrl.href, '_blank')
this.$refs.bigDataPopup.show = true
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')

View File

@ -6,16 +6,16 @@ const getQuerySiteId= {
}
},
watch: {
'$route.query':{
'$store.state.ems.zdList':{
handler (newQuery,oldQuery) {
if(!newQuery || newQuery.length === 0){return}
// 参数变化处理
this.$nextTick(() => {
const {siteId} =newQuery
if(siteId){
const {siteId} =newQuery[0]
this.siteId = siteId
siteId && this.init(newQuery.siteId)
console.log('mixin=>getQuerySiteId=>页面参数siteId发生了变化,this.siteId=',this.siteId)
}
console.log('watch站点列表返回数据newQuery=',newQuery)
console.log('设置页面siteIdthis.siteId=',this.siteId)
})
},
immediate: true,

View File

@ -31,6 +31,7 @@ router.beforeEach((to, from, next) => {
// 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then(() => {
isRelogin.show = false
store.dispatch('getZdList')
store.dispatch('GenerateRoutes').then(accessRoutes => {
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表

View File

@ -7,55 +7,40 @@ export const dzjk = [
path: '/dzjk',
component: Layout,
redirect: '/dzjk/home',
meta: {title: '单站监控', icon: 'dashboard',},
meta: {title: '单站监控', icon: 'server',},
alwaysShow: false,
name: 'Dzjk',
hidden: true,
children: [
{
path: '',
component: () => import('@/views/ems/dzjk/index'),
name: 'Dzjk',
redirect: '/dzjk/home',
hidden: true,
children: [
{
path: '/dzjk/home',
component: () => import('@/views/ems/dzjk/home/index.vue'),
name: 'DzjkHome',
meta: {
title: '站点首页',
breadcrumb: false,
activeMenu: '/dzjk',
activeSecondMenuName: 'DzjkHome'
}
meta: {title: '站点首页', breadcrumb: false, activeMenu: '/dzjk/home', activeSecondMenuName: 'DzjkHome'}
},
{
path: '/dzjk/zxlt',
component: () => import('@/views/ems/dzjk/zxlt/index.vue'),
name: 'DzjkZxlt',
meta: {
title: '主线路图',
breadcrumb: false,
activeMenu: '/dzjk',
activeSecondMenuName: 'DzjkZxlt'
}
meta: {title: '主线路图', breadcrumb: false, activeMenu: '/dzjk/zxlt', activeSecondMenuName: 'DzjkZxlt'}
},
{
path: '/dzjk/sbjk',
component: () => import('@/views/ems/dzjk/sbjk/index.vue'),
name: 'DzjkSbjk',
meta: {title: '设备监控', breadcrumb: false, activeMenu: '/dzjk'},
alwaysShow: false,
meta: {title: '设备监控', breadcrumb: false, activeMenu: '/dzjk/sbjk'},
hidden: false,
redirect: '/dzjk/sbjk/ssyx',
children: [
{
path: 'ssyx',
component: () => import('@/views/ems/dzjk/sbjk/ssyx/index.vue'),
name: 'DzjkSbjkSsyx',
hidden: true,
meta: {
title: '实时运行',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'SSYX'
},
@ -64,10 +49,11 @@ export const dzjk = [
path: 'ems',
component: () => import('@/views/ems/dzjk/sbjk/ems/index.vue'),
name: 'DzjkSbjkEms',
hidden: true,
meta: {
title: 'EMS',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'EMS'
},
@ -76,10 +62,11 @@ export const dzjk = [
path: 'pcs',
component: () => import('@/views/ems/dzjk/sbjk/pcs/index.vue'),
name: 'DzjkSbjkPcs',
hidden: true,
meta: {
title: 'PCS',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'PCS'
},
@ -88,10 +75,11 @@ export const dzjk = [
path: 'bmszl',
component: () => import('@/views/ems/dzjk/sbjk/bmszl/index.vue'),
name: 'DzjkSbjkBmszl',
hidden: true,
meta: {
title: 'BMS总览',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'STACK'
},
@ -100,10 +88,11 @@ export const dzjk = [
path: 'bmsdcc',
component: () => import('@/views/ems/dzjk/sbjk/bmsdcc/index.vue'),
name: 'DzjkSbjkBmsdcc',
hidden: true,
meta: {
title: 'BMS电池簇',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'CLUSTER'
},
@ -112,10 +101,11 @@ export const dzjk = [
path: 'dtdc',
component: () => import('@/views/ems/dzjk/sbjk/dtdc/index.vue'),
name: 'DzjkSbjkDtdc',
hidden: true,
meta: {
title: 'BMS单体电池',
title: '单体电池',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'BATTERY'
},
@ -124,10 +114,11 @@ export const dzjk = [
path: 'db',
component: () => import('@/views/ems/dzjk/sbjk/db/index.vue'),
name: 'DzjkSbjkDb',
hidden: true,
meta: {
title: '电表',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'AMMETER'
},
@ -136,10 +127,11 @@ export const dzjk = [
path: 'yl',
component: () => import('@/views/ems/dzjk/sbjk/yl/index.vue'),
name: 'DzjkSbjkYl',
hidden: true,
meta: {
title: '冷',
title: '冷',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/sbjk',
activeSecondMenuName: 'DzjkSbjk',
deviceCategory: 'COOLING'
},
@ -148,6 +140,7 @@ export const dzjk = [
path: 'dh',
component: () => import('@/views/ems/dzjk/sbjk/dh/index.vue'),
name: 'DzjkSbjkDh',
hidden: true,
meta: {
title: '动环',
breadcrumb: false,
@ -160,6 +153,7 @@ export const dzjk = [
path: 'xf',
component: () => import('@/views/ems/dzjk/sbjk/xf/index.vue'),
name: 'DzjkSbjkXf',
hidden: true,
meta: {
title: '消防',
breadcrumb: false,
@ -174,28 +168,26 @@ export const dzjk = [
path: '/dzjk/gzgj',
component: () => import('@/views/ems/dzjk/gzgj/index.vue'),
name: 'DzjkGzgj',
meta: {
title: '故障告警',
breadcrumb: false,
activeMenu: '/dzjk',
activeSecondMenuName: 'DzjkGzgj'
}
meta: {title: '故障告警', breadcrumb: false, activeMenu: '/dzjk/gzgj', activeSecondMenuName: 'DzjkGzgj'}
},
{
path: '/dzjk/tjbb',
component: () => import('@/views/ems/dzjk/tjbb/index.vue'),
name: 'DzjkTjbb',
meta: {title: '统计报表', breadcrumb: false, activeMenu: '/dzjk'},
alwaysShow: false,
meta: {title: '统计报表', breadcrumb: false, activeMenu: '/dzjk/tjbb'},
hidden: false,
redirect: '/dzjk/tjbb/gltj',
children: [
{
path: 'gltj',
component: () => import('@/views/ems/dzjk/tjbb/gltj/index.vue'),
name: 'DzjkTjbbGltj',
hidden: true,
meta: {
title: '运行统计',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/tjbb',
activeSecondMenuName: 'DzjkTjbb'
},
},
@ -203,10 +195,11 @@ export const dzjk = [
path: 'glqx',
component: () => import('@/views/ems/dzjk/tjbb/glqx/index.vue'),
name: 'DzjkTjbbGlqx',
hidden: true,
meta: {
title: '功率曲线',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/tjbb',
activeSecondMenuName: 'DzjkTjbb'
},
},
@ -214,10 +207,11 @@ export const dzjk = [
path: 'pcsqx',
component: () => import('@/views/ems/dzjk/tjbb/pcsqx/index.vue'),
name: 'DzjkTjbbPcsqx',
hidden: true,
meta: {
title: 'PCS曲线',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/tjbb',
activeSecondMenuName: 'DzjkTjbb'
},
},
@ -225,10 +219,11 @@ export const dzjk = [
path: 'dcdqx',
component: () => import('@/views/ems/dzjk/tjbb/dcdqx/index.vue'),
name: 'DzjkTjbbDcdqx',
hidden: true,
meta: {
title: '电池堆曲线',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/tjbb',
activeSecondMenuName: 'DzjkTjbb'
},
},
@ -236,10 +231,11 @@ export const dzjk = [
path: 'dcwd',
component: () => import('@/views/ems/dzjk/tjbb/dcwd/index.vue'),
name: 'DzjkTjbbDcwd',
hidden: true,
meta: {
title: '电池温度',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/tjbb',
activeSecondMenuName: 'DzjkTjbb'
},
},
@ -247,21 +243,11 @@ export const dzjk = [
path: 'dbbb',
component: () => import('@/views/ems/dzjk/tjbb/dbbb/index.vue'),
name: 'DzjkTjbbDbbb',
hidden: true,
meta: {
title: '电表报表',
breadcrumb: false,
activeMenu: '/dzjk',
activeSecondMenuName: 'DzjkTjbb'
},
},
{
path: 'sybb',
component: () => import('@/views/ems/dzjk/tjbb/sybb/index.vue'),
name: 'DzjkTjbbSybb',
meta: {
title: '收益报表',
breadcrumb: false,
activeMenu: '/dzjk',
activeMenu: '/dzjk/tjbb',
activeSecondMenuName: 'DzjkTjbb'
},
}
@ -269,33 +255,9 @@ export const dzjk = [
},
{
path: '/dzjk/clpz',
component: () => import('@/views/ems/dzjk/clpz/index.vue'),
name: 'DzjkClpz',
meta: {title: '策略配置', breadcrumb: false, activeMenu: '/dzjk'},
redirect: '/dzjk/clpz/clyx',
children: [
{
path: 'clyx',
component: () => import('@/views/ems/dzjk/clpz/clyx/index.vue'),
name: 'DzjkClpzClyx',
meta: {
title: '策略运行',
breadcrumb: false,
activeMenu: '/dzjk',
activeSecondMenuName: 'DzjkClpz'
},
},
// {
// path: 'xftg',
// component: () => import('@/views/ems/dzjk/clpz/xftg/index.vue'),
// hidden:true,
// breadcrumb: false,
// name: 'DzjkClpzXftg',
// meta: { title: '削峰填谷',breadcrumb: false,activeMenu: '/dzjk',activeSecondMenuName:'DzjkClpz'},
// }
]
}
]
name: 'DzjkClpz',
meta: {title: '策略配置', breadcrumb: false, activeMenu: '/dzjk/clpz'},
}
]
}

View File

@ -52,11 +52,6 @@ export const constantRoutes = [
component: () => import('@/views/register'),
hidden: true
},
{
path: '/screen',
component: () => import('@/views/screen/index'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error/404'),

View File

@ -7,7 +7,7 @@ module.exports = {
/**
* 侧边栏主题 深色主题theme-dark浅色主题theme-light
*/
sideTheme: 'theme-light',
sideTheme: 'theme-dark',
/**
* 系统布局配置

View File

@ -1,3 +1,4 @@
import {getAllSites} from '@/api/ems/zddt'
import {getAlarmDetailList, getSiteAllDeviceCategory} from '@/api/ems/dzjk'
const ems = {
@ -43,6 +44,14 @@ const ems = {
}
},
actions: {
getZdList({commit, state}) {
if (state.zdList.length === 0) {
getAllSites().then(response => {
commit('SET_ZD_LIST', response?.data || [])
console.log('store action getZdList 获取站点数据', state.zdList)
})
}
},
//查询站点的所有待处理0的告警 存在展示红点标志
getSiteAlarmNum({state, commit}, siteId) {
getAlarmDetailList({

View File

@ -34,11 +34,12 @@ const permission = {
return new Promise(resolve => {
// 向后端请求路由数据
getRouters().then(res => {
let hasDzjk = false
let sysDzjk = -1
if(res?.data){
res.data.forEach(i=>{
i.children && i.children.find(j=>j.path.indexOf('dzjk')>-1) && (hasDzjk=true)
sysDzjk = res.data.findIndex(i=>{
return i.children && i.children.find(j=>j.path.indexOf('dzjk')>-1)
})
if(sysDzjk>-1) res.data.splice(sysDzjk,1)
}
const sdata = JSON.parse(JSON.stringify(res.data))
const rdata = JSON.parse(JSON.stringify(res.data))
@ -47,7 +48,7 @@ const permission = {
const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
router.addRoutes(asyncRoutes)
if(!hasDzjk){
if(sysDzjk === -1){
const index = constantRoutes.findIndex(i=>i.path.indexOf('dzjk')>-1)
constantRoutes.splice(index,1)
}

View File

@ -1,6 +1,6 @@
<template>
<div v-loading="loading">
<div v-loading="loading" class="ems-dashboard-editor-container ems-content-container-padding">
<template v-if="!showTemp">
<el-button v-if="!showTemp" type="primary" plain @click="settingStrategy" style="margin-bottom: 20px;">新增策略</el-button>
<cl-container v-for="(item,index) in list" :key="index+'clContainer'" :info="item" :hide-setting-btn="showTemp" class="contain" @update="init" @showSetting="settingStrategy(item)">

View File

@ -1,53 +0,0 @@
<template>
<div class="ems-dashboard-editor-container ems-third-menu-container">
<el-menu
class="ems-third-menu"
:default-active="$route.name"
background-color="#ffffff"
text-color="#666666"
active-text-color="#ffffff"
>
<el-menu-item :index="item.name" v-for="(item,index) in childrenRoute" :key="index+'clpzChildrenRoute'">
<router-link style="height: 100%;width: 100%;display: block;" :to="{path:item.path,query:$route.query}">
{{item.meta.title}}
</router-link>
</el-menu-item>
</el-menu>
<div class="ems-content-container ems-content-container-padding clpz-ems-content-container">
<keep-alive>
<router-view></router-view>
</keep-alive>
</div>
</div>
</template>
<script>
import { dzjk } from '@/router/ems'
const childrenRoute = dzjk[0].children[0].children.find(item=> item.name==='DzjkClpz').children.filter(item=>!item?.hidden)//获取到统计报表下面的字路由
console.log('设备监控子路由',childrenRoute)
export default {
name:'DzjkClpz',
data(){
return {
childrenRoute,
activeMenu:''
}
},
mounted() {
console.log('当前统计报表页面路由',this.$route)
}
}
</script>
<style scoped lang="scss">
.clpz-ems-content-container{
margin-top:0;
padding-top:0;
padding-right: 0;
flex: 1;
}
</style>

View File

@ -2,7 +2,7 @@
<template>
<!-- <cl-container :hideSettingBtn="true">-->
<!-- <template v-slot:default>-->
<div>
<div class="ems-dashboard-editor-container ems-content-container-padding">
<temp-table ref="tempTable" @updateTimeSetting="updateTimeSetting"/>
<time-setting ref="timeSetting"/>
<temp-power-chart ref="tomePowerChart"/>

View File

@ -1,6 +1,6 @@
<template>
<el-card v-loading="loading" gshadow="always" class="common-card-container common-card-container-no-title-bg">
<div v-loading="loading" class="ems-dashboard-editor-container ems-content-container-padding">
<!-- 搜索栏-->
<el-form :inline="true" class="select-container">
<el-form-item label="设备清单">
@ -108,7 +108,7 @@
>
</el-pagination>
</div>
</el-card>
</div>
</template>

View File

@ -1,5 +1,8 @@
<template>
<div v-loading="loading">
<div
class="ems-dashboard-editor-container ems-content-container-padding"
v-loading="loading"
>
<el-row style="background: #fff" class="row-container" :gutter="15">
<el-col :xs="24" :sm="24" :lg="5">
<!-- 站点信息-->

View File

@ -19,14 +19,13 @@
</keep-alive>
</div>
</div>
</template>
<script>
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import { dzjk } from '@/router/ems'
import {mapState} from "vuex";
const childrenRoute = dzjk[0].children[0].children.find(item=> item.name==='DzjkSbjk').children//获取到单站监控-设备监控下面的字路由
const childrenRoute = ((dzjk[0]?.children || []).find(item=> item.name==='DzjkSbjk').children) || []//获取到单站监控-设备监控下面的字路由
export default {
name:'DzjkSbjk',
mixins:[getQuerySiteId],
@ -65,6 +64,10 @@ export default {
</script>
<style scoped lang="scss">
.sbjk-ems-dashboard-editor-container {
display: flex;
background: #ffffff;
}
.sbjk-ems-content-container {
margin-top: 0;
padding-top: 0;
@ -72,4 +75,3 @@ export default {
flex: 1;
}
</style>

View File

@ -27,6 +27,12 @@
<div>数据更新时间{{ pcsItem.dataUpdateTime }}</div>
</div>
<div class="alarm">
<pcs-switch style="margin-right:10px;"
:round="true"
size="small"
type="danger"
:data="pcsItem"
@updateSuccess="init"/>
<el-button type="primary" round size="small" style="margin-right:20px;"
@click="pointDetail(pcsItem,'point')">
详细
@ -184,11 +190,12 @@ import RealTimeBaseInfo from "./../RealTimeBaseInfo.vue";
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import {getPcsDetailInfo, getRunningHeadInfo} from "@/api/ems/dzjk";
import intervalUpdate from "@/mixins/ems/intervalUpdate";
import PcsSwitch from "@/views/ems/site/sblb/PcsSwitch.vue";
import {mapState} from "vuex";
export default {
name: "DzjkSbjkPcs",
components: {RealTimeBaseInfo, pointChart, PointTable},
components: {RealTimeBaseInfo, pointChart, PointTable, PcsSwitch},
mixins: [getQuerySiteId, intervalUpdate],
computed: {
...mapState({

View File

@ -7,39 +7,48 @@
text-color="#666666"
active-text-color="#ffffff"
>
<el-menu-item :index="item.name" v-for="(item,index) in childrenRoute" :key="index+'tjbbChildrenRoute'">
<router-link style="height: 100%;width: 100%;display: block;" :to="{path:item.path,query:$route.query}">
<el-menu-item
:index="item.name"
v-for="(item, index) in childrenRoute"
:key="index + 'tjbbChildrenRoute'"
>
<router-link
style="height: 100%; width: 100%; display: block"
:to="{ path: item.path, query: $route.query }"
>
{{ item.meta.title }}
</router-link>
</el-menu-item>
</el-menu>
<div class="ems-content-container ems-content-container-padding tjbb-ems-content-container">
<div
class="ems-content-container ems-content-container-padding tjbb-ems-content-container"
>
<keep-alive>
<router-view></router-view>
</keep-alive>
</div>
</div>
</template>
<script>
import { dzjk } from '@/router/ems'
const childrenRoute = dzjk[0].children[0].children.find(item=> item.name==='DzjkTjbb').children//获取到统计报表下面的字路由
console.log('设备监控子路由',childrenRoute)
import { dzjk } from "@/router/ems";
const childrenRoute = dzjk[0].children.find(
(item) => item.name === "DzjkTjbb"
).children; //获取到统计报表下面的字路由
console.log("设备监控子路由", childrenRoute);
export default {
name:'DzjkTjbb',
name: "DzjkTjbb",
data() {
return {
childrenRoute,
activeMenu:''
}
activeMenu: "",
};
},
mounted() {
console.log('当前统计报表页面路由',this.$route)
}
}
console.log("当前统计报表页面路由", this.$route);
},
};
</script>
<style scoped lang="scss">
@ -50,4 +59,3 @@ export default {
flex: 1;
}
</style>

View File

@ -323,7 +323,7 @@ $lineColor: #86bcc7;
.ems-dashboard-editor-container {
background-color: #ffffff;
padding: 0;
padding: 30px;
color: #666666;
.container {

View File

@ -40,14 +40,18 @@ export default {
required: true
}
},
data() {
return {
runningStatusMap: ['0', '3', '4', '6']
}
},
computed: {
label() {
return this.data.workStatus === '0' ? '关机' : '开机'
return this.runningStatusMap.includes(this.data.workStatus) ? '关机' : '开机'
}
},
methods: {
switchStatus() {
console.log(this.data, 11111111)
const {workStatus, deviceId, deviceName, siteId} = this.data
this.$confirm(`确认要${this.label}设备${deviceName || ''}吗?`, {
confirmButtonText: "确定",
@ -61,7 +65,7 @@ export default {
//做开关机操作,更新成功后刷新表格
updateDeviceStatus({
siteId,
workStatus: workStatus === '0' ? "1" : '0',
workStatus: this.runningStatusMap.includes(workStatus) ? "1" : '0',//1 关机 0开机
deviceId
})
.then((response) => {

View File

@ -84,10 +84,10 @@
label="在线状态">
<template slot-scope="scope">
<span>{{ $store.state.ems.deviceStatusOptions[scope.row.deviceStatus] }}</span>
<!-- <pcs-switch v-if="scope.row.deviceCategory === 'PCS' && ![null,'',undefined].includes(scope.row.deviceStatus)"-->
<!-- style="margin-left:5px;"-->
<!-- :data="{siteId:scope.row.siteId,deviceStatus:scope.row.deviceStatus,deviceId:scope.row.deviceId,deviceName:scope.row.deviceName}"-->
<!-- @updateSuccess="getData"/>-->
<pcs-switch v-if="scope.row.deviceCategory === 'PCS' && ![null,'',undefined].includes(scope.row.workStatus)"
style="margin-left:5px;"
:data="{siteId:scope.row.siteId,workStatus:scope.row.workStatus,deviceId:scope.row.deviceId,deviceName:scope.row.deviceName}"
@updateSuccess="getData"/>
</template>
</el-table-column>
<el-table-column
@ -180,11 +180,11 @@ import {getAllDeviceCategory} from '@/api/ems/search'
import PointTable from './PointTable.vue'
import AddDevice from "./AddDevice.vue";
import PointUpload from "./PointUpload.vue";
// import PcsSwitch from "./PcsSwitch.vue";
import PcsSwitch from "./PcsSwitch.vue";
export default {
name: "Sblb",
components: {AddDevice, PointTable, PointUpload},
components: {AddDevice, PointTable, PointUpload, PcsSwitch},
data() {
return {
loading: false,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

View File

@ -1,418 +0,0 @@
<template>
<div class="big-screen-container">
<!-- 背景容器 -->
<div class="bg-wrapper">
<!-- 右侧功率曲线图表 -->
<div class="chart-box power-chart">
<div ref="powerChart" class="chart-content"></div>
</div>
<!-- 底部中间电力需求曲线图表width:980px, bottom:26px -->
<div class="chart-box demand-chart">
<div ref="demandChart" class="chart-content"></div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getPointData } from '@/api/ems/dzjk'
export default {
name: 'PowerCurveScreen',
data() {
return {
powerChartInstance: null, // 功率曲线实例
demandChartInstance: null, // 电力需求曲线实例
timer: null,
siteId: '021_DDS_01',
}
},
mounted() {
this.initPowerChart() // 初始化功率曲线
this.initDemandChart() // 初始化电力需求曲线
// Initial fetch
this.fetchData()
// Polling every 5 seconds
this.timer = setInterval(() => {
this.fetchData()
}, 5000)
window.addEventListener('resize', this.resizeAllCharts)
},
beforeDestroy() {
if (this.timer) {
clearInterval(this.timer)
this.timer = null
}
// 销毁两个图表实例
if (this.powerChartInstance) {
this.powerChartInstance.dispose()
this.powerChartInstance = null
}
if (this.demandChartInstance) {
this.demandChartInstance.dispose()
this.demandChartInstance = null
}
window.removeEventListener('resize', this.resizeAllCharts)
},
methods: {
getTodayDate() {
const now = new Date()
const year = now.getFullYear()
const month = String(now.getMonth() + 1).padStart(2, '0')
const day = String(now.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
},
fetchData() {
const today = this.getTodayDate()
getPointData({
siteId: this.siteId,
startDate: today,
endDate: today
}).then(response => {
if (response.code === 200 && response.data) {
this.updateCharts(response.data)
}
}).catch(error => {
console.error('Failed to fetch point data:', error)
})
},
updateCharts(data) {
if (!data || !Array.isArray(data)) return
const source = [['日期', '电网功率', '负载功率', '储能功率', '光伏功率']];
const demandSource = [['日期', '电网功率', '负载功率']]
data.forEach(item => {
source.push([
item.statisDate,
item.gridPower,
item.loadPower,
item.storagePower,
item.pvPower
]);
demandSource.push([
item.statisDate,
item.gridPower, // Mapping Grid Power to Plan Demand (or just as 2nd series)
item.loadPower, // Mapping Load Power to Actual Demand
])
})
if (this.powerChartInstance) {
this.powerChartInstance.setOption({
dataset: {
source: source
}
})
}
if (this.demandChartInstance) {
this.demandChartInstance.setOption({
dataset: {
source: demandSource
}
})
}
},
// 初始化右侧功率曲线
initPowerChart() {
this.powerChartInstance = echarts.init(this.$refs.powerChart)
const option = {
backgroundColor: 'transparent',
tooltip: {
trigger: 'axis',
confine: true,
backgroundColor: 'rgba(0, 30, 60, 0.9)',
borderColor: '#00ccff',
textStyle: { color: '#fff' },
axisPointer: {
type: 'line',
lineStyle: {
color: 'rgba(0, 204, 255, 0.5)',
type: 'dashed'
}
}
},
legend: {
textStyle: { color: '#00ccff', fontSize: 10 },
bottom: 0,
left: 'center',
itemWidth: 9,
itemHeight: 9,
itemGap: 8,
padding: [0, 0, 0, 0]
},
grid: {
left: '2%',
right: '2%',
top: '15%',
bottom: '12%',
containLabel: true
},
dataset: {
source: [] // Initial empty source
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
color: '#00ccff',
fontSize: 10,
rotate: 0, // 取消旋转,因为标签较少
margin: 10,
},
axisLine: {
show: true,
lineStyle: { color: '#006699', width: 1.5 }
},
splitLine: { show: false },
axisTick: { show: true }
},
yAxis: {
type: 'value',
min: 0, // Remove fixed min/max to let it auto-scale
max: 350,
interval: 50,
axisLabel: {
color: '#00ccff',
fontSize: 12,
margin: 10,
fontWeight: 'bold'
},
axisLine: {
show: false,
lineStyle: { color: '#006699', width: 1.5 }
},
splitLine: { lineStyle: { color: 'rgba(0, 100, 150, 0.2)' } },
axisTick: { show: false }
},
series: [
{
// name: '电网功率', // Removed, auto-matched from dataset header
type: 'line',
// data: [], // Removed
smooth: true,
symbol: 'none',
lineStyle: { color: '#0099ff', width: 2 },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(0, 153, 255, 0.4)' },
{ offset: 1, color: 'rgba(0, 153, 255, 0.05)' }
])
}
},
{
// name: '负载功率',
type: 'line',
// data: [],
smooth: true,
symbol: 'none',
lineStyle: { color: '#00cc66', width: 2 },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(0, 204, 102, 0.4)' },
{ offset: 1, color: 'rgba(0, 204, 102, 0.05)' }
])
}
},
{
// name: '储能功率',
type: 'line',
// data: [],
smooth: true,
symbol: 'none',
lineStyle: { color: '#ffcc00', width: 2 },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(255, 204, 0, 0.4)' },
{ offset: 1, color: 'rgba(255, 204, 0, 0.05)' }
])
}
},
{
// name: '光伏功率',
type: 'line',
// data: [],
smooth: true,
symbol: 'none',
lineStyle: { color: '#ff3333', width: 2 },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(255, 51, 51, 0.4)' },
{ offset: 1, color: 'rgba(255, 51, 51, 0.05)' }
])
}
}
]
}
this.powerChartInstance.setOption(option)
},
// 初始化底部中间电力需求曲线适配980px宽度+130px高度+bottom:26px两条曲线区分配色
initDemandChart() {
this.demandChartInstance = echarts.init(this.$refs.demandChart)
const option = {
backgroundColor: 'transparent', // 透明背景
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(0, 30, 60, 0.9)',
borderColor: '#00ccff', // 匹配图片主色
textStyle: { color: '#fff' },
axisPointer: { type: 'shadow' },
confine: true,
},
grid: {
left: '2%',
right: '2%',
top: '5%',
bottom: '8%',
containLabel: true
},
dataset: {
source: [] // Initial empty
},
xAxis: {
type: 'category',
boundaryGap: false,
// data: [], // Handled by dataset
axisLabel: {
color: '#00ccff', // 匹配图片主色
fontSize: 10,
margin: 10,
},
axisLine: {
show: true,
lineStyle: { color: '#006699', width: 1.5 }
},
splitLine: { show: false },
axisTick: { show: true }
},
yAxis: {
type: 'value',
min: 0,
max: 300,
interval: 50,
axisLabel: {
color: '#00ccff', // 匹配图片主色
fontSize: 12,
margin: 10,
fontWeight: 'bold'
},
axisLine: {
show: false,
// lineStyle: { color: '#006699', width: 1.5 }
},
splitLine: { lineStyle: { color: 'rgba(0, 100, 150, 0.2)' } },
axisTick: { show: false }
},
series: [
{
type: 'line',
// data: [],
smooth: true, // 平滑曲线
symbol: 'none', // 无数据点
// lineStyle: { color: '#00F2FF', width: 2.5 }, // 匹配图片主题色
// areaStyle: {
// // 匹配图片的线性渐变:#00F2FF 从100%不透明到0%不透明
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// { offset: 0, color: 'rgba(0, 242, 255, 1)' }, // 0%位置:#00F2FF 100%不透明
// { offset: 1, color: 'rgba(0, 242, 255, 0)' } // 100%位置:#00F2FF 0%不透明
// ])
// }
lineStyle: { color: '#0099ff', width: 2 },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(0, 153, 255, 0.4)' },
{ offset: 1, color: 'rgba(0, 153, 255, 0.05)' }
])
}
},
{
// name: '负载功率',
type: 'line',
// data: [],
smooth: true,
symbol: 'none',
lineStyle: { color: '#00cc66', width: 2 },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(0, 204, 102, 0.4)' },
{ offset: 1, color: 'rgba(0, 204, 102, 0.05)' }
])
}
},
]
}
this.demandChartInstance.setOption(option)
},
// 统一处理窗口缩放(适配两个图表)
resizeAllCharts() {
if (this.powerChartInstance) this.powerChartInstance.resize()
if (this.demandChartInstance) this.demandChartInstance.resize()
}
}
}
</script>
<style scoped>
/* 大屏容器固定1920x1080尺寸 */
.big-screen-container {
width: 1920px;
height: 1080px;
margin: 0;
padding: 0;
overflow: hidden;
position: relative;
}
/* 背景容器:相对路径 ./background.png */
.bg-wrapper {
width: 100%;
height: 100%;
background-image: url("./background.png");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
position: relative;
}
/* 通用图表容器样式 */
.chart-box {
background-color: transparent;
padding: 0;
border: none;
box-shadow: none;
border-radius: 0;
z-index: 10;
}
/* 右侧功率曲线图表定位+尺寸 */
.power-chart {
position: absolute;
top: 143px;
right: 40px;
width: 380px;
height: 270px;
}
/* 底部中间电力需求曲线图表核心修改width:980px, bottom:26px, height:130px */
.demand-chart {
position: absolute;
bottom: 26px; /* 修改为26px底部间距 */
left: 50%;
transform: translateX(-50%);
width: 980px; /* 修改为980px宽度 */
height: 130px; /* 保持130px高度不变 */
}
/* 图表内容区:填满容器 */
.chart-content {
width: 100%;
height: 100%;
}
</style>