From 72eaa4ad5daf6184a5fa989df09caeb607eac80e Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期六, 02 十一月 2024 12:47:29 +0800
Subject: [PATCH] 禁止一键排版

---
 web/src/views/modules/taskReliability/SimulatAssess.vue |   46 ++++++++++++++++++++++++++++------------------
 1 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/web/src/views/modules/taskReliability/SimulatAssess.vue b/web/src/views/modules/taskReliability/SimulatAssess.vue
index 915cb2e..0f58eec 100644
--- a/web/src/views/modules/taskReliability/SimulatAssess.vue
+++ b/web/src/views/modules/taskReliability/SimulatAssess.vue
@@ -23,6 +23,7 @@
         </el-form-item>
         <zt-form-item style="margin-left: 20px">
           <zt-button @click="analyze()">浠跨湡鍒嗘瀽</zt-button>
+          <zt-button @click="displayProcess()">鏌ョ湅绠楁硶搴撹繘绋�</zt-button>
         </zt-form-item>
       </el-form>
       <el-progress v-if="isShow" :percentage="percentage"></el-progress>
@@ -55,18 +56,20 @@
         <el-button type="primary" @click="dialogVisible = false">鍏� 闂�</el-button>
       </div>
     </el-dialog>
+    <Process ref="process"></Process>
   </div>
 </template>
 
 <script>
   import SimulatCurve from "./SimulatCurve";
   import ProductModelTree from "../basicInfo/ProductModelTree";
+  import Process from "./Process";
 
 
   export default {
     data() {
       return {
-        timers: '',
+        timers: null,
         isSelect: false,
         isShow: false,
         percentage: 0,
@@ -94,15 +97,16 @@
       this.getProductList()
     },
     watch: {
-      percentage() {
-        if (this.percentage === 100) {
-          this.$refs.SimulatCurve.initEcharts(this.dataForm);
-        }
-      }
+      // percentage() {
+      //   if (this.percentage === 100) {
+      //     this.$refs.SimulatCurve.initEcharts(this.dataForm);
+      //   }
+      // }
     },
     components: {
       ProductModelTree,
       SimulatCurve,
+      Process,
     },
 
     methods: {
@@ -141,18 +145,20 @@
         console.log(res.data)
         this.taskList = res.data
       },
-      getStroke() {
-        if (this.percentage < 100) {
-          let param = {
-            taskList: [this.dataForm.id]
-          }
-          this.$http.get(`/taskReliability/SimulatAssess/getCalcProgress`, {params: param}).then(
-            res => {
-              if (res.data) {
-                this.percentage = parseFloat(res.data)
-              }
+      async getStroke() {
+        let param = {
+          taskList: [this.dataForm.id]
+        }
+        let res = await this.$http.get(`/taskReliability/SimulatAssess/getCalcProgress`, {params: param})
+        if (res.success) {
+          if (res.data) {
+            this.percentage = parseFloat(res.data)
+            if (this.percentage >= 100) {
+              clearInterval(this.timers)
+              this.percentage = 0
+              this.$refs.SimulatCurve.initEcharts(this.dataForm);
             }
-          )
+          }
         } else {
           clearInterval(this.timers)
           this.percentage = 0
@@ -164,9 +170,10 @@
         this.isShow = true
         let result = await this.$http.get(`/basicInfo/TyProductModel/getUuid`)
         this.dataForm.id = result.data
+        this.percentage = 0
         let res = await this.$http.post('/taskReliability/SimulatAssess/analyze', this.dataForm)
         if (res.success) {
-          console.log(res.data)
+          console.log(res.data, 'res.data')
           if (res.data && res.data.length > 0) {
             this.modelCheckResult = res.data
             this.dialogVisible = true
@@ -174,6 +181,9 @@
             this.timers = window.setInterval(this.getStroke, 1000)
           }
         }
+      },
+      displayProcess() {
+        this.$refs.process.$refs.dialog.init()
       }
     }
   }

--
Gitblit v1.9.1