Преглед изворни кода

驾驶舱模块图表字段修改

yangxiao пре 3 година
родитељ
комит
b2fb48a125
4 измењених фајлова са 280 додато и 7 уклоњено
  1. 5 0
      src/router/index.js
  2. 11 7
      src/views/Home/Home.vue
  3. 12 0
      src/views/layout/Menu.vue
  4. 252 0
      src/views/powerRank/index.vue

+ 5 - 0
src/router/index.js

@@ -214,6 +214,11 @@ const routes = [
     component: () => import('../views/windAnalysis/index.vue'),
   },
   {
+    path: '/powerRank', // 发电效率排行
+    name: 'powerRank',
+    component: () => import('../views/powerRank/index.vue'),
+  },
+  {
     path: '/knowledge',
     name: 'knowledge1',
     component: () => import('../views/Knowledge/Knowledge1.vue'),

+ 11 - 7
src/views/Home/Home.vue

@@ -47,7 +47,7 @@
     <Row type="flex" style="height:calc(40vh - 208px);">
       <Col :span="12">
         <toolbar-panel title="日发电量">
-          <template v-slot:tools>
+          <!-- <template v-slot:tools>
             <div class="tools">
               <div class="tool-block">
                 <div class="legend bg-green"></div>
@@ -62,7 +62,7 @@
                 <div class="legend-text">购网电量(单位:万kWh)</div>
               </div>
             </div>
-          </template>
+          </template> -->
           <template v-slot:default>
             <!-- 日发电量 -->
             <multiple-bar-chart :list="DayPower.value" :units="DayPower.units" height="100%" :showLegend="true" @click="showDoneChart({ data:DayPower, dialogTitle:'日发电量', dialogType: 'doneLineChart' })" />
@@ -71,7 +71,7 @@
       </Col>
       <Col :span="12">
       <toolbar-panel title="72小时功率趋势图">
-        <template v-slot:tools>
+        <!-- <template v-slot:tools>
           <div class="tools">
             <div class="tools">
               <div class="tool-block">
@@ -88,9 +88,9 @@
               </div>
             </div>
           </div>
-        </template>
+        </template> -->
         <template v-slot:default>
-          <multiple-line-chart :list="Powertrend.value" :units="Powertrend.units" height="100%" @click="showPowerChart({ data:Powertrend, dialogTitle:'72小时功率趋势图', dialogType: 'powerLineChart' })" />
+          <multiple-line-chart :list="Powertrend.value" :units="Powertrend.units" :showLegend="true" height="100%" @click="showPowerChart({ data:Powertrend, dialogTitle:'72小时功率趋势图', dialogType: 'powerLineChart' })" />
         </template>
       </toolbar-panel>
       </Col>
@@ -548,10 +548,10 @@ export default {
         success (res) {
           let glvos = [];
 
-          let rdlKey = ["value1", "value2", "value3"];
+          let rdlKey = ["value1", "value2", "value3", "speed"];
           let DayPower = {
             // 图表所用单位
-            units: ["(万kWh)"],
+            units: ["(万kWh)","(m/s)"],
             value: [{
               title: "发电量",
               yAxisIndex: 0,
@@ -564,6 +564,10 @@ export default {
               title: "购网电量",
               yAxisIndex: 0,
               value: []
+            }, {
+              title: "实时风速",
+              yAxisIndex: 1,
+              value: []
             }]
           };
 

+ 12 - 0
src/views/layout/Menu.vue

@@ -239,6 +239,18 @@ export default {
             //   icon: "svg-matrix",
             //   path: "/decision/decision4",
             // },
+            {
+              text: "排行榜",
+              icon: "svg-matrix",
+              path: "/phb",
+              children: [
+                {
+                  text: "发电效率排行",
+                  icon: "svg-wind-site",
+                  path: "/powerRank",
+                }
+              ]
+            }
           ],
         },
         {

+ 252 - 0
src/views/powerRank/index.vue

@@ -0,0 +1,252 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+			<div class="query-items">
+        <div class="query-item">
+					<div class="lable">类型:</div>
+					<div class="search-input">
+						<el-select v-model="typeId" clearable placeholder="请选择"
+							popper-class="select" @change="renderWprray">
+							<el-option v-for="item in typeArray" :key="item.id" :value="item.id" :label="item.name" />
+						</el-select>
+					</div>
+				</div>
+				<div class="query-item">
+					<div class="lable">场站:</div>
+					<div class="search-input">
+						<el-select v-model="wpId" clearable placeholder="请选择"
+							popper-class="select">
+							<el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+						</el-select>
+					</div>
+				</div>
+				<div class="query-item">
+					<div class="lable">开始日期:</div>
+					<div class="search-input">
+						<el-date-picker v-model="beginDate" type="date"
+							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+						</el-date-picker>
+					</div>
+				</div>
+        <div class="query-item">
+					<div class="lable">结束日期:</div>
+					<div class="search-input">
+						<el-date-picker v-model="endDate" type="date"
+							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+						</el-date-picker>
+					</div>
+				</div>
+			</div>
+			<div class="query-actions">
+				<button class="btn green" @click="search()">搜索</button>
+			</div>
+		</div>
+    <div class="df-table">
+      <ComTable height="100vh" :data="tableData"></ComTable>
+    </div>
+    <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true" @closed="dialogType = ''">
+      <ComTable height="100vh" :data="tableHistoryData"></ComTable>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 使用组件
+  components: {
+   ComTable
+  },
+
+  // 数据
+  data() {
+    const that = this;
+    return {
+      isAsc:"asc",
+      typeArray:[{
+        id:"-1",
+        name:"风场"
+      },{
+        id:"-2",
+        name:"光伏电站"
+      }],
+      typeId:"-1",
+      wpArray:[],
+      wpId:"",
+      beginDate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      endDate:new Date().formatDate("yyyy-MM-dd"),
+      dialogShow:false,
+      tableData: {
+        column: [
+          {
+            name: "风场",
+            field: "windturbineid",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "风机",
+            field: "inputsmall",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "起始日期",
+            field: "inputsmallratio",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "截止日期",
+            field: "inputbig",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "平均风速",
+            field: "inputbigratio",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "平均功率",
+            field: "outputsmall",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "平均效率",
+            field: "outputsmallratio",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          }
+        ],
+        data: [],
+      }
+    };
+  },
+
+  // 函数
+  methods: {
+    // 请求服务
+    requestData() {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAllAjax",
+        data:{
+          type:that.typeId
+        },
+        success(res) {
+          that.allWpArray = res.data;
+          that.renderWprray();
+        }
+      });
+    },
+
+    renderWprray(){
+      let wpArray = [];
+      this.allWpArray.forEach(ele=>{
+        if(this.typeId === "-1"){
+          if(ele.id.indexOf("FDC") !== -1){
+            wpArray.push(ele);
+          }
+        }else{
+          if(ele.id.indexOf("GDC") !== -1){
+            wpArray.push(ele);
+          }
+        }
+      });
+      this.wpId = wpArray[0].id;
+      this.wpArray = wpArray;
+      this.getOutputSpeedList();
+    },
+
+    getOutputSpeedList(){
+      let that = this;
+      if(!that.typeId || !that.beginDate || !that.endDate){
+        that.BASE.showMsg({
+          msg:"类型与日期不可为空"
+        });
+      }else{
+        that.API.requestData({
+          method: "POST",
+          subUrl: "leaderboard/loadfactortoplist",
+          data:{
+            wpId:that.wpId,
+            isAsc:that.isAsc,
+            beginDate:that.beginDate,
+            endDate:that.endDate
+          },
+          success(res) {
+            that.tableData.data = res.data;
+          }
+        });
+      }
+      
+    },
+
+    search(){
+      this.getOutputSpeedList(this.wpId);
+    }
+  },
+
+  created() {
+    this.requestData();
+  },
+
+  mounted() {},
+
+  unmounted() {},
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+
+    &:before {
+      content: "";
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>