Quellcode durchsuchen

品牌分析功能完成,公司对标页面样式修改完成

baiyanting vor 1 Jahr
Ursprung
Commit
a1010cd9ab

+ 8 - 0
src/api/monthlyPerformanceAnalysis.js

@@ -411,3 +411,11 @@ export function getApiStationMonthAnalyse(params) {
     method: "GET",
   });
 }
+// -----------------------------------------------------------品牌分析------------------------------------------------------------------------
+export function getApiBrandAnalyse(params) {
+  return request({
+    baseURL: process.env.VUE_APP_Economy,
+    url: `/benchmarking/operational/analysis?companys=${params.companys}&type=${params.type}&wpids=${params.wpids}&modelids=${params.modelids}&beginDate=${params.beginDate}&endDate=${params.endDate}`,
+    method: "GET",
+  });
+}

+ 305 - 0
src/components/headerBtns/HeaderMultiBtn.vue

@@ -0,0 +1,305 @@
+<template>
+  <el-row class="multibtn">
+    <eselect
+      :data="level1"
+      :disabled="disabled"
+      v-model="level1Check"
+      placeholder="请选择"
+      labelKey="name"
+      valueKey="type"
+      style="margin-right: 8px; width: 132px"
+    />
+
+    <eselect
+      :data="level2"
+      :disabled="disabled"
+      v-model="level2Check"
+      :placeholder="level2?.[0]?.aname"
+      labelKey="aname"
+      valueKey="id"
+      :clearable="true"
+      multiple
+      class="multipre"
+      style="margin-right: 8px; width: 180px"
+    >
+      <template #prefix>
+        <img
+          src="@assets/img/images/company.png"
+          style="width: 23px; margin-top: 0px; margin-left: 2px"
+        />
+      </template>
+    </eselect>
+
+    <eselect
+      :disabled="disabled"
+      v-show="
+        level3.length &&
+        (select == 'brand' ||
+          select == 'project' ||
+          select == 'line' ||
+          select == 'square' ||
+          select == 'wind')
+      "
+      :data="level3"
+      v-model="level3Check"
+      placeholder="全部场站"
+      labelKey="aname"
+      :clearable="true"
+      valueKey="id"
+      multiple
+      style="margin-right: 8px; width: 160px"
+    />
+    <eselect
+      :disabled="disabled"
+      v-show="level4.length && select == 'brand'"
+      :data="level4"
+      v-model="level4Check"
+      placeholder="全部型号"
+      labelKey="modelId"
+      :clearable="true"
+      valueKey="modelId"
+      multiple
+      style="width: 160px"
+    />
+  </el-row>
+</template>
+<script>
+import {
+  GetStationByCompany,
+  GetOrganization,
+  GetModelList,
+} from "@/api/headerNav.js";
+import eselect from "@/components/eselect/index.vue";
+import { Debounce } from "@/utils/common";
+import { inject } from "vue";
+export default {
+  name: "HeaderMultiBtn",
+  components: {
+    eselect,
+  },
+  setup() {
+    const store = inject("ecorganizations");
+    return {
+      ...store,
+    };
+  },
+  props: {
+    type: {
+      type: String,
+      default: "-2",
+    },
+    select: {
+      type: String,
+      default: "",
+    },
+    typeOptions: {
+      type: Array,
+      default: () => [
+        { type: -2, name: "光伏" },
+        { type: -1, name: "风电" },
+      ],
+    },
+    disabled: {
+      default: false,
+    },
+  },
+  data() {
+    return {
+      //风光类型
+      level1Check: this.type.toString(),
+      // 公司
+      level2Check: [],
+      // 场站
+      level3Check: [],
+      // 型号
+      level4Check: [],
+    };
+  },
+  computed: {
+    level1() {
+      return this.level1Map.value;
+    },
+    // 公司列表
+    level2() {
+      if (!this.level1Check) {
+        return [];
+      }
+      const r = this.level2Map[this.level1Check];
+      if (!r) {
+        this.getOrganizationList(this.level1Check);
+        return [];
+      }
+      return r.map((item, index) => {
+        if (index === 0) {
+          return { ...item, disabled: true };
+        }
+        return item;
+      });
+    },
+    // 场站列表
+    level3() {
+      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)];
+    },
+    // 型号列表
+    level4() {
+      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,
+      }));
+    },
+
+    checks() {
+      return [
+        this.level1Check,
+        this.level2Check.join(","),
+        this.level3Check.join(","),
+        this.level4Check.join(","),
+      ].join("|");
+    },
+  },
+  watch: {
+    level1: {
+      handler(d) {
+        if (!d?.length) {
+          this.gettypeData();
+        } else if (!this.level1Check) {
+          this.level1Check = d[0].type;
+        }
+      },
+      immediate: true,
+    },
+    level2Check(n, old) {
+      console.log(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);
+        });
+        this.level3Check = this.level3Check.filter(
+          (item) => !newCheck.includes(item)
+        );
+      }
+    },
+    level3Check(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);
+        });
+        this.level4Check = this.level4Check.filter(
+          (item) => !newCheck.includes(item)
+        );
+      }
+    },
+    checks: {
+      handler() {
+        this.commit();
+      },
+      immediate: true,
+    },
+  },
+  beforeCreate() {
+    this.commit = Debounce(() => {
+      this.$emit("onChange", {
+        area: this.level2?.[0]?.id,
+        type: this.level1Check,
+        companys: this.level2Check,
+        stations: this.level3Check,
+        brands: this.level4Check,
+        values: this.level4Check.length
+          ? this.level4Check
+          : this.level3Check.length
+          ? this.level3Check
+          : this.level2Check,
+      });
+    }, 500);
+  },
+  methods: {
+    //获取风光类型
+    gettypeData() {
+      const data = this.typeOptions;
+      const df = data.map((i) => ({
+        ...i,
+        icon: i.type,
+        type: String(i.type),
+      }));
+      this.setLevel1(df);
+    },
+    //获取区域公司
+    async getOrganizationList(type) {
+      const { data } = await GetOrganization({ type });
+      if (data && data.length > 0) {
+        this.setLevel2(type, data);
+      } else {
+        this.setLevel2(type, []);
+      }
+    },
+    //获取场站信息
+    async getPowerStation(typeNode, checkNode) {
+      const { data } = await GetStationByCompany({
+        companyids: checkNode,
+        type: typeNode,
+      });
+      if (data) {
+        this.setLevel3(checkNode, data);
+      }
+    },
+    //获取场站信息
+    async getBrand(checkNode) {
+      const { data } = await GetModelList(checkNode);
+      if (data) {
+        this.setLevel4(checkNode, data);
+      }
+    },
+  },
+};
+</script>
+<style lang="less">
+.multibtn {
+  margin: 10px 0 15px;
+
+  .multipre.el-select {
+    .el-select__tags {
+      padding-left: 30px;
+    }
+    .el-select__tags-text {
+      margin-left: -20px;
+      &::before {
+        content: "";
+        width: 16px;
+        height: 10px;
+        display: inline-block;
+      }
+    }
+  }
+}
+</style>

+ 2 - 2
src/main.js

@@ -17,7 +17,7 @@ import axios from 'axios'
 //引入字体
 import '../public/css/font.css'
 import { ElMessage } from 'element-plus'
-
+import createReative from "@store/reactive/index";
 import './permission'
 const app = createApp(App)
 /**阻止多次重复点击指令  延时暂定5秒 示例 v-prevdbclick:arg='func' */
@@ -61,7 +61,7 @@ app.directive('prevdbclick', {
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 	app.component(key, component)
 }
-
+app.use(createReative);
 app.config.globalProperties.$axios = axios;
 window.__STATICVUE__ = app;
 window.__STATICVUE__.use(ElementPlus, {

+ 16 - 6
src/router/index.js

@@ -814,17 +814,27 @@ export const asyncRoutes = [
             },
           },
           {
-            path: "monthlyAnalysis",
+            path: "brandAnalyse",
             component: () =>
-              import(
-                "@/views/layout/economicsOperation/analyse/monthlyAnalysis"
-              ),
-            name: "monthlyAnalysis",
+              import("@/views/layout/economicsOperation/analyse/brandAnalyse"),
+            name: "brandAnalyse",
             meta: {
-              title: "单机月度分析",
+              title: "品牌分析",
               icon: "",
             },
           },
+        //   {
+        //     path: "monthlyAnalysis",
+        //     component: () =>
+        //       import(
+        //         "@/views/layout/economicsOperation/analyse/monthlyAnalysis"
+        //       ),
+        //     name: "monthlyAnalysis",
+        //     meta: {
+        //       title: "单机月度分析",
+        //       icon: "",
+        //     },
+        //   },
         ],
       },
       {

+ 24 - 0
src/store/reactive/ecorganization.js

@@ -0,0 +1,24 @@
+// 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;
+  },
+};
+
+export default reactive(organiztions);

+ 14 - 11
src/store/reactive/index.js

@@ -1,20 +1,23 @@
-import organizations from './organizations'
+import organizations from "./organizations";
+import ecorganizations from "./ecorganization";
 
 function createStore(parmas) {
   return {
     install(app) {
-      this.provide(app)
+      this.provide(app);
     },
     provide(app) {
-      const keys = parmas&&Object.keys(parmas)
-      keys&&keys.forEach((item) => { 
-        // 注册
-        app.provide(item,parmas[item])
-      })
-    }
-  }
+      const keys = parmas && Object.keys(parmas);
+      keys &&
+        keys.forEach((item) => {
+          // 注册
+          app.provide(item, parmas[item]);
+        });
+    },
+  };
 }
 
 export default createStore({
-  organizations
-})
+  organizations,
+  ecorganizations,
+});

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

@@ -0,0 +1,149 @@
+<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>

+ 317 - 0
src/views/layout/economicsOperation/analyse/brandAnalyse/index.vue

@@ -0,0 +1,317 @@
+<template>
+  <div class="powerLinefitting">
+    <div class="powerLinefitting_top">
+      <div class="form-wrapper">
+        <div class="select-wrapper">
+          <HeaderMultiBtnVue
+            :type="tabEvent"
+            :typeOptions="tabOptions"
+            :select="'brand'"
+            @onChange="onChange"
+          />
+        </div>
+        <div class="date-wrapper">
+          <div class="date-item-wrapper">
+            开始日期
+            <div class="date-item-date">
+              <el-date-picker
+                v-model="starTime"
+                type="date"
+                value-format="YYYY-MM-DD"
+                placeholder="选择日期"
+                size="mini"
+              >
+              </el-date-picker>
+            </div>
+          </div>
+          <div class="date-item-wrapper">
+            结束日期
+            <div class="date-item-date">
+              <el-date-picker
+                v-model="endTime"
+                type="date"
+                value-format="YYYY-MM-DD"
+                placeholder="选择日期"
+                size="mini"
+              >
+              </el-date-picker>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="but">
+        <el-button
+          round
+          size="mini"
+          class="buttons search"
+          @click="getTableData"
+          >查询</el-button
+        >
+        <el-button
+          round
+          size="mini"
+          class="buttons download"
+          @click="downXlsxFn"
+          >导出</el-button
+        >
+      </div>
+    </div>
+
+    <div style="background: rgba(0, 0, 0, 0.4); height: calc(100% - 60px)">
+      <div class="powerLinefitting_title clearfix">
+        <div class="leftContent floatLeft"><span>品牌分析</span></div>
+        <div class="rightContent floatRight"></div>
+      </div>
+
+      <div class="powerLinefitting_Table">
+        <el-table
+          :data="stationAnalyseData"
+          stripe
+          size="mini"
+          height="100%"
+          ref="fitting_table"
+          style="width: 100%"
+        >
+          <el-table-column
+            v-for="(item, index) in tableHeader"
+            :key="index"
+            sortable
+            :prop="item.code"
+            :label="item.title"
+            align="center"
+          >
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getApiBrandAnalyse } from "@/api/monthlyPerformanceAnalysis";
+import utils from "@/utils/downXlsx";
+import dayjs from "dayjs";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
+export default {
+  name: "brandAnalyse", //品牌分析
+  data() {
+    return {
+      companyVal: "",
+      stationVal: "",
+      brands: "",
+      starTime: "",
+      endTime: "",
+      stationAnalyseData: [],
+      stationLineData: [],
+      tableHeader: [
+        { title: "场站", code: "wpsName" },
+        { title: "型号", code: "modelId" },
+        { title: "转换率", code: "conversionRate" },
+        { title: "利用小时", code: "utilizationHour" },
+        { title: "光能利用率", code: "illuminationUtilizationRate" },
+        { title: "故障率", code: "failureRate" },
+      ],
+      tabEvent: -2,
+      tabOptions: [{ type: -2, name: "光伏" }],
+    };
+  },
+  components: { HeaderMultiBtnVue },
+  created() {
+    this.starTime = dayjs().startOf("month").format("YYYY-MM-DD");
+    this.endTime = dayjs().format("YYYY-MM-DD");
+  },
+  methods: {
+    //切换风电光伏
+    changeBtn() {},
+    onChange({ type, companys, stations, brands, area }) {
+      this.tabEvent = type;
+      this.companyVal = companys.length ? companys : area;
+      this.stationVal = stations;
+      this.brands = brands;
+      this.getTableData();
+    },   
+    async getTableData() {
+      let params = {
+        type: this.tabEvent,
+        companys: this.companyVal,
+        wpids: this.stationVal,
+        modelids: this.brands,
+        beginDate: this.starTime,
+        endDate: this.endTime,
+      };
+      const { data } = await getApiBrandAnalyse(params);
+      this.stationAnalyseData = data
+    },
+    downXlsxFn() {
+      let header = [];
+      this.tableHeader.forEach((it) => {
+        header.push(it.title);
+      });
+      utils.exportExcel(this.$refs["fitting_table"].$el, header, "品牌分析");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.powerLinefitting {
+  padding: 0 23px;
+  height: 100%;
+  .powerLinefitting_top ::v-deep {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding-left: 10px;
+    .form-wrapper {
+      display: flex;
+      align-items: center;
+      //   .select-wrapper {
+      //     display: flex;
+      //     align-items: center;
+      //     .el-select {
+      //       width: 155px;
+      //       .el-input .el-input__inner {
+      //         width: 150px;
+      //       }
+      //     }
+      //   }
+      .date-wrapper {
+        display: flex;
+        align-items: center;
+        font-size: 14px;
+        font-family: Microsoft YaHei;
+        font-weight: 400;
+        color: #b3b3b3;
+        margin-left: 10px;
+        .date-item-wrapper {
+          display: flex;
+          align-items: center;
+          margin-right: 15px;
+          .date-item-date {
+            margin-left: 10px;
+            .el-input {
+              width: 155px;
+            }
+            .el-input .el-input__inner {
+              font-size: 13px;
+              color: #b3b3b3;
+            }
+          }
+        }
+      }
+    }
+    .but {
+      display: flex;
+      flex-direction: row;
+      align-content: center;
+    }
+    .el-button + .el-button {
+      margin-left: 0;
+    }
+    .buttons {
+      background: rgba(0, 70, 199, 0.6);
+      border: 1px solid #1f51ae;
+      border-radius: 13px;
+      font-size: 14px;
+      margin-right: 10px;
+
+      &.search {
+        color: #fff;
+        &:hover {
+          background: rgba(14, 90, 229, 0.9);
+          border-radius: 13px;
+          color: #fff;
+        }
+      }
+      &.download {
+        background: rgba(67, 81, 107, 0.3);
+        border: 1px solid #3b4c6c;
+        color: #b3b3b3;
+      }
+    }
+  }
+
+  .powerLinefitting_title {
+    padding-left: 10px;
+    .leftContent {
+      width: 242px;
+      height: 41px;
+      line-height: 41px;
+      background: url("../../../../../assets/imgs/title_left_bg.png");
+      span {
+        font-size: 16px;
+        font-family: Microsoft YaHei;
+        font-weight: 400;
+        color: #ffffff;
+        margin-left: 25px;
+      }
+    }
+    .floatLeft {
+      float: left;
+    }
+    .floatRight {
+      float: right;
+    }
+    .rightContent {
+      width: 212px;
+      height: 28px;
+      margin-top: 13px;
+      background: url("../../../../../assets/imgs/title_right_bg.png");
+    }
+  }
+  .clearfix::after {
+    content: "";
+    clear: both;
+    height: 0;
+    line-height: 0;
+    visibility: hidden;
+    display: block;
+  }
+  .clearfix {
+    zoom: 1;
+  }
+
+  .powerLinefitting_Table::v-deep {
+    height: calc(100% - 46px);
+    .historyBtn {
+      cursor: pointer;
+      color: #1c99ff;
+      padding: 3px 10px;
+    }
+    margin: 0 5px 5px 5px;
+    padding-bottom: 10px;
+
+    .el-table--mini {
+      margin: 5px;
+      .el-table__header-wrapper {
+        tr {
+          background: rgba(83, 89, 104, 0.3) !important;
+          th {
+            vertical-align: top !important;
+          }
+          .cell {
+            color: #b3b3b3;
+            font-family: MicrosoftYaHei;
+            font-size: 14px;
+          }
+        }
+      }
+      .el-table__body-wrapper {
+        tr {
+          &:nth-child(2n) {
+            background: rgba(83, 89, 104, 0.05) !important;
+          }
+          .cell {
+            color: #d8d8d9;
+            font-family: ArialMT;
+            font-size: 13px;
+            height: 25px !important;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 38 - 32
src/views/layout/economicsOperation/benchmarkingManagement/companyBenchmarking/index.vue

@@ -3,7 +3,7 @@
     <div class="title">
       <div class="form-wrapper">
         <div class="select-wrapper">
-          <el-select
+          <!-- <el-select
             size="mini"
             :disabled="displayDetail"
             v-model="tabIndex"
@@ -35,7 +35,14 @@
               :value="item.id"
             >
             </el-option>
-          </el-select>
+          </el-select> -->
+          <HeaderMultiBtnVue
+            :type="tabEvent"
+            :typeOptions="tabOptions"
+            :disabled="displayDetail"
+            :select="'company'"
+            @onChange="onChange"
+          />
         </div>
         <div class="date-wrapper">
           <div class="date-item-wrapper">
@@ -369,7 +376,11 @@
         ></BarCharts>
       </div>
     </div>
-    <div v-if="displayDetail" style="height: calc(100% - 80px)">
+    <div
+      v-if="displayDetail"
+      class="economicTable"
+      style="height: calc(100% - 80px)"
+    >
       <el-table
         :data="detailTable"
         ref="multipleTable"
@@ -546,12 +557,14 @@ import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
 import { GetRegionInfo } from "@/api/home.js";
 import dayinfo from "../compontent/dayinfo.vue";
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
 export default {
   name: "companyBenchmarking", //公司对标
   components: {
     PieChart,
     BarCharts,
     dayinfo,
+    HeaderMultiBtnVue,
   },
   data() {
     return {
@@ -569,8 +582,8 @@ export default {
       endTime: "",
       tabIndex: -2,
       tabOptions: [
-        { id: -1, name: "风电" },
-        { id: -2, name: "光伏" },
+        { type: -2, name: "光伏" },
+        { type: -1, name: "风电" },
       ],
       tableData: [],
       detailTable: [],
@@ -610,18 +623,18 @@ 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();
-      });
-    }
+    // 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,7 +666,13 @@ export default {
     },
     tabClick(val) {
       this.tabIndex = val;
-      this.initialization();
+      //   this.initialization();
+    },
+    onChange({ type, companys, stations, brands, area }) {
+      console.log(type, companys, stations, brands, area);
+      this.tabIndex = type;
+      this.company = companys.length ? companys : area;
+      this.gerGsdb();
     },
     initialization() {
       GetOrganization({ type: this.tabIndex }).then((res) => {
@@ -671,9 +690,7 @@ export default {
 
     gerGsdb() {
       gsdb({
-        companys: this.company.length
-          ? this.company.join(",")
-          : this.province.code,
+        companys: this.company,
         type: this.tabIndex,
         beginDate: this.starTime,
         endDate: this.endTime,
@@ -983,17 +1000,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;

+ 6 - 0
src/views/layout/economicsOperation/index.vue

@@ -185,6 +185,12 @@ export default {
               icon: "",
               path: "/economicsOperation/analyse/cleanAnalyse",
             },
+            {
+              titleName: "品牌分析",
+              icon: "",
+              path: "/economicsOperation/analyse/brandAnalyse",
+            },
+
           ],
         },
         {