diff --git a/src/assets/font/font.css b/src/assets/font/font.css
index 5ce0ae8..3bb3fb4 100644
--- a/src/assets/font/font.css
+++ b/src/assets/font/font.css
@@ -4,4 +4,11 @@
src: url('./PangMenZhengDaoBiaoTiTiMianFeiBan-2.ttf');
font-weight: normal;
font-style: normal;
+}
+/*yaHei*/
+@font-face {
+ font-family: "Microsoft YaHei";
+ src: url('./msyhl.ttc');
+ font-weight: normal;
+ font-style: normal;
}
\ No newline at end of file
diff --git a/src/components/mainHeader/index.vue b/src/components/mainHeader/index.vue
index 249fc39..eaacc65 100644
--- a/src/components/mainHeader/index.vue
+++ b/src/components/mainHeader/index.vue
@@ -10,7 +10,7 @@ import carbonEmission from '@/views/carbonEmission/index.vue' //碳排放
import screen from '@/views/screen/index.vue' //显示屏
import energyMonitoring from '@/views/energyMonitoring/index.vue'
-
+import getPath from "@/utils/getPath.js";
// import getImageUrl from '@/utils/getPath.js'
const nowDate = ref('')
const nowWeek = ref('')
@@ -27,15 +27,15 @@ timer.value = setInterval(()=>{
getNowDate()
},1000)
const menuList = ref([
- {name:shallowRef(overview),default:'../../assets/images/menu/overview.png',select:'../../assets/images/menu/overview-select.png'},
+ {name:shallowRef(overview),default:getPath.overview,select:getPath.overviewselect},
{name:shallowRef(energyMonitoring),
- default:'../../assets/images/menu/energy.png',select:'../../assets/images/menu/energy-select.png'},
- {name:shallowRef(energyEfficiency),default:'../../assets/images/menu/energy-efficiency.png',select:'../../assets/images/menu/energy-efficiency-select.png'},
- {name:shallowRef(drainage),default:'../../assets/images/menu/drainage.png',select:'../../assets/images/menu/drainage-select.png'},
- {name:shallowRef(airConditioning),default:'../../assets/images/menu/air-conditioning.png',select:'../../assets/images/menu/air-conditioning-select.png'},
- {name:shallowRef(lighting),default:'../../assets/images/menu/lighting.png',select:'../../assets/images/menu/lighting-select.png'},
- {name:shallowRef(carbonEmission),default:'../../assets/images/menu/carbon.png',select:'../../assets/images/menu/carbon-select.png'},
- {name:shallowRef(screen),default:'../../assets/images/menu/screen.png',select:'../../assets/images/menu/screen-select.png'}
+ default:getPath.energy,select:getPath.energyselect},
+ {name:shallowRef(energyEfficiency),default:getPath.energyefficiency,select:getPath.energyefficiencyselect},
+ {name:shallowRef(drainage),default:getPath.drainage,select:getPath.drainageselect},
+ {name:shallowRef(airConditioning),default:getPath.airconditioning,select:getPath.airconditioningselect},
+ {name:shallowRef(lighting),default:getPath.lighting,select:getPath.lightingselect},
+ {name:shallowRef(carbonEmission),default:getPath.carbon,select:getPath.carbonselect},
+ {name:shallowRef(screen),default:getPath.screen,select:getPath.screenselect}
])
const menuIndex = ref(0)
// 菜单切换方法
diff --git a/src/style.scss b/src/style.scss
index ffe42be..34e290d 100644
--- a/src/style.scss
+++ b/src/style.scss
@@ -6,6 +6,7 @@
padding: 0;
overflow: hidden;
color: rgba(221, 255, 253, 1);
+ font-family: "Microsoft YaHei";
}
p,ul,li{
margin: 0;
@@ -34,7 +35,13 @@ p,ul,li{
box-sizing: border-box;
display: flex;
justify-content: space-between;
-
+ //排水
+ .page-big-box{
+ width: 100%;
+ height: vh(892);
+ background-size: 100% 100%;
+ background-image: url("@/assets/images/page-big-box.png");
+ }
&-right-box, &-left-box {
height: 100%;
width: vw(450);
diff --git a/src/views/air-conditioning/index.vue b/src/views/air-conditioning/index.vue
index c76ebd2..f95bd91 100644
--- a/src/views/air-conditioning/index.vue
+++ b/src/views/air-conditioning/index.vue
@@ -1,13 +1,306 @@
-
- 空调
-
+
+
+
+
+ 概况
+
+
+
+
+
![]()
+
+ {{ item.name }}
+ {{ item.num }}
+ 台
+
+
+
+
+
{{ item.name }}
+
+ {{ item.num }}
+ {{ item.unit }}
+
+
+
+
+
+ 用电情况
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ {{item.name}}
+ {{item.value}}{{item.unit}}
+
+
+
+
+
+
+
+ 故障报警
+
+
+
+ {{s.name}}
+ 时间:{{s.date}}
+
+
+
+
+
+
+ 开机策略
+
+
+
+
+ 维护提醒
+
+
+
+
+
-
\ No newline at end of file
diff --git a/src/views/carbonEmission/index.vue b/src/views/carbonEmission/index.vue
index d0a28dd..035d108 100644
--- a/src/views/carbonEmission/index.vue
+++ b/src/views/carbonEmission/index.vue
@@ -3,7 +3,7 @@
-
+
碳排放
diff --git a/src/views/drainage/index.vue b/src/views/drainage/index.vue
index 31c2d72..a3d35a2 100644
--- a/src/views/drainage/index.vue
+++ b/src/views/drainage/index.vue
@@ -1,13 +1,291 @@
-
- 排水
-
+
-
\ No newline at end of file
diff --git a/src/views/energyEfficiency/index.vue b/src/views/energyEfficiency/index.vue
index 1250668..2e9009a 100644
--- a/src/views/energyEfficiency/index.vue
+++ b/src/views/energyEfficiency/index.vue
@@ -19,51 +19,51 @@ const systemRightList = ref([
{
name: '今日',
value: '3122',
- unit:'kWh'
+ unit: 'kWh'
},
{
name: '昨日',
value: '9400',
- unit:'kWh'
+ unit: 'kWh'
},
{
- name:'同比',
- value:'-201',
- unit:'%'
+ name: '同比',
+ value: '-201',
+ unit: '%'
}
],//日
[
{
name: '本月',
value: '3122',
- unit:'kWh'
+ unit: 'kWh'
},
{
name: '上月',
value: '9400',
- unit:'kWh'
+ unit: 'kWh'
},
{
- name:'同比',
- value:'-201',
- unit:'%'
+ name: '同比',
+ value: '-201',
+ unit: '%'
}
],//月
[
{
name: '今年',
value: '3122',
- unit:'kWh'
+ unit: 'kWh'
},
{
name: '去年',
value: '9400',
- unit:'kWh'
+ unit: 'kWh'
},
{
- name:'同比',
- value:'-201',
- unit:'%'
+ name: '同比',
+ value: '-201',
+ unit: '%'
}
]//年
])
@@ -359,14 +359,18 @@ const drawEnergyFlow = () => {
let option = {
series: [
{
+ // select:{
+ // disabled:true
+ // },
type: "sankey",
layout: "none",
top: "5%",
bottom: "4%",
left: "6%",
right: "5%",
- nodeWidth: '13',
- // nodeAlign:'right',
+ nodeWidth: '12',
+
+ nodeAlign:'right',
focusNodeAdjacency: "allEdges",
data: itemStyleSource,
links: [
@@ -393,7 +397,7 @@ const drawEnergyFlow = () => {
fontSize: 14,
formatter: function (params) {
- if (params.dataIndex == 0) {
+ if (params.dataIndex === 0) {
return (
"{a|" +
params.data.name +
@@ -450,6 +454,166 @@ const drawEnergyFlow = () => {
};
myChart.setOption(option)
}
+
+// 电费电价
+const drawElectricityPrice = () => {
+ let myChart = echarts.init(document.getElementById('electricity-price'))
+ let option = {
+ tooltip: {
+ trigger: 'axis',
+ backgroundColor: "rgba(1, 13, 19, 0.5)",
+ borderWidth: 0,
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
+ type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
+ },
+ textStyle: {
+ color: "rgba(212, 232, 254, 1)",
+ // fontSize: fontChart(0.24),
+ },
+ confine: true
+ },
+ legend: {
+ show: true,
+ data:['电费','销售电价'],
+ selected:{
+ '电费': true,
+ '销售电价': true,
+ },
+ icon: 'rect',
+ itemGap:14,
+ top:"8",
+ layout: 'vertical',
+ itemHeight: '10',
+ // itemWidth:'10',
+ textStyle: {
+ color: "rgba(221, 255, 253, 1)"
+ }
+ },
+ grid: {
+ top: "20%",
+ left: "4%",
+ right: "4%",
+ bottom: "4%",
+ containLabel: true,
+ },
+
+ xAxis: {
+ type: 'category',
+ data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: '#557775'
+ }
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLabel: {
+ // interval: 0,
+ // rotate: 40,
+
+ show: true,
+ textStyle: {
+ fontFamily: 'Microsoft YaHei',
+ color: "#DDFFFD",
+ }
+ },
+ },
+
+ yAxis: [{
+ name: '单位:kWh',
+ nameTextStyle: {
+ color: "rgba(221, 255, 253, 1)",
+ padding: [0, 0, 0, 10]
+ },
+ // 表现为上下位置
+ type: 'value',
+ max: '50',
+ splitNumber: 5,
+ axisLine: {
+ show: false,
+ lineStyle: {
+ color: '#666666',
+ }
+ },
+ splitLine: {
+ show: false
+ },
+ axisLabel: {
+ textStyle: {
+ fontFamily: 'Microsoft YaHei',
+ color: "#DDFFFD",
+ fontSize: 12
+ }
+ }
+ },
+ {
+ // splitNumber:
+ name: '单位:元/kWh',
+ position: 'right', // 放在右边
+ nameTextStyle: {
+ padding: [0, 15, 0, 0],
+ color: 'rgba(221, 255, 253, 1)'
+ },
+ axisLabel: {
+ show: true,
+ // fontSize: 18,
+ color: 'rgba(221, 255, 253, 1)',
+ formatter: function (value) {
+ // 在标签后面添加百分号
+ return value.toFixed(1);
+ },
+ },
+ axisLine: {
+ show: false,
+ },
+ axisTick: {
+ show: false,
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ type: "dashed",
+ color: "rgba(1, 39, 37, 0.30)",
+
+ // color: '#eff6ff'
+ }
+ },
+ },
+ ],
+ series: [{
+ name: '电费',
+ type: 'bar',
+ barWidth: '15',
+ itemStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ offset: 0,
+ color: 'rgba(82, 217, 208, 1)'
+ }, {
+ offset: 1,
+ color: 'rgba(82, 217, 208, 0)'
+ }]),
+
+ },
+ },
+ data: [40, 35, 15, 10, 19, 24, 14]
+ },
+ {
+ name: '销售电价',
+ type: 'line',
+ yAxisIndex: 1, // 与第二个 y 轴关联
+ itemStyle: {
+ color: 'rgba(1, 246, 139, 1)', // 设置折线颜色为黄色
+ },
+ symbol:"none",
+ data: [0.1, 0.2, 0.6, 1, 0.4, 0.8, 0.9], // 折线图的数据
+ },
+ ]
+ };
+ myChart.setOption(option)
+}
// dom加载
onMounted(() => {
// 能耗总量
@@ -458,6 +622,8 @@ onMounted(() => {
drawManagement()
// 能效流向
drawEnergyFlow()
+// 电费电价
+ drawElectricityPrice()
})
@@ -510,12 +676,13 @@ onMounted(() => {
-
-
- - {{s.name}}
+
+
- {{v.value}} {{v.unit}}
+ {{ v.value }} {{ v.unit }}
@@ -538,7 +705,7 @@ onMounted(() => {
电费电价
-
+
@@ -609,19 +776,21 @@ onMounted(() => {
display: flex;
flex-wrap: wrap;
align-content: space-evenly;
+
&-item {
height: 30%;
//background-color: #000;
width: 100%;
- &-title{
+ &-title {
display: flex;
justify-content: space-between;
font-size: .8rem;
padding: 0 .5rem;
box-sizing: border-box;
}
- &-box{
+
+ &-box {
display: flex;
justify-content: space-between;
align-items: center;
@@ -632,9 +801,10 @@ onMounted(() => {
background-size: 100% 100%;
height: 65%;
width: 100%;
- color: rgba(255,255,255,1);
- .yoy{
- color:rgba(1, 246, 139, 1);
+ color: rgba(255, 255, 255, 1);
+
+ .yoy {
+ color: rgba(1, 246, 139, 1);
}
}
diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue
index 1347456..18dfb6f 100644
--- a/src/views/overview/index.vue
+++ b/src/views/overview/index.vue
@@ -2,24 +2,26 @@
import calendar from '@/components/calendar/index.vue'
import * as echarts from 'echarts'
import {onMounted,ref} from "vue";
+
+import getPath from "@/utils/getPath.js";
// 实时负荷
const realTimeLoad = ref([
- {pic:"../../assets/images/overview/room-num.png",name:'配电室数量',value:8,unit:'个'},
- {pic:"../../assets/images/overview/WL.png",name:'实时负荷',value:1465.2,unit:'kW'}, //负荷
- {pic:"../../assets/images/overview/E.png",name:'今日电量',value:146,unit:'kW/h'}, //电量
+ {pic:getPath.roomnum,name:'配电室数量',value:8,unit:'个'},
+ {pic:getPath.WL,name:'实时负荷',value:1465.2,unit:'kW'}, //负荷
+ {pic:getPath.E,name:'今日电量',value:146,unit:'kW/h'}, //电量
])
// 气象站
const weatherStation = ref([
- {pic:"../../assets/images/overview/rain.png",name:'雨量',value:100,unit:'mm'},
- {pic:"../../assets/images/overview/rain-snow.png",name:'雨雪',value:'实际取值',unit:'kW'},
- {pic:"../../assets/images/overview/wind.png",name:'风向',value:'东南风'},
- {pic:"../../assets/images/overview/illuminance.png",name:'光照度',value:101,unit:'lux'},
- {pic:"../../assets/images/overview/wind-speed.png",name:'风速',value:'东南风3级'},
- {pic:"../../assets/images/overview/air.png",name:'今日电量',value:'优'},
+ {pic:getPath.rain,name:'雨量',value:100,unit:'mm'},
+ {pic:getPath.rainsnow,name:'雨雪',value:'实际取值',unit:'kW'},
+ {pic:getPath.wind,name:'风向',value:'东南风'},
+ {pic:getPath.illuminance,name:'光照度',value:101,unit:'lux'},
+ {pic:getPath.windspeed,name:'风速',value:'东南风3级'},
+ {pic:getPath.air,name:'今日电量',value:'优'},
])
-const getImageUrl=(name)=>{
- return `url(${new URL(name, import.meta.url).href})`
-}
+// const getImageUrl=(name)=>{
+// return `url(${new URL(name, import.meta.url).href})`
+// }
onMounted(()=>{
// 用电量
drawPowerEcharts()
@@ -584,7 +586,7 @@ function getCarbonEmission() {