Browse Source

经济运行--修改首页下拉框及点击逻辑,修改首页部分接口及页面展示文字

baiyanting 2 years ago
parent
commit
d5b3266cb5

+ 4 - 2
.env.development

@@ -1,5 +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.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.103:6060
 # 服务名,调用后台微服务
 VUE_APP_SERVER_NAME = /nem-api
 

+ 4 - 4
src/api/economy.js

@@ -19,10 +19,10 @@ const pointCodeList = (data) => {
 //获取排行榜
 const pointRanking = (data) => {
     return request({
-        baseURL: process.env.VUE_APP_Economy,
-        url: `/economy/point-ranking?dateType=${data.dateType}&foreignKeyId=${data.foreignKeyId}&pointCode=${data.pointCode}&popup=${data.popup}`,
-        method: 'get',
-    })
+      baseURL: process.env.VUE_APP_Economy,
+      url: `/economy/point-ranking?dateType=${data.dateType}&foreignKeyId=${data.foreignKeyId}&pointCode=${data.pointCode}&popup=${data.popup}&staType=${data.staType}`,
+      method: "get",
+    });
 }
 export default {
     homePage,

+ 18 - 0
src/api/headerNav.js

@@ -0,0 +1,18 @@
+import request from "@/utils/request";
+
+//获取公司列表
+export function GetOrganization(data) {
+  return request({
+    baseURL: process.env.VUE_APP_Economy,
+    url: `benchmarking/companyslist?type=${data.type}`,
+    method: "get",
+  });
+}
+//获取公司场站列表
+export function GetStationByCompany(data) {
+  return request({
+    baseURL: process.env.VUE_APP_Economy,
+    url: `benchmarking/wpByCplist?companyids=${data.companyids}&type=${data.type}`,
+    method: "get",
+  });
+}

+ 440 - 0
src/components/headerNavE/index.vue

@@ -0,0 +1,440 @@
+<template>
+  <div>
+    <ul>
+      <div class="rightTitle">
+        <li>
+          <el-select
+            v-model="tagListNode"
+            placeholder="请选择"
+            @change="tagListChang"
+          >
+            <el-option
+              v-show="item.flag"
+              v-for="(item, indexe) in tagList"
+              :key="indexe"
+              :label="item.name"
+              :value="item.type"
+            >
+            </el-option>
+          </el-select>
+        </li>
+        <li>
+          <el-select
+            v-model="checkNode"
+            :placeholder="parentNode?.aname"
+            clearable
+            :multiple="companyMultiple"
+            collapse-tags
+            @change="dataChang"
+          >
+            <el-option
+              v-for="(item, indexe) in OrganizationLists"
+              :key="indexe"
+              :label="item.aname"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </li>
+        <li v-if="hiddenStation && stationList.length > 0">
+          <el-select
+            v-model="checkStation"
+            placeholder="全部场站"
+            clearable
+            :multiple="stationMultiple"
+            collapse-tags
+            @change="dataChangs"
+          >
+            <el-option
+              v-for="(item, index) in stationList"
+              :key="index"
+              :label="item.aname"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </li>
+        <li v-if="hiddenProject">
+          <div class="station">
+            项目:
+            <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>
+          </div>
+        </li>
+        <li v-if="hiddenLine">
+          <div class="station">
+            线路:
+            <el-select
+              size="mini"
+              v-model="lineObj"
+              placeholder="请选择"
+              clearable
+              @change="typeClick('1')"
+            >
+              <el-option
+                v-for="item in lineList"
+                :key="item.id"
+                :label="item.aname"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </li>
+        <li v-if="hiddenProject">
+          <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>
+        </li>
+      </div>
+    </ul>
+  </div>
+</template>
+
+<script>
+import { GetOrganization, GetStationByCompany } from "@/api/headerNav.js";
+
+export default {
+  name: "HomeNav", //首页标题栏
+  props: {
+    type: {
+      type: Number,
+      default: -2,
+    },
+    handType: String,
+    codeRight: String,
+    codeNums: String, // 公司Code
+    stationCode: String, // 场站Code
+    shangeColor: String,
+    hiddenStation: {
+      type: Boolean,
+      default: true,
+    },
+    hiddenProject: {
+      type: Boolean,
+      default: false,
+    },
+    hiddenLine: {
+      type: Boolean,
+      default: false,
+    },
+    hiddenSearch: {
+      type: Boolean,
+      default: false,
+    },
+    stationMultiple: {
+      type: Boolean,
+      default: false,
+    },
+    companyMultiple: {
+      type: Boolean,
+      default: false,
+    },
+    intoCheckNode: {
+      // 是否需要默认选中公司,将codeRight(公司code)传给checkNode,
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      OrganizationLists: [{ id: "JS_RGN", aname: "江苏区域" }], //公司列表
+      stationList: [], //场站列表
+      checkStation: "", //场站值
+      checkNode: "JS_RGN", //公司值
+      tagList: [
+        { type: -1, flag: true, id: "F", name: "风电" },
+        { type: -2, flag: true, id: "G", name: "光伏" }, //类型
+      ],
+      tagListNode: -2, //类型值
+      projectObj: "",
+      projectList: [],
+      lineObj: "",
+      lineList: [],
+    };
+  },
+  async created() {
+    await this.getOrganizationLists(this.tagListNode, true);
+
+    if (this.shangeColor != "") {
+      this.s = this.shangeColor;
+    } else {
+      this.s = "all";
+    }
+  },
+  methods: {
+    //获取区域公司
+    async getOrganizationLists(val, flag) {
+      const { data } = await GetOrganization({ type: val });
+      this.OrganizationLists = data;
+      if (!flag) {
+        this.tagList.forEach((item) => {
+          if (item.id != val) {
+            item.flag = false;
+          }
+        });
+      }
+      if (this.checkNode != "") {
+        this.getPowerStation(this.checkNode);
+      } else {
+        this.stationList = "";
+      }
+      this.$emit("firstRender", this.tagListNode, this.checkNode);
+    },
+    deepClone(ob) {
+      var obj = JSON.stringify(ob);
+      var objClone = JSON.parse(obj);
+      return objClone;
+    },
+    // 切换风光水
+    tagListChang(val) {
+      //   this.tagListNode = val;
+      //   if (this.checkNode == "JS_RGN") {
+      // this.getOrganizationLists(val, true);
+      //   } else {
+      // this.getOrganizationLists(val);
+      //   }
+      if (val == -1) {
+        this.$router.push({ path: "/economicsOperation/homePage" });
+      } else if (val == -2) {
+        this.$router.push({ path: "/economicsOperation/homePageGf" });
+      }
+    },
+
+    //区域切换
+    dataChang(id) {
+      //根据区域公司编码获取场站信息
+      this.checkStation = "";
+      this.checkNode = id;
+      if (id != "JS_RGN") {
+        let comp = this.OrganizationLists.find((item) => item.id == id);
+        this.tagList.forEach((item) => {
+          if (item.id != comp.eleType) {
+            item.flag = false;
+          } else {
+            item.flag = true;
+          }
+        });
+        this.tagListNode = comp.eleType == "F" ? -1 : -2;
+      } else {
+        this.tagList = [
+          { type: -1, flag: true, id: "F", name: "风电" },
+          { type: -2, flag: true, id: "G", name: "光伏" },
+        ];
+        this.tagListNode = this.tagList[0].type;
+      }
+      if (id.length > 0) {
+        this.getPowerStation(id);
+      } else {
+        this.stationList = "";
+      }
+
+      this.$emit("firstRender", this.tagListNode, id, "");
+    },
+
+    //获取场站信息
+    async getPowerStation(val) {
+      const { data } = await GetStationByCompany({
+        companyids: val,
+        type: this.tagListNode,
+      });
+      this.stationList = data;
+    },
+    //区域切换
+    async dataChangs(val) {
+      //根据区域公司编码获取场站信息
+      if (val.length == 0) {
+        this.checkStation = "";
+      }
+      this.$emit("firstRender", this.tagListNode, this.checkNode, val);
+    },
+  },
+  watch: {
+    type: {
+      handler(val) {
+        if (val == -1) {
+          this.tagListNode = -1;
+        } else if (val == -2) {
+          this.tagListNode = -2;
+        }
+      },
+      immediate: true,
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+::v-deep .el-input__suffix {
+  display: inline-block;
+  right: 0 !important;
+  width: 80px !important;
+}
+
+::v-deep .el-input__suffix .el-icon-circle-close {
+  position: absolute;
+  top: -7px !important;
+  right: 18px !important;
+}
+
+::v-deep .el-input__suffix .el-icon-arrow-up {
+  display: block !important;
+
+  right: -52px !important;
+}
+
+ul {
+  user-select: none;
+  display: flex;
+
+  .headerRight {
+    padding: 0 14px;
+    height: 25px;
+    line-height: 25px;
+    background: rgba(0, 70, 199, 0.2);
+    border-radius: 16px;
+    text-align: center;
+    margin-right: 15px;
+    cursor: pointer;
+
+    span {
+      width: 29px;
+      height: 12px;
+      font-size: 14px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #b3b3b3;
+    }
+
+    i {
+      font-size: 16px;
+      color: #b3b3b3;
+      position: relative;
+      margin-right: 9px;
+      vertical-align: -9%;
+    }
+  }
+
+  .forbidden {
+    background: #666666;
+    opacity: 0.5;
+
+    span {
+      color: #b3b3b3;
+    }
+  }
+
+  .active {
+    background: rgba(0, 70, 199, 0.4);
+
+    .active_icon {
+      color: rgba(28, 153, 255, 1);
+    }
+
+    span {
+      color: #ffffff;
+    }
+  }
+
+  .nav_right {
+    transition: 0.3s;
+  }
+
+  .nav_right:first-of-type {
+    margin-left: 30px;
+  }
+
+  p {
+    width: 60px;
+  }
+
+  .rightTitle {
+    display: flex;
+  }
+}
+
+.active.light {
+  background: rgba(255, 131, 0, 0.2);
+
+  i {
+    color: rgba(255, 131, 0, 1);
+  }
+}
+
+.active.wind {
+  background-color: rgba(0, 70, 199, 0.4);
+
+  i {
+    color: #1c99ff;
+  }
+}
+
+.active.hydraulic {
+  background-color: rgba(0, 252, 255, 0.2);
+
+  i {
+    color: #00fcff;
+  }
+}
+
+.active.energy {
+  background-color: rgba(230, 59, 13, 0.2);
+
+  i {
+    color: #e63b0d;
+  }
+}
+.station {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  font-size: 14px;
+  font-family: Microsoft YaHei;
+  font-weight: 400;
+  color: #b3b3b3;
+  margin-right: 10px;
+}
+
+.but {
+  display: flex;
+  flex-direction: row;
+  align-content: center;
+  margin-left: 20px;
+}
+
+.buttons {
+  background-color: rgba(0, 70, 199, 0.2);
+  border: 1px solid #3b4c6c;
+  color: #b3b3b3;
+  font-size: 14px;
+
+  &:hover,
+  &.active {
+    background-color: rgba(0, 70, 199, 0.5);
+    color: #ffffff;
+  }
+}
+</style>

File diff suppressed because it is too large
+ 846 - 681
src/router/index.js


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

@@ -1,6 +1,12 @@
 <template>
   <div class="home-body" style="height: 93vh">
-    <div class="title">
+    <HomeNav
+      :hiddenProject="true"
+      :hiddenLine="true"
+      :hiddenSearch="true"
+      @firstRender="firstRender"
+    />
+    <!-- <div class="title">
       <el-select
           size="mini"
           v-model="company"
@@ -120,16 +126,16 @@
         <el-button round size="mini" class="buttons" @click="mxClick"
         >明细</el-button
         >
-        <!-- <el-button round size="mini" class="buttons">导出</el-button> -->
       </div>
-    </div>
+    </div> -->
+
     <div class="tabCut1">
       <div
-          class="tabCut-item"
-          @click="typeClick(val.id)"
-          :class="typeIndex === val.id ? 'active' : ''"
-          v-for="val in typeOptions"
-          :key="val.id"
+        class="tabCut-item"
+        @click="typeClick(val.id)"
+        :class="typeIndex === val.id ? 'active' : ''"
+        v-for="val in typeOptions"
+        :key="val.id"
       >
         <span>{{ val.name }}</span>
       </div>
@@ -137,20 +143,20 @@
     <div class="performance" style="height: 90vh">
       <div class="economicTable" style="height: 86vh">
         <el-table
-            :data="tableData"
-            size="mini"
-            :cell-style="{ padding: '6px' }"
-            :row-style="{ height: '0px' }"
-            stripe
-            @header-click="onHeaderClick"
+          :data="tableData"
+          size="mini"
+          :cell-style="{ padding: '6px' }"
+          :row-style="{ height: '0px' }"
+          stripe
+          @header-click="onHeaderClick"
         >
           <el-table-column align="center" prop="" label="" width="900">
           </el-table-column>
           <el-table-column
-              align="center"
-              prop="name"
-              show-overflow-tooltip
-              label="名称"
+            align="center"
+            prop="name"
+            show-overflow-tooltip
+            label="名称"
           >
           </el-table-column>
           <el-table-column align="center" prop="llfdl" label="理论发电量">
@@ -158,16 +164,16 @@
           <el-table-column align="center" prop="sjfdl" label="实际发电量">
           </el-table-column>
           <el-table-column
-              align="center"
-              prop="fnlly"
-              :label="tabIndex === -1 ? '风能利用率%' : '光能利用率%'"
-              width="120"
+            align="center"
+            prop="fnlly"
+            :label="tabIndex === -1 ? '风能利用率%' : '光能利用率%'"
+            width="120"
           >
           </el-table-column>
           <el-table-column
-              align="center"
-              prop="speed"
-              :label="tabIndex === -1 ? '风速' : '光照'"
+            align="center"
+            prop="speed"
+            :label="tabIndex === -1 ? '风速' : '光照'"
           >
           </el-table-column>
           <el-table-column align="center" prop="fjhjx" label="故障">
@@ -184,12 +190,12 @@
       </div>
       <div class="left">
         <bar-line-chart
-            v-if="showDisplay"
-            :height="height"
-            :bardata="bardata"
-            :lineData="lineData"
-            :color="barColor"
-            lineName="理论发电量"
+          v-if="showDisplay"
+          :height="height"
+          :bardata="bardata"
+          :lineData="lineData"
+          :color="barColor"
+          lineName="理论发电量"
         />
         <div class="lyl" :style="{ height: tableData.length * 38 + 'px' }">
           <div class="lyl-item" v-for="(item, index) in tableData" :key="index">
@@ -338,12 +344,12 @@ export default {
           this.getStation(res.data[0].id);
         } else {
           (this.company = ""),
-              (this.stationObj = ""),
-              (this.stationList = []),
-              (this.projectObj = ""),
-              (this.projectList = []),
-              (this.lineObj = ""),
-              (this.lineList = []);
+            (this.stationObj = ""),
+            (this.stationList = []),
+            (this.projectObj = ""),
+            (this.projectList = []),
+            (this.lineObj = ""),
+            (this.lineList = []);
         }
       });
     },
@@ -357,11 +363,11 @@ export default {
           this.getProject(res.data[0].id);
         } else {
           (this.stationObj = ""),
-              (this.stationList = []),
-              (this.projectObj = ""),
-              (this.projectList = []),
-              (this.lineObj = ""),
-              (this.lineList = []);
+            (this.stationList = []),
+            (this.projectObj = ""),
+            (this.projectList = []),
+            (this.lineObj = ""),
+            (this.lineList = []);
         }
       });
     },
@@ -374,9 +380,9 @@ export default {
           this.getLine(res.data[0].id);
         } else {
           (this.projectObj = ""),
-              (this.projectList = []),
-              (this.lineObj = ""),
-              (this.lineList = []);
+            (this.projectList = []),
+            (this.lineObj = ""),
+            (this.lineList = []);
         }
       });
     },
@@ -407,11 +413,11 @@ export default {
     tabClick(data) {
       this.tabIndex = data;
       (this.stationObj = ""),
-          (this.stationList = []),
-          (this.projectObj = ""),
-          (this.projectList = []),
-          (this.lineObj = ""),
-          (this.lineList = []);
+        (this.stationList = []),
+        (this.projectObj = ""),
+        (this.projectList = []),
+        (this.lineObj = ""),
+        (this.lineList = []);
       this.getStation(this.company);
       this.getPerformance();
     },
@@ -434,16 +440,16 @@ export default {
       }).then((res) => {
         if (res.data) {
           let name = [],
-              data = [],
-              llfdl = [],
-              legend = [
-                "实际电量",
-                "检修损失电量",
-                "故障损失电量",
-                "限电损失电量",
-                "受累损失电量",
-                "性能损失电量",
-              ]; //项目列表
+            data = [],
+            llfdl = [],
+            legend = [
+              "实际电量",
+              "检修损失电量",
+              "故障损失电量",
+              "限电损失电量",
+              "受累损失电量",
+              "性能损失电量",
+            ]; //项目列表
           res.data.forEach((item, index) => {
             name.push(item.name);
             data.push([
@@ -611,9 +617,9 @@ export default {
       position: absolute;
       width: 1px;
       background-image: linear-gradient(
-          #3a4043 0%,
-          #3a4043 40%,
-          transparent 50%
+        #3a4043 0%,
+        #3a4043 40%,
+        transparent 50%
       );
       background-size: 1px 9px;
       margin-top: 45px;

+ 3 - 3
src/views/layout/economicsOperation/homePage/components/sdSvg.vue

@@ -30,10 +30,10 @@
                     </circle>
                 </g>
             </defs>
-          <image v-if="foreignKeyId === 'SD_RGN'" style="overflow: visible" width="800" height="440" class="map-base" xlink:href="img/images/SDL_RGNSvg.png"
+          <image style="overflow: visible" width="800" height="440" class="map-base" xlink:href="img/images/JS_RGN1.png"
                  transform="matrix(1 0 0 1 0 -24)"></image>
-            <image v-else style="overflow: visible" width="800" height="440" class="map-base" :xlink:href="'img/images/' + foreignKeyId +'Svg.png'"
-                transform="matrix(1 0 0 1 0 -24)"></image>
+            <!-- <image v-else style="overflow: visible" width="800" height="440" class="map-base" :xlink:href="'img/images/' + foreignKeyId +'Svg.png'"
+                transform="matrix(1 0 0 1 0 -24)"></image> -->
             <g>
                 <g class="item-hover" v-for="(item, index) in stationinfo" :key="index">
                     <use xlink:href="#nx-map-circle-1" :x="item.xPoint"

+ 60 - 66
src/views/layout/economicsOperation/homePage/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="body">
     <div class="title-bar">
-      <headerNav :remove="false" @firstRender="firstRender" />
+      <HomeNav :type="-1" @firstRender="firstRender" />
       <div class="right-bar">
         <div
           :class="currentDay === 'r' ? 'type-button-on' : 'day-button'"
@@ -288,9 +288,7 @@
         </div>
         <div class="indicator-content">
           <div class="content-item1">
-            <div class="item-title">
-              {{ staType == -2 ? "系统效率" : "复位及时率" }}
-            </div>
+            <div class="item-title">复位及时率</div>
             <div class="percent" style="color: #ffffff">
               {{ allData.zbl?.currFwjsl.toFixed(2) }}
             </div>
@@ -337,9 +335,7 @@
           </div>
           <div class="content-dashe"></div>
           <div class="content-item1">
-            <div class="item-title">
-              {{ staType == -2 ? "离散率" : "状态转换率" }}
-            </div>
+            <div class="item-title">状态转换率</div>
             <div class="percent" style="color: #ffffff">
               {{ allData.zbl?.currZtzhl.toFixed(2) }}
             </div>
@@ -386,9 +382,7 @@
           </div>
           <div class="content-dashe"></div>
           <div class="content-item1">
-            <div class="item-title">
-              {{ staType == -2 ? "转换效率" : "消缺及时率" }}
-            </div>
+            <div class="item-title">消缺及时率</div>
             <div class="percent" style="color: #ffffff">
               {{ allData.zbl?.currXqjsl.toFixed(2) }}
             </div>
@@ -596,7 +590,9 @@
       <div class="left-analysis">
         <div class="analysis-item">
           <div class="progess">
-            <div class="wind-rate">       {{ staType == -2 ? "光能利用率" : "风能利用率" }}</div>
+            <div class="wind-rate">
+              {{ staType == -2 ? "光能利用率" : "风能利用率" }}
+            </div>
             <div class="rate-value">
               {{ allData?.fdlinfo?.fnlyl === 0 ? 0 : allData?.fdlinfo?.fnlyl }}%
             </div>
@@ -875,7 +871,7 @@
 </template>
 
 <script>
-import headerNav from "@/components/headerNav";
+import HomeNav from "@/components/headerNavE";
 import progressItem from "./components/progress.vue";
 import LineCharts from "./components/lineCharts.vue";
 import PieChart from "./components/pieChart.vue";
@@ -888,7 +884,7 @@ import api from "@api/economy";
 export default {
   name: "homePage", //首页
   components: {
-    headerNav,
+    HomeNav,
     progressItem,
     LineCharts,
     PieChart,
@@ -949,7 +945,7 @@ export default {
       this.barHeight = "110px";
       this.barHeights = "220px";
     }
-    this.pointCodeList();
+    // this.pointCodeList();
     window.onresize = () => {
       return (() => {
         window.screenHeight = window.innerHeight;
@@ -958,17 +954,18 @@ export default {
     };
   },
   methods: {
-    handleClick() {
-      this.getPointRanking(true);
-    },
-    handleMapClick() {
-      this.getPointRanking(true, "fnlyl");
+    firstRender(headerIndex, nodeCode, stationCode) {
+      //   if (d) {
+      //     this.svgImg = d;
+      //   }
+      this.staType = headerIndex;
+      this.foreignKeyId = stationCode ? stationCode : nodeCode;
+      this.pointCodeList();
     },
     pointCodeList() {
       api.pointCodeList().then((res) => {
         if (res.data) {
-
-          res.data =  res.data.map((item) => {
+          res.data = res.data.map((item) => {
             if (this.staType == -2) {
               if (item.nemCode == "fnlyl") {
                 item.description = "光能利用率";
@@ -978,7 +975,7 @@ export default {
                 item.description = "风能利用率";
               }
             }
-            return item
+            return item;
           });
           this.pointList = res.data;
           this.getHomePageData();
@@ -986,59 +983,18 @@ export default {
         }
       });
     },
-    getPointRanking(popup, pointValue) {
-      api
-        .pointRanking({
-          foreignKeyId: this.foreignKeyId || "SD_RGN",
-          pointCode: pointValue ? "fnlyl" : this.pointValue,
-          dateType: this.currentDay || "r",
-          popup: popup,
-          staType: this.staType || 0,
-        })
-        .then((res) => {
-          if (res) {
-            let zbphl = [
-              {
-                name: "发电量",
-                children: [],
-                date: [],
-              },
-            ];
-            res.data.forEach((item) => {
-              zbphl[0].name = item.description;
-              zbphl[0].date.push(item.stationname);
-              zbphl[0].children.push(item.value);
-            });
-            if (popup) {
-              this.allZbphl = zbphl;
-              this.displayPhb = true;
-            } else {
-              this.zbphl = zbphl;
-            }
-          }
-        });
-    },
-    firstRender(headerIndex, nodeCode, a, b, c, d) {
-      if (d) {
-        this.svgImg = d;
-      }
-      this.staType = headerIndex;
-      this.foreignKeyId = nodeCode;
-      this.pointCodeList();
-    },
     getHomePageData() {
       api
         .homePage({
           regionId: "",
-          staType: this.staType || 0,
+          staType: this.staType,
           dateType: this.currentDay || "f",
           pointCode: this.pointValue,
-          foreignKeyId: this.foreignKeyId || "SD_RGN",
+          foreignKeyId: this.foreignKeyId || "JS_RGN",
           companyId: "",
         })
         .then((res) => {
           if (res) {
-            // console.log(999);
             this.allData = res.data;
             let arr = [];
             if (this.staType != -2) {
@@ -1169,11 +1125,49 @@ export default {
               obj.yPoint = Number(item.yPoint);
               stationinfo.push(obj);
             });
-            console.log(999, stationinfo);
             this.stationinfo = stationinfo;
           }
         });
     },
+    getPointRanking(popup, pointValue) {
+      api
+        .pointRanking({
+          foreignKeyId: this.foreignKeyId || "JS_RGN",
+          pointCode: pointValue ? "fnlyl" : this.pointValue,
+          dateType: this.currentDay || "r",
+          popup: popup,
+          staType: this.staType,
+        })
+        .then((res) => {
+          if (res) {
+            let zbphl = [
+              {
+                name: "发电量",
+                children: [],
+                date: [],
+              },
+            ];
+            res.data.forEach((item) => {
+              zbphl[0].name = item.description;
+              zbphl[0].date.push(item.stationname);
+              zbphl[0].children.push(item.value);
+            });
+            if (popup) {
+              this.allZbphl = zbphl;
+              this.displayPhb = true;
+            } else {
+              this.zbphl = zbphl;
+            }
+          }
+        });
+    },
+    handleClick() {
+      this.getPointRanking(true);
+    },
+    handleMapClick() {
+      this.getPointRanking(true, "fnlyl");
+    },
+
     handleChangeType(val) {
       this.current = val;
       this.getHomePageData();

File diff suppressed because it is too large
+ 1686 - 0
src/views/layout/economicsOperation/homePage/indexGF.vue


+ 4 - 4
src/views/layout/index.vue

@@ -39,7 +39,7 @@
     <s-d-canves-map class="canves_map" v-if="showHeader === 'none'&& gname=='SDL_RGN'"/>
     <QHcanvesMap class="canves_map" v-if="showHeader === 'none'&& gname=='QH_RGN'"/>
     <router-view @click="displayAlar" v-if="showHeader === 'block'"/>
-    <div @mousedown="startDrag" :style="{ left: x + 'px', top: y + 'px' }"
+    <!-- <div @mousedown="startDrag" :style="{ left: x + 'px', top: y + 'px' }"
          style="cursor:pointer;position:absolute; z-index:999;" v-if="showHeades=='block'">
         <el-badge :value="data1" class="item">
             <div class="alarmDeligo" @click.stop="displayAlarm('1')">
@@ -50,7 +50,7 @@
 
     </div>
     <deligo-alarm-list ref="deligoChild" :displayAlarms="displayAlarms" v-if="displayAlarms==true"
-                       :powerStation="powerStation"></deligo-alarm-list>
+                       :powerStation="powerStation"></deligo-alarm-list> -->
 
 </template>
 <script>
@@ -276,7 +276,7 @@
                 this.showHeades = "block"
             }, 3000)
 
-            this.getAlarmDataByPoweStations()
+            // this.getAlarmDataByPoweStations()
         },
         methods: {
 
@@ -373,7 +373,7 @@
         },
         mounted() {
             this.timer = setInterval(() => {
-                this.getAlarmDataByPoweStations()
+                // this.getAlarmDataByPoweStations()
             }, 3000)
             let showHeader = window.sessionStorage.getItem('showHeader')
             if (showHeader) {