East пре 3 година
родитељ
комит
2a0f724f1b

+ 2 - 2
src/components/erp/ProductionDonut.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-11 14:54:18
- * @LastEditTime: 2021-12-03 14:58:55
+ * @LastEditTime: 2021-12-21 08:46:56
  * @LastEditors: Please set LastEditors
  * @Description: 生产情况的环形图
  * @FilePath: \hyyfClient\src\components\erp\ProductionDonut.vue
@@ -24,7 +24,7 @@ export default {
     },
     stockQuantity: {
       type: String,
-      required: true,
+      default: () => 0,
     },
     color: {
       type: String,

+ 2 - 1
src/utils/http.js

@@ -15,7 +15,8 @@ let removePending = (ever) => {
 // 创建axios实例
 var instance = axios.create({
   timeout: 1000 * 12,
-  baseURL: 'http://120.27.234.126:8010'
+  // baseURL: 'http://120.27.234.126:8010'
+  baseURL: 'http://192.168.1.165:8010'
 })
 
 // 请求拦截器

+ 1 - 1
src/views/PdcData/Analysis.vue

@@ -614,7 +614,6 @@ export default {
     // 生产情况
     initProductionCondition() {
       getProductionCondition({}).then((res) => {
-        // console.log(res.data);
         if (res.code === 10000) {
           this.productionPercents = [
             { ...res.data["grice_rate"], color: "rgb(112,249,250)" },
@@ -623,6 +622,7 @@ export default {
             { ...res.data["break_rate"], color: "rgb(2, 167, 240)" },
             { ...res.data["breed_rate"], color: "rgb(112, 0, 217)" },
           ];
+          console.log(this.productionPercents);
           this.productionItems = [
             res.data["avg_farrow_1"].stockQuantity,
             res.data["avg_farrow_2"].stockQuantity,

+ 5 - 4
src/views/PdcData/analysis/ProductionDonuts.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-11 14:56:37
- * @LastEditTime: 2021-11-25 16:23:07
+ * @LastEditTime: 2021-12-21 08:45:19
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \hyyfClient\src\views\PdcData\analysis\ProductionDonuts.vue
@@ -28,9 +28,10 @@ export default {
     };
   },
   watch: {
-    data(newValue) {
-      this.datas = newValue;
-      console.log(this.datas, "++++++++++++++++++");
+    data: {
+      handler(newValue) {
+        this.datas = newValue;
+      },
     },
   },
   components: {