Browse Source

文档1涉及BUG修改完成

Koishi 3 years ago
parent
commit
691ec3a9d0

+ 3 - 2
package.json

@@ -23,6 +23,8 @@
     "html2canvas": "^1.0.0-rc.7",
     "jquery": "^3.6.0",
     "jspdf": "^2.3.1",
+    "jszip": "^3.7.1",
+    "papaparse": "^5.3.1",
     "stompjs": "^2.3.3",
     "three": "^0.129.0",
     "vivus": "^0.4.6",
@@ -30,8 +32,7 @@
     "vue-axios": "^3.2.4",
     "vue-router": "^4.0.0-0",
     "vuex": "^4.0.0-0",
-    "xlsx": "^0.17.0",
-	"jszip": "^3.7.1"
+    "xlsx": "^0.17.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.5.0",

+ 40 - 11
src/components/coms/table/table.vue

@@ -2,7 +2,13 @@
   <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 }"
+          @click="onSort(col)"
+        >
           {{ col.name }}
         </th>
       </tr>
@@ -14,16 +20,36 @@
             v-for="(col, i) of data.column"
             :key="i"
             :style="{ width: col.width }"
-            :class="{ light: hoverRow == row || hoverCol == col, num: col.is_num, 'always-light': col.is_light || row.is_light }"
+            :class="{
+              light: hoverRow == row || hoverCol == col,
+              num: col.is_num,
+              'always-light': col.is_light || row.is_light,
+            }"
             @mouseenter="hover(row, col)"
             @mouseleave="leave()"
           >
-            <component :is="col.type ? col.type : 'span'" v-bind="col.props" v-html="template(col, row[col.field])" @click="onClick(col, row)"> </component>
+            <component
+              :is="col.type ? col.type : 'span'"
+              v-bind="col.props"
+              v-html="template(col, row[col.field])"
+              @click="onClick(col, row)"
+            >
+            </component>
           </td>
         </tr>
       </tbody>
     </el-scrollbar>
-    <el-pagination class="mg-t-8" v-if="pageable" @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize" :total="data.total" v-bind="elPaggingProps"> </el-pagination>
+    <el-pagination
+      class="mg-t-8"
+      v-if="pageable"
+      @current-change="handleCurrentChange"
+      @size-change="sizeChange"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      :total="data.total"
+      v-bind="elPaggingProps"
+    >
+    </el-pagination>
   </table>
 </template>
 
@@ -134,7 +160,7 @@ export default {
       }
     },
     pageable() {
-      return this.pageSize != 0;
+      return this.pageSize >= 0;
     },
     pages() {
       if (this.pageable) return parseInt(this.data.total / this.pageSize) + 1;
@@ -151,14 +177,14 @@ export default {
   },
   // 函数
   methods: {
-    clearCheckBox(time){
-      this.$nextTick(()=>{
-        setTimeout(()=>{
+    clearCheckBox(time) {
+      this.$nextTick(() => {
+        setTimeout(() => {
           const domArray = document.querySelectorAll(".curCheckBox");
-          for(let i=0;i<domArray.length;i++){
-            domArray[i].checked=false;
+          for (let i = 0; i < domArray.length; i++) {
+            domArray[i].checked = false;
           }
-        },(time || 300));
+        }, time || 300);
       });
     },
     onClick(col, data) {
@@ -203,6 +229,9 @@ export default {
         end: this.endRow,
       });
     },
+    sizeChange(res){
+      console.log(123123,res)
+    },
   },
   // 生命周期钩子
   beforeCreate() {

File diff suppressed because it is too large
+ 1056 - 916
src/views/Decision/Decision2Cjdb.vue


File diff suppressed because it is too large
+ 1016 - 887
src/views/Decision/Decision2Cndb.vue


File diff suppressed because it is too large
+ 1154 - 1005
src/views/Decision/Decision2Xldb.vue


File diff suppressed because it is too large
+ 1089 - 948
src/views/Decision/Decision2Xmdb.vue


File diff suppressed because it is too large
+ 1331 - 1177
src/views/Decision/Decision3.vue


File diff suppressed because it is too large
+ 587 - 512
src/views/Decision/Decision3Db.vue


+ 465 - 219
src/views/Decision/Decision4.vue

@@ -1,236 +1,482 @@
 <template>
-	<div class="decision-page-4">
-		<div class="query mg-b-8">
-			<div class="query-items">
-				
-				<div class="query-item">
-					<div class="lable">开始日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="value4" @change="BeginChange(value4)" 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="value5" @change="EndChange(value5)" 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>
-		<toolbar-panel title="值际对标" :showLine="false"></toolbar-panel>
-		<div class="mg-b-16">
-			<div class="project-table">
-				<Table :data="tableData"></Table>
-			</div>
-		</div>
-	</div>
+  <div class="decision-page-4">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">开始日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="value4"
+              @change="BeginChange(value4)"
+              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="value5"
+              @change="EndChange(value5)"
+              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 class="query-actions">
+          <button class="btn" @click="dbfx">对标分析</button>
+        </div>
+      </div>
+    </div>
+    <toolbar-panel title="值际对标" :showLine="false"></toolbar-panel>
+    <div class="mg-b-16">
+      <div class="project-table">
+        <Table :data="tableData" ref="curRef"></Table>
+      </div>
+    </div>
+    <el-dialog
+      title="对标排名分析"
+      v-model="dialogVisible"
+      width="70%"
+      top="10vh"
+      custom-class="modal"
+      :close-on-click-modal="false"
+    >
+      <dayinfo
+        :radarValue="radarValue"
+        :windNum="windNum"
+        :windNum2="windNum2"
+        :tabs="tabs"
+        :analyisDialog="analyisDialog"
+      />
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-	import MultipleBarChart from "../../components/chart/bar/multiple-bar-chart.vue";
-	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
-	import Panel from "../../components/coms/panel/panel.vue";
-	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
-	import Table from "../../components/coms/table/table.vue";
-	export default {
-		components: {
-			Panel,
-			Table,
-			SvgIcon,
-			MultipleBarChart,
-			ToolbarPanel
-		},
-		data() {
-			return {
-				tableData: {
-					column: [{
-							name: "",
-							field: "index",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "值际",
-							width:"200px",
-							field: "dutyname",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "理论发电量",
-							field: "theoreticalgeneratity",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "实际发电量",
-							field: "generatity",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "故障损失",
-							field: "faultloss",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "维护损失",
-							field: "mainloss",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "性能损失",
-							field: "performanceloss",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "限电损失",
-							field: "rationingloss",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "受累损失",
-							field: "involvesloss",
-							is_num: false,
-							is_light: false,
-						}
-					],
-					data: []
-				},
-				value4: "",
-				value5: "",
-			};
-		},
-		created() {
-			this.value4 = this.getTime(1);
-			this.value5 = this.getTime(2);
-			this.AjaxCommon();
-		},
-		methods: {
-			BeginChange(val) {
-				this.value4 = val;
-				this.AjaxCommon();
-			},
-			EndChange(val) {
-				this.value5 = val;
-				this.AjaxCommon();
-			},
-			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;
-				}
-			},
-			AjaxCommon() {
-				var that = this;
-				that.API.requestData({
-					method: "GET",
-					baseURL : "http://10.155.32.4:9001/",
-					subUrl: "benchmarking/zjwxssl",
-					data: {
-						beginDate: that.value4,
-						endDate: that.value5,
-					},
-					success(res) {
-						var data = [];
-						
-						res.data.forEach((item, index) => {
-							data.push({
-								index: index + 1,
-								dutyname: item.dutyname,
-								theoreticalgeneratity: item.theoreticalgeneratity,
-								generatity: item.generatity,
-								faultloss: item.faultloss,
-								mainloss: item.mainloss,
-								performanceloss: item.performanceloss,
-								rationingloss: item.rationingloss,
-								involvesloss: item.involvesloss,
-								is_light: false
-							})
-						})
-						that.tableData.data = data;
-					}
-				});
-			},
-		}
-	};
+import MultipleBarChart from "../../components/chart/bar/multiple-bar-chart.vue";
+import SvgIcon from "../../components/coms/icon/svg-icon.vue";
+import Panel from "../../components/coms/panel/panel.vue";
+import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
+import Table from "./table.vue";
+import Dayinfo from "./dayinfo.vue";
+export default {
+  components: {
+    Panel,
+    Table,
+    SvgIcon,
+    MultipleBarChart,
+    ToolbarPanel,
+    Dayinfo,
+  },
+  data() {
+    const that = this;
+    return {
+      tableIdArr: [], //放checkbox的id数组
+      tableId: [],
+      dbData: [],
+      dialogVisible: false,
+      analyisDialog: [],
+      radarValue: [],
+      windNum: "dd",
+      windNum2: "dd",
+      checkLength: 0,
+      tabs: [],
+      tableData: {
+        column: [
+          {
+            name: "",
+            field: "index",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "",
+            field: "check",
+            is_num: false,
+            is_light: false,
+            template() {
+              return "<input class='check curCheckBox checkItem' type='CheckBox'/>";
+            },
+            click(event, data) {
+              var dataId = that.tableIdArr[data.index - 1];
+              if (event.target.checked == false && that.checkLength <= 2) {
+                that.tableId.forEach((item, i) => {
+                  if (item == dataId) {
+                    that.tableId.splice(i, 1);
+                    that.dbData.splice(i, 1);
+                  }
+                });
+                that.checkLength--;
+              } else if (event.target.checked && that.checkLength < 2) {
+                that.tableId.push(dataId);
+                that.dbData.push(data);
+                that.checkLength++;
+              } else if (that.checkLength == 2) {
+                event.target.checked = false;
+              }
+            },
+          },
+          {
+            name: "值际",
+            width: "200px",
+            field: "dutyname",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "理论发电量",
+            field: "theoreticalgeneratity",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "实际发电量",
+            field: "generatity",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "故障损失",
+            field: "faultloss",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "维护损失",
+            field: "mainloss",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "性能损失",
+            field: "performanceloss",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "限电损失",
+            field: "rationingloss",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "受累损失",
+            field: "involvesloss",
+            is_num: false,
+            is_light: false,
+          },
+        ],
+        data: [],
+      },
+      value4: "",
+      value5: "",
+    };
+  },
+  created() {
+    this.value4 = this.getTime(1);
+    this.value5 = this.getTime(2);
+    this.AjaxCommon();
+  },
+  methods: {
+    BeginChange(val) {
+      this.value4 = val;
+      this.AjaxCommon();
+    },
+    EndChange(val) {
+      this.value5 = val;
+      this.AjaxCommon();
+    },
+    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;
+      }
+    },
+    AjaxCommon() {
+      var that = this;
+      that.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:9001/",
+        subUrl: "benchmarking/zjwxssl",
+        data: {
+          beginDate: that.value4,
+          endDate: that.value5,
+        },
+        success(res) {
+          var data = [];
+
+          res.data.forEach((item, index) => {
+            that.tableIdArr.push(index);
+            data.push({
+              index: index + 1,
+              dutyname: item.dutyname,
+              theoreticalgeneratity: item.theoreticalgeneratity,
+              generatity: item.generatity,
+              faultloss: item.faultloss,
+              mainloss: item.mainloss,
+              performanceloss: item.performanceloss,
+              rationingloss: item.rationingloss,
+              involvesloss: item.involvesloss,
+              is_light: false,
+            });
+          });
+          that.tableData.data = data;
+        },
+      });
+    },
+    dbfx() {
+      var that = this;
+      if (that.tableId.length == 2) {
+        that.dialogVisible = true;
+        this.AjaxDbfx();
+        this.clearDb();
+      }
+    },
+    clearDb() {
+      //清空对标状态
+      this.$refs.curRef.clearCheckBox();
+      this.tableId = [];
+      this.dbData = [];
+      this.checkLength = 0;
+    },
+    AjaxDbfx() {
+      var that = this;
+      var data = that.dbData;
+      that.windNum = data[0].name;
+      that.windNum2 = data[1].name;
+      that.tabs = [
+        {
+          name: "理论发电量",
+          windData1: data[0].theoreticalgeneratity,
+          windData2: data[1].theoreticalgeneratity,
+        },
+        {
+          name: "实际发电量",
+          windData1: data[0].generatity,
+          windData2: data[1].generatity,
+        },
+        {
+          name: "故障损失",
+          windData1: data[0].faultloss,
+          windData2: data[1].faultloss,
+        },
+        {
+          name: "维护损失",
+          windData1: data[0].mainloss,
+          windData2: data[1].mainloss,
+        },
+        {
+          name: "性能损失",
+          windData1: data[0].performanceloss,
+          windData2: data[1].performanceloss,
+        },
+        {
+          name: "限电损失",
+          windData1: data[0].rationingloss,
+          windData2: data[1].rationingloss,
+        },
+        {
+          name: "受累损失",
+          windData1: data[0].involvesloss,
+          windData2: data[1].involvesloss,
+        },
+      ];
+
+      that.radarValue = [
+        {
+          indicator: [
+            "理论发电量",
+            "实际发电量",
+            "故障损失",
+            "维护损失",
+            "性能损失",
+            "限电损失",
+            "受累损失",
+          ],
+          data: [
+            {
+              value: [
+                data[0].theoreticalgeneratity,
+                data[0].generatity,
+                data[0].faultloss,
+                data[0].mainloss,
+                data[0].performanceloss,
+                data[0].rationingloss,
+                data[0].involvesloss,
+              ],
+            },
+            {
+              value: [
+                data[1].theoreticalgeneratity,
+                data[1].generatity,
+                data[1].faultloss,
+                data[1].mainloss,
+                data[1].performanceloss,
+                data[1].rationingloss,
+                data[1].involvesloss,
+              ],
+            },
+          ],
+        },
+      ];
+
+      let analyis = [];
+      let theoreticalgeneratity = [];
+      let generatity = [];
+      let faultloss = [];
+      let mainloss = [];
+      let performanceloss = [];
+      let rationingloss = [];
+      let involvesloss = [];
+      data.forEach((item, index) => {
+        theoreticalgeneratity.push({
+          text: item.dutyname,
+          value: item.theoreticalgeneratity,
+        });
+        generatity.push({
+          text: item.dutyname,
+          value: item.generatity,
+        });
+        faultloss.push({
+          text: item.dutyname,
+          value: item.faultloss,
+        });
+        mainloss.push({
+          text: item.dutyname,
+          value: item.mainloss,
+        });
+        performanceloss.push({
+          text: item.dutyname,
+          value: item.performanceloss,
+        });
+        rationingloss.push({
+          text: item.dutyname,
+          value: item.rationingloss,
+        });
+        involvesloss.push({
+          text: item.dutyname,
+          value: item.involvesloss,
+        });
+      });
+
+      analyis.push(
+        {
+          title: "理论发电量",
+          yAxisIndex: 0,
+          value: theoreticalgeneratity,
+        },
+        {
+          title: "实际发电量",
+          yAxisIndex: 0,
+          value: generatity,
+        },
+        {
+          title: "故障损失",
+          yAxisIndex: 0,
+          value: faultloss,
+        },
+        {
+          title: "维护损失",
+          yAxisIndex: 0,
+          value: mainloss,
+        },
+        {
+          title: "性能损失",
+          yAxisIndex: 0,
+          value: performanceloss,
+        },
+        {
+          title: "限电损失",
+          yAxisIndex: 0,
+          value: rationingloss,
+        },
+        {
+          title: "受累损失",
+          yAxisIndex: 0,
+          value: involvesloss,
+        }
+      );
+      that.analyisDialog = analyis;
+    },
+  },
+};
 </script>
 
 <style lang="less">
-	.decision-page-4 {
-		.com-panel {
-			.panel-title {
-				color: @gray-l;
-			}
+.decision-page-4 {
+  .com-panel {
+    .panel-title {
+      color: @gray-l;
+    }
 
-			.tools {
-				display: flex;
+    .tools {
+      display: flex;
 
-				.tool-block {
-					display: flex;
-					align-items: center;
-					margin-left: 0.741vh;
+      .tool-block {
+        display: flex;
+        align-items: center;
+        margin-left: 0.741vh;
 
-					.legend {
-						flex: auto;
-						width: 0.741vh;
-						height: 0.741vh;
-						margin-right: 0.741vh;
+        .legend {
+          flex: auto;
+          width: 0.741vh;
+          height: 0.741vh;
+          margin-right: 0.741vh;
 
-						&.long {
-							width: 2.963vh;
-							height: 0.37vh;
-						}
-					}
+          &.long {
+            width: 2.963vh;
+            height: 0.37vh;
+          }
+        }
 
-					.legend-text {
-						color: @gray-l;
-						font-size: @fontsize-s;
-					}
-				}
-			}
-		}
+        .legend-text {
+          color: @gray-l;
+          font-size: @fontsize-s;
+        }
+      }
+    }
+  }
 
-		.project-table {
-			overflow: auto;
-			height:90vh;
-			tbody {
-				// height: 100vh;
-			}
+  .project-table {
+    overflow: auto;
+    height: 90vh;
+    tbody {
+      // height: 100vh;
+    }
 
-			th,
-			td {
-				color: #b2bdc0;
+    th,
+    td {
+      color: #b2bdc0;
 
-				&:nth-child(1) {
-					width: 50px;
-				}
+      &:nth-child(1) {
+        width: 50px;
+      }
 
-				&:nth-child(2) {
-					width: 50px;
-				}
-			}
-		}
-	}
+      &:nth-child(2) {
+        width: 50px;
+      }
+    }
+  }
+}
 </style>

+ 388 - 351
src/views/Decision/Decision4Czzl.vue

@@ -1,372 +1,409 @@
 <template>
-	<div class="decision-page-4">
-		<div class="query mg-b-8">
-			<div class="query-items">
-				<div class="query-item">
-					<div class="lable">开始日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="value4" @change="BeginChange(value4)" 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="value5" @change="EndChange(value5)" 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 class="decision-page-4">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">开始日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="value4"
+              @change="BeginChange(value4)"
+              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="value5"
+              @change="EndChange(value5)"
+              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>
+    <toolbar-panel title="操作指令统计" :showLine="false"></toolbar-panel>
+    <div class="mg-b-16">
+      <div class="project-table">
+        <Table :data="tableData"></Table>
+      </div>
+    </div>
 
-			</div>
-		</div>
-		<toolbar-panel title="操作指令统计" :showLine="false"></toolbar-panel>
-		<div class="mg-b-16">
-			<div class="project-table">
-				<Table :data="tableData"></Table>
-			</div>
-		</div>
-
-		<el-dialog :title="'操作:' + tabsTit" v-model="dialogVisible" width="20%" top="10vh" custom-class="modal"
-			:close-on-click-modal="false">
-			<div class="health-day-info">
-				<div class="body">
-					<div class="left">
-						<table class="table-form">
-							<tr>
-								<td class="white">风机</td>
-								<td class="white">时间</td>
-							</tr>
-							<tr v-for="item in tabs">
-								<td class="white">{{item.wtid}}</td>
-								<td class="white">{{item.time.substr(0, 10)}}</td>
-							</tr>
-						</table>
-					</div>
-				</div>
-			</div>
-		</el-dialog>
-		<!-- 点击哪个显示哪个的操作记录 -->
-	</div>
+    <el-dialog
+      :title="'操作:' + tabsTit"
+      v-model="dialogVisible"
+      width="20%"
+      top="10vh"
+      custom-class="modal"
+      :close-on-click-modal="false"
+    >
+      <div class="health-day-info">
+        <div class="body">
+          <div class="left">
+            <table class="table-form">
+              <tr>
+                <td class="white">风机</td>
+                <td class="white">时间</td>
+              </tr>
+              <tr v-for="item in tabs">
+                <td class="white">{{ item.wtid }}</td>
+                <td class="white">{{ item.time.substr(0, 10) }}</td>
+              </tr>
+            </table>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 点击哪个显示哪个的操作记录 -->
+  </div>
 </template>
 
 <script>
-	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 ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
-	export default {
-		components: {
-			Panel,
-			Table,
-			SvgIcon,
-			ToolbarPanel
-		},
-		data() {
-			let that = this;
-			return {
-				tableData: {
-					column: [{
-							name: "",
-							field: "index",
-							is_num: false,
-							is_light: false,
-						},
-						{
-							name: "值际",
-							field: "nameOfDuty",
-							is_num: false,
-							is_light: false,
-							width: "250px",
-						},
-						{
-							name: "启动",
-							field: "startCount",
-							is_num: false,
-							is_light: false,
-							param: 1,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						},
-						{
-							name: "停机",
-							field: "stopCount",
-							is_num: false,
-							is_light: false,
-							param: 2,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						},
-						{
-							name: "复位",
-							field: "resetCount",
-							is_num: false,
-							is_light: false,
-							param: 3,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						},
-						{
-							name: "维护",
-							field: "maintainCount",
-							is_num: false,
-							is_light: false,
-							param: 4,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						},
-						{
-							name: "取消维护",
-							field: "unmaintainCount",
-							is_num: false,
-							is_light: false,
-							param: 5,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						},
-						{
-							name: "挂牌检修",
-							field: "gpmaintainCount",
-							is_num: false,
-							is_light: false,
-							param: 6,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						},
-						{
-							name: "故障维修",
-							field: "gpfaultCount",
-							is_num: false,
-							is_light: false,
-							param: 7,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						}, {
-							name: "场内受累检修",
-							field: "gponsiteinvolvementMaintainCount",
-							is_num: false,
-							is_light: false,
-							param: 8,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						}, {
-							name: "场内受累故障",
-							field: "gponsiteinvolvementFaultCount",
-							is_num: false,
-							is_light: false,
-							param: 9,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						}, {
-							name: "场外受累电网",
-							field: "gpoffsiteaffectedgridCount",
-							is_num: false,
-							is_light: false,
-							param: 10,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						}, {
-							name: "场外受累天气",
-							field: "gpweatherOutsideCount",
-							is_num: false,
-							is_light: false,
-							param: 11,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						}, {
-							name: "取消挂牌",
-							field: "ungpCount",
-							is_num: false,
-							is_light: false,
-							param: 12,
-							click: function(event, data) {
-								that.ajaxClick(data.nameOfDuty, this.param)
-							}
-						}
-					],
-					data: []
-				},
-				value4: "",
-				value5: "",
-				dialogVisible: false,
-				tabs: [],
-				tabsTit: "",
-				tabsArr: ['启动', '停机', '复位', '维护', '取消维护', '挂牌检修', '故障维修', '场内受累检修', '场内受累故障', '场外受累电网', '场外受累天气', '取消挂牌'],
-			};
-		},
-		created() {
-			this.value4 = this.getTime(1);
-			this.value5 = this.getTime(2);
-			this.AjaxCommon();
-		},
-		methods: {
-			BeginChange(val) {
-				this.value4 = val;
-				this.AjaxCommon();
-			},
-			EndChange(val) {
-				this.value5 = val;
-				this.AjaxCommon();
-			},
-			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;
-				}
-			},
-			AjaxCommon() {
-				var that = this;
-				that.API.requestData({
-					method: "GET",
-					baseURL: "http://10.155.32.4:9001/",
-					subUrl: "benchmarking/zjlist",
-					data: {
-						beginDate: that.value4,
-						endDate: that.value5,
-					},
-					success(res) {
-						var data = [];
-						res.data.forEach((item, index) => {
-							data.push({
-								index: index + 1,
-								nameOfDuty: item.nameOfDuty,
-								startCount: item.startCount,
-								stopCount: item.stopCount,
-								resetCount: item.resetCount,
-								maintainCount: item.maintainCount,
-								unmaintainCount: item.unmaintainCount,
-								gpmaintainCount: item.gpmaintainCount,
-								gpfaultCount: item.gpfaultCount,
-								gponsiteinvolvementMaintainCount: item.gponsiteinvolvementMaintainCount,
-								gponsiteinvolvementFaultCount: item.gponsiteinvolvementFaultCount,
-								gpoffsiteaffectedgridCount: item.gpoffsiteaffectedgridCount,
-								gpweatherOutsideCount: item.gpweatherOutsideCount,
-								ungpCount: item.ungpCount,
-								is_light: false
-							})
-						})
-						that.tableData.data = data;
-					}
-				});
-			},
-			ajaxClick(dutyname, direct) {
-				var that = this;
-				that.tabsTit = that.tabsArr[direct - 1];
-				that.API.requestData({
-					method: "GET",
-					baseURL: "http://10.155.32.4:9001/",
-					subUrl: "benchmarking/zjdrill",
-					data: {
-						beginDate: that.value4,
-						endDate: that.value5,
-						dutyname: dutyname,
-						direct: direct,
-					},
-					success(res) {
-						if(res.data.length){
-							that.tabs = res.data;
-						}else{
-							that.tabs=[{wtid:'暂无数据',time:'暂无数据'}];
-						}
-						that.dialogVisible = true;
-					}
-				});
-			}
-		}
-	};
+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 ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
+export default {
+  components: {
+    Panel,
+    Table,
+    SvgIcon,
+    ToolbarPanel,
+  },
+  data() {
+    let that = this;
+    return {
+      tableData: {
+        column: [
+          {
+            name: "",
+            field: "index",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "值际",
+            field: "nameOfDuty",
+            is_num: false,
+            is_light: false,
+            width: "250px",
+          },
+          {
+            name: "启动",
+            field: "startCount",
+            is_num: false,
+            is_light: false,
+            param: 1,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "停机",
+            field: "stopCount",
+            is_num: false,
+            is_light: false,
+            param: 2,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "复位",
+            field: "resetCount",
+            is_num: false,
+            is_light: false,
+            param: 3,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "维护",
+            field: "maintainCount",
+            is_num: false,
+            is_light: false,
+            param: 4,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "取消维护",
+            field: "unmaintainCount",
+            is_num: false,
+            is_light: false,
+            param: 5,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "挂牌检修",
+            field: "gpmaintainCount",
+            is_num: false,
+            is_light: false,
+            param: 6,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "故障维修",
+            field: "gpfaultCount",
+            is_num: false,
+            is_light: false,
+            param: 7,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "场内受累检修",
+            field: "gponsiteinvolvementMaintainCount",
+            is_num: false,
+            is_light: false,
+            param: 8,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "场内受累故障",
+            field: "gponsiteinvolvementFaultCount",
+            is_num: false,
+            is_light: false,
+            param: 9,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "场外受累电网",
+            field: "gpoffsiteaffectedgridCount",
+            is_num: false,
+            is_light: false,
+            param: 10,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "场外受累天气",
+            field: "gpweatherOutsideCount",
+            is_num: false,
+            is_light: false,
+            param: 11,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+          {
+            name: "取消挂牌",
+            field: "ungpCount",
+            is_num: false,
+            is_light: false,
+            param: 12,
+            click: function (event, data) {
+              that.ajaxClick(data.nameOfDuty, this.param);
+            },
+          },
+        ],
+        data: [],
+      },
+      value4: "",
+      value5: "",
+      dialogVisible: false,
+      tabs: [],
+      tabsTit: "",
+      tabsArr: [
+        "启动",
+        "停机",
+        "复位",
+        "维护",
+        "取消维护",
+        "挂牌检修",
+        "故障维修",
+        "场内受累检修",
+        "场内受累故障",
+        "场外受累电网",
+        "场外受累天气",
+        "取消挂牌",
+      ],
+    };
+  },
+  created() {
+    this.value4 = this.getTime(1);
+    this.value5 = this.getTime(2);
+    this.AjaxCommon();
+  },
+  methods: {
+    BeginChange(val) {
+      this.value4 = val;
+      this.AjaxCommon();
+    },
+    EndChange(val) {
+      this.value5 = val;
+      this.AjaxCommon();
+    },
+    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;
+      }
+    },
+    AjaxCommon() {
+      var that = this;
+      that.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:9001/",
+        subUrl: "benchmarking/zjlist",
+        data: {
+          beginDate: that.value4,
+          endDate: that.value5,
+        },
+        success(res) {
+          var data = [];
+          res.data.forEach((item, index) => {
+            data.push({
+              index: index + 1,
+              nameOfDuty: item.nameOfDuty,
+              startCount: item.startCount,
+              stopCount: item.stopCount,
+              resetCount: item.resetCount,
+              maintainCount: item.maintainCount,
+              unmaintainCount: item.unmaintainCount,
+              gpmaintainCount: item.gpmaintainCount,
+              gpfaultCount: item.gpfaultCount,
+              gponsiteinvolvementMaintainCount:
+                item.gponsiteinvolvementMaintainCount,
+              gponsiteinvolvementFaultCount: item.gponsiteinvolvementFaultCount,
+              gpoffsiteaffectedgridCount: item.gpoffsiteaffectedgridCount,
+              gpweatherOutsideCount: item.gpweatherOutsideCount,
+              ungpCount: item.ungpCount,
+              is_light: false,
+            });
+          });
+          that.tableData.data = data;
+        },
+      });
+    },
+    ajaxClick(dutyname, direct) {
+      var that = this;
+      that.tabsTit = that.tabsArr[direct - 1];
+      that.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:9001/",
+        subUrl: "benchmarking/zjdrill",
+        data: {
+          beginDate: that.value4,
+          endDate: that.value5,
+          dutyname: dutyname,
+          direct: direct,
+        },
+        success(res) {
+          if (res.data.length) {
+            that.tabs = res.data;
+          } else {
+            that.tabs = [{ wtid: "暂无数据", time: "暂无数据" }];
+          }
+          that.dialogVisible = true;
+        },
+      });
+    },
+  },
+};
 </script>
 
 <style lang="less">
-	.decision-page-4 {
-		.com-panel {
-			.panel-title {
-				color: @gray-l;
-			}
+.decision-page-4 {
+  .com-panel {
+    .panel-title {
+      color: @gray-l;
+    }
 
-			.tools {
-				display: flex;
+    .tools {
+      display: flex;
 
-				.tool-block {
-					display: flex;
-					align-items: center;
-					margin-left: 0.741vh;
+      .tool-block {
+        display: flex;
+        align-items: center;
+        margin-left: 0.741vh;
 
-					.legend {
-						flex: auto;
-						width: 0.741vh;
-						height: 0.741vh;
-						margin-right: 0.741vh;
+        .legend {
+          flex: auto;
+          width: 0.741vh;
+          height: 0.741vh;
+          margin-right: 0.741vh;
 
-						&.long {
-							width: 2.963vh;
-							height: 0.37vh;
-						}
-					}
+          &.long {
+            width: 2.963vh;
+            height: 0.37vh;
+          }
+        }
 
-					.legend-text {
-						color: @gray-l;
-						font-size: @fontsize-s;
-					}
-				}
-			}
-		}
+        .legend-text {
+          color: @gray-l;
+          font-size: @fontsize-s;
+        }
+      }
+    }
+  }
 
-		.project-table {
-			overflow: auto;
-			height: 90vh;
+  .project-table {
+    overflow: auto;
+    height: 90vh;
 
-			tbody {
-				// height: 100vh;
-			}
+    tbody {
+      // height: 100vh;
+    }
 
-			th,
-			td {
-				color: #b2bdc0;
+    th,
+    td {
+      color: #b2bdc0;
 
-				&:nth-child(1) {
-					width: 50px;
-				}
+      &:nth-child(1) {
+        width: 50px;
+      }
 
-				&:nth-child(2) {
-					width: 50px;
-				}
-			}
-		}
+      &:nth-child(2) {
+        width: 50px;
+      }
+    }
+  }
 
-		.action {
-			text-decoration: underline;
-			color: @green;
-			cursor: pointer;
-		}
+  .action {
+    text-decoration: underline;
+    color: @green;
+    cursor: pointer;
+  }
 
-		.health-day-info .left {
-			max-height: 75vh;
-			overflow: auto;
-		}
-		
-	}
+  .health-day-info .left {
+    max-height: 75vh;
+    overflow: auto;
+  }
+}
 </style>

+ 4 - 4
src/views/NewPages/znzhfx.vue

@@ -73,7 +73,7 @@
         </panel>
       </div>
       <div class="mg-b-16">
-        <panel :title="'损失电量分析'" :showLine="true" >
+        <panel :title="'损失电量分析'" :showLine="true">
           <double-line-chart :height="'21.296vh'" :list="list" />
         </panel>
       </div>
@@ -507,9 +507,9 @@ export default {
       this.bar2data.data = arrwsdata;
       console.warn(this.bar2data);
     },
-	back(){
-		this.$router.go(-1);
-	}
+    back() {
+      this.$router.go(-1);
+    },
   },
 };
 </script>

+ 127 - 91
src/views/powerRank/index.vue

@@ -1,46 +1,75 @@
 <template>
   <div class="draught-fan-list">
     <div class="query mg-b-8">
-			<div class="query-items">
+      <div class="query-items">
         <div class="query-item">
-					<div class="lable">类型:</div>
-					<div class="search-input">
-						<el-select v-model="typeId" clearable placeholder="请选择"
-							popper-class="select" @change="renderWprray">
-							<el-option v-for="item in typeArray" :key="item.id" :value="item.id" :label="item.name" />
-						</el-select>
-					</div>
-				</div>
-				<div class="query-item">
-					<div class="lable">场站:</div>
-					<div class="search-input">
-						<el-select v-model="wpId" clearable placeholder="请选择"
-							popper-class="select">
-							<el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
-						</el-select>
-					</div>
-				</div>
-				<div class="query-item">
-					<div class="lable">开始日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="beginDate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
+          <div class="lable">类型:</div>
+          <div class="search-input">
+            <el-select
+              v-model="typeId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+              @change="renderWprray"
+            >
+              <el-option
+                v-for="item in typeArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
+            </el-select>
+          </div>
+        </div>
         <div class="query-item">
-					<div class="lable">结束日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="endDate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
-			</div>
-			<div class="query-actions">
-				<button class="btn green" @click="search()">搜索</button>
-			</div>
-		</div>
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select
+              v-model="wpId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in wpArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">开始日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="beginDate"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">结束日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="endDate"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search()">搜索</button>
+      </div>
+    </div>
     <div class="df-table">
       <ComTable height="100vh" :data="tableData"></ComTable>
     </div>
@@ -55,27 +84,32 @@ export default {
 
   // 使用组件
   components: {
-   ComTable
+    ComTable,
   },
 
   // 数据
   data() {
     const that = this;
     return {
-      isAsc:"asc",
-      typeArray:[{
-        id:"-1",
-        name:"风场"
-      },{
-        id:"-2",
-        name:"光伏电站"
-      }],
-      typeId:"-1",
-      wpArray:[],
-      wpId:"",
-      beginDate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
-      endDate:new Date().formatDate("yyyy-MM-dd"),
-      dialogShow:false,
+      isAsc: "asc",
+      typeArray: [
+        {
+          id: "-1",
+          name: "风场",
+        },
+        {
+          id: "-2",
+          name: "光伏电站",
+        },
+      ],
+      typeId: "-1",
+      wpArray: [],
+      wpId: "",
+      beginDate: new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
+        "yyyy-MM-dd"
+      ),
+      endDate: new Date().formatDate("yyyy-MM-dd"),
+      dialogShow: false,
       tableData: {
         column: [
           {
@@ -83,53 +117,53 @@ export default {
             field: "windfarm",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "风机",
             field: "windturbine",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "起始日期",
             field: "beginDate",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "截止日期",
             field: "endDate",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "平均风速",
             field: "speed",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "平均功率",
             field: "power",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "平均效率",
             field: "generatingCapacity",
             is_num: false,
             is_light: false,
-            sortable: true
-          }
+            sortable: true,
+          },
         ],
         data: [],
-      }
+      },
     };
   },
 
@@ -141,25 +175,25 @@ export default {
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAllAjax",
-        data:{
-          type:that.typeId
+        data: {
+          type: that.typeId,
         },
         success(res) {
           that.allWpArray = res.data;
           that.renderWprray();
-        }
+        },
       });
     },
 
-    renderWprray(){
+    renderWprray() {
       let wpArray = [];
-      this.allWpArray.forEach(ele=>{
-        if(this.typeId === "-1"){
-          if(ele.id.indexOf("FDC") !== -1){
+      this.allWpArray.forEach((ele) => {
+        if (this.typeId === "-1") {
+          if (ele.id.indexOf("FDC") !== -1) {
             wpArray.push(ele);
           }
-        }else{
-          if(ele.id.indexOf("GDC") !== -1){
+        } else {
+          if (ele.id.indexOf("GDC") !== -1) {
             wpArray.push(ele);
           }
         }
@@ -169,39 +203,41 @@ export default {
       this.getOutputSpeedList();
     },
 
-    getOutputSpeedList(){
+    getOutputSpeedList() {
       let that = this;
-      if(!that.typeId || !that.beginDate || !that.endDate){
+      if (!that.typeId || !that.beginDate || !that.endDate) {
         that.BASE.showMsg({
-          msg:"类型与日期不可为空"
+          msg: "类型与日期不可为空",
         });
-      }else{
+      } else {
         that.API.requestData({
           method: "POST",
           subUrl: "leaderboard/loadfactortoplist",
-          data:{
-            wpId:that.wpId,
-            type:that.typeId,
-            isAsc:that.isAsc,
-            beginDate:that.beginDate,
-            endDate:that.endDate,
-            orderByColumn:"",
+          data: {
+            wpId: that.wpId,
+            type: that.typeId,
+            isAsc: that.isAsc,
+            beginDate: that.beginDate,
+            endDate: that.endDate,
+            orderByColumn: "",
           },
           success(res) {
-            res.data.forEach(ele=>{
-              ele.beginDate=new Date(ele.beginDate).formatDate("yyyy-MM-dd");
-              ele.endDate=new Date(ele.beginDate).formatDate("yyyy-MM-dd");
-            })
+            res.data.forEach((ele) => {
+              ele.beginDate = new Date(ele.beginDate).formatDate("yyyy-MM-dd");
+              ele.endDate = new Date(ele.beginDate).formatDate("yyyy-MM-dd");
+            });
+            res.data.sort((a, b) => {
+              return b.power - a.power;
+            });
             that.tableData.data = res.data;
-          }
+          },
         });
       }
-      
     },
 
-    search(){
+    search() {
       this.getOutputSpeedList();
-    }
+    },
   },
 
   created() {
@@ -236,7 +272,7 @@ export default {
     overflow: hidden;
     flex-grow: 1;
     margin-top: 1.481vh;
-    height:80vh;
+    height: 80vh;
 
     &:before {
       content: "";

+ 3 - 3
src/views/report/weather.vue

@@ -33,7 +33,7 @@
 		</div>
 		<div class="table-box">
 			<div class="title">升压站报警</div>
-			<ComTable ref="curRef" :data="tableData" :pageSize="pageSize" @onPagging="onChangePage" height="73vh"
+			<ComTable ref="curRef" :data="tableData" :pageSize="pageSize" @onPagging="onChangePage" height="50vh"
 				v-loading="tableLoading" element-loading-text="拼命加载中.." element-loading-background="rgba(0, 0, 0, 0.8)">
 			</ComTable>
 		</div>
@@ -57,7 +57,7 @@
 				endDate: "",
 				tableLoading: true,
 				pageNum: 1,
-				pageSize: 20,
+				pageSize: [20],
 				tableData: {
 					column: [{
 						name: "记录日期",
@@ -210,7 +210,7 @@
 						startTs: this.startDate,
 						endTs: this.endDate,
 						pageNum: this.pageNum,
-						pageSize: this.pageSize,
+						pageSize: 20,
 					},
 					success(res) {
 						console.log(res)

+ 290 - 293
src/views/specific/fdl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "发电量");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "发电量");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/fdlList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/fdlList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 291 - 294
src/views/specific/fnlyl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,168 +30,167 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
       <el-col :span="24">
-        <panel title="公司利用率分析" :showLine="false">
+        <panel title="公司风能利用率分析" :showLine="false">
           <!-- <vertival-bar-line-chart
             :height="'360px'"
             :units="units"
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "风能利用率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "风能利用率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/fnlylList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/fnlylList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/fwjsl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "复位及时率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "复位及时率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/fwjslList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/fwjslList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/gzssl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "故障损失率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "故障损失率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/gzsslList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/gzsslList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/mtbf.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "MTBF");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "MTBF");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/mtbfList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/mtbfList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/mttr.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "MTTR");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "MTTR");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/mttrList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/mttrList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/slssl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "受累损失率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "受累损失率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/slsslList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/slsslList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 291 - 294
src/views/specific/whssl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,168 +276,166 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "维护损失率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "维护损失率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/whsslList",
-          data:{
-            year: year
-          },
-          success(res) {
-            console.log(res)
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/whsslList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          console.log(res);
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -541,8 +538,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/xdssl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "限电损失率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "限电损失率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/xdsslList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/xdsslList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/xnssl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "性能损失率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "性能损失率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/xnsslList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/xnsslList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/xqjsl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "消缺及时率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "消缺及时率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/xqjslList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/xqjslList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 290 - 293
src/views/specific/zhcydl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "综合场用电量");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "综合场用电量");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/zhcydlList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/zhcydlList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

File diff suppressed because it is too large
+ 1548 - 1466
src/views/specific/ztfx.vue


+ 290 - 293
src/views/specific/ztzhl.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="ztfx" >
+  <div class="ztfx">
     <div class="action-bar">
       <div class="query mg-b-16">
         <div class="query-items">
@@ -30,163 +30,162 @@
     <el-row :gutter="20" class="table-panel pdfDom">
       <el-col :span="24">
         <!-- <panel :title="'月度'" :showLine="false"> -->
-          <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
-              <thead>
+        <div class="table">
+          <table style="width: 100%" border="0" cellspacing="0">
+            <thead>
+              <tr>
+                <th rowspan="2" class="type1" style="width: 4vh"></th>
+                <template v-for="m of monthData" :key="m">
+                  <th style="width: 6vh" class="type1" rowspan="2">{{ m }}</th>
+                </template>
+              </tr>
+            </thead>
+          </table>
+          <div style="">
+            <table
+              style="width: 100%; text-align: center"
+              border="0"
+              cellspacing="0"
+            >
+              <tbody>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:4vh;"></th>
-                  <template v-for="m of monthData" :key="m">
-                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of MhsLists" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                
-              </thead>
-            </table>
-              <div style=" ">
-                <table
-                  style="width:100%;text-align:center;"
-                  border="0"
-                  cellspacing="0"
-                >
-                  <tbody>
-                    <tr>
-                      <td style="width:4vh;"></td>
-                      <template v-for="(x ,i) of MhsLists" :key="i">
-                        <td style="width:3vh;">本期</td>
-                        <td style="width:3vh;">同期</td>
+                <tr>
+                  <td class="td-item" style="width: 4vh">麻黄山</td>
+                  <template v-for="(item, index) of MhsLists" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">牛首山</td>
+                  <template v-for="(item, index) of NshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">青山</td>
+                  <template v-for="(item, index) of QshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">麻黄山</td>
-                      <template v-for="(item, index) of MhsLists" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">石板泉</td>
+                  <template v-for="(item, index) of SbaqList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">牛首山</td>
-                      <template v-for="(item, index) of NshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">青山</td>
-                      <template v-for="(item, index) of QshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">香山</td>
+                  <template v-for="(item, index) of XshList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">石板泉</td>
-                      <template v-for="(item, index) of SbaqList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">香山</td>
-                      <template v-for="(item, index) of XshList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <tr>
+                  <td class="td-item" style="width: 4vh">公司</td>
+                  <template v-for="(item, index) of GsList" :key="index">
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
                       </template>
-                    </tr>
-                    <tr>
-                      <td class="td-item" style="width:4vh;">公司</td>
-                      <template v-for="(item, index) of GsList" :key="index">
-                        <td style="width:3vh;">
-                          {{ item.current }}
-                          <template v-if="item.compare === -1">
-                            <span class="svg-icon svg-icon-yellow">
-                              <svg-icon svgid="svg-arrow-dpwn-1" />
-                            </span>
-                          </template>
-                          <template v-if="item.compare === 1">
-                            <span class="svg-icon svg-icon-green">
-                              <svg-icon svgid="svg-arrow-up-1" />
-                            </span>
-                          </template>
-                        </td>
-                        <td style="width:3vh;">
-                          {{ item.sameperiod }}
-                        </td>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
                       </template>
-                    </tr>
-                  </tbody>
-                </table>
-              </div>
-            <!-- </el-scrollbar> -->
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+              </tbody>
+            </table>
           </div>
+          <!-- </el-scrollbar> -->
+        </div>
       </el-col>
     </el-row>
     <el-row :gutter="20" class="table-panel">
@@ -199,18 +198,18 @@
             :lineData="lineData"
           /> -->
 
-          <MultipleLineChart  
-            :list="DayPower.value" 
-            :units="DayPower.units" 
-            height="40vh" :showLegend="true" 
+          <MultipleLineChart
+            :list="DayPower.value"
+            :units="DayPower.units"
+            height="40vh"
+            :showLegend="true"
           />
-           <!-- :units="units"
+          <!-- :units="units"
             :bardata="bardata"
             :lineData="lineData" -->
         </panel>
       </el-col>
     </el-row>
-      
   </div>
 </template>
 
@@ -229,7 +228,7 @@ export default {
     DualPieChart,
     SvgIcon,
     // VertivalBarLineChart,
-    MultipleLineChart
+    MultipleLineChart,
   },
   data() {
     return {
@@ -263,9 +262,9 @@ export default {
     };
   },
   created() {
-    let _this = this
+    let _this = this;
     // _this.$nextTick(() => {
-      _this.getLists(false);
+    _this.getLists(false);
     //   _this.timmer = setInterval(() => {
     //     _this.getLists(false)
     //   }, _this.$store.state.websocketTimeSec);
@@ -277,167 +276,165 @@ export default {
   },
   mounted() {},
   methods: {
-    exportPDF (name) {
+    exportPDF(name) {
       this.BASE.showMsg({
         type: "success",
-        msg: "正在导出...请稍后..."
+        msg: "正在导出...请稍后...",
       });
-      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "状态转换率");
+      Get_PDF.downloadPDF(document.querySelector(".pdfDom"), "状态转换率");
     },
-    getmonthValue(){
-      let year = new Date().getFullYear().toString()
-      return year
+    getmonthValue() {
+      let year = new Date().getFullYear().toString();
+      return year;
     },
     onClickSearch() {
-      this.getLists(false)
+      this.getLists(false);
     },
-    monthChange(data){
+    monthChange(data) {
       let year = data.getFullYear().toString();
-      return year
+      return year;
     },
 
     isNumber(val) {
-      return typeof val === 'number' && !isNaN(val)
+      return typeof val === "number" && !isNaN(val);
     },
     getLists(showLoading) {
-      let MhsLists = []
-      let NshList= []
-      let QshList= []
-      let SbaqList= []
-      let XshList= []
-      let GsList= []
-      let _this = this
-      let year = ''
-      if (typeof(this.monthValue) === 'string') {
-        year = this.monthValue
+      let MhsLists = [];
+      let NshList = [];
+      let QshList = [];
+      let SbaqList = [];
+      let XshList = [];
+      let GsList = [];
+      let _this = this;
+      let year = "";
+      if (typeof this.monthValue === "string") {
+        year = this.monthValue;
       } else {
-        year = this.monthChange(this.monthValue)
+        year = this.monthChange(this.monthValue);
       }
-      const site = ['compare', 'year', 'month']
+      const site = ["compare", "year", "month"];
       _this.API.requestData({
-          showLoading,
-          method: "GET",
-          baseURL: 'http://10.155.32.4:8034',
-          subUrl: "/specific/ztzhlList",
-          data:{
-            year: year
-          },
-          success(res) {
-            _this.list = res.data.map(item => {
-              for (let key in item) {
-                if (!site.includes(key)) {
-                  if(_this.isNumber(item[key])) {
-                    item[key] = item[key].toFixed(2)
-                  } else if (!item[key]){
-                    item[key] = 0
-                    item[key] = item[key].toFixed(2)
-                  }
+        showLoading,
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034",
+        subUrl: "/specific/ztzhlList",
+        data: {
+          year: year,
+        },
+        success(res) {
+          _this.list = res.data.map((item) => {
+            for (let key in item) {
+              if (!site.includes(key)) {
+                if (_this.isNumber(item[key])) {
+                  item[key] = item[key].toFixed(2);
+                } else if (!item[key]) {
+                  item[key] = 0;
+                  item[key] = item[key].toFixed(2);
                 }
-                
-              }
-              if (item.wpid === 'MHS_FDC') {
-                MhsLists.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'QS_FDC') {
-                QshList.push(item)
-              } else if (item.wpid === 'NSS_FDC') {
-                NshList.push(item)
-              } else if (item.wpid === 'SBQ_FDC') {
-                SbaqList.push(item)
-              } else if (item.wpid === 'XS_FDC') {
-                XshList.push(item)
-              } else {
-                GsList.push(item)
               }
-            })
+            }
+            if (item.wpid === "MHS_FDC") {
+              MhsLists.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "QS_FDC") {
+              QshList.push(item);
+            } else if (item.wpid === "NSS_FDC") {
+              NshList.push(item);
+            } else if (item.wpid === "SBQ_FDC") {
+              SbaqList.push(item);
+            } else if (item.wpid === "XS_FDC") {
+              XshList.push(item);
+            } else {
+              GsList.push(item);
+            }
+          });
 
-            _this.MhsLists = MhsLists.sort(_this.compare('month'))
-            _this.NshList= NshList.sort(_this.compare('month'))
-            _this.QshList= QshList.sort(_this.compare('month'))
-            _this.SbaqList= SbaqList.sort(_this.compare('month'))
-            _this.XshList= XshList.sort(_this.compare('month'))
-            _this.GsList= GsList.sort(_this.compare('month'))
+          _this.MhsLists = MhsLists.sort(_this.compare("month"));
+          _this.NshList = NshList.sort(_this.compare("month"));
+          _this.QshList = QshList.sort(_this.compare("month"));
+          _this.SbaqList = SbaqList.sort(_this.compare("month"));
+          _this.XshList = XshList.sort(_this.compare("month"));
+          _this.GsList = GsList.sort(_this.compare("month"));
 
-            let nowCureent = []
-            let sameCureent = []
-            let monthData = []
-            let monthsAll = []
-            _this.GsList.map(item => {
-              let objs = {}
-              let obj = {}
-              monthsAll.push(item.month)
-              if (item.month > 10) {
-                objs.text = item.month.toString()
-                obj.text = item.month.toString()
-              } else {
-                item.text = '0'+ item.month
-                objs.text = item.text
-                obj.text = item.text
-              }
-              for (let key in item) {
-                if (key === 'current') {
-                  objs.value = item.current
-                  nowCureent.push(objs)
-                } else if (key === 'sameperiod'){
-                  obj.value = item.sameperiod
-                  sameCureent.push(obj)
-                }
-                
+          let nowCureent = [];
+          let sameCureent = [];
+          let monthData = [];
+          let monthsAll = [];
+          _this.GsList.map((item) => {
+            let objs = {};
+            let obj = {};
+            monthsAll.push(item.month);
+            if (item.month > 10) {
+              objs.text = item.month.toString();
+              obj.text = item.month.toString();
+            } else {
+              item.text = "0" + item.month;
+              objs.text = item.text;
+              obj.text = item.text;
+            }
+            for (let key in item) {
+              if (key === "current") {
+                objs.value = item.current;
+                nowCureent.push(objs);
+              } else if (key === "sameperiod") {
+                obj.value = item.sameperiod;
+                sameCureent.push(obj);
               }
-            })
-            _this.monthData = monthsAll
-            _this.DayPower = {
-              // 图表所用单位
-              units: [""],
-              value: [
-                {
-                  title: "本期",
-                  yAxisIndex: 0, // 使用单位
-                  value: nowCureent,
-                  // nowCureent
-                },
-                {
-                  title: "同期",
-                  yAxisIndex: 0, // 使用单位
-                  value: sameCureent,
-                  // sameCureent
-                },
-              ],
             }
+          });
+          _this.monthData = monthsAll;
+          _this.DayPower = {
+            // 图表所用单位
+            units: [""],
+            value: [
+              {
+                title: "本期",
+                yAxisIndex: 0, // 使用单位
+                value: nowCureent,
+                // nowCureent
+              },
+              {
+                title: "同期",
+                yAxisIndex: 0, // 使用单位
+                value: sameCureent,
+                // sameCureent
+              },
+            ],
+          };
 
-            // _this.DayPower = {
-            //   // 图表所用单位
-            //   units: [""],
-            //   value: [
-            //     {
-            //       title: "本期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //     {
-            //       title: "同期",
-            //       yAxisIndex: 0, // 使用单位
-            //       value: [],
-            //     },
-            //   ],
-            // },
-            // _this.bardata.legend = ["本期", "同期"]
-            // _this.lineData = [];
-            // _this.bardata.area = monthData;
-            // _this.bardata.data[0] = sameCureent;
-            // _this.bardata.data[1] = nowCureent;
-          }
-      })
+          // _this.DayPower = {
+          //   // 图表所用单位
+          //   units: [""],
+          //   value: [
+          //     {
+          //       title: "本期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //     {
+          //       title: "同期",
+          //       yAxisIndex: 0, // 使用单位
+          //       value: [],
+          //     },
+          //   ],
+          // },
+          // _this.bardata.legend = ["本期", "同期"]
+          // _this.lineData = [];
+          // _this.bardata.area = monthData;
+          // _this.bardata.data[0] = sameCureent;
+          // _this.bardata.data[1] = nowCureent;
+        },
+      });
     },
     compare(property) {
       return (a, b) => {
-        let val1 = a[property]
-        let val2 = b[property]
-        return val1 - val2
-      }
-    }
-  }
+        let val1 = a[property];
+        let val2 = b[property];
+        return val1 - val2;
+      };
+    },
+  },
 };
 </script>
 
@@ -540,8 +537,8 @@ export default {
   }
   .pie-chart-panel {
     margin-top: 10px;
-    .line{
-      border:none;
+    .line {
+      border: none;
     }
   }
 }

+ 19 - 8
src/views/totalPowerRank/index.vue

@@ -46,7 +46,7 @@
           <div class="search-input">
             <el-date-picker
               v-model="beginDate"
-              type="date"
+              type="month"
               value-format="YYYY-MM-DD"
               placeholder="选择日期"
               popper-class="date-select"
@@ -59,7 +59,7 @@
           <div class="search-input">
             <el-date-picker
               v-model="endDate"
-              type="date"
+              type="month"
               value-format="YYYY-MM-DD"
               placeholder="选择日期"
               popper-class="date-select"
@@ -98,9 +98,9 @@ export default {
       wpArray: [],
       wpId: [],
       beginDate: new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
-        "yyyy-MM-dd"
+        "yyyy-MM"
       ),
-      endDate: new Date().formatDate("yyyy-MM-dd"),
+      endDate: new Date().formatDate("yyyy-MM"),
       dialogShow: false,
       tableData: {
         column: [
@@ -199,11 +199,14 @@ export default {
       let wpArray = [];
       if (!this.wpIps) {
         this.wpIps = []
-          .concat(this.typeArray[1].id.split(","), this.typeArray[2].id.split(","))
+          .concat(
+            this.typeArray[1].id.split(","),
+            this.typeArray[2].id.split(",")
+          )
           .toString();
       }
       this.allWpArray.forEach((ele) => {
-        if (this.wpIps.indexOf("FDC") !== -1) { 
+        if (this.wpIps.indexOf("FDC") !== -1) {
           if (ele.id.indexOf("FDC") !== -1) {
             wpArray.push(ele);
           }
@@ -233,8 +236,13 @@ export default {
           data: {
             wpIps: that.wpId.length ? that.wpId.toString() : that.wpIps,
             isAsc: that.isAsc,
-            beginDate: that.beginDate,
-            endDate: that.endDate,
+            beginDate: that.beginDate + "-01",
+            endDate:
+              that.endDate +
+              "-" +
+              (new Date().getDate() < 10
+                ? "0" + new Date().getDate()
+                : new Date().getDate()),
             orderByColumn: "",
           },
           success(res) {
@@ -242,6 +250,9 @@ export default {
               ele.beginDate = new Date(ele.beginDate).formatDate("yyyy-MM-dd");
               ele.endDate = new Date(ele.beginDate).formatDate("yyyy-MM-dd");
             });
+            res.data.sort((a, b) => {
+              return b.power - a.power;
+            });
             that.tableData.data = res.data;
           },
         });