소스 검색

问题(sunzehao提交)修改

wangb 5 달 전
부모
커밋
6c348f3342

+ 1 - 1
src/components/powerPredictionComponent/batteryDivinerDialog/dayBatterDialog.vue

@@ -35,7 +35,7 @@
                     <div id="centerCharts" class="chartsStyle"></div>
                 </div>
                 <div class="main_table warn-table" style="margin-top: 20px">
-                    <el-table :data="tableData" ref="report-table_day" border max-height="50vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_day" border max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',

+ 1 - 1
src/components/powerPredictionComponent/batteryDivinerDialog/monthAndYearBatterDialog.vue

@@ -29,7 +29,7 @@
                 <div id="centersCharts" class="chartsStyle"></div>
             </div>
             <div class="main_table warn-table" style="margin-top: 20px">
-                <el-table :data="tableData" ref="report-table" border max-height="50vh" style="width: 100%"
+                <el-table :data="tableData" ref="report-table" border max-height="45vh" style="width: 100%"
                     :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',

+ 6 - 4
src/components/powerPredictionComponent/homePageAssembly/globalDialogPage.vue

@@ -39,7 +39,7 @@
                     <div id="centerCharts" class="chartsStyle"></div>
                 </div>
                 <div class="warn-table" style="margin-top: 20px" v-show="title === '功率预测'">
-                    <el-table :data="tableData" ref="report-table_power" max-height="50vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_power" max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -320,7 +320,8 @@
                                 series.push(seriesObj);
                             });
                         }
-                        this.getglobalLine("centerCharts", "功率", xAxis, legend, series);
+                        let color = ['#5470c6', '#91cc75', '#fac858', '#39d93d', '#ee6666', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
+                        this.getglobalLine("centerCharts", "功率", xAxis, legend, series, color);
                     }
                 });
             },
@@ -392,7 +393,7 @@
                     );
                 }
             },
-            getglobalLine(name, title, xAxis, legend, series) {
+            getglobalLine(name, title, xAxis, legend, series, color) {
                 let yxname =
                     title === "功率" ? "兆瓦(Mw)" : title === "风速" ? "m/s" : "W/㎡";
                 let option = {
@@ -400,6 +401,7 @@
                     title: {
                         text: title,
                     },
+                    color: color,
                     tooltip: {
                         trigger: "axis",
                     },
@@ -457,7 +459,7 @@
                         if (datas.data.dataFormatList) {
                             datas.data.dataFormatList.forEach((item) => {
                                 for (let i in item) {
-                                    if (i !== "dataTime") {
+                                    if (i !== "dataTime" && i !== "monthList") {
                                         if (item[i] !== null && item[i] !== "NaN") {
                                             item[i] = item[i].toFixed(3);
                                         } else {

+ 5 - 3
src/components/powerPredictionComponent/panoramicPowerDialog/panoramaPowerDialogPage.vue

@@ -32,7 +32,7 @@
                     </el-col>
                 </el-row>
                 <div class="main_table warn-table" style="margin-top: 20px">
-                    <el-table :data="tableData" ref="report-table" border max-height="50vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table" border max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -248,20 +248,22 @@
                             series.push(seriesObj);
                         });
                     }
+                    let color = ['#5470c6', '#91cc75', '#fac858', '#39d93d', '#ee6666', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
                     if (name === "功率") {
-                        this.getglobalLine("centerCharts", name, xAxis, legend, series);
+                        this.getglobalLine("centerCharts", name, xAxis, legend, series, color);
                     } else {
                         this.getglobalLine("windCharts", name, xAxis, legend, series);
                     }
                 }
             },
-            getglobalLine(name, title, xAxis, legend, series) {
+            getglobalLine(name, title, xAxis, legend, series, color) {
                 let Yname =
                     title === "功率" ? "兆瓦(Mw)" : title === "风速" ? "m/s" : "W/㎡";
                 let option = {
                     title: {
                         text: title,
                     },
+                    color: color,
                     tooltip: {
                         trigger: "axis",
                     },

+ 5 - 3
src/components/powerPredictionComponent/powerPredictionDialog/predictionDialogPage.vue

@@ -30,7 +30,7 @@
                     <div id="centerCharts" class="chartsStyle"></div>
                 </div>
                 <div class="main_table warn-table" style="margin-top: 20px" v-show="isPower">
-                    <el-table :data="tableData" ref="report-table_power" border max-height="50vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_power" border max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -280,7 +280,8 @@
                                 series.push(seriesObj);
                             });
                         }
-                        this.getglobalLine("centerCharts", "功率", xAxis, legend, series);
+                        let color = ['#5470c6', '#91cc75', '#fac858', '#39d93d', '#ee6666', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
+                        this.getglobalLine("centerCharts", "功率", xAxis, legend, series, color);
                     }
                 });
             },
@@ -335,7 +336,7 @@
                     }
                 });
             },
-            getglobalLine(name, title, xAxis, legend, series) {
+            getglobalLine(name, title, xAxis, legend, series, color) {
                 let dark = this.from === "index" ? "dark" : "";
                 let yxname = title === "功率" ? "兆瓦(Mw)" : "m/s";
                 let dom = document.getElementById(name);
@@ -347,6 +348,7 @@
                     title: {
                         text: title,
                     },
+                    color: color,
                     tooltip: {
                         trigger: "axis",
                     },

+ 25 - 7
src/views/IntegratedAlarm/reliability/customAnalyse/index.vue

@@ -152,7 +152,7 @@
         :data="state.tableData"
         style="height: calc(100% - 60px)"
         stripe
-        @sort-change="handleSort"
+        @sort-change="handleSortChange"
       >
         <el-table-column
           prop="wtname"
@@ -168,7 +168,7 @@
           min-width="170"
           header-align="center"
           show-overflow-tooltip
-          sortable="custom"
+          sortable="customSort"
         >
           <template #default="scope">
             <div class="bar">
@@ -707,6 +707,19 @@ const changeTableData = (res) => {
   }
 };
 
+const handleSortChange = ({ column, prop, order }) => {
+    let code = prop.code+'_count';
+    state.tableData = state.tableData.slice().sort((a, b) => {
+        if (order === 'ascending') {
+        return a[code] - b[code];
+        } else if (order === 'descending') {
+        return b[code] - a[code];
+        } else {
+        // return 0;
+        }
+    });
+}
+
 const handleSort = function (val) {
   let item = val.prop;
   let list = JSON.parse(JSON.stringify(state.tableData));
@@ -714,15 +727,20 @@ const handleSort = function (val) {
     state.tableData = list.sort(compare(`${item.code}_count`));
   } else if (val.order == "descending") {
     state.tableData = list.sort(compare(`${item.code}_count`)).reverse();
+  } else {
+    state.tableData = list.sort(compare(`${item.code}_count`));
   }
 };
 //排序函数
 const compare = function (property) {
-  return function (a, b) {
-    var value1 = a[property];
-    var value2 = b[property];
-    return value1 - value2;
-  };
+  if (property !== 0) {
+    return function (a, b) {
+      var value1 = a[property];
+      var value2 = b[property];
+      return value1 - value2;
+    };
+  
+  }
 };
 //     // 单元格点击事件
 //     handle(row, column, event, cell) {

+ 16 - 2
src/views/IntegratedAlarm/reliability/historyAnalyse/index.vue

@@ -155,7 +155,7 @@
         :data="state.tableData"
         stripe
         style="height: calc(100% - 60px)"
-        @sort-change="handleSort"
+        @sort-change="handleSortChange"
       >
         <el-table-column
           prop="wtname"
@@ -171,7 +171,7 @@
           min-width="170"
           header-align="center"
           show-overflow-tooltip
-          sortable="custom"
+          sortable="customSort"
         >
           <template #default="scope">
             <div class="bar">
@@ -677,6 +677,20 @@ const changeTableData = (res) => {
       }
 }
 
+const handleSortChange = ({ column, prop, order }) => {
+    let code = prop.code+'_count';
+    state.tableData = state.tableData.slice().sort((a, b) => {
+        if (order === 'ascending') {
+        return a[code] - b[code];
+        } else if (order === 'descending') {
+        return b[code] - a[code];
+        } else {
+        // return 0;
+        }
+    });
+}
+
+
 const handleSort = function (val) {
   let item = val.prop;
   let list = JSON.parse(JSON.stringify(state.tableData));

+ 7 - 2
src/views/IntegratedAlarm/safe/customWarning/index.vue

@@ -368,7 +368,7 @@ onMounted(() => {
     projectname: "一期项目",
     rank: 3,
     resettable: false,
-    stationid: "",
+    stationid: "GJNY_SXGS_ZZ_FDC_STA",
     stationname: "13风电场",
     subcomponents: "NULL",
     suffix: null,
@@ -462,7 +462,7 @@ const state = reactive({
     // },
   ],
   c: "windturbine",
-  stationId: "",
+  stationId: "GJNY_SXGS_ZZ_FDC_STA",
   alarmId: "",
   typeVal: "windturbine",
   windturbineList: [],
@@ -630,9 +630,14 @@ const getAlarmHistoryt = async () => {
     ele.isCloseName = ele.endts ? "已解除" : "未解除";
     ele.deviceTypeName = tableFilter(ele.deviceType);
     ele.endtsName = ele.endts > 0 ? formatTime(ele.endts) : "--";
+    ele.devicename = changName(ele)
   });
   state.tableData = data?.ls;
 };
+const changName = (ele) => {
+  let str = ele.stationname.substring(0, ele.stationname.indexOf('风电场'))
+  return ele.devicename.substring(str.length, ele.devicename.length)
+}
 //报警类型变化
 const typechange = () => {
   state.alarmId = "";

+ 8 - 4
src/views/IntegratedAlarm/safe/historyWarning/index.vue

@@ -483,7 +483,7 @@ const state = reactive({
     // },
   ],
   typeVal: "windturbine",
-  stationId: "",
+  stationId: "GJNY_SXGS_ZZ_FDC_STA",
   stationName: "",
   alarmId: "",
   windturbineList: [],
@@ -501,8 +501,8 @@ const state = reactive({
   ts: "",
   tableHeader: [
     { title: "时间", code: "ts", width: "150" },
-    { title: "场站", code: "stationname", width: "150" },
-    { title: "机组", code: "devicename", width: "150" },
+    { title: "场站", code: "stationname", width: "120" },
+    { title: "机组", code: "devicename", width: "100" },
     { title: "报警信息", code: "description" },
     // { title: "故障原因", code: "faultCause" },
     // { title: "级别", code: "rank", width: "80" },
@@ -674,10 +674,14 @@ const getAlarmHistoryt = async () => {
         ? "光伏"
         : "";
     ele.endtsName = ele.endts > 0 ? formatTime(ele.endts) : "--";
+    ele.devicename = changName(ele)
   });
   state.tableData = data?.ls;
 };
-
+const changName = (ele) => {
+  let str = ele.stationname.substring(0, ele.stationname.indexOf('风电场'))
+  return ele.devicename.substring(str.length, ele.devicename.length)
+}
 //报警类型变化
 const typechange = () => {
   state.alarmId = "";

+ 2 - 1
src/views/generatingCapacity/dataAnalysis/windAnalysis/components/barLineChart.vue

@@ -79,7 +79,8 @@ export default {
     color: {
       type: Array,
       default: () => [
-        "#323E6F",
+        "1d99ff",
+        // "#323E6F",
         "#e17e23",
         "#ba3237",
         "#c531c7",

+ 13 - 3
src/views/generatingCapacity/dataAnalysis/windAnalysis/index.vue

@@ -61,7 +61,7 @@
                   :height="tableHeight"
                   :bardata="barData"
                   :lineData="lineData"
-                  :color="barColor"
+                  :color="!theme ? barColor : barColorW"
                   lineName="理论发电量"
                 ></bar-line-chart-cop>
                 <el-empty
@@ -262,11 +262,21 @@ const barData = ref({
 });
 const lineData = ref([]);
 const barColor = [
-  "#4b55ae",
+  "#1d99ff",
+  // "#4b55ae",
   "#e17e23",
   "#ba3237",
   "#c531c7",
-  "rgb(63,177,227)",
+  // "rgb(63,177,227)",
+  "#fff",
+  "#05bb4c",
+];
+const barColorW = [
+  "#1d99ff",
+  "#e17e23",
+  "#ba3237",
+  "#c531c7",
+  "#000",
   "#05bb4c",
 ];
 

+ 65 - 65
src/views/powerPrediction/homePageNoMap.vue

@@ -23,7 +23,7 @@
               justify-content: end;
               margin-right: 53px;
             ">
-                        <!-- <div v-for="item in showpowerLegend" :key="item.name">
+                        <div v-for="item in showpowerLegend" :key="item.name">
                             <span class="lineColor" :style="{ background: item.color }"></span>
                             <span class="powerLegendColor" :style="{ background: item.color }"></span>
                             <span :style="!theme ? 'color: #fff' : ''" style="
@@ -32,7 +32,7 @@
                   position: relative;
                   top: 1px;
                 ">{{ item.name }}</span>
-                        </div> -->
+                        </div>
                     </div>
                     <div class="chart-name">
                         <div class="point point-left bottom"></div>
@@ -48,7 +48,7 @@
                     </div>
                     <!-- 两个按钮及以上 class="styleData" -->
                     <div class="styleOneData">
-                        <span class="changeStyle" @click="getWindorSunDate('风速')">风速</span>
+                        <!-- <span class="changeStyle" @click="getWindorSunDate('风速')">风速</span> -->
                         <!-- <span
               :class="sunShow ? 'changeStyle' : 'defaultSty'"
               @click="getWindorSunDate('辐照度')"
@@ -1579,7 +1579,7 @@
                         }
                         if (datas.data.dataFormatList.length > 0) {
                             datas.data.dataFormatList.forEach((iten) => {
-                                // if (iten.name !== "短期") {
+                                if (iten.name !== "短期") {
                                     legend.push(iten.name);
                                     let seriesObj = {
                                         name: iten.name,
@@ -1590,7 +1590,7 @@
                                         symbol: "none",
                                     };
                                     series.push(seriesObj);
-                                // }
+                                }
                             });
                         }
                         that.getPowerLine("lineChart", "今日功率预测", xAxis, legend, series);
@@ -1655,65 +1655,65 @@
                     },
                     tooltip: {
                         trigger: "axis",
-                        // formatter: name === "lineChart" ?
-                        //     (item) => {
-                        //         let str =
-                        //             `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
-                        //         let strMsg = "";
-                        //         if (item.length > 1) {
-                        //             item.forEach((it, index) => {
-                        //                 // if (index !== 3) {
-                        //                 if (it.seriesName !== "超短期") {
-                        //                     strMsg = `<div style="margin-bottom: 5px">
-                        //                 <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>&nbsp;
-                        //                 <span style="display:inline-block;">${it.seriesName}:</span>&nbsp;&nbsp;<span>${it.value}</span>
-                        //                     </div>`;
-
-                        //                     // this.showpowerLegend[index].name = it.seriesName;
-                        //                     // this.showpowerLegend[index].color = it.color;
-                        //                 } else {
-                        //                     if (it.axisValue === "00:15:00") {
-                        //                         it.color = "#e96366";
-                        //                     }
-                        //                     strMsg = `<div style="margin-bottom: 5px">
-                        //                 <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
-                        //                   it.color
-                        //                 };\"></span>&nbsp;
-                        //                 <span style="display:inline-block;">${
-                        //                   it.color === "#e96366" ? "超短期" : "短期"
-                        //                 }:</span>&nbsp;&nbsp;<span>${it.value}</span>
-                        //                     </div>`;
-                        //                     // if (it.color === "#e96366") {
-                        //                     //     this.showpowerLegend[index].name = "超短期";
-                        //                     // } else {
-                        //                     //     this.showpowerLegend[index].name = "短期";
-                        //                     // }
-                        //                     // this.showpowerLegend[index].color = it.color;
-                        //                 }
-                        //                 str = str + strMsg;
-                        //             });
-                        //         } else {
-                        //             if (item[0].axisValue === "00:15:00") {
-                        //                 item[0].color = "#e96366";
-                        //             }
-                        //             strMsg = `<div style="margin-bottom: 5px">
-                        //             <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
-                        //                 item[0].color
-                        //             };\"></span>&nbsp;
-                        //             <span style="display:inline-block;">${
-                        //                 item[0].color === "#e96366" ? "超短期" : "短期"
-                        //             }:</span>&nbsp;&nbsp;<span>${item[0].value}</span>
-                        //                 </div>`;
-                        //             // if (item[0].color === "#e96366") {
-                        //             //     this.showpowerLegend[3].name = "超短期";
-                        //             // } else {
-                        //             //     this.showpowerLegend[3].name = "短期";
-                        //             // }
-                        //             // this.showpowerLegend[3].color = item[0].color;
-                        //             str = str + strMsg;
-                        //         }
-                        //         return str;
-                        //     } : "",
+                        formatter: name === "lineChart" ?
+                            (item) => {
+                                let str =
+                                    `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
+                                let strMsg = "";
+                                if (item.length > 1) {
+                                    item.forEach((it, index) => {
+                                        // if (index !== 3) {
+                                        if (it.seriesName !== "超短期") {
+                                            strMsg = `<div style="margin-bottom: 5px">
+                                        <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>&nbsp;
+                                        <span style="display:inline-block;">${it.seriesName}:</span>&nbsp;&nbsp;<span>${it.value}</span>
+                                            </div>`;
+
+                                            // this.showpowerLegend[index].name = it.seriesName;
+                                            // this.showpowerLegend[index].color = it.color;
+                                        } else {
+                                            if (it.axisValue === "00:15:00") {
+                                                it.color = "#e96366";
+                                            }
+                                            strMsg = `<div style="margin-bottom: 5px">
+                                        <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
+                                          it.color
+                                        };\"></span>&nbsp;
+                                        <span style="display:inline-block;">${
+                                          it.color === "#e96366" ? "超短期" : "短期"
+                                        }:</span>&nbsp;&nbsp;<span>${it.value}</span>
+                                            </div>`;
+                                            // if (it.color === "#e96366") {
+                                            //     this.showpowerLegend[index].name = "超短期";
+                                            // } else {
+                                            //     this.showpowerLegend[index].name = "短期";
+                                            // }
+                                            // this.showpowerLegend[index].color = it.color;
+                                        }
+                                        str = str + strMsg;
+                                    });
+                                } else {
+                                    if (item[0].axisValue === "00:15:00") {
+                                        item[0].color = "#e96366";
+                                    }
+                                    strMsg = `<div style="margin-bottom: 5px">
+                                    <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
+                                        item[0].color
+                                    };\"></span>&nbsp;
+                                    <span style="display:inline-block;">${
+                                        item[0].color === "#e96366" ? "超短期" : "短期"
+                                    }:</span>&nbsp;&nbsp;<span>${item[0].value}</span>
+                                        </div>`;
+                                    // if (item[0].color === "#e96366") {
+                                    //     this.showpowerLegend[3].name = "超短期";
+                                    // } else {
+                                    //     this.showpowerLegend[3].name = "短期";
+                                    // }
+                                    // this.showpowerLegend[3].color = item[0].color;
+                                    str = str + strMsg;
+                                }
+                                return str;
+                            } : "",
                     },
                     // axisPointer: {
                     //     link: {
@@ -1741,7 +1741,7 @@
                         right: name !== "lineChart1" ? "20" : "20%",
                         data: legend,
                         // show: name === 'lineChart' ? false : true
-                        show: true,
+                        show: false,
                         // formatter: name === 'lineChart' ? (name, type) => {
                         //     // debugger
                         //     if (!type) {

+ 68 - 64
src/views/powerPrediction/panoramicPower.vue

@@ -33,7 +33,7 @@
                 justify-content: end;
                 margin-right: 5px;
               ">
-                            <!-- <div v-for="it in item.showpowerLegend" :key="it.name">
+                            <div v-for="it in item.showpowerLegend" :key="it.name">
                                 <span class="lineColor" :style="{ background: it.color }"></span>
                                 <span class="powerLegendColor" :style="{ background: it.color }"></span>
                                 <span :style="!theme ? 'color: #fff' : ''" style="
@@ -42,7 +42,7 @@
                     position: relative;
                     top: 1px;
                   ">{{ it.name }}</span>
-                            </div> -->
+                            </div>
                         </div>
                         <div class="chart-name">
                             <div class="point point-left bottom"></div>
@@ -549,6 +549,10 @@
                                         color: "#e96366",
                                     },
                                     {
+                                        name: "短期",
+                                        color: "#39d93d",
+                                    },
+                                    {
                                         name: "实际",
                                         color: "#7ac1dd",
                                     },
@@ -557,7 +561,7 @@
                                 let series = [];
                                 let namess = "";
                                 for (let i = 0; i < item.dataFormatList.length; i++) {
-                                    // if (item.dataFormatList[i].name !== "短期") {
+                                    if (item.dataFormatList[i].name !== "短期") {
                                         legend.push(item.dataFormatList[i].name);
                                         namess = item.name;
                                         let seriesObj = {
@@ -569,7 +573,7 @@
                                             symbol: "none",
                                         };
                                         series.push(seriesObj);
-                                    // }
+                                    }
                                 }
                                 this.$nextTick(() => {
                                     this.getPowerLine(namess, index, xAxis, legend, series);
@@ -592,72 +596,72 @@
                     },
                     tooltip: {
                         trigger: "axis",
-                        // formatter: (item) => {
-                        //     // debugger
+                        formatter: (item) => {
+                            // debugger
 
-                        //     let str =
-                        //         `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
-                        //     let strMsg = "";
-                        //     if (item.length > 1) {
-                        //         item.forEach((it, index) => {
-                        //             // if (index !== 3) {
-                        //             if (it.seriesName !== "超短期") {
-                        //                 strMsg = `<div style="margin-bottom: 5px">
-                        //                 <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>&nbsp;
-                        //                 <span style="display:inline-block;">${it.seriesName}:</span>&nbsp;&nbsp;<span>${it.value}</span>
-                        //                     </div>`;
-                        //                 // this.chartsData[numxc].showpowerLegend[index].name =
-                        //                 //     it.seriesName;
-                        //                 // this.chartsData[numxc].showpowerLegend[index].color = it.color;
-                        //             } else {
-                        //                 if (it.axisValue === "00:15:00") {
-                        //                     it.color = "#e96366";
-                        //                 }
-                        //                 strMsg = `<div style="margin-bottom: 5px">
-                        //                 <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
-                        //                   it.color
-                        //                 };\"></span>&nbsp;
-                        //                 <span style="display:inline-block;">${
-                        //                   it.color === "#e96366" ? "超短期" : "短期"
-                        //                 }:</span>&nbsp;&nbsp;<span>${it.value}</span>
-                        //                     </div>`;
-                        //                 // if (it.color === "#e96366") {
-                        //                 //     this.chartsData[numxc].showpowerLegend[index].name = "超短期";
-                        //                 // } else {
-                        //                 //     this.chartsData[numxc].showpowerLegend[index].name = "短期";
-                        //                 // }
-                        //                 // this.chartsData[numxc].showpowerLegend[index].color = it.color;
-                        //             }
-                        //             str = str + strMsg;
-                        //         });
-                        //     } else {
-                        //         if (item[0].axisValue === "00:15:00") {
-                        //             item[0].color = "#e96366";
-                        //         }
-                        //         strMsg = `<div style="margin-bottom: 5px">
-                        //         <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
-                        //             item[0].color
-                        //         };\"></span>&nbsp;
-                        //         <span style="display:inline-block;">${
-                        //             item[0].color === "#e96366" ? "超短期" : "短期"
-                        //         }:</span>&nbsp;&nbsp;<span>${item[0].value}</span>
-                        //             </div>`;
-                        //         // if (item[0].color === "#e96366") {
-                        //         //     this.chartsData[numxc].showpowerLegend[3].name = "超短期";
-                        //         // } else {
-                        //         //     this.chartsData[numxc].showpowerLegend[3].name = "短期";
-                        //         // }
-                        //         // this.chartsData[numxc].showpowerLegend[3].color = item[0].color;
-                        //         str = str + strMsg;
-                        //     }
-                        //     return str;
-                        // },
+                            let str =
+                                `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
+                            let strMsg = "";
+                            if (item.length > 1) {
+                                item.forEach((it, index) => {
+                                    // if (index !== 3) {
+                                    if (it.seriesName !== "超短期") {
+                                        strMsg = `<div style="margin-bottom: 5px">
+                                        <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>&nbsp;
+                                        <span style="display:inline-block;">${it.seriesName}:</span>&nbsp;&nbsp;<span>${it.value}</span>
+                                            </div>`;
+                                        // this.chartsData[numxc].showpowerLegend[index].name =
+                                        //     it.seriesName;
+                                        // this.chartsData[numxc].showpowerLegend[index].color = it.color;
+                                    } else {
+                                        if (it.axisValue === "00:15:00") {
+                                            it.color = "#e96366";
+                                        }
+                                        strMsg = `<div style="margin-bottom: 5px">
+                                        <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
+                                          it.color
+                                        };\"></span>&nbsp;
+                                        <span style="display:inline-block;">${
+                                          it.color === "#e96366" ? "超短期" : "短期"
+                                        }:</span>&nbsp;&nbsp;<span>${it.value}</span>
+                                            </div>`;
+                                        // if (it.color === "#e96366") {
+                                        //     this.chartsData[numxc].showpowerLegend[index].name = "超短期";
+                                        // } else {
+                                        //     this.chartsData[numxc].showpowerLegend[index].name = "短期";
+                                        // }
+                                        // this.chartsData[numxc].showpowerLegend[index].color = it.color;
+                                    }
+                                    str = str + strMsg;
+                                });
+                            } else {
+                                if (item[0].axisValue === "00:15:00") {
+                                    item[0].color = "#e96366";
+                                }
+                                strMsg = `<div style="margin-bottom: 5px">
+                                <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
+                                    item[0].color
+                                };\"></span>&nbsp;
+                                <span style="display:inline-block;">${
+                                    item[0].color === "#e96366" ? "超短期" : "短期"
+                                }:</span>&nbsp;&nbsp;<span>${item[0].value}</span>
+                                    </div>`;
+                                // if (item[0].color === "#e96366") {
+                                //     this.chartsData[numxc].showpowerLegend[3].name = "超短期";
+                                // } else {
+                                //     this.chartsData[numxc].showpowerLegend[3].name = "短期";
+                                // }
+                                // this.chartsData[numxc].showpowerLegend[3].color = item[0].color;
+                                str = str + strMsg;
+                            }
+                            return str;
+                        },
                     },
                     legend: {
                         top: 0,
                         right: 0,
                         data: legend,
-                        show: true,
+                        show: false,
                     },
                     grid: {
                         left: "5%",

+ 63 - 63
src/views/powerPrediction/powerPredictionPage.vue

@@ -50,7 +50,7 @@
                 justify-content: end;
                 margin-right: 23px;
               ">
-                            <!-- <div v-for="item in showpowerLegend" :key="item.name">
+                            <div v-for="item in showpowerLegend" :key="item.name">
                                 <span class="lineColor" :style="{ background: item.color }"></span>
                                 <span class="powerLegendColor" :style="{ background: item.color }"></span>
                                 <span :style="!theme ? 'color: #fff' : ''" style="
@@ -59,7 +59,7 @@
                     position: relative;
                     top: 1px;
                   ">{{ item.name }}</span>
-                            </div> -->
+                            </div>
                         </div>
                         <div class="chart-name">
                             <div class="point point-left bottom"></div>
@@ -922,7 +922,7 @@
                         }
                         if (datas.data.dataFormatList.length > 0) {
                             datas.data.dataFormatList.forEach((iten) => {
-                                // if (iten.name !== "短期") {
+                                if (iten.name !== "短期") {
                                     legend.push(iten.name);
                                     let seriesObj = {
                                         name: iten.name,
@@ -933,7 +933,7 @@
                                         symbol: "none",
                                     };
                                     series.push(seriesObj);
-                                // }
+                                }
                             });
                         }
                         this.getPowerLine("powerChart", "功率预测", xAxis, legend, series);
@@ -999,71 +999,71 @@
                     },
                     tooltip: {
                         trigger: "axis",
-                        // formatter: name === "powerChart" ?
-                        //     (item) => {
-                        //         let str =
-                        //             `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
-                        //         let strMsg = "";
-                        //         if (item.length > 1) {
-                        //             item.forEach((it, index) => {
-                        //                 // if (index !== 3) {
-                        //                 if (it.seriesName !== "超短期") {
-                        //                     strMsg = `<div style="margin-bottom: 5px">
-                        //                 <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>&nbsp;
-                        //                 <span style="display:inline-block;">${it.seriesName}:</span>&nbsp;&nbsp;<span>${it.value}</span>
-                        //                     </div>`;
-                        //                     // this.showpowerLegend[index].name = it.seriesName;
-                        //                     // this.showpowerLegend[index].color = it.color;
-                        //                 } else {
-                        //                     if (it.axisValue === "00:15:00") {
-                        //                         it.color = "#e96366";
-                        //                     }
-                        //                     strMsg = `<div style="margin-bottom: 5px">
-                        //                 <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
-                        //                   it.color
-                        //                 };\"></span>&nbsp;
-                        //                 <span style="display:inline-block;">${
-                        //                   it.color === "#e96366" ? "超短期" : "短期"
-                        //                 }:</span>&nbsp;&nbsp;<span>${it.value}</span>
-                        //                     </div>`;
-                        //                     // if (it.color === "#e96366") {
-                        //                     //     this.showpowerLegend[index].name = "超短期";
-                        //                     // } else {
-                        //                     //     this.showpowerLegend[index].name = "短期";
-                        //                     // }
-                        //                     // this.showpowerLegend[index].color = it.color;
-                        //                 }
-                        //                 str = str + strMsg;
-                        //             });
-                        //         } else {
-                        //             if (item[0].axisValue === "00:15:00") {
-                        //                 item[0].color = "#e96366";
-                        //             }
-                        //             strMsg = `<div style="margin-bottom: 5px">
-                        //             <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
-                        //                 item[0].color
-                        //             };\"></span>&nbsp;
-                        //             <span style="display:inline-block;">${
-                        //                 item[0].color === "#e96366" ? "超短期" : "短期"
-                        //             }:</span>&nbsp;&nbsp;<span>${item[0].value}</span>
-                        //                 </div>`;
-                        //             // if (item[0].color === "#e96366") {
-                        //             //     this.showpowerLegend[3].name = "超短期";
-                        //             // } else {
-                        //             //     this.showpowerLegend[3].name = "短期";
-                        //             // }
-                        //             // this.showpowerLegend[3].color = item[0].color;
-                        //             str = str + strMsg;
-                        //         }
-                        //         return str;
-                        //     } : "",
+                        formatter: name === "powerChart" ?
+                            (item) => {
+                                let str =
+                                    `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
+                                let strMsg = "";
+                                if (item.length > 1) {
+                                    item.forEach((it, index) => {
+                                        // if (index !== 3) {
+                                        if (it.seriesName !== "超短期") {
+                                            strMsg = `<div style="margin-bottom: 5px">
+                                        <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>&nbsp;
+                                        <span style="display:inline-block;">${it.seriesName}:</span>&nbsp;&nbsp;<span>${it.value}</span>
+                                            </div>`;
+                                            // this.showpowerLegend[index].name = it.seriesName;
+                                            // this.showpowerLegend[index].color = it.color;
+                                        } else {
+                                            if (it.axisValue === "00:15:00") {
+                                                it.color = "#e96366";
+                                            }
+                                            strMsg = `<div style="margin-bottom: 5px">
+                                        <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
+                                          it.color
+                                        };\"></span>&nbsp;
+                                        <span style="display:inline-block;">${
+                                          it.color === "#e96366" ? "超短期" : "短期"
+                                        }:</span>&nbsp;&nbsp;<span>${it.value}</span>
+                                            </div>`;
+                                            // if (it.color === "#e96366") {
+                                            //     this.showpowerLegend[index].name = "超短期";
+                                            // } else {
+                                            //     this.showpowerLegend[index].name = "短期";
+                                            // }
+                                            // this.showpowerLegend[index].color = it.color;
+                                        }
+                                        str = str + strMsg;
+                                    });
+                                } else {
+                                    if (item[0].axisValue === "00:15:00") {
+                                        item[0].color = "#e96366";
+                                    }
+                                    strMsg = `<div style="margin-bottom: 5px">
+                                    <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
+                                        item[0].color
+                                    };\"></span>&nbsp;
+                                    <span style="display:inline-block;">${
+                                        item[0].color === "#e96366" ? "超短期" : "短期"
+                                    }:</span>&nbsp;&nbsp;<span>${item[0].value}</span>
+                                        </div>`;
+                                    // if (item[0].color === "#e96366") {
+                                    //     this.showpowerLegend[3].name = "超短期";
+                                    // } else {
+                                    //     this.showpowerLegend[3].name = "短期";
+                                    // }
+                                    // this.showpowerLegend[3].color = item[0].color;
+                                    str = str + strMsg;
+                                }
+                                return str;
+                            } : "",
                     },
                     legend: {
                         // width: '380',
                         right: "20",
                         data: legend,
                         // show: name === 'powerChart' ? false : true
-                        show: true,
+                        show: false,
                     },
                     grid: {
                         left: "5%",