Browse Source

问题修改

SunZehao 13 hours ago
parent
commit
f338c87957

+ 20 - 0
src/components/chart/combination/area-line-chart.vue

@@ -153,6 +153,26 @@ export default {
             color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
             fontSize: 14,
           },
+          formatter: function (params) {
+            var htmlStr = `<div style='margin-bottom:5px'>${params[0].axisValue}</div>`;
+            for (var i = 0; i < params.length; i++) {
+              htmlStr += `<div style='margin-bottom:2px'>`;
+              var param = params[i];
+              var seriesName = param.seriesName; //图例名称
+              var value = param.value; //y轴值
+              var mark = param.marker; //点
+              var unit = `<span style='font-size:12px'>${
+                seriesName === "风速" ? "m/s" : "MW"
+              }</span>`;
+
+              htmlStr += mark; //一个点
+              htmlStr += `${seriesName} : ${
+                value != null ? value + unit : "--"
+              }`; //圆点后面显示的文本
+              htmlStr += "</div>";
+            }
+            return htmlStr;
+          },
         },
         legend: {
           show: this.showLegend,

+ 21 - 1
src/components/chart/combination/multiple-bar-line-chart.vue

@@ -83,7 +83,7 @@ export default {
           return t.title;
         }),
         // this.newlineData.name,
-        "风速"
+        "风速",
       ];
     },
     xdata() {
@@ -198,6 +198,26 @@ export default {
             color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
             fontSize: 12,
           },
+          formatter: function (params) {
+            var htmlStr = `<div style='margin-bottom:5px'>${params[0].axisValue}</div>`;
+            for (var i = 0; i < params.length; i++) {
+              htmlStr += `<div style='margin-bottom:2px'>`;
+              var param = params[i];
+              var seriesName = param.seriesName; //图例名称
+              var value = param.value; //y轴值
+              var mark = param.marker; //点
+              var unit = `<span style='font-size:12px'>${
+                seriesName === "风速" ? "m/s" : "万kWh"
+              }</span>`;
+
+              htmlStr += mark; //一个点
+              htmlStr += `${seriesName} : ${
+                value != null ? value + unit : "--"
+              }`; //圆点后面显示的文本
+              htmlStr += "</div>";
+            }
+            return htmlStr;
+          },
         },
         legend: {
           show: this.showLegend,

+ 47 - 7
src/components/chart/line/multiple-line-chart.vue

@@ -352,7 +352,10 @@ export default {
           splitLine: {
             show: index == 0,
             lineStyle: {
-              color: this.$store.state.themeName === "dark" ? partten.getColor("gray") : "#000",
+              color:
+                this.$store.state.themeName === "dark"
+                  ? partten.getColor("gray")
+                  : "#000",
               type: "dashed",
             },
           },
@@ -380,19 +383,47 @@ export default {
       let option = {
         color: this.color,
         tooltip: {
-          trigger: this.hoverType,
+          show: true,
+          //   trigger: this.hoverType,
+          trigger: "axis",
           axisPointer:
             this.hoverType != "item"
               ? {
                   type: "cross",
                 }
               : {},
-          backgroundColor: this.$store.state.themeName === "dark" ? "rgba(0,0,0,0.4)" : "rgba(255,255,255,0.5)",
-          borderColor: this.$store.state.themeName === "dark" ? partten.getColor("gray") : "#000",
+          backgroundColor:
+            this.$store.state.themeName === "dark"
+              ? "rgba(0,0,0,0.4)"
+              : "rgba(255,255,255,0.5)",
+          borderColor:
+            this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
             fontSize: util.vh(16),
             color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
           },
+          formatter: function (params) {
+            var htmlStr = `<div style='margin-bottom:5px'>${params[0].axisValue}m/s</div>`;
+            for (var i = 0; i < params.length; i++) {
+              htmlStr += `<div style='margin-bottom:2px'>`;
+              var param = params[i];
+              var seriesName = param.seriesName; //图例名称
+              var value = param.value; //y轴值
+              var mark = param.marker; //点
+              var unit = `<span style='font-size:12px'>${
+                seriesName === "风速" ? "m/s" : "MW"
+              }</span>`;
+
+              htmlStr += mark; //一个点
+              htmlStr += `${seriesName} : ${
+                value != null ? value + unit : "--"
+              }`; //圆点后面显示的文本
+              htmlStr += "</div>";
+            }
+            return htmlStr;
+          },
         },
         legend: {
           show: this.showLegend,
@@ -400,9 +431,15 @@ export default {
           right: 56,
           icon: "circle",
           itemWidth: 6,
-          inactiveColor: this.$store.state.themeName === "dark" ? partten.getColor("gray") : "#000",
+          inactiveColor:
+            this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
-            color: this.$store.state.themeName === "dark" ? partten.getColor("grayl") : "#000",
+            color:
+              this.$store.state.themeName === "dark"
+                ? partten.getColor("grayl")
+                : "#000",
             fontSize: 12,
           },
         },
@@ -421,7 +458,10 @@ export default {
               formatter: "{value}",
               fontSize: util.vh(14),
               textStyle: {
-                color: this.$store.state.themeName === "dark" ? partten.getColor("gray") : "#000",
+                color:
+                  this.$store.state.themeName === "dark"
+                    ? partten.getColor("gray")
+                    : "#000",
               },
             },
             axisLine: {

File diff suppressed because it is too large
+ 451 - 454
src/components/windDetail/index.vue


+ 3 - 2
src/views/economicsOperation/jjyxReport/index.vue

@@ -115,9 +115,10 @@
               align="center"
             >
               <template #default="scope">
-                <span>
+                <!-- <span>
                   {{ scope.row[item.code] ? scope.row[item.code] : " " }}
-                </span>
+                </span> -->
+                <span>{{ scope.row[item.code] }}</span>
               </template>
             </el-table-column>
           </el-table>

+ 13 - 12
src/views/economicsOperation/thematicAnalysis/MTBF/index.vue

@@ -176,6 +176,7 @@
           :xdate="false"
           :showLegend="true"
           :units="['', '']"
+          :units2="'(h)'"
         ></BarCharts>
       </div>
     </div>
@@ -223,18 +224,18 @@ export default {
       barList: [],
       tableData: [],
       tableHead: [
-        "一月(%)",
-        "二月(%)",
-        "三月(%)",
-        "四月(%)",
-        "五月(%)",
-        "六月(%)",
-        "七月(%)",
-        "八月(%)",
-        "九月(%)",
-        "十月(%)",
-        "十一月(%)",
-        "十二月(%)",
+        "一月(h)",
+        "二月(h)",
+        "三月(h)",
+        "四月(h)",
+        "五月(h)",
+        "六月(h)",
+        "七月(h)",
+        "八月(h)",
+        "九月(h)",
+        "十月(h)",
+        "十一月(h)",
+        "十二月(h)",
       ],
       company: "",
       companyOptions: [],

+ 7 - 1
src/views/economicsOperation/thematicAnalysis/components/barCharts.vue

@@ -45,6 +45,10 @@ export default {
       type: Array,
       default: () => ["(万KWh)", ""],
     },
+    units2: {
+      type: String,
+      default: "",
+    },
     // 显示 legend
     showLegend: {
       type: Boolean,
@@ -187,6 +191,7 @@ export default {
     },
     initChart() {
       let chart = echarts.init(this.$el);
+      let that = this;
       let option = {
         color: this.color,
 
@@ -217,13 +222,14 @@ export default {
           },
           formatter: function (params) {
             var htmlStr = `<div style='margin-bottom:5px'>${params[0].axisValue}</div>`;
+            var unit = that.units2;
             for (var i = 0; i < params.length; i++) {
               htmlStr += `<div style='margin-bottom:2px'>`;
               var param = params[i];
               var seriesName = param.seriesName; //图例名称
               var value = param.value; //y轴值
               var mark = param.marker; //点
-              var unit = `<span style='font-size:12px'>${"%"}</span>`;
+              var unit = `<span style='font-size:12px'>${unit}</span>`;
 
               htmlStr += mark; //一个点
               htmlStr += `${seriesName} : ${

+ 1 - 0
src/views/economicsOperation/thematicAnalysis/failure/index.vue

@@ -176,6 +176,7 @@
           :xdate="false"
           :showLegend="true"
           :units="['', '']"
+          units2="(%)"
         ></BarCharts>
       </div>
     </div>

+ 13 - 12
src/views/economicsOperation/thematicAnalysis/generation/index.vue

@@ -189,6 +189,7 @@
           :xdate="false"
           :showLegend="true"
           :units="['', '']"
+          units2="(万kWh)"
         ></BarCharts>
       </div>
     </div>
@@ -242,18 +243,18 @@ export default {
       barList: [],
       tableData: [],
       tableHead: [
-        "一月(%)",
-        "二月(%)",
-        "三月(%)",
-        "四月(%)",
-        "五月(%)",
-        "六月(%)",
-        "七月(%)",
-        "八月(%)",
-        "九月(%)",
-        "十月(%)",
-        "十一月(%)",
-        "十二月(%)",
+        "一月(万kWh)",
+        "二月(万kWh)",
+        "三月(万kWh)",
+        "四月(万kWh)",
+        "五月(万kWh)",
+        "六月(万kWh)",
+        "七月(万kWh)",
+        "八月(万kWh)",
+        "九月(万kWh)",
+        "十月(万kWh)",
+        "十一月(万kWh)",
+        "十二月(万kWh)",
       ],
       company: "",
       companyOptions: [],

+ 1 - 0
src/views/economicsOperation/thematicAnalysis/windEnergy/index.vue

@@ -155,6 +155,7 @@
           :xdate="false"
           :showLegend="true"
           :units="['', '']"
+          units2="(%)"
         ></BarCharts>
       </div>
     </div>

+ 33 - 33
src/views/economicsOperation/windAnalyse/singleWindAnasyle/historyDetail.vue

@@ -89,7 +89,7 @@ import {
   getApiequipmentListByWp,
 } from "@/api/monthlyPerformanceAnalysis";
 import utils from "@/utills/downXlsx";
-import dataJson from "./dataHistoryJson.json"
+import dataJson from "./dataHistoryJson.json";
 export default {
   props: {
     // historyCompanyOptions: {
@@ -124,12 +124,12 @@ export default {
         { title: "日发电量", code: "rfdl" },
         { title: "月发电量", code: "yfdl" },
         { title: "年发电量", code: "nfdl" },
-        { title: "日应发电量", code: "ryfdl" },
-        { title: "月应发电量", code: "yyfdl" },
-        { title: "年应发电量", code: "nyfdl" },
-        { title: "日平均功率", code: "rpjgl" },
-        { title: "月平均功率", code: "ypjgl" },
-        { title: "年平均功率", code: "npjgl" },
+        // { title: "日应发电量", code: "ryfdl" },
+        // { title: "月应发电量", code: "yyfdl" },
+        // { title: "年应发电量", code: "nyfdl" },
+        // { title: "日平均功率", code: "rpjgl" },
+        // { title: "月平均功率", code: "ypjgl" },
+        // { title: "年平均功率", code: "npjgl" },
         { title: "日平均风速", code: "rpjfs" },
         { title: "月平均风速", code: "ypjfs" },
         { title: "年平均风速", code: "npjfs" },
@@ -145,42 +145,42 @@ export default {
         { title: "日检修小时", code: "rjxxs" },
         { title: "月检修小时", code: "yjxxs" },
         { title: "年检修小时", code: "njxxs" },
-        { title: "日中断小时", code: "rzdxs" },
-        { title: "月中断小时", code: "yzdxs" },
-        { title: "年中断小时", code: "nzdxs" },
-        { title: "日有效风时", code: "ryxfs" },
-        { title: "月有效风时", code: "yyxfs" },
-        { title: "年有效风时", code: "nyxfs" },
+        // { title: "日中断小时", code: "rzdxs" },
+        // { title: "月中断小时", code: "yzdxs" },
+        // { title: "年中断小时", code: "nzdxs" },
+        // { title: "日有效风时", code: "ryxfs" },
+        // { title: "月有效风时", code: "yyxfs" },
+        // { title: "年有效风时", code: "nyxfs" },
         { title: "日损失电量", code: "rssdl" },
         { title: "月损失电量", code: "yssdl" },
         { title: "年损失电量", code: "nssdl" },
-        { title: "日报警次数", code: "rbjcs" },
-        { title: "月报警次数", code: "ybjcs" },
-        { title: "年报警次数", code: "nbjcs" },
+        // { title: "日报警次数", code: "rbjcs" },
+        // { title: "月报警次数", code: "ybjcs" },
+        // { title: "年报警次数", code: "nbjcs" },
         { title: "日停机次数", code: "rtjcs" },
         { title: "月停机次数", code: "ytjcs" },
         { title: "年停机数", code: "ntjcs" },
-        { title: "日不饱和数", code: "rbbhcs" },
-        { title: "月不饱和数", code: "ybbhcs" },
-        { title: "年不饱和数", code: "nbbhcs" },
+        // { title: "日不饱和数", code: "rbbhcs" },
+        // { title: "月不饱和数", code: "ybbhcs" },
+        // { title: "年不饱和数", code: "nbbhcs" },
         { title: "日可利用率", code: "rsbklyl" },
         { title: "月可利用率", code: "ysbklyl" },
         { title: "年可利用率", code: "nsbklyl" },
         { title: "日平均温度", code: "rpjwd" },
         { title: "月平均温度", code: "ypjwd" },
         { title: "年平均温度", code: "npjwd" },
-        { title: "日平均湿度", code: "rpjsd" },
-        { title: "月平均湿度", code: "ypjsd" },
-        { title: "年平均湿度", code: "npjsd" },
-        { title: "日平均压强", code: "rpjyq" },
-        { title: "月平均压强", code: "ypjyq" },
-        { title: "年平均压强", code: "npjyq" },
-        { title: "日拟合优度", code: "rnhyd" },
-        { title: "月拟合优度", code: "ynhyd" },
-        { title: "年拟合优度", code: "nnhyd" },
-        { title: "日实际/保证", code: "rsjbz" },
-        { title: "月实际/保证", code: "ysjbz" },
-        { title: "年实际/保正", code: "nsjbz" },
+        // { title: "日平均湿度", code: "rpjsd" },
+        // { title: "月平均湿度", code: "ypjsd" },
+        // { title: "年平均湿度", code: "npjsd" },
+        // { title: "日平均压强", code: "rpjyq" },
+        // { title: "月平均压强", code: "ypjyq" },
+        // { title: "年平均压强", code: "npjyq" },
+        // { title: "日拟合优度", code: "rnhyd" },
+        // { title: "月拟合优度", code: "ynhyd" },
+        // { title: "年拟合优度", code: "nnhyd" },
+        // { title: "日实际/保证", code: "rsjbz" },
+        // { title: "月实际/保证", code: "ysjbz" },
+        // { title: "年实际/保正", code: "nsjbz" },
       ],
       tableHeaderGf: [
         { title: "型号", code: "model" },
@@ -294,8 +294,8 @@ export default {
       };
       let datas = [];
 
-    //   this.historysingleMachineData = dataJson.data.data.records;
-    //   this.page.total = dataJson.data.data.length;
+      //   this.historysingleMachineData = dataJson.data.data.records;
+      //   this.page.total = dataJson.data.data.length;
       if (this.tabIndex == -1) {
         datas = await getApihistorywindturbinegoodnesslist(params);
         this.historysingleMachineData = datas.data.data.records;

+ 2 - 2
src/views/economicsOperation/windAnalyse/singleWindAnasyle/index.vue

@@ -200,7 +200,7 @@ import historyDetail from "./historyDetail.vue";
 import WindDetailDialog from "./windDetailDialog.vue";
 import utils from "@/utills/downXlsx";
 import dayjs from "dayjs";
-import dataJson from "./dataJson.json"
+import dataJson from "./dataJson.json";
 export default {
   name: "SingleWindAnasyle", //单机性能分析
   components: {
@@ -262,7 +262,7 @@ export default {
   },
   created() {
     this.pickerTimer = dayjs().add(-1, "day").format("YYYY-MM-DD");
-    
+
     //   this.singleMachineData = dataJson.data.data.records;
     //   this.page.total = dataJson.data.data.total;
     this.getCompanyData();