Преглед на файлове

对标页面筛选框样式修改

baiyanting преди 1 година
родител
ревизия
df225f3c19
променени са 17 файла, в които са добавени 689 реда и са изтрити 1522 реда
  1. 349 35
      src/components/headerBtns/HeaderMultiBtn.vue
  2. 20 5
      src/store/reactive/ecorganization.js
  3. 0 149
      src/views/layout/economicsOperation/analyse/brandAnalyse/components/powerDetails.vue
  4. 10 79
      src/views/layout/economicsOperation/benchmarkingManagement/companyBenchmarking/index.vue
  5. 28 102
      src/views/layout/economicsOperation/benchmarkingManagement/intervalBenchmarking/index.vue
  6. 20 171
      src/views/layout/economicsOperation/benchmarkingManagement/loseRate/index.vue
  7. 25 270
      src/views/layout/economicsOperation/benchmarkingManagement/machineBenchmarking/index.vue
  8. 37 174
      src/views/layout/economicsOperation/benchmarkingManagement/projectBenchmarking/index.vue
  9. 37 234
      src/views/layout/economicsOperation/benchmarkingManagement/quarterBenchmarking/index.vue
  10. 1 1
      src/views/layout/economicsOperation/benchmarkingManagement/siteBenchmarking/index.vue
  11. 37 205
      src/views/layout/economicsOperation/benchmarkingManagement/wiringBenchmarking/index.vue
  12. 57 46
      src/views/layout/economicsOperation/companyHomepage/index.vue
  13. 56 45
      src/views/layout/economicsOperation/companyHomepage/indexGf.vue
  14. 2 1
      src/views/layout/economicsOperation/homePage/components/card.vue
  15. 2 2
      src/views/layout/economicsOperation/homePage/index.vue
  16. 6 2
      src/views/layout/economicsOperation/homePage/indexGF.vue
  17. 2 1
      src/views/layout/economicsOperation/performanceAnalyse/performanceAssess/dayDetailInfo.vue

+ 349 - 35
src/components/headerBtns/HeaderMultiBtn.vue

@@ -14,11 +14,11 @@
       :data="level2"
       :disabled="disabled"
       v-model="level2Check"
-      :placeholder="level2?.[0]?.aname"
+      :placeholder="placeholder"
       labelKey="aname"
       valueKey="id"
       :clearable="true"
-      multiple
+      :multiple="multipleComp"
       class="multipre"
       style="margin-right: 8px; width: 180px"
     >
@@ -35,6 +35,7 @@
       v-show="
         level3.length &&
         (select == 'brand' ||
+          select == 'station' ||
           select == 'project' ||
           select == 'line' ||
           select == 'square' ||
@@ -61,6 +62,63 @@
       multiple
       style="width: 160px"
     />
+    <eselect
+      :disabled="disabled"
+      v-show="
+        level5.length &&
+        (select == 'project' ||
+          select == 'line' ||
+          select == 'square' ||
+          select == 'wind')
+      "
+      :data="level5"
+      v-model="level5Check"
+      placeholder="全部期次"
+      labelKey="aname"
+      :clearable="true"
+      valueKey="id"
+      multiple
+      style="margin-right: 8px; width: 160px"
+    />
+    <eselect
+      :disabled="disabled"
+      v-show="
+        level6.length &&
+        (select == 'line' || select == 'square' || select == 'wind')
+      "
+      :data="level6"
+      v-model="level6Check"
+      placeholder="全部线路"
+      labelKey="nemName"
+      :clearable="true"
+      valueKey="id"
+      multiple
+      style="margin-right: 8px; width: 160px"
+    />
+    <eselect
+      :disabled="disabled"
+      v-show="level7.length && (select == 'square' || select == 'wind')"
+      :data="level7"
+      v-model="level7Check"
+      placeholder="全部阵区"
+      labelKey="aname"
+      :clearable="true"
+      valueKey="id"
+      multiple
+      style="margin-right: 8px; width: 160px"
+    />
+    <eselect
+      :disabled="disabled"
+      v-show="level8.length && select == 'wind'"
+      :data="level8"
+      v-model="level8Check"
+      placeholder="全部设备"
+      labelKey="aname"
+      :clearable="true"
+      valueKey="id"
+      multiple
+      style="margin-right: 8px; width: 160px"
+    />
   </el-row>
 </template>
 <script>
@@ -68,6 +126,10 @@ import {
   GetStationByCompany,
   GetOrganization,
   GetModelList,
+  GetProjectList,
+  GetLineList,
+  GetSquareList,
+  GeWtList,
 } from "@/api/headerNav.js";
 import eselect from "@/components/eselect/index.vue";
 import { Debounce } from "@/utils/common";
@@ -85,8 +147,8 @@ export default {
   },
   props: {
     type: {
-      type: String,
-      default: "-2",
+      type: Number,
+      default: -2,
     },
     select: {
       type: String,
@@ -102,20 +164,48 @@ export default {
     disabled: {
       default: false,
     },
+    multipleComp: { default: true },
+    benchFlag: { default: false },
+    benchObj: { default: {} },
   },
   data() {
     return {
       //风光类型
-      level1Check: this.type.toString(),
+      level1Check: this.type,
       // 公司
-      level2Check: [],
+      level2Check: this.multipleComp
+        ? this.benchFlag
+          ? this.benchObj.companys
+          : []
+        : "",
       // 场站
       level3Check: [],
       // 型号
       level4Check: [],
+      // 期次
+      level5Check: [],
+      // 线路
+      level6Check: [],
+      // 阵区
+      level7Check: [],
+      // 设备
+      level8Check: [],
     };
   },
   computed: {
+    placeholder() {
+      return this.multipleComp
+        ? this.benchFlag
+          ? this.level2Check.length
+            ? ""
+            : this.level2[0]?.aname
+          : this.level2[0]?.aname
+        : this.benchFlag
+        ? this.level2Check.length
+          ? ""
+          : this.level2[0]?.aname
+        : this.level2[0]?.aname;
+    },
     level1() {
       return this.level1Map.value;
     },
@@ -138,45 +228,132 @@ export default {
     },
     // 场站列表
     level3() {
-      if (!this.level2Check.length) {
+      if (this.multipleComp) {
+        if (!this.level2Check.length) {
+          return [];
+        }
+        const r = [];
+        this.level2Check.forEach((c) => {
+          const cl = this.level3Map[c];
+          if (!cl) {
+            this.getPowerStation(this.level1Check, c);
+          } else {
+            cl.length && r.push(...cl);
+          }
+        });
+        return [...new Set(r)];
+      } else {
+        if (!this.level2Check.length) {
+          return [];
+        } else {
+          const r = [];
+          const cl = this.level3Map[this.level2Check];
+          if (!cl) {
+            this.getPowerStation(this.level1Check, this.level2Check);
+          } else {
+            cl.length && r.push(...cl);
+          }
+          return [...new Set(r)];
+        }
+      }
+    },
+    // 型号列表
+    level4() {
+      if (this.select == "brand") {
+        if (!this.level3Check.length) {
+          return [];
+        }
+        const r = [];
+        this.level3Check.forEach((c) => {
+          const cl = this.level4Map[c];
+          if (!cl) {
+            this.getBrand(c);
+          } else {
+            cl.length && r.push(...cl);
+          }
+        });
+        return [...new Set(r.map((i) => i.modelId))].map((i) => ({
+          modelId: i,
+        }));
+      } else {
+        return [];
+      }
+    },
+    // 期次列表
+    level5() {
+      if (!this.level3Check.length) {
         return [];
       }
       const r = [];
-      this.level2Check.forEach((c) => {
-        const cl = this.level3Map[c];
+      this.level3Check.forEach((c) => {
+        const cl = this.level5Map[c];
         if (!cl) {
-          this.getPowerStation(this.level1Check, c);
+          this.getProject(c);
         } else {
           cl.length && r.push(...cl);
         }
       });
       return [...new Set(r)];
     },
-    // 型号列表
-    level4() {
-      if (!this.level3Check.length) {
+    // 线路列表
+    level6() {
+      if (!this.level5Check.length) {
         return [];
       }
       const r = [];
-      this.level3Check.forEach((c) => {
-        const cl = this.level4Map[c];
+      this.level5Check.forEach((c) => {
+        const cl = this.level6Map[c];
         if (!cl) {
-          this.getBrand(c);
+          this.getLine(c);
         } else {
           cl.length && r.push(...cl);
         }
       });
-      return [...new Set(r.map((i) => i.modelId))].map((i) => ({
-        modelId: i,
-      }));
+      return [...new Set(r)];
+    },
+    // 阵区列表
+    level7() {
+      if (!this.level6Check.length) {
+        return [];
+      }
+      const r = [];
+      this.level6Check.forEach((c) => {
+        const cl = this.level7Map[c];
+        if (!cl) {
+          this.getSquare(c);
+        } else {
+          cl.length && r.push(...cl);
+        }
+      });
+      return [...new Set(r)];
+    },
+    // 设备列表
+    level8() {
+      if (!this.level7Check.length) {
+        return [];
+      }
+      const r = [];
+      this.level7Check.forEach((c) => {
+        const cl = this.level8Map[c];
+        if (!cl) {
+          this.getWind(c);
+        } else {
+          cl.length && r.push(...cl);
+        }
+      });
+      return [...new Set(r)];
     },
 
     checks() {
       return [
         this.level1Check,
-        this.level2Check.join(","),
+        this.multipleComp ? this.level2Check.join(",") : this.level2Check,
         this.level3Check.join(","),
         this.level4Check.join(","),
+        this.level5Check.join(","),
+        this.level6Check.join(","),
+        this.level7Check.join(","),
+        this.level8Check.join(","),
       ].join("|");
     },
   },
@@ -192,30 +369,121 @@ export default {
       immediate: true,
     },
     level2Check(n, old) {
-      console.log(n, old);
+      if (this.multipleComp) {
+        if (n.length < old.length) {
+          // 删除选项了 需要检查删除选中的lv3的
+          const newCheck = [];
+          const arr = old.filter((i) => !n.includes(i));
+          arr.forEach((item) => {
+            const l2arr = this.level3Map[item].map?.((it) => it.id) ?? [];
+            newCheck.push(...l2arr);
+          });
+          this.level3Check = this.level3Check.filter(
+            (item) => !newCheck.includes(item)
+          );
+        }
+      } else {
+        this.level3Check = this.benchFlag
+          ? n != this.benchObj?.companys
+            ? []
+            : this.benchObj?.stations
+            ? this.benchObj?.stations
+            : []
+          : [];
+      }
+    },
+    level3Check(n, old) {
+      if (n.length < old.length) {
+        // 删除选项了 需要检查删除选中的lv3的
+        if (this.select == "brand") {
+          const newCheck = [];
+          const arr = old.filter((i) => !n.includes(i));
+          arr.forEach((item) => {
+            const l3arr = this.level4Map[item].map?.((it) => it.modelId) ?? [];
+            newCheck.push(...l3arr);
+          });
+          this.level4Check = this.level4Check.filter(
+            (item) => !newCheck.includes(item)
+          );
+        } else if (this.select != "station") {
+          const newCheck = [];
+          const arr = old.filter((i) => !n.includes(i));
+          arr.forEach((item) => {
+            const l3arr = this.level5Map[item].map?.((it) => it.id) ?? [];
+            newCheck.push(...l3arr);
+          });
+          this.level5Check = this.level5Check.filter(
+            (item) => !newCheck.includes(item)
+          );
+        }
+      } else {
+        if (this.benchFlag) {
+          if (n != this.benchObj?.stations) {
+            this.level5Check = [];
+          } else {
+            this.level5Check = this.benchObj?.projects
+              ? this.benchObj?.projects
+              : [];
+          }
+        }
+      }
+    },
+    level5Check(n, old) {
+      if (n.length < old.length) {
+        // 删除选项了 需要检查删除选中的lv3的
+        const newCheck = [];
+        const arr = old.filter((i) => !n.includes(i));
+        arr.forEach((item) => {
+          const l5arr = this.level6Map[item].map?.((it) => it.id) ?? [];
+          newCheck.push(...l5arr);
+        });
+        this.level6Check = this.level6Check.filter(
+          (item) => !newCheck.includes(item)
+        );
+      } else {
+        if (this.benchFlag) {
+          if (n != this.benchObj?.projects) {
+            this.level6Check = [];
+          } else {
+            this.level6Check = this.benchObj?.lines ? this.benchObj?.lines : [];
+          }
+        }
+      }
+    },
+    level6Check(n, old) {
       if (n.length < old.length) {
         // 删除选项了 需要检查删除选中的lv3的
         const newCheck = [];
         const arr = old.filter((i) => !n.includes(i));
         arr.forEach((item) => {
-          const l2arr = this.level3Map[item].map?.((it) => it.id) ?? [];
-          newCheck.push(...l2arr);
+          const l6arr = this.level7Map[item].map?.((it) => it.id) ?? [];
+          newCheck.push(...l6arr);
         });
-        this.level3Check = this.level3Check.filter(
+        this.level7Check = this.level7Check.filter(
           (item) => !newCheck.includes(item)
         );
+      } else {
+        if (this.benchFlag) {
+          if (n != this.benchObj?.lines) {
+            this.level7Check = [];
+          } else {
+            this.level7Check = this.benchObj?.squares
+              ? this.benchObj?.squares
+              : [];
+          }
+        }
       }
     },
-    level3Check(n, old) {
+    level7Check(n, old) {
       if (n.length < old.length) {
         // 删除选项了 需要检查删除选中的lv3的
         const newCheck = [];
         const arr = old.filter((i) => !n.includes(i));
         arr.forEach((item) => {
-          const l3arr = this.level4Map[item].map?.((it) => it.modelId) ?? [];
-          newCheck.push(...l3arr);
+          const l7arr = this.level8Map[item].map?.((it) => it.id) ?? [];
+          newCheck.push(...l7arr);
         });
-        this.level4Check = this.level4Check.filter(
+        this.level8Check = this.level8Check.filter(
           (item) => !newCheck.includes(item)
         );
       }
@@ -235,22 +503,28 @@ export default {
         companys: this.level2Check,
         stations: this.level3Check,
         brands: this.level4Check,
-        values: this.level4Check.length
-          ? this.level4Check
-          : this.level3Check.length
-          ? this.level3Check
-          : this.level2Check,
+        projects: this.level5Check,
+        lines: this.level6Check,
+        squares: this.level7Check,
+        winds: this.level8Check,
       });
     }, 500);
   },
   methods: {
+    initBench({ type, companys }) {
+      this.level1Check = type;
+      this.level2Check = companys;
+    },
+    // init() {
+    //   this.level2Check = this.level2[0].id;
+    //   this.level3Check = this.level3.slice(0, 2).map((i) => i.id);
+    // },
     //获取风光类型
     gettypeData() {
       const data = this.typeOptions;
       const df = data.map((i) => ({
         ...i,
         icon: i.type,
-        type: String(i.type),
       }));
       this.setLevel1(df);
     },
@@ -259,6 +533,9 @@ export default {
       const { data } = await GetOrganization({ type });
       if (data && data.length > 0) {
         this.setLevel2(type, data);
+        if (this.select == "wind") {
+          this.level2Check = this.level2[0].id;
+        }
       } else {
         this.setLevel2(type, []);
       }
@@ -271,15 +548,52 @@ export default {
       });
       if (data) {
         this.setLevel3(checkNode, data);
+        if (this.select == "wind") {
+          this.level3Check = this.level3.slice(0, 1).map((i) => i.id);
+        }
       }
     },
-    //获取场站信息
+    //获取型号信息
     async getBrand(checkNode) {
       const { data } = await GetModelList(checkNode);
       if (data) {
         this.setLevel4(checkNode, data);
       }
     },
+    //获取期次信息
+    async getProject(checkNode) {
+      const { data } = await GetProjectList(checkNode);
+      if (data) {
+        this.setLevel5(checkNode, data);
+        if (this.select == "wind") {
+          this.level5Check = this.level5.slice(0, 1).map((i) => i.id);
+        }
+      }
+    },
+    //获取线路信息
+    async getLine(checkNode) {
+      const { data } = await GetLineList(checkNode);
+      if (data) {
+        this.setLevel6(checkNode, data);
+        if (this.select == "wind") {
+          this.level6Check = this.level6.slice(0, 1).map((i) => i.id);
+        }
+      }
+    },
+    //获取阵区信息
+    async getSquare(checkNode) {
+      const { data } = await GetSquareList(checkNode);
+      if (data) {
+        this.setLevel7(checkNode, data);
+      }
+    },
+    //获取设备信息
+    async getWind(checkNode) {
+      const { data } = await GeWtList(checkNode);
+      if (data) {
+        this.setLevel8(checkNode, data);
+      }
+    },
   },
 };
 </script>

+ 20 - 5
src/store/reactive/ecorganization.js

@@ -1,24 +1,39 @@
 // reactive store对象
 import { reactive } from "vue";
-const localComp = localStorage.getItem("GlobalConfig");
 const organiztions = {
   localComp: localStorage.getItem("GlobalConfig") || {},
   level1Map: {},
   setLevel1(v) {
     this.level1Map["value"] = v;
-  },
+  }, //风电类型
   level2Map: {},
   setLevel2(k, v) {
     this.level2Map[k] = v;
-  },
+  }, //公司
   level3Map: {},
   setLevel3(k, v) {
     this.level3Map[k] = v;
-  },
+  }, //场站
   level4Map: {},
   setLevel4(k, v) {
     this.level4Map[k] = v;
-  },
+  }, //型号
+  level5Map: {},
+  setLevel5(k, v) {
+    this.level5Map[k] = v;
+  }, //期次
+  level6Map: {},
+  setLevel6(k, v) {
+    this.level6Map[k] = v;
+  }, //线路
+  level7Map: {},
+  setLevel7(k, v) {
+    this.level7Map[k] = v;
+  }, //阵区
+  level8Map: {},
+  setLevel8(k, v) {
+    this.level8Map[k] = v;
+  }, //设备
 };
 
 export default reactive(organiztions);

+ 0 - 149
src/views/layout/economicsOperation/analyse/brandAnalyse/components/powerDetails.vue

@@ -1,149 +0,0 @@
-<template>
-  <div class="body-wrapper">
-    <div class="form-wrapper">
-      <div class="date-wrapper">
-        开始时间
-        <div class="date-timer">
-          <el-date-picker
-            v-model="starttime"
-            type="datetime"
-            size="mini"
-            placeholder="选择时间"
-            value-format="YYYY-MM-DD HH:mm:ss"
-          >
-          </el-date-picker>
-        </div>
-      </div>
-      <div class="date-wrapper">
-        结束时间
-        <div class="date-timer">
-          <el-date-picker
-            v-model="endtime"
-            size="mini"
-            type="datetime"
-            placeholder="选择时间"
-            value-format="YYYY-MM-DD HH:mm:ss"
-          >
-          </el-date-picker>
-        </div>
-      </div>
-      <el-button
-        style="margin-left: 15px"
-        round
-        size="mini"
-        class="searchBtn"
-        @click="searchChartData"
-        >查询
-      </el-button>
-    </div>
-    <div class="chart-wrapper">
-      <doubleLineChart width="100%" height="100%" :list="lineData" />
-    </div>
-  </div>
-</template>
-<script>
-import dayjs from "dayjs";
-import { getApiCleanAnalyseDetails } from "@/api/monthlyPerformanceAnalysis.js";
-import doubleLineChart from "@/components/chart/line/double-line-chart.vue";
-export default {
-  name: "powerDetails", //支路功率曲线图
-  components: { doubleLineChart },
-  props: {},
-  data() {
-    return {
-      starttime: "",
-      endtime: "",
-      currentId: "",
-      title: "",
-      lineData: [],
-    };
-  },
-  created() {},
-  methods: {
-    init(row) {
-      this.currentId = row.nemCode;
-      this.title = row.aname;
-      this.searchChartData();
-    },
-    async searchChartData() {
-      let params = {
-        branch: this.currentId,
-        beginDate: this.starttime,
-        endDate: this.endtime,
-        interval: this.numgap,
-      };
-      const { data } = await getApiCleanAnalyseDetails(params);
-      this.lineData = [
-        {
-          name: "实际功率",
-          type: "line",
-          stack: "Total",
-          data: data.map((item) => item.actualPower.toFixed(2)),
-          time: data.map((item) =>
-            dayjs(item.time).format("YYYY-MM-DD HH:mm:ss")
-          ),
-        },
-        {
-          name: "理论功率",
-          type: "line",
-          stack: "Total",
-          data: data.map((item) => item.theoreticalPower.toFixed(2)),
-          time: data.map((item) =>
-            dayjs(item.time).format("YYYY-MM-DD HH:mm:ss")
-          ),
-        },
-      ];
-    },
-  },
-};
-</script>
-<style lang="less" scoped>
-.body-wrapper ::v-deep {
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  .form-wrapper {
-    display: flex;
-    align-items: center;
-    font-size: 14px;
-    font-family: Microsoft YaHei;
-    font-weight: 400;
-    color: #b3b3b3;
-    margin-left: 10px;
-    margin-bottom: 10px;
-    .date-wrapper {
-      display: flex;
-      align-items: center;
-      margin-right: 15px;
-      .date-timer {
-        margin-left: 10px;
-        .el-input .el-input__inner {
-          font-size: 13px;
-          color: #b3b3b3;
-        }
-        .el-input-number {
-          .el-input-number__decrease,
-          .el-input-number__increase {
-            height: 28px;
-            top: 0;
-          }
-        }
-      }
-    }
-    .searchBtn {
-      background-color: rgba(0, 70, 199, 0.2);
-      border: 1px solid #3b4c6c;
-      color: #b3b3b3;
-      font-size: 14px;
-
-      &:hover {
-        background-color: rgba(0, 70, 199, 0.5);
-        color: #ffffff;
-      }
-    }
-  }
-  .chart-wrapper {
-    height: calc(100% - 40px);
-  }
-}
-</style>

+ 10 - 79
src/views/layout/economicsOperation/benchmarkingManagement/companyBenchmarking/index.vue

@@ -3,44 +3,13 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <!-- <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="tabIndex"
-            placeholder="请选择"
-            @change="tabClick"
-          >
-            <el-option
-              v-for="item in tabOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="company"
-            multiple
-            collapse-tags
-            clearable
-            placeholder="江苏区域"
-            @change="handleCompanyChange(company)"
-          >
-            <el-option
-              v-for="item in companyOptions"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select> -->
           <HeaderMultiBtnVue
+            ref="HeaderMultiBtn"
             :type="tabEvent"
             :typeOptions="tabOptions"
             :disabled="displayDetail"
             :select="'company'"
+            :benchFlag="benchFlag"
             @onChange="onChange"
           />
         </div>
@@ -550,9 +519,8 @@
 
 <script>
 import dayjs from "dayjs";
-import { companys } from "@/api/curveAnalyse";
 import { GetOrganization } from "@/api/headerNav.js";
-import { getStation, gsdb, details } from "@/api/performance";
+import { gsdb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
 import { GetRegionInfo } from "@/api/home.js";
@@ -606,7 +574,8 @@ export default {
         name: "",
         code: "",
       },
-      benchComp: [],
+      benchFlag: false,
+      benchObj: {},
     };
   },
   created() {
@@ -622,19 +591,6 @@ export default {
     }
     this.starTime = date.getFullYear() + "-" + month + "-" + day;
     this.endTime = dayjs(new Date().getTime()).format("YYYY-MM-DD");
-
-    // let province = JSON.parse(localStorage.getItem("GlobalConfig"));
-    // if (!province) {
-    //   this.getProvinceCode();
-    // } else {
-    //   this.province = {
-    //     name: province.name,
-    //     code: province.code,
-    //   };
-    //   this.$nextTick(() => {
-    //     this.initialization();
-    //   });
-    // }
   },
   mounted() {
     if (this.screenHeight > 1100) {
@@ -653,41 +609,16 @@ export default {
     init(comp, type) {
       this.benchComp = comp;
       this.tabIndex = type;
+      this.benchFlag = true;
+      this.benchObj = { companys: comp, type };
+      this.$refs.HeaderMultiBtn &&
+        this.$refs.HeaderMultiBtn.initBench(this.benchObj);
     },
-    getProvinceCode() {
-      GetRegionInfo().then((data) => {
-        this.province = {
-          name: data.name,
-          code: data.code,
-        };
-        this.initialization();
-        localStorage.setItem("GlobalConfig", JSON.stringify(data));
-      });
-    },
-    tabClick(val) {
-      this.tabIndex = val;
-      //   this.initialization();
-    },
-    onChange({ type, companys, stations, brands, area }) {
-      console.log(type, companys, stations, brands, area);
+    onChange({ type, companys, area }) {
       this.tabIndex = type;
       this.company = companys.length ? companys : area;
       this.gerGsdb();
     },
-    initialization() {
-      GetOrganization({ type: this.tabIndex }).then((res) => {
-        if (res.data) {
-          if (this.benchComp.length) {
-            this.company = this.benchComp;
-          } else {
-            this.company = [];
-          }
-          this.companyOptions = res.data;
-          this.gerGsdb();
-        }
-      });
-    },
-
     gerGsdb() {
       gsdb({
         companys: this.company,

+ 28 - 102
src/views/layout/economicsOperation/benchmarkingManagement/intervalBenchmarking/index.vue

@@ -3,54 +3,17 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <el-select
-            size="mini"
+          <HeaderMultiBtnVue
+            ref="HeaderMultiBtn"
+            :type="tabIndex"
+            :multipleComp="false"
             :disabled="displayDetail"
-            v-model="tabIndex"
-            placeholder="请选择"
-            @change="tabClick"
-          >
-            <el-option
-              v-for="item in tabOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="company"
-            placeholder="请选择"
-            @change="handleCompanyChange(company)"
-          >
-            <el-option
-              v-for="item in companyOptions"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="stationObj"
-            multiple
-            collapse-tags
-            placeholder="请选择"
-            @change="handleStationChange(stationObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
+            :typeOptions="tabOptions"
+            :benchFlag="benchFlag"
+            :benchObj="benchObj"
+            :select="'station'"
+            @onChange="onChange"
+          />
         </div>
         <div class="date-wrapper">
           <div class="date-item-wrapper">
@@ -387,13 +350,13 @@
     <div
       v-if="displayDetail"
       style="height: calc(100% - 80px)"
-      class="economicTable details"
+      class="economicTable"
     >
       <el-table
         :data="detailTable"
         ref="multipleTable"
         size="mini"
-        height="78vh"
+        height="100%"
         :cell-style="{ padding: '6px' }"
         :row-style="{ height: '4' }"
         stripe
@@ -569,25 +532,25 @@ import { getStation, cjdb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
 import dayinfo from "../compontent/dayinfo.vue";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
 export default {
   name: "intervalBenchmarking", //场际对标
   components: {
     PieChart,
     BarCharts,
     dayinfo,
+    HeaderMultiBtnVue,
   },
   data() {
     return {
       company: "",
-      companyOptions: [],
       stationObj: [],
-      stationList: [],
       starTime: "",
       endTime: "",
       tabIndex: -2,
       tabOptions: [
-        { id: -1, name: "风电" },
-        { id: -2, name: "光伏" },
+        { type: -2, name: "光伏" },
+        { type: -1, name: "风电" },
       ],
       tableData: [],
       detailTable: [],
@@ -608,12 +571,14 @@ export default {
       echartsHeight: "55vh",
       benchComp: "",
       benchStation: [],
+      benchFlag: false,
+      benchObj: {},
     };
   },
   created() {
     this.starTime = dayjs().startOf("month").format("YYYY-MM-DD");
     this.endTime = dayjs().format("YYYY-MM-DD");
-    this.initialization();
+    // this.initialization();
   },
   mounted() {
     if (this.screenHeight > 1100) {
@@ -629,45 +594,17 @@ export default {
     };
   },
   methods: {
-    init(stationObj, type, company) {
-      this.benchComp = company;
-      this.benchStation = stationObj;
+    onChange({ type, companys, stations, area }) {
+      this.company = companys.length ? companys : area;
+      this.stationObj = stations;
       this.tabIndex = type;
+      this.gerCjdb();
     },
-    tabClick(val) {
-      this.tabIndex = val;
-      this.stationObj = [];
-      this.initialization();
-    },
-    initialization() {
-      GetOrganization({ type: this.tabIndex }).then((res) => {
-        if (res.data) {
-          if (this.benchComp) {
-            this.company = this.benchComp;
-          } else {
-            this.company = res.data[0].id;
-          }
-
-          this.companyOptions = res.data;
-          this.getStation(this.company);
-        }
-      });
-    },
-    getStation(companyids) {
-      GetStationByCompany({
-        companyids: companyids,
-        type: this.tabIndex,
-      }).then((res) => {
-        if (res.data.length) {
-          this.stationList = res.data;
-          if (this.benchStation) {
-            this.stationObj = this.benchStation;
-          }
-        } else {
-          this.stationList = [];
-        }
-        this.gerCjdb();
-      });
+    init(type, company, stationObj) {
+      this.benchFlag = true;
+      this.benchObj = { companys: company, stations: stationObj, type };
+      this.$refs.HeaderMultiBtn &&
+        this.$refs.HeaderMultiBtn.initBench(this.benchObj);
     },
     gerCjdb() {
       cjdb({
@@ -979,17 +916,6 @@ export default {
   .form-wrapper {
     display: flex;
     align-items: center;
-    .select-wrapper {
-      display: flex;
-      align-items: center;
-      .el-select {
-        width: 155px;
-        margin-right: 10px;
-        .el-input .el-input__inner {
-          width: 150px;
-        }
-      }
-    }
     .date-wrapper {
       display: flex;
       align-items: center;

+ 20 - 171
src/views/layout/economicsOperation/benchmarkingManagement/loseRate/index.vue

@@ -3,88 +3,14 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <el-select
-            size="mini"
+          <HeaderMultiBtnVue
+            :type="tabIndex"
+            :multipleComp="false"
             :disabled="displayDetail"
-            v-model="tabIndex"
-            placeholder="请选择"
-            @change="tabClick"
-          >
-            <el-option
-              v-for="item in tabOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="company"
-            placeholder="请选择"
-            @change="handleCompanyChange(company)"
-          >
-            <el-option
-              v-for="item in companyOptions"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="stationObj"
-            multiple
-            collapse-tags
-            placeholder="请选择"
-            @change="handleStationChange(stationObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="projectObj"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleProjectChange(projectObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in projectList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="lineObj"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleLineChange(lineObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in lineList"
-              :key="item.id"
-              :label="item.nemName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
+            :typeOptions="tabOptions"
+            :select="'line'"
+            @onChange="onChange"
+          />
         </div>
         <div class="date-wrapper">
           <div class="date-item-wrapper">
@@ -418,7 +344,7 @@
         ></BarCharts>
       </div>
     </div>
-    <div v-if="displayDetail" style="height: calc(100% - 80px)">
+    <div v-if="displayDetail" style="height: calc(100% - 80px)" class="economicTable">
       <el-table
         :data="detailTable"
         ref="multipleTable"
@@ -588,39 +514,31 @@
 
 <script>
 import dayjs from "dayjs";
-import {
-  GetOrganization,
-  GetStationByCompany,
-  GetProjectList,
-  GetLineList,
-} from "@/api/headerNav.js";
 import { wxssl, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
 import dayinfo from "../compontent/dayinfo.vue";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
 export default {
   name: "loseRate", //五项损失率
   components: {
     PieChart,
     BarCharts,
     dayinfo,
+    HeaderMultiBtnVue,
   },
   data() {
     return {
       company: "",
-      companyOptions: [],
       stationObj: [],
-      stationList: [],
       projectObj: "",
-      projectList: [],
       lineObj: [],
-      lineList: [],
       starTime: "",
       endTime: "",
       tabIndex: -2,
       tabOptions: [
-        { id: -1, name: "风电" },
-        { id: -2, name: "光伏" },
+        { type: -2, name: "光伏" },
+        { type: -1, name: "风电" },
       ],
       tableData: [],
       detailTable: [],
@@ -654,7 +572,7 @@ export default {
     }
     this.starTime = date.getFullYear() + "-" + month + "-" + day;
     this.endTime = dayjs(new Date().getTime()).format("YYYY-MM-DD");
-    this.initialization();
+    // this.initialization();
   },
   mounted() {
     if (this.screenHeight > 1100) {
@@ -670,55 +588,13 @@ export default {
     };
   },
   methods: {
-    tabClick(val) {
-      this.tabIndex = val;
-      this.stationList = [];
-      this.stationObj = [];
-      this.projectObj = [];
-      this.lineObj = [];
-      this.initialization();
-    },
-    initialization() {
-      GetOrganization({ type: this.tabIndex }).then((res) => {
-        if (res.data) {
-          this.company = res.data[1].id;
-          this.companyOptions = res.data;
-          this.getStation(res.data[1].id);
-        }
-      });
-    },
-    getStation(companyids) {
-      GetStationByCompany({
-        companyids: companyids,
-        type: this.tabIndex,
-      }).then((res) => {
-        if (res.data.length) {
-          this.stationList = res.data;
-          this.gerWxssl();
-        } else {
-          this.stationList = [];
-        }
-      });
-    },
-    getProject(stationids) {
-      GetProjectList(stationids.join(",")).then((res) => {
-        if (res.data.length) {
-          this.projectList = res.data;
-        } else {
-          this.projectList = [];
-        }
-        this.gerWxssl();
-      });
-    },
-    getLineList(projectids) {
-      GetLineList(projectids.join(",")).then((res) => {
-        if (res.data.length) {
-          this.lineList = res.data;
-        } else {
-          this.lineList = [];
-        }
-        this.gerWxssl();
-      });
+    onChange({ type, companys, stations, projects, lines, area }) {
+      this.company = companys.length ? companys : area;
+      this.stationObj = stations;
+      this.projectObj = projects;
+      this.lineObj = lines;
+      this.tabIndex = type;
+      this.gerWxssl();
     },
     gerWxssl() {
       wxssl({
@@ -776,22 +652,6 @@ export default {
         }
       });
     },
-    handleCompanyChange(val) {
-      this.company = val;
-      this.lineObj = [];
-      this.getStation(val);
-    },
-    handleStationChange(val) {
-      this.lineObj = [];
-      this.getProject(val);
-    },
-    handleProjectChange(val) {
-      this.lineObj = [];
-      this.getLineList(val);
-    },
-    handleLineChange(val) {
-      this.gerWxssl();
-    },
     handleCurrentChange(val) {
       if (val.length > 5) {
         let del_row = val.shift();
@@ -1042,17 +902,6 @@ export default {
   .form-wrapper {
     display: flex;
     align-items: center;
-    .select-wrapper {
-      display: flex;
-      align-items: center;
-      .el-select {
-        width: 155px;
-        margin-right: 10px;
-        .el-input .el-input__inner {
-          width: 150px;
-        }
-      }
-    }
     .date-wrapper {
       display: flex;
       align-items: center;

+ 25 - 270
src/views/layout/economicsOperation/benchmarkingManagement/machineBenchmarking/index.vue

@@ -3,126 +3,15 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <el-select
-            size="mini"
+        <HeaderMultiBtnVue
+            ref="HeaderMultiBtn"
+            :type="tabIndex"
+            :multipleComp="false"
             :disabled="displayDetail"
-            v-model="tabIndex"
-            placeholder="请选择"
-            @change="tabClick"
-          >
-            <el-option
-              v-for="item in tabOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="company"
-            placeholder="请选择"
-            @change="handleCompanyChange(company)"
-          >
-            <el-option
-              v-for="item in companyOptions"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="stationObj"
-            multiple
-            collapse-tags
-            placeholder="请选择"
-            @change="handleStationChange(stationObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="projectObj"
-            :disabled="displayDetail"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleProjectChange(projectObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in projectList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="lineObj"
-            :disabled="displayDetail"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleLineChange(lineObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in lineList"
-              :key="item.id"
-              :label="item.nemName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="squareObj"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleSquareChange(squareObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in squareList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            v-model="windturbineids"
-            :disabled="displayDetail"
-            placeholder="请选择"
-            size="mini"
-            clearable
-            multiple
-            collapse-tags
-            @change="handleWtidsChange(windturbineids)"
-          >
-            <el-option
-              v-for="(item, index) in wtList"
-              :key="index"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
+            :typeOptions="tabOptions"
+            :select="'wind'"
+            @onChange="onChange"
+          />
         </div>
         <div class="date-wrapper">
           <div class="date-item-wrapper">
@@ -625,24 +514,17 @@
 
 <script>
 import dayjs from "dayjs";
-import {
-  GetOrganization,
-  GetStationByCompany,
-  GetProjectList,
-  GetLineList,
-  GetSquareList,
-  GeWtList,
-} from "@/api/headerNav.js";
-import { getStation, sbdb, details } from "@/api/performance";
+import {  sbdb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
 import dayinfo from "../compontent/dayinfo.vue";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
 export default {
   name: "machineBenchmarking", //设备对标
   components: {
     PieChart,
     BarCharts,
-    dayinfo,
+    dayinfo,HeaderMultiBtnVue
   },
   data() {
     return {
@@ -662,8 +544,8 @@ export default {
       endTime: "",
       tabIndex: -2,
       tabOptions: [
-        { id: -1, name: "风电" },
-        { id: -2, name: "光伏" },
+        { type: -1, name: "风电" },
+        { type: -2, name: "光伏" },
       ],
       tableData: [],
       detailTable: [],
@@ -685,19 +567,8 @@ export default {
     };
   },
   created() {
-    let date = new Date();
-    date.setDate(1);
-    let month = parseInt(date.getMonth() + 1);
-    let day = date.getDate();
-    if (month < 10) {
-      month = "0" + month;
-    }
-    if (day < 10) {
-      day = "0" + day;
-    }
-    this.starTime = date.getFullYear() + "-" + month + "-" + day;
-    this.endTime = dayjs(new Date().getTime()).format("YYYY-MM-DD");
-    this.initialization();
+     this.starTime = dayjs().startOf("month").format("YYYY-MM-DD");
+    this.endTime = dayjs().format("YYYY-MM-DD");
   },
   mounted() {
     if (this.screenHeight > 1100) {
@@ -713,96 +584,17 @@ export default {
     };
   },
   methods: {
-    tabClick(val) {
-      this.tabIndex = val;
-
-      this.stationObj = [];
-      this.projectObj = [];
-      this.initialization();
-      //   this.gerSbdb();
-      //   this.initialization()
-    },
-    initialization() {
-      GetOrganization({ type: this.tabIndex }).then((res) => {
-        if (res.data) {
-          this.company = res.data[0].id;
-          this.companyOptions = res.data;
-          this.getStation(res.data[0].id);
-        }
-      });
-    },
-    getStation(companyids) {
-      GetStationByCompany({
-        companyids: companyids,
-        type: this.tabIndex,
-      }).then((res) => {
-        this.stationObj = [];
-        this.projectObj = [];
-        this.lineObj = [];
-        this.squareObj = [];
-        if (res.data.length) {
-          this.stationObj = [res.data[0].id];
-          this.stationList = res.data;
-          this.gerSbdb();
-          this.getProject(this.stationObj);
-        } else {
-          this.stationList = [];
-        }
-      });
-    },
-    getProject(stationids) {
-      GetProjectList(stationids.join(",")).then((res) => {
-        this.projectObj = [];
-        this.lineObj = [];
-        this.squareObj = [];
-        if (res.data.length) {
-          this.projectList = res.data;
-          this.projectObj = [res.data[0].id];
-          this.getLineList(this.projectObj);
-        } else {
-          this.projectList = [];
-        }
+    onChange({ type, companys, stations, projects, lines, squares,winds, area }) {
+      if (stations.length) {
+        this.company = companys.length ? companys : area;
+        this.stationObj = stations;
+        this.projectObj = projects;
+        this.lineObj = lines;
+        this.squareObj = squares;
+        this.windturbineids = winds;
+        this.tabIndex = type;
         this.gerSbdb();
-      });
-    },
-    getLineList(projectids) {
-      GetLineList(projectids.join(",")).then((res) => {
-        this.lineObj = [];
-        this.squareObj = [];
-        this.windturbineids = [];
-        if (res.data.length) {
-          this.lineList = res.data;
-          this.lineObj = [res.data[0].id];
-          this.getSquareList(this.lineObj);
-        } else {
-          this.lineList = [];
-          this.lineObj = [];
-        }
-        this.gerSbdb();
-      });
-    },
-    getSquareList(lineids) {
-      GetSquareList(lineids.join(",")).then((res) => {
-        this.squareObj = [];
-        this.windturbineids = [];
-        if (res.data.length) {
-          this.squareList = res.data;
-        } else {
-          this.squareList = [];
-        }
-        this.gerSbdb();
-      });
-    },
-    getWtList(squareids) {
-      GeWtList(squareids.join(",")).then((res) => {
-        this.windturbineids = [];
-        if (res.data.length) {
-          this.wtList = res.data;
-        } else {
-          this.wtList = [];
-        }
-        this.gerSbdb();
-      });
+      }
     },
 
     gerSbdb() {
@@ -865,32 +657,6 @@ export default {
         }
       });
     },
-    handleCompanyChange(val) {
-      this.company = val;
-
-      this.getStation(val);
-    },
-    handleStationChange(val) {
-      this.stationObj = val;
-      this.getProject(val);
-    },
-    handleProjectChange(val) {
-      this.projectObj = val;
-      this.getLineList(val);
-    },
-    handleLineChange(val) {
-      this.lineObj = val;
-      this.getSquareList(val);
-    },
-    handleSquareChange(val) {
-      this.squareObj = val;
-      this.windturbineids = [];
-      this.getWtList(val);
-    },
-    handleWtidsChange(val) {
-      this.windturbineids = val;
-      this.gerSbdb();
-    },
     handleCurrentChange(val) {
       if (val.length > 5) {
         let del_row = val.shift();
@@ -1139,17 +905,6 @@ export default {
   .form-wrapper {
     display: flex;
     align-items: center;
-    .select-wrapper {
-      display: flex;
-      align-items: center;
-      .el-select {
-        width: 155px;
-        margin-right: 5px;
-        .el-input .el-input__inner {
-          width: 150px;
-        }
-      }
-    }
     .date-wrapper {
       display: flex;
       align-items: center;

+ 37 - 174
src/views/layout/economicsOperation/benchmarkingManagement/projectBenchmarking/index.vue

@@ -3,72 +3,17 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <el-select
-            size="mini"
+          <HeaderMultiBtnVue
+            ref="HeaderMultiBtn"
+            :type="tabIndex"
+            :multipleComp="false"
             :disabled="displayDetail"
-            v-model="tabIndex"
-            placeholder="请选择"
-            @change="tabClick"
-          >
-            <el-option
-              v-for="item in tabOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="company"
-            placeholder="请选择"
-            @change="handleCompanyChange(company)"
-          >
-            <el-option
-              v-for="item in companyOptions"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="stationObj"
-            multiple
-            collapse-tags
-            placeholder="请选择"
-            @change="handleStationChange(stationObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="projectObj"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleProjectChange(projectObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in projectList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
+            :typeOptions="tabOptions"
+            :benchFlag="benchFlag"
+            :benchObj="benchObj"
+            :select="'project'"
+            @onChange="onChange"
+          />
         </div>
         <div class="date-wrapper">
           <div class="date-item-wrapper">
@@ -107,7 +52,7 @@
           size="mini"
           class="buttons"
           :disabled="displayDetail"
-          @click="getCmdb"
+          @click="getXmdb"
           >搜索</el-button
         >
         <el-button
@@ -571,24 +516,19 @@
 
 <script>
 import dayjs from "dayjs";
-import { companys } from "@/api/curveAnalyse";
-import {
-  GetOrganization,
-  GetStationByCompany,
-  GetProjectList,
-  GetLineList,
-  GetSquareList,
-} from "@/api/headerNav.js";
-import { getStation, getProject, xmdb, details } from "@/api/performance";
+import { xmdb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
 import dayinfo from "../compontent/dayinfo.vue";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
+
 export default {
   name: "projectBenchmarking", //项目对标
   components: {
     PieChart,
     BarCharts,
     dayinfo,
+    HeaderMultiBtnVue,
   },
   data() {
     return {
@@ -602,8 +542,8 @@ export default {
       endTime: "",
       tabIndex: -2,
       tabOptions: [
-        { id: -1, name: "风电" },
-        { id: -2, name: "光伏" },
+        { type: -1, name: "风电" },
+        { type: -2, name: "光伏" },
       ],
       tableData: [],
       detailTable: [],
@@ -622,25 +562,13 @@ export default {
       analyisDialog: [],
       screenHeight: window.innerHeight,
       echartsHeight: "55vh",
-      benchComp: "",
-      benchSta: "",
-      benchPro: "",
+      benchFlag: false,
+      benchObj: {},
     };
   },
   created() {
-    let date = new Date();
-    date.setDate(1);
-    let month = parseInt(date.getMonth() + 1);
-    let day = date.getDate();
-    if (month < 10) {
-      month = "0" + month;
-    }
-    if (day < 10) {
-      day = "0" + day;
-    }
-    this.starTime = date.getFullYear() + "-" + month + "-" + day;
-    this.endTime = dayjs(new Date().getTime()).format("YYYY-MM-DD");
-    this.initialization();
+    this.starTime = dayjs().startOf("month").format("YYYY-MM-DD");
+    this.endTime = dayjs().format("YYYY-MM-DD");
   },
   mounted() {
     if (this.screenHeight > 1100) {
@@ -656,66 +584,25 @@ export default {
     };
   },
   methods: {
-    init(station, project, company, type) {
-      this.benchComp = company;
-      this.benchSta = station;
-      this.benchPro = project;
+    onChange({ type, companys, stations, projects, area }) {
+      this.company = companys.length ? companys : area;
+      this.stationObj = stations;
+      this.projectObj = projects;
       this.tabIndex = type;
+      this.getXmdb();
     },
-    tabClick(val) {
-      this.tabIndex = val;
-      this.stationList = [];
-      this.stationObj = [];
-      this.projectObj = [];
-      this.initialization();
+    init(type, company, station, project) {
+      this.benchFlag = true;
+      this.benchObj = {
+        companys: company,
+        stations: station,
+        projects: project,
+        type,
+      };
+      this.$refs.HeaderMultiBtn &&
+        this.$refs.HeaderMultiBtn.initBench(this.benchObj);
     },
-    initialization() {
-      GetOrganization({ type: this.tabIndex }).then((res) => {
-        if (res.data) {
-          if (this.benchComp) {
-            this.company = this.benchComp;
-          } else {
-            this.company = res.data[0].id;
-          }
-          this.companyOptions = res.data;
-          this.getStation(this.company);
-        }
-      });
-    },
-    getStation(companyids) {
-      GetStationByCompany({
-        companyids: companyids,
-        type: this.tabIndex,
-      }).then((res) => {
-        if (res.data.length) {
-          if (this.benchSta) {
-            this.stationObj = this.benchSta;
-          } else {
-            this.stationObj = [res.data[0].id];
-          }
-
-          this.stationList = res.data;
-          this.getCmdb();
-          this.getProject(this.stationObj);
-        } else {
-          this.stationList = [];
-        }
-      });
-    },
-    getProject(stationids) {
-      GetProjectList(stationids.join(",")).then((res) => {
-        if (res.data.length) {
-          if (this.benchPro) {
-            this.projectObj = this.benchPro;
-          }
-          this.projectList = res.data;
-        } else {
-          this.projectList = [];
-        }
-        this.getCmdb();
-      });
-    },
-    getCmdb() {
+    getXmdb() {
       xmdb({
         companys: this.company,
         type: this.tabIndex,
@@ -770,19 +657,6 @@ export default {
         }
       });
     },
-    handleStationChange(val) {
-      //   this.projectObj = [];
-      this.getProject(val);
-    },
-    handleCompanyChange(val) {
-      this.company = val;
-      //   this.projectObj = [];
-      this.getStation(val);
-      this.getCmdb();
-    },
-    handleProjectChange() {
-      this.getCmdb();
-    },
     handleCurrentChange(val) {
       if (val.length > 5) {
         let del_row = val.shift();
@@ -1013,17 +887,6 @@ export default {
   .form-wrapper {
     display: flex;
     align-items: center;
-    .select-wrapper {
-      display: flex;
-      align-items: center;
-      .el-select {
-        width: 155px;
-        margin-right: 10px;
-        .el-input .el-input__inner {
-          width: 150px;
-        }
-      }
-    }
     .date-wrapper {
       display: flex;
       align-items: center;

+ 37 - 234
src/views/layout/economicsOperation/benchmarkingManagement/quarterBenchmarking/index.vue

@@ -3,108 +3,17 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <el-select
-            size="mini"
+          <HeaderMultiBtnVue
+            ref="HeaderMultiBtn"
+            :type="tabIndex"
+            :multipleComp="false"
             :disabled="displayDetail"
-            v-model="tabIndex"
-            placeholder="请选择"
-            @change="tabClick"
-          >
-            <el-option
-              v-for="item in tabOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="company"
-            placeholder="请选择"
-            @change="handleCompanyChange(company)"
-          >
-            <el-option
-              v-for="item in companyOptions"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="stationObj"
-            multiple
-            collapse-tags
-            placeholder="请选择"
-            @change="handleStationChange(stationObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="projectObj"
-            :disabled="displayDetail"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleProjectChange(projectObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in projectList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="lineObj"
-            :disabled="displayDetail"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleLineChange(lineObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in lineList"
-              :key="item.id"
-              :label="item.nemName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="squareObj"
-            :disabled="displayDetail"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleSquareChange(squareObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in squareList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
+            :typeOptions="tabOptions"
+            :benchFlag="benchFlag"
+            :benchObj="benchObj"
+            :select="'square'"
+            @onChange="onChange"
+          />
         </div>
         <div class="date-wrapper">
           <div class="date-item-wrapper">
@@ -608,23 +517,18 @@
 
 <script>
 import dayjs from "dayjs";
-import {
-  GetOrganization,
-  GetStationByCompany,
-  GetProjectList,
-  GetLineList,
-  GetSquareList,
-} from "@/api/headerNav.js";
 import { zqdb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
 import dayinfo from "../compontent/dayinfo.vue";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
 export default {
   name: "quarterBenchmarking", //阵区对标
   components: {
     PieChart,
     BarCharts,
     dayinfo,
+    HeaderMultiBtnVue,
   },
   data() {
     return {
@@ -642,8 +546,8 @@ export default {
       endTime: "",
       tabIndex: -2,
       tabOptions: [
-        { id: -1, name: "风电" },
-        { id: -2, name: "光伏" },
+        { type: -1, name: "风电" },
+        { type: -2, name: "光伏" },
       ],
       tableData: [],
       detailTable: [],
@@ -662,27 +566,13 @@ export default {
       analyisDialog: [],
       screenHeight: window.innerHeight,
       echartsHeight: "55vh",
-      benchComp: "",
-      benchSta: "",
-      benchPro: "",
-      benchLine: "",
-      benchQua: "",
+      benchFlag: false,
+      benchObj: {},
     };
   },
   created() {
-    let date = new Date();
-    date.setDate(1);
-    let month = parseInt(date.getMonth() + 1);
-    let day = date.getDate();
-    if (month < 10) {
-      month = "0" + month;
-    }
-    if (day < 10) {
-      day = "0" + day;
-    }
-    this.starTime = date.getFullYear() + "-" + month + "-" + day;
-    this.endTime = dayjs(new Date().getTime()).format("YYYY-MM-DD");
-    this.initialization();
+    this.starTime = dayjs().startOf("month").format("YYYY-MM-DD");
+    this.endTime = dayjs().format("YYYY-MM-DD");
   },
   mounted() {
     if (this.screenHeight > 1100) {
@@ -698,104 +588,28 @@ export default {
     };
   },
   methods: {
-    init(type, comp, sta, pro, wri, qua) {
+    onChange({ type, companys, stations, projects, lines, squares, area }) {
+      this.company = companys.length ? companys : area;
+      this.stationObj = stations;
+      this.projectObj = projects;
+      this.lineObj = lines;
+      this.squareObj = squares;
       this.tabIndex = type;
-      this.benchComp = comp;
-      this.benchSta = sta;
-      this.benchPro = pro;
-      this.benchLine = wri;
-      this.benchQua = qua;
-    },
-    tabClick(val) {
-      this.tabIndex = val;
-
-      this.stationObj = [];
-      this.projectObj = [];
-      this.initialization();
-      //   this.gerZqdb();
-      //   this.initialization()
-    },
-    initialization() {
-      GetOrganization({ type: this.tabIndex }).then((res) => {
-        if (res.data) {
-          if (this.benchComp) {
-            this.company = this.benchComp;
-          } else {
-            this.company = res.data[0].id;
-          }
-
-          this.companyOptions = res.data;
-          this.getStation(this.company);
-        }
-      });
-    },
-    getStation(companyids) {
-      GetStationByCompany({
-        companyids: companyids,
-        type: this.tabIndex,
-      }).then((res) => {
-        this.projectObj = [];
-        this.lineObj = [];
-        if (res.data.length) {
-          if (this.benchSta) {
-            this.stationObj = this.benchSta;
-          } else {
-            this.stationObj = [res.data[0].id];
-          }
-
-          this.stationList = res.data;
-          this.gerZqdb();
-          this.getProject(this.stationObj);
-        } else {
-          this.stationList = [];
-        }
-      });
-    },
-    getProject(stationids) {
-      GetProjectList(stationids.join(",")).then((res) => {
-        this.projectObj = [];
-        this.lineObj = [];
-        if (res.data.length) {
-          if (this.benchPro) {
-            this.projectObj = this.benchPro;
-            this.getLineList(this.projectObj);
-          }
-          this.projectList = res.data;
-        } else {
-          this.projectList = [];
-        }
-        this.gerZqdb();
-      });
-    },
-    getLineList(projectids) {
-      GetLineList(projectids.join(",")).then((res) => {
-        this.lineObj = [];
-        if (res.data.length) {
-          if (this.benchLine) {
-            this.lineObj = this.benchLine;
-            this.getSquareList(this.lineObj);
-          }
-          this.lineList = res.data;
-        } else {
-          this.lineList = [];
-        }
-        this.gerZqdb();
-      });
+      this.gerZqdb();
     },
-    getSquareList(lineids) {
-      GetSquareList(lineids.join(",")).then((res) => {
-        if (res.data.length) {
-          if (this.benchQua) {
-            this.squareObj = this.benchQua;
-          }
-          this.squareList = res.data;
-        } else {
-          this.squareList = [];
-        }
-        this.gerZqdb();
-      });
+    init(type, company, station, project, line, square) {
+      this.benchFlag = true;
+      this.benchObj = {
+        companys: company,
+        stations: station,
+        projects: project,
+        lines: line,
+        squares: square,
+        type,
+      };
+      this.$refs.HeaderMultiBtn &&
+        this.$refs.HeaderMultiBtn.initBench(this.benchObj);
     },
-
     gerZqdb() {
       zqdb({
         companys: this.company,
@@ -1131,17 +945,6 @@ export default {
   .form-wrapper {
     display: flex;
     align-items: center;
-    .select-wrapper {
-      display: flex;
-      align-items: center;
-      .el-select {
-        width: 155px;
-        margin-right: 10px;
-        .el-input .el-input__inner {
-          width: 150px;
-        }
-      }
-    }
     .date-wrapper {
       display: flex;
       align-items: center;

+ 1 - 1
src/views/layout/economicsOperation/benchmarkingManagement/siteBenchmarking/index.vue

@@ -880,7 +880,7 @@ export default {
   },
   mounted() {},
   methods: {
-    init(station, type, company) {
+    init(type, company, station) {
       this.tabIndex = type;
       this.benchComp = company;
       this.benchStation = station.id;

+ 37 - 205
src/views/layout/economicsOperation/benchmarkingManagement/wiringBenchmarking/index.vue

@@ -3,88 +3,17 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <el-select
-            size="mini"
+          <HeaderMultiBtnVue
+            ref="HeaderMultiBtn"
+            :type="tabIndex"
+            :multipleComp="false"
             :disabled="displayDetail"
-            v-model="tabIndex"
-            placeholder="请选择"
-            @change="tabClick"
-          >
-            <el-option
-              v-for="item in tabOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="company"
-            placeholder="请选择"
-            @change="handleCompanyChange(company)"
-          >
-            <el-option
-              v-for="item in companyOptions"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            :disabled="displayDetail"
-            v-model="stationObj"
-            multiple
-            collapse-tags
-            placeholder="请选择"
-            @change="handleStationChange(stationObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="projectObj"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleProjectChange(projectObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in projectList"
-              :key="item.id"
-              :label="item.aname"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            size="mini"
-            v-model="lineObj"
-            placeholder="请选择"
-            multiple
-            collapse-tags
-            @change="handleLineChange(lineObj)"
-            clearable
-          >
-            <el-option
-              v-for="item in lineList"
-              :key="item.id"
-              :label="item.nemName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
+            :typeOptions="tabOptions"
+            :benchFlag="benchFlag"
+            :benchObj="benchObj"
+            :select="'line'"
+            @onChange="onChange"
+          />
         </div>
         <div class="date-wrapper">
           <div class="date-item-wrapper">
@@ -589,23 +518,11 @@
 
 <script>
 import dayjs from "dayjs";
-import { companys } from "@/api/curveAnalyse";
-import {
-  GetOrganization,
-  GetStationByCompany,
-  GetProjectList,
-  GetLineList,
-  GetSquareList,
-} from "@/api/headerNav.js";
-import {
-  getStation,
-  getProject,
-  getLine,
-  xldb,
-  details,
-} from "@/api/performance";
+
+import { xldb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
 import dayinfo from "../compontent/dayinfo.vue";
 export default {
   name: "wiringBenchmarking", //线路对标
@@ -613,6 +530,7 @@ export default {
     PieChart,
     BarCharts,
     dayinfo,
+    HeaderMultiBtnVue,
   },
   data() {
     return {
@@ -628,8 +546,8 @@ export default {
       endTime: "",
       tabIndex: -2,
       tabOptions: [
-        { id: -1, name: "风电" },
-        { id: -2, name: "光伏" },
+        { type: -1, name: "风电" },
+        { type: -2, name: "光伏" },
       ],
       tableData: [],
       detailTable: [],
@@ -648,26 +566,13 @@ export default {
       analyisDialog: [],
       screenHeight: window.innerHeight,
       echartsHeight: "53vh",
-      benchComp: "",
-      benchSta: "",
-      benchPro: "",
-      benchLine: "",
+      benchFlag: false,
+      benchObj: {},
     };
   },
   created() {
-    let date = new Date();
-    date.setDate(1);
-    let month = parseInt(date.getMonth() + 1);
-    let day = date.getDate();
-    if (month < 10) {
-      month = "0" + month;
-    }
-    if (day < 10) {
-      day = "0" + day;
-    }
-    this.starTime = date.getFullYear() + "-" + month + "-" + day;
-    this.endTime = dayjs(new Date().getTime()).format("YYYY-MM-DD");
-    this.initialization();
+    this.starTime = dayjs().startOf("month").format("YYYY-MM-DD");
+    this.endTime = dayjs().format("YYYY-MM-DD");
   },
   mounted() {
     if (this.screenHeight > 1100) {
@@ -683,86 +588,25 @@ export default {
     };
   },
   methods: {
-    init(type, comp, sta, pro, wri) {
+    onChange({ type, companys, stations, projects, lines, area }) {
+      this.company = companys.length ? companys : area;
+      this.stationObj = stations;
+      this.projectObj = projects;
+      this.lineObj = lines;
       this.tabIndex = type;
-      this.benchComp = comp;
-      this.benchSta = sta;
-      this.benchPro = pro;
-      this.benchLine = wri;
-    },
-    tabClick(val) {
-      this.tabIndex = val;
-      this.stationList = [];
-      this.stationObj = [];
-      this.projectObj = [];
-      this.lineObj = [];
-      this.initialization();
-    },
-    initialization() {
-      GetOrganization({ type: this.tabIndex }).then((res) => {
-        if (res.data) {
-          if (this.benchComp) {
-            this.company = this.benchComp;
-          } else {
-            this.company = res.data[0].id;
-          }
-
-          this.companyOptions = res.data;
-          this.getStation(this.company);
-        }
-      });
-    },
-    getStation(companyids) {
-      GetStationByCompany({
-        companyids: companyids,
-        type: this.tabIndex,
-      }).then((res) => {
-        this.projectObj = [];
-        this.lineObj = [];
-        if (res.data.length) {
-          if (this.benchSta) {
-            this.stationObj = this.benchSta;
-          } else {
-            this.stationObj = [res.data[0].id];
-          }
-
-          this.stationList = res.data;
-          this.gerXldb();
-          this.getProject(this.stationObj);
-        } else {
-          this.stationList = [];
-        }
-      });
-    },
-    getProject(stationids) {
-      GetProjectList(stationids.join(",")).then((res) => {
-        this.projectObj = [];
-        this.lineObj = [];
-        if (res.data.length) {
-          if (this.benchPro) {
-            this.projectObj = this.benchPro;
-            this.getLineList(this.projectObj);
-          }
-          this.projectList = res.data;
-        } else {
-          this.projectList = [];
-        }
-        this.gerXldb();
-      });
+      this.gerXldb();
     },
-    getLineList(projectids) {
-      GetLineList(projectids.join(",")).then((res) => {
-        this.lineObj = [];
-        if (res.data.length) {
-          if (this.benchLine) {
-            this.lineObj = this.benchLine;
-          }
-          this.lineList = res.data;
-        } else {
-          this.lineList = [];
-        }
-        this.gerXldb();
-      });
+    init(type, company, station, project, line) {
+      this.benchFlag = true;
+      this.benchObj = {
+        companys: company,
+        stations: station,
+        projects: project,
+        lines: line,
+        type,
+      };
+      this.$refs.HeaderMultiBtn &&
+        this.$refs.HeaderMultiBtn.initBench(this.benchObj);
     },
     gerXldb() {
       xldb({
@@ -800,7 +644,6 @@ export default {
               children: [],
             },
           ];
-          console.log(res);
           this.tableData = res.data;
           let lossPower = [];
           res.data.forEach((item) => {
@@ -1087,17 +930,6 @@ export default {
   .form-wrapper {
     display: flex;
     align-items: center;
-    .select-wrapper {
-      display: flex;
-      align-items: center;
-      .el-select {
-        width: 155px;
-        margin-right: 10px;
-        .el-input .el-input__inner {
-          width: 150px;
-        }
-      }
-    }
     .date-wrapper {
       display: flex;
       align-items: center;

+ 57 - 46
src/views/layout/economicsOperation/companyHomepage/index.vue

@@ -229,7 +229,11 @@
               style="width: 165px"
             />
             <el-badge
-              v-if="benchNum !== 0 && benchmarkingVal !== ''"
+              v-if="
+                themeType === 'maintenance' &&
+                benchNum !== 0 &&
+                benchmarkingVal !== ''
+              "
               @click="hidenBenchList"
               :value="benchNum"
               style="margin-left: 20px; cursor: pointer"
@@ -250,7 +254,7 @@
           <div
             style="z-index: 999; width: 45%; background: #0c0f15"
             class="window"
-            v-if="displaycheck === true"
+            v-if="themeType === 'maintenance' && displaycheck === true"
           >
             <div class="stitBorder"></div>
             <p class="ststTit header">
@@ -687,9 +691,9 @@ export default {
           }
           this.$refs.siteBench &&
             this.$refs.siteBench.init(
-              this.stationData,
               this.typeNode,
-              this.checkNode
+              this.checkNode,
+              this.stationData
             );
         });
       }
@@ -719,16 +723,16 @@ export default {
         });
         this.$nextTick(() => {
           this.$refs.intervalBench &&
-            this.$refs.intervalBench.init(arr, this.typeNode, this.checkNode);
+            this.$refs.intervalBench.init(this.typeNode, this.checkNode, arr);
         });
       } else if (this.benchmarkingVal === "bench3") {
         this.$nextTick(() => {
           this.$refs.projectBench &&
             this.$refs.projectBench.init(
-              this.cardSta,
-              this.cardBench,
+              this.typeNode,
               this.checkNode,
-              this.typeNode
+              this.cardSta,
+              this.cardBench
             );
         });
       } else if (this.benchmarkingVal === "bench4") {
@@ -764,7 +768,7 @@ export default {
     levels1DataChang() {
       this.checkNode = "";
       this.resetAllFiller();
-      this.$router.push({ path: "/economicsOperation/comphomepage" });
+      this.$router.push({ path: "/economicsOperation/comphomepageGf" });
     },
     // 获取数据
     async getDataDetial() {
@@ -885,6 +889,7 @@ export default {
     },
     // 切换公司重置筛选条件
     resetAllFiller() {
+      this.benchmarkingVal = "";
       this.sortCode = "";
       this.stationName = "";
       this.sortType = true;
@@ -921,48 +926,54 @@ export default {
         return this.a_benchmarkingVal;
       },
       set(v) {
-        if (
-          v != this.a_benchmarkingVal &&
-          this.benchNum != 0 &&
-          this.benchChang !== ""
-        ) {
-          let t;
-          if (!v) {
-            t = "清空";
-          } else {
-            t = "切换";
-          }
-          this.$confirm(`是否${t}对标方式?`, "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-          })
-            .then(async () => {
-              this.$message({
-                type: "success",
-                message: `${t}成功!`,
-                offset: 200,
-                center: true,
-                customClass: "s",
-              });
-              this.selectTime = "";
-              this.a_benchmarkingVal = v;
-              this.benchChang = v;
-              this.$refs.childCard.changenums();
-              this.displaycheck = false;
+        if (v) {
+          if (
+            v != this.a_benchmarkingVal &&
+            this.benchNum != 0 &&
+            this.benchChang !== ""
+          ) {
+            let t;
+            if (!v) {
+              t = "清空";
+            } else {
+              t = "切换";
+            }
+            this.$confirm(`是否${t}对标方式?`, "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
             })
-            .catch(() => {
-              if (!v) {
-                const te = this.a_benchmarkingVal;
-                this.a_benchmarkingVal = "";
-                this.$nextTick(() => {
-                  this.a_benchmarkingVal = te;
+              .then(async () => {
+                this.$message({
+                  type: "success",
+                  message: `${t}成功!`,
+                  offset: 200,
+                  center: true,
+                  customClass: "s",
                 });
-              }
-            });
+                this.a_benchmarkingVal = v;
+                this.benchChang = v;
+                this.$refs.childCard.changenums();
+                this.displaycheck = false;
+              })
+              .catch(() => {
+                if (!v) {
+                  const te = this.a_benchmarkingVal;
+                  this.a_benchmarkingVal = "";
+                  this.$nextTick(() => {
+                    this.a_benchmarkingVal = te;
+                  });
+                }
+              });
+          } else {
+            this.a_benchmarkingVal = v;
+            this.benchChang = v;
+          }
         } else {
           this.a_benchmarkingVal = v;
           this.benchChang = v;
+          this.$refs.childCard.changenums();
+          this.displaycheck = false;
         }
       },
     },

+ 56 - 45
src/views/layout/economicsOperation/companyHomepage/indexGf.vue

@@ -229,7 +229,11 @@
               style="width: 165px"
             />
             <el-badge
-              v-if="benchNum !== 0 && benchmarkingVal !== ''"
+              v-if="
+                themeType === 'maintenance' &&
+                benchNum !== 0 &&
+                benchmarkingVal !== ''
+              "
               @click="hidenBenchList"
               :value="benchNum"
               style="margin-left: 20px; cursor: pointer"
@@ -250,7 +254,7 @@
           <div
             style="z-index: 999; width: 45%; background: #0c0f15"
             class="window"
-            v-if="displaycheck === true"
+            v-if="themeType === 'maintenance' && displaycheck === true"
           >
             <div class="stitBorder"></div>
             <p class="ststTit header">
@@ -687,9 +691,9 @@ export default {
           }
           this.$refs.siteBench &&
             this.$refs.siteBench.init(
-              this.stationData,
               this.typeNode,
-              this.checkNode
+              this.checkNode,
+              this.stationData
             );
         });
       }
@@ -719,16 +723,16 @@ export default {
         });
         this.$nextTick(() => {
           this.$refs.intervalBench &&
-            this.$refs.intervalBench.init(arr, this.typeNode, this.checkNode);
+            this.$refs.intervalBench.init(this.typeNode, this.checkNode, arr);
         });
       } else if (this.benchmarkingVal === "bench3") {
         this.$nextTick(() => {
           this.$refs.projectBench &&
             this.$refs.projectBench.init(
-              this.cardSta,
-              this.cardBench,
+              this.typeNode,
               this.checkNode,
-              this.typeNode
+              this.cardSta,
+              this.cardBench
             );
         });
       } else if (this.benchmarkingVal === "bench4") {
@@ -885,6 +889,7 @@ export default {
     },
     // 切换公司重置筛选条件
     resetAllFiller() {
+      this.benchmarkingVal = "";
       this.sortCode = "";
       this.stationName = "";
       this.sortType = true;
@@ -921,48 +926,54 @@ export default {
         return this.a_benchmarkingVal;
       },
       set(v) {
-        if (
-          v != this.a_benchmarkingVal &&
-          this.benchNum != 0 &&
-          this.benchChang !== ""
-        ) {
-          let t;
-          if (!v) {
-            t = "清空";
-          } else {
-            t = "切换";
-          }
-          this.$confirm(`是否${t}对标方式?`, "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-          })
-            .then(async () => {
-              this.$message({
-                type: "success",
-                message: `${t}成功!`,
-                offset: 200,
-                center: true,
-                customClass: "s",
-              });
-              this.selectTime = "";
-              this.a_benchmarkingVal = v;
-              this.benchChang = v;
-              this.$refs.childCard.changenums();
-              this.displaycheck = false;
+        if (v) {
+          if (
+            v != this.a_benchmarkingVal &&
+            this.benchNum != 0 &&
+            this.benchChang !== ""
+          ) {
+            let t;
+            if (!v) {
+              t = "清空";
+            } else {
+              t = "切换";
+            }
+            this.$confirm(`是否${t}对标方式?`, "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
             })
-            .catch(() => {
-              if (!v) {
-                const te = this.a_benchmarkingVal;
-                this.a_benchmarkingVal = "";
-                this.$nextTick(() => {
-                  this.a_benchmarkingVal = te;
+              .then(async () => {
+                this.$message({
+                  type: "success",
+                  message: `${t}成功!`,
+                  offset: 200,
+                  center: true,
+                  customClass: "s",
                 });
-              }
-            });
+                this.a_benchmarkingVal = v;
+                this.benchChang = v;
+                this.$refs.childCard.changenums();
+                this.displaycheck = false;
+              })
+              .catch(() => {
+                if (!v) {
+                  const te = this.a_benchmarkingVal;
+                  this.a_benchmarkingVal = "";
+                  this.$nextTick(() => {
+                    this.a_benchmarkingVal = te;
+                  });
+                }
+              });
+          } else {
+            this.a_benchmarkingVal = v;
+            this.benchChang = v;
+          }
         } else {
           this.a_benchmarkingVal = v;
           this.benchChang = v;
+          this.$refs.childCard.changenums();
+          this.displaycheck = false;
         }
       },
     },

+ 2 - 1
src/views/layout/economicsOperation/homePage/components/card.vue

@@ -7,6 +7,7 @@
       @mouseleave="leaveList(false)"
       style="z-index: 9; width: 200px; background: #0c0f15"
       v-if="
+        theme === 'maintenance' &&
         disBenchList === true &&
         benchmarkingVal !== 'bench2' &&
         benchmarkingVal !== 'bench1'
@@ -210,7 +211,7 @@
                 &nbsp;</el-checkbox
               >
             </el-checkbox-group>
-            <div class="card-list">
+            <div class="card-list" >
               <!--                            加入购物车图标-->
 
               <div

+ 2 - 2
src/views/layout/economicsOperation/homePage/index.vue

@@ -234,7 +234,7 @@
             />
 
             <el-badge
-              v-if="benchNum !== 0 && benchmarkingVal !== ''"
+              v-if="themeType === 'maintenance' &&benchNum !== 0 && benchmarkingVal !== ''"
               @click="hidenBenchList"
               :value="benchNum"
               style="margin-left: 20px; cursor: pointer"
@@ -254,7 +254,7 @@
             <div
               style="z-index: 999; width: 305px; background: #0c0f15"
               class="window"
-              v-if="displaycheck === true"
+              v-if="themeType === 'maintenance' &&displaycheck === true"
             >
               <div class="stitBorder"></div>
               <p class="ststTit header">

+ 6 - 2
src/views/layout/economicsOperation/homePage/indexGF.vue

@@ -234,7 +234,11 @@
             />
 
             <el-badge
-              v-if="benchNum !== 0 && benchmarkingVal !== ''"
+              v-if="
+                themeType === 'maintenance' &&
+                benchNum !== 0 &&
+                benchmarkingVal !== ''
+              "
               @click="hidenBenchList"
               :value="benchNum"
               style="margin-left: 20px; cursor: pointer"
@@ -254,7 +258,7 @@
             <div
               style="z-index: 999; width: 305px; background: #0c0f15"
               class="window"
-              v-if="displaycheck === true"
+              v-if="themeType === 'maintenance' && displaycheck === true"
             >
               <div class="stitBorder"></div>
               <p class="ststTit header">

+ 2 - 1
src/views/layout/economicsOperation/performanceAnalyse/performanceAssess/dayDetailInfo.vue

@@ -339,6 +339,7 @@ export default {
           data: [service2],
         },
       ];
+      console.log(this.chartDatas);
       this.chartDatas = chartData;
     },
   },
@@ -346,7 +347,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.Evaluationinfo ::v-deep{
+.Evaluationinfo ::v-deep {
   height: 100%;
   .header {
     display: flex;