zhaomiao 4 rokov pred
rodič
commit
8cae38d260

+ 1 - 1
src/assets/js/benchmarkingSys/yardBenchmark.js

@@ -268,7 +268,7 @@ export default {
         }
 
         //this.drawhistoram();
-        this.ECZM.getBar("histogram",[
+        this.ECZM.getBar_fdd("histogram",[
           {
             name: "限电损失电量(单位:万kwh)",
             type: "bar",

+ 33 - 21
src/tools/echartsToolzm.js

@@ -2,28 +2,40 @@ import EC from 'echarts'
 const color = ["#00FFF0","#014EB5","#A800FF","#e82edb","#B5454C","#443bff","#e8cb25","#3dffb0","#e8a425","#ff7aab","#e84b1e","#552ce2","#ffae21","#e8861e","#d441ff","#35e8e4","#9c7aff","#e86fd8","#ffee38"];
 
 /*
- *  获取 自浮云 - 常用1
+ *  柱状图(非堆叠柱状图)
  *  id: 元素ID
- *  data: [{
-      name: "发动机卡了", // 值
-      value: 100, // 权重
-      textStyle: {
-        emphasis: {
-          color: 'red' // 光标移入颜色
-        }
-      }
-    },{
-      name: "发动了", // 值
-      value: 20, // 权重
-      textStyle: {
-        emphasis: {
-          color: 'red' // 光标移入颜色
-        }
-      }
-    }]
- *  name: 提示框name
+ *  data 数据
+ * [
+          {
+            name: "限电损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.xdss,
+          },
+          {
+            name: "故障损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.gzss,
+          },
+          ,
+          {
+            name: "检修损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.jxss,
+          },
+          {
+            name: "性能损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.xnss,
+          },
+          {
+            name: "受累损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.slss,
+          },
+        ]
+ *  xdata :  横坐标数据
  * */
-export function getBar(id, data , xdata) {
+export function getBar_fdd(id, data , xdata) {
   if(data === undefined){
     message.error("没有找到报表数据,请检查!");
     return;
@@ -68,7 +80,7 @@ export function getBar(id, data , xdata) {
 }
 
 export default {
-  getBar,
+  getBar_fdd,
 
   color,
 }