Переглянути джерело

Merge branch 'yx' of http://61.161.152.110:10101/r/electronic-map into sl3

shilin 3 роки тому
батько
коміт
d0ae0e2d2a

+ 48 - 48
src/views/Home/Home.vue

@@ -769,10 +769,10 @@
       @closed="dialogType = ''"
     >
       <Table :data="dialogData" v-if="dialogType === 'table'" />
-      <MultipleLineChart
+      <multiple-y-line-chart-normal
         height="500px"
-        unit="(MW)"
-        :list="powerLineChartData"
+        :list="Powertrend"
+        :yAxises="PowertrendYAxises"
         :showLegend="true"
         v-if="dialogType === 'powerLineChart'"
       />
@@ -856,17 +856,13 @@ export default {
       tqmap: {},
       nowTime: "",
       planBtnName: "全部",
-      powerLineChartData: {
-        // 图表所用单位
-        units: [""],
-        value: [
-          {
-            title: "",
-            yAxisIndex: 0, // 使用单位
-            value: [],
-          },
-        ],
-      },
+      powerLineChartData: [
+        {
+          title: "",
+          yAxisIndex: 0, // 使用单位
+          value: [],
+        },
+      ],
       doneLineChartData: {
         // 图表所用单位
         units: [""],
@@ -909,13 +905,20 @@ export default {
         },
       ],
       PowertrendYAxises: [
-          {
-              name: '',
-              min: 0,
-              max: 60,
-              unit: "(MW)",
-              position: "left",
-          },
+        {
+          name: "功率",
+          min: 0,
+          max: 500,
+          unit: "(万kWh)",
+          position: "left",
+        },
+        {
+          name: "风速",
+          min: 0,
+          max: 50,
+          unit: "(m/s)",
+          position: "right",
+        },
       ],
     };
   },
@@ -1069,32 +1072,29 @@ export default {
         },
         success(res) {
           let rdlKey = ["value1", "value2", "value3", "speed"];
-          let DayPower = {
-            // 图表所用单位
-            units: ["(万kWh)", "(m/s)"],
-            value: [
-              {
-                title: "发电量",
-                yAxisIndex: 0,
-                value: [],
-              },
-              {
-                title: "上网电量",
-                yAxisIndex: 0,
-                value: [],
-              },
-              {
-                title: "购网电量",
-                yAxisIndex: 0,
-                value: [],
-              },
-              {
-                title: "风速",
-                yAxisIndex: 1,
-                value: [],
-              },
-            ],
-          };
+          // units: ["(万kWh)", "(m/s)"],
+          let DayPower = [
+            {
+              title: "发电量",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "上网电量",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "购网电量",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "风速",
+              yAxisIndex: 1,
+              value: [],
+            },
+          ];
 
           let glKey = [
             "value2",
@@ -1139,7 +1139,7 @@ export default {
 
           rdlKey.forEach((keyEle, keyIndex) => {
             res.data.rdlvos.forEach((cEle) => {
-              DayPower.value[keyIndex].value.push({
+              DayPower[keyIndex].value.push({
                 text: cEle.timestr,
                 value: cEle[keyEle],
               });

+ 11 - 10
src/views/SandTable/SandTable.vue

@@ -118,7 +118,7 @@
       <Ppanel
         title="利用小时"
         :data="riseNumber(gxkmap.bg_dxkyss)"
-        :dataColor="gxkmap.bg_dxkyss < 0 ? '#f25656' : '#05BB4C'"
+        dataColor="#05BB4C"
         :days="gxkmap.ydxkyss"
         :data1Icon="
           gxkmap.tb_dxkyss < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'
@@ -141,7 +141,7 @@
         title="设备可利用率"
         class="stb-p"
         :data="riseNumber(gxkmap.bg_sbklyl)"
-        :dataColor="gxkmap.bg_sbklyl < 0 ? '#f25656' : '#05BB4C'"
+        dataColor="#05BB4C"
         :days="gxkmap.ysbklyl"
         :data1Icon="
           gxkmap.hb_sbklyl < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'
@@ -164,7 +164,7 @@
         title="MTBF"
         class="stb-p"
         :data="riseNumber(gxkmap.bg_mtbf)"
-        :dataColor="gxkmap.bg_mtbf < 0 ? '#f25656' : '#05BB4C'"
+        dataColor="#05BB4C"
         :days="gxkmap.mtbf"
         :data1Icon="gxkmap.hb_mtbf < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
         :data1IconClass="
@@ -183,7 +183,7 @@
         title="MTTR"
         class="stb-p"
         :data="riseNumber(gxkmap.bg_mttr)"
-        :dataColor="gxkmap.bg_mttr < 0 ? '#f25656' : '#05BB4C'"
+        dataColor="#05BB4C"
         :days="gxkmap.mttr"
         :data1Icon="gxkmap.hb_mttr < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
         :data1IconClass="
@@ -202,7 +202,7 @@
         title="MTTF"
         class="stb-p"
         :data="riseNumber(gxkmap.bg_mttf)"
-        :dataColor="gxkmap.bg_mttf < 0 ? '#f25656' : '#05BB4C'"
+        dataColor="#05BB4C"
         :days="gxkmap.mttf"
         :data1Icon="gxkmap.hb_mttf < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
         :data1IconClass="
@@ -865,11 +865,12 @@ export default {
     },
 
     riseNumber(number) {
-      if (number < 0) {
-        return (number - number * 2) / 100;
-      } else {
-        return number / 100;
-      }
+      // if (number < 0) {
+      //   return (number - number * 2) / 100;
+      // } else {
+      //   return number / 100;
+      // }
+      return number / 100;
     },
 
     // 切换人员展示

+ 1 - 1
src/views/SandTable/component/p-panel.vue

@@ -25,7 +25,7 @@
           <div class="pp-tip-data font-sm">
             {{
               (data * 100).toFixed(2)
-            }}
+            }}%
           </div>
           <div class="pp-tip-icon">
             <i