Prechádzať zdrojové kódy

虚警抑制判读结果修改

Rmengdi 3 mesiacov pred
rodič
commit
4ad547eb01

+ 5 - 0
src/api/als/falseAlarmResult.js

@@ -5,6 +5,11 @@ export const getWarningResult = async (data) => {
   return await get('/als/warningResult/list', data)
 }
 
+// 修改虚警抑制结果
+export const updateWarningResult = async (data) => {
+  return await put('/als/warningResult', data)
+}
+
 // 新增虚警抑制结果
 export const addFalseAlarmResult = async (data) => {
   return await post('/als/falseAlarmResult', data)

+ 16 - 8
src/views/als/falseAlarm/index.vue

@@ -60,7 +60,7 @@ import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import PlayBackChart from '@/views/als/components/Charts/playBackChart.vue'
 import { deepClone, debounce } from '@/utils/index'
 import { executeFalseAlarm, getOssIdDataAPI } from '@/api/als/algorithm'
-import { getWarningResult } from '@/api/als/falseAlarmResult'
+import { getWarningResult, updateWarningResult } from '@/api/als/falseAlarmResult'
 
 export default {
   name: 'FalseAlarm',
@@ -259,6 +259,10 @@ export default {
         dataStatus: '',
         flightDate: ''
       },
+      warningForm: {
+        id: null,
+        resultContent: ''
+      },
       isFalseAlarm: '0',
       currentSortieNo: '',
       percentage: 0
@@ -371,24 +375,28 @@ export default {
         yAxisData: [],
         seriesData: []
       }
+      this.warningForm = {
+        id: null,
+        resultContent: ''
+      }
       this.isFalseAlarm = false
     },
 
     submit() {
-      this.form.dataStatus = this.isFalseAlarm
-      this.updateWarningAPI()
+      this.warningForm.resultContent = this.isFalseAlarm
+      this.updateWarningResultAPI()
     },
 
-    async updateWarningAPI() {
+    async updateWarningResultAPI() {
       try {
-        const { code } = await updateWarning({ ...this.form })
+        const { code } = await updateWarningResult({ ...this.warningForm })
         if (code === 200) {
           this.$message({
             type: 'success',
             message: '操作成功!'
           })
           this.innerDialogClose()
-          this.getWarningAPI({ sortieNo: this.currentSortieNo })
+          this.getWarningResultAPI({ sortieNo: this.currentSortieNo })
         }
       } catch (error) {}
     },
@@ -426,8 +434,8 @@ export default {
     },
 
     async checkCurve(row) {
-      this.isFalseAlarm = row.dataStatus
-      this.form = deepClone(row)
+      this.isFalseAlarm = row.resultContent
+      this.warningForm = deepClone(row)
       try {
         const { code, data } = await getCurveData(row.code, row.sortieNo)
         if (code === 200) {