Browse Source

Merge branch 'sl3' of http://61.161.152.110:10101/r/electronic-map into wsy

wsy 3 years ago
parent
commit
7df9b68c5d

BIN
src/assets/3D.png


+ 3 - 3
src/components/chart/line/double-line-chart.vue

@@ -232,8 +232,8 @@ export default {
         },
         grid: {
           top: 16,
-          left: 32,
-          right: 8,
+          left: 40,
+          right: 15,
           bottom: 24,
         },
         xAxis: [
@@ -244,7 +244,7 @@ export default {
               formatter: "{value}",
               textStyle: {
                 color: partten.getColor("gray"),
-                fontSize: util.vh(14),
+                fontSize: util.vh(10),
               },
             },
             data: this.xdata,

File diff suppressed because it is too large
+ 487 - 388
src/components/other/healthReport/index.vue


+ 245 - 21
src/views/Home/Home.vue

@@ -9,7 +9,11 @@
               :sub-title="nowTime + ' 实况'"
               icon="fa fa-map-marker"
             >
-              <weather :data="tqmap" />
+              <weather
+                style="cursor: pointer"
+                :data="tqmap"
+                @click="openWeatherDialog"
+              />
             </com-panel>
           </Col>
         </Row>
@@ -45,9 +49,17 @@
       <div class="top-right-panel">
         <Row type="flex">
           <Col :span="24">
-            <com-panel title="电量分析" sub-title="(单位:万kWh)">
+            <com-panel title="效益提升" sub-title="(单位:万kWh)">
               <!-- 避免故障、提升率、降低率、风能利用率、设备可利用率、综合场用电率、存在隐患风机 -->
-              <coulometric-analysis :bmgz="gxkmap.tjsl" :tsl="30" :jdl="gxkmap.tjl" :fnlyl="wxssmap.yfnlyl" :sbklyl="gxkmap.ysbklyl" :zhcydl="gxkmap.yzhcydl" :yhfj="gxkmap.sjtjsl" />
+              <coulometric-analysis
+                :bmgz="gxkmap.tjsl"
+                :tsl="30"
+                :jdl="gxkmap.tjl"
+                :fnlyl="wxssmap.yfnlyl"
+                :sbklyl="gxkmap.ysbklyl"
+                :zhcydl="gxkmap.yzhcydl"
+                :yhfj="gxkmap.sjtjsl"
+              />
             </com-panel>
           </Col>
         </Row>
@@ -218,7 +230,7 @@
                   <td class="unit gray gray">小时</td>
                 </tr>
                 <tr class="">
-                  <td class="text gray">等效可用系数</td>
+                  <td class="text gray">等效可用系数(月)</td>
                   <td class="value green">{{ gxkmap.ydxkyss }}</td>
                   <td class="unit gray">%</td>
                 </tr>
@@ -664,6 +676,90 @@
       </Col>
     </Row>
     <el-dialog
+      title="天气详情"
+      custom-class="modal"
+      v-model="showWeatherDialog"
+      width="80%"
+      :destroy-on-close="true"
+    >
+      <div class="weatherBox">
+        <div class="l">
+          <DoubleLineChart :height="'100%'" :list="weatherChart" />
+        </div>
+        <div class="r">
+          <el-collapse
+            style="height: 400px; overflow-y: scroll"
+            v-model="weathercollapse"
+            accordion
+          >
+            <el-collapse-item
+              :name="index"
+              v-for="(item, index) in tqmap5"
+              :key="index"
+            >
+              <template #title>
+                <div class="collapseItemTitle">
+                  {{ item.time }}
+                  <div
+                    style="
+                      display: flex;
+                      justify-content: start;
+                      align-items: center;
+                    "
+                  >
+                    <div class="icon svg-icon svg-icon-white">
+                      <SvgIcon class="svg" :svgid="'svg-' + item.tqtp" />
+                    </div>
+                    <div class="info">{{ item.sd }}% / {{ item.wd }}°C</div>
+                  </div>
+                  <div class="otherWea">{{ item.tqmc }}</div>
+                </div>
+              </template>
+              <div class="other-info">
+                <Row>
+                  <Col>
+                    <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
+                      <svg-icon svgid="svg-能见度" />
+                    </div>
+                    <div class="value">{{ item.qxd }}</div>
+                    <div class="text">能见度</div>
+                  </Col>
+                  <Col>
+                    <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
+                      <svg-icon svgid="svg-湿度" />
+                    </div>
+                    <div class="value">{{ item.sd }}</div>
+                    <div class="text">湿度</div>
+                  </Col>
+                  <Col>
+                    <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
+                      <svg-icon svgid="svg-气压" />
+                    </div>
+                    <div class="value">{{ item.dqyl }}</div>
+                    <div class="text">气压</div>
+                  </Col>
+                  <Col>
+                    <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
+                      <svg-icon svgid="svg-日出" />
+                    </div>
+                    <div class="value">{{ item.richushijian }}</div>
+                    <div class="text">日出时间</div>
+                  </Col>
+                  <Col>
+                    <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
+                      <svg-icon svgid="svg-日落" />
+                    </div>
+                    <div class="value">{{ item.riluoshijian }}</div>
+                    <div class="text">日落时间</div>
+                  </Col>
+                </Row>
+              </div>
+            </el-collapse-item>
+          </el-collapse>
+        </div>
+      </div>
+    </el-dialog>
+    <el-dialog
       :title="dialogTitle"
       v-model="dialogShow"
       width="70%"
@@ -707,6 +803,7 @@ import PowerReview from "./components/power-review.vue";
 import PowerPlan from "./components/power-plan.vue";
 import Map from "./components/map.vue";
 import ListBarChart2 from "../../components/chart/bar/list-bar-chart2.vue";
+import DoubleLineChart from "@com/chart/line/double-line-chart.vue";
 
 import Table from "./dialog/table.vue";
 
@@ -729,12 +826,27 @@ export default {
     Map,
     ListBarChart2,
     Table,
+    DoubleLineChart,
   },
   data() {
     return {
       timmer: null, // 计时器
       timmer2: null,
       timmer3: null,
+      showWeatherDialog: false,
+      weatherChart: [
+        {
+          title: "温度",
+          smooth: true,
+          value: [],
+        },
+        {
+          title: "湿度",
+          smooth: true,
+          value: [],
+        },
+      ],
+      tqmap5: [],
       jczbmap: {},
       wxssmap: {},
       gxkmap: {},
@@ -768,7 +880,7 @@ export default {
       },
       dialogType: null,
       wpId: "0",
-      wpName: "",  //安全天数下面的场站名
+      wpName: "", //安全天数下面的场站名
       fcmap: {},
       xtmap: {},
       dialogShow: false,
@@ -800,6 +912,49 @@ export default {
   },
 
   methods: {
+    // 打开天气弹窗
+    openWeatherDialog() {
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "genreset/getWeatherRealDay5Info",
+        data: {
+          wpId: that.wpId,
+        },
+        success(res) {
+          const keys = ["wd", "sd"];
+          let weatherChart = [
+            {
+              title: "温度",
+              smooth: true,
+              value: [],
+            },
+            {
+              title: "湿度",
+              smooth: true,
+              value: [],
+            },
+          ];
+
+          res.data.ls.forEach((ele) => {
+            ele.time = new Date(ele.time).formatDate("yyyy-MM-dd hh:mm");
+          });
+
+          keys.forEach((key, keyIndex) => {
+            res.data.ls.forEach((ele) => {
+              weatherChart[keyIndex].value.push({
+                text: ele.time,
+                value: ele[key],
+              });
+            });
+          });
+          that.tqmap5 = res.data.ls;
+          that.weatherChart = weatherChart;
+          that.showWeatherDialog = true;
+        },
+      });
+    },
+
     // 请求服务
     requestData(showLoading) {
       let that = this;
@@ -904,7 +1059,6 @@ export default {
           id: that.wpId,
         },
         success(res) {
-
           let rdlKey = ["value1", "value2", "value3", "speed"];
           let DayPower = {
             // 图表所用单位
@@ -934,21 +1088,15 @@ export default {
           };
 
           let glKey = [
-            "value1",
             "value2",
-            "value3",
-            "value4",
+            "value1",
             "value5",
-            "value6",
+            "value4",
             "value7",
+            "value6",
           ];
           let Powertrend = [
             {
-              title: "应发功率",
-              smooth: true,
-              value: [],
-            },
-            {
               title: "实发功率",
               smooth: true,
               value: [],
@@ -959,22 +1107,22 @@ export default {
               value: [],
             },
             {
-              title: "4小时预测功率",
+              title: "保证功率",
               smooth: true,
               value: [],
             },
             {
-              title: "保证功率",
+              title: "4小时预测功率",
               smooth: true,
               value: [],
             },
             {
-              title: "平均风速",
+              title: "24小时预测功率",
               smooth: true,
               value: [],
             },
             {
-              title: "24小时预测功率",
+              title: "平均风速",
               smooth: true,
               value: [],
             },
@@ -1039,8 +1187,8 @@ export default {
     },
 
     // 点击安全天数下的场站按钮重置数据
-    onBackStation(){
-      if (this.wpId.indexOf("FDC") == -1){
+    onBackStation() {
+      if (this.wpId.indexOf("FDC") == -1) {
         clearInterval(this.timmer);
         this.timmer = null;
         this.wpId = this.wpId.substring(0, this.wpId.indexOf("0")) + "_FDC";
@@ -1291,5 +1439,81 @@ export default {
     justify-content: space-between;
     flex: 0 0 380px;
   }
+  .weatherBox {
+    width: 100%;
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    .l,
+    .r {
+      width: 48%;
+      height: 500px;
+      padding: 50px 0;
+    }
+
+    .el-collapse {
+      border-top: 1px solid #999;
+    }
+
+    .el-collapse-item .el-collapse-item__wrap {
+      border-bottom: 1px solid #999;
+    }
+
+    .el-collapse-item__content {
+      background: rgba(18, 29, 28);
+      color: rgba(255, 255, 255, 0.75);
+      padding: 20px;
+    }
+
+    .el-collapse-item__header {
+      background: rgb(18, 29, 28);
+      border-bottom: 1px solid #999;
+      color: rgba(255, 255, 255, 0.75);
+    }
+
+    .el-card__header,
+    .el-collapse,
+    .el-collapse-item__header {
+      border-bottom: 1px solid #999;
+    }
+
+    .collapseItemTitle {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      width: 100%;
+
+      .svg {
+        width: 20px;
+        height: 20px;
+      }
+
+      .info {
+        margin-left: 4px;
+      }
+
+      .otherWea {
+        margin-right: 10px;
+      }
+    }
+
+    .other-info {
+      text-align: center;
+      font-size: @fontsize-s;
+
+      .text {
+        color: @font-color;
+        font-size: 12px;
+      }
+
+      .value {
+        margin: 0.741vh 0 0 0;
+      }
+
+      .other-icon {
+        margin: 0 auto;
+      }
+    }
+  }
 }
 </style>

+ 1 - 1
src/views/Home/components/coulometric-analysis.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="coulometric-analysis">
     <tab @select="selectionItemClick" v-if="false" />
-    <row>
+    <row style="margin-top: 36px">
       <Col :span="12">
         <div class="coulometric-info">
           <svg-icon svgid="svg-arrow-up" class="icon green" />

+ 74 - 45
src/views/Home/components/power-plan.vue

@@ -1,14 +1,37 @@
 <template>
   <div class="power-plan">
-    <tab @select="selectionItemClick" :data="currTabs" class="power-plan-tab" />
-    <row @click="openDialog('计划电量完成详情', 'genreset/findProjectPlanPower', 'doneLineChart')">
+    <!-- <tab @select="selectionItemClick" :data="currTabs" class="power-plan-tab" /> -->
+    <row
+      style="margin-top: 47px"
+      @click="
+        openDialog(
+          '计划电量完成详情',
+          'genreset/findProjectPlanPower',
+          'doneLineChart'
+        )
+      "
+    >
       <Col :span="12">
         <!-- <percent-card-2 :title="'月完成率' + parseInt((planData.yfdl / planData.yfdljh) * 100) + '%'" TotalText="实际" ActualText="计划" :TotalValue="planData.yfdl" :ActualValue="planData.yfdljh" :percent="planData.ywcl" /> -->
-        <percent-card-2 :title="''" TotalText="实际" ActualText="计划" :TotalValue="planData.yfdl" :ActualValue="planData.yfdljh" :percent="planData.ywcl" />
+        <percent-card-2
+          :title="''"
+          TotalText="实际"
+          ActualText="计划"
+          :TotalValue="planData.yfdl"
+          :ActualValue="planData.yfdljh"
+          :percent="planData.ywcl"
+        />
       </Col>
       <Col :span="12">
         <!-- <percent-card-2 :title="'年完成率' + parseInt((planData.nfdl / planData.nfdljh) * 100) + '%'" TotalText="实际" ActualText="计划" :TotalValue="planData.nfdl" :ActualValue="planData.nfdljh" :percent="planData.nwcl" /> -->
-        <percent-card-2 :title="''" TotalText="实际" ActualText="计划" :TotalValue="planData.nfdl" :ActualValue="planData.nfdljh" :percent="planData.nwcl" />
+        <percent-card-2
+          :title="''"
+          TotalText="实际"
+          ActualText="计划"
+          :TotalValue="planData.nfdl"
+          :ActualValue="planData.nfdljh"
+          :percent="planData.nwcl"
+        />
       </Col>
     </row>
   </div>
@@ -21,17 +44,17 @@ import Tab from "@/components/coms/tabs/tab.vue";
 import PercentCard2 from "../../../components/coms/cards/percent-card-2.vue";
 export default {
   components: { Row, Col, Tab, PercentCard2 },
-  data () {
+  data() {
     return {
       planData: {},
       wpId: "",
-      showTitle:"",
+      showTitle: "",
       // tab项
       tabs: [
         {
           id: "1",
-          text: ""
-        }
+          text: "",
+        },
       ],
       // 月计划完成率
       monthPlan: {
@@ -52,16 +75,16 @@ export default {
     },
     data: {
       type: Object,
-      default: () => { }
+      default: () => {},
     },
-    id:{
+    id: {
       type: String,
-      default: ""
+      default: "",
     },
-    title:{
+    title: {
       type: String,
-      default: ""
-    }
+      default: "",
+    },
   },
   computed: {
     currTabs() {
@@ -81,7 +104,7 @@ export default {
     this.tabs[0].text = this.title;
   },
   methods: {
-    selectionItemClick (item) {
+    selectionItemClick(item) {
       // 点击tab选项 模拟数据变化
       // 动态改变子组件数据变化
       this.monthPlan = {
@@ -94,29 +117,33 @@ export default {
       };
     },
 
-    openDialog(dialogTitle, subUrl, dialogType){
+    openDialog(dialogTitle, subUrl, dialogType) {
       let that = this;
       that.API.requestData({
         method: "POST",
         subUrl,
         data: {
-          id:that.wpId
+          id: that.wpId,
         },
-        success (res) {
-          
-          let key = [{
-            key:"value1",
-            title:"月计划发电量"
-          }, {
-            key:"value2",
-            title:"年计划发电量"
-          }, {
-            key:"value3",
-            title:"月发电量"
-          }, {
-            key:"value4",
-            title:"年发电量"
-          }];
+        success(res) {
+          let key = [
+            {
+              key: "value1",
+              title: "月计划发电量",
+            },
+            {
+              key: "value2",
+              title: "年计划发电量",
+            },
+            {
+              key: "value3",
+              title: "月发电量",
+            },
+            {
+              key: "value4",
+              title: "年发电量",
+            },
+          ];
 
           let doneLineChartData = {
             // 图表所用单位
@@ -124,40 +151,42 @@ export default {
             value: [],
           };
 
-          key.forEach((keyEle, keyIndex)=>{
-
+          key.forEach((keyEle, keyIndex) => {
             doneLineChartData.value.push({
               title: keyEle.title,
               yAxisIndex: 0, // 使用单位
-              value: []
+              value: [],
             });
 
-            res.data.forEach(ele => {
+            res.data.forEach((ele) => {
               doneLineChartData.value[keyIndex].value.push({
                 text: ele.name,
-                value: ele[keyEle.key]
+                value: ele[keyEle.key],
               });
             });
           });
 
-          that.$emit("chartClick", { dialogTitle, dialogType, data: doneLineChartData });
-
-        }
+          that.$emit("chartClick", {
+            dialogTitle,
+            dialogType,
+            data: doneLineChartData,
+          });
+        },
       });
     },
   },
 
   watch: {
-    data (res) {
+    data(res) {
       this.planData = res;
     },
-    id(res){
+    id(res) {
       this.wpId = res;
     },
-    title(res){
+    title(res) {
       this.tabs[0].text = res;
-    }
-  }
+    },
+  },
 };
 </script>
 

+ 1 - 1
src/views/NewPages/iframe4.vue

@@ -171,7 +171,7 @@ export default {
   .iframe-4 {
     margin-left: 11.9vw;
     .iframe-4-body {
-      background-image: url("../../assets/save_4.png");
+      background-image: url("../../assets/3D.png");
       // background-color: aqua;
       background-size: cover;
       height: 100%;

+ 2 - 2
src/views/NewPages/power-benchmarking.vue

@@ -147,9 +147,9 @@
           <div class="header-left">
             <div class="selecttion">
               <div class="item" :class="{ active: selecttionIndex == 0 }" @click="selectionClick(0)">日</div>
-              <div class="item" :class="{ active: selecttionIndex == 1 }" @click="selectionClick(1)">周</div>
+              <!-- <div class="item" :class="{ active: selecttionIndex == 1 }" @click="selectionClick(1)">周</div> -->
               <div class="item" :class="{ active: selecttionIndex == 2 }" @click="selectionClick(2)">月</div>
-              <div class="item" :class="{ active: selecttionIndex == 3 }" @click="selectionClick(3)">季</div>
+              <!-- <div class="item" :class="{ active: selecttionIndex == 3 }" @click="selectionClick(3)">季</div> -->
               <div class="item" :class="{ active: selecttionIndex == 4 }" @click="selectionClick(4)">年</div>
             </div>
             <!-- <div class="query">

+ 47 - 44
src/views/Others/index.vue

@@ -2,22 +2,7 @@
   <div class="swiperBox">
     <el-carousel style="width: 100%; margin: 5vh 0" trigger="click" type="card" height="80vh" :autoplay="false" indicator-position="none" :initial-index="1" arrow="none" @change="changeSwiper">
       <!-- card-1 -->
-      <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
-        <div class="itemBox">
-          <p class="itemTitle">
-            数据查询
-          </p>
-          <div class="df-table" @click="jumpUrl('/others/realSearch')">
-            <div class="sjcx-item" v-for="(value, key) in wppointColumn" :key="key">
-              <div class="sjcx-name">{{value}}</div>
-              <div class="sjcx-value">{{wppointnum[key]}}</div>
-            </div>
-          </div>
-        </div>
-      </el-carousel-item>
-
-      <!-- card-2 -->
-      <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
+            <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
         <div class="itemBox">
           <p class="itemTitle">
             记录查询
@@ -30,36 +15,11 @@
           </div>
         </div>
       </el-carousel-item>
+     
 
-      <!-- card-3 -->
-      <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
-        <div class="itemBox">
-          <p class="itemTitle">
-            专家知识
-            <!-- <i class="itemMoreBtn el-icon-more" @click="jumpUrl('/realSearch')"></i> -->
-          </p>
-          <div class="df-table">
-            <ComTable height="30vh" :data="tableData3" :pageSize="20">
-            </ComTable>
-          </div>
-        </div>
-      </el-carousel-item>
+      <!-- card-2 -->
 
-      <!-- card-4 -->
-      <!-- <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
-        <div class="itemBox">
-          <p class="itemTitle">
-            统计分析
-            <i class="itemMoreBtn el-icon-more" @click="jumpUrl('/realSearch')"></i>
-          </p>
-           <ComTable height="30vh" :data="tableData7" :pageSize="20">
-            </ComTable>
-            <ComTable height="30vh" :data="tableData8" :pageSize="20">
-            </ComTable>
-        </div>
-      </el-carousel-item> -->
-      <!-- card-5 -->
-      <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
+ <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
         <div class="itemBox">
           <p class="itemTitle">
             报表管理
@@ -93,6 +53,49 @@
           </div>
         </div>
       </el-carousel-item>
+      <!-- card-3 -->
+        <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
+        <div class="itemBox">
+          <p class="itemTitle">
+            数据查询
+          </p>
+          <div class="df-table" @click="jumpUrl('/others/realSearch')">
+            <div class="sjcx-item" v-for="(value, key) in wppointColumn" :key="key">
+              <div class="sjcx-name">{{value}}</div>
+              <div class="sjcx-value">{{wppointnum[key]}}</div>
+            </div>
+          </div>
+        </div>
+      </el-carousel-item>
+
+
+      <!-- card-4 -->
+      <!-- <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
+        <div class="itemBox">
+          <p class="itemTitle">
+            统计分析
+            <i class="itemMoreBtn el-icon-more" @click="jumpUrl('/realSearch')"></i>
+          </p>
+           <ComTable height="30vh" :data="tableData7" :pageSize="20">
+            </ComTable>
+            <ComTable height="30vh" :data="tableData8" :pageSize="20">
+            </ComTable>
+        </div>
+      </el-carousel-item> -->
+      <!-- card-5 -->
+            <el-carousel-item style="padding: 20px; background: rgb(4, 12, 11)">
+        <div class="itemBox">
+          <p class="itemTitle">
+            专家知识
+            <!-- <i class="itemMoreBtn el-icon-more" @click="jumpUrl('/realSearch')"></i> -->
+          </p>
+          <div class="df-table">
+            <ComTable height="30vh" :data="tableData3" >
+            </ComTable>
+          </div>
+        </div>
+      </el-carousel-item>
+      
     </el-carousel>
   </div>
 </template>

File diff suppressed because it is too large
+ 859 - 831
src/views/WindSite/pages/Home/Home.vue


+ 1 - 0
src/views/WindSite/pages/Map.vue

@@ -556,6 +556,7 @@ export default {
         .table-form {
           .text,
           .unit {
+            min-width: 60px;
             font-weight: 400;
           }
 

+ 86 - 129
src/views/WindSite/pages/Tower.vue

@@ -43,7 +43,7 @@
         </div>
       </div>
     </Panel>
-    <toolbar-panel class="rose-chart" title="功率曲线">
+    <toolbar-panel class="rose-chart" title="72小时功率曲线">
       <!-- <template v-slot:tools>
       </template> -->
       <!-- <template v-slot:default> -->
@@ -98,20 +98,20 @@ export default {
       cftmap: {},
       glvos: [],
       rmgtmap: {
-        indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
+        indicator: ["N0", "N1"],
         data: [
           {
-            value: [44200, 14200, 20000, 35000, 50000, 38000],
+            value: [44200, 14200],
             name: "",
           },
         ],
       },
       rmgtTitle: "",
       ymgtmap: {
-        indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
+        indicator: ["N0", "N1"],
         data: [
           {
-            value: [44200, 14200, 20000, 35000, 50000, 38000],
+            value: [0, 14200],
             name: "",
           },
         ],
@@ -141,127 +141,84 @@ export default {
   // 函数
   methods: {
     requestLine() {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "genreset/findPowerInfo",
-        timeout: 60000,
-        data: {
-          id: that.wpId,
-        },
-        success(res) {
-
-          let rdlKey = ["value1", "value2", "value3", "speed"];
-          let DayPower = {
-            // 图表所用单位
-            units: ["(万kWh)", "(m/s)"],
-            value: [
-              {
-                title: "发电量",
-                yAxisIndex: 0,
-                value: [],
-              },
-              {
-                title: "上网电量",
-                yAxisIndex: 0,
-                value: [],
-              },
-              {
-                title: "购网电量",
-                yAxisIndex: 0,
-                value: [],
-              },
-              {
-                title: "实时风速",
-                yAxisIndex: 1,
-                value: [],
-              },
-            ],
-          };
-
-          let glKey = [
-            "value1",
-            "value2",
-            "value3",
-            "value4",
-            "value5",
-            "value6",
-            "value7",
-          ];
-          let Powertrend = [
-            {
-              title: "应发功率",
-              smooth: true,
-              value: [],
-            },
-            {
-              title: "实发功率",
-              smooth: true,
-              value: [],
-            },
-            {
-              title: "理论功率",
-              smooth: true,
-              value: [],
-            },
-            {
-              title: "4小时预测功率",
-              smooth: true,
-              value: [],
-            },
-            {
-              title: "保证功率",
-              smooth: true,
-              value: [],
-            },
-            {
-              title: "平均风速",
-              smooth: true,
-              value: [],
-            },
-            {
-              title: "24小时预测功率",
-              smooth: true,
-              value: [],
-            },
-          ];
-
-          rdlKey.forEach((keyEle, keyIndex) => {
-            res.data.rdlvos.forEach((cEle) => {
-              DayPower.value[keyIndex].value.push({
-                text: cEle.timestr,
-                value: cEle[keyEle],
-              });
-            });
-          });
-
-          glKey.forEach((keyEle, keyIndex) => {
-            res.data.glvos.forEach((cEle) => {
-              Powertrend[keyIndex].value.push({
-                text: new Date(cEle.time).formatDate("hh:mm"),
-                value: cEle[keyEle],
-              });
-            });
-          });
-
-          that.DayPower = DayPower;
-          that.Powertrend = Powertrend;
-        },
-      });
-    },
-    requestData(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "monitor/findCftInfo",
-        data: {
-          wpId: that.wpId,
-        },
-        success(res) {
-          that.cftmap = res.data.cftmap;
-        },
-      });
+		 let that = this;
+		that.API.requestData({
+		  method: "POST",
+		  subUrl: "/monitor/findCftInfo",
+		  timeout: 60000,
+		  data: {
+		    wpId: that.wpId,
+		  },
+		success(res) {
+			var data = res.data;
+			that.cftmap = data.cftmap;
+			// 日资源玫瑰图
+			var rmgtmapIndicator = [],
+				rmgtmapData = [];
+			data.rmgtmap.data.forEach(item =>{
+				rmgtmapIndicator.push(item.name);
+				rmgtmapData.push(item.data1)
+			})
+			that.rmgtmap = {
+				indicator: rmgtmapIndicator,
+				data: [{value: rmgtmapData}]
+			};
+			// 月资源玫瑰图
+			var ymgtmapIndicator = [],
+				ymgtmapData = [];
+			data.ymgtmap.data.forEach(item =>{
+				ymgtmapIndicator.push(item.name);
+				ymgtmapData.push(item.data1)
+			})
+			that.ymgtmap = {
+				indicator: ymgtmapIndicator,
+				data: [{value: ymgtmapData}]
+			};
+			
+			// 72小时功率曲线图
+			let glKey = ["value2","value1","value5","value4","value7","value6"];
+			let Powertrend = [
+			  {
+			    title: "实发功率",
+			    smooth: true,
+			    value: [],
+			  },
+			  {
+			    title: "理论功率",
+			    smooth: true,
+			    value: [],
+			  },
+			  {
+			    title: "保证功率",
+			    smooth: true,
+			    value: [],
+			  },
+			  {
+			    title: "4小时预测功率",
+			    smooth: true,
+			    value: [],
+			  },
+			  {
+			    title: "24小时预测功率",
+			    smooth: true,
+			    value: [],
+			  },
+			  {
+			    title: "平均风速",
+			    smooth: true,
+			    value: [],
+			  },
+			];
+			glKey.forEach((keyEle, keyIndex) => {
+			  res.data.glvos.forEach((cEle) => {
+			    Powertrend[keyIndex].value.push({
+			      text: new Date(cEle.time).formatDate("hh:mm"),
+			      value: cEle[keyEle],
+			    });
+			  });
+			});
+			that.Powertrend = Powertrend;
+		}})
     },
     getWp () {
       let that = this;
@@ -307,7 +264,7 @@ export default {
       });
       this.wpId = res.code;
       this.renderBtnActiveIndex ();
-      this.requestData(false);
+      // this.requestData(false);
       this.requestLine();
     },
   },
@@ -317,10 +274,10 @@ export default {
     that.wpId = that.$route.params.wpId;
     that.getWp();
     that.$nextTick(() => {
-      that.requestData(false);
+      // that.requestData(false);
       that.requestLine();
       that.timmer = setInterval(() => {
-        that.requestData(false);
+        // that.requestData(false);
         that.requestLine();
       }, 60 * 1000);
     });

File diff suppressed because it is too large
+ 1229 - 1195
src/views/malfunctionRecall/components/fault-diagnosis.vue


+ 276 - 316
src/views/malfunctionRecall/index.vue

@@ -1,49 +1,24 @@
 <template>
-  <div class="knowledge-2">
-    <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="wpId"
-              clearable
-              placeholder="请选择"
-              popper-class="select"
-              @change="
-                (wpId) => {
-                  getWt(wpId, true);
-                }
-              "
-            >
-              <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-select
-              v-model="wtId"
-              clearable
-              placeholder="请选择"
-              popper-class="select"
-            >
-              <el-option
-                v-for="item in wtArray"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              />
-            </el-select>
-          </div>
-        </div>
-        <!-- <div class="query-item">
+	<div class="knowledge-2">
+		<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="wpId" clearable placeholder="请选择" popper-class="select" @change=" (wpId) => { getWt(wpId, true); } ">
+							<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-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
+							<el-option v-for="item in wtArray" :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
@@ -61,287 +36,272 @@
             </el-select>
           </div>
         </div> -->
-        <div class="query-item">
-          <div class="query-item">
-            <div class="lable">开始日期:</div>
-            <div class="search-input">
-              <el-date-picker
-                v-model="value1"
-                @change="BeginChange(value1)"
-                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="value2"
-                @change="EndChange(value2)"
-                type="date"
-                value-format="YYYY-MM-DD"
-                placeholder="选择日期"
-                popper-class="date-select"
-              >
-              </el-date-picker>
-              <div class="unit svg-icon svg-icon-gray">
-                <svg-icon :svgid="''" />
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div class="query-actions" style="margin-right: 1500px">
-        <button class="btn green" @click="onClickSearch">查询</button>
-      </div>
-    </div>
-    <div>
-      <ComTable :data="tableData" height="85vh"></ComTable>
-    </div>
-    <div>
-      <el-dialog
-        title="故障诊断"
-        v-model="dialogVisible"
-        width="1400px"
-        top="10vh"
-        custom-class="modal hide-header"
-        :close-on-click-modal="false"
-        :before-close="onClickDialogClose"
-      >
-        <fault-diagnosis :data="rowitem"/>
-      </el-dialog>
-    </div>
-  </div>
+				<div class="query-item">
+					<div class="query-item">
+						<div class="lable">开始日期:</div>
+						<div class="search-input">
+							<el-date-picker v-model="value1" @change="BeginChange(value1)" 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="value2" @change="EndChange(value2)" type="date"
+								value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+							</el-date-picker>
+							<div class="unit svg-icon svg-icon-gray">
+								<svg-icon :svgid="''" />
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="query-actions" style="margin-right: 1500px">
+				<button class="btn green" @click="onClickSearch">查询</button>
+			</div>
+		</div>
+		<div>
+			<ComTable :data="tableData" height="85vh"></ComTable>
+		</div>
+		<div>
+			<el-dialog title="故障诊断" v-model="dialogVisible" width="1400px" top="5vh" custom-class="modal hide-header"
+				:close-on-click-modal="false" :before-close="onClickDialogClose">
+				<fault-diagnosis :data="rowitem" />
+			</el-dialog>
+		</div>
+	</div>
 </template>
 
 <script>
-import ComTable from "@com/coms/table/table.vue";
-import FaultDiagnosis from "./components/fault-diagnosis.vue";
+	import ComTable from "@com/coms/table/table.vue";
+	import FaultDiagnosis from "./components/fault-diagnosis.vue";
 
-export default {
-  components: { ComTable, FaultDiagnosis },
-  data() {
-    const that = this;
-    return {
-      value1: "",
-      value2: "",
-      wpId: "",
-      wpArray: [],
-      rowitem: "",
-      wpName: "",
-      wtId: "",
-      type: "2",
-      dialogVisible: false,
-      tableData: {
-        column: [
-          {
-            name: "场站",
-            field: "wpName",
-            is_num: true,
-            is_light: false,
-          },
-          {
-            name: "机组",
-            field: "windTurbineId",
-            is_num: false,
-            is_light: false,
-          },
-          {
-            name: "开始时刻",
-            field: "stopTime",
-            is_num: false,
-            is_light: false,
-          },
-          {
-            name: "结束时刻",
-            field: "startTime",
-            is_num: false,
-            is_light: false,
-          },
-          {
-            name: "停机小时数(h)",
-            field: "stopHours",
-            is_num: false,
-            is_light: false,
-          },
-          {
-            name: "停机类型",
-            field: "warnDesc",
-            is_num: false,
-            is_light: false,
-          },
-          {
-            name: "损失电量(kWh)",
-            field: "lossPower",
-            is_num: false,
-            is_light: false,
-          },
-          {
-            name: "操作",
-            field: "",
-            is_num: false,
-            is_light: false,
-            template() {
-              return "<el-button type='text' style='cursor: pointer;'>回溯</el-button>";
-            },
-             click(e, row) {
-              that.onClickOption(row);
-            },
-          },
-        ],
-        data: [],
-      },
-    };
-  },
-  created() {
-    this.value1 = new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
-      "yyyy-MM-dd"
-    );
-    this.value2 = this.getTime(2);
-    this.getWp();
-  },
-  methods: {
-    getTime(val) {
-      //时间戳处理,val=1是默认开始时间(当前月第一天),val=2是默认结束时间(今天)
-      var date = new Date();
-      var year = date.getFullYear(),
-        month = date.getMonth() + 1,
-        day = date.getDate();
-      month >= 1 && month <= 9 ? (month = "0" + month) : "";
-      day >= 0 && day <= 9 ? (day = "0" + day) : "";
-      var begin = year + "-" + month + "-01";
-      var end = year + "-" + month + "-" + day;
-      if (val == 1) {
-        return begin;
-      } else if (val == 2) {
-        return end;
-      }
-    },
-    // 获取风场
-    getWp(reGetWp) {
-      let that = this;
-      that.API.requestData({
-        baseURL: "http://10.155.32.4:9001",
-        subUrl: "benchmarking/wplist",
-        success(res) {
-          that.wpArray = res.data;
-          that.wpId = res.data[0].id;
-          that.wpName = res.data[0].wpName;
-          that.getWt(that.wpId, reGetWp);
-          that.requestSafeList();
-        },
-      });
-    },
+	export default {
+		components: {
+			ComTable,
+			FaultDiagnosis
+		},
+		data() {
+			const that = this;
+			return {
+				value1: "",
+				value2: "",
+				wpId: "",
+				wpArray: [],
+				rowitem: "",
+				wpName: "",
+				wtId: "",
+				type: "2",
+				dialogVisible: false,
+				tableData: {
+					column: [{
+							name: "场站",
+							field: "wpName",
+							is_num: true,
+							is_light: false,
+						},
+						{
+							name: "机组",
+							field: "windTurbineId",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "开始时刻",
+							field: "stopTime",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "结束时刻",
+							field: "startTime",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "停机小时数(h)",
+							field: "stopHours",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "停机类型",
+							field: "warnDesc",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "损失电量(kWh)",
+							field: "lossPower",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "操作",
+							field: "",
+							is_num: false,
+							is_light: false,
+							template() {
+								return "<el-button type='text' style='cursor: pointer;'>回溯</el-button>";
+							},
+							click(e, row) {
+								that.onClickOption(row);
+							},
+						},
+					],
+					data: [],
+				},
+			};
+		},
+		created() {
+			this.value1 = new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
+				"yyyy-MM-dd"
+			);
+			this.value2 = this.getTime(2);
+			this.getWp();
+		},
+		methods: {
+			getTime(val) {
+				//时间戳处理,val=1是默认开始时间(当前月第一天),val=2是默认结束时间(今天)
+				var date = new Date();
+				var year = date.getFullYear(),
+					month = date.getMonth() + 1,
+					day = date.getDate();
+				month >= 1 && month <= 9 ? (month = "0" + month) : "";
+				day >= 0 && day <= 9 ? (day = "0" + day) : "";
+				var begin = year + "-" + month + "-01";
+				var end = year + "-" + month + "-" + day;
+				if (val == 1) {
+					return begin;
+				} else if (val == 2) {
+					return end;
+				}
+			},
+			// 获取风场
+			getWp(reGetWp) {
+				let that = this;
+				that.API.requestData({
+					baseURL: "http://10.155.32.4:9001",
+					subUrl: "benchmarking/wplist",
+					success(res) {
+						that.wpArray = res.data;
+						that.wpId = res.data[0].id;
+						that.wpName = res.data[0].wpName;
+						that.getWt(that.wpId, reGetWp);
+						that.requestSafeList();
+					},
+				});
+			},
 
-    // 获取风机
-    getWt(wpid, reGetWp) {
-      let that = this;
-      if (that.wpId) {
-        that.API.requestData({
-          method: "GET",
-          baseURL: "http://10.155.32.4:9001",
-          subUrl: "benchmarking/wtList",
-          data: {
-            wpid,
-          },
-          success(res) {
-            that.wtArray = res.data;
-            // that.wtId = res.data[0].id;
-          },
-        });
-      }
-    },
-    BeginChange(vl) {
-      this.value1 = vl;
-    },
-    EndChange(vl) {
-      this.value2 = vl;
-    },
-    typeChange(vl) {
-      this.type = vl;
-    },
-    // 搜索按钮
-    onClickSearch() {
-      this.requestSafeList();
-    },
-    // 获取停机事件
-    requestSafeList() {
-      let that = this;
+			// 获取风机
+			getWt(wpid, reGetWp) {
+				let that = this;
+				if (that.wpId) {
+					that.API.requestData({
+						method: "GET",
+						baseURL: "http://10.155.32.4:9001",
+						subUrl: "benchmarking/wtList",
+						data: {
+							wpid,
+						},
+						success(res) {
+							that.wtArray = res.data;
+							// that.wtId = res.data[0].id;
+						},
+					});
+				}
+			},
+			BeginChange(vl) {
+				this.value1 = vl;
+			},
+			EndChange(vl) {
+				this.value2 = vl;
+			},
+			typeChange(vl) {
+				this.type = vl;
+			},
+			// 搜索按钮
+			onClickSearch() {
+				this.requestSafeList();
+			},
+			// 获取停机事件
+			requestSafeList() {
+				let that = this;
 
-      let data = {
-        tablepar: {
-          pageNum: 1,
-          pageSize: 1000,
-        },
-        beginDate: that.value1,
-        endDate: that.value2,
-        wpId: that.wpId,
-      };
+				let data = {
+					tablepar: {
+						pageNum: 1,
+						pageSize: 1000,
+					},
+					beginDate: that.value1,
+					endDate: that.value2,
+					wpId: that.wpId,
+				};
 
-      if (that.wtId != "") data.wtId = that.wtId;
-      if (that.type != "") data.type = that.type;
+				if (that.wtId != "") data.wtId = that.wtId;
+				if (that.type != "") data.type = that.type;
 
-      this.API.requestData({
-        method: "POST",
-        subUrl: "/event/getShutdownevent",
-        data,
-        success(res) {
-          if (res.code == 200) {
-            that.tableData.data = [];
-            if (res.data.list.length) {
-              let data = res.data.list;
-              for (var i = 0; i < data.length; i++) {
-                let obj = {
-                  wpName: data[i].wpName,
-                  windTurbineId: data[i].windTurbineId,
-                  stopTime: new Date(data[i].stopTime).formatDate(
-                    "yyyy-MM-dd hh:mm:ss"
-                  ),
+				this.API.requestData({
+					method: "POST",
+					subUrl: "/event/getShutdownevent",
+					data,
+					success(res) {
+						if (res.code == 200) {
+							that.tableData.data = [];
+							if (res.data.list.length) {
+								let data = res.data.list;
+								for (var i = 0; i < data.length; i++) {
+									let obj = {
+										wpName: data[i].wpName,
+										windTurbineId: data[i].windTurbineId,
+										stopTime: new Date(data[i].stopTime).formatDate(
+											"yyyy-MM-dd hh:mm:ss"
+										),
 
-                  stopHours: data[i].stopHours,
-                  statusName: data[i].statusName,
-                  warnDesc: data[i].warnDesc,
-                  lossPower: data[i].lossPower,
-                  handleWay: data[i].handleWay,
-                };
-                if (data[i].startTime)
-                  obj.startTime = new Date(data[i].startTime).formatDate(
-                    "yyyy-MM-dd hh:mm:ss"
-                  );
-                that.tableData.data.push(obj);
-              }
-            }
-          }
-        },
-      });
-    },
-    // 回放按钮
-    onClickOption(row) {
-      this.rowitem = row
-      this.dialogVisible = true;
-    },
-    // 关闭弹窗
-    onClickDialogClose() {
-      this.dialogVisible = false;
-    },
-  },
-};
+										stopHours: data[i].stopHours,
+										statusName: data[i].statusName,
+										warnDesc: data[i].warnDesc,
+										lossPower: data[i].lossPower,
+										handleWay: data[i].handleWay,
+									};
+									if (data[i].startTime)
+										obj.startTime = new Date(data[i].startTime).formatDate(
+											"yyyy-MM-dd hh:mm:ss"
+										);
+									that.tableData.data.push(obj);
+								}
+							}
+						}
+					},
+				});
+			},
+			// 回放按钮
+			onClickOption(row) {
+				this.rowitem = row
+				this.dialogVisible = true;
+			},
+			// 关闭弹窗
+			onClickDialogClose() {
+				this.dialogVisible = false;
+			},
+		},
+	};
 </script>
 
 <style lang="less" scope>
-@titleGray: #9ca5a8;
-@rowGray: #606769;
-@darkBack: #536268;
-.knowledge-2 {
-  .el-select {
-    width: 200px;
-  }
-  .el-input {
-    width: 200px;
-  }
-}
+	@titleGray: #9ca5a8;
+	@rowGray: #606769;
+	@darkBack: #536268;
+
+	.knowledge-2 {
+		.el-select {
+			width: 200px;
+		}
+
+		.el-input {
+			width: 200px;
+		}
+	}
 </style>