Browse Source

对标页面接口调试,筛选框修改,经济运行分析页面修改调试

baiyanting 2 năm trước cách đây
mục cha
commit
e76d9b6b35
23 tập tin đã thay đổi với 5424 bổ sung947 xóa
  1. 1 1
      .env.development
  2. 1 1
      src/api/economy-homepage.js
  3. 9 0
      src/api/headerNav.js
  4. 17 0
      src/api/performance.js
  5. 1 3
      src/components/chart/pie/pie-chart.vue
  6. 44 6
      src/components/heardSearch/index.vue
  7. 28 16
      src/router/index.js
  8. 1130 5
      src/views/layout/economicsOperation/benchmarkingManagement/companyBenchmarking/index.vue
  9. 120 37
      src/views/layout/economicsOperation/benchmarkingManagement/intervalBenchmarking/index.vue
  10. 171 52
      src/views/layout/economicsOperation/benchmarkingManagement/loseRate/index.vue
  11. 1291 0
      src/views/layout/economicsOperation/benchmarkingManagement/machineBenchmarking/index.vue
  12. 92 125
      src/views/layout/economicsOperation/benchmarkingManagement/performanceRankingList/decision1Mx.vue
  13. 150 69
      src/views/layout/economicsOperation/benchmarkingManagement/performanceRankingList/index.vue
  14. 70 98
      src/views/layout/economicsOperation/benchmarkingManagement/projectBenchmarking/index.vue
  15. 1291 0
      src/views/layout/economicsOperation/benchmarkingManagement/quarterBenchmarking/index.vue
  16. 44 69
      src/views/layout/economicsOperation/benchmarkingManagement/siteBenchmarking/index.vue
  17. 397 396
      src/views/layout/economicsOperation/benchmarkingManagement/wiringBenchmarking/index.vue
  18. 133 12
      src/views/layout/economicsOperation/companyHomepage/index.vue
  19. 133 12
      src/views/layout/economicsOperation/companyHomepage/indexGf.vue
  20. 36 23
      src/views/layout/economicsOperation/homePage/components/card.vue
  21. 127 8
      src/views/layout/economicsOperation/homePage/index.vue
  22. 127 8
      src/views/layout/economicsOperation/homePage/indexGF.vue
  23. 11 6
      src/views/layout/economicsOperation/index.vue

+ 1 - 1
.env.development

@@ -1,7 +1,7 @@
 # VUE_APP_BASE_API = http://192.168.11.250:18600
 # VUE_APP_Economy = http://192.168.11.250:6060
 # VUE_APP_BASE_API = http://192.168.1.101:6060
-VUE_APP_Economy = http://192.168.1.104:6060
+VUE_APP_Economy = http://192.168.1.103:6060
 # 服务名,调用后台微服务
 VUE_APP_SERVER_NAME = /nem-api
 

+ 1 - 1
src/api/economy-homepage.js

@@ -3,7 +3,7 @@ import request from "@/utils/request";
 export const homePage = (data) => {
   return request({
     baseURL: process.env.VUE_APP_Economy,
-    url: `/economy/home?companyId=${data.companyId}&type=${data.type}&statype=${data.statype}`,
+    url: `/economy/home?companyId=${data.companyId}&type=${data.type}&statype=${data.statype}&datetype=${data.datetype}`,
     method: "get",
   });
 };

+ 9 - 0
src/api/headerNav.js

@@ -44,3 +44,12 @@ export function GetLineList(pjids) {
     method: "get",
   });
 }
+
+// 根据线路 ID 获取阵区列表
+export function GetSquareList(ids) {
+  return request({
+    baseURL: process.env.VUE_APP_Economy,
+    url: `benchmarking/alllist?ids=${ids}&type=-2`,
+    method: "get",
+  });
+}

+ 17 - 0
src/api/performance.js

@@ -116,4 +116,21 @@ export function zjdb(data) {
         method: 'get',
     })
 }
+//公司对标
+export function gsdb(data) {
+    return request({
+      baseURL: process.env.VUE_APP_Economy,
+      url: `benchmarking/gsdb?companys=${data.companys}&type=${data.type}&beginDate=${data.beginDate}&endDate=${data.endDate}&target=${data.target}&sort=${data.sort}`,
+      method: "get",
+    });
+}
+
+//阵区对标
+export function zqdb(data) {
+    return request({
+      baseURL: process.env.VUE_APP_Economy,
+      url: `benchmarking/zqdb?companys=${data.companys}&type=${data.type}&wpids=${data.wpids}&projectids=${data.projectids}&lineids=${data.lineids}&squareids=${data.squareids}&beginDate=${data.beginDate}&endDate=${data.endDate}`,
+      method: "get",
+    });
+}
 

+ 1 - 3
src/components/chart/pie/pie-chart.vue

@@ -122,9 +122,7 @@ export default {
             roseType: "area",
             label: {
               formatter: "{d}%",
-              position: "outer",
-              alignTo: "edge",
-              margin: 10,
+              padding: [-20, -25, 10, 5],
             },
             itemStyle: {
               normal: {

+ 44 - 6
src/components/heardSearch/index.vue

@@ -87,7 +87,7 @@
         </el-select>
       </el-form-item>
       <!-- <el-form-item label="线路:" v-if="!hiddenLine && lineList?.length"> -->
-      <el-form-item v-if="!hiddenLine && lineList?.length">
+      <el-form-item v-if="!hiddenLine">
         <el-select
           size="mini"
           v-model="lineObj"
@@ -105,6 +105,25 @@
           </el-option>
         </el-select>
       </el-form-item>
+      <!-- <el-form-item label="阵区:" v-if="!hiddenSquare && squareList?.length"> -->
+      <el-form-item v-if="!hiddenSquare">
+        <el-select
+          size="mini"
+          v-model="squareObj"
+          style="width: 120px"
+          placeholder="请选择"
+          clearable
+          @change="getSquareList"
+        >
+          <el-option
+            v-for="item in squareList"
+            :key="item.id"
+            :label="item.aname"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
       <!-- <el-form-item label="设备:" v-if="!hiddenWtList && wtList?.length"> -->
       <el-form-item v-if="!hiddenWtList && wtList?.length">
         <el-select
@@ -158,8 +177,6 @@
   </div>
 </template>
 
-
-
 <script>
 import {
   GetOrganization,
@@ -167,6 +184,7 @@ import {
   GeWtList,
   GetProjectList,
   GetLineList,
+  GetSquareList,
 } from "@/api/headerNav.js";
 
 export default {
@@ -193,6 +211,10 @@ export default {
       type: Boolean,
       default: false,
     },
+    hiddenSquare: {
+      type: Boolean,
+      default: false,
+    },
     hiddenWtList: {
       type: Boolean,
       default: false,
@@ -246,6 +268,8 @@ export default {
       dateRange: [],
       wtId: "",
       wtList: [],
+      squareObj: "",
+      squareList: [],
     };
   },
   async created() {
@@ -314,6 +338,7 @@ export default {
       } else {
         this.stationList = [];
         this.projectList = [];
+        this.squareList = [];
         this.lineList = [];
         this.emitProps("tagListNode");
       }
@@ -340,6 +365,7 @@ export default {
         this.getProjectList();
       } else {
         this.projectList = [];
+        this.squareList = [];
         this.lineList = [];
         this.emitProps("checkStation");
       }
@@ -348,11 +374,12 @@ export default {
     async getProjectList() {
       await GetProjectList(this.checkStation).then((res) => {
         this.projectList = res.data;
-        this.projectObj = res.data?.[0]?.id;
+        this.projectObj = "";
         if (this.projectObj) {
           this.getLineList();
         } else {
           this.lineList = [];
+          this.squareList = [];
           this.emitProps("projectObj");
         }
       });
@@ -361,21 +388,30 @@ export default {
     async getLineList() {
       await GetLineList(this.projectObj).then((res) => {
         this.lineList = res.data;
-        this.lineObj = res.data?.[0]?.id || "";
+        this.lineObj = "";
 
         if (this.lineObj) {
+          this.getSquareList();
           this.getWtList();
         } else {
+          this.squareList = [];
           this.wtList = [];
           this.emitProps();
         }
       });
     },
+    async getSquareList() {
+      await GetSquareList(this.lineObj).then((res) => {
+        this.squareList = res.data;
+        this.squareObj = "";
+        this.emitProps();
+      });
+    },
 
     async getWtList() {
       await GeWtList(this.lineObj).then((res) => {
         this.wtList = res.data;
-        this.wtId = res.data?.[0]?.id || "";
+        this.wtId = "";
         this.emitProps();
       });
     },
@@ -389,6 +425,7 @@ export default {
         "projectObj",
         "lineObj",
         "wtId",
+        "squareObj",
       ];
       rinseArray.forEach((key) => {
         if (resetValue) {
@@ -406,6 +443,7 @@ export default {
         project: this.projectObj,
         line: this.lineObj,
         dateRange: this.dateRange,
+        square: this.squareObj,
       });
     },
   },

+ 28 - 16
src/router/index.js

@@ -439,18 +439,6 @@ export const asyncRoutes = [
             },
           },
           {
-            path: "companyBenchmarking",
-            component: () =>
-              import(
-                "@/views/layout/economicsOperation/benchmarkingManagement/companyBenchmarking"
-              ),
-            name: "companyBenchmarking",
-            meta: {
-              title: "公司对标",
-              icon: "",
-            },
-          },
-          {
             path: "siteBenchmarking",
             component: () =>
               import(
@@ -511,14 +499,38 @@ export const asyncRoutes = [
             },
           },
           {
-            path: "singleMachineBenchmarking",
+            path: "quarterBenchmarking",
+            component: () =>
+              import(
+                "@/views/layout/economicsOperation/benchmarkingManagement/quarterBenchmarking"
+              ),
+            name: "quarterBenchmarking",
+            meta: {
+              title: "阵区对标",
+              icon: "",
+            },
+          },
+          {
+            path: "machineBenchmarking",
+            component: () =>
+              import(
+                "@/views/layout/economicsOperation/benchmarkingManagement/machineBenchmarking"
+              ),
+            name: "machineBenchmarking",
+            meta: {
+              title: "设备对标",
+              icon: "",
+            },
+          },
+          {
+            path: "companyBenchmarking",
             component: () =>
               import(
-                "@/views/layout/economicsOperation/benchmarkingManagement/singleMachineBenchmarking"
+                "@/views/layout/economicsOperation/benchmarkingManagement/companyBenchmarking"
               ),
-            name: "singleMachineBenchmarking",
+            name: "companyBenchmarking",
             meta: {
-              title: "单机对标",
+              title: "公司对标",
               icon: "",
             },
           },

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1130 - 5
src/views/layout/economicsOperation/benchmarkingManagement/companyBenchmarking/index.vue


+ 120 - 37
src/views/layout/economicsOperation/benchmarkingManagement/intervalBenchmarking/index.vue

@@ -1,20 +1,112 @@
 <template>
   <div class="parcel-box">
-    <HeardSearch
-      :type="-2"
-      :hiddenWtList="true"
-      @firstRender="firstRender"
-      :buttons="[
-        { label: '搜索', callback: gerCjdb, disabled: displayDetail },
-        {
-          label: '对标分析',
-          callback: dbfx,
-          disabled:
-            chooseList.length <= 5 && chooseList.length > 1 ? false : true,
-        },
-        { label: '返回', callback: goBack, hidden: displayDetail },
-      ]"
-    />
+    <div class="title">
+      <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"
+        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>
+      <div class="station">
+        开始日期
+        <div class="search-input">
+          <el-date-picker
+            v-model="starTime"
+            :disabled="displayDetail"
+            type="date"
+            value-format="YYYY-MM-DD"
+            placeholder="选择日期"
+            popper-class="date-select"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="station">
+        结束日期
+        <div class="search-input">
+          <el-date-picker
+            v-model="endTime"
+            :disabled="displayDetail"
+            type="date"
+            value-format="YYYY-MM-DD"
+            placeholder="选择日期"
+            popper-class="date-select"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="but">
+        <el-button
+          round
+          size="mini"
+          :disabled="displayDetail"
+          class="buttons"
+          @click="gerCjdb"
+          >搜索</el-button
+        >
+        <el-button
+          round
+          size="mini"
+          class="buttons"
+          @click="dbfx"
+          :disabled="
+            chooseList.length <= 5 && chooseList.length > 1 ? false : true
+          "
+          >对标分析</el-button
+        >
+        <el-button
+          round
+          size="mini"
+          class="buttons"
+          @click="goBack"
+          v-if="displayDetail"
+          >返回</el-button
+        >
+        <!-- <el-button round size="mini" class="buttons">导出</el-button> -->
+      </div>
+    </div>
     <div class="bodys" v-if="!displayDetail">
       <div class="line">
         <div class="leftContent"><span>场际对标</span></div>
@@ -455,9 +547,14 @@
 </template>
 
 <script>
-import HeardSearch from "@com/heardSearch/index.vue";
 import dayjs from "dayjs";
-import { companys } from "@/api/curveAnalyse";
+import {
+  GetOrganization,
+  GetStationByCompany,
+  GetProjectList,
+  GetLineList,
+  GetSquareList,
+} from "@/api/headerNav.js";
 import { getStation, cjdb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
@@ -465,21 +562,19 @@ import dayinfo from "../compontent/dayinfo.vue";
 export default {
   name: "intervalBenchmarking", //场际对标
   components: {
-    HeardSearch,
     PieChart,
     BarCharts,
     dayinfo,
   },
   data() {
     return {
-      isFirstLoad: true,
       company: "",
       companyOptions: [],
       stationObj: [],
       stationList: [],
       starTime: "",
       endTime: "",
-      tabIndex: -1,
+      tabIndex: -2,
       tabOptions: [
         { id: -1, name: "风电" },
         { id: -2, name: "光伏" },
@@ -534,13 +629,12 @@ export default {
   methods: {
     tabClick(val) {
       this.tabIndex = val;
-      this.getStation(this.company);
       this.stationObj = [];
+      this.initialization();
       this.gerCjdb();
-      //   this.initialization()
     },
     initialization() {
-      companys().then((res) => {
+      GetOrganization({ type: this.tabIndex }).then((res) => {
         if (res.data) {
           this.company = res.data[0].id;
           this.companyOptions = res.data;
@@ -549,12 +643,13 @@ export default {
       });
     },
     getStation(companyids) {
-      getStation({
+      GetStationByCompany({
         companyids: companyids,
         type: this.tabIndex,
       }).then((res) => {
         if (res.data.length) {
           this.stationList = res.data;
+        //   this.stationObj = [res.data[0].id];
         } else {
           this.stationList = [];
         }
@@ -840,19 +935,6 @@ export default {
       );
       this.analyisDialog = analyis;
     },
-    firstRender(searchOptions) {
-      this.tabIndex = searchOptions.category;
-      this.company = searchOptions.orgId;
-      this.starTime = searchOptions.dateRange?.[0] || "";
-      this.endTime = searchOptions.dateRange?.[1] || "";
-      this.stationObj = [searchOptions.station];
-      this.projectObj = [searchOptions.project];
-      this.lineObj = [searchOptions.line];
-      if (this.isFirstLoad) {
-        this.isFirstLoad = false;
-        this.gerCjdb();
-      }
-    },
   },
   watch: {
     screenHeight(val) {
@@ -906,6 +988,7 @@ export default {
       color: #fff;
     }
     .disabled {
+      cursor: not-allowed;
       pointer-events: none;
     }
   }

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

@@ -1,19 +1,146 @@
 <template>
   <div class="parcel-box">
-    <HeardSearch
-      :type="-2"
-      :hiddenWtList="true"
-      @firstRender="firstRender"
-      :buttons="[
-        { label: '搜索', callback: gerWxssl },
-        {
-          label: '对标分析',
-          callback: dbfx,
-          disabled:
-            chooseList.length <= 5 && chooseList.length > 1 ? false : true,
-        },
-      ]"
-    />
+    <div class="title">
+        <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"
+        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.aname"
+          :value="item.id"
+        >
+        </el-option>
+      </el-select>
+      <div class="station">
+        开始日期
+        <div class="search-input">
+          <el-date-picker
+            v-model="starTime"
+            :disabled="displayDetail"
+            type="date"
+            value-format="YYYY-MM-DD"
+            placeholder="选择日期"
+            popper-class="date-select"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="station">
+        结束日期
+        <div class="search-input">
+          <el-date-picker
+            :disabled="displayDetail"
+            v-model="endTime"
+            type="date"
+            value-format="YYYY-MM-DD"
+            placeholder="选择日期"
+            popper-class="date-select"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="but">
+        <el-button
+          round
+          size="mini"
+          class="buttons"
+          :disabled="displayDetail"
+          @click="gerWxssl"
+          >搜索</el-button
+        >
+        <el-button
+          round
+          size="mini"
+          class="buttons"
+          @click="dbfx"
+          :disabled="
+            chooseList.length <= 5 && chooseList.length > 1 ? false : true
+          "
+          >对标分析</el-button
+        >
+        <el-button
+          round
+          size="mini"
+          class="buttons"
+          @click="goBack"
+          v-if="displayDetail"
+          >返回</el-button
+        >
+        <!-- <el-button round size="mini" class="buttons">导出</el-button> -->
+      </div>
+    </div>
     <div class="bodys" v-if="!displayDetail">
       <div class="line">
         <div class="leftContent"><span>五项损失率</span></div>
@@ -35,6 +162,7 @@
           <el-table-column
             align="center"
             prop="name"
+            show-overflow-tooltip
             label="名称"
             width="150"
             sortable
@@ -468,10 +596,16 @@
 </template>
 
 <script>
-import HeardSearch from "@com/heardSearch/index.vue";
 import dayjs from "dayjs";
 import { companys } from "@/api/curveAnalyse";
 import {
+  GetOrganization,
+  GetStationByCompany,
+  GetProjectList,
+  GetLineList,
+  GetSquareList,
+} from "@/api/headerNav.js";
+import {
   getStation,
   getProject,
   getLine,
@@ -484,14 +618,12 @@ import dayinfo from "../compontent/dayinfo.vue";
 export default {
   name: "intervalBenchmarking", //场际对标
   components: {
-    HeardSearch,
     PieChart,
     BarCharts,
     dayinfo,
   },
   data() {
     return {
-      isFirstLoad: true,
       company: "",
       companyOptions: [],
       stationObj: [],
@@ -502,7 +634,7 @@ export default {
       lineList: [],
       starTime: "",
       endTime: "",
-      tabIndex: -1,
+      tabIndex: -2,
       tabOptions: [
         { id: -1, name: "风电" },
         { id: -2, name: "光伏" },
@@ -557,18 +689,14 @@ export default {
   methods: {
     tabClick(val) {
       this.tabIndex = val;
-      this.stationObj = [];
       this.stationList = [];
+      this.stationObj = [];
       this.projectObj = [];
-      this.projectList = [];
       this.lineObj = [];
-      this.lineList = [];
-      this.tableData = [];
-      this.getStation(this.company);
-      //   this.gerWxssl();
+      this.initialization();
     },
-    initialization() {
-      companys().then((res) => {
+   initialization() {
+      GetOrganization({ type: this.tabIndex }).then((res) => {
         if (res.data) {
           this.company = res.data[0].id;
           this.companyOptions = res.data;
@@ -577,34 +705,36 @@ export default {
       });
     },
     getStation(companyids) {
-      getStation({
+      GetStationByCompany({
         companyids: companyids,
         type: this.tabIndex,
       }).then((res) => {
         if (res.data.length) {
           this.stationList = res.data;
-          this.getProject(res.data[0].id);
+          this.gerWxssl();
+        } else {
+          this.stationList = [];
         }
       });
     },
-    getProject(wpids) {
-      getProject({
-        wpids: wpids,
-      }).then((res) => {
+    getProject(stationids) {
+      GetProjectList(stationids.join(",")).then((res) => {
         if (res.data.length) {
           this.projectList = res.data;
-          this.getLine(res.data[0].id);
+        } else {
+          this.projectList = [];
         }
+        this.gerWxssl();
       });
     },
-    getLine(pjids) {
-      getLine({
-        pjids: pjids,
-      }).then((res) => {
+    getLineList(projectids) {
+      GetLineList(projectids.join(",")).then((res) => {
         if (res.data.length) {
           this.lineList = res.data;
-          this.gerWxssl();
+        } else {
+          this.lineList = [];
         }
+        this.gerWxssl();
       });
     },
     gerWxssl() {
@@ -674,7 +804,7 @@ export default {
     },
     handleProjectChange(val) {
       this.lineObj = [];
-      this.getLine(val);
+      this.getLineList(val);
     },
     handleCurrentChange(val) {
       if (val.length > 5) {
@@ -894,22 +1024,10 @@ export default {
       );
       this.analyisDialog = analyis;
     },
-    firstRender(searchOptions) {
-      this.tabIndex = searchOptions.category;
-      this.company = searchOptions.orgId;
-      this.starTime = searchOptions.dateRange?.[0] || "";
-      this.endTime = searchOptions.dateRange?.[1] || "";
-      this.stationObj = [searchOptions.station];
-      this.projectObj = [searchOptions.project];
-      this.lineObj = [searchOptions.line];
-      if (this.isFirstLoad) {
-        this.isFirstLoad = false;
-        this.gerWxssl();
-      }
-    },
   },
   watch: {
     screenHeight(val) {
+      console.log(val);
       this.screenHeight = val;
       if (val > 1100) {
         this.echartsHeight = "58vh";
@@ -960,6 +1078,7 @@ export default {
       color: #fff;
     }
     .disabled {
+      cursor: not-allowed;
       pointer-events: none;
     }
   }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1291 - 0
src/views/layout/economicsOperation/benchmarkingManagement/machineBenchmarking/index.vue


+ 92 - 125
src/views/layout/economicsOperation/benchmarkingManagement/performanceRankingList/decision1Mx.vue

@@ -1,17 +1,24 @@
 <template>
   <div class="home-body" style="height: 93vh">
-    <HeardSearch
-      :type="-2"
-      :hiddenWtList="true"
-      @firstRender="firstRender"
-      :buttons="[
-        { label: '明细', callback: mxClick },
-        { label: '搜索', callback: getPerformance },
-      ]"
-    />
-    <div class="title" v-if="false">
+    <div class="title">
       <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"
         placeholder="请选择"
         @change="handleCompanyChange(company)"
@@ -24,65 +31,52 @@
         >
         </el-option>
       </el-select>
-      <div class="tabCut">
-        <div
-          @click="tabClick(val.id)"
-          :class="tabIndex === val.id ? 'active' : ''"
-          v-for="val in tabOptions"
-          :key="val.id"
+      <el-select
+        size="mini"
+        :disabled="displayDetail"
+        v-model="stationObj"
+        placeholder="请选择"
+        @change="handleStationChange(stationObj)"
+        clearable
+      >
+        <el-option
+          v-for="item in stationList"
+          :key="item.id"
+          :label="item.aname"
+          :value="item.id"
         >
-          <span>{{ val.name }}</span>
-        </div>
-      </div>
-
-      <div class="station">
-        场站:
-        <el-select
-          size="mini"
-          v-model="stationObj"
-          placeholder="请选择"
-          @change="handleStationChange(stationObj)"
-          clearable
+        </el-option>
+      </el-select>
+      <el-select
+        size="mini"
+        v-model="projectObj"
+        placeholder="请选择"
+        @change="handleProjectChange(projectObj)"
+        clearable
+      >
+        <el-option
+          v-for="item in projectList"
+          :key="item.id"
+          :label="item.aname"
+          :value="item.id"
         >
-          <el-option
-            v-for="item in stationList"
-            :key="item.id"
-            :label="item.aname"
-            :value="item.id"
-          >
-          </el-option>
-        </el-select>
-      </div>
-      <div class="station">
-        项目:
-        <el-select
-          size="mini"
-          v-model="projectObj"
-          placeholder="请选择"
-          @change="handleProjectChange(projectObj)"
-          clearable
+        </el-option>
+      </el-select>
+      <el-select
+        size="mini"
+        v-model="lineObj"
+        placeholder="请选择"
+        @change="handleLineChange(lineObj)"
+        clearable
+      >
+        <el-option
+          v-for="item in lineList"
+          :key="item.id"
+          :label="item.aname"
+          :value="item.id"
         >
-          <el-option
-            v-for="item in projectList"
-            :key="item.id"
-            :label="item.aname"
-            :value="item.id"
-          >
-          </el-option>
-        </el-select>
-      </div>
-      <div class="station">
-        线路:
-        <el-select size="mini" v-model="lineObj" placeholder="请选择" clearable>
-          <el-option
-            v-for="item in lineList"
-            :key="item.id"
-            :label="item.aname"
-            :value="item.id"
-          >
-          </el-option>
-        </el-select>
-      </div>
+        </el-option>
+      </el-select>
 
       <div class="dates">
         开始日期
@@ -111,15 +105,11 @@
         </div>
       </div>
       <div class="but">
-        <el-button round size="mini" class="buttons" @click="mxClick"
+        <el-button round size="mini" class="buttons" @click="getPerformance"
           >搜索</el-button
         >
-        <el-button
-          round
-          size="mini"
-          class="buttons active"
-          @click="getPerformance"
-          >明细</el-button
+        <el-button round size="mini" class="buttons active" @click="mxClick"
+          >返回</el-button
         >
         <!-- <el-button round size="mini" class="buttons">导出</el-button> -->
       </div>
@@ -229,9 +219,15 @@
 </template>
 
 <script>
-import HeardSearch from "@com/heardSearch/index.vue";
 import BarLineChart from "../compontent/bar-line-chart.vue";
 import { companys } from "@/api/curveAnalyse";
+import {
+  GetOrganization,
+  GetStationByCompany,
+  GetProjectList,
+  GetLineList,
+  GetSquareList,
+} from "@/api/headerNav.js";
 import dayjs from "dayjs";
 import {
   getStation,
@@ -242,12 +238,10 @@ import {
 export default {
   name: "performanceRankingList", //风机绩效榜
   components: {
-    HeardSearch,
     BarLineChart,
   },
   data() {
     return {
-      isFirstLoad: true,
       company: "",
       companyOptions: [],
       stationObj: "",
@@ -258,7 +252,7 @@ export default {
       lineList: [],
       starTime: "",
       endTime: "",
-      tabIndex: -1,
+      tabIndex: -2,
       bardata: [],
       lineData: [],
       tabOptions: [
@@ -393,63 +387,45 @@ export default {
       this.getPerformance();
     },
     initialization() {
-      companys().then((res) => {
-        this.companyOptions = res.data;
-        if (res.data.length) {
+      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);
-        } else {
-          (this.company = ""),
-            (this.stationObj = ""),
-            (this.stationList = []),
-            (this.projectObj = ""),
-            (this.projectList = []),
-            (this.lineObj = ""),
-            (this.lineList = []);
         }
       });
     },
     getStation(companyids) {
-      getStation({
+      GetStationByCompany({
         companyids: companyids,
         type: this.tabIndex,
       }).then((res) => {
         if (res.data.length) {
+        //   this.stationObj = res.data[0].id;
           this.stationList = res.data;
-          this.getProject(res.data[0].id);
+          this.getPerformance();
+        //   this.getProject(this.stationObj);
         } else {
-          (this.stationObj = ""),
-            (this.stationList = []),
-            (this.projectObj = ""),
-            (this.projectList = []),
-            (this.lineObj = ""),
-            (this.lineList = []);
+          this.stationList = [];
         }
       });
     },
-    getProject(wpids) {
-      getProject({
-        wpids: wpids,
-      }).then((res) => {
+    getProject(stationids) {
+      GetProjectList(stationids).then((res) => {
         if (res.data.length) {
           this.projectList = res.data;
-          this.getLine(res.data[0].id);
         } else {
-          (this.projectObj = ""),
-            (this.projectList = []),
-            (this.lineObj = ""),
-            (this.lineList = []);
+          this.projectList = [];
         }
+        this.getPerformance();
       });
     },
-    getLine(pjids) {
-      getLine({
-        pjids: pjids,
-      }).then((res) => {
+    getLineList(projectids) {
+      GetLineList(projectids).then((res) => {
         if (res.data.length) {
           this.lineList = res.data;
         } else {
-          (this.lineObj = ""), (this.lineList = []);
+          this.lineList = [];
         }
         this.getPerformance();
       });
@@ -464,7 +440,11 @@ export default {
     },
     handleProjectChange(val) {
       this.typeIndex = "1";
-      this.getLine(val);
+      this.getLineList(val);
+    },
+    handleLineChange(val) {
+      this.typeIndex = "1";
+      this.getPerformance();
     },
     tabClick(data) {
       this.tabIndex = data;
@@ -474,8 +454,7 @@ export default {
         (this.projectList = []),
         (this.lineObj = ""),
         (this.lineList = []);
-      this.getStation(this.company);
-      this.getPerformance();
+      this.initialization();
     },
     typeClick(data) {
       this.typeIndex = data;
@@ -570,18 +549,6 @@ export default {
         "/economicsOperation/benchmarkingManagement/performanceRankingList"
       );
     },
-    firstRender(searchOptions) {
-      this.tabIndex = searchOptions.category;
-      this.getype = searchOptions.category;
-      this.companyid = searchOptions.orgId;
-      this.beginDate = searchOptions.dateRange?.[0] || "";
-      this.endDate = searchOptions.dateRange?.[1] || "";
-      this.stationObj = searchOptions.station;
-      if (this.isFirstLoad) {
-        this.isFirstLoad = false;
-        this.getPerformance();
-      }
-    },
   },
 };
 </script>

+ 150 - 69
src/views/layout/economicsOperation/benchmarkingManagement/performanceRankingList/index.vue

@@ -1,20 +1,126 @@
 <template>
   <div class="home-body" style="height: 93vh">
-    <HomeNav
-      :hiddenProject="true"
-      :hiddenLine="true"
-      :hiddenSearch="true"
-      @firstRender="firstRender"
-    />
-    <HeardSearch
-      :type="-2"
-      @firstRender="firstRender"
-      :buttons="[
-        { label: '搜索', callback: getPerformance },
-        { label: '明细', callback: mxClick },
-      ]"
-    />
-    <div class="tabCut1" v-if="tabIndex === -1">
+    <div class="title">
+      <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"
+        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"
+        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="请选择"
+        @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="请选择"
+        @change="handleLineChange(lineObj)"
+        clearable
+      >
+        <el-option
+          v-for="item in lineList"
+          :key="item.id"
+          :label="item.aname"
+          :value="item.id"
+        >
+        </el-option>
+      </el-select>
+
+      <div class="dates">
+        开始日期
+        <div class="search-input">
+          <el-date-picker
+            v-model="starTime"
+            type="date"
+            value-format="YYYY-MM-DD"
+            placeholder="选择日期"
+            popper-class="date-select"
+            @change="typeClick('1')"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="dates">
+        结束日期
+        <div class="search-input">
+          <el-date-picker
+            v-model="endTime"
+            type="date"
+            value-format="YYYY-MM-DD"
+            placeholder="选择日期"
+            popper-class="date-select"
+            @change="typeClick('1')"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="but">
+        <el-button
+          round
+          size="mini"
+          class="buttons active"
+          @click="getPerformance"
+          >搜索</el-button
+        >
+        <el-button round size="mini" class="buttons" @click="mxClick"
+          >明细</el-button
+        >
+        <!-- <el-button round size="mini" class="buttons">导出</el-button> -->
+      </div>
+    </div>
+    <div class="tabCut1">
       <div
         class="tabCut-item"
         @click="typeClick(val.id)"
@@ -96,8 +202,14 @@
 
 <script>
 import BarLineChart from "../compontent/bar-line-chart.vue";
-import HeardSearch from "@com/heardSearch/index.vue";
 import { companys } from "@/api/curveAnalyse";
+import {
+  GetOrganization,
+  GetStationByCompany,
+  GetProjectList,
+  GetLineList,
+  GetSquareList,
+} from "@/api/headerNav.js";
 import dayjs from "dayjs";
 import {
   getStation,
@@ -109,11 +221,9 @@ export default {
   name: "performanceRankingList", //风机绩效榜
   components: {
     BarLineChart,
-    HeardSearch,
   },
   data() {
     return {
-      isFirstLoad: true,
       barColor: [
         "#1c99ff",
         "#e17e23",
@@ -132,10 +242,9 @@ export default {
       lineList: [],
       starTime: "",
       endTime: "",
-      tabIndex: -1,
+      tabIndex: -2,
       bardata: [],
       lineData: [],
-      tabType: -1,
       tabOptions: [
         { id: -1, name: "风电" },
         { id: -2, name: "光伏" },
@@ -226,63 +335,45 @@ export default {
       this.getPerformance();
     },
     initialization() {
-      companys().then((res) => {
-        this.companyOptions = res.data;
-        if (res.data.length) {
+      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);
-        } else {
-          (this.company = ""),
-            (this.stationObj = ""),
-            (this.stationList = []),
-            (this.projectObj = ""),
-            (this.projectList = []),
-            (this.lineObj = ""),
-            (this.lineList = []);
         }
       });
     },
     getStation(companyids) {
-      getStation({
+      GetStationByCompany({
         companyids: companyids,
         type: this.tabIndex,
       }).then((res) => {
         if (res.data.length) {
+          //   this.stationObj = res.data[0].id;
           this.stationList = res.data;
-          this.getProject(res.data[0].id);
+          this.getPerformance();
+          //   this.getProject(this.stationObj);
         } else {
-          (this.stationObj = ""),
-            (this.stationList = []),
-            (this.projectObj = ""),
-            (this.projectList = []),
-            (this.lineObj = ""),
-            (this.lineList = []);
+          this.stationList = [];
         }
       });
     },
-    getProject(wpids) {
-      getProject({
-        wpids: wpids,
-      }).then((res) => {
+    getProject(stationids) {
+      GetProjectList(stationids).then((res) => {
         if (res.data.length) {
           this.projectList = res.data;
-          this.getLine(res.data[0].id);
         } else {
-          (this.projectObj = ""),
-            (this.projectList = []),
-            (this.lineObj = ""),
-            (this.lineList = []);
+          this.projectList = [];
         }
+        this.getPerformance();
       });
     },
-    getLine(pjids) {
-      getLine({
-        pjids: pjids,
-      }).then((res) => {
+    getLineList(projectids) {
+      GetLineList(projectids).then((res) => {
         if (res.data.length) {
           this.lineList = res.data;
         } else {
-          (this.lineObj = ""), (this.lineList = []);
+          this.lineList = [];
         }
         this.getPerformance();
       });
@@ -297,7 +388,11 @@ export default {
     },
     handleProjectChange(val) {
       this.typeIndex = "1";
-      this.getLine(val);
+      this.getLineList(val);
+    },
+    handleLineChange(val) {
+      this.typeIndex = "1";
+      this.getPerformance();
     },
     tabClick(data) {
       this.tabIndex = data;
@@ -307,8 +402,7 @@ export default {
         (this.projectList = []),
         (this.lineObj = ""),
         (this.lineList = []);
-      this.getStation(this.company);
-      this.getPerformance();
+      this.initialization();
     },
     typeClick(data) {
       this.typeIndex = data;
@@ -389,19 +483,6 @@ export default {
     mxClick() {
       this.$router.push("/benchmarkingManagement/decision1Mx");
     },
-    firstRender(searchOptions) {
-      console.log(1111, searchOptions);
-      this.tabIndex = searchOptions.category;
-      this.getype = searchOptions.category;
-      this.companyid = searchOptions.orgId;
-      this.beginDate = searchOptions.dateRange?.[0] || "";
-      this.endDate = searchOptions.dateRange?.[1] || "";
-      this.stationObj = searchOptions.station;
-      if (this.isFirstLoad) {
-        this.isFirstLoad = false;
-        this.getPerformance();
-      }
-    },
   },
 };
 </script>

+ 70 - 98
src/views/layout/economicsOperation/benchmarkingManagement/projectBenchmarking/index.vue

@@ -1,23 +1,21 @@
 <template>
   <div class="parcel-box">
-    <HeardSearch
-      :type="-2"
-      :hiddenLine="true"
-      :hiddenWtList="true"
-      @firstRender="firstRender"
-      :buttons="[
-        { label: '搜索', callback: getCmdb, disabled: displayDetail },
-        {
-          label: '对标分析',
-          callback: dbfx,
-          disabled:
-            chooseList.length <= 5 && chooseList.length > 1 ? false : true,
-        },
-        { label: '返回', callback: goBack, hide: displayDetail },
-      ]"
-      v-if="true"
-    />
-    <div class="title" v-else>
+    <div class="title">
+      <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"
@@ -33,61 +31,41 @@
         >
         </el-option>
       </el-select>
-      <div class="tabCut">
-        <div
-          @click="tabClick(val.id)"
-          :class="[
-            tabIndex === val.id ? 'active' : '',
-            displayDetail ? 'disabled' : '',
-          ]"
-          v-for="val in tabOptions"
-          :key="val.id"
-        >
-          <span>{{ val.name }}</span>
-        </div>
-      </div>
-      <div class="station">
-        场站:
-        <el-select
-          size="mini"
-          :disabled="displayDetail"
-          v-model="stationObj"
-          multiple
-          collapse-tags
-          placeholder="请选择"
-          @change="handleStationChange(stationObj)"
-          clearable
+      <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
-            v-for="item in stationList"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id"
-          >
-          </el-option>
-        </el-select>
-      </div>
-      <div class="station">
-        项目:
-        <el-select
-          size="mini"
-          :disabled="displayDetail"
-          v-model="projectObj"
-          placeholder="请选择"
-          multiple
-          collapse-tags
-          @change="handleProjectChange(projectObj)"
-          clearable
+        </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
-            v-for="item in projectList"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id"
-          >
-          </el-option>
-        </el-select>
-      </div>
+        </el-option>
+      </el-select>
       <div class="station">
         开始日期
         <div class="search-input">
@@ -583,9 +561,15 @@
 </template>
 
 <script>
-import HeardSearch from "@com/heardSearch/index.vue";
 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 PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
@@ -593,14 +577,12 @@ import dayinfo from "../compontent/dayinfo.vue";
 export default {
   name: "intervalBenchmarking", //场际对标
   components: {
-    HeardSearch,
     PieChart,
     BarCharts,
     dayinfo,
   },
   data() {
     return {
-      isFirstLoad: true,
       company: "",
       companyOptions: [],
       stationObj: [],
@@ -609,7 +591,7 @@ export default {
       projectList: [],
       starTime: "",
       endTime: "",
-      tabIndex: -1,
+      tabIndex: -2,
       tabOptions: [
         { id: -1, name: "风电" },
         { id: -2, name: "光伏" },
@@ -667,11 +649,10 @@ export default {
       this.stationList = [];
       this.stationObj = [];
       this.projectObj = [];
-      this.getStation(this.company);
-      this.getCmdb();
+      this.initialization();
     },
     initialization() {
-      companys().then((res) => {
+      GetOrganization({ type: this.tabIndex }).then((res) => {
         if (res.data) {
           this.company = res.data[0].id;
           this.companyOptions = res.data;
@@ -680,24 +661,28 @@ export default {
       });
     },
     getStation(companyids) {
-      getStation({
+      GetStationByCompany({
         companyids: companyids,
         type: this.tabIndex,
       }).then((res) => {
         if (res.data.length) {
+          this.stationObj = [res.data[0].id];
           this.stationList = res.data;
-          this.getProject(this.stationObj.join(","));
+          this.getCmdb();
+          this.getProject(this.stationObj);
+        } else {
+          this.stationList = [];
         }
       });
     },
-    getProject(wpids) {
-      getProject({
-        wpids: wpids,
-      }).then((res) => {
+    getProject(stationids) {
+      GetProjectList(stationids.join(",")).then((res) => {
         if (res.data.length) {
           this.projectList = res.data;
-          this.getCmdb();
+        } else {
+          this.projectList = [];
         }
+        this.getCmdb();
       });
     },
     getCmdb() {
@@ -966,19 +951,6 @@ export default {
       );
       this.analyisDialog = analyis;
     },
-    firstRender(searchOptions) {
-      this.tabIndex = searchOptions.category;
-      this.company = searchOptions.orgId;
-      this.starTime = searchOptions.dateRange?.[0] || "";
-      this.endTime = searchOptions.dateRange?.[1] || "";
-      this.stationObj = [searchOptions.station];
-      this.projectObj = [searchOptions.project];
-      this.lineObj = [searchOptions.line];
-      if (this.isFirstLoad) {
-        this.isFirstLoad = false;
-        this.getCmdb();
-      }
-    },
   },
   watch: {
     screenHeight(val) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1291 - 0
src/views/layout/economicsOperation/benchmarkingManagement/quarterBenchmarking/index.vue


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

@@ -1,28 +1,21 @@
 <template>
   <div class="parcel-box">
-    <HeardSearch
-      :type="-2"
-      :hiddenLine="true"
-      :hiddenProject="true"
-      @firstRender="firstRender"
-      :buttons="[
-        { label: '搜索', callback: gerCndb, disabled: displayDetail },
-        {
-          label: '对标分析',
-          callback: dbfx,
-          disabled:
-            chooseList.length <= 5 && chooseList.length > 1 ? false : true,
-        },
-        {
-          label: '返回',
-          callback: goBack,
-          hide: displayDetail,
-        },
-        { label: '同环比', callback: funthb },
-      ]"
-      v-if="true"
-    />
-    <div class="title" v-else>
+    <div class="title">
+      <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"
@@ -38,38 +31,23 @@
         >
         </el-option>
       </el-select>
-      <div class="tabCut">
-        <div
-          @click="tabClick(val.id)"
-          :class="[
-            tabIndex === val.id ? 'active' : '',
-            displayDetail ? 'disabled' : '',
-          ]"
-          v-for="val in tabOptions"
-          :key="val.id"
-        >
-          <span>{{ val.name }}</span>
-        </div>
-      </div>
-      <div class="station">
-        场站:
-        <el-select
-          size="mini"
-          :disabled="displayDetail"
-          v-model="stationObj"
-          placeholder="请选择"
-          @change="handleStationChange(stationObj)"
-          clearable
+      <el-select
+        size="mini"
+        :disabled="displayDetail"
+        v-model="stationObj"
+        placeholder="请选择"
+        @change="handleStationChange(stationObj)"
+        clearable
+      >
+        <el-option
+          v-for="item in stationList"
+          :key="item.id"
+          :label="item.aname"
+          :value="item.id"
         >
-          <el-option
-            v-for="item in stationList"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id"
-          >
-          </el-option>
-        </el-select>
-      </div>
+        </el-option>
+      </el-select>
+
       <div class="station">
         开始日期
         <div class="search-input">
@@ -833,9 +811,15 @@
 </template>
 
 <script>
-import HeardSearch from "@com/heardSearch/index.vue";
 import dayjs from "dayjs";
 import { companys } from "@/api/curveAnalyse";
+import {
+  GetOrganization,
+  GetStationByCompany,
+  GetProjectList,
+  GetLineList,
+  GetSquareList,
+} from "@/api/headerNav.js";
 import { getStation, cndb, thb, details } from "@/api/performance";
 import PieChart from "../../homePage/components/pieChart.vue";
 import BarCharts from "../../homePage/components/barCharts.vue";
@@ -843,7 +827,6 @@ import dayinfo from "../compontent/dayinfo.vue";
 export default {
   name: "siteBenchmarking", //场内对标
   components: {
-    HeardSearch,
     PieChart,
     BarCharts,
     dayinfo,
@@ -856,7 +839,7 @@ export default {
       stationList: [],
       starTime: "",
       endTime: "",
-      tabIndex: -1,
+      tabIndex: -2,
       tabOptions: [
         { id: -1, name: "风电" },
         { id: -2, name: "光伏" },
@@ -936,7 +919,7 @@ export default {
       //   this.initialization();
     },
     initialization() {
-      companys().then((res) => {
+      GetOrganization({ type: this.tabIndex }).then((res) => {
         if (res.data) {
           this.company = res.data[0].id;
           this.companyOptions = res.data;
@@ -945,19 +928,17 @@ export default {
       });
     },
     getStation(companyids) {
-      getStation({
+      GetStationByCompany({
         companyids: companyids,
         type: this.tabIndex,
       }).then((res) => {
         if (res.data.length) {
           this.stationList = res.data;
           this.stationObj = res.data[0].id;
-          this.gerCndb();
         } else {
           this.stationList = [];
-          this.stationObj = "";
-          this.gerCndb();
         }
+        this.gerCndb();
       });
     },
     gerCndb() {
@@ -1240,13 +1221,6 @@ export default {
       );
       this.analyisDialog = analyis;
     },
-    firstRender(searchOptions) {
-      this.tabIndex = searchOptions.category;
-      this.company = searchOptions.orgId;
-      this.startTime = searchOptions.dateRange?.[0] || "";
-      this.endTime = searchOptions.dateRange?.[1] || "";
-      this.stationObj = searchOptions.station;
-    },
   },
 
   watch: {
@@ -1304,6 +1278,7 @@ export default {
       color: #fff;
     }
     .disabled {
+      cursor: not-allowed;
       pointer-events: none;
     }
   }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 397 - 396
src/views/layout/economicsOperation/benchmarkingManagement/wiringBenchmarking/index.vue


+ 133 - 12
src/views/layout/economicsOperation/companyHomepage/index.vue

@@ -32,7 +32,29 @@
     </div>
     <div class="photovoltaic-chart3">
       <div class="chart-card power-statistics">
-        <div class="chart-card-title">发电统计</div>
+        <div class="chart-card-title-wrapper">
+          <div class="chart-card-title">发电统计</div>
+          <div class="right-bar">
+            <div
+              :class="datetype === 'r' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('r')"
+            >
+              <div class="day-name">日</div>
+            </div>
+            <div
+              :class="datetype === 'y' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('y')"
+            >
+              <div class="day-name">月</div>
+            </div>
+            <div
+              :class="datetype === 'n' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('n')"
+            >
+              <div class="day-name">年</div>
+            </div>
+          </div>
+        </div>
         <div class="chart-content">
           <div class="chart-img">
             <div class="img">
@@ -47,7 +69,7 @@
           </div>
           <ul class="chart-list">
             <li class="statistics-li">
-              <span class="statistics-name">当日发电量</span>
+              <span class="statistics-name">发电量</span>
 
               <div>
                 <span class="statistics-data">{{
@@ -58,22 +80,22 @@
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当月发电量</span>
+              <span class="statistics-name">理论发电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.yfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.llfdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当年发电量</span>
+              <span class="statistics-name">损失电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.nfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.ssdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
@@ -205,16 +227,16 @@
           <div class="form-box">
             <div
               class="theme-change"
-              @click="themeChange('operate')"
-              :class="themeType === 'operate' && 'active-theme'"
+              @click="themeChange('maintenance')"
+              :class="themeType === 'maintenance' && 'active-theme'"
             >
               <i class="icon-operate"></i>
               <span>运营</span>
             </div>
             <div
               class="theme-change"
-              @click="themeChange('maintenance')"
-              :class="themeType === 'maintenance' && 'active-theme'"
+              @click="themeChange('operate')"
+              :class="themeType === 'operate' && 'active-theme'"
             >
               <i class="icon-maintenance"></i>
               <span>运维</span>
@@ -301,7 +323,7 @@ export default {
       stationLists: [], // 场站列表
       timer: null, // 3秒调一次
       checkNode: "", // 选中区域
-      themeType: "operate", // 主题模式  经营类:operate, 运维类:maintenance
+      themeType: "maintenance", // 主题模式  经营类:maintenance, 运维类:operate
       stationName: [], //选中场站
       isActive: "card", // 切换卡片或列表
       dayWindPieData: {}, //五项损失图表数据
@@ -320,6 +342,7 @@ export default {
       ],
       sortCode: "", //排序条件
       sortType: true, //升序降序
+      datetype: "r",
     };
   },
 
@@ -342,6 +365,7 @@ export default {
         companyId: this.checkNode,
         type: 0,
         statype: -1,
+        datetype: this.datetype,
       });
       this.companyPowerStationData = res; //所有页面数据
       this.listData = this.companyPowerStationData?.wxsslb; //列表数据
@@ -384,6 +408,11 @@ export default {
       this.sortCode = val;
       this.cardData = this.getSortList(this.listData, this.sortCode);
     },
+    //切换日月年
+    handleChangeDay(val) {
+      this.datetype = val;
+      this.getDataDetial();
+    },
     // 切换公司
     async companyChange(val) {
       clearInterval(this.timer);
@@ -555,6 +584,10 @@ export default {
       border-radius: 8px;
       padding: 25px 15px;
 
+      .chart-card-title-wrapper {
+        display: flex;
+        justify-content: space-between;
+      }
       .chart-card-title {
         position: relative;
         top: -8px;
@@ -562,6 +595,93 @@ export default {
         font-size: 16px;
         color: #fff;
       }
+      .right-bar {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        margin-top: -8px;
+      }
+      .day-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        border: 1px solid #5e6778;
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
+
+      .type-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.2);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
+
+      .type-button-on {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.5);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #1c99ff;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+
+        .day-name {
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
 
       .chart-content {
         display: flex;
@@ -698,7 +818,7 @@ export default {
             justify-content: space-between;
             padding-bottom: 5px;
             border-bottom: 1px solid #4c545a;
-            margin-bottom: 18px;
+            margin-bottom: 10px;
 
             .station-state {
               display: flex;
@@ -722,6 +842,7 @@ export default {
               font-size: 16px;
               .unit {
                 color: #b3b3b3;
+                font-size: 12px;
                 font-family: PingFangSC-Regular, PingFang SC;
               }
             }

+ 133 - 12
src/views/layout/economicsOperation/companyHomepage/indexGf.vue

@@ -32,7 +32,29 @@
     </div>
     <div class="photovoltaic-chart3">
       <div class="chart-card power-statistics">
-        <div class="chart-card-title">发电统计</div>
+        <div class="chart-card-title-wrapper">
+          <div class="chart-card-title">发电统计</div>
+          <div class="right-bar">
+            <div
+              :class="datetype === 'r' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('r')"
+            >
+              <div class="day-name">日</div>
+            </div>
+            <div
+              :class="datetype === 'y' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('y')"
+            >
+              <div class="day-name">月</div>
+            </div>
+            <div
+              :class="datetype === 'n' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('n')"
+            >
+              <div class="day-name">年</div>
+            </div>
+          </div>
+        </div>
         <div class="chart-content">
           <div class="chart-img">
             <div class="img">
@@ -47,7 +69,7 @@
           </div>
           <ul class="chart-list">
             <li class="statistics-li">
-              <span class="statistics-name">当日发电量</span>
+              <span class="statistics-name">发电量</span>
 
               <div>
                 <span class="statistics-data">{{
@@ -58,22 +80,22 @@
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当月发电量</span>
+              <span class="statistics-name">理论发电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.yfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.llfdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当年发电量</span>
+              <span class="statistics-name">损失电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.nfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.ssdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
@@ -205,16 +227,16 @@
           <div class="form-box">
             <div
               class="theme-change"
-              @click="themeChange('operate')"
-              :class="themeType === 'operate' && 'active-theme'"
+              @click="themeChange('maintenance')"
+              :class="themeType === 'maintenance' && 'active-theme'"
             >
               <i class="icon-operate"></i>
               <span>运营</span>
             </div>
             <div
               class="theme-change"
-              @click="themeChange('maintenance')"
-              :class="themeType === 'maintenance' && 'active-theme'"
+              @click="themeChange('operate')"
+              :class="themeType === 'operate' && 'active-theme'"
             >
               <i class="icon-maintenance"></i>
               <span>运维</span>
@@ -301,7 +323,7 @@ export default {
       stationLists: [], // 场站列表
       timer: null, // 3秒调一次
       checkNode: "", // 选中区域
-      themeType: "operate", // 主题模式  经营类:operate, 运维类:maintenance
+      themeType: "maintenance", // 主题模式  经营类:maintenance, 运维类:operate
       stationName: [], //选中场站
       isActive: "card", // 切换卡片或列表
       dayWindPieData: {}, //五项损失图表数据
@@ -320,6 +342,7 @@ export default {
       ],
       sortCode: "", //排序条件
       sortType: true, //升序降序
+      datetype: "r",
     };
   },
 
@@ -342,6 +365,7 @@ export default {
         companyId: this.checkNode,
         type: 0,
         statype: -2,
+        datetype: this.datetype,
       });
       this.companyPowerStationData = res; //所有页面数据
       this.listData = this.companyPowerStationData?.wxsslb; //列表数据
@@ -384,6 +408,11 @@ export default {
       this.sortCode = val;
       this.cardData = this.getSortList(this.listData, this.sortCode);
     },
+    //切换日月年
+    handleChangeDay(val) {
+      this.datetype = val;
+      this.getDataDetial();
+    },
     // 切换公司
     async companyChange(val) {
       clearInterval(this.timer);
@@ -555,6 +584,10 @@ export default {
       border-radius: 8px;
       padding: 25px 15px;
 
+      .chart-card-title-wrapper {
+        display: flex;
+        justify-content: space-between;
+      }
       .chart-card-title {
         position: relative;
         top: -8px;
@@ -562,6 +595,93 @@ export default {
         font-size: 16px;
         color: #fff;
       }
+      .right-bar {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        margin-top: -8px;
+      }
+      .day-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        border: 1px solid #5e6778;
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
+
+      .type-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.2);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
+
+      .type-button-on {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.5);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #1c99ff;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+
+        .day-name {
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
 
       .chart-content {
         display: flex;
@@ -698,7 +818,7 @@ export default {
             justify-content: space-between;
             padding-bottom: 5px;
             border-bottom: 1px solid #4c545a;
-            margin-bottom: 18px;
+            margin-bottom: 10px;
 
             .station-state {
               display: flex;
@@ -722,6 +842,7 @@ export default {
               font-size: 16px;
               .unit {
                 color: #b3b3b3;
+                font-size: 12px;
                 font-family: PingFangSC-Regular, PingFang SC;
               }
             }

+ 36 - 23
src/views/layout/economicsOperation/homePage/components/card.vue

@@ -122,22 +122,35 @@
                   </div>
                 </li>
                 <li>
-                  <div class="maintenance-data">
-                    <div class="data-prop">发电量</div>
-                    <div class="data-num">
-                      <span>{{ item?.fdl?.toFixed(2) || 0 }}</span> 万kWh
+                  <div class="data-prop">发电量</div>
+                  <div class="data-num">
+                    <span>{{ item?.fdl?.toFixed(2) || 0 }}</span> 万kWh
+                  </div>
+                </li>
+                <li>
+                  <div class="data-prop">理论发电量</div>
+                  <div class="data-num">
+                    <div>
+                      <span>{{ item?.llfdl?.toFixed(2) || 0 }}</span
+                      >万kWh
                     </div>
                   </div>
-                  <div class="maintenance-data">
-                    <div class="data-prop">理论发电量</div>
-                    <div class="data-num">
-                      <div>
-                        <span>{{ item?.llfdl?.toFixed(2) || 0 }}</span> 万kWh
-                      </div>
+                </li>
+                <li>
+                  <div class="data-prop">损失电量</div>
+                  <div class="data-num">
+                    <div>
+                      <span>{{
+                        item?.ssdl
+                          ? item?.ssdl <= 0
+                            ? 0
+                            : item?.ssdl?.toFixed(2)
+                          : 0
+                      }}</span>
+                      万kWh
                     </div>
                   </div>
                 </li>
-
                 <!-- <li>
                   <div class="maintenance-item">
                     <div class="name">健康状态</div>
@@ -501,7 +514,7 @@ export default {
           li {
             display: flex;
             justify-content: space-between;
-            margin-bottom: 18px;
+            margin-bottom: 12px;
             font-size: 14px;
             width: 100%;
             .maintenance-item {
@@ -566,20 +579,20 @@ export default {
                 }
               }
             }
-            .maintenance-data {
-              .data-prop {
-                margin-bottom: 10px;
-              }
-
-              .data-num {
+            .data-prop {
+              margin-bottom: 10px;
+            }
 
-                span {
-                  display: inline-block;
-                  min-width: 50px;
-                  color: rgb(27, 147, 244);
-                }
+            .data-num {
+              span {
+                display: inline-block;
+                min-width: 50px;
+                color: rgb(27, 147, 244);
               }
             }
+            // .maintenance-data {
+
+            // }
           }
           .child-interrupt {
             .service-label::before {

+ 127 - 8
src/views/layout/economicsOperation/homePage/index.vue

@@ -19,7 +19,29 @@
     </div>
     <div class="photovoltaic-chart3">
       <div class="chart-card power-statistics">
-        <div class="chart-card-title">发电统计</div>
+        <div class="chart-card-title-wrapper">
+          <div class="chart-card-title">发电统计</div>
+          <div class="right-bar">
+            <div
+              :class="datetype === 'r' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('r')"
+            >
+              <div class="day-name">日</div>
+            </div>
+            <div
+              :class="datetype === 'y' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('y')"
+            >
+              <div class="day-name">月</div>
+            </div>
+            <div
+              :class="datetype === 'n' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('n')"
+            >
+              <div class="day-name">年</div>
+            </div>
+          </div>
+        </div>
         <div class="chart-content">
           <div class="chart-img">
             <div class="img">
@@ -34,7 +56,7 @@
           </div>
           <ul class="chart-list">
             <li class="statistics-li">
-              <span class="statistics-name">当日发电量</span>
+              <span class="statistics-name">发电量</span>
 
               <div>
                 <span class="statistics-data">{{
@@ -45,22 +67,22 @@
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当月发电量</span>
+              <span class="statistics-name">理论发电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.yfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.llfdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当年发电量</span>
+              <span class="statistics-name">损失电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.nfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.ssdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
@@ -307,6 +329,7 @@ export default {
       ],
       sortCode: "",
       sortType: true,
+      datetype: "r",
     };
   },
 
@@ -336,6 +359,7 @@ export default {
         companyId: this.province.code,
         type: -1,
         statype: 0,
+        datetype: this.datetype || "r",
       });
       this.companyPowerStationData = res; //所有页面数据
       this.listData = this.companyPowerStationData?.wxsslb; //列表数据
@@ -370,6 +394,11 @@ export default {
       this.sortCode = val;
       this.cardData = this.getSortList(this.listData, this.sortCode);
     },
+    //切换日月年
+    handleChangeDay(val) {
+      this.datetype = val;
+      this.getDataDetial();
+    },
     // 切换公司
     areaChange(val) {
       clearInterval(this.timer);
@@ -489,7 +518,10 @@ export default {
       background: rgba(11, 11, 11, 0.45);
       border-radius: 8px;
       padding: 25px 15px;
-
+      .chart-card-title-wrapper {
+        display: flex;
+        justify-content: space-between;
+      }
       .chart-card-title {
         position: relative;
         top: -8px;
@@ -497,7 +529,93 @@ export default {
         font-size: 16px;
         color: #fff;
       }
+      .right-bar {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        margin-top: -8px;
+      }
+      .day-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        border: 1px solid #5e6778;
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
 
+      .type-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.2);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
+
+      .type-button-on {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.5);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #1c99ff;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+
+        .day-name {
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
       .chart-content {
         display: flex;
         align-items: center;
@@ -628,7 +746,7 @@ export default {
             justify-content: space-between;
             padding-bottom: 5px;
             border-bottom: 1px solid #4c545a;
-            margin-bottom: 18px;
+            margin-bottom: 10px;
 
             .station-state {
               display: flex;
@@ -652,6 +770,7 @@ export default {
               font-size: 16px;
               .unit {
                 color: #b3b3b3;
+                font-size: 12px;
                 font-family: PingFangSC-Regular, PingFang SC;
               }
             }

+ 127 - 8
src/views/layout/economicsOperation/homePage/indexGF.vue

@@ -19,7 +19,29 @@
     </div>
     <div class="photovoltaic-chart3">
       <div class="chart-card power-statistics">
-        <div class="chart-card-title">发电统计</div>
+        <div class="chart-card-title-wrapper">
+          <div class="chart-card-title">发电统计</div>
+          <div class="right-bar">
+            <div
+              :class="datetype === 'r' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('r')"
+            >
+              <div class="day-name">日</div>
+            </div>
+            <div
+              :class="datetype === 'y' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('y')"
+            >
+              <div class="day-name">月</div>
+            </div>
+            <div
+              :class="datetype === 'n' ? 'type-button-on' : 'day-button'"
+              @click="handleChangeDay('n')"
+            >
+              <div class="day-name">年</div>
+            </div>
+          </div>
+        </div>
         <div class="chart-content">
           <div class="chart-img">
             <div class="img">
@@ -34,7 +56,7 @@
           </div>
           <ul class="chart-list">
             <li class="statistics-li">
-              <span class="statistics-name">当日发电量</span>
+              <span class="statistics-name">发电量</span>
 
               <div>
                 <span class="statistics-data">{{
@@ -45,22 +67,22 @@
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当月发电量</span>
+              <span class="statistics-name">理论发电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.yfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.llfdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
               <span class="statistics-unit">万kWh</span>
             </li>
             <li class="statistics-li">
-              <span class="statistics-name">当年发电量</span>
+              <span class="statistics-name">损失电量</span>
 
               <div>
                 <span class="statistics-data">{{
-                  companyPowerStationData?.fdtj?.nfdl?.toFixed(2) || 0
+                  companyPowerStationData?.fdtj?.ssdl?.toFixed(2) || 0
                 }}</span>
               </div>
 
@@ -307,6 +329,7 @@ export default {
       ],
       sortCode: "",
       sortType: true,
+      datetype: "r",
     };
   },
 
@@ -336,6 +359,7 @@ export default {
         companyId: this.province.code,
         type: -2,
         statype: 0,
+        datetype: this.datetype,
       });
       this.companyPowerStationData = res; //所有页面数据
       this.listData = this.companyPowerStationData?.wxsslb; //列表数据
@@ -370,6 +394,11 @@ export default {
       this.sortCode = val;
       this.cardData = this.getSortList(this.listData, this.sortCode);
     },
+    //切换日月年
+    handleChangeDay(val) {
+      this.datetype = val;
+      this.getDataDetial();
+    },
     // 切换公司
     areaChange(val) {
       clearInterval(this.timer);
@@ -489,7 +518,10 @@ export default {
       background: rgba(11, 11, 11, 0.45);
       border-radius: 8px;
       padding: 25px 15px;
-
+      .chart-card-title-wrapper {
+        display: flex;
+        justify-content: space-between;
+      }
       .chart-card-title {
         position: relative;
         top: -8px;
@@ -497,7 +529,93 @@ export default {
         font-size: 16px;
         color: #fff;
       }
+      .right-bar {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        margin-top: -8px;
+      }
+      .day-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        border: 1px solid #5e6778;
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
 
+      .type-button {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.2);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #b3b3b3;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
+
+      .type-button-on {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        padding: 0 14px;
+        background: rgba(0, 70, 199, 0.5);
+        border-radius: 16px;
+        text-align: center;
+        margin-right: 20px;
+        cursor: pointer;
+        color: #1c99ff;
+        font-size: 16px;
+        height: 32px;
+        min-width: 54px;
+
+        .type-name {
+          margin-left: 9px;
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+
+        .day-name {
+          color: #ffffff;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          line-height: 32px;
+        }
+      }
       .chart-content {
         display: flex;
         align-items: center;
@@ -628,7 +746,7 @@ export default {
             justify-content: space-between;
             padding-bottom: 5px;
             border-bottom: 1px solid #4c545a;
-            margin-bottom: 18px;
+            margin-bottom: 10px;
 
             .station-state {
               display: flex;
@@ -652,6 +770,7 @@ export default {
               font-size: 16px;
               .unit {
                 color: #b3b3b3;
+                font-size: 12px;
                 font-family: PingFangSC-Regular, PingFang SC;
               }
             }

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

@@ -72,15 +72,20 @@ export default {
               path: "/economicsOperation/benchmarkingManagement/wiringBenchmarking",
             },
             {
+              titleName: "阵区对标",
+              icon: "",
+              path: "/economicsOperation/benchmarkingManagement/quarterBenchmarking",
+            },
+            {
               titleName: "设备对标",
               icon: "",
-              path: "/economicsOperation/benchmarkingManagement/singleMachineBenchmarking",
+              path: "/economicsOperation/benchmarkingManagement/machineBenchmarking",
+            },
+            {
+              titleName: "公司对标",
+              icon: "",
+              path: "/economicsOperation/benchmarkingManagement/companyBenchmarking",
             },
-            // {
-            //   titleName: "值际对标",
-            //   icon: "",
-            //   path: "/economicsOperation/benchmarkingManagement/valueBenchmarking",
-            // },
             // {
             //   titleName: '性能对标',
             //   icon: '',