East il y a 3 ans
Parent
commit
1849cc31b6

+ 12 - 12
src/views/PdcData/analysis/ChartInventoryLines.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-08 17:24:29
- * @LastEditTime: 2021-12-02 10:18:24
+ * @LastEditTime: 2021-12-09 17:19:23
  * @LastEditors: Please set LastEditors
  * @Description: 存栏结构 - 存栏变动折线图
  * @FilePath: \hyyfClient\src\views\PdcData\analysis\ChartInventoryLines.vue
@@ -46,7 +46,7 @@ export default {
         // legend: {
         //   data: ['头']
         // },
-        color: ["#3aa0ff", "#4dcb73", "#fad337", "#f2637b", "#975fe4"],
+        color: ["#3aa0ff", "#403DEA", "#226942", "#1AD06C", "#975fe4"],
         grid: {
           top: "20%",
           left: "10%",
@@ -134,9 +134,9 @@ export default {
             data: this.data.boarStock,
             itemStyle: {
               normal: {
-                color: "#4dcb73",
+                color: "#403DEA",
                 lineStyle: {
-                  color: "#4dcb73",
+                  color: "#403DEA",
                 },
               },
             },
@@ -148,9 +148,9 @@ export default {
             data: this.data.griceStock,
             itemStyle: {
               normal: {
-                color: "#fad337",
+                color: "#226942",
                 lineStyle: {
-                  color: "#fad337",
+                  color: "#226942",
                 },
               },
             },
@@ -162,9 +162,9 @@ export default {
             data: this.data.pigletStock,
             itemStyle: {
               normal: {
-                color: "#f2637b",
+                color: "#1AD06C",
                 lineStyle: {
-                  color: "#f2637b",
+                  color: "#1AD06C",
                 },
               },
             },
@@ -176,9 +176,9 @@ export default {
             data: this.data.fatpigStock,
             itemStyle: {
               normal: {
-                color: "#975fe4",
+                color: "#C03DEA",
                 lineStyle: {
-                  color: "#975fe4",
+                  color: "#C03DEA",
                 },
               },
             },
@@ -192,12 +192,12 @@ export default {
           // }
         ],
       };
-      this.myChart.setOption(options);
+      this.myChart.setOption(options, true);
     },
   },
   mounted() {
     this.myChart = this.$echarts.init(document.getElementById("chartLines"));
-    // this.init();
+    this.init();
   },
   watch: {
     data: {

+ 7 - 7
src/views/PdcData/analysis/ChartInventoryPie.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-30 15:46:57
- * @LastEditTime: 2021-12-02 09:37:17
+ * @LastEditTime: 2021-12-09 17:20:30
  * @LastEditors: Please set LastEditors
  * @Description: 存栏结构图
  * @FilePath: \hyyfClient\src\views\PdcData\analysis\ChartInventoryPie.vue
@@ -140,10 +140,10 @@ export default {
                   // 颜色设置
                   var colorList = [
                     "#3aa0ff",
-                    "#4dcb73",
-                    "#fad337",
-                    "#f2637b",
-                    "#975fe4",
+                    "#403DEA",
+                    "#226942",
+                    "#1AD06C",
+                    "#C03DEA",
                   ];
                   return colorList[colors.dataIndex];
                 },
@@ -162,12 +162,12 @@ export default {
         ],
       };
 
-      this.myChart.setOption(options);
+      this.myChart.setOption(options, true);
     },
   },
   mounted() {
     this.myChart = this.$echarts.init(document.getElementById("chartPie"));
-    // this.init()
+    this.init();
   },
   watch: {
     data(newValue) {

+ 3 - 3
src/views/PdcData/analysis/CostHistogram.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-12 09:10:42
- * @LastEditTime: 2021-11-28 17:16:27
+ * @LastEditTime: 2021-12-09 17:22:16
  * @LastEditors: Please set LastEditors
  * @Description: 成本分析的柱状图
  * @FilePath: \hyyfClient\src\views\PdcData\analysis\CostHistogram.vue
@@ -48,7 +48,7 @@ export default {
         {
           ...commonSeriesItem,
           name: "兽药成本",
-          color: "rgb(232,56,92)",
+          color: "#2194EA",
           data: [],
         },
         {
@@ -190,7 +190,7 @@ export default {
   },
   mounted() {
     this.myChart = this.$echarts.init(document.getElementById("costHistogram"));
-    // this.init();
+    this.init();
   },
   watch: {
     data(value) {

+ 7 - 5
src/views/PdcData/analysis/CostPie.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-12 08:39:43
- * @LastEditTime: 2021-12-02 19:25:50
+ * @LastEditTime: 2021-12-09 17:23:03
  * @LastEditors: Please set LastEditors
  * @Description: 成本分析扇形图
  * @FilePath: \hyyfClient\src\views\PdcData\analysis\CostPie.vue
@@ -78,7 +78,7 @@ export default {
                   // 颜色设置
                   var colorList = [
                     "rgb(112,182,3)",
-                    "rgb(232,56,92)",
+                    "#2194EA",
                     "rgb(123,0,255)",
                     // "rgb(0,215,233)",
                     // "rgb(255,255,160)",
@@ -150,9 +150,11 @@ export default {
     this.init();
   },
   watch: {
-    data(value) {
-      console.log("成本分析环形图数据", value);
-      this.init();
+    data: {
+      handler() {
+        this.init();
+      },
+      deep: true,
     },
   },
 };