瀏覽代碼

单机饱和度统计图修改

darker 3 年之前
父節點
當前提交
a61a952d8b

+ 65 - 58
src/components/chart/line/multiple-line-chart.vue

@@ -218,19 +218,23 @@ export default {
       type: Boolean,
       default: false,
     },
-    hoverType: {
-      type: String,
-      default: "item",
-    },
+    // hoverType: {
+    //   type: String,
+    //   default: "item",
+    // },
   },
   data() {
     return {
       id: "",
       chart: null,
-      color: ["#05bb4c", "#4b55ae", "#fa8c16", "#f8de5b", "#1a93cf", "#c531c7", "#bd3338", "#05bb4c", "#4b55ae", "#fa8c16", "#f8de5b", "#1a93cf", "#c531c7", "#bd3338"],
+      // color: ["#05bb4c", "#4b55ae", "#fa8c16", "#f8de5b", "#1a93cf", "#c531c7", "#bd3338", "#05bb4c", "#4b55ae", "#fa8c16", "#f8de5b", "#1a93cf", "#c531c7", "#bd3338"],
+       color: ["#05bb4c", "#f8de5b", "#4b55ae", "#fa8c16", "#1DA0D7", "#DD5044"],
     };
   },
   computed: {
+     colorValue() {
+      return partten.getColor(this.color);
+    },
     datas() {
       return this.list.map((t) => {
         return t.value;
@@ -243,8 +247,10 @@ export default {
     },
     xdata() {
       if (this.list.length > 0)
+      console.log('xlist:',this.list[0])
         return this.list[0].value.map((t) => {
           console.log('list0:',this.list[0])
+          console.log('t:',t)
           console.log('tvalue:',t.value)
           // return t.text;
           return t.value
@@ -264,61 +270,61 @@ export default {
           zlevel: index,
           lineStyle: {
             normal: {
-              // color: index != 0 ? partten.getColor("gray") : this.color[index],
-                color: partten.getColor("gray"), 
+            // color: index != 0 ? partten.getColor("gray") : this.color[index],
+               color: this.color[index],
               width: 1,
             },
-            emphasis: {
-              color: this.color[index],
-            },
-          },
-          areaStyle: {
-            normal: {
-              color:
-                index == 0
-                  ? new echarts.graphic.LinearGradient(
-                      0,
-                      0,
-                      0,
-                      1,
-                      [
-                        {
-                          offset: 0,
-                          color: this.hexToRgba(this.color[index], 0.3),
-                        },
-                        {
-                          offset: 1,
-                          color: this.hexToRgba(this.color[index], 0.1),
-                        },
-                      ],
-                      false
-                    )
-                  : "transparent",
-              shadowColor: this.hexToRgba(this.color[index], 0.1),
-              shadowBlur: 10,
-            },
-            emphasis: {
-              color: new echarts.graphic.LinearGradient(
-                0,
-                0,
-                0,
-                1,
-                [
-                  {
-                    offset: 0,
-                    color: this.hexToRgba(this.color[index], 0.3),
-                  },
-                  {
-                    offset: 1,
-                    color: this.hexToRgba(this.color[index], 0.1),
-                  },
-                ],
-                false
-              ),
-              shadowColor: this.hexToRgba(this.color[index], 0.1),
-              shadowBlur: 10,
-            },
+            // emphasis: {
+            //   color: this.color[index],
+            // },
           },
+          // areaStyle: {
+          //   normal: {
+          //     color:
+          //       index == 0
+          //         ? new echarts.graphic.LinearGradient(
+          //             0,
+          //             0,
+          //             0,
+          //             1,
+          //             [
+          //               {
+          //                 offset: 0,
+          //                 color: this.hexToRgba(this.color[index], 0.3),
+          //               },
+          //               {
+          //                 offset: 1,
+          //                 color: this.hexToRgba(this.color[index], 0.1),
+          //               },
+          //             ],
+          //             false
+          //           )
+          //         : "transparent",
+          //     shadowColor: this.hexToRgba(this.color[index], 0.1),
+          //     shadowBlur: 10,
+          //   },
+          //   emphasis: {
+          //     color: new echarts.graphic.LinearGradient(
+          //       0,
+          //       0,
+          //       0,
+          //       1,
+          //       [
+          //         {
+          //           offset: 0,
+          //           color: this.hexToRgba(this.color[index], 0.3),
+          //         },
+          //         {
+          //           offset: 1,
+          //           color: this.hexToRgba(this.color[index], 0.1),
+          //         },
+          //       ],
+          //       false
+          //     ),
+          //     shadowColor: this.hexToRgba(this.color[index], 0.1),
+          //     shadowBlur: 10,
+          //   },
+          // },
           tooltip: {
             show: true,
             position: [10, 10],
@@ -424,7 +430,8 @@ export default {
             axisLine: {
               show: false,
             },
-            data: this.xdata,
+            // data: this.xdata,
+            data:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]
           },
         ],
         yAxis: this.yAxis,

+ 14 - 11
src/views/wtSaturability/tab1.vue

@@ -40,7 +40,7 @@ export default {
   // 使用组件
   components: {
     ComTable,
-    Mlc
+    Mlc,
   },
 
   // 数据
@@ -158,10 +158,12 @@ export default {
         },
         success (res) {
           console.log('chartData1:',res)
-          const keyArray = [{
-            key: "value1",
-            title: "风速"
-          }, {
+          const keyArray = [
+          //   {
+          //   key: "value1",
+          //   title: "风速"
+          // }, 
+          {
             key: "value2",
             title: "实际拟合功率"
           }, {
@@ -173,12 +175,13 @@ export default {
           }];
 
           let chartData = [
-            {
-            title: "风速",
-            // yAxisIndex: 1,
-             yAxisIndex: 0,
-            value: []
-          },
+          //   {
+          //   title: "风速",
+          //   // yAxisIndex: 1,
+          //    yAxisIndex: 0,
+          //   value: []
+          // },
+
            {
             title: "实际拟合功率",
             yAxisIndex: 0,

+ 14 - 10
src/views/wtSaturability/tab2.vue

@@ -212,10 +212,12 @@ export default {
         },
         success (res) {
 
-          const keyArray = [{
-            key: "value1",
-            title: "风速"
-          }, {
+          const keyArray = [
+          //   {
+          //   key: "value1",
+          //   title: "风速"
+          // }, 
+          {
             key: "value2",
             title: "实际拟合功率"
           }, {
@@ -226,12 +228,14 @@ export default {
             title: "保证功率"
           }];
 
-          let chartData = [{
-            title: "风速",
-            // yAxisIndex: 1,
-             yAxisIndex: 0,
-            value: []
-          }, {
+          let chartData = [
+          //   {
+          //   title: "风速",
+          //   // yAxisIndex: 1,
+          //    yAxisIndex: 0,
+          //   value: []
+          // },
+           {
             title: "实际拟合功率",
             yAxisIndex: 0,
             value: []

+ 14 - 10
src/views/wtSaturability/tab3.vue

@@ -210,10 +210,12 @@ export default {
         },
         success (res) {
 
-          const keyArray = [{
-            key: "value1",
-            title: "风速"
-          }, {
+          const keyArray = [
+          //   {
+          //   key: "value1",
+          //   title: "风速"
+          // }, 
+          {
             key: "value2",
             title: "实际拟合功率"
           }, {
@@ -224,12 +226,14 @@ export default {
             title: "保证功率"
           }];
 
-          let chartData = [{
-            title: "风速",
-            // yAxisIndex: 1,
-             yAxisIndex: 0,
-            value: []
-          }, {
+          let chartData = [
+          //   {
+          //   title: "风速",
+          //   // yAxisIndex: 1,
+          //    yAxisIndex: 0,
+          //   value: []
+          // }, 
+          {
             title: "实际拟合功率",
             yAxisIndex: 0,
             value: []