SunZehao 9 mesiacov pred
rodič
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: {

+ 451 - 454
src/components/windDetail/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="bodys">
-     <!-- v-if="Object.keys(monitorInfo).length" -->
+    <!-- v-if="Object.keys(monitorInfo).length" -->
     <div class="edge" v-if="0">
       <div class="info" style="position: relative">
         <div class="info-wrapper">
@@ -10,7 +10,9 @@
           </div> -->
           <div class="ps-info" @click="handleXhClick(windInfo)">
             <div class="ps-title">设备型号:</div>
-            <div class="ps-name">{{otherInfo?.manufacturer}} ( {{ otherInfo?.model }} )</div>
+            <div class="ps-name">
+              {{ otherInfo?.manufacturer }} ( {{ otherInfo?.model }} )
+            </div>
           </div>
         </div>
         <div class="info-wrapper">
@@ -246,7 +248,7 @@
         <div
           class="part-body"
           style="max-height: 25vh"
-          v-if="partDInfos.length>0"
+          v-if="partDInfos.length > 0"
         >
           <div class="monitoring-item">
             <div class="point point-left bottom"></div>
@@ -273,7 +275,7 @@
         <div
           class="part-body"
           style="max-height: 25vh"
-          v-if="partAInfos.length>0"
+          v-if="partAInfos.length > 0"
         >
           <div class="monitoring-item">
             <div class="point point-left bottom"></div>
@@ -308,19 +310,11 @@
         </div>
       </div>
     </div>
-    <div class="problems" style="color: #fff">
+    <!-- <div class="problems" style="color: #fff">
         <div class="problemTit">
             <div class="point point-left bottom"></div>
             <div class="point point-right bottom"></div>
             <span style="font-size: 16px;position: relative;top: -5px;">故障分类</span>
-            <!-- <div class="problemSeach">
-                <el-input v-model="inputcv" clearable placeholder="请输入" />
-                <div class="seachBtn">
-                    <el-icon :size="18" :color="color">
-                        <Search />
-                    </el-icon>
-                </div>
-            </div> -->
         </div>
         <div class="problemMain">
             <div class="problemWarn">
@@ -382,15 +376,13 @@
                 </el-table>
             </div>
         </div>
-    </div>
+    </div> -->
     <alarmDialog ref="alarmDialog" />
     <powerAndSpeed ref="powerAndSpeed" :tabEvent="-1" />
   </div>
 </template>
 <script>
-import {
-  Search
-} from '@element-plus/icons-vue'
+import { Search } from "@element-plus/icons-vue";
 import { GetWtPoints, GetPointsData } from "@/api/points/index.js";
 import powerAndSpeed from "@/components/powerAndSpeedSearch/index.vue";
 import {
@@ -398,7 +390,7 @@ import {
   GetWtTelemeteryInfo,
   GetWtOtherInfo,
   GetMatrixalarmtype,
-  GetMatrixalarmtypeTable
+  GetMatrixalarmtypeTable,
 } from "@/api/factoryMonitor/index.js";
 import svgIcon from "@/components/coms/icon/svg-icon.vue";
 import alarmDialog from "@/components/alarm";
@@ -406,7 +398,7 @@ export default {
   name: "windDetail",
   data() {
     return {
-        inputcv: "",
+      inputcv: "",
       current: "fdj",
       windname: "",
       wtid: "",
@@ -418,56 +410,56 @@ export default {
       partDInfo: [],
       partAInfos: [
         [
-            {
-                "name": "AI值1",
-                "value": 10.2,
-                "valueUnit": "%"
-            },
-            {
-                "name": "AI值2",
-                "value": 23.4,
-                "valueUnit": "%"
-            },
-            {
-                "name": "AI值3",
-                "value": 32.5,
-                "valueUnit": "%"
-            },
-            {
-                "name": "AI值4",
-                "value": 54.5,
-                "valueUnit": "%"
-            },
-            {
-                "name": "AI值5",
-                "value": 14.5,
-                "valueUnit": "%"
-            },
-        ]
+          {
+            name: "AI值1",
+            value: 10.2,
+            valueUnit: "%",
+          },
+          {
+            name: "AI值2",
+            value: 23.4,
+            valueUnit: "%",
+          },
+          {
+            name: "AI值3",
+            value: 32.5,
+            valueUnit: "%",
+          },
+          {
+            name: "AI值4",
+            value: 54.5,
+            valueUnit: "%",
+          },
+          {
+            name: "AI值5",
+            value: 14.5,
+            valueUnit: "%",
+          },
+        ],
       ],
       partDInfos: [
         [
-            {
-                "name": "DI值1",
-                "value": 10.2
-            },
-            {
-                "name": "DI值2",
-                "value": 23.4
-            },
-            {
-                "name": "DI值3",
-                "value": 32.5
-            },
-            {
-                "name": "DI值4",
-                "value": 54.5
-            },
-            {
-                "name": "DI值5",
-                "value": 14.5
-            },
-        ]
+          {
+            name: "DI值1",
+            value: 10.2,
+          },
+          {
+            name: "DI值2",
+            value: 23.4,
+          },
+          {
+            name: "DI值3",
+            value: 32.5,
+          },
+          {
+            name: "DI值4",
+            value: 54.5,
+          },
+          {
+            name: "DI值5",
+            value: 14.5,
+          },
+        ],
       ],
       uniformcodesA: [],
       uniformcodesD: [],
@@ -485,111 +477,110 @@ export default {
       times: "",
       warnLeft: [
         {
-            name: "防雷保护类",
-            value: 10
-        }
+          name: "防雷保护类",
+          value: 10,
+        },
       ],
       tableData: [
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
 
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
         {
-            code: "1000",
-            name: "变桨电池充电故障",
-            message: "error_battery_charger",
-            status: 1
+          code: "1000",
+          name: "变桨电池充电故障",
+          message: "error_battery_charger",
+          status: 1,
         },
         {
-            code: "1002",
-            name: "转子侧变流器电流故障",
-            message: "error_converter_error_inu_flag",
-            status: 0
+          code: "1002",
+          name: "转子侧变流器电流故障",
+          message: "error_converter_error_inu_flag",
+          status: 0,
         },
-
       ],
-      
+
       warnTypeData: {
         total: "",
         typeData: [],
@@ -597,29 +588,28 @@ export default {
         dataColumn1: [],
         dataColumnOther: [],
         tableHeader: [
-        {
+          {
             code: "alarmId",
-            name: "报警编号"
-        },
-        {
+            name: "报警编号",
+          },
+          {
             code: "id",
-            name: "PCL变量名"
-        },
-        {
+            name: "PCL变量名",
+          },
+          {
             code: "tagid",
-            name: "报警文字信息"
-        },
-        {
+            name: "报警文字信息",
+          },
+          {
             code: "isClose",
-            name: "报警状态"
-        },
-      ],
+            name: "报警状态",
+          },
+        ],
       },
-        windObj: {}
-
+      windObj: {},
     };
   },
-  components: { svgIcon, alarmDialog, powerAndSpeed,  },
+  components: { svgIcon, alarmDialog, powerAndSpeed },
   apiUrl: "",
   props: {
     wind: {
@@ -667,7 +657,6 @@ export default {
       oIframe.style.width = deviceWidth + "px";
       oIframe.style.height = deviceHeight + "px";
     }
-
   },
 
   unmounted() {
@@ -680,8 +669,8 @@ export default {
     wind: {
       handler() {
         if (Object.keys(this.wind).length) {
-            this.start(this.wind);
-            this.getwarnTypeData(this.wind.wtid)
+          this.start(this.wind);
+          this.getwarnTypeData(this.wind.wtid);
         }
       },
     },
@@ -700,59 +689,64 @@ export default {
   },
   methods: {
     getwarnTypeData(id) {
-        let that = this
-        let params = {
-            // wtid: "NX_FGS_HA_F_WT_0039_EQ"
-            wtid: id
-        }
-        GetMatrixalarmtype(params).then(res =>{
-            if (res && res.data && res.data.data.length>0) {
-                for(let i =0; i<res.data.data.length; i++) {
-                    let item = res.data.data[i]
-                    for(let k in res.data.count) {
-                        if (item.nemCode === k) {
-                            item.count = res.data.count[k]
-                        }
-                    }
-                }
-                that.warnTypeData.total = res.data.count.zs
-                that.warnTypeData.typeData = res.data.data
-                that.warnTypeData.dataColumn1 = that.warnTypeData.typeData.slice(0, 5)
-                that.warnTypeData.dataColumnOther[0] = that.warnTypeData.typeData.slice(5, 13)
-                that.warnTypeData.dataColumnOther[1] = that.warnTypeData.typeData.slice(13, 21)
-                console.log("typeData===>>>", that.warnTypeData.typeData)
-                that.getwarnTableData(that.warnTypeData.typeData[0], id)
+      let that = this;
+      let params = {
+        // wtid: "NX_FGS_HA_F_WT_0039_EQ"
+        wtid: id,
+      };
+      GetMatrixalarmtype(params).then((res) => {
+        if (res && res.data && res.data.data.length > 0) {
+          for (let i = 0; i < res.data.data.length; i++) {
+            let item = res.data.data[i];
+            for (let k in res.data.count) {
+              if (item.nemCode === k) {
+                item.count = res.data.count[k];
+              }
             }
-        })
+          }
+          that.warnTypeData.total = res.data.count.zs;
+          that.warnTypeData.typeData = res.data.data;
+          that.warnTypeData.dataColumn1 = that.warnTypeData.typeData.slice(
+            0,
+            5
+          );
+          that.warnTypeData.dataColumnOther[0] =
+            that.warnTypeData.typeData.slice(5, 13);
+          that.warnTypeData.dataColumnOther[1] =
+            that.warnTypeData.typeData.slice(13, 21);
+          console.log("typeData===>>>", that.warnTypeData.typeData);
+          that.getwarnTableData(that.warnTypeData.typeData[0], id);
+        }
+      });
     },
     getwarnTableDataFn(data) {
-        this.getwarnTableData(data, this.wind.wtid)
+      this.getwarnTableData(data, this.wind.wtid);
     },
     getwarnTableData(data, id) {
-        let that = this
-        let params = {
-            // type: "BJXT",
-            // wtid: "NX_FGS_HA_F_WT_0039_EQ",
-            type: data.nemCode,
-            wtid: id
+      let that = this;
+      let params = {
+        // type: "BJXT",
+        // wtid: "NX_FGS_HA_F_WT_0039_EQ",
+        type: data.nemCode,
+        wtid: id,
+      };
+      GetMatrixalarmtypeTable(params).then((res) => {
+        if (res && res.data) {
+          res.data.forEach((it) => {
+            it.isClose = it.closeTime ? true : it.endts ? true : false;
+          });
+          that.warnTypeData.tableData = res.data;
         }
-        GetMatrixalarmtypeTable(params).then(res =>{
-            if (res && res.data) {
-                res.data.forEach(it =>{
-                    it.isClose = it.closeTime ? true : it.endts ? true : false
-                })
-                that.warnTypeData.tableData = res.data
-            }
-        })
+      });
     },
     handleXhClick(wind) {
       //   console.log(wind);
       this.$refs.powerAndSpeed && this.$refs.powerAndSpeed.init(wind);
     },
     isRed(val) {
-        if (val === 2 || val === 6) {
-            return 'redsty'
-        }
+      if (val === 2 || val === 6) {
+        return "redsty";
+      }
     },
     cancle() {
       this.windInfo = {};
@@ -838,12 +832,12 @@ export default {
             // if (this.uniformcodesA.length>0 && this.uniformcodesD.length>0) {
             //     this.getPointsIds();
             // } else {
-                if (this.uniformcodesA.length>0) {
-                    this.getPointsIdOne('AI', this.uniformcodesA);
-                } 
-                if(this.uniformcodesD.length>0) {
-                    this.getPointsIdOne('DI', this.uniformcodesD);
-                }
+            if (this.uniformcodesA.length > 0) {
+              this.getPointsIdOne("AI", this.uniformcodesA);
+            }
+            if (this.uniformcodesD.length > 0) {
+              this.getPointsIdOne("DI", this.uniformcodesD);
+            }
             // }
           });
         }
@@ -892,31 +886,31 @@ export default {
     },
     getPointsData(pointsA, pointsD) {
       let pointsDataA = new Promise((resolve, reject) => {
-        if (pointsA.length>0) {
-            GetPointsData({
-              pointIds: pointsA,
+        if (pointsA.length > 0) {
+          GetPointsData({
+            pointIds: pointsA,
+          })
+            .then(({ data }) => {
+              resolve(data);
             })
-              .then(({ data }) => {
-                resolve(data);
-              })
-              .catch((e) => {
-                // 标记失败后给定某个数据
-                reject("发生错误");
-              });
+            .catch((e) => {
+              // 标记失败后给定某个数据
+              reject("发生错误");
+            });
         }
       });
       let pointsDataD = new Promise((resolve, reject) => {
-        if (pointsD.length>0) {
-            GetPointsData({
-              pointIds: pointsD,
+        if (pointsD.length > 0) {
+          GetPointsData({
+            pointIds: pointsD,
+          })
+            .then(({ data }) => {
+              resolve(data);
             })
-              .then(({ data }) => {
-                resolve(data);
-              })
-              .catch((e) => {
-                // 标记失败后给定某个数据
-                reject("发生错误");
-              });
+            .catch((e) => {
+              // 标记失败后给定某个数据
+              reject("发生错误");
+            });
         }
       });
       Promise.all([pointsDataA, pointsDataD])
@@ -956,68 +950,72 @@ export default {
     },
     //查询数据只有AI点或者只有DI点
     getPointsIdOne(type, uniformcodesXo) {
-        GetWtPoints({
-          wtid: this.wtid,
-          uniformcodes: uniformcodesXo,
-        }).then(({ data }) => {
-            if (type === "AI") {
-                this.resA = data.data.length
-                ? data.data.map((item) => (item != null ? item.nemCode : ""))
-                : [];
-                
-                if (this.resA.length>0) {
-                    this.getPointsDataOne(type, this.resA);
-                }
-            } else {
-                this.resD = data.data.length
-                  ? data.data.map((item) => (item != null ? item.nemCode : ""))
-                  : [];
-                if (this.resD.length>0) {
-                    this.getPointsDataOne(type, this.resD);
-                }
+      GetWtPoints({
+        wtid: this.wtid,
+        uniformcodes: uniformcodesXo,
+      })
+        .then(({ data }) => {
+          if (type === "AI") {
+            this.resA = data.data.length
+              ? data.data.map((item) => (item != null ? item.nemCode : ""))
+              : [];
+
+            if (this.resA.length > 0) {
+              this.getPointsDataOne(type, this.resA);
+            }
+          } else {
+            this.resD = data.data.length
+              ? data.data.map((item) => (item != null ? item.nemCode : ""))
+              : [];
+            if (this.resD.length > 0) {
+              this.getPointsDataOne(type, this.resD);
             }
-        }).catch((e) => {
-            console.log("发生错误");
+          }
+        })
+        .catch((e) => {
+          console.log("发生错误");
         });
     },
     getPointsDataOne(type, pointsData) {
-        GetPointsData({
-            pointIds: pointsData,
-        }).then(({ data }) => {
-            let pointsInfo = data.data.length ? data.data : [];
-            let partAInfo = [];
-            let partDInfo = [];
-            let chunk = 4;
-            if (type === "AI") {
-                this.partAInfo.forEach((item, index) => {
-                    pointsInfo.forEach((i, ind) => {
-                    if (index == ind) {
-                        item.value = i.pointValueInDouble;
-                    }
-                    });
-                });
-                for (let i = 0, j = this.partAInfo.length; i < j; i += chunk) {
-                    partAInfo.push(this.partAInfo.slice(i, i + chunk));
+      GetPointsData({
+        pointIds: pointsData,
+      })
+        .then(({ data }) => {
+          let pointsInfo = data.data.length ? data.data : [];
+          let partAInfo = [];
+          let partDInfo = [];
+          let chunk = 4;
+          if (type === "AI") {
+            this.partAInfo.forEach((item, index) => {
+              pointsInfo.forEach((i, ind) => {
+                if (index == ind) {
+                  item.value = i.pointValueInDouble;
                 }
-                this.partAInfos = partAInfo;
-            } else {
-                this.partDInfo.forEach((item, index) => {
-                    pointsInfo.forEach((i, ind) => {
-                    if (index == ind) {
-                        item.value = i.pointValueInDouble;
-                    }
-                    });
-                });
-                for (let m = 0, n = this.partDInfo.length; m < n; m += chunk) {
-                    partDInfo.push(this.partDInfo.slice(m, m + chunk));
+              });
+            });
+            for (let i = 0, j = this.partAInfo.length; i < j; i += chunk) {
+              partAInfo.push(this.partAInfo.slice(i, i + chunk));
+            }
+            this.partAInfos = partAInfo;
+          } else {
+            this.partDInfo.forEach((item, index) => {
+              pointsInfo.forEach((i, ind) => {
+                if (index == ind) {
+                  item.value = i.pointValueInDouble;
                 }
-                this.partDInfos = partDInfo;
+              });
+            });
+            for (let m = 0, n = this.partDInfo.length; m < n; m += chunk) {
+              partDInfo.push(this.partDInfo.slice(m, m + chunk));
             }
-            console.log("partAInfos===>>>", this.partAInfos)
-            console.log("partDInfos===>>>", this.partDInfos)
-        }).catch((e) => {
-            // 标记失败后给定某个数据
-            console.log("发生错误");
+            this.partDInfos = partDInfo;
+          }
+          console.log("partAInfos===>>>", this.partAInfos);
+          console.log("partDInfos===>>>", this.partDInfos);
+        })
+        .catch((e) => {
+          // 标记失败后给定某个数据
+          console.log("发生错误");
         });
     },
     //打开报警页面
@@ -1268,7 +1266,8 @@ export default {
 
   .parts {
     // width: calc(100% - 600px - 20px);
-    width: calc(70vw - 20px);
+    // width: calc(70vw - 20px);
+    width: calc(99vw - 20px);
     margin-right: 20px;
     height: 100%;
     display: flex;
@@ -1408,197 +1407,195 @@ export default {
     }
   }
 
-  .problems{
+  .problems {
     width: 30vw;
     background: rgba(96, 103, 105, 0.2);
     border-radius: 5px;
     padding: 10px;
-    .problemTit{
-        display: flex;
-        justify-content: space-between;
-        position: relative;
-        width: 98%;
-        height: 42px;
-        border-bottom: 1px solid #363b46;
-        display: flex;
-        align-items: center;
-        padding-left: 20px;
-        font-size: 16px;
-        font-family: Microsoft YaHei;
-        font-weight: 400;
-        color: #ffffff;
+    .problemTit {
+      display: flex;
+      justify-content: space-between;
+      position: relative;
+      width: 98%;
+      height: 42px;
+      border-bottom: 1px solid #363b46;
+      display: flex;
+      align-items: center;
+      padding-left: 20px;
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #ffffff;
 
-        .problemSeach{
-            display: flex;
-            .el-input{
-                width: 150px;
-                position: relative;
-                top: -4px;
-                margin-right: 5px;
-            }
-            .seachBtn{
-                width: 30px;
-                height: 30px;
-                background: rgba(0, 70, 199, 0.48);
-                border-radius: 30px;
-                position: relative;
-                margin-left: 5px;
-                cursor: pointer;
-                .el-icon{
-                    position: absolute;
-                    top: 6px;
-                    left: 7px;
-                }
-                &:hover {
-                    background-color: rgba(16, 81, 219, 0.5);
-                    color: #ffffff;
-                }
-            }
-            .buttons {
-                background-color: rgba(5, 187, 76, 0.2);
-                border: 1px solid #3b6c53;
-                color: #b3b3b3;
-                font-size: 14px;
-                width: 40px;
-                height: 30px;
-                position: relative;
-                padding: 0 25px !important;
-                .button{
-                    position: absolute;
-                    left: 13px;
-                    top: 7px;
-                }
+      .problemSeach {
+        display: flex;
+        .el-input {
+          width: 150px;
+          position: relative;
+          top: -4px;
+          margin-right: 5px;
+        }
+        .seachBtn {
+          width: 30px;
+          height: 30px;
+          background: rgba(0, 70, 199, 0.48);
+          border-radius: 30px;
+          position: relative;
+          margin-left: 5px;
+          cursor: pointer;
+          .el-icon {
+            position: absolute;
+            top: 6px;
+            left: 7px;
+          }
+          &:hover {
+            background-color: rgba(16, 81, 219, 0.5);
+            color: #ffffff;
+          }
+        }
+        .buttons {
+          background-color: rgba(5, 187, 76, 0.2);
+          border: 1px solid #3b6c53;
+          color: #b3b3b3;
+          font-size: 14px;
+          width: 40px;
+          height: 30px;
+          position: relative;
+          padding: 0 25px !important;
+          .button {
+            position: absolute;
+            left: 13px;
+            top: 7px;
+          }
 
-                &:hover {
-                background-color: rgba(5, 187, 76, 0.5);
-                color: #ffffff;
-                }
-            }
+          &:hover {
+            background-color: rgba(5, 187, 76, 0.5);
+            color: #ffffff;
+          }
         }
+      }
     }
-    .problemMain{
-        .problemWarn{
-            margin-top: 10px;
-            display: flex;
-            justify-content: space-between;
-            width: 100%;
-            .warn{
-                width: 32%;
+    .problemMain {
+      .problemWarn {
+        margin-top: 10px;
+        display: flex;
+        justify-content: space-between;
+        width: 100%;
+        .warn {
+          width: 32%;
+        }
+        .warnCom {
+          width: 100%;
+          height: 100px;
+          // border: 1px solid rgba(255,0,0,0.8);
+          margin-bottom: 5px;
+          box-shadow: inset 0px 0px 40px 0px red;
+          animation: flash 1s infinite alternate; /* 闪烁动画 */
+          .warnComImg {
+            width: 50px;
+            height: 50px;
+            text-align: center;
+            border-radius: 50px;
+            border: 1px solid rgba(255, 0, 0, 0.3);
+            position: relative;
+            top: -74px;
+            left: 22px;
+            img {
+              position: relative;
+              top: 5px;
             }
-            .warnCom{
-                width: 100%;
-                height: 100px;
-                // border: 1px solid rgba(255,0,0,0.8);
-                margin-bottom: 5px;
-                box-shadow: inset 0px 0px 40px 0px red;
-                animation: flash 1s infinite alternate; /* 闪烁动画 */
-                .warnComImg{
-                    width: 50px;
-                    height: 50px;
-                    text-align: center;
-                    border-radius: 50px;
-                    border: 1px solid rgba(255,0,0,.3);
-                    position: relative;
-                    top: -74px;
-                    left: 22px;
-                    img{
-                        position: relative;
-                        top: 5px;
-                    }
-                }
-                .warnComNum{
-                    position: relative;
-                    top: -119px;
-                    left: 88px;
-                    width: 55px;
-                    .numTop{
-                        font-size: 22px;
-                        font-weight: bold;
-                        color: red;
-                        text-align: end;
-                    }
-                    .numBot{
-                        font-size: 14px;
-                        color: rgb(136, 136, 136);
-                        position: absolute;
-                        right: 0;
-                        top: 21px;
-                    }
-                }
-                .circle-container {
-                    width: 100px;
-                    height: 100px;
-                    position: relative;
-                }
-                .circle-segment {
-                    position: absolute;
-                    top: 20%;
-                    left: 17%;
-                    width: 60px;
-                    height: 60px;
-                    transform-origin: center;
-                    transform: translate(-50%, -50%);
-                    stroke-width: 5;
-                    fill: none;
-                    stroke-dasharray: 50, 30; /* 圆周长三分之一加间隔 */
-                    stroke-dashoffset: 0;
-                    animation: rotate 4s linear infinite;
-
-                }
-                .segment-1 { 
-                    stroke: red;
-                    transform: rotate(0deg);
-                }
-
-                @keyframes rotate {
-                    from {
-                    transform: rotate(0deg);
-                    }
-                    to {
-                    transform: rotate(360deg);
-                    }
-                }
-                
+          }
+          .warnComNum {
+            position: relative;
+            top: -119px;
+            left: 88px;
+            width: 55px;
+            .numTop {
+              font-size: 22px;
+              font-weight: bold;
+              color: red;
+              text-align: end;
             }
-            @keyframes flash {
-                from {
-                box-shadow: inset 0 0 10px #e60101; /* 开始时的内阴影 */
-                }
-                to {
-                box-shadow: inset 0 0 40px #f00; /* 结束时的内阴影,颜色更亮或更大 */
-                }
+            .numBot {
+              font-size: 14px;
+              color: rgb(136, 136, 136);
+              position: absolute;
+              right: 0;
+              top: 21px;
             }
-            .warnItems{
-                width: 100%;
-                display: flex;
-                color: #817c7c;
-                margin-bottom: 3px;
-                cursor: pointer;
-                .warnItemLeft{
-                    height: 32px;
-                    width: 20%;
-                    border: 1px solid #817c7c;
-                    margin-right: 1%;
-                    text-align: center;
-                    line-height: 28px;
-                }
-                .warnItemRight{
-                    height: 32px;
-                    width: 79%;
-                    line-height: 28px;
-                    border: 1px solid #817c7c;
-                    padding-left: 5px;
-                }
-                
-                .redsty{
-                    border: 1px solid red;
-                    color: red;
-                }
+          }
+          .circle-container {
+            width: 100px;
+            height: 100px;
+            position: relative;
+          }
+          .circle-segment {
+            position: absolute;
+            top: 20%;
+            left: 17%;
+            width: 60px;
+            height: 60px;
+            transform-origin: center;
+            transform: translate(-50%, -50%);
+            stroke-width: 5;
+            fill: none;
+            stroke-dasharray: 50, 30; /* 圆周长三分之一加间隔 */
+            stroke-dashoffset: 0;
+            animation: rotate 4s linear infinite;
+          }
+          .segment-1 {
+            stroke: red;
+            transform: rotate(0deg);
+          }
+
+          @keyframes rotate {
+            from {
+              transform: rotate(0deg);
             }
+            to {
+              transform: rotate(360deg);
+            }
+          }
         }
-        .warnTable{
-            margin-top: 10px;
+        @keyframes flash {
+          from {
+            box-shadow: inset 0 0 10px #e60101; /* 开始时的内阴影 */
+          }
+          to {
+            box-shadow: inset 0 0 40px #f00; /* 结束时的内阴影,颜色更亮或更大 */
+          }
         }
+        .warnItems {
+          width: 100%;
+          display: flex;
+          color: #817c7c;
+          margin-bottom: 3px;
+          cursor: pointer;
+          .warnItemLeft {
+            height: 32px;
+            width: 20%;
+            border: 1px solid #817c7c;
+            margin-right: 1%;
+            text-align: center;
+            line-height: 28px;
+          }
+          .warnItemRight {
+            height: 32px;
+            width: 79%;
+            line-height: 28px;
+            border: 1px solid #817c7c;
+            padding-left: 5px;
+          }
+
+          .redsty {
+            border: 1px solid red;
+            color: red;
+          }
+        }
+      }
+      .warnTable {
+        margin-top: 10px;
+      }
     }
   }
 }

+ 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();