dedsudiyu hai 2 semanas
pai
achega
54066270e5

+ 20 - 0
src/views/components/center-bottom-left.vue

@@ -164,6 +164,8 @@
           },
           yAxis: {
             name: '',
+            min:0,
+            minInterval:1,
             splitLine: {
               lineStyle: {
                 width: 1,
@@ -196,6 +198,12 @@
                 borderWidth: 5,
                 borderColor: '#FF8400',
               },
+              label: {
+                show: true,
+                position: 'top',
+                color: '#fff',
+                fontSize: 22,
+              },
               lineStyle: {
                 width: 3,
                 shadowColor: '#FF8400',//设置折线阴影
@@ -218,6 +226,12 @@
                 borderWidth: 5,
                 borderColor: '#00FFFF',
               },
+              label: {
+                show: true,
+                position: 'top',
+                color: '#fff',
+                fontSize: 22,
+              },
               lineStyle: {
                 width: 3,
                 shadowColor: '#00FFFF',//设置折线阴影
@@ -240,6 +254,12 @@
                 borderWidth: 5,
                 borderColor: '#0576FF',
               },
+              label: {
+                show: true,
+                position: 'top',
+                color: '#fff',
+                fontSize: 22,
+              },
               lineStyle: {
                 width: 3,
                 shadowColor: '#0576FF',//设置折线阴影

+ 4 - 0
src/views/components/center-center.vue

@@ -117,6 +117,8 @@
           yAxis: [
             {
               type: 'value',
+              min:0,
+              minInterval:1,
               name: '',
               axisLabel: {
                 show: true,
@@ -140,6 +142,8 @@
             },
             {
               type: 'value',
+              min:0,
+              minInterval:1,
               name: '',
               axisLabel: {
                 show: true,

+ 3 - 2
src/views/components/left-bottom.vue

@@ -4,7 +4,7 @@
     <div class="left-bottom-page">
       <div class="position-num-box">
         <p>总计</p>
-        <p>{{total}}</p>
+        <p>{{totalProjects}}</p>
       </div>
       <div id="left-bottom-eCharts-top"></div>
       <div id="left-bottom-eCharts-bottom"></div>
@@ -28,7 +28,7 @@
         },
         //饼图数据
         pieData: [],
-        total:0,
+        totalProjects:0,
         //柱状图数据
         barMaxList:[],
         barList:[],
@@ -70,6 +70,7 @@
             });
           }
           this.$set(this,'pieData',pieData);
+          this.$set(this,'totalProjects',res.data.totalProjects);
           //柱状图
           this.$set(this,'eChartsCarouselIndex',0);
           const getFirstSix = (str) => str.slice(0, 6);

+ 2 - 4
src/views/components/left-top.vue

@@ -347,13 +347,11 @@
         let data = [
           {
             name: "研究生",
-            // value: this.newData.student.graduate,
-            value: 88,
+            value: this.newData.student.graduate,
           },
           {
             name: "本科生",
-            // value: this.newData.student.undergraduate,
-            value: 5,
+            value: this.newData.student.undergraduate,
           },
         ];
         let xAxisData = [];

+ 143 - 106
src/views/components/right.vue

@@ -4,7 +4,7 @@
     <div class="right-page">
       <div class="right-page-top-max-big-box">
         <div class="right-page-title-box">
-          <p>{{newData.buildName}}{{newData.floorName}}</p>
+          <p>{{newData.buildName}}{{newData.floorName}}{{newData.roomName}}</p>
           <p>使用人:{{newData.userName}} {{newData.deptName}}</p>
         </div>
         <div class="right-page-top-flex-box">
@@ -63,6 +63,7 @@
           subId: '',
           deptName: '',
           buildName: '',
+          roomName:'',
           subName: '',
           temperature: {
             min: 0,
@@ -264,6 +265,40 @@
         )
       },
       eCharts1(Data, Time, BzData) {
+        let colorA = this.$echarts.graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [{
+            offset: 0,
+            color: 'rgba(255,86,86,0.6)'
+          },
+            {
+              offset: 1,
+              color: 'rgba(255,86,86,.1)'
+            }
+          ],
+          false
+        );
+        colorA = JSON.parse(JSON.stringify(colorA))
+        let colorB = this.$echarts.graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [{
+            offset: 0,
+            color: 'rgba(255,86,86,0)'
+          },
+            {
+              offset: 1,
+              color: 'rgba(255,86,86,.1)'
+            }
+          ],
+          false
+        )
+        colorB = JSON.parse(JSON.stringify(colorB))
         let option = {
           tooltip: {
             show: false,
@@ -318,6 +353,8 @@
           },
           yAxis: {
             name: '',
+            min:0,
+            minInterval:1,
             nameTextStyle: {
               color: '#fff',
               padding: [0, 0, 6, 0]
@@ -344,7 +381,7 @@
           },
           grid: {
             left: '3%',
-            top: '30%',
+            top: '35%',
             right: '3%',
             bottom: '5%',
             containLabel: true
@@ -366,26 +403,17 @@
                 borderColor: 'rgba(255,86,86,1)',
                 color: 'rgba(255,86,86,1)'
               },
+              label: {
+                show: true,
+                position: 'top',
+                color: '#fff',
+                fontSize: 22,
+              },
               areaStyle: {
                 color: 'rgba(255,86,86,1)',
                 normal: {
                   //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);
-                  color: this.$echarts.graphic.LinearGradient(
-                    0,
-                    0,
-                    0,
-                    1,
-                    [{
-                      offset: 0,
-                      color: 'rgba(255,86,86,0.6)'
-                    },
-                      {
-                        offset: 1,
-                        color: 'rgba(255,86,86,.1)'
-                      }
-                    ],
-                    false
-                  )
+                  color: colorA
                 }
               }
             },
@@ -398,7 +426,7 @@
               symbolSize: 0,//不需要点就设置0
               lineStyle: {
                 width: 2,
-                type: 'solid'
+                type: 'dashed'
               },
               itemStyle: {
                 borderWidth: 5,
@@ -409,22 +437,7 @@
                 color: 'rgba(255,86,86,1)',
                 normal: {
                   //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);
-                  color: this.$echarts.graphic.LinearGradient(
-                    0,
-                    0,
-                    0,
-                    1,
-                    [{
-                      offset: 0,
-                      color: 'rgba(255,86,86,0.6)'
-                    },
-                      {
-                        offset: 1,
-                        color: 'rgba(255,86,86,.1)'
-                      }
-                    ],
-                    false
-                  )
+                  color: colorB
                 }
               }
             }
@@ -438,6 +451,40 @@
         this.eChartsData1.setOption(option)
       },
       eCharts2(Data, Time, BzData) {
+        let colorA = this.$echarts.graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [{
+            offset: 0,
+            color: 'rgba(1,131,250,0.6)'
+          },
+            {
+              offset: 1,
+              color: 'rgba(1,131,250,0)'
+            }
+          ],
+          false
+        );
+        colorA = JSON.parse(JSON.stringify(colorA))
+        let colorB = this.$echarts.graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [{
+            offset: 0,
+            color: 'rgba(1,131,250,0)'
+          },
+            {
+              offset: 1,
+              color: 'rgba(1,131,250,0)'
+            }
+          ],
+          false
+        )
+        colorB = JSON.parse(JSON.stringify(colorB))
         let option = {
           tooltip: {
             show: false,
@@ -492,6 +539,8 @@
           },
           yAxis: {
             name: '',
+            min:0,
+            minInterval:1,
             nameTextStyle: {
               color: '#fff',
               padding: [0, 0, 6, 0]
@@ -518,7 +567,7 @@
           },
           grid: {
             left: '3%',
-            top: '30%',
+            top: '35%',
             right: '3%',
             bottom: '5%',
             containLabel: true
@@ -540,26 +589,17 @@
                 borderColor: 'rgba(1,131,250,1)',
                 color: 'rgba(1,131,250,1)'
               },
+              label: {
+                show: true,
+                position: 'top',
+                color: '#fff',
+                fontSize: 22,
+              },
               areaStyle: {
                 color: 'rgba(1,131,250,1)',
                 normal: {
                   //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);
-                  color: this.$echarts.graphic.LinearGradient(
-                    0,
-                    0,
-                    0,
-                    1,
-                    [{
-                      offset: 0,
-                      color: 'rgba(1,131,250,0.6)'
-                    },
-                      {
-                        offset: 1,
-                        color: 'rgba(1,131,250,0)'
-                      }
-                    ],
-                    false
-                  )
+                  color: colorA
                 }
               }
             },
@@ -572,7 +612,7 @@
               symbolSize: 0,//不需要点就设置0
               lineStyle: {
                 width: 2,
-                type: 'solid'
+                type: 'dashed'
               },
               itemStyle: {
                 borderWidth: 5,
@@ -583,22 +623,7 @@
                 color: 'rgba(1,131,250,1)',
                 normal: {
                   //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);
-                  color: this.$echarts.graphic.LinearGradient(
-                    0,
-                    0,
-                    0,
-                    1,
-                    [{
-                      offset: 0,
-                      color: 'rgba(1,131,250,0.6)'
-                    },
-                      {
-                        offset: 1,
-                        color: 'rgba(1,131,250,0)'
-                      }
-                    ],
-                    false
-                  )
+                  color: colorB
                 }
               }
             }
@@ -612,6 +637,40 @@
         this.eChartsData2.setOption(option)
       },
       eCharts3(Data, Time, BzData) {
+        let colorA = this.$echarts.graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [{
+            offset: 0,
+            color: 'rgba(255,132,0,0.6)'
+          },
+            {
+              offset: 1,
+              color: 'rgba(255,132,0,0)'
+            }
+          ],
+          false
+        );
+        colorA = JSON.parse(JSON.stringify(colorA))
+        let colorB = this.$echarts.graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [{
+            offset: 0,
+            color: 'rgba(255,132,0,0)'
+          },
+            {
+              offset: 1,
+              color: 'rgba(255,132,0,0)'
+            }
+          ],
+          false
+        )
+        colorB = JSON.parse(JSON.stringify(colorB))
         let option = {
           tooltip: {
             show: false,
@@ -621,13 +680,13 @@
             itemWidth: 60,
             itemHeight: 30,
             itemGap: 20,
-            right: '35%',
+            right: '29%',
             top: '10%',
             textStyle: {
               fontSize: 30,
               color: '#fff'
             },
-            data: [' 用电功率(w)'],
+            data: [' 24h用电功率(w)'],
             selectedMode: false
           },
           xAxis: {
@@ -666,6 +725,8 @@
           },
           yAxis: {
             name: '',
+            min:0,
+            minInterval:1,
             nameTextStyle: {
               color: '#fff',
               padding: [0, 0, 6, 0]
@@ -692,7 +753,7 @@
           },
           grid: {
             left: '3%',
-            top: '30%',
+            top: '35%',
             right: '3%',
             bottom: '5%',
             containLabel: true
@@ -700,7 +761,7 @@
           series: [
             {
               data: Data,
-              name: ' 用电功率(w)',
+              name: ' 24h用电功率(w)',
               type: 'line',
               symbol: 'circle',
               smooth: true,
@@ -714,26 +775,17 @@
                 borderColor: 'rgba(255,132,0,1)',
                 color: 'rgba(255,132,0,1)'
               },
+              label: {
+                show: true,
+                position: 'top',
+                color: '#fff',
+                fontSize: 22,
+              },
               areaStyle: {
                 color: 'rgba(255,132,0,1)',
                 normal: {
                   //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);
-                  color: this.$echarts.graphic.LinearGradient(
-                    0,
-                    0,
-                    0,
-                    1,
-                    [{
-                      offset: 0,
-                      color: 'rgba(255,132,0,0.6)'
-                    },
-                      {
-                        offset: 1,
-                        color: 'rgba(255,132,0,0)'
-                      }
-                    ],
-                    false
-                  )
+                  color: colorA
                 }
               }
             },
@@ -746,7 +798,7 @@
               symbolSize: 0,//不需要点就设置0
               lineStyle: {
                 width: 2,
-                type: 'solid'
+                type: 'dashed'
               },
               itemStyle: {
                 borderWidth: 5,
@@ -757,22 +809,7 @@
                 color: 'rgba(255,132,0,1)',
                 normal: {
                   //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);
-                  color: this.$echarts.graphic.LinearGradient(
-                    0,
-                    0,
-                    0,
-                    1,
-                    [{
-                      offset: 0,
-                      color: 'rgba(255,132,0,0.6)'
-                    },
-                      {
-                        offset: 1,
-                        color: 'rgba(255,132,0,0)'
-                      }
-                    ],
-                    false
-                  )
+                  color: colorB
                 }
               }
             }