From 14101bd42ce17dfb9d951d0738abe9d303fb3fe5 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 11 十二月 2023 10:41:39 +0800
Subject: [PATCH] 机器开机率、人员技能比饼图优化

---
 src/views/cockpitPage/components/WorkOrderProgress.vue |  190 ++++-------------------------------------------
 1 files changed, 16 insertions(+), 174 deletions(-)

diff --git a/src/views/cockpitPage/components/WorkOrderProgress.vue b/src/views/cockpitPage/components/WorkOrderProgress.vue
index 16ae3c4..9553515 100644
--- a/src/views/cockpitPage/components/WorkOrderProgress.vue
+++ b/src/views/cockpitPage/components/WorkOrderProgress.vue
@@ -5,7 +5,7 @@
         <img src="/cockpitPage/work-order-top.png" alt="" />
         <div class="top-title">
           <span>宸ュ崟杩涘害缁熻</span>
-          <span class="top-rate">{{ "60%" }}</span>
+          <span class="top-rate">{{ workOrderFinishRate + "%" }}</span>
         </div>
       </div>
       <div class="table-box">
@@ -26,6 +26,7 @@
             prop="Product"
             label="浜у搧"
             align="center"
+            min-width="100"
             show-overflow-tooltip
           >
           </el-table-column>
@@ -51,7 +52,7 @@
             show-overflow-tooltip
           >
           </el-table-column>
-          <el-table-column label="瀹屾垚杩涘害" align="center" min-width="160">
+          <el-table-column label="瀹屾垚杩涘害" align="center" min-width="130">
             <template slot-scope="scope">
               <div class="progerss-bg">
                 <div
@@ -71,18 +72,19 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column label="寤舵湡棰勮" align="center">
+          <el-table-column label="寤舵湡棰勮" align="center" width="90">
             <template slot-scope="scope">
               <div v-show="scope.row.DelayDays > 0" class="round-view">
                 <div class="round red-bg"></div>
                 <div class="title red-color">
-                  {{ scope.row.DelayDays + "澶�" }}
+                  {{ scope.row.DelayDays > 10 ? ">10" : scope.row.DelayDays
+                  }}{{ "澶�" }}
                 </div>
               </div>
               <div v-show="scope.row.DelayDays < 0" class="round-view">
                 <div class="round green-bg"></div>
                 <div class="title green-color">
-                  {{ scope.row.DelayDays + "澶�" }}
+                  {{ Math.abs(scope.row.DelayDays) + "澶�" }}
                 </div>
               </div>
             </template>
@@ -101,172 +103,13 @@
       type: Array,
       default: () => [],
     },
+    workOrderFinishRate: {
+      type: String,
+      default: "",
+    },
   },
   data() {
-    return {
-      // tableData: [
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 3,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 2,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: -2,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      //   {
-      //     Number: "A5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      //   {
-      //     Number: "BA5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      //   {
-      //     Number: "BA5435",
-      //     Product: "浜у搧1",
-      //     Scale: "瑙勬牸",
-      //     Amount: "2000",
-      //     PlanTime: "02-23~05-23",
-      //     completeProgerss: [
-      //       { status: 1 },
-      //       { status: 1 },
-      //       { status: 2 },
-      //       { status: 0 },
-      //     ],
-      //     DelayDays: 0,
-      //   },
-      // ],
-    };
+    return {};
   },
   mounted() {
     this.setAutoScroll();
@@ -357,12 +200,11 @@
       .round-view {
         display: flex;
         justify-content: center;
-
+        align-items: center;
         .round {
-          width: 22px;
-          height: 22px;
-          border-radius: 11px;
-
+          width: 16px;
+          height: 16px;
+          border-radius: 8px;
           margin-right: 5px;
         }
         .red-bg {

--
Gitblit v1.8.0