Browse Source

3.15大屏表数据修改

username 3 năm trước cách đây
mục cha
commit
58794d98b4

+ 11 - 0
master/src/main/java/com/ruoyi/project/aspen/controller/TDashboarddayelecController.java

@@ -135,4 +135,15 @@ public class TDashboarddayelecController extends BaseController
         List<TDashboarddayelec> tDashboarddayelecs = tDashboarddayelecService.selectWeek(tDashboarddayelec);
         return AjaxResult.success(tDashboarddayelecs);
     }
+
+    /**
+     * 查询最近49天DASHBOARD每日抓取数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('aspen:dashboardday:list')")
+    @GetMapping("/fiftyday")
+    public AjaxResult selecctfiftyday(TDashboarddayelec tDashboarddayelec)
+    {
+        List<TDashboarddayelec> selecctfiftyday = tDashboarddayelecService.selecctfiftyday(tDashboarddayelec);
+        return AjaxResult.success(selecctfiftyday);
+    }
 }

+ 7 - 0
master/src/main/java/com/ruoyi/project/aspen/mapper/TDashboarddayelecMapper.java

@@ -82,4 +82,11 @@ public interface TDashboarddayelecMapper
      */
     public List<TDashboarddayelec> selectWeek(TDashboarddayelec tDashboarddayelec);
 
+    /**
+     * 查询最近49天dashboardelec抓取数据
+     *
+     * @return dashboardelec抓取数据
+     */
+    public List<TDashboarddayelec> selecctfiftyday(TDashboarddayelec tDashboarddayelec);
+
 }

+ 7 - 0
master/src/main/java/com/ruoyi/project/aspen/service/ITDashboarddayelecService.java

@@ -81,4 +81,11 @@ public interface ITDashboarddayelecService
      * @return dashboardelec抓取数据
      */
     public List<TDashboarddayelec> selectWeek(TDashboarddayelec tDashboarddayelec);
+
+    /**
+     * 查询最近49天dashboardelec抓取数据
+     *
+     * @return dashboardelec抓取数据
+     */
+    public List<TDashboarddayelec> selecctfiftyday(TDashboarddayelec tDashboarddayelec);
 }

+ 7 - 0
master/src/main/java/com/ruoyi/project/aspen/service/impl/TDashboarddayelecServiceImpl.java

@@ -102,4 +102,11 @@ public class TDashboarddayelecServiceImpl implements ITDashboarddayelecService {
     public List<TDashboarddayelec> selectWeek(TDashboarddayelec tDashboarddayelec) {
         return tDashboarddayelecMapper.selectWeek(tDashboarddayelec);
     }
+
+    @Override
+    public List<TDashboarddayelec> selecctfiftyday(TDashboarddayelec tDashboarddayelec) {
+        return tDashboarddayelecMapper.selecctfiftyday(tDashboarddayelec);
+    }
+
+
 }

+ 4 - 0
master/src/main/resources/mybatis/aspen/TDashboarddayelecMapper.xml

@@ -264,5 +264,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectWeek" parameterType="TDashboarddayelec" resultMap="TDashboarddayelecResult">
         select * from ( select * from t_dashboarddayelec where del_flag = 0 order by id asc ) WHERE 8 > ROWNUM
     </select>
+
+    <select id="selecctfiftyday" parameterType="TDashboarddayelec" resultMap="TDashboarddayelecResult">
+        select * from ( select * from t_dashboarddayelec where del_flag = 0 order by id asc ) WHERE 50 > ROWNUM
+    </select>
     
 </mapper>

+ 9 - 0
ui/src/api/aspen/dashboarddayelec.js

@@ -78,3 +78,12 @@ export function selectWeek(query) {
     params: query
   })
 }
+
+// 查询49天dashboarddayelec抓取数据
+export function selecctfiftyday(query) {
+  return request({
+    url: '/aspen/dashboarddayelec/fiftyday',
+    method: 'get',
+    params: query
+  })
+}

+ 2 - 1
ui/src/views/monitor/elec/bottomLeft.vue

@@ -10,7 +10,7 @@
         </div>
       </div>
       <div>
-        <bottomLeftChart />
+        <bottomLeftChart :monthData="monthData"/>
       </div>
     </div>
   </div>
@@ -19,6 +19,7 @@
 <script>
 import bottomLeftChart from "./echart/bottom/bottomLeftChart";
 export default {
+  props:['monthData'],
   data() {
     return {};
   },

+ 35 - 19
ui/src/views/monitor/elec/centerRight1.vue

@@ -29,6 +29,7 @@
 
 <script>
 export default {
+  props:['fiftydayData'],
   data() {
     return {
     };
@@ -37,19 +38,27 @@ export default {
   mounted() {
     this.initBycChart();
     this.initBocChart();
+    console.log('我是49天数据',this.fiftydayData)
   },
   methods: {
     initBycChart() {
-      const data = [["2000-06-05", 116], ["2000-06-06", 129], ["2000-06-07", 135], ["2000-06-08", 86], ["2000-06-09", 73], ["2000-06-10", 85], ["2000-06-11", 73], ["2000-06-12", 68], ["2000-06-13", 92], ["2000-06-14", 130], ["2000-06-15", 245], ["2000-06-16", 139], ["2000-06-17", 115], ["2000-06-18", 111], ["2000-06-19", 309], ["2000-06-20", 206], ["2000-06-21", 137], ["2000-06-22", 128], ["2000-06-23", 85], ["2000-06-24", 94], ["2000-06-25", 71], ["2000-06-26", 106], ["2000-06-27", 84], ["2000-06-28", 93], ["2000-06-29", 85], ["2000-06-30", 73], ["2000-07-01", 83], ["2000-07-02", 125], ["2000-07-03", 107], ["2000-07-04", 82], ["2000-07-05", 44], ["2000-07-06", 72], ["2000-07-07", 106], ["2000-07-08", 107], ["2000-07-09", 66], ["2000-07-10", 91], ["2000-07-11", 92], ["2000-07-12", 113], ["2000-07-13", 107], ["2000-07-14", 131], ["2000-07-15", 111], ["2000-07-16", 64], ["2000-07-17", 69], ["2000-07-18", 88], ["2000-07-19", 77], ["2000-07-20", 83], ["2000-07-21", 111], ["2000-07-22", 57], ["2000-07-23", 55], ["2000-07-24", 60]];
-      const dateList = data.map(function (item) {
-        return item[0];
-      });
-      const valueList = data.map(function (item) {
-        return item[1];
-      });
+      // const data = [["2000-06-05", 116], ["2000-06-06", 129], ["2000-06-07", 135], ["2000-06-08", 86], ["2000-06-09", 73], ["2000-06-10", 85], ["2000-06-11", 73], ["2000-06-12", 68], ["2000-06-13", 92], ["2000-06-14", 130], ["2000-06-15", 245], ["2000-06-16", 139], ["2000-06-17", 115], ["2000-06-18", 111], ["2000-06-19", 309], ["2000-06-20", 206], ["2000-06-21", 137], ["2000-06-22", 128], ["2000-06-23", 85], ["2000-06-24", 94], ["2000-06-25", 71], ["2000-06-26", 106], ["2000-06-27", 84], ["2000-06-28", 93], ["2000-06-29", 85], ["2000-06-30", 73], ["2000-07-01", 83], ["2000-07-02", 125], ["2000-07-03", 107], ["2000-07-04", 82], ["2000-07-05", 44], ["2000-07-06", 72], ["2000-07-07", 106], ["2000-07-08", 107], ["2000-07-09", 66], ["2000-07-10", 91], ["2000-07-11", 92], ["2000-07-12", 113], ["2000-07-13", 107], ["2000-07-14", 131], ["2000-07-15", 111], ["2000-07-16", 64], ["2000-07-17", 69], ["2000-07-18", 88], ["2000-07-19", 77], ["2000-07-20", 83], ["2000-07-21", 111], ["2000-07-22", 57], ["2000-07-23", 55], ["2000-07-24", 60]];
+      // const dateList = data.map(function (item) {
+      //   return item[0];
+      // });
+      // const valueList = data.map(function (item) {
+      //   return item[1];
+      // });
 
       // 基于准备好的dom,初始化echarts实例
-      this.chart = this.echarts.init(document.getElementById('BYCChart'))
+      this.chart = this.echarts.init(document.getElementById('BYCChart'));
+
+      const dateNum = [];
+      const dateDay=[];
+      for (let i = 0; i < this.fiftydayData.length; i++) {
+        dateDay[i]=  this.fiftydayData[i].dataDate;
+        dateNum[i] = this.fiftydayData[i].bycElec;
+      }
 
       this.chart.setOption({
         /* 周围边距 */
@@ -74,7 +83,7 @@ export default {
         },
         xAxis: [
           {
-            data: dateList
+            data: dateDay
           },
         ],
         yAxis: [
@@ -84,19 +93,26 @@ export default {
           {
             type: 'line',
             showSymbol: false,
-            data: valueList
+            data: dateNum
           },
         ]
       })
     },
     initBocChart() {
-      const data = [["2000-06-05", 116], ["2000-06-06", 129], ["2000-06-07", 135], ["2000-06-08", 86], ["2000-06-09", 73], ["2000-06-10", 85], ["2000-06-11", 73], ["2000-06-12", 68], ["2000-06-13", 92], ["2000-06-14", 130], ["2000-06-15", 245], ["2000-06-16", 139], ["2000-06-17", 115], ["2000-06-18", 111], ["2000-06-19", 309], ["2000-06-20", 206], ["2000-06-21", 137], ["2000-06-22", 128], ["2000-06-23", 85], ["2000-06-24", 94], ["2000-06-25", 71], ["2000-06-26", 106], ["2000-06-27", 84], ["2000-06-28", 93], ["2000-06-29", 85], ["2000-06-30", 73], ["2000-07-01", 83], ["2000-07-02", 125], ["2000-07-03", 107], ["2000-07-04", 82], ["2000-07-05", 44], ["2000-07-06", 72], ["2000-07-07", 106], ["2000-07-08", 107], ["2000-07-09", 66], ["2000-07-10", 91], ["2000-07-11", 92], ["2000-07-12", 113], ["2000-07-13", 107], ["2000-07-14", 131], ["2000-07-15", 111], ["2000-07-16", 64], ["2000-07-17", 69], ["2000-07-18", 88], ["2000-07-19", 77], ["2000-07-20", 83], ["2000-07-21", 111], ["2000-07-22", 57], ["2000-07-23", 55], ["2000-07-24", 60]];
-      const dateList = data.map(function (item) {
-        return item[0];
-      });
-      const valueList = data.map(function (item) {
-        return item[1];
-      });
+      // const data = [["2000-06-05", 116], ["2000-06-06", 129], ["2000-06-07", 135], ["2000-06-08", 86], ["2000-06-09", 73], ["2000-06-10", 85], ["2000-06-11", 73], ["2000-06-12", 68], ["2000-06-13", 92], ["2000-06-14", 130], ["2000-06-15", 245], ["2000-06-16", 139], ["2000-06-17", 115], ["2000-06-18", 111], ["2000-06-19", 309], ["2000-06-20", 206], ["2000-06-21", 137], ["2000-06-22", 128], ["2000-06-23", 85], ["2000-06-24", 94], ["2000-06-25", 71], ["2000-06-26", 106], ["2000-06-27", 84], ["2000-06-28", 93], ["2000-06-29", 85], ["2000-06-30", 73], ["2000-07-01", 83], ["2000-07-02", 125], ["2000-07-03", 107], ["2000-07-04", 82], ["2000-07-05", 44], ["2000-07-06", 72], ["2000-07-07", 106], ["2000-07-08", 107], ["2000-07-09", 66], ["2000-07-10", 91], ["2000-07-11", 92], ["2000-07-12", 113], ["2000-07-13", 107], ["2000-07-14", 131], ["2000-07-15", 111], ["2000-07-16", 64], ["2000-07-17", 69], ["2000-07-18", 88], ["2000-07-19", 77], ["2000-07-20", 83], ["2000-07-21", 111], ["2000-07-22", 57], ["2000-07-23", 55], ["2000-07-24", 60]];
+      // const dateList = data.map(function (item) {
+      //   return item[0];
+      // });
+      // const valueList = data.map(function (item) {
+      //   return item[1];
+      // });
+
+      const dateNum = [];
+      const dateDay=[];
+      for (let i = 0; i < this.fiftydayData.length; i++) {
+        dateDay[i]=  this.fiftydayData[i].dataDate;
+        dateNum[i] = this.fiftydayData[i].bocElec;
+      }
 
       // 基于准备好的dom,初始化echarts实例
       this.chart = this.echarts.init(document.getElementById('BOCChart'))
@@ -124,7 +140,7 @@ export default {
         },
         xAxis: [
           {
-            data: dateList
+            data: dateDay
           },
         ],
         yAxis: [
@@ -134,7 +150,7 @@ export default {
           {
             type: 'line',
             showSymbol: false,
-            data: valueList
+            data: dateNum
           },
         ]
       })

+ 54 - 40
ui/src/views/monitor/elec/echart/bottom/bottomLeftChart.vue

@@ -7,6 +7,7 @@
 <script>
 import echartMixins from "@/utils/resizeMixins";
 export default {
+  props:['monthData'],
   data() {
     return {
       chart: null
@@ -15,47 +16,60 @@ export default {
   mixins: [echartMixins],
   mounted() {
     this.draw();
+    console.log('我是月数据啦啦啦',this.monthData)
   },
   methods: {
     draw() {
       // 基于准备好的dom,初始化echarts实例
       this.chart = this.echarts.init(document.getElementById("bottomLeftChart"));
       //  ----------------------------------------------------------------
-      let category = [
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01",
-        "2021-01"
-      ];
+      // let category = [
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01",
+      //   "2021-01"
+      // ];
+      let category =[];
+      let HHPData=[];
+      let HPData=[];
+      let LPData=[];
+      let MPData=[];
+      for(let i=0;i<this.monthData.length;i++){
+        category[i]=this.monthData[i].dataDate;
+        HHPData[i]=this.monthData[i].hhp;
+        HPData[i]=this.monthData[i].hp;
+        LPData[i]=this.monthData[i].lp;
+        MPData[i]=this.monthData[i].mp;
+      }
       let lineData = [
         18092,
         20728,
@@ -130,7 +144,7 @@ export default {
       for (let i = 0; i < 33; i++) {
         let rate = barData[i] / lineData[i];
         rateData[i] = rate.toFixed(2);
-      }
+      };
 
       let option = {
         title: {
@@ -233,7 +247,7 @@ export default {
                 ])
               }
             },
-            data: barData
+            data: HHPData
           },
 
           {
@@ -253,7 +267,7 @@ export default {
             },
             z: -12,
 
-            data: lineData
+            data: HPData
           },
 
           {
@@ -274,7 +288,7 @@ export default {
             },
             z: -12,
 
-            data: barData
+            data: LPData
           },
 
           {
@@ -295,7 +309,7 @@ export default {
             },
             z: -12,
 
-            data: lineData
+            data: MPData
           }
         ]
       };

+ 62 - 3
ui/src/views/monitor/elec/elecindex.vue

@@ -78,7 +78,7 @@
           </div>
           <div>
             <dv-border-box-13>
-              <centerRight1 />
+              <centerRight1 :fiftydayData="fiftydayData"/>
             </dv-border-box-13>
           </div>
         </div>
@@ -86,7 +86,7 @@
         <!-- 第四行数据 -->
         <div class="bototm-box">
           <dv-border-box-13>
-            <bottomLeft />
+            <bottomLeft :monthData="monthData"/>
           </dv-border-box-13>
           <div class="bototm-box1">
             <dv-border-box-12>
@@ -157,7 +157,7 @@ import frontElecThree from "@/views/monitor/elec/frontElecThree";
 import '@/assets/styles/index.scss' // global css
 import '@/common/flexible.js';
 import dayjs from "dayjs";
-import {selectLast,selectMonth} from "@/api/aspen/dashboarddayelec";
+import {selectLast,selectMonth,selecctfiftyday} from "@/api/aspen/dashboarddayelec";
 import {selectWeek} from "@/api/aspen/dashboarddayeleceight";
 export default {
   data() {
@@ -272,6 +272,48 @@ export default {
         u2: null,
         dataDate: null,
         dateDay: null
+      },
+      fiftydayData:{
+        pageNum: 1,
+        pageSize: 20,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        gtg1Lv: null,
+        gtg1Wr: null,
+        gtg2Lv: null,
+        gtg2Wr: null,
+        gtg3Lv: null,
+        gtg3Wr: null,
+        stg1Lv: null,
+        stg1Wr: null,
+        mwhLv: null,
+        mwhWr: null,
+        hhp: null,
+        hp: null,
+        lp: null,
+        mp: null,
+        totalConsumption: null,
+        hhpNum: null,
+        hhpTemp: null,
+        hpNum: null,
+        hpTemp: null,
+        lpNum: null,
+        lpTemp: null,
+        mpNum: null,
+        mpTemp: null,
+        shihua: null,
+        shiyou: null,
+        shunshiliang: null,
+        ypg: null,
+        daodianliang: null,
+        eveLec: null,
+        fenggucha: null,
+        bycElec: null,
+        bocElec: null,
+        dataDate: null,
+        dateDay: null
       }
     };
   },
@@ -307,6 +349,7 @@ export default {
     this.getList1();
     this.getMonthList1();
     this.getWeekList();
+    this.getFiftydayList();
     // 每隔30秒请求一次数据
     window.setInterval(() => {
       setTimeout(() => {
@@ -330,6 +373,14 @@ export default {
         this.getWeekList();
       }, 0)
     }, 1000 * 10 * 6 * 60 * 6)
+
+    // 一天请求一次数据
+    window.setInterval(() => {
+      setTimeout(() => {
+        ///调取接口获取数据
+        this.getFiftydayList();
+      }, 0)
+    }, 1000 * 10 * 6 * 60 * 6)
   },
   methods: {
     /** 查询dashboarddayelec抓取数据列表 */
@@ -353,6 +404,14 @@ export default {
         this.weekData = response.data;
       });
     },
+
+    /** 查询dashboarddayelec近49天抓取数据列表 */
+    getFiftydayList()
+    {
+      selecctfiftyday(this.queryParams).then(response => {
+        this.fiftydayData = response.data;
+      });
+    },
     cancelLoading() {
       setTimeout(() => {
         this.loading = false;