From 1f4903411dd41223554e62bc3b134b7ec4d42975 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 04 十二月 2023 16:13:42 +0800
Subject: [PATCH] 设置订单完成比率和工单进度统计动态显示

---
 src/views/cockpitPage/index.vue |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/src/views/cockpitPage/index.vue b/src/views/cockpitPage/index.vue
index 3c1db8c..715ee71 100644
--- a/src/views/cockpitPage/index.vue
+++ b/src/views/cockpitPage/index.vue
@@ -10,7 +10,9 @@
       <CountView :total-object="totalObject"></CountView>
     </template>
     <template #leftBlock4>
-      <OrderCompleteRadio></OrderCompleteRadio>
+      <OrderCompleteRadio
+        :order-complete-object="orderCompleteObject"
+      ></OrderCompleteRadio>
     </template>
     <template #leftBlock5>
       <WorkOrderProgress></WorkOrderProgress>
@@ -69,13 +71,19 @@
       ],
       // 宸︿腑鏁版嵁缁熻瀵硅薄
       totalObject: {},
+      // 璁㈠崟瀹屾垚姣旂巼
+      orderCompleteObject: {
+        startIndex: 0,
+        orderCompleteList: [],
+      },
+      dataindex: 0,
     };
   },
   mounted() {
     this.getDashboard();
     setInterval(() => {
       this.getDashboard();
-    }, 300000);
+    }, 10000);
   },
   watch: {},
   methods: {
@@ -86,6 +94,8 @@
         this.setLeftBlock1(res.data);
         //  宸︿腑鏁版嵁缁熻鍊�
         this.setLeftBlock3(res.data);
+        // 璁㈠崟瀹屾垚姣旂巼
+        this.setLeftBlock4(res.data);
       });
     },
     // 澶勭悊宸︿笂鏁版嵁
@@ -124,6 +134,48 @@
         RealProductionAmount: data?.RealProductionAmount ?? 0,
       };
     },
+    // 璁㈠崟瀹屾垚姣旂巼
+    setLeftBlock4(data) {
+      this.orderCompleteObject.startIndex = 0;
+      // 姝ゅ鍚庨潰浼氭浛鎹㈡垚鐪熷疄鍚庣杩斿洖鏁版嵁
+      if (this.dataindex == 1) {
+        this.orderCompleteObject.orderCompleteList = [
+          { title: "SSSSDD19070047", radio: 20.6 },
+          { title: "SDD19070048", radio: 79 },
+          { title: "SDD19070049", radio: 100 },
+          { title: "SDD19070050", radio: 30 },
+          { title: "DD19070047", radio: 20.6 },
+          { title: "DD19070048", radio: 49 },
+          { title: "DD19070049", radio: 60 },
+          { title: "SSDD19070050", radio: 10 },
+          { title: "SDD19070047", radio: 33.6 },
+          { title: "DD19070048", radio: 69 },
+          { title: "SDD19070049", radio: 70 },
+          { title: "DD19070050", radio: 20 },
+          { title: "SDD19070047", radio: 66.6 },
+          { title: "DD19070048", radio: 46 },
+        ];
+        this.dataindex = 0;
+      } else {
+        this.orderCompleteObject.orderCompleteList = [
+          { title: "fffffDD19070047", radio: 50.6 },
+          { title: "DD19070043", radio: 89 },
+          { title: "DD15566649", radio: 100 },
+          { title: "ASD5555550", radio: 30 },
+          { title: "DD19070047", radio: 30.6 },
+          { title: "DD19070048", radio: 49 },
+          { title: "DD19070049", radio: 60 },
+          { title: "DD19070050", radio: 10 },
+          { title: "DD19070047", radio: 33.6 },
+          { title: "DD19070048", radio: 69 },
+          { title: "DD19070049", radio: 70 },
+          { title: "DD19070050", radio: 20 },
+          { title: "DD19070047", radio: 66.6 },
+          { title: "DD19070048", radio: 96 },
+        ];
+        this.dataindex = 1;
+      }
+    },
   },
 };
 </script>

--
Gitblit v1.8.0