Browse Source

智能故障诊断诊断结果

Rmengdi 3 months ago
parent
commit
4b79f28ab9
1 changed files with 43 additions and 9 deletions
  1. 43 9
      src/views/als/faultDiagnosis/index.vue

+ 43 - 9
src/views/als/faultDiagnosis/index.vue

@@ -43,6 +43,10 @@
       <el-dialog title="执行进度" :visible.sync="progressVisible" width="800px">
         <el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
       </el-dialog>
+      <el-dialog title="结果展示" :visible.sync="resultShowVisible" :before-close="resultShowDialogClose" width="800px">
+        <div style="margin: 10px 0px">{{ resultShowData.result }}</div>
+        <el-image style="width: 500px" :src="resultShowData.ossId" :preview-src-list="[resultShowData.ossId]"></el-image>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -69,6 +73,7 @@ export default {
       dialogVisible: false,
       resultVisible: false,
       progressVisible: false,
+      resultShowVisible: false,
       keyWordData: '',
       aircaftModelIdList: [],
       currentNodeKey: '',
@@ -135,7 +140,7 @@ export default {
               }
             },
             {
-              name: '查看结果',
+              name: '查看',
               type: 'text',
               round: false,
               plain: false,
@@ -204,8 +209,20 @@ export default {
           }
         },
         {
-          prop: 'resultContent',
-          label: '结果'
+          button: true,
+          label: '操作',
+          width: '240px',
+          group: [
+            {
+              name: '查看结果',
+              type: 'text',
+              round: false,
+              plain: false,
+              onClick: (row, index, scope) => {
+                this.checkRelustShow(row)
+              }
+            }
+          ]
         }
       ],
       resultOptions: {
@@ -239,7 +256,11 @@ export default {
       currentSortieNo: '',
       partsData: [],
       allAirConfig: [],
-      percentage: 0
+      percentage: 0,
+      resultShowData: {
+        ossId: '',
+        result: ''
+      }
     }
   },
   watch: {
@@ -385,6 +406,14 @@ export default {
       }
     },
 
+    resultShowDialogClose() {
+      this.resultShowVisible = true
+      this.resultShowData = {
+        ossId: '',
+        result: ''
+      }
+    },
+
     submit() {
       this.beginExecute()
     },
@@ -399,6 +428,11 @@ export default {
       this.resultVisible = true
     },
 
+    checkRelustShow(row) {
+      this.resultShowData = row.resultContent
+      this.resultShowVisible = true
+    },
+
     async beginExecute() {
       this.progressVisible = true
 
@@ -421,11 +455,11 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-
-          const result = res.data
-          this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
-            confirmButtonText: '确定'
-          })
+          this.resultShowData = res.data
+          this.resultShowVisible = true
+          // this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
+          //   confirmButtonText: '确定'
+          // })
           this.getFaultDiagnosisAPI({ sortieNo: this.currentSortieNo })
           this.handleClose()
         }