Browse Source

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

chenminghua 3 years ago
parent
commit
68854e149c

+ 1 - 1
public/static/config/modeConfig.js

@@ -1,5 +1,5 @@
 // 本地联调开关
-const localTest = 0;
+const localTest = 1;
 
 // 服务器地址
 let baseURL = null;

+ 14 - 3
src/components/chart/combination/bar-line-chart.vue

@@ -97,14 +97,16 @@ export default {
       return this.bardata.legend;
     },
     end() {
-      var result = 20;
-      if (this.areaData) {
+      var result = 100;
+      if (this.areaData && this.areaData.length > 0) {
         result = parseInt((this.pageSize / this.areaData.length) * 100);
       }
+
       return result;
     },
   },
   methods: {
+    resize() {},
     initChart() {
       let chart = echarts.init(this.$el);
       let option = {
@@ -276,8 +278,14 @@ export default {
           },
         });
       }
-
+console.log(JSON.stringify(option))
       chart.setOption(option);
+
+      this.resize = function() {
+        chart.resize();
+      };
+
+      window.addEventListener("resize", this.resize);
     },
   },
   created() {
@@ -301,6 +309,9 @@ export default {
       this.initChart();
     });
   },
+  unmounted() {
+    window.removeEventListener("resize", this.resize);
+  },
   watch: {
     bardata(val) {
       if (val.area && val.area.length < this.pageSize) {

+ 1 - 2
src/components/chart/combination/scatter-line-chart.vue

@@ -642,7 +642,6 @@ export default {
             color: "#fff",
           },
           formatter: function(params) {
-            debugger;
             if (params.componentType == "markLine") {
               return params.name + "<br />" + params.value;
             }
@@ -740,7 +739,7 @@ export default {
             lineStyle: {
               show: false,
             },
-            yAxisIndex: 1,
+            yAxisIndex: 0,
             xAxisIndex: 1,
             data: value,
           });

+ 2 - 2
src/views/Decision/Decision1.vue

@@ -67,7 +67,7 @@
 		<el-row :type="'flex'" class="content">
 			<el-col :span="12" class="pd-r-8">
 				<toolbar-panel title="风机绩效榜" :showLine="false">
-					<bar-line-chart :height="'calc(100vh - 200px)'" :bardata="bardata" :lineData="lineData"
+					<bar-line-chart :height="'calc(100vh - 180px)'" :bardata="bardata" :lineData="lineData"
 						:color="barColor" lineName="理论发电量" />
 				</toolbar-panel>
 			</el-col>
@@ -76,7 +76,7 @@
 					<div class="project-table">
 						<!-- 分页Table -->
 						<Table :data="tableData"
-							:height="'calc(100vh - 32vh)'">
+							:height="'calc(80vh - 50px)'">
 							<template v-slot:tr v-if="tableData.data.length > 0">
 								<tr>
 									<td style="width: 50px;">

+ 9 - 1
src/views/Decision/Decision2.vue

@@ -113,7 +113,7 @@
 	import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import Panel from "../../components/coms/panel/panel.vue";
-	import Table from "../../components/coms/table/table.vue";
+	import Table from "./table.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Dayinfo from "./dayinfo.vue";
 	export default {
@@ -363,6 +363,7 @@
 
 											dataTab.push({ //表格
 												index: index + 1,
+												fdl:item.fdl,
 												name: item.name,
 												zhpm: item.zhpm,
 												gzssdl: item.gzssdl,
@@ -406,6 +407,13 @@
 						},
 						{
 							name: "",
+							field: "fdl",
+							is_num: false,
+							is_light: false,
+							display:"none",
+						},
+						{
+							name: "",
 							field: "check",
 							is_num: false,
 							is_light: false,

+ 10 - 2
src/views/Decision/Decision2Cjdb.vue

@@ -88,7 +88,7 @@
 	import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import Panel from "../../components/coms/panel/panel.vue";
-	import Table from "../../components/coms/table/table.vue";
+	import Table from "./table.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Dayinfo from "./dayinfo.vue";
 	export default {
@@ -343,6 +343,7 @@
 											that.tableIdArr.push(item.id);
 											dataTab.push({ //表格
 												index: index + 1,
+												fdl:item.fdl,
 												name: item.name,
 												zhpm: item.zhpm,
 												gzssdl: item.gzssdl,
@@ -386,6 +387,13 @@
 						},
 						{
 							name: "",
+							field: "fdl",
+							is_num: false,
+							is_light: false,
+							display:"none",
+						},
+						{
+							name: "",
 							field: "check",
 							is_num: false,
 							is_light: false,
@@ -648,10 +656,10 @@
 							that.tableIdArr.push(item.id);
 							dataTab.push({ //表格
 								index: index + 1,
+								fdl: item.fdl,
 								name: item.name,
 								zhpm: item.zhpm,
 								fdlpm: item.fdlpm,
-								fdl: item.fdl,
 								gzssdlpm: item.gzssdlpm,
 								gzssdl: item.gzssdl,
 								jxssdlpm: item.jxssdlpm,

+ 9 - 1
src/views/Decision/Decision2Cndb.vue

@@ -78,7 +78,7 @@
 	import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import Panel from "../../components/coms/panel/panel.vue";
-	import Table from "../../components/coms/table/table.vue";
+	import Table from "./table.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Dayinfo from "./dayinfo.vue";
 	export default {
@@ -328,6 +328,7 @@
 
 											dataTab.push({ //表格
 												index: index + 1,
+												fdl:item.fdl,
 												name: item.name,
 												zhpm: item.zhpm,
 												gzssdl: item.gzssdl,
@@ -369,6 +370,13 @@
 						},
 						{
 							name: "",
+							field: "fdl",
+							is_num: false,
+							is_light: false,
+							display:"none",
+						},
+						{
+							name: "",
 							field: "check",
 							is_num: false,
 							is_light: false,

+ 9 - 1
src/views/Decision/Decision2Xldb.vue

@@ -108,7 +108,7 @@
 	import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import Panel from "../../components/coms/panel/panel.vue";
-	import Table from "../../components/coms/table/table.vue";
+	import Table from "./table.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Dayinfo from "./dayinfo.vue";
 	export default {
@@ -367,6 +367,7 @@
 
 											dataTab.push({ //表格
 												index: index + 1,
+												fdl:item.fdl,
 												name: item.name,
 												zhpm: item.zhpm,
 												gzssdl: item.gzssdl,
@@ -410,6 +411,13 @@
 						},
 						{
 							name: "",
+							field: "fdl",
+							is_num: false,
+							is_light: false,
+							display:"none",
+						},
+						{
+							name: "",
 							field: "check",
 							is_num: false,
 							is_light: false,

+ 9 - 1
src/views/Decision/Decision2Xmdb.vue

@@ -98,7 +98,7 @@
 	import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import Panel from "../../components/coms/panel/panel.vue";
-	import Table from "../../components/coms/table/table.vue";
+	import Table from "./table.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Dayinfo from "./dayinfo.vue";
 	export default {
@@ -355,6 +355,7 @@
 
 											dataTab.push({ //表格
 												index: index + 1,
+												fdl:item.fdl,
 												name: item.name,
 												zhpm: item.zhpm,
 												gzssdl: item.gzssdl,
@@ -398,6 +399,13 @@
 						},
 						{
 							name: "",
+							field: "fdl",
+							is_num: false,
+							is_light: false,
+							display:"none",
+						},
+						{
+							name: "",
 							field: "check",
 							is_num: false,
 							is_light: false,

+ 9 - 1
src/views/Decision/Decision3.vue

@@ -117,7 +117,7 @@
 	import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import Panel from "../../components/coms/panel/panel.vue";
-	import Table from "../../components/coms/table/table.vue";
+	import Table from "./table.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Dayinfo from "./dayinfo.vue";
 	
@@ -150,6 +150,13 @@
 						},
 						{
 							name: "",
+							field: "fdl",
+							is_num: false,
+							is_light: false,
+							display:"none",
+						},
+						{
+							name: "",
 							field: "check",
 							is_num: false,
 							is_light: false,
@@ -960,6 +967,7 @@
 
 							dataTab.push({ //表格
 								index: index + 1,
+								fdl:item.fdl,
 								name: item.name,
 								zhpm: item.zhpm,
 								gzssdl: item.gzssdl,

+ 2 - 2
src/views/Decision/table.vue

@@ -2,7 +2,7 @@
   <table class="com-table">
     <thead>
       <tr>
-        <th v-for="(col, index) of data.column" :key="index" :class="{ light: col.is_light }" :style="{ width: col.width }" @click="onSort(col)">
+        <th v-for="(col, index) of data.column" :key="index" :class="{ light: col.is_light }" :style="{ width: col.width , display : col.display }" @click="onSort(col)">
           {{ col.name }}
         </th>
       </tr>
@@ -13,7 +13,7 @@
           <td
             v-for="(col, i) of data.column"
             :key="i"
-            :style="{ width: col.width }"
+            :style="{ width: col.width , display : col.display}"
             :class="{ light: hoverRow == row || hoverCol == col, num: col.is_num, 'always-light': col.is_light || row.is_light }"
             @mouseenter="hover(row, col)"
             @mouseleave="leave()"

+ 50 - 36
src/views/HealthControl/HealthTab4.vue

@@ -68,7 +68,7 @@
           </div>
         </div>
       </div>
-      
+
       <div class="query-actions" style="margin-right: 500px">
         <button class="btn green" @click="onClickSearch">搜索</button>
       </div>
@@ -77,10 +77,16 @@
       <ComTable :data="tableData" height="80vh"></ComTable>
     </div>
     <div class="dialog-box">
-      <el-dialog title="日信息对比" v-model="dialogVisible" width="1200px" custom-class="modal" :close-on-click-modal="false">
-        <info-history :formdata="trackDate"/>
-      </el-dialog>   
-    </div> 
+      <el-dialog
+        title="日信息对比"
+        v-model="dialogVisible"
+        width="1200px"
+        custom-class="modal"
+        :close-on-click-modal="false"
+      >
+        <info-history :formdata="trackDate" />
+      </el-dialog>
+    </div>
   </div>
 </template>
 
@@ -88,12 +94,12 @@
 import InfoHistory from "./infotrack2.vue";
 import ComTable from "@com/coms/table/table.vue";
 import SvgIcon from "../../components/coms/icon/svg-icon.vue";
-import { warn } from '@vue/runtime-core';
+import { warn } from "@vue/runtime-core";
 
 export default {
   components: { InfoHistory, ComTable, SvgIcon },
   data() {
-    const that = this
+    const that = this;
     return {
       stations: [], // 场站
       windturbines: [], // 风机
@@ -103,35 +109,35 @@ export default {
       endts: new Date(),
       tableData: {
         column: [
-          { 
+          {
             name: "场站",
             field: "wfname",
-            is_light: false
+            is_light: false,
           },
-          { 
+          {
             name: "风机编号",
             field: "wtid",
-            is_light: false
+            is_light: false,
           },
-          { 
+          {
             name: "任务开始时间",
             field: "operationdate",
-            is_light: false
+            is_light: false,
           },
-          { 
+          {
             name: "任务接受时间",
             field: "departuretime",
-            is_light: false
+            is_light: false,
           },
-          { 
+          {
             name: "检修原因",
             field: "reason",
-            is_light: false
+            is_light: false,
           },
-          { 
+          {
             name: "消缺工艺",
             field: "repairedcomment",
-            is_light: false
+            is_light: false,
           },
           {
             name: "操作",
@@ -144,7 +150,7 @@ export default {
             click(e, row) {
               that.onClickTrack(row);
             },
-          }
+          },
         ],
         data: [],
       },
@@ -153,7 +159,8 @@ export default {
     };
   },
   created() {
-    this.starts = new Date(new Date().setMonth(new Date().getMonth()-2)).formatDate("yyyy-MM-dd");
+    this.starts = new Date().formatDate("yyyy-MM") + "-01";
+    // this.starts = "2021-01-01";
     this.requestStations();
   },
   methods: {
@@ -162,13 +169,12 @@ export default {
       this.requestFinishedList();
     },
     // 消缺跟踪
-    onClickTrack(row){
+    onClickTrack(row) {
       this.requestTrack(row);
-      
     },
     // 历史查询
-    onClickHistory(row){
-      this.dialogVisible = true
+    onClickHistory(row) {
+      this.dialogVisible = true;
     },
     // 获取场站
     requestStations() {
@@ -211,25 +217,33 @@ export default {
         },
         success(res) {
           if (res.code == 200) {
-            that.tableData.data = []
-            res.data.forEach(item => {
+            that.tableData.data = [];
+            res.data.forEach((item) => {
               let obj = {
                 wfname: item.wfname,
                 wtid: item.wtid,
-                operationdate: item.operationdate?new Date(item.operationdate).formatDate("yyyy-MM-dd hh:mm:ss"):'',
-                departuretime: item.departuretime?new Date(item.departuretime).formatDate("yyyy-MM-dd hh:mm:ss"):'',
+                operationdate: item.operationdate
+                  ? new Date(item.operationdate).formatDate(
+                      "yyyy-MM-dd hh:mm:ss"
+                    )
+                  : "",
+                departuretime: item.departuretime
+                  ? new Date(item.departuretime).formatDate(
+                      "yyyy-MM-dd hh:mm:ss"
+                    )
+                  : "",
                 reason: item.reason,
                 repairedcomment: item.repairedcomment,
-                rid: item.rid
-              }
-              that.tableData.data.push(obj)
+                rid: item.rid,
+              };
+              that.tableData.data.push(obj);
             });
           }
         },
       });
     },
     // 通过消缺单获得详细信息
-    requestTrack(row){
+    requestTrack(row) {
       let that = this;
       that.API.requestData({
         method: "POST",
@@ -239,12 +253,12 @@ export default {
         },
         success(res) {
           if (res.code == 200) {
-            that.trackDate = res.data
-            that.dialogVisible = true
+            that.trackDate = res.data;
+            that.dialogVisible = true;
           }
         },
       });
-    }
+    },
   },
   watch: {
     station(val) {

+ 342 - 136
src/views/HealthControl/infotrack2.vue

@@ -3,7 +3,11 @@
     <div class="form-info">
       <div class="work-flow">
         <div class="work-flow-line"></div>
-        <div :class="['work-flow-item', item.name == statu(form) ? 'active' : '']" v-for="(item, i) in svgarr" :key="i">
+        <div
+          :class="['work-flow-item', item.name == statu(form) ? 'active' : '']"
+          v-for="(item, i) in svgarr"
+          :key="i"
+        >
           <div class="work-flow-icon-item">
             <div class="work-flow-icon-o"></div>
             <div class="work-flow-icon-i"></div>
@@ -19,104 +23,177 @@
           <el-row>
             <el-col :span="12">
               <el-form-item label="风场:">
-                <el-input v-model="form.wpName" placeholder="风场名称" readonly></el-input>
+                <el-input
+                  v-model="form.wpName"
+                  placeholder="风场名称"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="风机:">
-                <el-input v-model="form.wtId" placeholder="风机名称" readonly></el-input>
+                <el-input
+                  v-model="form.wtId"
+                  placeholder="风机名称"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
               <el-form-item label="推荐检修时间:">
-                <el-input v-model="form.tjss" placeholder="推荐检修时间" readonly></el-input>
+                <el-input
+                  v-model="form.tjss"
+                  placeholder="推荐检修时间"
+                  readonly
+                ></el-input>
                 <!-- <el-date-picker v-model="form.tjjxsj" type="datetime" placeholder="推荐检修时间" popper-class="date-select"></el-date-picker> -->
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="预计检修风速:">
-                <el-input v-model="form.tjfs" placeholder="预计检修风速" readonly></el-input>
+                <el-input
+                  v-model="form.tjfs"
+                  placeholder="预计检修风速"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="24">
               <el-form-item label="推荐理由:">
-                <el-input type="textarea" resize="none" :rows="3" v-model="form.description" placeholder="推荐理由"
-                  readonly></el-input>
+                <el-input
+                  type="textarea"
+                  resize="none"
+                  :rows="3"
+                  v-model="form.description"
+                  placeholder="推荐理由"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
               <el-form-item label="下单时间:">
-                <el-input v-model="form.prodtdepttime" placeholder="下单时间" readonly></el-input>
+                <el-input
+                  v-model="form.prodtdepttime"
+                  placeholder="下单时间"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="主要负责人:">
-                <el-input v-model="form.workleader" placeholder="主要负责人" readonly></el-input>
+                <el-input
+                  v-model="form.workleader"
+                  placeholder="主要负责人"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
               <el-form-item label="出发时间:">
-                <el-input v-model="form.departuretime" placeholder="出发时间" readonly></el-input>
+                <el-input
+                  v-model="form.departuretime"
+                  placeholder="出发时间"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="到达时间:">
-                <el-input v-model="form.arrivaltime" placeholder="到达时间" readonly></el-input>
+                <el-input
+                  v-model="form.arrivaltime"
+                  placeholder="到达时间"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="24">
               <el-form-item label="排查方法:">
-                <el-input type="textarea" resize="none" :rows="3" v-model="form.gzpc" placeholder="排查方法" readonly></el-input>
+                <el-input
+                  type="textarea"
+                  resize="none"
+                  :rows="3"
+                  v-model="form.gzpc"
+                  placeholder="排查方法"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="24">
               <el-form-item label="处理方法:">
-                <el-input type="textarea" resize="none" :rows="3" v-model="form.repairedcomment" placeholder="处理方法"
-                  readonly></el-input>
+                <el-input
+                  type="textarea"
+                  resize="none"
+                  :rows="3"
+                  v-model="form.repairedcomment"
+                  placeholder="处理方法"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
               <el-form-item label="消缺时间:">
-                <el-input v-model="form.repairedtime" placeholder="消缺时间" readonly></el-input>
+                <el-input
+                  v-model="form.repairedtime"
+                  placeholder="消缺时间"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="故障时长:">
-                <el-input v-model="form.degradebugtype" placeholder="故障时长" readonly></el-input>
+                <el-input
+                  v-model="form.degradebugtype"
+                  placeholder="故障时长"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
               <el-form-item label="验收人:">
-                <el-input v-model="form.checkdeptlabornum" placeholder="验收人" readonly></el-input>
+                <el-input
+                  v-model="form.checkdeptlabornum"
+                  placeholder="验收人"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="验收时间:">
-                <el-input v-model="form.checktime" placeholder="验收时间" readonly></el-input>
+                <el-input
+                  v-model="form.checktime"
+                  placeholder="验收时间"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="24">
               <el-form-item label="验收意见:">
-                <el-input type="textarea" resize="none" :rows="3" v-model="form.checkdeptopinion" placeholder="验收意见"
-                  readonly></el-input>
+                <el-input
+                  type="textarea"
+                  resize="none"
+                  :rows="3"
+                  v-model="form.checkdeptopinion"
+                  placeholder="验收意见"
+                  readonly
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -125,65 +202,142 @@
     </div>
     <div class="evaluate">
       <div class="white">评价</div>
-      <div class="evaluate-item" :class="(form.rwfpsc > form.rwfppjsc ? ' warColor' : '')">
+      <div
+        class="evaluate-item"
+        :class="form.rwfpsc > form.rwfppjsc ? ' warColor' : ''"
+      >
         <div class="evaluate-label">任务分配时长</div>
-        <el-input v-model="form.rwfpsc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.rwfpsc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">任务分配平均时长</div>
-        <el-input v-model="form.rwfppjsc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.rwfppjsc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
-      <div class="evaluate-item" :class="(form.ddxcsc > form.ddxcpjsc ? ' warColor' : '')">
+      <div
+        class="evaluate-item"
+        :class="form.ddxcsc > form.ddxcpjsc ? ' warColor' : ''"
+      >
         <div class="evaluate-label">到达现场时长</div>
-        <el-input v-model="form.ddxcsc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.ddxcsc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">到达现场平均时长</div>
-        <el-input v-model="form.ddxcpjsc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.ddxcpjsc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
-      <div class="evaluate-item" :class="(form.qxclsc > form.qxclpjsc ? ' warColor' : '')">
+      <div
+        class="evaluate-item"
+        :class="form.qxclsc > form.qxclpjsc ? ' warColor' : ''"
+      >
         <div class="evaluate-label">缺陷处理时长</div>
-        <el-input v-model="form.qxclsc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.qxclsc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">缺陷处理平均时长</div>
-        <el-input v-model="form.qxclpjsc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.qxclpjsc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
-      <div class="evaluate-item" :class="(form.yssc > form.yspjsc ? ' warColor' : '')">
+      <div
+        class="evaluate-item"
+        :class="form.yssc > form.yspjsc ? ' warColor' : ''"
+      >
         <div class="evaluate-label">验收时长</div>
-        <el-input v-model="form.yssc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.yssc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">验收平均时长</div>
-        <el-input v-model="form.yspjsc" style="width: 62px;text-align: center;" placeholder="" readonly></el-input>
+        <el-input
+          v-model="form.yspjsc"
+          style="width: 62px; text-align: center"
+          placeholder=""
+          readonly
+        ></el-input>
         <div class="evaluate-unit">min</div>
       </div>
     </div>
     <div class="tabs">
       <div class="tab-box">
-        <div class="tab-item" v-for="(tab, index) of tabs" :key="index" :class="{ active: activeTab == index }" @click="selectTab(tab,index)">
-          <span class="svg-icon svg-icon-md" :class="activeTab == index ? 'svg-icon-green' : 'svg-icon-write'">
+        <div
+          class="tab-item"
+          v-for="(tab, index) of tabs"
+          :key="index"
+          :class="{ active: activeTab == index }"
+          @click="selectTab(tab, index)"
+        >
+          <span
+            class="svg-icon svg-icon-md"
+            :class="activeTab == index ? 'svg-icon-green' : 'svg-icon-write'"
+          >
             <SvgIcon :svgid="tab.icon"></SvgIcon>
           </span>
           <span>{{ tab.text }}</span>
         </div>
       </div>
     </div>
-    <defect-elimination-tracking ref="det" :show="false" :formdata="formdata"></defect-elimination-tracking>
+    <defect-elimination-tracking
+      ref="det"
+      :show="false"
+      :formdata="formdata"
+    ></defect-elimination-tracking>
     <div class="dialog-box">
-      <el-dialog title="消缺历史" v-model="dialogVisible" width="1200px" height='800px' custom-class="modal"
-        :close-on-click-modal="false">
+      <el-dialog
+        title="消缺历史"
+        v-model="dialogVisible"
+        width="1200px"
+        height="800px"
+        custom-class="modal"
+        :close-on-click-modal="false"
+      >
         <div class="diamain">
           <div class="left">
-            <el-tree :data="data" :props="defaultProps" node-key="id" :default-expand-all="true" custom-class="modal"
-              @node-click="handleNodeClick"></el-tree>
+            <el-tree
+              :data="data"
+              :props="defaultProps"
+              node-key="id"
+              :default-expand-all="true"
+              custom-class="modal"
+              @node-click="handleNodeClick"
+            ></el-tree>
           </div>
           <div class="right">
             <div class="table-box">
@@ -193,12 +347,37 @@
         </div>
       </el-dialog>
     </div>
-    <el-dialog title="查看监控视频" v-model="videoBoxShow" width="80%" height='800px' custom-class="modal"
-      :close-on-click-modal="true">
-      <video class="videoPlayer" id="videoPlayer" muted autoplay webkit-playsinline playsinline></video>
+    <el-dialog
+      title="查看监控视频"
+      v-model="videoBoxShow"
+      width="80%"
+      height="800px"
+      custom-class="modal"
+      :close-on-click-modal="true"
+    >
+      <video
+        class="videoPlayer"
+        id="videoPlayer"
+        muted
+        autoplay
+        webkit-playsinline
+        playsinline
+      ></video>
     </el-dialog>
-    <el-dialog title="GIS地貌" v-model="gisBoxShow" top="100px" width="95%" custom-class="modal gisBox" :close-on-click-modal="true">
-      <iframe width="100%" height="100%" src="http://10.155.32.4:8070/gisweb/ditujiankang.html?LAT=106.23507&LNG=38.48989&userid=1500" sryle="width:100%;height:100%;"></iframe>
+    <el-dialog
+      title="GIS地貌"
+      v-model="gisBoxShow"
+      top="100px"
+      width="95%"
+      custom-class="modal gisBox"
+      :close-on-click-modal="true"
+    >
+      <iframe
+        width="100%"
+        height="100%"
+        src="http://10.155.32.4:8070/gisweb/ditujiankang.html?LAT=106.23507&LNG=38.48989&userid=1500"
+        sryle="width:100%;height:100%;"
+      ></iframe>
     </el-dialog>
   </div>
 </template>
@@ -207,93 +386,116 @@
 import ComTable from "@com/coms/table/table.vue";
 import SvgIcon from "@com/coms/icon/svg-icon.vue";
 import DefectEliminationTracking from "../HealthControl/defect-elimination-tracking.vue"; //手环监控
-import $ from 'jquery';
+import $ from "jquery";
 export default {
   components: {
-    SvgIcon, ComTable,
+    SvgIcon,
+    ComTable,
     DefectEliminationTracking,
   },
   props: {
     formdata: Object,
   },
-  data () {
+  data() {
     return {
       gisBoxShow: false,
       videoBoxShow: false,
-      location: '',
+      location: "",
       tableData: {
         column: [
           {
             name: "消缺描述",
             field: "xqms",
-            is_light: false
+            is_light: false,
           },
           {
             name: "消缺人员",
             field: "xqry",
-            is_light: false
+            is_light: false,
           },
           {
             name: "消缺时间",
             field: "xqsj",
-            is_light: false
+            is_light: false,
           },
           {
             name: "更换部件",
             field: "ghbj",
-            is_light: false
+            is_light: false,
           },
           {
             name: "更换原因",
             field: "ghyy",
-            is_light: false
+            is_light: false,
           },
           {
             name: "更换数量",
             field: "ghsl",
-            is_light: false
+            is_light: false,
           },
         ],
         data: [],
       },
-      data: [{
-        label: '一级 1',
-        children: [{
-          label: '二级 1-1',
-          children: [{
-            label: '三级 1-1-1'
-          }]
-        }]
-      }, {
-        label: '一级 2',
-        children: [{
-          label: '二级 2-1',
-          children: [{
-            label: '三级 2-1-1'
-          }]
-        }, {
-          label: '二级 2-2',
-          children: [{
-            label: '三级 2-2-1'
-          }]
-        }]
-      }, {
-        label: '一级 3',
-        children: [{
-          label: '二级 3-1',
-          children: [{
-            label: '三级 3-1-1'
-          }]
-        }, {
-          label: '二级 3-2',
-          children: [{
-            label: '三级 3-2-1'
-          }]
-        }]
-      }],
+      data: [
+        {
+          label: "一级 1",
+          children: [
+            {
+              label: "二级 1-1",
+              children: [
+                {
+                  label: "三级 1-1-1",
+                },
+              ],
+            },
+          ],
+        },
+        {
+          label: "一级 2",
+          children: [
+            {
+              label: "二级 2-1",
+              children: [
+                {
+                  label: "三级 2-1-1",
+                },
+              ],
+            },
+            {
+              label: "二级 2-2",
+              children: [
+                {
+                  label: "三级 2-2-1",
+                },
+              ],
+            },
+          ],
+        },
+        {
+          label: "一级 3",
+          children: [
+            {
+              label: "二级 3-1",
+              children: [
+                {
+                  label: "三级 3-1-1",
+                },
+              ],
+            },
+            {
+              label: "二级 3-2",
+              children: [
+                {
+                  label: "三级 3-2-1",
+                },
+              ],
+            },
+          ],
+        },
+      ],
       defaultProps: {
-        children: 'children',
-        label: 'label'
+        children: "children",
+        label: "label",
       },
       dialogVisible: false,
       tabs: [
@@ -364,31 +566,31 @@ export default {
         gzpc: null,
         gzjx: null,
         prodtdepttime: null,
-        checkdeptopinion: null
+        checkdeptopinion: null,
       },
 
-      videoConfigHost: '10.155.32.4:9984', // 视频 host
+      videoConfigHost: "10.155.32.4:9984", // 视频 host
       // videoConfigHost: 'localhost:9984', // 视频 host
-      videoConfigToken: 'stream-1', // 视频 token
-      videoConfigStreamprofile: 'Profile_1', // 视频流文件
-      videoPlayer: null // 视频播放实例
+      videoConfigToken: "stream-1", // 视频 token
+      videoConfigStreamprofile: "Profile_1", // 视频流文件
+      videoPlayer: null, // 视频播放实例
     };
   },
-  created () {
+  created() {
     this.setData();
   },
 
-  updated () {
+  updated() {
     this.setData();
   },
 
-  onmounted () {
+  onmounted() {
     this.cancelPlay();
   },
 
   // 函数
   methods: {
-    setData () {
+    setData() {
       this.form = this.formdata;
       this.form.tjss = this.form.tjss
         ? new Date(this.form.tjss).formatDate("yyyy-MM-dd hh:mm:ss")
@@ -409,17 +611,17 @@ export default {
         ? new Date(this.form.checktime).formatDate("yyyy-MM-dd hh:mm:ss")
         : null;
     },
-    handleNodeClick (data) {
-      this.location = data.id
-      this.searchTab(data.id)
+    handleNodeClick(data) {
+      this.location = data.id;
+      this.searchTab(data.id);
     },
-    DateformatDate (val) {
+    DateformatDate(val) {
       return new Date(val).formatDate("yyyy-MM-dd hh:mm:ss");
     },
-    showDet () {
+    showDet() {
       this.$refs.det.show();
     },
-    statu (data) {
+    statu(data) {
       if (null != data.checktime) {
         return "消缺验收";
       } else if (
@@ -445,20 +647,20 @@ export default {
         return "流程未启动";
       }
     },
-    async searchH () {
+    async searchH() {
       const { data } = await this.API.requestData({
         method: "POST",
         subUrl: "/recommen/findLocationTreeByWtId",
         data: {
           wtId: this.form.wtId,
         },
-      })
-      this.dialogVisible = true
-      this.data = data.data
-      this.location = data.data[0].id
-      this.searchTab()
+      });
+      this.dialogVisible = true;
+      this.data = data.data;
+      this.location = data.data[0].id;
+      this.searchTab();
     },
-    async searchTab () {
+    async searchTab() {
       const { data } = await this.API.requestData({
         method: "POST",
         subUrl: "/recommen/findWobugeqByLocation",
@@ -467,12 +669,13 @@ export default {
             pageNum: 1,
             pageSize: 10,
           },
-          location: this.location
+          location: this.location,
         },
-      })
-      this.tableData.data = data.data
+      });
+      this.tableData.data = data.data;
+      console.log(123123,data)
     },
-    showVideoBox () {
+    showVideoBox() {
       this.videoBoxShow = true;
       this.$nextTick(() => {
         this.listenEvent();
@@ -480,22 +683,24 @@ export default {
       });
     },
     // 销毁播放实例
-    cancelPlay () {
-      $('.videoPlayer').attr('poster', "").attr('src', "");
-      this.videoPlayer && this.videoPlayer.disconnect() && (this.videoPlayer = null);
+    cancelPlay() {
+      $(".videoPlayer").attr("poster", "").attr("src", "");
+      this.videoPlayer &&
+        this.videoPlayer.disconnect() &&
+        (this.videoPlayer = null);
     },
 
     // 监听视频被暂停和被播放
-    listenEvent () {
+    listenEvent() {
       let that = this;
 
       //判断设备
       if (H5siOS() === true || H5sSafariBrowser() === true) {
-        $('.videoPlayer').prop('controls', true);
+        $(".videoPlayer").prop("controls", true);
       }
 
       //如果是暂停状态,就让它开始;如果是开始就让他暂停。每次开始之前都先清空参数
-      $('.videoPlayer').on('click', function () {
+      $(".videoPlayer").on("click", function () {
         if ($(this).get(0).paused) {
           that.resetVideo();
         } else {
@@ -503,24 +708,24 @@ export default {
           $(this).get(0).pause();
           this.BASE.showMsg({
             type: "success",
-            msg: "暂停播放"
+            msg: "暂停播放",
           });
         }
       });
     },
 
     // 重置视频播放状态
-    resetVideo () {
+    resetVideo() {
       this.$nextTick(() => {
         let videoConfig = {
-          videoid: 'videoPlayer',//跟上面video标签的id一致
-          protocol: 'http:', //'http:' or 'https:'
+          videoid: "videoPlayer", //跟上面video标签的id一致
+          protocol: "http:", //'http:' or 'https:'
           host: this.videoConfigHost, //'localhost:8080'自己内部的网址
-          rootpath: '/', // '/' or window.location.pathname
-          token: this.videoConfigToken,//可变参数
+          rootpath: "/", // '/' or window.location.pathname
+          token: this.videoConfigToken, //可变参数
           // streamprofile: this.videoConfigStreamprofile, // {string} - stream profile, main/sub or other predefine transcoding profile
-          hlsver: 'v1', //v1 is for ts, v2 is for fmp4
-          session: 'e312287e-d809-4b4b-a5d6-336e5006199f' //session got from login可变参数
+          hlsver: "v1", //v1 is for ts, v2 is for fmp4
+          session: "e312287e-d809-4b4b-a5d6-336e5006199f", //session got from login可变参数
         };
 
         this.cancelPlay();
@@ -529,9 +734,8 @@ export default {
 
         this.BASE.showMsg({
           type: "success",
-          msg: "播放组件初始化中...请稍后..."
+          msg: "播放组件初始化中...请稍后...",
         });
-
       });
     },
     selectTab: function (tab, index) {
@@ -543,8 +747,8 @@ export default {
       } else if (index === 2) {
         this.showVideoBox();
       }
-      if (tab.text == '消缺历史') {
-        this.searchH()
+      if (tab.text == "消缺历史") {
+        this.searchH();
       }
     },
   },
@@ -560,6 +764,8 @@ export default {
   justify-content: space-between;
   .left {
     width: 30%;
+    height: 100%;
+    background: rgba(96, 103, 105, 0.2);
     overflow-y: auto;
   }
   .right {
@@ -741,7 +947,7 @@ export default {
           position: relative;
           background-image: @greenLinearTop;
           &::after {
-            content: '';
+            content: "";
             position: absolute;
             width: 100%;
             height: 5px;

+ 109 - 72
src/views/powerCurve/index.vue

@@ -5,70 +5,127 @@
         <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
+              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
+              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-date-picker
+              v-model="recorddate"
+              type="month"
+              value-format="YYYY-MM"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+          </div>
+        </div>
       </div>
       <div class="query-actions">
         <button class="btn green" @click="search">搜索</button>
       </div>
     </div>
+    <ScatterLineChart
+      xTitle="风速)m/s("
+      yTitle="功率(kw)"
+      :height="'calc(100vh - 40px)'"
+      :lineData="chartLineData"
+      :data="chartData"
+    />
   </div>
 </template>
 
 <script>
+import ScatterLineChart from "@com/chart/combination/scatter-line-chart.vue";
 export default {
   // 名称
   name: "cutAnalyse",
 
   // 使用组件
-  components: {},
+  components: {
+    ScatterLineChart,
+  },
 
   // 数据
-  data () {
+  data() {
     return {
       isAsc: "asc",
       wpArray: [],
       wtArray: [],
       wpId: "",
       wtId: "",
-      chartData: [{
-        title: "",
-        yAxisIndex: 0,
-        value: []
-      }],
-      chartUnit: ["功率(MW)", "(m/s)"]
+      recorddate: new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
+        "yyyy-MM"
+      ),
+      chartLineData: {
+        xTitle: "风速",
+        yTitle: "功率",
+        legends: [],
+        data: [],
+      },
+      chartData: [
+        {
+          title: "",
+          value: [],
+        },
+      ],
     };
   },
 
   // 函数
   methods: {
     // 获取风场
-    getWp (reGetWp) {
+    getWp(reGetWp) {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAjax",
-        success (res) {
+        success(res) {
           that.wpArray = res.data;
           that.wpId = res.data[0].id;
           that.getWt(that.wpId, reGetWp);
-        }
+        },
       });
     },
 
     // 获取风机
-    getWt (wpid, reGetWp) {
+    getWt(wpid, reGetWp) {
       let that = this;
       if (that.wpId) {
         that.API.requestData({
@@ -76,94 +133,74 @@ export default {
           baseURL: "http://10.155.32.4:9001",
           subUrl: "benchmarking/wtList",
           data: {
-            wpid
+            wpid,
           },
-          success (res) {
+          success(res) {
             that.wtArray = res.data;
             that.wtId = res.data[0].id;
             if (!reGetWp) {
               that.getChartData();
             }
-          }
+          },
         });
       }
     },
 
     // 获取图表数据
-    getChartData () {
+    getChartData() {
       let that = this;
       that.API.requestData({
         method: "POST",
-        subUrl: "powersaturation/powersaturationamonutchart",
+        subUrl: "scatter/scatterWtAjax",
         data: {
-          wtId: that.wtId
+          wtId: that.wtId,
+          year: that.recorddate.split("-")[0],
+          month: that.recorddate.split("-")[1],
         },
-        success (res) {
-
-          const keyArray = [{
-            key: "value1",
-            title: "风速"
-          }, {
-            key: "value2",
-            title: "实际拟合功率"
-          }, {
-            key: "value3",
-            title: "最优拟合功率"
-          }, {
-            key: "value4",
-            title: "保证功率"
-          }];
-
-          let chartData = [{
-            title: "风速",
-            yAxisIndex: 1,
-            value: []
-          }, {
-            title: "实际拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "最优拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "保证功率",
-            yAxisIndex: 0,
-            value: []
-          }];
-
-          keyArray.forEach((keyEle, keyIndex) => {
-            res.data.forEach(ele => {
-              chartData[keyIndex].value.push({
-                text: "",
-                value: ele[keyEle.key]
-              });
-            });
+        success(res) {
+          let chartLineData = {
+            xTitle: "风速",
+            yTitle: "功率",
+            legends: [],
+            data: [[], []],
+          };
+
+          res.data.line.forEach((ele) => {
+            chartLineData.data[0].push(ele[0]);
+            chartLineData.data[1].push(ele[1]);
           });
 
+          let chartData = [
+            {
+              title: "功率曲线拟合",
+              value: res.data.scatter,
+            },
+          ];
+
+          that.chartLineData = chartLineData;
           that.chartData = chartData;
-        }
+        },
       });
     },
 
-    search () {
+    search() {
       if (!this.wpId || !this.wtId) {
         this.BASE.showMsg({
-          msg: '场站与风机为必选项'
+          msg: "场站与风机为必选项",
         });
       } else {
-        this.getTabData();
+        this.getChartData();
       }
-    }
+    },
   },
 
-  created () {
+  created() {
     this.getWp();
   },
 
-  mounted () { },
+  mounted() {},
 
-  unmounted () { },
+  unmounted() {},
 };
 </script>
 
@@ -192,7 +229,7 @@ export default {
     height: 30vh;
 
     &:before {
-      content: '';
+      content: "";
       width: 0.37vh;
       height: 0.37vh;
       background: @write;