From 38e0e2b39714aa29aacf9636097e464c50fcc1c3 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 28 八月 2023 10:50:34 +0800
Subject: [PATCH] 面板的提示 报错 换成弹框

---
 src/views/visualization.vue |   48 ++++++++++++++++++++++++++++++++++--------------
 1 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/src/views/visualization.vue b/src/views/visualization.vue
index fefc625..9697ba8 100644
--- a/src/views/visualization.vue
+++ b/src/views/visualization.vue
@@ -1,6 +1,7 @@
 
 <template>
   <div class="home">
+    <!--  -->
     <template v-if="Object.keys(taskData).length > 0 && taskData.Procedure.ID">
       <div class="left">
         <p class="title">
@@ -109,7 +110,7 @@
                   text-color="#fff"
                   :text-inside="true"
                   :stroke-width="30"
-                  :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount):0"
+                  :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount*100):0"
                 ></el-progress>
               </el-descriptions-item>
               <!-- <el-descriptions-item label="鍚堟牸鐜�" style="width: 100%">
@@ -198,7 +199,7 @@
                     </div>
                     <div class="card_top-3">
                       <span class="card-top-r-t"
-                        >瀹屾垚杩涘害锛歿{ taskData.Order?parseInt(finishNumber/taskData.Order.amount):0}}</span
+                        >瀹屾垚杩涘害锛歿{ taskData.Order?parseInt(finishNumber/taskData.Order.amount*100):0}}</span
                       >
                       <span class="card-top-r-b">
                         <el-progress
@@ -207,7 +208,7 @@
                           text-color="#fff"
                           :text-inside="true"
                           :stroke-width="10"
-                          :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount):0"
+                          :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount*100):0"
                           :show-text="false"
                         ></el-progress>
                       </span>
@@ -364,7 +365,7 @@
           </span>
         </div>
         <div class="right-top-m-btn">
-          <el-button type="primary" @click="controlClick"> 鎺у埗</el-button>
+          <!-- <el-button type="primary" @click="controlClick"> 鎺у埗</el-button> -->
         </div>
         <div class="right_dutyLst">
           <div class="right-small-title">褰撳墠鍊肩彮</div>
@@ -418,6 +419,7 @@
         </div>
       </div>
     </template>
+    <!--  -->
     <template v-else>
       <div class="home-img-box">
         <div class="bg-title">
@@ -442,9 +444,9 @@
       </div>
     </template>
     <!-- 鎺у埗鐨勫脊妗� -->
-    <AddControl ref="control" :id="taskData.Procedure.ID" />
+    <AddControl ref="control" :Arr="Arr" />
     <!-- 鎺у埗鐨勫脊妗� -->
-    <AddIssue ref="control" :taskData="taskData" :Order="taskData.Order" @getSetProductNumber="getTaskInfo" />
+    <AddIssue ref="control" :Arr="Arr" :taskData="taskData" :Order="taskData.Order" @getSetProductNumber="getTaskInfo" />
   </div>
 </template>
 
@@ -528,6 +530,7 @@
       showCountDown:false,
       countDownHour:0,
       countDownMinute:0,
+      Arr:[],
     };
   },
   mounted() {
@@ -545,6 +548,7 @@
     this.getTaskInfo();
   },
   methods: {
+    
     reloadPage() {
       // window.location.reload();
       this.getTaskInfo();
@@ -654,6 +658,7 @@
       };
       getTaskInfo().then((res) => {
         if (res.code == 200) {
+          this.procedureList=[]
           this.taskData = res.data
             ? res.data
             : {
@@ -686,6 +691,7 @@
                   number: res.data.Number,
                   name: "宸ヨ壓",
                 });
+                this.Arr=res.data.Params?res.data.Params:[];
               }
             });
             this.getProgressInfo();
@@ -723,7 +729,13 @@
       if (Object.keys(this.taskData).length > 0 && this.taskData.Procedure.ID) {
         this.$refs.control.islook = true;
       } else {
-        this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�");
+        this.$confirm( "褰撳墠璁惧娌℃湁宸ュ簭!", "鎻愮ず", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning",
+        })
+          .then(() => {})
+          .catch(() => {});
       }
     },
     // 鍙充晶瀹屾垚
@@ -737,7 +749,13 @@
           }
         });
       } else {
-        this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�");
+        this.$confirm( "褰撳墠璁惧娌℃湁宸ュ簭!", "鎻愮ず", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning",
+        })
+          .then(() => {})
+          .catch(() => {});
       }
     },
     getRandomNumber(min, max) {
@@ -826,11 +844,7 @@
   font-size: 30px;
   font-weight: 700;
 }
-.el-button--primary {
-  border: 0;
-  font-weight: 700 !important;
-  font-size: 16px !important;
-}
+
 .color_4efefa {
   color: #4efefa;
 }
@@ -1257,7 +1271,8 @@
     }
     .right_dutyLst {
       width: calc(100% - 20px);
-      height: 270px;
+      // height: 270px;
+      height: 310px;
       border-radius: 4px;
       line-height: 30px;
       overflow: hidden;
@@ -1342,4 +1357,9 @@
     }
   }
 }
+.el-button--primary {
+  border: 0;
+  font-weight: 700 !important;
+  font-size: 16px;
+}
 </style>

--
Gitblit v1.8.0