diff --git a/src/assets/images/overview/E.png b/src/assets/images/overview/E.png new file mode 100644 index 0000000..5f47868 Binary files /dev/null and b/src/assets/images/overview/E.png differ diff --git a/src/assets/images/overview/WL.png b/src/assets/images/overview/WL.png new file mode 100644 index 0000000..f804bdc Binary files /dev/null and b/src/assets/images/overview/WL.png differ diff --git a/src/assets/images/overview/air.png b/src/assets/images/overview/air.png new file mode 100644 index 0000000..fa21ea2 Binary files /dev/null and b/src/assets/images/overview/air.png differ diff --git a/src/assets/images/overview/illuminance.png b/src/assets/images/overview/illuminance.png new file mode 100644 index 0000000..4a7f905 Binary files /dev/null and b/src/assets/images/overview/illuminance.png differ diff --git a/src/assets/images/overview/rain-snow.png b/src/assets/images/overview/rain-snow.png new file mode 100644 index 0000000..9de9e9e Binary files /dev/null and b/src/assets/images/overview/rain-snow.png differ diff --git a/src/assets/images/overview/rain.png b/src/assets/images/overview/rain.png new file mode 100644 index 0000000..ef853f7 Binary files /dev/null and b/src/assets/images/overview/rain.png differ diff --git a/src/assets/images/overview/room-num.png b/src/assets/images/overview/room-num.png new file mode 100644 index 0000000..0778c9b Binary files /dev/null and b/src/assets/images/overview/room-num.png differ diff --git a/src/assets/images/overview/wind-speed.png b/src/assets/images/overview/wind-speed.png new file mode 100644 index 0000000..981e7d4 Binary files /dev/null and b/src/assets/images/overview/wind-speed.png differ diff --git a/src/assets/images/overview/wind.png b/src/assets/images/overview/wind.png new file mode 100644 index 0000000..b38f67d Binary files /dev/null and b/src/assets/images/overview/wind.png differ diff --git a/src/assets/images/overview/上月.png b/src/assets/images/overview/上月.png new file mode 100644 index 0000000..b61c6b4 Binary files /dev/null and b/src/assets/images/overview/上月.png differ diff --git a/src/assets/images/overview/下月.png b/src/assets/images/overview/下月.png new file mode 100644 index 0000000..998343b Binary files /dev/null and b/src/assets/images/overview/下月.png differ diff --git a/src/assets/images/overview/回到本月.png b/src/assets/images/overview/回到本月.png new file mode 100644 index 0000000..7652dff Binary files /dev/null and b/src/assets/images/overview/回到本月.png differ diff --git a/src/assets/images/overview/本月-未选中.png b/src/assets/images/overview/本月-未选中.png new file mode 100644 index 0000000..5331bc1 Binary files /dev/null and b/src/assets/images/overview/本月-未选中.png differ diff --git a/src/assets/images/overview/本月-选中.png b/src/assets/images/overview/本月-选中.png new file mode 100644 index 0000000..d290915 Binary files /dev/null and b/src/assets/images/overview/本月-选中.png differ diff --git a/src/components/mainHeader/index.vue b/src/components/mainHeader/index.vue index 68cd9ab..249fc39 100644 --- a/src/components/mainHeader/index.vue +++ b/src/components/mainHeader/index.vue @@ -10,6 +10,8 @@ import carbonEmission from '@/views/carbonEmission/index.vue' //碳排放 import screen from '@/views/screen/index.vue' //显示屏 import energyMonitoring from '@/views/energyMonitoring/index.vue' + +// import getImageUrl from '@/utils/getPath.js' const nowDate = ref('') const nowWeek = ref('') const nowMin = ref('') diff --git a/src/style.scss b/src/style.scss index 52fba84..c52fb70 100644 --- a/src/style.scss +++ b/src/style.scss @@ -9,6 +9,7 @@ p,ul,li{ margin: 0; padding: 0; + list-style: none; } .container{ width: 100%; diff --git a/src/utils/getPath.js b/src/utils/getPath.js new file mode 100644 index 0000000..daf7e2d --- /dev/null +++ b/src/utils/getPath.js @@ -0,0 +1,5 @@ +const getImageUrl = (name)=>{ + return `url(${new URL(name, import.meta.url).href})` +} + +export default getImageUrl \ No newline at end of file diff --git a/src/views/energyMonitoring/index.vue b/src/views/energyMonitoring/index.vue index 1c7cac1..5fb2a34 100644 --- a/src/views/energyMonitoring/index.vue +++ b/src/views/energyMonitoring/index.vue @@ -19,15 +19,15 @@
-
+
空调负荷
-
+
展陈负荷
-
+
配电回路排名 @@ -397,12 +397,222 @@ function getDailyElectricityConsumption() { }; myChart.setOption(option); } +//空调负荷 +function drawAirConditioningLoad(){ + let myChart = echarts.init(document.getElementById('airConditioningLoad')) + const option = { + // backgroundColor: "#05224d", + tooltip: {}, + grid: { + top: "18%", + left: "4%", + right: "4%", + bottom: "4%", + containLabel: true, + }, + xAxis: [ + + { + type: "category", + boundaryGap: false, + axisLine: { + //坐标轴轴线相关设置。数学上的x轴 + show: true, + lineStyle: { + // type:'dashed', + color: "#557775" + // color: "#233e64", + }, + }, + axisLabel: { + //坐标轴刻度标签的相关设置 + textStyle: { + color: "#DDFFFD", + margin: 40, + }, + + }, + + axisTick: { show: false }, + boundaryGap: true, + data: ["09:00", "11:00", "13:00", "15:00", "17:00", "19:00"], + }, + ], + yAxis: [ + { + type: "value", + name:"单位:kW", + nameTextStyle:{ + color: "#DDFFFD", + align:"right", + }, + min: 0, + max: 2000, + splitNumber: 5, + splitLine: { + show: true, + lineStyle: { + type:'dashed', + color: "rgba(1, 39, 37, 0.30)", + }, + }, + axisLine: { show: false }, + axisLabel: { + textStyle: { + color: "#DDFFFD", + }, + }, + axisTick: { show: false }, + }, + ], + series: [ + { + name: "异常流量", + type: "line", + smooth: true, //是否平滑曲线显示 + // symbol:'circle', // 默认是空心圆(中间是白色的),改成实心圆 + symbolSize: 0, + + lineStyle: { + color: "#5BFAF1", // 线条颜色 + }, + areaStyle: { + //区域填充样式 + //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。 + color: new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, + [ + { offset: 0, color: "rgba(91, 250, 241, 0.40)" }, + { offset: 1, color: "rgba(91, 250, 241, 0)" }, + ], + false + ), + + shadowColor: "rgba(53,142,215, 0.9)", //阴影颜色 + shadowBlur: 20, //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。 + }, + data: [500, 800, 900,1200, 1800, 1600], + }, + ], + }; + myChart.setOption(option) +} +// 展陈负荷 +function drawExhibitionLoad(){ + let myChart = echarts.init(document.getElementById('exhibitionLoad')) + const option = { + // backgroundColor: "#05224d", + tooltip: {}, + grid: { + top: "18%", + left: "4%", + right: "4%", + bottom: "4%", + containLabel: true, + }, + xAxis: [ + + { + type: "category", + boundaryGap: false, + axisLine: { + //坐标轴轴线相关设置。数学上的x轴 + show: true, + lineStyle: { + // type:'dashed', + color: "#557775", + // color: "#233e64", + }, + }, + axisLabel: { + //坐标轴刻度标签的相关设置 + textStyle: { + color: "#DDFFFD", + margin: 40, + }, + + }, + + axisTick: { show: false }, + boundaryGap: true, + data: ["09:00", "11:00", "13:00", "15:00", "17:00", "19:00"], + }, + ], + yAxis: [ + { + type: "value", + name:"单位:kW", + nameTextStyle:{ + color: "#DDFFFD", + align:"right", + }, + min: 0, + max: 2000, + splitNumber: 5, + splitLine: { + show: true, + lineStyle: { + type:'dashed', + color: "rgba(1, 39, 37, 0.30)", + }, + }, + axisLine: { show: false }, + axisLabel: { + textStyle: { + color: "#DDFFFD", + }, + }, + axisTick: { show: false }, + }, + ], + series: [ + { + name: "异常流量", + type: "line", + smooth: true, //是否平滑曲线显示 + // symbol:'circle', // 默认是空心圆(中间是白色的),改成实心圆 + symbolSize: 0, + + lineStyle: { + color: "rgba(1, 246, 139, 1)", // 线条颜色 + }, + areaStyle: { + //区域填充样式 + //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。 + color: new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, + [ + { offset: 0, color: "rgba(1, 246, 139, 0.7)" }, + { offset: 1, color: "rgba(1, 246, 139, 0)" }, + ], + false + ), + + shadowColor: "rgba(53,142,215, 0.9)", //阴影颜色 + shadowBlur: 20, //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。 + }, + data: [500, 800, 900,1200, 1800, 1600], + }, + ], + }; + myChart.setOption(option) +} //加载完dom执行 onMounted(() => { //实时负荷 getRealTimeLoad(); //当日累计用电量 getDailyElectricityConsumption(); + // 空调负荷 + drawAirConditioningLoad() + // 展陈负荷 + drawExhibitionLoad() }); diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue index a9c31a8..a2cb8b6 100644 --- a/src/views/overview/index.vue +++ b/src/views/overview/index.vue @@ -1,10 +1,32 @@