Compare commits
1 Commits
main-local
...
screen-dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 84f454ea8a |
@ -5,9 +5,8 @@ VUE_APP_TITLE = 上动新能源-EMS管理系统
|
|||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
|
|
||||||
# EMS管理系统/生产环境
|
# EMS管理系统/生产环境
|
||||||
VUE_APP_BASE_API= 'http://127.0.0.1:8089'
|
VUE_APP_BASE_API= 'http://1.15.120.242:8089'
|
||||||
|
|
||||||
|
|
||||||
# EMS管理系统/生产环境 图片拼接地址
|
# EMS管理系统/生产环境 图片拼接地址
|
||||||
VUE_APP_IMG_URL = 'http://127.0.0.1:8089'
|
VUE_APP_IMG_URL = 'http://1.15.120.242:8089'
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import ThemePicker from "@/components/ThemePicker"
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
components: { ThemePicker },
|
components: { ThemePicker }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 MiB After Width: | Height: | Size: 11 MiB |
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
//右侧内容区域
|
//右侧内容区域
|
||||||
//父元素
|
//父元素
|
||||||
.ems-dashboard-editor-container{
|
.ems-dashboard-editor-container {
|
||||||
background-color: #FFFFFF;//#F1F5FC
|
background-color: #F1F5FC;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
@ -280,7 +280,7 @@
|
|||||||
|
|
||||||
.ems-third-menu-container {
|
.ems-third-menu-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 160px;
|
padding-left: 140px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
||||||
.ems-third-menu {
|
.ems-third-menu {
|
||||||
@ -288,9 +288,10 @@
|
|||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top:20px;
|
top: 0;
|
||||||
left:20px;
|
left: 0;
|
||||||
.el-menu-item{
|
|
||||||
|
.el-menu-item {
|
||||||
line-height: 45px;
|
line-height: 45px;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|||||||
@ -1,32 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :fullscreen="true" :append-to-body="true" :visible.sync="show" :show-close="false" top="0"
|
||||||
:fullscreen="true"
|
custom-class="big-data-dialog">
|
||||||
:append-to-body="true"
|
<img src="@/assets/images/ems/bigData.png" alt="">
|
||||||
:visible.sync="show"
|
<div class="close-btn" @click="show=false">
|
||||||
:show-close="false"
|
|
||||||
top="0"
|
|
||||||
custom-class="big-data-dialog"
|
|
||||||
>
|
|
||||||
<div class="swiper-container">
|
|
||||||
<div class="swiper-icon left-icon" v-show="imgIndex > 0">
|
|
||||||
<i class="el-icon-d-arrow-left icon" @click="toLeft"></i>
|
|
||||||
</div>
|
|
||||||
<div v-show="showRightIcon" class="swiper-icon right-icon">
|
|
||||||
<i class="el-icon-d-arrow-right icon" @click="toRight"></i>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="img-container"
|
|
||||||
:style="{ transform: 'translateX(' + imgIndex * -100 + 'vw)' }"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
v-for="index in maxImgNumber"
|
|
||||||
:key="'swiperImg' + index"
|
|
||||||
:src="require(`@/assets/images/ems/bigData-${index}.png`)"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="close-btn" @click="show = false">
|
|
||||||
<i class="el-icon-close"></i>
|
<i class="el-icon-close"></i>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -38,54 +14,15 @@
|
|||||||
top: 10px;
|
top: 10px;
|
||||||
font-size: 23px;
|
font-size: 23px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
color: rgba(217, 242, 255, 1);
|
color: rgba(176, 228, 255, 0.7);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.swiper-container {
|
|
||||||
height: 100%;
|
img {
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
.swiper-icon {
|
|
||||||
color: rgba(217, 242, 255, 1);
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
z-index: 20;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 30px;
|
|
||||||
padding: 20px;
|
|
||||||
background: transparent;
|
|
||||||
&.left-icon {
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
&.right-icon {
|
|
||||||
right: 20px;
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
.icon {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.icon {
|
|
||||||
transition: all 0.6s;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.img-container {
|
|
||||||
height: 100%;
|
|
||||||
transition: all 1s;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
z-index: 0;
|
|
||||||
img {
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@ -105,33 +42,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false
|
||||||
imgIndex: 0,
|
}
|
||||||
maxImgNumber: 3,
|
}
|
||||||
};
|
}
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
showRightIcon() {
|
|
||||||
return this.imgIndex < this.maxImgNumber - 1;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
show: {
|
|
||||||
handler(newValue) {
|
|
||||||
if (!newValue) this.imgIndex = 0;
|
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
toLeft() {
|
|
||||||
if (this.imgIndex === 0) return;
|
|
||||||
this.imgIndex -= 1;
|
|
||||||
},
|
|
||||||
toRight() {
|
|
||||||
if (this.imgIndex >= this.maxImgNumber - 1) return;
|
|
||||||
this.imgIndex += 1;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
@ -41,7 +41,6 @@
|
|||||||
<svg-icon icon-class="more-up"/>
|
<svg-icon icon-class="more-up"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<BigDataPopup ref="bigDataPopup"/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -53,7 +52,6 @@ import Hamburger from '@/components/Hamburger'
|
|||||||
import Screenfull from '@/components/Screenfull'
|
import Screenfull from '@/components/Screenfull'
|
||||||
import SizeSelect from '@/components/SizeSelect'
|
import SizeSelect from '@/components/SizeSelect'
|
||||||
import Search from '@/components/HeaderSearch'
|
import Search from '@/components/HeaderSearch'
|
||||||
import BigDataPopup from '@/components/BigDataPopup'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
emits: ['setLayout'],
|
emits: ['setLayout'],
|
||||||
@ -63,8 +61,7 @@ export default {
|
|||||||
Hamburger,
|
Hamburger,
|
||||||
Screenfull,
|
Screenfull,
|
||||||
SizeSelect,
|
SizeSelect,
|
||||||
Search,
|
Search
|
||||||
BigDataPopup
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
@ -86,7 +83,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showBigDataImg() {
|
showBigDataImg() {
|
||||||
this.$refs.bigDataPopup.show = true
|
const routeUrl = this.$router.resolve({
|
||||||
|
path: '/screen'
|
||||||
|
})
|
||||||
|
window.open(routeUrl.href, '_blank')
|
||||||
},
|
},
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
|
|||||||
@ -6,16 +6,16 @@ const getQuerySiteId= {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.ems.zdList':{
|
'$route.query':{
|
||||||
handler (newQuery,oldQuery) {
|
handler (newQuery,oldQuery) {
|
||||||
if(!newQuery || newQuery.length === 0){return}
|
|
||||||
// 参数变化处理
|
// 参数变化处理
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const {siteId} =newQuery[0]
|
const {siteId} =newQuery
|
||||||
|
if(siteId){
|
||||||
this.siteId = siteId
|
this.siteId = siteId
|
||||||
siteId && this.init(newQuery.siteId)
|
siteId && this.init(newQuery.siteId)
|
||||||
console.log('watch站点列表返回数据newQuery=',newQuery)
|
console.log('mixin=>getQuerySiteId=>页面参数siteId发生了变化,this.siteId=',this.siteId)
|
||||||
console.log('设置页面siteId,this.siteId=',this.siteId)
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
@ -31,7 +31,6 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 判断当前用户是否已拉取完user_info信息
|
// 判断当前用户是否已拉取完user_info信息
|
||||||
store.dispatch('GetInfo').then(() => {
|
store.dispatch('GetInfo').then(() => {
|
||||||
isRelogin.show = false
|
isRelogin.show = false
|
||||||
store.dispatch('getZdList')
|
|
||||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
||||||
// 根据roles权限生成可访问的路由表
|
// 根据roles权限生成可访问的路由表
|
||||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||||
|
|||||||
@ -7,40 +7,55 @@ export const dzjk = [
|
|||||||
path: '/dzjk',
|
path: '/dzjk',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/dzjk/home',
|
redirect: '/dzjk/home',
|
||||||
meta: {title: '单站监控', icon: 'server',},
|
meta: {title: '单站监控', icon: 'dashboard',},
|
||||||
alwaysShow: false,
|
alwaysShow: false,
|
||||||
name: 'Dzjk',
|
name: 'Dzjk',
|
||||||
|
hidden: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: () => import('@/views/ems/dzjk/index'),
|
||||||
|
name: 'Dzjk',
|
||||||
|
redirect: '/dzjk/home',
|
||||||
|
hidden: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/dzjk/home',
|
path: '/dzjk/home',
|
||||||
component: () => import('@/views/ems/dzjk/home/index.vue'),
|
component: () => import('@/views/ems/dzjk/home/index.vue'),
|
||||||
name: 'DzjkHome',
|
name: 'DzjkHome',
|
||||||
meta: {title: '站点首页', breadcrumb: false, activeMenu: '/dzjk/home', activeSecondMenuName: 'DzjkHome'}
|
meta: {
|
||||||
|
title: '站点首页',
|
||||||
|
breadcrumb: false,
|
||||||
|
activeMenu: '/dzjk',
|
||||||
|
activeSecondMenuName: 'DzjkHome'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dzjk/zxlt',
|
path: '/dzjk/zxlt',
|
||||||
component: () => import('@/views/ems/dzjk/zxlt/index.vue'),
|
component: () => import('@/views/ems/dzjk/zxlt/index.vue'),
|
||||||
name: 'DzjkZxlt',
|
name: 'DzjkZxlt',
|
||||||
meta: {title: '主线路图', breadcrumb: false, activeMenu: '/dzjk/zxlt', activeSecondMenuName: 'DzjkZxlt'}
|
meta: {
|
||||||
|
title: '主线路图',
|
||||||
|
breadcrumb: false,
|
||||||
|
activeMenu: '/dzjk',
|
||||||
|
activeSecondMenuName: 'DzjkZxlt'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dzjk/sbjk',
|
path: '/dzjk/sbjk',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/index.vue'),
|
||||||
name: 'DzjkSbjk',
|
name: 'DzjkSbjk',
|
||||||
alwaysShow: false,
|
meta: {title: '设备监控', breadcrumb: false, activeMenu: '/dzjk'},
|
||||||
meta: {title: '设备监控', breadcrumb: false, activeMenu: '/dzjk/sbjk'},
|
|
||||||
hidden: false,
|
|
||||||
redirect: '/dzjk/sbjk/ssyx',
|
redirect: '/dzjk/sbjk/ssyx',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'ssyx',
|
path: 'ssyx',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/ssyx/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/ssyx/index.vue'),
|
||||||
name: 'DzjkSbjkSsyx',
|
name: 'DzjkSbjkSsyx',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '实时运行',
|
title: '实时运行',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'SSYX'
|
deviceCategory: 'SSYX'
|
||||||
},
|
},
|
||||||
@ -49,11 +64,10 @@ export const dzjk = [
|
|||||||
path: 'ems',
|
path: 'ems',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/ems/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/ems/index.vue'),
|
||||||
name: 'DzjkSbjkEms',
|
name: 'DzjkSbjkEms',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: 'EMS',
|
title: 'EMS',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'EMS'
|
deviceCategory: 'EMS'
|
||||||
},
|
},
|
||||||
@ -62,11 +76,10 @@ export const dzjk = [
|
|||||||
path: 'pcs',
|
path: 'pcs',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/pcs/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/pcs/index.vue'),
|
||||||
name: 'DzjkSbjkPcs',
|
name: 'DzjkSbjkPcs',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: 'PCS',
|
title: 'PCS',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'PCS'
|
deviceCategory: 'PCS'
|
||||||
},
|
},
|
||||||
@ -75,11 +88,10 @@ export const dzjk = [
|
|||||||
path: 'bmszl',
|
path: 'bmszl',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/bmszl/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/bmszl/index.vue'),
|
||||||
name: 'DzjkSbjkBmszl',
|
name: 'DzjkSbjkBmszl',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: 'BMS总览',
|
title: 'BMS总览',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'STACK'
|
deviceCategory: 'STACK'
|
||||||
},
|
},
|
||||||
@ -88,11 +100,10 @@ export const dzjk = [
|
|||||||
path: 'bmsdcc',
|
path: 'bmsdcc',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/bmsdcc/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/bmsdcc/index.vue'),
|
||||||
name: 'DzjkSbjkBmsdcc',
|
name: 'DzjkSbjkBmsdcc',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: 'BMS电池簇',
|
title: 'BMS电池簇',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'CLUSTER'
|
deviceCategory: 'CLUSTER'
|
||||||
},
|
},
|
||||||
@ -101,11 +112,10 @@ export const dzjk = [
|
|||||||
path: 'dtdc',
|
path: 'dtdc',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/dtdc/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/dtdc/index.vue'),
|
||||||
name: 'DzjkSbjkDtdc',
|
name: 'DzjkSbjkDtdc',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '单体电池',
|
title: 'BMS单体电池',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'BATTERY'
|
deviceCategory: 'BATTERY'
|
||||||
},
|
},
|
||||||
@ -114,11 +124,10 @@ export const dzjk = [
|
|||||||
path: 'db',
|
path: 'db',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/db/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/db/index.vue'),
|
||||||
name: 'DzjkSbjkDb',
|
name: 'DzjkSbjkDb',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '电表',
|
title: '电表',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'AMMETER'
|
deviceCategory: 'AMMETER'
|
||||||
},
|
},
|
||||||
@ -127,11 +136,10 @@ export const dzjk = [
|
|||||||
path: 'yl',
|
path: 'yl',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/yl/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/yl/index.vue'),
|
||||||
name: 'DzjkSbjkYl',
|
name: 'DzjkSbjkYl',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '液冷',
|
title: '冷却',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/sbjk',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkSbjk',
|
activeSecondMenuName: 'DzjkSbjk',
|
||||||
deviceCategory: 'COOLING'
|
deviceCategory: 'COOLING'
|
||||||
},
|
},
|
||||||
@ -140,7 +148,6 @@ export const dzjk = [
|
|||||||
path: 'dh',
|
path: 'dh',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/dh/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/dh/index.vue'),
|
||||||
name: 'DzjkSbjkDh',
|
name: 'DzjkSbjkDh',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '动环',
|
title: '动环',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
@ -153,7 +160,6 @@ export const dzjk = [
|
|||||||
path: 'xf',
|
path: 'xf',
|
||||||
component: () => import('@/views/ems/dzjk/sbjk/xf/index.vue'),
|
component: () => import('@/views/ems/dzjk/sbjk/xf/index.vue'),
|
||||||
name: 'DzjkSbjkXf',
|
name: 'DzjkSbjkXf',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '消防',
|
title: '消防',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
@ -168,26 +174,28 @@ export const dzjk = [
|
|||||||
path: '/dzjk/gzgj',
|
path: '/dzjk/gzgj',
|
||||||
component: () => import('@/views/ems/dzjk/gzgj/index.vue'),
|
component: () => import('@/views/ems/dzjk/gzgj/index.vue'),
|
||||||
name: 'DzjkGzgj',
|
name: 'DzjkGzgj',
|
||||||
meta: {title: '故障告警', breadcrumb: false, activeMenu: '/dzjk/gzgj', activeSecondMenuName: 'DzjkGzgj'}
|
meta: {
|
||||||
|
title: '故障告警',
|
||||||
|
breadcrumb: false,
|
||||||
|
activeMenu: '/dzjk',
|
||||||
|
activeSecondMenuName: 'DzjkGzgj'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dzjk/tjbb',
|
path: '/dzjk/tjbb',
|
||||||
component: () => import('@/views/ems/dzjk/tjbb/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/index.vue'),
|
||||||
name: 'DzjkTjbb',
|
name: 'DzjkTjbb',
|
||||||
alwaysShow: false,
|
meta: {title: '统计报表', breadcrumb: false, activeMenu: '/dzjk'},
|
||||||
meta: {title: '统计报表', breadcrumb: false, activeMenu: '/dzjk/tjbb'},
|
|
||||||
hidden: false,
|
|
||||||
redirect: '/dzjk/tjbb/gltj',
|
redirect: '/dzjk/tjbb/gltj',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'gltj',
|
path: 'gltj',
|
||||||
component: () => import('@/views/ems/dzjk/tjbb/gltj/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/gltj/index.vue'),
|
||||||
name: 'DzjkTjbbGltj',
|
name: 'DzjkTjbbGltj',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '运行统计',
|
title: '运行统计',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/tjbb',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkTjbb'
|
activeSecondMenuName: 'DzjkTjbb'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -195,11 +203,10 @@ export const dzjk = [
|
|||||||
path: 'glqx',
|
path: 'glqx',
|
||||||
component: () => import('@/views/ems/dzjk/tjbb/glqx/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/glqx/index.vue'),
|
||||||
name: 'DzjkTjbbGlqx',
|
name: 'DzjkTjbbGlqx',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '功率曲线',
|
title: '功率曲线',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/tjbb',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkTjbb'
|
activeSecondMenuName: 'DzjkTjbb'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -207,11 +214,10 @@ export const dzjk = [
|
|||||||
path: 'pcsqx',
|
path: 'pcsqx',
|
||||||
component: () => import('@/views/ems/dzjk/tjbb/pcsqx/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/pcsqx/index.vue'),
|
||||||
name: 'DzjkTjbbPcsqx',
|
name: 'DzjkTjbbPcsqx',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: 'PCS曲线',
|
title: 'PCS曲线',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/tjbb',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkTjbb'
|
activeSecondMenuName: 'DzjkTjbb'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -219,11 +225,10 @@ export const dzjk = [
|
|||||||
path: 'dcdqx',
|
path: 'dcdqx',
|
||||||
component: () => import('@/views/ems/dzjk/tjbb/dcdqx/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/dcdqx/index.vue'),
|
||||||
name: 'DzjkTjbbDcdqx',
|
name: 'DzjkTjbbDcdqx',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '电池堆曲线',
|
title: '电池堆曲线',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/tjbb',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkTjbb'
|
activeSecondMenuName: 'DzjkTjbb'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -231,11 +236,10 @@ export const dzjk = [
|
|||||||
path: 'dcwd',
|
path: 'dcwd',
|
||||||
component: () => import('@/views/ems/dzjk/tjbb/dcwd/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/dcwd/index.vue'),
|
||||||
name: 'DzjkTjbbDcwd',
|
name: 'DzjkTjbbDcwd',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '电池温度',
|
title: '电池温度',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/tjbb',
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkTjbb'
|
activeSecondMenuName: 'DzjkTjbb'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -243,11 +247,21 @@ export const dzjk = [
|
|||||||
path: 'dbbb',
|
path: 'dbbb',
|
||||||
component: () => import('@/views/ems/dzjk/tjbb/dbbb/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/dbbb/index.vue'),
|
||||||
name: 'DzjkTjbbDbbb',
|
name: 'DzjkTjbbDbbb',
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '电表报表',
|
title: '电表报表',
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
activeMenu: '/dzjk/tjbb',
|
activeMenu: '/dzjk',
|
||||||
|
activeSecondMenuName: 'DzjkTjbb'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'sybb',
|
||||||
|
component: () => import('@/views/ems/dzjk/tjbb/sybb/index.vue'),
|
||||||
|
name: 'DzjkTjbbSybb',
|
||||||
|
meta: {
|
||||||
|
title: '收益报表',
|
||||||
|
breadcrumb: false,
|
||||||
|
activeMenu: '/dzjk',
|
||||||
activeSecondMenuName: 'DzjkTjbb'
|
activeSecondMenuName: 'DzjkTjbb'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -255,9 +269,33 @@ export const dzjk = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dzjk/clpz',
|
path: '/dzjk/clpz',
|
||||||
component: () => import('@/views/ems/dzjk/clpz/clyx/index.vue'),
|
component: () => import('@/views/ems/dzjk/clpz/index.vue'),
|
||||||
name: 'DzjkClpz',
|
name: 'DzjkClpz',
|
||||||
meta: {title: '策略配置', breadcrumb: false, activeMenu: '/dzjk/clpz'},
|
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'},
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,11 @@ export const constantRoutes = [
|
|||||||
component: () => import('@/views/register'),
|
component: () => import('@/views/register'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/screen',
|
||||||
|
component: () => import('@/views/screen/index'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: () => import('@/views/error/404'),
|
component: () => import('@/views/error/404'),
|
||||||
|
|||||||
@ -7,7 +7,7 @@ module.exports = {
|
|||||||
/**
|
/**
|
||||||
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
||||||
*/
|
*/
|
||||||
sideTheme: 'theme-dark',
|
sideTheme: 'theme-light',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统布局配置
|
* 系统布局配置
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import {getAllSites} from '@/api/ems/zddt'
|
|
||||||
import {getAlarmDetailList, getSiteAllDeviceCategory} from '@/api/ems/dzjk'
|
import {getAlarmDetailList, getSiteAllDeviceCategory} from '@/api/ems/dzjk'
|
||||||
|
|
||||||
const ems = {
|
const ems = {
|
||||||
@ -44,14 +43,6 @@ const ems = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
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的告警 存在展示红点标志
|
//查询站点的所有待处理0的告警 存在展示红点标志
|
||||||
getSiteAlarmNum({state, commit}, siteId) {
|
getSiteAlarmNum({state, commit}, siteId) {
|
||||||
getAlarmDetailList({
|
getAlarmDetailList({
|
||||||
|
|||||||
@ -34,12 +34,11 @@ const permission = {
|
|||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 向后端请求路由数据
|
// 向后端请求路由数据
|
||||||
getRouters().then(res => {
|
getRouters().then(res => {
|
||||||
let sysDzjk = -1
|
let hasDzjk = false
|
||||||
if(res?.data){
|
if(res?.data){
|
||||||
sysDzjk = res.data.findIndex(i=>{
|
res.data.forEach(i=>{
|
||||||
return i.children && i.children.find(j=>j.path.indexOf('dzjk')>-1)
|
i.children && i.children.find(j=>j.path.indexOf('dzjk')>-1) && (hasDzjk=true)
|
||||||
})
|
})
|
||||||
if(sysDzjk>-1) res.data.splice(sysDzjk,1)
|
|
||||||
}
|
}
|
||||||
const sdata = JSON.parse(JSON.stringify(res.data))
|
const sdata = JSON.parse(JSON.stringify(res.data))
|
||||||
const rdata = JSON.parse(JSON.stringify(res.data))
|
const rdata = JSON.parse(JSON.stringify(res.data))
|
||||||
@ -48,7 +47,7 @@ const permission = {
|
|||||||
const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
|
const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
|
||||||
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
||||||
router.addRoutes(asyncRoutes)
|
router.addRoutes(asyncRoutes)
|
||||||
if(sysDzjk === -1){
|
if(!hasDzjk){
|
||||||
const index = constantRoutes.findIndex(i=>i.path.indexOf('dzjk')>-1)
|
const index = constantRoutes.findIndex(i=>i.path.indexOf('dzjk')>-1)
|
||||||
constantRoutes.splice(index,1)
|
constantRoutes.splice(index,1)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" class="ems-dashboard-editor-container ems-content-container-padding">
|
<div v-loading="loading">
|
||||||
<template v-if="!showTemp">
|
<template v-if="!showTemp">
|
||||||
<el-button v-if="!showTemp" type="primary" plain @click="settingStrategy" style="margin-bottom: 20px;">新增策略</el-button>
|
<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)">
|
<cl-container v-for="(item,index) in list" :key="index+'clContainer'" :info="item" :hide-setting-btn="showTemp" class="contain" @update="init" @showSetting="settingStrategy(item)">
|
||||||
|
|||||||
53
src/views/ems/dzjk/clpz/index.vue
Normal file
53
src/views/ems/dzjk/clpz/index.vue
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<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>
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <cl-container :hideSettingBtn="true">-->
|
<!-- <cl-container :hideSettingBtn="true">-->
|
||||||
<!-- <template v-slot:default>-->
|
<!-- <template v-slot:default>-->
|
||||||
<div class="ems-dashboard-editor-container ems-content-container-padding">
|
<div>
|
||||||
<temp-table ref="tempTable" @updateTimeSetting="updateTimeSetting"/>
|
<temp-table ref="tempTable" @updateTimeSetting="updateTimeSetting"/>
|
||||||
<time-setting ref="timeSetting"/>
|
<time-setting ref="timeSetting"/>
|
||||||
<temp-power-chart ref="tomePowerChart"/>
|
<temp-power-chart ref="tomePowerChart"/>
|
||||||
|
|||||||
@ -1,19 +1,16 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" class="ems-dashboard-editor-container ems-content-container-padding">
|
<el-card v-loading="loading" gshadow="always" class="common-card-container common-card-container-no-title-bg">
|
||||||
<!-- 搜索栏-->
|
<!-- 搜索栏-->
|
||||||
<el-form :inline="true" class="select-container">
|
<el-form :inline="true" class="select-container">
|
||||||
<el-form-item label="设备清单">
|
<el-form-item label="设备清单">
|
||||||
<el-select v-model="search.deviceId" clearable placeholder="请选择" :loading="loading"
|
<el-select v-model="search.deviceId" clearable placeholder="请选择" :loading="loading" loading-text="正在加载数据">
|
||||||
loading-text="正在加载数据">
|
<el-option :label="item.deviceName" :value="item.deviceId" v-for="(item,key) in deviceOptions" :key="key+'deviceIdOptions'"></el-option>
|
||||||
<el-option :label="item.deviceName" :value="item.deviceId" v-for="(item,key) in deviceOptions"
|
|
||||||
:key="key+'deviceIdOptions'"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="告警等级">
|
<el-form-item label="告警等级">
|
||||||
<el-select v-model="search.alarmLevel" clearable placeholder="请选择" :loading="loading"
|
<el-select v-model="search.alarmLevel" clearable placeholder="请选择" :loading="loading" loading-text="正在加载数据">
|
||||||
loading-text="正在加载数据" style="width: 130px">
|
<el-option :label="value" :value="key" v-for="(value,key) in $store.state.ems.alarmLevelOptions" :key="key+'alarmLevelOptions'"></el-option>
|
||||||
<el-option :label="value" :value="key" v-for="(value,key) in $store.state.ems.alarmLevelOptions"
|
|
||||||
:key="key+'alarmLevelOptions'"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="时间选择">
|
<el-form-item label="时间选择">
|
||||||
@ -39,9 +36,7 @@
|
|||||||
<el-row style="">
|
<el-row style="">
|
||||||
<el-col :xs="24" :sm="24" :lg="24">
|
<el-col :xs="24" :sm="24" :lg="24">
|
||||||
<el-button-group class="ems-btns-group">
|
<el-button-group class="ems-btns-group">
|
||||||
<el-button v-for="(item,index) in btnList" :key="index+'dtdcBtns'"
|
<el-button v-for="(item,index) in btnList" :key="index+'dtdcBtns'" :class="{'activeBtn' : activeBtn === item.id}" @click="changeDataType(item.id)">{{item.name}}</el-button>
|
||||||
:class="{'activeBtn' : activeBtn === item.id}" @click="changeDataType(item.id)">{{ item.name }}
|
|
||||||
</el-button>
|
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -60,7 +55,7 @@
|
|||||||
label="告警等级"
|
label="告警等级"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ $store.state.ems.alarmLevelOptions[scope.row.alarmLevel] }}</span>
|
<span>{{$store.state.ems.alarmLevelOptions[scope.row.alarmLevel]}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -72,21 +67,20 @@
|
|||||||
prop="alarmStartTime"
|
prop="alarmStartTime"
|
||||||
label="告警发生时间">
|
label="告警发生时间">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ formatDate(scope.row.alarmStartTime, true) }}</span>
|
<span>{{formatDate(scope.row.alarmStartTime,true)}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="alarmEndTime"
|
prop="alarmEndTime"
|
||||||
label="告警结束时间">
|
label="告警结束时间">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ formatDate(scope.row.alarmEndTime, true) }}</span>
|
<span>{{formatDate(scope.row.alarmEndTime,true)}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="状态">
|
label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span
|
<span :class="['0','2'].includes(scope.row.status) ? 'warning-status' : ''">{{$store.state.ems.alarmStatusOptions[scope.row.status]}}</span>
|
||||||
:class="['0','2'].includes(scope.row.status) ? 'warning-status' : ''">{{ $store.state.ems.alarmStatusOptions[scope.row.status] }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -95,9 +89,7 @@
|
|||||||
width="250"
|
width="250"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" v-if="scope.row.ticketNo" @click="toTicket">
|
<el-button type="text" size="mini" v-if="scope.row.ticketNo" @click="toTicket">已生成工单(工单号:{{scope.row.ticketNo}})</el-button>
|
||||||
已生成工单(工单号:{{ scope.row.ticketNo }})
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" size="mini" v-else @click="createTicket(scope.row.id)">生成工单</el-button>
|
<el-button type="primary" size="mini" v-else @click="createTicket(scope.row.id)">生成工单</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -116,60 +108,57 @@
|
|||||||
>
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {createTicketNo, getAlarmDetailList} from '@/api/ems/dzjk'
|
import {getAlarmDetailList,createTicketNo} from'@/api/ems/dzjk'
|
||||||
import {getDeviceList} from '@/api/ems/site'
|
import {getDeviceList} from'@/api/ems/site'
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import {formatDate} from '@/filters/ems'
|
import { formatDate } from '@/filters/ems'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DzjkGzgj',
|
name:'DzjkGzgj',
|
||||||
mixins: [getQuerySiteId],
|
mixins:[getQuerySiteId],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading:false,
|
||||||
btnList: [
|
btnList:[
|
||||||
{name: '未处理告警', id: 'today'},
|
{name:'未处理告警',id:'today'},
|
||||||
{name: '历史告警', id: 'history'},
|
{name:'历史告警',id:'history'},
|
||||||
],
|
],
|
||||||
deviceOptions: [],//设备列表
|
deviceOptions:[],//设备列表
|
||||||
pickerOptions: {
|
pickerOptions:{
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() > Date.now();
|
return time.getTime() > Date.now();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultDateRange: [],//默认展示的时间
|
defaultDateRange:[],//默认展示的时间
|
||||||
dateRange: [],//alarmStartTime,alarmEndTime
|
dateRange:[],//alarmStartTime,alarmEndTime
|
||||||
activeBtn: 'today',
|
activeBtn:'today',
|
||||||
search: {deviceId: '', alarmLevel: ''},
|
search:{deviceId:'',alarmLevel:''},
|
||||||
// 表格、分页
|
// 表格、分页
|
||||||
tableData: [],
|
tableData:[],
|
||||||
pageSize: 10,//分页栏当前每个数据总数
|
pageSize:10,//分页栏当前每个数据总数
|
||||||
pageNum: 1,//分页栏当前页数
|
pageNum:1,//分页栏当前页数
|
||||||
totalSize: 0,//table表格数据总数
|
totalSize:0,//table表格数据总数
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods:{
|
||||||
formatDate,
|
formatDate,
|
||||||
toTicket() {
|
toTicket(){
|
||||||
this.$router.push({path: '/ticket'})
|
this.$router.push({path:'/ticket'})
|
||||||
},
|
},
|
||||||
//生成工单
|
//生成工单
|
||||||
createTicket(id) {
|
createTicket(id){
|
||||||
this.loading = true
|
this.loading = true
|
||||||
createTicketNo({id}).then(response => {
|
createTicketNo({id}).then(response=>{
|
||||||
response?.data && this.toTicket()
|
response?.data && this.toTicket()
|
||||||
}).finally(() => {
|
}).finally(()=>{this.loading = false})
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 判断是否是同一天
|
// 判断是否是同一天
|
||||||
isSameDay(day1, day2) {
|
isSameDay(day1, day2) {
|
||||||
const date1 = new Date(day1), date2 = new Date(day2)
|
const date1 = new Date(day1),date2 = new Date(day2)
|
||||||
return date1.getFullYear() === date2.getFullYear() &&
|
return date1.getFullYear() === date2.getFullYear() &&
|
||||||
date1.getMonth() === date2.getMonth() &&
|
date1.getMonth() === date2.getMonth() &&
|
||||||
date1.getDate() === date2.getDate();
|
date1.getDate() === date2.getDate();
|
||||||
@ -177,71 +166,60 @@ export default {
|
|||||||
// 分页
|
// 分页
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageSize = val;
|
this.pageSize = val;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(()=>{
|
||||||
this.getData()
|
this.getData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.pageNum = val
|
this.pageNum = val
|
||||||
this.$nextTick(() => {
|
this.$nextTick(()=>{
|
||||||
this.getData()
|
this.getData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch() {
|
onSearch(){
|
||||||
this.pageNum = 1//每次搜索从1开始搜索
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
onReset() {
|
onReset(){
|
||||||
this.search = {deviceId: '', alarmLevel: ''}
|
this.search={deviceId:'',alarmLevel:''}
|
||||||
this.dateRange = []
|
this.dateRange=[]
|
||||||
this.pageNum = 1//每次搜索从1开始搜索
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
// 切换今日、历史告警
|
// 切换今日、历史告警
|
||||||
changeDataType(id) {
|
changeDataType(id){
|
||||||
if (id !== this.activeBtn) {
|
if(id !== this.activeBtn){
|
||||||
console.log('点击了不同的菜单,更新数据')
|
console.log('点击了不同的菜单,更新数据')
|
||||||
this.activeBtn = id;
|
this.activeBtn=id;
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取数据
|
// 获取数据
|
||||||
getData() {
|
getData(){
|
||||||
this.$store.dispatch('getSiteAlarmNum', this.siteId)
|
this.$store.dispatch('getSiteAlarmNum',this.siteId)
|
||||||
this.loading = true
|
this.loading=true
|
||||||
const {deviceId, alarmLevel} = this.search
|
const {deviceId,alarmLevel} = this.search
|
||||||
const {siteId, pageNum, pageSize, activeBtn} = this
|
const {siteId,pageNum,pageSize,activeBtn} =this
|
||||||
const [alarmStartTime = '', alarmEndTime = ''] = (this.dateRange || [])
|
const [alarmStartTime='',alarmEndTime='']=(this.dateRange || [])
|
||||||
let status = activeBtn === 'today' ? '0' : '1,2'
|
let status = activeBtn === 'today' ? '0' : '1,2'
|
||||||
getAlarmDetailList({
|
getAlarmDetailList({status,deviceId,alarmLevel,siteId,pageSize,pageNum,alarmStartTime:formatDate(alarmStartTime),alarmEndTime:formatDate(alarmEndTime)}).then(response => {
|
||||||
status,
|
this.tableData=response?.rows || [];
|
||||||
deviceId,
|
|
||||||
alarmLevel,
|
|
||||||
siteId,
|
|
||||||
pageSize,
|
|
||||||
pageNum,
|
|
||||||
alarmStartTime: formatDate(alarmStartTime),
|
|
||||||
alarmEndTime: formatDate(alarmEndTime)
|
|
||||||
}).then(response => {
|
|
||||||
this.tableData = response?.rows || [];
|
|
||||||
this.totalSize = response?.total || 0
|
this.totalSize = response?.total || 0
|
||||||
}).finally(() => {
|
}).finally(() => {this.loading=false})
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getDeviceOptions() {
|
getDeviceOptions(){
|
||||||
getDeviceList(this.siteId).then(response => {
|
getDeviceList(this.siteId).then(response => {
|
||||||
this.deviceOptions = JSON.parse(JSON.stringify(response?.data || []))
|
this.deviceOptions = JSON.parse(JSON.stringify(response?.data || []))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
init() {
|
init(){
|
||||||
this.getDeviceOptions()
|
this.getDeviceOptions()
|
||||||
this.onReset()
|
this.onReset()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted(){
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const lastMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1);
|
const lastMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1);
|
||||||
this.defaultDateRange = [lastMonth, now];
|
this.defaultDateRange = [lastMonth, now];
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div v-loading="loading">
|
||||||
class="ems-dashboard-editor-container ems-content-container-padding"
|
|
||||||
v-loading="loading"
|
|
||||||
>
|
|
||||||
<el-row style="background: #fff" class="row-container" :gutter="15">
|
<el-row style="background: #fff" class="row-container" :gutter="15">
|
||||||
<el-col :xs="24" :sm="24" :lg="5">
|
<el-col :xs="24" :sm="24" :lg="5">
|
||||||
<!-- 站点信息-->
|
<!-- 站点信息-->
|
||||||
|
|||||||
@ -19,13 +19,14 @@
|
|||||||
</keep-alive>
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import { dzjk } from '@/router/ems'
|
import { dzjk } from '@/router/ems'
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
const childrenRoute = ((dzjk[0]?.children || []).find(item=> item.name==='DzjkSbjk').children) || []//获取到单站监控-设备监控下面的字路由
|
const childrenRoute = dzjk[0].children[0].children.find(item=> item.name==='DzjkSbjk').children//获取到单站监控-设备监控下面的字路由
|
||||||
export default {
|
export default {
|
||||||
name:'DzjkSbjk',
|
name:'DzjkSbjk',
|
||||||
mixins:[getQuerySiteId],
|
mixins:[getQuerySiteId],
|
||||||
@ -64,14 +65,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.sbjk-ems-dashboard-editor-container {
|
.sbjk-ems-content-container{
|
||||||
display: flex;
|
margin-top:0;
|
||||||
background: #ffffff;
|
padding-top:0;
|
||||||
}
|
|
||||||
.sbjk-ems-content-container {
|
|
||||||
margin-top: 0;
|
|
||||||
padding-top: 0;
|
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -27,12 +27,6 @@
|
|||||||
<div>数据更新时间:{{ pcsItem.dataUpdateTime }}</div>
|
<div>数据更新时间:{{ pcsItem.dataUpdateTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alarm">
|
<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;"
|
<el-button type="primary" round size="small" style="margin-right:20px;"
|
||||||
@click="pointDetail(pcsItem,'point')">
|
@click="pointDetail(pcsItem,'point')">
|
||||||
详细
|
详细
|
||||||
@ -190,12 +184,11 @@ import RealTimeBaseInfo from "./../RealTimeBaseInfo.vue";
|
|||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import {getPcsDetailInfo, getRunningHeadInfo} from "@/api/ems/dzjk";
|
import {getPcsDetailInfo, getRunningHeadInfo} from "@/api/ems/dzjk";
|
||||||
import intervalUpdate from "@/mixins/ems/intervalUpdate";
|
import intervalUpdate from "@/mixins/ems/intervalUpdate";
|
||||||
import PcsSwitch from "@/views/ems/site/sblb/PcsSwitch.vue";
|
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DzjkSbjkPcs",
|
name: "DzjkSbjkPcs",
|
||||||
components: {RealTimeBaseInfo, pointChart, PointTable, PcsSwitch},
|
components: {RealTimeBaseInfo, pointChart, PointTable},
|
||||||
mixins: [getQuerySiteId, intervalUpdate],
|
mixins: [getQuerySiteId, intervalUpdate],
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div style="width:100%" v-loading="loading">
|
<div style="width:100%" v-loading="loading">
|
||||||
<!-- 搜索栏-->
|
<!-- 搜索栏-->
|
||||||
@ -21,9 +22,6 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="onReset" native-type="button">重置</el-button>
|
<el-button @click="onReset" native-type="button">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="exportTable" native-type="button">导出</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<!--表格-->
|
<!--表格-->
|
||||||
<el-table
|
<el-table
|
||||||
@ -31,7 +29,7 @@
|
|||||||
:data="tableData"
|
:data="tableData"
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%;margin-top:25px;">
|
style="width: 100%;margin-top:25px;">
|
||||||
<!-- 汇总列-->
|
<!-- 汇总列-->
|
||||||
<el-table-column label="汇总">
|
<el-table-column label="汇总">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dataTime"
|
prop="dataTime"
|
||||||
@ -39,7 +37,7 @@
|
|||||||
width="120">
|
width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!--充电量列-->
|
<!--充电量列-->
|
||||||
<el-table-column label="充电量" align="center">
|
<el-table-column label="充电量" align="center">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
@ -95,7 +93,7 @@
|
|||||||
label="总">
|
label="总">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 效率-->
|
<!-- 效率-->
|
||||||
<el-table-column label="效率(%)" align="center">
|
<el-table-column label="效率(%)" align="center">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
@ -122,84 +120,74 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import {getAmmeterData} from '@/api/ems/dzjk'
|
import { getAmmeterData} from '@/api/ems/dzjk'
|
||||||
import {formatDate} from "@/filters/ems";
|
import {formatDate} from "@/filters/ems";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DzjkTjbbDbbb',
|
name:'DzjkTjbbDbbb',
|
||||||
mixins: [getQuerySiteId],
|
mixins: [getQuerySiteId],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading:false,
|
||||||
pickerOptions: {
|
pickerOptions:{
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() > Date.now();
|
return time.getTime() > Date.now();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultDateRange: [],//默认展示的时间
|
defaultDateRange:[],//默认展示的时间
|
||||||
dateRange: [],
|
dateRange:[],
|
||||||
tableData: [],
|
tableData:[],
|
||||||
pageSize: 10,//分页栏当前每个数据总数
|
pageSize:10,//分页栏当前每个数据总数
|
||||||
pageNum: 1,//分页栏当前页数
|
pageNum:1,//分页栏当前页数
|
||||||
totalSize: 0,//table表格数据总数
|
totalSize:0,//table表格数据总数
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods:{
|
||||||
// 导出表格
|
|
||||||
exportTable() {
|
|
||||||
if (!this.dateRange?.length) return
|
|
||||||
const [startTime, endTime] = this.dateRange
|
|
||||||
this.download('ems/statsReport/exportAmmeterData', {
|
|
||||||
siteId: this.siteId,
|
|
||||||
startTime,
|
|
||||||
endTime,
|
|
||||||
}, `电表报表_${startTime}-${endTime}.xlsx`)
|
|
||||||
},
|
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch() {
|
onSearch(){
|
||||||
this.pageNum = 1//每次搜索从1开始搜索
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
onReset() {
|
onReset(){
|
||||||
this.dateRange = this.defaultDateRange
|
this.dateRange=this.defaultDateRange
|
||||||
this.pageNum = 1//每次搜索从1开始搜索
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
// 分页
|
// 分页
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageSize = val;
|
this.pageSize = val;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(()=>{
|
||||||
this.getData()
|
this.getData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.pageNum = val
|
this.pageNum = val
|
||||||
this.$nextTick(() => {
|
this.$nextTick(()=>{
|
||||||
this.getData()
|
this.getData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取数据
|
// 获取数据
|
||||||
getData() {
|
getData(){
|
||||||
this.loading = true
|
this.loading=true
|
||||||
const {siteId, pageNum, pageSize} = this
|
const {siteId,pageNum,pageSize} =this
|
||||||
const [startTime = '', endTime = ''] = (this.dateRange || [])
|
const [startTime='',endTime='']=(this.dateRange || [])
|
||||||
getAmmeterData({siteId: siteId, startTime, endTime, pageSize, pageNum}).then(response => {
|
getAmmeterData({siteId:siteId,startTime,endTime,pageSize,pageNum}).then(response=>{
|
||||||
this.tableData = response?.rows || [];
|
this.tableData=response?.rows || [];
|
||||||
this.totalSize = response?.total || 0
|
this.totalSize = response?.total || 0
|
||||||
}).finally(() => {
|
}).finally(()=> {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
init() {
|
init(){
|
||||||
this.dateRange = []
|
this.dateRange=[]
|
||||||
this.tableData = []
|
this.tableData=[]
|
||||||
this.totalSize = 0
|
this.totalSize=0
|
||||||
this.pageSize = 10
|
this.pageSize=10
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
let now = new Date(), lastDay = now.getTime(), firstDay = new Date(now.setDate(1)).getTime();
|
const now = new Date().getTime();
|
||||||
this.defaultDateRange = [formatDate(firstDay), formatDate(lastDay)];
|
const lastMonth = new Date(now-30 * 24 * 60 * 60 * 1000).getTime();
|
||||||
this.dateRange = [formatDate(firstDay), formatDate(lastDay)];
|
this.defaultDateRange = [formatDate(lastMonth), formatDate(now)];
|
||||||
|
this.dateRange=[formatDate(lastMonth), formatDate(now)];
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -207,8 +195,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
::v-deep {
|
::v-deep{
|
||||||
.common-table.el-table .el-table__header-wrapper th, .common-table.el-table .el-table__fixed-header-wrapper th {
|
.common-table.el-table .el-table__header-wrapper th, .common-table.el-table .el-table__fixed-header-wrapper th{
|
||||||
border-bottom: 1px solid #dfe6ec;
|
border-bottom: 1px solid #dfe6ec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
>
|
>
|
||||||
<div slot="header" class="time-range-header">
|
<div slot="header" class="time-range-header">
|
||||||
<span class="card-title"> </span>
|
<span class="card-title"> </span>
|
||||||
<date-range-select ref="dateRangeSelect" @updateDate="updateDate"/>
|
<date-range-select ref="dateRangeSelect" @updateDate="updateDate" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-main" v-loading="loading">
|
<div class="card-main" v-loading="loading">
|
||||||
<el-button-group class="ems-btns-group">
|
<el-button-group class="ems-btns-group">
|
||||||
@ -16,8 +16,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:class="{ activeBtn: activeBtn === item.id }"
|
:class="{ activeBtn: activeBtn === item.id }"
|
||||||
@click="changeDataType(item.id)"
|
@click="changeDataType(item.id)"
|
||||||
>{{ item.name }}
|
>{{ item.name }}</el-button
|
||||||
</el-button
|
|
||||||
>
|
>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
<div id="dcdEchart" style="height: 310px"></div>
|
<div id="dcdEchart" style="height: 310px"></div>
|
||||||
@ -29,13 +28,12 @@
|
|||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import resize from "@/mixins/ems/resize";
|
import resize from "@/mixins/ems/resize";
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import {getStackData} from "@/api/ems/dzjk";
|
import { getStackData, getStackNameList } from "@/api/ems/dzjk";
|
||||||
import {formatDate} from "@/filters/ems";
|
import { formatDate } from "@/filters/ems";
|
||||||
import DateRangeSelect from "@/components/Ems/DateRangeSelect/index.vue";
|
import DateRangeSelect from "@/components/Ems/DateRangeSelect/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DzjkTjbbDcdqx",
|
name: "DzjkTjbbDcdqx",
|
||||||
components: {DateRangeSelect},
|
components: { DateRangeSelect },
|
||||||
mixins: [resize, getQuerySiteId],
|
mixins: [resize, getQuerySiteId],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -48,10 +46,10 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
activeBtn: "1",
|
activeBtn: "1",
|
||||||
btnList: [
|
btnList: [
|
||||||
{name: "堆平均维度", id: "1", attr: ["temp"], source: ["有功功率"]},
|
{ name: "堆平均维度", id: "1", attr: ["temp"], source: ["有功功率"] },
|
||||||
{name: "堆电压", id: "2", attr: ["voltage"], source: ["堆电压"]},
|
{ name: "堆电压", id: "2", attr: ["voltage"], source: ["堆电压"] },
|
||||||
{name: "堆电流", id: "3", attr: ["current"], source: ["堆电流"]},
|
{ name: "堆电流", id: "3", attr: ["current"], source: ["堆电流"] },
|
||||||
{name: "堆soc", id: "4", attr: ["soc"], source: ["堆soc"]},
|
{ name: "堆soc", id: "4", attr: ["soc"], source: ["堆soc"] },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -68,7 +66,7 @@ export default {
|
|||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
getData() {
|
getData() {
|
||||||
const {siteId, activeBtn} = this;
|
const { siteId, activeBtn } = this;
|
||||||
const [start = "", end = ""] = this.dateRange || [];
|
const [start = "", end = ""] = this.dateRange || [];
|
||||||
//接口调用完成之后 设置图表、结束loading
|
//接口调用完成之后 设置图表、结束loading
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -144,7 +142,7 @@ export default {
|
|||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
left: "center",
|
left: "center",
|
||||||
top: "10",
|
bottom: "15",
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
@ -162,25 +160,10 @@ export default {
|
|||||||
yAxis: {
|
yAxis: {
|
||||||
type: "value",
|
type: "value",
|
||||||
},
|
},
|
||||||
dataZoom: [
|
dataset: { source },
|
||||||
{
|
|
||||||
type: "inside",
|
|
||||||
start: 0,
|
|
||||||
end: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
start: 0,
|
|
||||||
end: 100,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
dataset: {source},
|
|
||||||
series: source[0].slice(1).map((item) => {
|
series: source[0].slice(1).map((item) => {
|
||||||
return {
|
return {
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
|
||||||
areaStyle: {
|
|
||||||
opacity: 0.7,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
@ -193,7 +176,7 @@ export default {
|
|||||||
init() {
|
init() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart();
|
this.initChart();
|
||||||
this.$refs.dateRangeSelect.init(true);
|
this.$refs.dateRangeSelect.init();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
<span class="card-title">功率曲线</span>
|
<span class="card-title">功率曲线</span>
|
||||||
<date-range-select
|
<date-range-select
|
||||||
ref="dateRangeSelect"
|
ref="dateRangeSelect"
|
||||||
|
@reset="resetTime"
|
||||||
@updateDate="updateDate"
|
@updateDate="updateDate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -21,13 +22,12 @@
|
|||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import resize from "@/mixins/ems/resize";
|
import resize from "@/mixins/ems/resize";
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import {getPowerData} from "@/api/ems/dzjk";
|
import { getPcsNameList, getPowerData } from "@/api/ems/dzjk";
|
||||||
import {formatDate} from "@/filters/ems";
|
import { formatDate } from "@/filters/ems";
|
||||||
import DateRangeSelect from "@/components/Ems/DateRangeSelect/index.vue";
|
import DateRangeSelect from "@/components/Ems/DateRangeSelect/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DzjkTjbbGlqx",
|
name: "DzjkTjbbGlqx",
|
||||||
components: {DateRangeSelect},
|
components: { DateRangeSelect },
|
||||||
mixins: [resize, getQuerySiteId],
|
mixins: [resize, getQuerySiteId],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -38,6 +38,7 @@ export default {
|
|||||||
},
|
},
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
dateRangeInit: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -46,11 +47,19 @@ export default {
|
|||||||
this.dateRange = data || [];
|
this.dateRange = data || [];
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
resetTime() {
|
||||||
|
this.dateRangeInit = true;
|
||||||
|
},
|
||||||
getData() {
|
getData() {
|
||||||
const {siteId} = this;
|
const { siteId } = this;
|
||||||
let [start = "", end = ""] = this.dateRange || [];
|
let [start = "", end = ""] = this.dateRange || [];
|
||||||
//接口调用完成之后 设置图表、结束loading
|
//接口调用完成之后 设置图表、结束loading
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
if (this.dateRangeInit) {
|
||||||
|
start = "";
|
||||||
|
end = "";
|
||||||
|
this.dateRangeInit = false;
|
||||||
|
}
|
||||||
getPowerData({
|
getPowerData({
|
||||||
siteId,
|
siteId,
|
||||||
startDate: formatDate(start),
|
startDate: formatDate(start),
|
||||||
@ -81,7 +90,7 @@ export default {
|
|||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
left: "center",
|
left: "center",
|
||||||
top: "10",
|
bottom: "15",
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
@ -99,46 +108,19 @@ export default {
|
|||||||
yAxis: {
|
yAxis: {
|
||||||
type: "value",
|
type: "value",
|
||||||
},
|
},
|
||||||
dataset: {source},
|
dataset: { source },
|
||||||
dataZoom: [
|
|
||||||
{
|
|
||||||
type: "inside",
|
|
||||||
start: 0,
|
|
||||||
end: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
start: 0,
|
|
||||||
end: 100,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
|
||||||
areaStyle: {
|
|
||||||
opacity: 0.7,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
|
||||||
areaStyle: {
|
|
||||||
opacity: 0.7,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
|
||||||
areaStyle: {
|
|
||||||
opacity: 0.7,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
|
||||||
areaStyle: {
|
|
||||||
opacity: 0.7,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -151,6 +133,7 @@ export default {
|
|||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
this.dateRangeInit = true;
|
||||||
this.initChart();
|
this.initChart();
|
||||||
this.$refs.dateRangeSelect.init();
|
this.$refs.dateRangeSelect.init();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -7,55 +7,47 @@
|
|||||||
text-color="#666666"
|
text-color="#666666"
|
||||||
active-text-color="#ffffff"
|
active-text-color="#ffffff"
|
||||||
>
|
>
|
||||||
<el-menu-item
|
<el-menu-item :index="item.name" v-for="(item,index) in childrenRoute" :key="index+'tjbbChildrenRoute'">
|
||||||
:index="item.name"
|
<router-link style="height: 100%;width: 100%;display: block;" :to="{path:item.path,query:$route.query}">
|
||||||
v-for="(item, index) in childrenRoute"
|
{{item.meta.title}}
|
||||||
:key="index + 'tjbbChildrenRoute'"
|
|
||||||
>
|
|
||||||
<router-link
|
|
||||||
style="height: 100%; width: 100%; display: block"
|
|
||||||
:to="{ path: item.path, query: $route.query }"
|
|
||||||
>
|
|
||||||
{{ item.meta.title }}
|
|
||||||
</router-link>
|
</router-link>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
|
||||||
<div
|
<div class="ems-content-container ems-content-container-padding tjbb-ems-content-container">
|
||||||
class="ems-content-container ems-content-container-padding tjbb-ems-content-container"
|
|
||||||
>
|
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { dzjk } from "@/router/ems";
|
import { dzjk } from '@/router/ems'
|
||||||
const childrenRoute = dzjk[0].children.find(
|
const childrenRoute = dzjk[0].children[0].children.find(item=> item.name==='DzjkTjbb').children//获取到统计报表下面的字路由
|
||||||
(item) => item.name === "DzjkTjbb"
|
console.log('设备监控子路由',childrenRoute)
|
||||||
).children; //获取到统计报表下面的字路由
|
|
||||||
console.log("设备监控子路由", childrenRoute);
|
|
||||||
export default {
|
export default {
|
||||||
name: "DzjkTjbb",
|
name:'DzjkTjbb',
|
||||||
data() {
|
data(){
|
||||||
return {
|
return {
|
||||||
childrenRoute,
|
childrenRoute,
|
||||||
activeMenu: "",
|
activeMenu:''
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log("当前统计报表页面路由", this.$route);
|
console.log('当前统计报表页面路由',this.$route)
|
||||||
},
|
}
|
||||||
};
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.tjbb-ems-content-container {
|
.tjbb-ems-content-container{
|
||||||
margin-top: 0;
|
margin-top:0;
|
||||||
padding-top: 0;
|
padding-top:0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
>
|
>
|
||||||
<div slot="header" class="time-range-header">
|
<div slot="header" class="time-range-header">
|
||||||
<span class="card-title"> </span>
|
<span class="card-title"> </span>
|
||||||
<date-range-select ref="dateRangeSelect" @updateDate="updateDate"/>
|
<date-range-select ref="dateRangeSelect" @updateDate="updateDate" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-main" v-loading="loading">
|
<div class="card-main" v-loading="loading">
|
||||||
<el-button-group class="ems-btns-group">
|
<el-button-group class="ems-btns-group">
|
||||||
@ -16,8 +16,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:class="{ activeBtn: activeBtn === item.id }"
|
:class="{ activeBtn: activeBtn === item.id }"
|
||||||
@click="changeDataType(item.id)"
|
@click="changeDataType(item.id)"
|
||||||
>{{ item.name }}
|
>{{ item.name }}</el-button
|
||||||
</el-button
|
|
||||||
>
|
>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
<div id="pcsEchart" style="height: 310px"></div>
|
<div id="pcsEchart" style="height: 310px"></div>
|
||||||
@ -29,13 +28,12 @@
|
|||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import resize from "@/mixins/ems/resize";
|
import resize from "@/mixins/ems/resize";
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import {getPCSData} from "@/api/ems/dzjk";
|
import { getPCSData, getPcsNameList } from "@/api/ems/dzjk";
|
||||||
import {formatDate} from "@/filters/ems";
|
import { formatDate } from "@/filters/ems";
|
||||||
import DateRangeSelect from "@/components/Ems/DateRangeSelect/index.vue";
|
import DateRangeSelect from "@/components/Ems/DateRangeSelect/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DzjkTjbbPcsqx",
|
name: "DzjkTjbbPcsqx",
|
||||||
components: {DateRangeSelect},
|
components: { DateRangeSelect },
|
||||||
mixins: [resize, getQuerySiteId],
|
mixins: [resize, getQuerySiteId],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -84,7 +82,7 @@ export default {
|
|||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
getData() {
|
getData() {
|
||||||
const {siteId, activeBtn} = this;
|
const { siteId, activeBtn } = this;
|
||||||
const [start = "", end = ""] = this.dateRange || [];
|
const [start = "", end = ""] = this.dateRange || [];
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
//接口调用完成之后 设置图表、结束loading
|
//接口调用完成之后 设置图表、结束loading
|
||||||
@ -160,7 +158,7 @@ export default {
|
|||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
left: "center",
|
left: "center",
|
||||||
top: "10",
|
bottom: "15",
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
@ -178,25 +176,10 @@ export default {
|
|||||||
yAxis: {
|
yAxis: {
|
||||||
type: "value",
|
type: "value",
|
||||||
},
|
},
|
||||||
dataZoom: [
|
dataset: { source },
|
||||||
{
|
|
||||||
type: "inside",
|
|
||||||
start: 0,
|
|
||||||
end: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
start: 0,
|
|
||||||
end: 100,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
dataset: {source},
|
|
||||||
series: source[0].slice(1).map((item) => {
|
series: source[0].slice(1).map((item) => {
|
||||||
return {
|
return {
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
|
||||||
areaStyle: {
|
|
||||||
opacity: 0.7,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
@ -209,7 +192,7 @@ export default {
|
|||||||
init() {
|
init() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart();
|
this.initChart();
|
||||||
this.$refs.dateRangeSelect.init(true);
|
this.$refs.dateRangeSelect.init();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -21,9 +21,6 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="onReset" native-type="button">重置</el-button>
|
<el-button @click="onReset" native-type="button">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="exportTable" native-type="button">导出</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<!--表格-->
|
<!--表格-->
|
||||||
<el-table
|
<el-table
|
||||||
@ -147,16 +144,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 导出表格
|
|
||||||
exportTable() {
|
|
||||||
if (!this.dateRange?.length) return
|
|
||||||
const [startTime, endTime] = this.dateRange
|
|
||||||
this.download('ems/statsReport/exportAmmeterRevenueData', {
|
|
||||||
siteId: this.siteId,
|
|
||||||
startTime,
|
|
||||||
endTime,
|
|
||||||
}, `收益报表_${startTime}-${endTime}.xlsx`)
|
|
||||||
},
|
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch() {
|
onSearch() {
|
||||||
this.pageNum = 1//每次搜索从1开始搜索
|
this.pageNum = 1//每次搜索从1开始搜索
|
||||||
|
|||||||
@ -323,7 +323,7 @@ $lineColor: #86bcc7;
|
|||||||
|
|
||||||
.ems-dashboard-editor-container {
|
.ems-dashboard-editor-container {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 30px;
|
padding: 0;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
|
|||||||
@ -40,18 +40,14 @@ export default {
|
|||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
runningStatusMap: ['0', '3', '4', '6']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
label() {
|
label() {
|
||||||
return this.runningStatusMap.includes(this.data.workStatus) ? '关机' : '开机'
|
return this.data.workStatus === '0' ? '关机' : '开机'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
switchStatus() {
|
switchStatus() {
|
||||||
|
console.log(this.data, 11111111)
|
||||||
const {workStatus, deviceId, deviceName, siteId} = this.data
|
const {workStatus, deviceId, deviceName, siteId} = this.data
|
||||||
this.$confirm(`确认要${this.label}设备${deviceName || ''}吗?`, {
|
this.$confirm(`确认要${this.label}设备${deviceName || ''}吗?`, {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@ -65,7 +61,7 @@ export default {
|
|||||||
//做开关机操作,更新成功后刷新表格
|
//做开关机操作,更新成功后刷新表格
|
||||||
updateDeviceStatus({
|
updateDeviceStatus({
|
||||||
siteId,
|
siteId,
|
||||||
workStatus: this.runningStatusMap.includes(workStatus) ? "1" : '0',//1 关机 0开机
|
workStatus: workStatus === '0' ? "1" : '0',
|
||||||
deviceId
|
deviceId
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
@ -84,10 +84,10 @@
|
|||||||
label="在线状态">
|
label="在线状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ $store.state.ems.deviceStatusOptions[scope.row.deviceStatus] }}</span>
|
<span>{{ $store.state.ems.deviceStatusOptions[scope.row.deviceStatus] }}</span>
|
||||||
<pcs-switch v-if="scope.row.deviceCategory === 'PCS' && ![null,'',undefined].includes(scope.row.workStatus)"
|
<!-- <pcs-switch v-if="scope.row.deviceCategory === 'PCS' && ![null,'',undefined].includes(scope.row.deviceStatus)"-->
|
||||||
style="margin-left:5px;"
|
<!-- style="margin-left:5px;"-->
|
||||||
:data="{siteId:scope.row.siteId,workStatus:scope.row.workStatus,deviceId:scope.row.deviceId,deviceName:scope.row.deviceName}"
|
<!-- :data="{siteId:scope.row.siteId,deviceStatus:scope.row.deviceStatus,deviceId:scope.row.deviceId,deviceName:scope.row.deviceName}"-->
|
||||||
@updateSuccess="getData"/>
|
<!-- @updateSuccess="getData"/>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -180,11 +180,11 @@ import {getAllDeviceCategory} from '@/api/ems/search'
|
|||||||
import PointTable from './PointTable.vue'
|
import PointTable from './PointTable.vue'
|
||||||
import AddDevice from "./AddDevice.vue";
|
import AddDevice from "./AddDevice.vue";
|
||||||
import PointUpload from "./PointUpload.vue";
|
import PointUpload from "./PointUpload.vue";
|
||||||
import PcsSwitch from "./PcsSwitch.vue";
|
// import PcsSwitch from "./PcsSwitch.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Sblb",
|
name: "Sblb",
|
||||||
components: {AddDevice, PointTable, PointUpload, PcsSwitch},
|
components: {AddDevice, PointTable, PointUpload},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|||||||
BIN
src/views/screen/background.png
Normal file
BIN
src/views/screen/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 MiB |
418
src/views/screen/index.vue
Normal file
418
src/views/screen/index.vue
Normal file
@ -0,0 +1,418 @@
|
|||||||
|
<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>
|
||||||
Reference in New Issue
Block a user