Selaa lähdekoodia

修改菜单、质量管理模块

Rmengdi 7 kuukautta sitten
vanhempi
sitoutus
37774eb095

+ 15 - 6
src/router/modules/als/agloManage.js

@@ -1,21 +1,30 @@
 import Layout from '@/layout/index.vue'
 
 export const agloManage = {
-  path: '/agloManage',
-  redirect: '/agloManage',
-  name: 'model',
+  // path: '/agloManage',
+  // redirect: '/agloManage',
+  // name: 'model',
+  // component: Layout,
+  // meta: {
+  //   title: '算法模型管理',
+  //   icon: 'el-icon-s-platform'
+  // },
+  path: '/basicData',
+  redirect: '/basicData/dataSpecies',
   component: Layout,
+  name: 'DataSpecies',
   meta: {
-    title: '算法模型管理',
+    title: '基础数据',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/agloManage',
+      path: '/basicData/agloManage',
       component: () => import('@/views/als/model/index.vue'),
       meta: {
         title: '算法模型管理'
-      }
+      },
+      sort: 9
     }
   ]
 }

+ 84 - 142
src/router/modules/als/dataManage.js

@@ -1,123 +1,85 @@
 import Layout from '@/layout/index.vue'
 
 export const flightData = {
-  path: '/dataManage',
-  redirect: '/dataManage/flightData',
+  path: '/dataImport',
+  redirect: '/dataImport/flightData',
   name: 'FlightManage',
   component: Layout,
   meta: {
-    title: '业务数据管理',
+    title: '数据导入',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/flightData',
+      path: '/dataImport/flightData',
       component: () => import('@/views/als/flightData/index.vue'),
       meta: {
-        title: '飞参数据',
-        sort: 1
-      }
+        title: '飞参数据'
+      },
+      sort: 1
     }
   ]
 }
 export const MDCData = {
-  path: '/dataManage',
-  redirect: '/dataManage/MDCData',
+  path: '/dataImport',
+  redirect: '/dataImport/MDCData',
   name: 'MDCData',
   component: Layout,
   meta: {
-    title: '业务数据管理',
+    title: '数据导入',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/MDCData',
+      path: '/dataImport/MDCData',
       component: () => import('@/views/als/MDCData/index.vue'),
       meta: {
-        title: 'MDC数据',
-        sort: 2
-      }
+        title: 'MDC数据'
+      },
+      sort: 2
+    }
+  ]
+}
+export const warning = {
+  path: '/dataImport',
+  redirect: '/dataImport/warning',
+  name: 'warning',
+  component: Layout,
+  meta: {
+    title: '数据导入',
+    icon: 'el-icon-s-platform'
+  },
+  children: [
+    {
+      path: '/dataImport/warning',
+      component: () => import('@/views/als/warning/index.vue'),
+      meta: {
+        title: '警告列表'
+      },
+      sort: 3
     }
   ]
 }
-// export const trainingData = {
-//   path: '/dataManage',
-//   redirect: '/dataManage/trainingData',
-//   name: 'TrainingData',
-//   component: Layout,
-//   meta: {
-//     title: '业务数据管理',
-//     icon: 'el-icon-s-platform'
-//   },
-//   children: [
-//     {
-//       path: '/dataManage/trainingData',
-//       component: () => import('@/views/als/trainingData/index.vue'),
-//       meta: {
-//         title: '作训数据',
-//         sort: 3
-//       }
-//     }
-//   ]
-// }
-// export const maintainRecord = {
-//   path: '/dataManage',
-//   redirect: '/dataManage/maintainRecord',
-//   name: 'MaintainRecord',
-//   component: Layout,
-//   meta: {
-//     title: '业务数据管理',
-//     icon: 'el-icon-s-platform'
-//   },
-//   children: [
-//     {
-//       path: '/dataManage/maintainRecord',
-//       component: () => import('@/views/als/maintainRecord/index.vue'),
-//       meta: {
-//         title: '维护记录'
-//       }
-//     }
-//   ]
-// }
-// export const maintenanceRecord = {
-//   path: '/dataManage',
-//   redirect: '/dataManage/maintenanceRecord',
-//   name: 'MaintenanceRecord',
-//   component: Layout,
-//   meta: {
-//     title: '业务数据管理',
-//     icon: 'el-icon-s-platform'
-//   },
-//   children: [
-//     {
-//       path: '/dataManage/maintenanceRecord',
-//       component: () => import('@/views/als/maintenanceRecord/index.vue'),
-//       meta: {
-//         title: '维修记录'
-//       }
-//     }
-//   ]
-// }
 export const smTask = {
-  path: '/dataManage',
-  redirect: '/dataManage/smTask',
-  name: 'SmTask',
+  path: '/task',
+  redirect: '/task/carrierFlightMission',
   component: Layout,
+  name: 'CarrierFlightMission',
   meta: {
-    title: '业务数据管理',
+    title: '任务管理',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/smTask',
+      path: '/task/smTask',
       component: () => import('@/views/als/smTask/index.vue'),
       meta: {
-        title: '定检任务',
-        sort: 4
-      }
+        title: '定检任务管理'
+      },
+      sort: 2
     },
     {
-      path: '/dataManage/smTask/SMTaskDetails',
+      path: '/task/smTask/SMTaskDetails',
       component: () => import('@/views/als/smTask/SMTaskDetails.vue'),
       name: 'SMTaskDetails',
       meta: {
@@ -128,25 +90,25 @@ export const smTask = {
   ]
 }
 export const maintenanceask = {
-  path: '/dataManage',
-  redirect: '/dataManage/maintenanceask',
-  name: 'MaintenanceRecord',
+  path: '/task',
+  redirect: '/task/carrierFlightMission',
   component: Layout,
+  name: 'CarrierFlightMission',
   meta: {
-    title: '业务数据管理',
+    title: '任务管理',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/maintenanceask',
+      path: '/task/maintenanceask',
       component: () => import('@/views/als/maintenanceask/index.vue'),
       meta: {
-        title: '维修任务',
-        sort: 5
-      }
+        title: '维修任务管理'
+      },
+      sort: 3
     },
     {
-      path: '/dataManage/maintenanceask/viewDetails',
+      path: '/task/maintenanceask/viewDetails',
       component: () => import('@/views/als/maintenanceask/viewDetails.vue'),
       name: 'ViewDetails',
       meta: {
@@ -158,103 +120,83 @@ export const maintenanceask = {
 }
 
 export const partReplacement = {
-  path: '/dataManage',
-  redirect: '/dataManage/partReplacement',
-  name: 'PartReplacement',
+  path: '/task',
+  redirect: '/task/carrierFlightMission',
   component: Layout,
+  name: 'CarrierFlightMission',
   meta: {
-    title: '业务数据管理',
+    title: '任务管理',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/partReplacement',
+      path: '/task/partReplacement',
       component: () => import('@/views/als/partReplacement/index.vue'),
       meta: {
-        title: '换件记录',
-        sort: 6
-      }
+        title: '换件记录管理'
+      },
+      sort: 4
     }
   ]
 }
 
 export const airConfiguration = {
-  path: '/dataManage',
-  redirect: '/dataManage/airConfiguration',
-  name: 'AirConfiguration',
+  path: '/basicData',
+  redirect: '/basicData/dataSpecies',
   component: Layout,
+  name: 'DataSpecies',
   meta: {
-    title: '业务数据管理',
+    title: '基础数据',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/airConfiguration',
+      path: '/basicData/airConfiguration',
       component: () => import('@/views/als/airConfiguration/index.vue'),
       meta: {
-        title: '构型管理',
-        sort: 7
-      }
+        title: '构型管理'
+      },
+      sort: 10
     }
   ]
 }
 export const faultCase = {
-  path: '/dataManage',
-  redirect: '/dataManage/faultCase',
-  name: 'FaultCase',
+  path: '/basicData',
+  redirect: '/basicData/dataSpecies',
   component: Layout,
+  name: 'DataSpecies',
   meta: {
-    title: '业务数据管理',
+    title: '基础数据',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/faultCase',
+      path: '/basicData/faultCase',
       component: () => import('@/views/als/faultCase/index.vue'),
       meta: {
-        title: '故障案例',
-        sort: 8
-      }
+        title: '故障案例'
+      },
+      sort: 12
     }
   ]
 }
 export const airInstall = {
-  path: '/dataManage',
-  redirect: '/dataManage/airInstall',
-  name: 'AirInstall',
+  path: '/basicData',
+  redirect: '/basicData/dataSpecies',
   component: Layout,
+  name: 'DataSpecies',
   meta: {
-    title: '业务数据管理',
+    title: '基础数据',
     icon: 'el-icon-s-platform'
   },
   children: [
     {
-      path: '/dataManage/airInstall',
+      path: '/basicData/airInstall',
       component: () => import('@/views/als/airInstall/index.vue'),
       meta: {
-        title: '装机管理',
-        sort: 9
-      }
-    }
-  ]
-}
-export const warning = {
-  path: '/dataManage',
-  redirect: '/dataManage/warning',
-  name: 'warning',
-  component: Layout,
-  meta: {
-    title: '业务数据管理',
-    icon: 'el-icon-s-platform'
-  },
-  children: [
-    {
-      path: '/dataManage/warning',
-      component: () => import('@/views/als/warning/index.vue'),
-      meta: {
-        title: '警告列表',
-        sort: 10
-      }
+        title: '装机管理'
+      },
+      sort: 11
     }
   ]
 }

+ 10 - 5
src/router/modules/als/qualityManage.js

@@ -15,7 +15,8 @@ export const preProcessing = {
       component: () => import('@/views/als/preProcessing/index.vue'),
       meta: {
         title: '数据预处理'
-      }
+      },
+      sort: 1
     },
     {
       path: '/qualityManage/preProcessing/preResult',
@@ -43,7 +44,8 @@ export const falseAlarm = {
       component: () => import('@/views/als/falseAlarm/index.vue'),
       meta: {
         title: '虚警抑制'
-      }
+      },
+      sort: 2
     }
   ]
 }
@@ -62,7 +64,8 @@ export const lifePrediction = {
       component: () => import('@/views/als/lifePrediction/index.vue'),
       meta: {
         title: '寿命预测'
-      }
+      },
+      sort: 3
     }
   ]
 }
@@ -81,7 +84,8 @@ export const faultDiagnosis = {
       component: () => import('@/views/als/faultDiagnosis/index.vue'),
       meta: {
         title: '故障诊断'
-      }
+      },
+      sort: 4
     }
   ]
 }
@@ -100,7 +104,8 @@ export const maintenanceDecision = {
       component: () => import('@/views/als/maintenanceDecision/index.vue'),
       meta: {
         title: '维修决策'
-      }
+      },
+      sort: 5
     }
   ]
 }

+ 45 - 27
src/views/als/airInstall/index.vue

@@ -58,6 +58,9 @@
               <el-option label="否" :value="0"></el-option>
             </el-select>
           </el-form-item>
+          <el-form-item label="额定寿命(s)" label-width="90px" prop="ratedLife">
+            <el-input-number label="额定寿命(s)" v-model="form.ratedLife" :precision="1" :step="0.5" :min="0"></el-input-number>
+          </el-form-item>
           <el-form-item label="航材代码" prop="devicesCode">
             <el-input v-model="form.devicesCode" placeholder="请输入航材代码" />
           </el-form-item>
@@ -175,9 +178,9 @@ export default {
           label: '是否可修',
           render: (h, params) => {
             if (params.row.repairable == 1) {
-              return h('span', '是')
+              return h('span', { class: 'success-state' }, '是')
             } else {
-              return h('span', '否')
+              return h('span', { class: 'warning-state' }, '否')
             }
           }
         },
@@ -186,9 +189,9 @@ export default {
           label: '是否成套',
           render: (h, params) => {
             if (params.row.completeSet == 1) {
-              return h('span', '是')
+              return h('span', { class: 'success-state' }, '是')
             } else {
-              return h('span', '否')
+              return h('span', { class: 'warning-state' }, '否')
             }
           }
         },
@@ -197,12 +200,16 @@ export default {
           label: '是否有寿',
           render: (h, params) => {
             if (params.row.serviceLife == 1) {
-              return h('span', '是')
+              return h('span', { class: 'success-state' }, '是')
             } else {
-              return h('span', '否')
+              return h('span', { class: 'warning-state' }, '否')
             }
           }
         },
+        {
+          prop: 'ratedLife',
+          label: '额定寿命(s)'
+        },
         {
           button: true,
           label: '操作',
@@ -358,17 +365,13 @@ export default {
         repairable: '',
         completeSet: '',
         serviceLife: '',
-        remarks: '',
-        tenantId: '',
-        delFlag: '',
-        version: '',
-        createdBy: '',
-        createdTime: '',
-        updatedBy: '',
-        updatedTime: ''
+        ratedLife: '',
+        remarks: ''
       },
       debounceFn: debounce(this.fetch, 500),
-      currentAirModelId: ''
+      currentAirId: '',
+      currentAirModelId: '',
+      configNodeIdList: []
     }
   },
   watch: {
@@ -432,6 +435,21 @@ export default {
       return newArr
     },
 
+    getAllTreeData(list) {
+      const newArr = []
+      function getLeaf(data, arr) {
+        data.forEach((e) => {
+          if (e.children && e.children.length) {
+            getLeaf(e.children, arr)
+          } else {
+            arr.push(e)
+          }
+        })
+      }
+      getLeaf(list, newArr)
+      return newArr
+    },
+
     async getAirInstallAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { keyWord } = this
@@ -482,7 +500,8 @@ export default {
 
     async treeNodeClick(data) {
       // this.$refs.table.clearSelection()
-      this.currentAirModelId = this.form.airId = this.form.airModelId = data.id
+      this.currentAirId = this.form.airId = data.id
+      this.currentAirModelId = this.form.airModelId = data.parentId
       // this.currentNode = data
       // this.form.aircraftType = data.label
       // this.getAirInstallAPI(this.currentNodeKey)
@@ -505,6 +524,11 @@ export default {
       this.$refs.table.clearSelection()
       this.currentConfigNodeKey = this.form.configId = data.id
       this.currentConfigNode = data
+      // const dataTree = this.configTreeData
+      // console.log('dataTree', dataTree)
+      // this.configNodeIdList = String(this.getAllTreeData(dataTree[0].children.length ? dataTree[0].children : [dataTree[0]]).map((e) => e.id))
+      // console.log('this.configNodeIdList', this.configNodeIdList)
+      // this.getAirInstallAPI({ configId: this.configNodeIdList })
       this.getAirInstallAPI({ configId: this.currentConfigNodeKey })
     },
 
@@ -512,7 +536,8 @@ export default {
       this.dialogTitle = '新增'
       this.dialogVisible = true
       this.form.configId = this.currentConfigNodeKey
-      this.form.airId = this.form.airModelId = this.currentAirModelId
+      this.form.airId = this.currentAirId
+      this.form.airModelId = this.currentAirModelId
     },
 
     handleClose() {
@@ -521,7 +546,7 @@ export default {
       this.form = {
         id: '',
         airId: '', //编目id
-        airModelId: '', //机id
+        airModelId: '', //机id
         configId: '', //构型id
         devicesEncode: '',
         devicesCode: '',
@@ -535,14 +560,8 @@ export default {
         repairable: '',
         completeSet: '',
         serviceLife: '',
-        remarks: '',
-        tenantId: '',
-        delFlag: '',
-        version: '',
-        createdBy: '',
-        createdTime: '',
-        updatedBy: '',
-        updatedTime: ''
+        ratedLife: '',
+        remarks: ''
       }
     },
 
@@ -591,7 +610,6 @@ export default {
     },
 
     async changeDevicesName(avmatCatalogId) {
-      console.log('avmatCatalogId', avmatCatalogId)
       const {
         data: { list }
       } = await getAvmatCatalog({

+ 2 - 2
src/views/als/components/Charts/graph.vue

@@ -11,12 +11,12 @@ export default {
     // 图表宽度
     width: {
       type: Number,
-      default: 500
+      default: 600
     },
     // 图表高度
     height: {
       type: Number,
-      default: 200
+      default: 300
     },
     // 关系图数据
     graphData: {

+ 56 - 7
src/views/als/falseAlarm/index.vue

@@ -81,6 +81,7 @@
 
 <script>
 import { getFalseAlarm, addFalseAlarm, updateFalseAlarm, removeFalseAlarm } from '@/api/als/falseAlarm'
+import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
 import { getFalseAlarmResult } from '@/api/als/falseAlarmResult'
 import { getColumnDataAPI, executeFalseAlarm } from '@/api/als/algorithm'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
@@ -89,6 +90,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'
+import { flattenTree } from '../utils/common'
 
 export default {
   name: 'FalseAlarm',
@@ -122,7 +124,15 @@ export default {
       columns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'aircraftId',
@@ -200,11 +210,26 @@ export default {
       sortieNoColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'source',
-          label: '数据来源'
+          label: '数据来源',
+          render: (h, params) => {
+            if (params.row.source == 1) {
+              return h('span', { class: 'success-state' }, '飞参数据')
+            } else {
+              return h('span', { class: 'success-state' }, 'MDC数据')
+            }
+          }
         },
         {
           prop: 'ossId',
@@ -214,7 +239,15 @@ export default {
       resultColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'aircraftId',
@@ -338,7 +371,8 @@ export default {
       percentage: 0,
       sortieNoList: [],
       warningIdsList: [],
-      sortieNoTableCheck: []
+      sortieNoTableCheck: [],
+      allTaskExecond: []
     }
   },
   watch: {
@@ -369,6 +403,13 @@ export default {
             .toString()
           this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
         }
+        const res = await getTaskExecondRegister({
+          status: null,
+          queryParam: '',
+          taskId: '',
+          aircaftCatalogId: ''
+        })
+        this.allTaskExecond = flattenTree(res.data)
       } catch (error) {}
     },
 
@@ -522,8 +563,14 @@ export default {
       this.resultVisible = true
     },
     async beginExecute() {
+      if (this.warningIdsList.length == 0 || this.executeForm.warningIds.length == 0) {
+        this.$message({
+          type: 'warning',
+          message: '该架次未选择警告,无法进行虚警抑制!'
+        })
+        return
+      }
       this.progressVisible = true
-
       try {
         this.percentage += 1
         const res = await executeFalseAlarm(this.executeForm)
@@ -549,7 +596,9 @@ export default {
         }, 30)
       } catch (error) {
         this.progressVisible = false
-        clearInterval(myTimer)
+        if (myTimer) {
+          clearInterval(myTimer)
+        }
         this.percentage = 0
       }
     },

+ 49 - 6
src/views/als/faultDiagnosis/index.vue

@@ -81,12 +81,14 @@
 
 <script>
 import { getFaultDiagnosis, addFaultDiagnosis, updateFaultDiagnosis, removeFaultDiagnosis } from '@/api/als/faultDiagnosis'
+import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
 import { getColumnDataAPI, executeFault } from '@/api/als/algorithm'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { deepClone, debounce } from '@/utils/index'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { getDataImport } from '@/api/als/dataImport'
 import { getModel } from '@/api/als/model'
+import { flattenTree } from '../utils/common'
 
 export default {
   name: 'FaultDiagnosis',
@@ -120,7 +122,15 @@ export default {
       columns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'aircraftId',
@@ -202,7 +212,15 @@ export default {
       resultColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'aircraftId',
@@ -236,11 +254,26 @@ export default {
       sortieNoColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'source',
-          label: '数据来源'
+          label: '数据来源',
+          render: (h, params) => {
+            if (params.row.source == 1) {
+              return h('span', { class: 'success-state' }, '飞参数据')
+            } else {
+              return h('span', { class: 'success-state' }, 'MDC数据')
+            }
+          }
         },
         {
           prop: 'ossId',
@@ -322,7 +355,8 @@ export default {
       algoTypeList: [{ id: 5, name: '故障诊断' }],
       modelList: [],
       percentage: 0,
-      sortieNoList: []
+      sortieNoList: [],
+      allTaskExecond: []
     }
   },
   watch: {
@@ -354,6 +388,13 @@ export default {
           this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
           // this.getDataImportAPI()
         }
+        const res = await getTaskExecondRegister({
+          status: null,
+          queryParam: '',
+          taskId: '',
+          aircaftCatalogId: ''
+        })
+        this.allTaskExecond = flattenTree(res.data)
       } catch (error) {}
     },
 
@@ -541,7 +582,9 @@ export default {
         }, 30)
       } catch (error) {
         this.progressVisible = false
-        clearInterval(myTimer)
+        if (myTimer) {
+          clearInterval(myTimer)
+        }
         this.percentage = 0
       }
     },

+ 18 - 4
src/views/als/intelligentQA/index.vue

@@ -112,15 +112,29 @@ export default {
             answer: '发生。。。。。。。xxxxxxx',
             graph: {
               data: [
-                { name: '111', category: 'HMC' },
-                { name: '更换手机屏幕', category: '维修策略' }
+                { name: '202310150010', category: 'HMC' },
+                { name: '电视', category: '成品' },
+                { name: '电视遥控器失灵', category: '故障描述' },
+                { name: '家用电器', category: '系统' },
+                { name: '更换电池或遥控器', category: '维修策略' }
               ],
-              links: [{ source: '111', target: '更换手机屏幕', value: '维修策略' }],
-              categories: [{ name: 'HMC' }, { name: '维修策略' }]
+              links: [
+                { source: '202310150010', target: '电视', value: '成品' },
+                { source: '202310150010', target: '电视遥控器失灵', value: '故障描述' },
+                { source: '202310150010', target: '家用电器', value: '系统' },
+                { source: '202310150010', target: '更换电池或遥控器', value: '维修策略' }
+              ],
+              categories: [{ name: 'HMC' }, { name: '成品' }, { name: '故障描述' }, { name: '维修策略' }, { name: '系统' }]
             }
           }
         }
       )
+      // data: [
+      //           { name: '111', category: 'HMC' },
+      //           { name: '更换手机屏幕', category: '维修策略' }
+      //         ],
+      //         links: [{ source: '111', target: '更换手机屏幕', value: '维修策略' }],
+      //         categories: [{ name: 'HMC' }, { name: '维修策略' }]
       console.log('this.chatInfo', this.chatInfo)
       this.questionInput = ''
       // 等处理过返回数据后,调用使视图保持在最底部

+ 55 - 23
src/views/als/lifePrediction/index.vue

@@ -66,11 +66,13 @@
 
 <script>
 import { getLifePrediction, addLifePrediction, updateLifePrediction, removeLifePrediction } from '@/api/als/lifePrediction'
+import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { deepClone, debounce } from '@/utils/index'
 import { getDataImport } from '@/api/als/dataImport'
 import { getModel } from '@/api/als/model'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
+import { flattenTree } from '../utils/common'
 // import Treeselect from '@riophae/vue-treeselect'
 // import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 
@@ -174,11 +176,26 @@ export default {
       sortieNoColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'source',
-          label: '数据来源'
+          label: '数据来源',
+          render: (h, params) => {
+            if (params.row.source == 1) {
+              return h('span', { class: 'success-state' }, '飞参数据')
+            } else {
+              return h('span', { class: 'success-state' }, 'MDC数据')
+            }
+          }
         },
         {
           prop: 'ossId',
@@ -245,7 +262,8 @@ export default {
       algoTypeList: [{ id: 6, name: '寿命预测' }],
       percentage: 0,
       modelList: [],
-      sortieNoList: []
+      sortieNoList: [],
+      allTaskExecond: []
     }
   },
   watch: {
@@ -277,6 +295,13 @@ export default {
         // this.getLifePredictionAPI()
         // this.getDataImportAPI()
       }
+      const res = await getTaskExecondRegister({
+        status: null,
+        queryParam: '',
+        taskId: '',
+        aircaftCatalogId: ''
+      })
+      this.allTaskExecond = flattenTree(res.data)
     },
 
     async removeLifePredictionAPI(params) {
@@ -409,28 +434,35 @@ export default {
       // this.agloForm.aircraftId = row.aircraftId
     },
     beginExecute() {
-      // 调用算法接口
-
-      // this.executeVisible = false
-      this.progressVisible = true
-      const myTimer = setInterval(() => {
-        if (this.percentage < 100) {
-          this.percentage += 1
-        } else {
-          this.progressVisible = false
-          this.percentage = 0
+      try {
+        // 调用算法接口
+        this.progressVisible = true
+        this.percentage += 1
+        const myTimer = setInterval(() => {
+          if (this.percentage < 100) {
+            this.percentage += 1
+          } else {
+            this.progressVisible = false
+            this.percentage = 0
+            clearInterval(myTimer)
+            // this.$router.push({ name: 'PreResult', params: { agloForm: this.agloForm } })
+            this.handleClose()
+            this.$message({
+              type: 'success',
+              message: '执行成功!'
+            })
+            this.$alert('寿命预测结果为:寿命前期', '寿命预测结果', {
+              confirmButtonText: '确定'
+            })
+          }
+        }, 30)
+      } catch (error) {
+        this.progressVisible = false
+        if (myTimer) {
           clearInterval(myTimer)
-          // this.$router.push({ name: 'PreResult', params: { agloForm: this.agloForm } })
-          this.handleClose()
-          this.$message({
-            type: 'success',
-            message: '执行成功!'
-          })
-          this.$alert('寿命预测结果为:寿命前期', '寿命预测结果', {
-            confirmButtonText: '确定'
-          })
         }
-      }, 30)
+        this.percentage = 0
+      }
     },
 
     async changeAircraftId(aircraftId) {

+ 1 - 1
src/views/als/maintenanceDecision/index.vue

@@ -320,7 +320,7 @@ export default {
       const {
         data: { list, total }
       } = await getMaintenanceDecision({ pageSize, pageNum: pageIndex, ...params })
-      this.tableData = list0
+      this.tableData = list
       this.tableRequset.total = total
     },
     async getDataImportAPI(params) {

+ 46 - 11
src/views/als/preProcessing/index.vue

@@ -82,6 +82,7 @@
 
 <script>
 import { getPreProcessing, addPreProcessing, updatePreProcessing, removePreProcessing } from '@/api/als/preProcessing'
+import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
 import { getColumnDataAPI, executePreProcessing, getOssIdPlaybackDataAPI } from '@/api/als/algorithm'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
@@ -89,6 +90,7 @@ import { getDataImport } from '@/api/als/dataImport'
 import { getModel } from '@/api/als/model'
 import { deepClone, debounce } from '@/utils/index'
 import PlayBackChart from '@/views/als/components/Charts/playBackChart.vue'
+import { flattenTree } from '../utils/common'
 
 export default {
   name: 'PreProcessing',
@@ -121,10 +123,18 @@ export default {
       },
       searchValue: '',
       columns: [
-        { prop: 'id', label: '编号' },
+        // { prop: 'id', label: '编号' },
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'aircraftId',
@@ -162,10 +172,10 @@ export default {
         //   prop: 'ossId',
         //   label: '文件Id'
         // },
-        {
-          prop: 'result',
-          label: '结果'
-        },
+        // {
+        //   prop: 'result',
+        //   label: '结果'
+        // },
         {
           prop: 'status',
           label: '状态',
@@ -183,7 +193,7 @@ export default {
           width: '240px',
           group: [
             {
-              name: '查看',
+              name: '查看结果',
               type: 'text',
               round: false,
               plain: false,
@@ -215,11 +225,26 @@ export default {
       sortieNoColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号'
+          label: '架次号',
+          render: (h, params) => {
+            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.taskName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'source',
-          label: '数据来源'
+          label: '数据来源',
+          render: (h, params) => {
+            if (params.row.source == 1) {
+              return h('span', { class: 'success-state' }, '飞参数据')
+            } else {
+              return h('span', { class: 'success-state' }, 'MDC数据')
+            }
+          }
         },
         {
           prop: 'ossId',
@@ -303,7 +328,8 @@ export default {
         xAxisData: [],
         yAxisData: [],
         seriesData: []
-      }
+      },
+      allTaskExecond: []
     }
   },
   watch: {
@@ -335,6 +361,13 @@ export default {
             .toString()
           this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
         }
+        const res = await getTaskExecondRegister({
+          status: null,
+          queryParam: '',
+          taskId: '',
+          aircaftCatalogId: ''
+        })
+        this.allTaskExecond = flattenTree(res.data)
       } catch (error) {}
     },
 
@@ -555,7 +588,9 @@ export default {
         }, 30)
       } catch (error) {
         this.progressVisible = false
-        clearInterval(myTimer)
+        if (myTimer) {
+          clearInterval(myTimer)
+        }
         this.percentage = 0
       }
     },

+ 1 - 1
vue.config.js

@@ -3,7 +3,7 @@ const { defineConfig } = require('@vue/cli-service')
 module.exports = defineConfig({
   transpileDependencies: true,
   devServer: {
-    host: 'localhost', //可以忽略不写
+    host: '0.0.0.0', //可以忽略不写
     port: 8101, //它是用来修改你打开后的端口号的
     open: true, //值为 true的话,项目启动时自动打开到浏览器里边, false不会打开
     proxy: {