East 3 lat temu
rodzic
commit
3cc20e01c6

Plik diff jest za duży
+ 16049 - 16
package-lock.json


+ 7 - 7
src/views/Production/board/ChartAmountLine.vue

@@ -39,7 +39,7 @@ export default {
         // legend: {
         //   data: ['头']
         // },
-        color: ["#3aa0ff", "#4dcb73", "#fad337", "#f2637b", "#975fe4"],
+        color: ["#3aa0ff", "#403DEA", "#226942", "#1AD06C", "#975fe4"],
         grid: {
           top: "22%",
           left: "10%",
@@ -133,9 +133,9 @@ export default {
             data: this.data.boarStock,
             itemStyle: {
               normal: {
-                color: "#4dcb73",
+                color: "#403DEA",
                 lineStyle: {
-                  color: "#4dcb73",
+                  color: "#403DEA",
                 },
               },
             },
@@ -147,9 +147,9 @@ export default {
             data: this.data.griceStock,
             itemStyle: {
               normal: {
-                color: "#fad337",
+                color: "#226942",
                 lineStyle: {
-                  color: "#fad337",
+                  color: "#226942",
                 },
               },
             },
@@ -161,9 +161,9 @@ export default {
             data: this.data.pigletStock,
             itemStyle: {
               normal: {
-                color: "#f2637b",
+                color: "#1AD06C",
                 lineStyle: {
-                  color: "#f2637b",
+                  color: "#1AD06C",
                 },
               },
             },

+ 10 - 8
src/views/Production/board/ChartAmountPie.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-26 09:15:22
- * @LastEditTime: 2021-12-02 15:43:29
+ * @LastEditTime: 2021-12-13 14:14:21
  * @LastEditors: Please set LastEditors
  * @Description: 存栏结构图
  * @FilePath: \hyyfScreen\src\views\Production\board\ChartAmountPie.vue
@@ -140,9 +140,9 @@ export default {
                   // 颜色设置
                   var colorList = [
                     "#3aa0ff",
-                    "#4dcb73",
-                    "#fad337",
-                    "#f2637b",
+                    "#403DEA",
+                    "#226942",
+                    "#1AD06C",
                     "#975fe4",
                   ];
                   return colorList[colors.dataIndex];
@@ -169,13 +169,15 @@ export default {
     this.myChart = this.$echarts.init(
       document.getElementById("chartAmountPie")
     );
-    // this.init();
+    this.init();
     // console.log(this.data);
   },
   watch: {
-    data(newValue) {
-      console.log(newValue);
-      this.init();
+    data: {
+      handler() {
+        this.init();
+      },
+      deep: true,
     },
   },
 };

+ 2 - 2
src/views/Production/board/ChartCostLine.vue

@@ -48,13 +48,13 @@ export default {
         {
           ...commonSeriesItem,
           name: "兽药成本",
-          color: "rgb(0,215,233)",
+          color: "#3aa0ff",
           data: [],
         },
         {
           ...commonSeriesItem,
           name: "饲料成本",
-          color: "rgb(255,255,160)",
+          color: "#975fe4",
           data: [],
         },
       ];

+ 3 - 3
src/views/Production/board/ChartCostPie.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-26 17:53:30
- * @LastEditTime: 2021-12-02 19:21:46
+ * @LastEditTime: 2021-12-13 14:16:47
  * @LastEditors: Please set LastEditors
  * @Description: 成本分析扇形图
  * @FilePath: \hyyfScreen\src\views\Production\board\ChartCostPie.vue
@@ -80,8 +80,8 @@ export default {
                     "rgb(112,182,3)",
                     // "rgb(232,56,92)",
                     // "rgb(123,0,255)",
-                    "rgb(0,215,233)",
-                    "rgb(255,255,160)",
+                    "#3aa0ff",
+                    "#975fe4",
                     // "rgb(0,0,255)",
                   ];
                   return colorList[colors.dataIndex];

+ 69 - 64
src/views/Production/board/IndicatorOneChart.vue

@@ -1,137 +1,142 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-22 17:00:48
- * @LastEditTime: 2021-11-22 17:12:25
+ * @LastEditTime: 2021-12-13 14:18:35
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \hyyfScreen\src\views\Production\board\IndicatorOneChart.vue
 -->
 <template>
-  <div id="indicatorOneChart" class="indicator-one-chart">
-  </div>
+  <div id="indicatorOneChart" class="indicator-one-chart"></div>
 </template>
 <script>
 export default {
   props: {
     ifPositive: {
       type: Boolean,
-      required: true
+      required: true,
     },
     id: {
-      required: true
+      required: true,
     },
     data: {
-      default: () => []
-    }
+      default: () => [],
+    },
   },
   data() {
     return {
-      myChart: null
-    }
+      myChart: null,
+    };
   },
   methods: {
     init() {
-      let color1 = 'rgba(0, 255, 0, 0.7)'
-      let color2 = 'rgba(64, 218, 26, 0.5)'
-      let color3 = 'rgba(88, 165, 69, 0.3)'
+      let color1 = "rgba(0, 255, 0, 0.7)";
+      let color2 = "rgba(64, 218, 26, 0.5)";
+      let color3 = "rgba(88, 165, 69, 0.3)";
       if (this.ifPositive) {
-        color1 = 'rgba(255, 0, 0, 0.7)'
-        color2 = 'rgba(216, 52, 52, 0.5)'
-        color3 = 'rgba(201, 85, 85, 0.3)'
+        color1 = "rgba(255, 0, 0, 0.7)";
+        color2 = "rgba(216, 52, 52, 0.5)";
+        color3 = "rgba(201, 85, 85, 0.3)";
       }
       let options = {
         grid: {
-          top: '2%',
-          left: '2%',
-          right: '2%',
-          bottom: '2%',
-          containLabel: true
+          top: "2%",
+          left: "2%",
+          right: "2%",
+          bottom: "2%",
+          containLabel: true,
         },
         xAxis: {
-          type: 'category',
+          type: "category",
           boundaryGap: false,
-          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
-          splitLine: { // 除开坐标轴的线
+          data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
+          splitLine: {
+            // 除开坐标轴的线
             show: true,
             lineStyle: {
-              color: ['#ccc'],
+              color: ["#ccc"],
               width: 1,
-              type: 'solid'
-            }
+              type: "solid",
+            },
           },
           axisLine: {
             lineStyle: {
-              color: '#ccc',
-              width: 1
-            }
-          }
+              color: "#ccc",
+              width: 1,
+            },
+          },
         },
         yAxis: {
-          type: 'value',
+          type: "value",
           splitLine: {
             show: true,
             lineStyle: {
-              color: ['#ccc'],
+              color: ["#ccc"],
               width: 1,
-              type: 'solid'
-            }
+              type: "solid",
+            },
           },
           axisLine: {
             lineStyle: {
-              color: '#ccc',
-              width: 1
-            }
-          }
+              color: "#ccc",
+              width: 1,
+            },
+          },
         },
         series: [
           {
             data: [820, 932, 901, 934, 1290, 1330, 1320],
-            type: 'line',
-            symbol: 'none', // 隐藏拐点
+            type: "line",
+            symbol: "none", // 隐藏拐点
             color: color1,
             areaStyle: {
               color: {
-                type: 'linear',
+                type: "linear",
                 x: 0,
                 y: 0,
                 x2: 0,
                 y2: 1,
                 colorStops: [
                   {
-                    offset: 0,  color: color1  // 100% 处的颜色
-                  }, 
+                    offset: 0,
+                    color: color1, // 100% 处的颜色
+                  },
                   {
-                    offset: 0.5,  color: color2  // 100% 处的颜色
+                    offset: 0.5,
+                    color: color2, // 100% 处的颜色
                   },
                   {
-                    offset: 1, color: color3 //   0% 处的颜色
-                  }
+                    offset: 1,
+                    color: color3, //   0% 处的颜色
+                  },
                 ],
-                global: false // 缺省为 false
-              }
-            }
-          }
-        ]
-      }
+                global: false, // 缺省为 false
+              },
+            },
+          },
+        ],
+      };
       this.myChart.setOption(options);
-    }
+    },
   },
   mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('indicatorOneChart'));
+    this.myChart = this.$echarts.init(
+      document.getElementById("indicatorOneChart")
+    );
     this.init();
   },
   watch: {
     data(newValue) {
-      console.log(newValue)
-      this.init()
-    }
-  }
-}
+      console.log(newValue);
+      this.init();
+    },
+  },
+};
 </script>
 <style scoped>
-  .indicator-one-chart{
-    width: 80%;
-    height: 50%;
-    margin-left: 5%;
-  }
+.indicator-one-chart {
+  width: 80%;
+  height: 50%;
+  margin-left: 5%;
+}
 </style>