Kaynağa Gözat

合并后更改

Rmengdi 7 ay önce
ebeveyn
işleme
97fe9a19e8

+ 2 - 0
src/main.js

@@ -11,6 +11,7 @@ import 'element-ui/lib/theme-chalk/index.css'
 import '@/assets/font/iconfont.css'
 import './pemission'
 import { resolveBlob } from '@/utils'
+import * as $enumData from '@/views/als/utils/enum-data'
 
 // 全局设置消息框 点击屏幕外部不能关闭
 ElementUI.MessageBox.setDefaults({ closeOnClickModal: false })
@@ -47,6 +48,7 @@ Vue.prototype.resetForm = resetForm
 Vue.prototype.popupduration = popupduration
 Vue.use(ElementUI)
 Vue.use(dataV)
+Vue.use($enumData)
 
 new Vue({
   router,

+ 2 - 0
src/views/als/MDCData/index.vue

@@ -83,6 +83,8 @@ import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sid
 import { getAircaftModelAll, getAircaftCatalogAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
 import { getItem } from '@/utils/index'
+import FileUpload from '@/views/als/components/FileUpload'
+
 // import ImportExcel from '@/api/als/ImportExcel/index.vue'
 export default {
   name: 'MDCData',

+ 9 - 1
src/views/als/falseAlarm/index.vue

@@ -89,6 +89,7 @@ import { getDataImport } from '@/api/als/dataImport'
 import { getModel } from '@/api/als/model'
 import { deepClone, debounce } from '@/utils/index'
 import { getWarning } from '@/api/als/warning'
+
 export default {
   name: 'FalseAlarm',
   components: {},
@@ -468,7 +469,7 @@ export default {
       this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
     },
 
-    async openDialog() {
+    openDialog() {
       this.executeForm.aircraftId = this.currentNodeKey
       if (this.executeForm.aircraftId !== '') {
         this.changeAircraftId(this.executeForm.aircraftId)
@@ -508,6 +509,13 @@ export default {
       this.executeForm.columnData = data
     },
     checkResultList(row) {
+      if (row.status === '0') {
+        this.$message({
+          type: 'warning',
+          message: '执行失败,无法查看结果!'
+        })
+        return
+      }
       this.getFalseAlarmResultAPI({ falseAlarmId: row.id })
       this.resultVisible = true
     },

+ 2 - 0
src/views/als/faultCase/index.vue

@@ -112,6 +112,8 @@ import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sid
 import { getAircaftModelAll, getAircaftCatalogAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
 import { getListByIdsApi } from '@/api/als/oss'
+import FileUpload from '@/views/als/components/FileUpload'
+
 export default {
   name: 'FaultCase',
   components: {},

+ 2 - 0
src/views/als/flightData/index.vue

@@ -66,6 +66,8 @@ import { getDataImport, addDataImport, updateDataImport, removeDataImport } from
 import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
 import { getAircaftModelAll, getAircaftCatalogAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
+import FileUpload from '@/views/als/components/FileUpload'
+
 export default {
   name: 'DataImport',
   components: {},

+ 2 - 9
src/views/als/model/index.vue

@@ -35,7 +35,7 @@
           <el-form-item label="数据列" prop="columnData">
             <el-input type="textarea" :rows="3" v-model="form.columnData" placeholder="请输入数据列" />
           </el-form-item>
-          <el-form-item label="状态" prop="status">
+          <el-form-item v-if="dialogTitle === '编辑'" label="状态" prop="status">
             <el-switch v-model="form.status" active-color="#13ce66" active-value="1" inactive-value="0"> </el-switch>
           </el-form-item>
           <el-form-item label="备注" prop="remark">
@@ -55,6 +55,7 @@
 <script>
 import { getModel, addModel, updateModel, removeModel } from '@/api/als/model'
 import { deepClone, debounce } from '@/utils/index'
+import { agloModelList } from '@/views/als/utils/enum-data'
 export default {
   name: 'Model',
   components: {},
@@ -172,14 +173,6 @@ export default {
         updateTime: ''
       },
       debounceFn: debounce(this.fetch, 500)
-      // algoTypeList: [
-      //   { key: '1', name: '去噪' },
-      //   { key: '2', name: '扩充' },
-      //   { key: '3', name: '补全' },
-      //   { key: '4', name: '虚警抑制' },
-      //   { key: '5', name: '故障诊断' },
-      //   { key: '6', name: '寿命预测' }
-      // ]
     }
   },
   watch: {

+ 29 - 3
src/views/als/preProcessing/index.vue

@@ -138,7 +138,15 @@ export default {
         },
         {
           prop: 'modelType',
-          label: '模型类型'
+          label: '模型类型',
+          render: (h, params) => {
+            const matchedItem = this.$enumData.agloModelList.find((item) => params.row.modelType === item.key)
+            if (matchedItem) {
+              return h('span', matchedItem.name)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'param',
@@ -158,7 +166,14 @@ export default {
         },
         {
           prop: 'status',
-          label: '状态'
+          label: '状态',
+          render: (h, params) => {
+            if (params.row.status == 0) {
+              return h('span', { class: 'warning-state' }, '失败')
+            } else {
+              return h('span', { class: 'success-state' }, '成功')
+            }
+          }
         },
         {
           button: true,
@@ -461,7 +476,14 @@ export default {
     },
 
     checkResultList(row) {
-      this.form = deepClone(row)
+      if (row.status === '0') {
+        this.$message({
+          type: 'warning',
+          message: '执行失败,无法查看结果!'
+        })
+        return
+      }
+      // this.getPreProcessingAPI({ falseAlarmId: row.id })
       this.resultVisible = true
     },
     executeAglo(row) {
@@ -516,6 +538,7 @@ export default {
     async sortieNoSelection(val) {
       this.executeForm.ossId = val.ossId
       this.executeForm.sortieNo = val.sortieNo
+
       if (val.ossId) {
         const res = await getColumnDataAPI(val.ossId)
         if (res.code === 200) {
@@ -526,6 +549,9 @@ export default {
               label: item
             })
           })
+          if (this.executeForm.modelId) {
+            this.changeModelId(this.executeForm.modelId)
+          }
         }
       }
     },

+ 2 - 0
src/views/als/trainingData/index.vue

@@ -60,6 +60,8 @@ import { getTechnicalDoc, addTechnicalDoc, updateTechnicalDoc, removeTechnicalDo
 import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
 import { getAircaftModelAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
+import FileUpload from '@/views/als/components/FileUpload'
+
 export default {
   name: 'TrainingData',
   components: {},