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/components/OrderCompleteRadio.vue |   58 +++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 47 insertions(+), 11 deletions(-)

diff --git a/src/views/cockpitPage/components/OrderCompleteRadio.vue b/src/views/cockpitPage/components/OrderCompleteRadio.vue
index 11066c7..af4ccc2 100644
--- a/src/views/cockpitPage/components/OrderCompleteRadio.vue
+++ b/src/views/cockpitPage/components/OrderCompleteRadio.vue
@@ -29,19 +29,52 @@
   components: {
     ChartTitle,
   },
-  props: {},
+  props: {
+    orderCompleteObject: {
+      type: Object,
+      default: () => {
+        return {
+          startIndex: 0,
+          orderCompleteList: [],
+        };
+      },
+    },
+  },
   data() {
     return {
-      tableList: [
-        { title: "DD19070047", radio: 50.6 },
-        { title: "DD19070048", radio: 89 },
-        { title: "DD19070049", radio: 100 },
-        { title: "DD19070050", radio: 30 },
-      ],
+      startIndex: 0,
+      time: 0,
     };
   },
-  mounted() {},
-  watch: {},
+  mounted() {
+    setInterval(() => {
+      this.startIndex += 4;
+    }, 5000);
+  },
+  computed: {
+    tableList: {
+      get() {
+        if (
+          this.startIndex > this.orderCompleteObject.orderCompleteList.length
+        ) {
+          this.startIndex = 0;
+        }
+        return this.orderCompleteObject.orderCompleteList.slice(
+          this.startIndex,
+          this.startIndex + 4
+        );
+      },
+      set(val) {
+        console.log(val);
+      },
+    },
+  },
+  watch: {
+    "orderCompleteObject.orderCompleteList"(val) {
+      console.log(val, "ssssssssss");
+      this.startIndex = this.orderCompleteObject.startIndex;
+    },
+  },
   methods: {},
 };
 </script>
@@ -66,13 +99,16 @@
       border-radius: 50px;
       transition: all 1s ease-in-out 0s;
       .left {
-        width: 20%;
+        width: 23%;
         margin: 0 10px;
         color: #02f1fc;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
       }
       .middle {
         flex: 1;
-        margin: 0 10px;
+        margin-right: 5px;
       }
     }
   }

--
Gitblit v1.8.0