Rmengdi hace 3 meses
padre
commit
715c18f1fb
Se han modificado 2 ficheros con 19 adiciones y 11 borrados
  1. 2 2
      src/views/als/faultDiagnosis/index.vue
  2. 17 9
      src/views/als/lifePrediction/index.vue

+ 2 - 2
src/views/als/faultDiagnosis/index.vue

@@ -429,7 +429,7 @@ export default {
     },
 
     checkRelustShow(row) {
-      this.resultShowData = row.resultContent
+      this.resultShowData = JSON.parse(row.resultContent)
       this.resultShowVisible = true
     },
 
@@ -455,7 +455,7 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-          this.resultShowData = res.data
+          this.resultShowData = JSON.parse(res.data)
           this.resultShowVisible = true
           // this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
           //   confirmButtonText: '确定'

+ 17 - 9
src/views/als/lifePrediction/index.vue

@@ -54,12 +54,8 @@
       <el-dialog title="执行进度" :visible.sync="progressVisible" width="800px" :before-close="handleClose">
         <el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
       </el-dialog>
-      <el-dialog title="结果展示" :visible.sync="resultVisible" width="50%">
-        <el-image style="width: 500px" :src="resultUrl" :preview-src-list="[resultUrl]"></el-image>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="resultVisible = false">取 消</el-button>
-          <el-button type="primary" @click="resultVisible = false">确 定</el-button>
-        </span>
+      <el-dialog title="结果展示" :visible.sync="resultVisible" width="50%" :before-close="resultShowDialogClose">
+        <el-image style="width: 500px" :src="resultShowData.ossId" :preview-src-list="[resultShowData.ossId]"></el-image>
       </el-dialog>
     </div>
   </div>
@@ -246,7 +242,10 @@ export default {
         aircraftId: [{ required: true, message: '编目不能为空', trigger: 'change' }],
         partId: [{ required: true, message: '部件不能为空', trigger: 'change' }]
       },
-      resultUrl: ''
+      resultUrl: '',
+      resultShowData: {
+        ossId: ''
+      }
     }
   },
   watch: {
@@ -398,16 +397,23 @@ export default {
         ossIds: []
       }
     },
+
+    resultShowDialogClose() {
+      this.resultVisible = true
+      this.resultShowData = {
+        ossId: ''
+      }
+    },
+
     checkResult(row) {
       // this.form = deepClone(row)
-      this.resultUrl = row.resultContent
+      this.resultShowData = JSON.parse(row.resultContent)
       this.resultVisible = true
     },
     async beginExecute() {
       this.sortieNoCheckItems.forEach((item) => {
         this.form.ossIds.push(item.ossId)
       })
-      console.log('333', this.form)
       if (this.sortieNoCheckItems.length == 0) {
         this.$message({
           type: 'success',
@@ -437,6 +443,8 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
+          this.resultShowData = JSON.parse(res.data)
+          this.resultVisible = true
           this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {