瀏覽代碼

数据回放

Rmengdi 1 年之前
父節點
當前提交
1387fea27c

+ 1 - 1
PHM-web/src/views/manage/faultDiagnosis/index.vue

@@ -437,8 +437,8 @@ export default {
               if(response.code===200){
                 this.falseAlarmResultList = JSON.parse(response.data)
                 this.$message.success("执行成功")
-                this.percentageVal=50
                 this.dialogProgress = false
+                this.percentageVal=50
                 this.dialogResult = true
                 this.title = '虚警抑制结果'
                 // 选择模型页面数据清空

+ 18 - 28
PHM-web/src/views/manage/faultPrediction/index.vue

@@ -136,7 +136,7 @@ import {
   modelListAll,
 } from '@/api/manage/data'
 export default {
-  name: 'faultDiagnosis',
+  name: 'faultPrediction',
   components: {},
   dicts: ['data_type'],
   data() {
@@ -215,20 +215,11 @@ export default {
       selectSortieParams: [],
       modelId: null,
       batchNo: '',
-      // 虚警抑制结果的按钮
-      FABtnText:'下一步',
-      showFlag:''
+      showFlag:'',
+      faultPredictionResult:[]
     }
   },
   watch: {
-    checkList: {
-      handler(newValue, oldValue) {
-        if (newValue.length===0) {
-          this.FABtnText = '完成'
-        }
-      },
-      deep: true,
-    }
   },
   created() {
     this.getList()
@@ -326,7 +317,7 @@ export default {
       } else {
         this.dialogResult = false
         this.checkList = this.checkList.map(str => parseInt(str, 10));
-        this.faultPredictionBegin()
+        // this.faultPredictionBegin()
       }
     },
     modelSelectHandel(val) {
@@ -358,26 +349,25 @@ export default {
         modelId: this.modelId,
         sortieNo: this.form.sortieNumber,
         batchNo: this.batchNo,
-        // dataType: this.radio,
         dataType: this.checkList[0],
         dataId: this.selectSortieId,
         dataParams: this.selectSortieParams,
       }
       console.log('data', data)
-      if (!this.timer) {
-        this.timer = setInterval(() => {
-          this.percentageVal += 1
-          if (this.percentageVal == 100) {
-            this.percentageVal=50
-            clearInterval(this.timer)
-            this.timer = null
-            this.dialogProgress = false
-            this.dialogResult = true
-            this.title = '故障预测结果'
-            this.selectModelVal===''
-          }
-        }, 50)
-      }
+      beginModel(data).then(response => {
+        if(response.code===200){
+          console.log("response",response);
+          this.faultPredictionResult = JSON.parse(response.data)
+          
+          this.$message.success("执行成功")
+          this.dialogProgress = false
+          this.dialogResult = true
+          this.title = '故障预测结果'
+          this.selectModelVal===''
+        }else{
+          this.$message.error(response.msg)
+        }
+      })
     },
     // 上报
     reportHandel(){

File diff suppressed because it is too large
+ 20 - 36
PHM-web/src/views/manage/sortie/dataPlayBack.vue


+ 12 - 9
PHM-web/src/views/manage/sortie/selectParameters.vue

@@ -21,9 +21,10 @@
       :visible.sync="dialogVisible"
       :fullscreen="true"
       class="thisDialog"
+      @close="closeDataPlay"
       >
-      <!-- <dataPlayBack ref="playback" @closeDialog="closeDialog" :parameterData="parameterData"/> -->
-      <dataPlayBack @closeDialog="closeDialog"/>
+      <dataPlayBack ref="playback" @closeDialog="closeDialog" v-if="paramsChange" :parameterData="parameterData"/>
+      <!-- <dataPlayBack @closeDialog="closeDialog"/> -->
     </el-dialog>
   </div>
 </template>
@@ -52,7 +53,8 @@ export default {
       sortieNumber:null,
       parameterList:[],
       parameterData:[],
-      selectData:[]
+      selectData:[],
+      paramsChange:false
     };
   },
   mounted(){
@@ -91,13 +93,9 @@ export default {
         parameters:this.selectData
       }
       getSortieDataByName(data).then(response => {
-        // this.sortieList = response.rows
-        const data=JSON.parse(response.data)
-        const header = Object.keys(data[0]); // 获取键名作为标题
-        let dataRows=[] 
-        data.forEach(item => dataRows.push(Object.values(item))); // 获取键值数组
-        this.parameterData = [header, ...dataRows];
+        this.parameterData=JSON.parse(response.data)
         console.log("this.parameterData",this.parameterData);
+        this.paramsChange = true
         this.total = response.total
         this.loading = false
       })
@@ -111,7 +109,12 @@ export default {
     // 关闭弹框
     closeDialog(){
       this.dialogVisible=false
+      this.closeDataPlay()
     },
+    closeDataPlay(){
+      this.parameterData=[]
+      this.paramsChange=false
+    }
   }
 }
 </script>

Some files were not shown because too many files changed in this diff