浏览代码

修改页码、虚警抑制、数据预处理

Rmengdi 5 月之前
父节点
当前提交
69f527cddf
共有 45 个文件被更改,包括 714 次插入728 次删除
  1. 5 0
      src/components/LTable/index.vue
  2. 2 2
      src/views/als/MDCData/index.vue
  3. 2 2
      src/views/als/airInstall/index.vue
  4. 2 2
      src/views/als/aircraft/index.vue
  5. 2 2
      src/views/als/dataAnalysis/index.vue
  6. 2 2
      src/views/als/dataImport/index.vue
  7. 220 174
      src/views/als/falseAlarm/index.vue
  8. 21 237
      src/views/als/falseAlarmResult/index.vue
  9. 2 2
      src/views/als/faultCase/index.vue
  10. 2 2
      src/views/als/faultConsumable/index.vue
  11. 188 114
      src/views/als/faultDiagnosis/index.vue
  12. 2 2
      src/views/als/faultDiagnosisResult/index.vue
  13. 2 2
      src/views/als/faultEquipment/index.vue
  14. 2 2
      src/views/als/faultNotes/index.vue
  15. 2 2
      src/views/als/faultPersonnel/index.vue
  16. 2 2
      src/views/als/faultSetps/index.vue
  17. 2 2
      src/views/als/faultSpareParts/index.vue
  18. 2 2
      src/views/als/flightData/index.vue
  19. 2 2
      src/views/als/flightSplitask/index.vue
  20. 2 2
      src/views/als/flightask/index.vue
  21. 2 2
      src/views/als/lifePrediction/index.vue
  22. 2 2
      src/views/als/lifePredictionResult/index.vue
  23. 2 2
      src/views/als/maintainRecord/index.vue
  24. 2 2
      src/views/als/maintenance/index.vue
  25. 4 4
      src/views/als/maintenanceDecision/index.vue
  26. 2 2
      src/views/als/maintenanceRecord/index.vue
  27. 2 2
      src/views/als/maintenanceask/index.vue
  28. 2 2
      src/views/als/maintenanceask/viewDetails.vue
  29. 4 4
      src/views/als/model/index.vue
  30. 2 2
      src/views/als/partReplacement/index.vue
  31. 190 113
      src/views/als/preProcessing/index.vue
  32. 4 4
      src/views/als/preProcessing/preResult.vue
  33. 2 2
      src/views/als/product/index.vue
  34. 2 2
      src/views/als/safeRule/index.vue
  35. 2 2
      src/views/als/safeRuleSub/index.vue
  36. 4 4
      src/views/als/smTask/SMTaskDetails.vue
  37. 2 2
      src/views/als/smTask/index.vue
  38. 2 2
      src/views/als/smaskRecord/index.vue
  39. 2 2
      src/views/als/smaskSub/index.vue
  40. 2 2
      src/views/als/sortie/index.vue
  41. 2 2
      src/views/als/spareParts/index.vue
  42. 2 2
      src/views/als/task/index.vue
  43. 2 2
      src/views/als/technicalDoc/index.vue
  44. 4 4
      src/views/als/trainingData/index.vue
  45. 2 2
      src/views/als/warning/index.vue

+ 5 - 0
src/components/LTable/index.vue

@@ -14,6 +14,7 @@
       @select-all="selectAll"
       @row-click="handleRowClick"
       @selection-change="handleSelectionChange"
+      @current-change="handleCurrentChange"
       highlight-current-row
       default-expand-all
       :cell-style="cellStyle"
@@ -257,6 +258,10 @@ export default {
       this.$emit('selection-change', selection)
     },
 
+    handleCurrentChange(selection) {
+      this.$emit('current-change', selection)
+    },
+
     // 点击table某一行时触发事件
     handleRowClick(row, event, column) {
       this.$emit('handleRowClick', row, event, column)

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

@@ -295,10 +295,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getDataImport({ pageSize, pageIndex, ...params, source: 2 })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -326,10 +326,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getAirInstall({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -212,10 +212,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getAircraft({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -223,10 +223,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getDataAnalysis({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -223,10 +223,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getDataImport({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

+ 220 - 174
src/views/als/falseAlarm/index.vue

@@ -10,7 +10,7 @@
           <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
         </div>
         <div class="view-dataType-title-search">
-          <el-input placeholder="请输入关键字" v-model="keyWordData" class="input1">
+          <el-input placeholder="请输入架次号" v-model="keyWordData" class="input1">
             <el-button slot="append" icon="el-icon-search" @click="searchClick" :disabled="!(currentNode.type == 1 && currentNode.children.length == 0)"></el-button>
           </el-input>
         </div>
@@ -19,46 +19,47 @@
         <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
       <!-- 添加或修改虚警抑制对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px" :before-close="handleClose">
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="1000px" :before-close="handleClose">
         <el-form ref="executeForm" :model="executeForm" label-width="80px">
-          <el-form-item label="编目" prop="aircraftId">
-            <el-select v-model="executeForm.aircraftId" placeholder="请选择编目" @change="changeAircraftId(form.aircraftId)">
-              <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
-            </el-select>
-          </el-form-item>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="编目" prop="aircraftId">
+                <el-select v-model="executeForm.aircraftId" placeholder="请选择编目" disabled @change="changeAircraftId(form.aircraftId)">
+                  <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="模型类型" prop="modelType">
+                <el-select v-model="executeForm.modelType" placeholder="请选择模型类型" @change="changeModelType(executeForm.modelType)">
+                  <el-option v-for="item in [$enumData.agloModelList[3]]" :key="item.key" :label="item.name" :value="item.key" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="模型" prop="modelId">
+                <el-select v-model="executeForm.modelId" placeholder="请选择模型" @change="changeModelId(executeForm.modelId)">
+                  <el-option v-for="item in modelList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select> </el-form-item
+            ></el-col>
+          </el-row>
+
           <el-form-item label="架次号" prop="sortieNo">
-            <LTable ref="sortieNoTableRef" @selection-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions" :pagination="SortieNoTableRequset"></LTable>
+            <LTable ref="sortieNoTableRef" @current-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions" :pagination="SortieNoTableRequset"></LTable>
           </el-form-item>
           <el-form-item label="警告列表" prop="warningIds">
-            <el-table ref="warningTableRef" :data="warningIdsList" @selection-change="warningSelection" style="width: 100%; height: 200px">
-              <el-table-column type="selection" width="55"></el-table-column>
+            <el-table ref="warningTableRef" :data="warningIdsList" @current-change="warningSelection" style="width: 100%; height: 200px" highlight-current-row>
               <el-table-column prop="id" label="警告ID"> </el-table-column>
               <el-table-column prop="name" label="名称"> </el-table-column>
               <el-table-column prop="describe" label="描述"> </el-table-column>
             </el-table>
-            <!-- <el-select v-model="executeForm.warningIds" placeholder="请选择警告列表">
-              <el-option v-for="item in warningIdsList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
-            </el-select> -->
-          </el-form-item>
-          <el-form-item label="模型类型" prop="modelType">
-            <el-select v-model="executeForm.modelType" placeholder="请选择模型类型" @change="changeModelType(executeForm.modelType)">
-              <el-option v-for="item in [$enumData.agloModelList[3]]" :key="item.key" :label="item.name" :value="item.key" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="模型" prop="modelId">
-            <el-select v-model="executeForm.modelId" placeholder="模型" @change="changeModelId(executeForm.modelId)">
-              <el-option v-for="item in modelList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="参数" prop="param">
-            <el-input v-model="executeForm.param" type="textarea" :rows="2" placeholder="请输入参数" />
           </el-form-item>
+
+          <el-form-item label="参数" prop="param"> <el-input v-model="executeForm.param" type="textarea" :rows="2" placeholder="请输入参数" /> </el-form-item>
           <el-form-item label="数据列" prop="columnData">
-            <!-- <el-input v-model="form.columnData" placeholder="请输入数据列" /> -->
             <el-transfer v-model="transferRightData" :data="transferData" @change="changeColumnData"></el-transfer>
           </el-form-item>
         </el-form>
-
         <span slot="footer" class="dialog-footer">
           <el-button @click="handleClose">取 消</el-button>
           <el-button type="primary" @click="submit">确 定</el-button>
@@ -67,10 +68,10 @@
       <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="800px">
-        展示结果
+      <el-dialog title="结果展示" :visible.sync="resultVisible" width="1200px">
+        <!-- <falseAlarmResult :falseAlarmId="form.id" /> -->
+        <LTable ref="resultTableRef" :columns="resultColumns" :dataSource="resultTableData" :options="resultOptions" :pagination="resultTableRequset"></LTable>
         <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>
@@ -80,8 +81,8 @@
 
 <script>
 import { getFalseAlarm, addFalseAlarm, updateFalseAlarm, removeFalseAlarm } from '@/api/als/falseAlarm'
+import { getFalseAlarmResult } from '@/api/als/falseAlarmResult'
 import { getColumnDataAPI, executeFalseAlarm } from '@/api/als/algorithm'
-
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { getDataImport } from '@/api/als/dataImport'
@@ -118,7 +119,6 @@ export default {
       },
       searchValue: '',
       columns: [
-        { prop: 'id', label: '编号' },
         {
           prop: 'sortieNo',
           label: '架次号'
@@ -137,7 +137,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',
@@ -147,13 +155,20 @@ export default {
           prop: 'columnData',
           label: '数据列'
         },
-        {
-          prop: 'ossId',
-          label: '文件Id'
-        },
+        // {
+        //   prop: 'ossId',
+        //   label: '文件Id'
+        // },
         {
           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,
@@ -169,15 +184,6 @@ export default {
                 this.checkResultList(row)
               }
             },
-            {
-              name: '执行',
-              type: 'text',
-              round: false,
-              plain: false,
-              onClick: (row, index, scope) => {
-                this.executeAglo(row)
-              }
-            },
             {
               name: '删除',
               type: 'text',
@@ -204,6 +210,49 @@ export default {
           label: '文件Id'
         }
       ],
+      resultColumns: [
+        {
+          prop: 'sortieNo',
+          label: '架次号'
+        },
+        {
+          prop: 'aircraftId',
+          label: '编目',
+          render: (h, params) => {
+            const matchedItem = this.aircaftCatalogAll.find((item) => params.row.aircraftId.trim() === item.aircaftCatalogId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.aircaftCatalogCode)
+            } else {
+              return h('span', {}, '')
+            }
+          }
+        },
+        {
+          prop: 'code',
+          label: '警告代码'
+        },
+        {
+          prop: 'name',
+          label: '警告名称'
+        },
+        {
+          prop: 'describe',
+          label: '警告描述'
+        },
+        {
+          prop: 'status',
+          label: '结果',
+          render: (h, params) => {
+            const result = JSON.parse(params.row.status)[0]
+            const isfalseAlarm = result['是否虚警']
+            if (isfalseAlarm == 0) {
+              return h('span', { class: 'warning-state' }, '否')
+            } else {
+              return h('span', { class: 'success-state' }, '是')
+            }
+          }
+        }
+      ],
       options: {
         stripe: true, // 斑马纹
         mutiSelect: true, // 多选框
@@ -215,15 +264,31 @@ export default {
       },
       sortieNoOptions: {
         stripe: true, // 斑马纹
-        mutiSelect: true, // 多选框
+        mutiSelect: false, // 多选框
         index: true, // 显示序号, 多选则 mutiSelect
         loading: false, // 表格动画
         initTable: false, // 是否一挂载就加载数据
         border: true,
         height: '250px'
       },
+      resultOptions: {
+        stripe: true,
+        mutiSelect: false,
+        index: false,
+        loading: false,
+        initTable: false,
+        border: true,
+        height: '300px'
+      },
+      resultTableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
       tableCheckItems: [],
       tableData: [],
+      resultTableData: [],
       SortieNoTableRequset: {
         total: 0,
         pageIndex: 1,
@@ -286,24 +351,24 @@ export default {
   },
   methods: {
     async getAircaftCatalogTreeAPI(params) {
-      const { data } = await getAircaftCatalogTree(params)
-      this.menuTreeData = data
-      const getAircaftCatalogAllParams = {
-        keyWord: '',
-        aircaftModelIdList: []
-      }
-      const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
-      this.aircaftCatalogAll = data2
-      if (data.length) {
-        this.currentNodeKey = data[0].id
-        this.currentNode = data[0]
-        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
-          .map((e) => e.id)
-          .toString()
-        this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
-        // this.getFalseAlarmAPI()
-        // this.getDataImportAPI()
-      }
+      try {
+        const { data } = await getAircaftCatalogTree(params)
+        this.menuTreeData = data
+        const getAircaftCatalogAllParams = {
+          keyWord: '',
+          aircaftModelIdList: []
+        }
+        const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
+        this.aircaftCatalogAll = data2
+        if (data.length) {
+          this.currentNodeKey = data[0].id
+          this.currentNode = data[0]
+          this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+            .map((e) => e.id)
+            .toString()
+          this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
+        }
+      } catch (error) {}
     },
 
     async removeFalseAlarmAPI(params) {
@@ -341,20 +406,22 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFalseAlarm({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
+    },
+
+    async getFalseAlarmResultAPI(params) {
+      if (this.$refs.resultTableRef) this.$refs.resultTableRef.clearSelection()
+      const { keyWord } = this
+      const { pageSize, pageIndex } = this.resultTableRequset
+      const {
+        data: { list, total }
+      } = await getFalseAlarmResult({ pageSize, pageIndex, ...params })
+      this.resultTableData = list
+      this.resultTableRequset.total = total
     },
-    // async getDataImportAPI(params) {
-    //   if (this.$refs.table) this.$refs.table.clearSelection()
-    //   const { pageSize, pageIndex } = this.tableRequset
-    //   const {
-    //     data: { list, totalCount }
-    //   } = await getDataImport({ pageSize, pageIndex, ...params })
-    //   this.tableData = list
-    //   this.tableRequset.total = totalCount
-    // },
 
     fetch() {
       this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
@@ -373,20 +440,6 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.dialogVisible = false
-          this.progressVisible = true
-          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.resultVisible = true
-            }
-          }, 30)
           this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
@@ -416,6 +469,7 @@ export default {
     },
 
     async openDialog() {
+      this.executeForm.aircraftId = this.currentNodeKey
       if (this.executeForm.aircraftId !== '') {
         this.changeAircraftId(this.executeForm.aircraftId)
       }
@@ -425,22 +479,15 @@ export default {
 
     handleClose() {
       this.dialogVisible = false
-      this.form = {
-        id: '',
-        sortieNo: '',
-        aircraftId: '',
+      this.executeForm = {
+        modelId: '',
         modelType: '',
+        ossId: '',
+        aircraftId: '',
+        sortieNo: '',
         param: '',
         columnData: [],
-        ossId: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        warningIds: []
       }
     },
 
@@ -461,44 +508,48 @@ export default {
       this.executeForm.columnData = data
     },
     checkResultList(row) {
-      this.form = deepClone(row)
+      this.getFalseAlarmResultAPI({ falseAlarmId: row.id })
       this.resultVisible = true
-      // this.agloForm.sortieNo = row.sortieNo
-      // this.agloForm.aircraftId = row.aircraftId
-      // this.$router.push({ name: 'PreResult', params: { agloForm: this.agloForm } })
-    },
-    executeAglo(row) {
-      // this.executeVisible = true
-      // this.agloForm.sortieNo = row.sortieNo
-      // this.agloForm.aircraftId = row.aircraftId
     },
     async beginExecute() {
-      // 调用模型接口
-      // if(this.executeForm.warningIds.isArray)
-      // this.executeForm.warningIds = [this.executeForm.warningIds]
-      const res = await executeFalseAlarm(this.executeForm)
-      const myTimer = setInterval(() => {}, 30)
-      console.log('res', res)
-      // this.dialogVisible = false
-      // this.progressVisible = true
-      // 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.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
-      //   }
-      // }, 30)
+      this.progressVisible = true
+
+      try {
+        this.percentage += 1
+        const res = await executeFalseAlarm(this.executeForm)
+        const myTimer = setInterval(() => {
+          if (res?.code === 200 && this.percentage == 100) {
+            this.progressVisible = false
+            clearInterval(myTimer)
+            this.percentage = 0
+            this.handleClose()
+            this.$message({
+              type: 'success',
+              message: '执行成功!'
+            })
+            const result = JSON.parse(res.data)[0]
+            const isfalseAlarm = result['是否虚警'] === 0 ? '否' : '是'
+            this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
+            this.$alert(`故障编码为:${result['故障编码']},是否虚警:${isfalseAlarm},`, '虚警抑制结果', {
+              confirmButtonText: '确定'
+            })
+          } else {
+            this.percentage += 1
+          }
+        }, 30)
+      } catch (error) {
+        this.progressVisible = false
+        clearInterval(myTimer)
+        this.percentage = 0
+      }
     },
     async changeModelType(type) {
-      const {
-        data: { list }
-      } = await getModel({ type })
-      this.modelList = list
+      try {
+        const {
+          data: { list }
+        } = await getModel({ type })
+        this.modelList = list
+      } catch (error) {}
     },
 
     changeModelId(modelId) {
@@ -522,19 +573,23 @@ export default {
     },
 
     async changeAircraftId(aircraftId) {
-      const {
-        data: { list, totalCount }
-      } = await getDataImport({ aircraftId })
-      this.sortieNoList = list
-      this.SortieNoTableRequset.total = totalCount
+      try {
+        const {
+          data: { list, totalCount }
+        } = await getDataImport({ aircraftId })
+        this.sortieNoList = list
+        this.SortieNoTableRequset.total = totalCount
+      } catch (error) {}
     },
 
     async changeSortieNo(sortieNo) {
-      const {
-        data: { list }
-      } = await getWarning({ aircraftId: this.executeForm.aircraftId, sortieNo })
-      this.executeForm.sortieNo = sortieNo
-      this.warningIdsList = list
+      try {
+        const {
+          data: { list }
+        } = await getWarning({ aircraftId: this.executeForm.aircraftId, sortieNo })
+        this.executeForm.sortieNo = sortieNo
+        this.warningIdsList = list
+      } catch (error) {}
     },
 
     submit() {
@@ -544,10 +599,7 @@ export default {
           this.handleClose()
           break
         case '新增':
-          // this.addFalseAlarmAPI()
-          console.log('this.executeForm', this.executeForm)
           this.beginExecute()
-          // this.handleClose()
           break
       }
     },
@@ -557,36 +609,30 @@ export default {
     },
 
     async sortieNoSelection(val) {
-      if (val.length > 1) {
-        this.$refs.sortieNoTableRef.clearSelection()
-        this.$refs.sortieNoTableRef.toggleRowSelection(val.pop())
-      }
-      // this.sortieNoTableCheck = val
-      this.executeForm.ossId = val[0].ossId
-      if (val[0].ossId) {
-        const res = await getColumnDataAPI(val[0].ossId)
-        if (res.code === 200) {
-          res.data.forEach((item, index) => {
-            this.transferData.push({
-              key: index,
-              label: item
+      this.executeForm.ossId = val.ossId
+      if (val.ossId) {
+        try {
+          const res = await getColumnDataAPI(val.ossId)
+          if (res.code === 200) {
+            this.transferData = []
+            res.data.forEach((item, index) => {
+              this.transferData.push({
+                key: index,
+                label: item
+              })
             })
-          })
 
-          this.changeSortieNo(val[0].sortieNo)
-        }
+            this.changeSortieNo(val.sortieNo)
+          }
+        } catch (error) {}
       }
     },
 
     warningSelection(val) {
-      if (val.length > 1) {
-        this.$refs.warningTableRef.clearSelection()
-        this.$refs.warningTableRef.toggleRowSelection(val.pop())
+      this.executeForm.warningIds = [val.id]
+      if (this.executeForm.modelId) {
+        this.changeModelId(this.executeForm.modelId)
       }
-      console.log('val', val)
-      this.executeForm.warningIds = [val[0].id]
-      console.log('this.executeForm.warningIds', this.executeForm.warningIds)
-      // this.sortieNoTableCheck = val
     },
 
     remove(row) {

+ 21 - 237
src/views/als/falseAlarmResult/index.vue

@@ -1,87 +1,28 @@
 <template>
   <div class="view-table-content">
-    <div class="view-dataSpecies-left">
-      <MenuTree :currentNodeKey="currentNodeKey" nodeKey="id" :treedata="menuTreeData" @TreeNodeclick="treeNodeClick" v-bind="treeObj"> </MenuTree>
-    </div>
-    <div class="view-dataSpecies-right">
-      <div class="view-dataType-title">
-        <div class="view-dataType-title-btn">
-          <el-button type="success" @click="openDialog()" :disabled="currentNode && currentNode.type == 0">新增</el-button>
-          <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
-          <el-button type="primary">导入模板</el-button>
-          <el-button type="primary">导出模板</el-button>
-        </div>
-        <div class="view-dataType-title-search">
-          <el-input placeholder="请输入关键字" v-model="keyWord" class="input1">
-            <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
-          </el-input>
-        </div>
-      </div>
+    <div class="view-dataSpecies-right" style="width: 100%">
       <div class="view-dataType-table">
-        <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
+        <LTable ref="table" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
-      <!-- 添加或修改虚警抑制结果对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
-        <el-form ref="form" :model="form" label-width="80px">
-          <el-form-item label="虚警抑制Id" prop="falseAlarmId">
-            <el-input v-model="form.falseAlarmId" placeholder="请输入虚警抑制Id" />
-          </el-form-item>
-          <el-form-item label="架次号" prop="sortieNo">
-            <el-input v-model="form.sortieNo" placeholder="请输入架次号" />
-          </el-form-item>
-          <el-form-item label="机号" prop="aircraftId">
-            <el-input v-model="form.aircraftId" placeholder="请输入机号" />
-          </el-form-item>
-          <el-form-item label="警告代码" prop="code">
-            <el-input v-model="form.code" placeholder="请输入警告代码" />
-          </el-form-item>
-          <el-form-item label="警告名称" prop="name">
-            <el-input v-model="form.name" placeholder="请输入警告名称" />
-          </el-form-item>
-          <el-form-item label="警告描述" prop="describe">
-            <el-input v-model="form.describe" placeholder="请输入警告描述" />
-          </el-form-item>
-        </el-form>
-
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="handleClose">取 消</el-button>
-          <el-button type="primary" @click="submit">确 定</el-button>
-        </span>
-      </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
-import { getFalseAlarmResult, getAircaftTypeAndModelTree, addFalseAlarmResult, updateFalseAlarmResult, removeFalseAlarmResult } from '@/api/als/falseAlarmResult'
-import { deepClone, debounce } from '@/utils/index'
+import { getFalseAlarmResult } from '@/api/als/falseAlarmResult'
+import { debounce } from '@/utils/index'
 export default {
   name: 'FalseAlarmResult',
   components: {},
+  props: {
+    falseAlarmId: String
+  },
   data() {
     // 这里存放数据
     return {
-      dialogTitle: '新增',
-      dialogVisible: false,
-      keyWord: '',
       aircaftModelIdList: [],
       currentNodeKey: null,
       currentNode: null,
-      menuTreeData: [],
-      treeObj: {
-        title: '所属机种',
-        activityheight: '275px',
-        searchIcon: false,
-        configure: {
-          children: 'children',
-          label: 'label'
-        }
-      },
-      typeTree: {
-        children: 'children',
-        label: 'label'
-      },
-      searchValue: '',
       columns: [
         { prop: 'id', label: '编号' },
         {
@@ -140,7 +81,7 @@ export default {
       ],
       options: {
         stripe: true, // 斑马纹
-        mutiSelect: true, // 多选框
+        mutiSelect: false, // 多选框
         index: false, // 显示序号, 多选则 mutiSelect
         loading: false, // 表格动画
         initTable: false, // 是否一挂载就加载数据
@@ -155,192 +96,35 @@ export default {
         pageSize: 10,
         searchValue: ''
       },
-      form: {
-        id: '',
-        falseAlarmId: '',
-        sortieNo: '',
-        aircraftId: '',
-        code: '',
-        name: '',
-        describe: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
-      },
-      debounceFn: debounce(this.fetch, 500)
+      debounceFn: debounce(this.fetch, 500),
+      propsId: ''
     }
   },
   watch: {
-    keyWord() {
-      this.tableRequset.pageIndex = 1
-      this.debounceFn()
+    falseAlarmId: {
+      handler(val) {
+        this.propsId = this.falseAlarmId
+        this.getFalseAlarmResultAPI({ falseAlarmId: this.propsId })
+      }
     }
   },
   mounted() {
-    this.getAircaftTypeAndModelTreeAPI()
+    this.propsId = this.falseAlarmId
+    this.getFalseAlarmResultAPI({ falseAlarmId: this.falseAlarmId })
   },
   methods: {
-    async getAircaftTypeAndModelTreeAPI(params) {
-      const { data } = await getAircaftTypeAndModelTree(params)
-      this.menuTreeData = data
-      if (data.length) {
-        this.currentNodeKey = data[0].value
-        this.currentNode = data[0]
-        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children).map((e) => e.id)
-        this.getFalseAlarmResultAPI({ aircaftModelIdList: this.aircaftModelIdList })
-      }
-    },
-
-    async removeFalseAlarmResultAPI(params) {
-      try {
-        const { success } = await removeFalseAlarmResult(params)
-        if (success) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          await this.getFalseAlarmResultAPI({ aircaftModelIdList: this.aircaftModelIdList })
-          this.handleClose()
-        }
-      } catch (error) {}
-    },
-
-    getTreeLeafData(list) {
-      const newArr = []
-      function getLeaf(data, arr) {
-        data.forEach((e) => {
-          if (e.type === 1) {
-            arr.push(e)
-          }
-          if (e.children.length) {
-            getLeaf(e.children, arr)
-          }
-        })
-      }
-      getLeaf(list, newArr)
-      return newArr
-    },
-
     async getFalseAlarmResultAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
-      const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
-      } = await getFalseAlarmResult({ pageSize, pageIndex, keyWord, ...params })
+        data: { list, total }
+      } = await getFalseAlarmResult({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {
-      this.getFalseAlarmResultAPI({ aircaftModelIdList: this.aircaftModelIdList })
-    },
-
-    searchClick() {
-      this.getFalseAlarmResultAPI({ aircaftModelIdList: this.aircaftModelIdList })
-    },
-
-    async addFalseAlarmResultAPI() {
-      try {
-        delete this.form.aircaftModelName
-        const { success } = await addFalseAlarmResult({ ...this.form })
-        if (success) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.getFalseAlarmResultAPI({ aircaftModelIdList: this.aircaftModelIdList })
-        }
-      } catch (error) {}
-    },
-
-    async updateFalseAlarmResultAPI() {
-      try {
-        const { success } = await updateFalseAlarmResult({ ...this.form })
-        if (success) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.getFalseAlarmResultAPI({ aircaftModelIdList: this.aircaftModelIdList })
-        }
-      } catch (error) {}
-    },
-
-    treeNodeClick(data) {
-      this.$refs.table.clearSelection()
-      this.currentNodeKey = data.id
-      this.currentNode = data
-      this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data]).map((e) => e.id)
-      this.getFalseAlarmResultAPI({ aircaftModelIdList: this.aircaftModelIdList })
-    },
-
-    openDialog() {
-      this.dialogTitle = '新增'
-      this.dialogVisible = true
-      this.form.aircaftModelName = this.currentNode.label
-      this.form.aircaftModelId = this.currentNode.id
-    },
-
-    handleClose() {
-      this.dialogVisible = false
-      this.form = {
-        id: '',
-        falseAlarmId: '',
-        sortieNo: '',
-        aircraftId: '',
-        code: '',
-        name: '',
-        describe: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
-      }
-    },
-
-    handUpdate(row) {
-      this.dialogTitle = '编辑'
-      this.form = deepClone(row)
-      this.dialogVisible = true
-    },
-
-    submit() {
-      switch (this.dialogTitle) {
-        case '编辑':
-          this.updateFalseAlarmResultAPI()
-          this.handleClose()
-          break
-        case '新增':
-          this.addFalseAlarmResultAPI()
-          this.handleClose()
-          break
-      }
-    },
-
-    selection(val) {
-      this.tableCheckItems = val
-    },
-
-    remove(row) {
-      this.$confirm('是否删除该数据', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.removeFalseAlarmResultAPI(row.map((e) => e.id))
-        })
-        .catch(() => {})
+      this.getFalseAlarmResultAPI({ falseAlarmId: this.falseAlarmId })
     }
   }
 }

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

@@ -353,10 +353,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultCase({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -210,10 +210,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultConsumable({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

+ 188 - 114
src/views/als/faultDiagnosis/index.vue

@@ -19,41 +19,46 @@
         <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
       <!-- 添加或修改故障诊断对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px" :before-close="handleClose">
-        <el-form ref="form" :model="form" label-width="80px">
-          <el-form-item label="编目" prop="aircraftId">
-            <el-select v-model="form.aircraftId" placeholder="请选择编目" @change="changeAircraftId(form.aircraftId)">
-              <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
-            </el-select>
-          </el-form-item>
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="1000px" :before-close="handleClose">
+        <el-form ref="executeForm" :model="executeForm" label-width="80px">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="编目" prop="aircraftId">
+                <el-select v-model="executeForm.aircraftId" placeholder="请选择编目" @change="changeAircraftId(executeForm.aircraftId)" disabled>
+                  <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="模型类型" prop="modelType">
+                <el-select v-model="executeForm.modelType" placeholder="请选择模型类型" @change="changeModelType(executeForm.modelType)">
+                  <el-option v-for="item in algoTypeList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="模型" prop="modelId">
+                <el-select v-model="executeForm.modelId" placeholder="请选择模型" @change="changeModelId(executeForm.modelId)">
+                  <el-option v-for="item in modelList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select> </el-form-item
+            ></el-col>
+          </el-row>
+
           <el-form-item label="架次号" prop="sortieNo">
-            <el-select v-model="form.sortieNo" placeholder="请选择架次号">
-              <el-option v-for="item in sortieNoList" :key="item.id" :label="item.sortieNo" :value="item.id"> </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="模型类型">
-            <el-select v-model="form.modelType" placeholder="请选择模型类型" @change="changeModelType(form.modelType)">
-              <el-option v-for="item in algoTypeList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="模型名称">
-            <el-select v-model="form.modelName" placeholder="模型名称">
-              <el-option v-for="item in algoNameList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
+            <LTable ref="sortieNoTableRef" @current-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions" :pagination="SortieNoTableRequset"></LTable>
           </el-form-item>
           <el-form-item label="参数" prop="param">
-            <el-input v-model="form.param" placeholder="请输入参数" />
+            <el-input v-model="executeForm.param" type="textarea" :rows="2" placeholder="请输入参数" />
           </el-form-item>
           <el-form-item label="数据列" prop="columnData">
-            <!-- <el-input v-model="form.columnData" placeholder="请输入数据列" /> -->
-            <el-transfer v-model="form.columnData" :data="transferData"></el-transfer>
+            <el-transfer v-model="transferRightData" :data="transferData" @change="changeColumnData"></el-transfer>
           </el-form-item>
-          <el-form-item label="文件Id" prop="ossId">
+          <!-- <el-form-item label="文件Id" prop="ossId">
             <el-input v-model="form.ossId" placeholder="请输入文件Id" />
           </el-form-item>
-          <el-form-item label="结果">
-            <!-- <editor v-model="form.resultContent" :min-height="192" /> -->
-          </el-form-item>
+           <el-form-item label="结果">
+           <editor v-model="form.resultContent" :min-height="192" /> 
+          </el-form-item>-->
         </el-form>
         <span slot="footer" class="dialog-footer">
           <el-button @click="handleClose">取 消</el-button>
@@ -76,11 +81,13 @@
 
 <script>
 import { getFaultDiagnosis, addFaultDiagnosis, updateFaultDiagnosis, removeFaultDiagnosis } from '@/api/als/faultDiagnosis'
+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'
+
 export default {
   name: 'FaultDiagnosis',
   components: {},
@@ -140,10 +147,10 @@ export default {
           prop: 'columnData',
           label: '数据列'
         },
-        {
-          prop: 'ossId',
-          label: '文件Id'
-        },
+        // {
+        //   prop: 'ossId',
+        //   label: '文件Id'
+        // },
         {
           prop: 'resultContent',
           label: '结果'
@@ -199,6 +206,20 @@ export default {
           ]
         }
       ],
+      sortieNoColumns: [
+        {
+          prop: 'sortieNo',
+          label: '架次号'
+        },
+        {
+          prop: 'source',
+          label: '数据来源'
+        },
+        {
+          prop: 'ossId',
+          label: '文件Id'
+        }
+      ],
       options: {
         stripe: true, // 斑马纹
         mutiSelect: true, // 多选框
@@ -208,6 +229,21 @@ export default {
         border: true,
         height: 'calc(100vh - 300px)'
       },
+      sortieNoOptions: {
+        stripe: true, // 斑马纹
+        mutiSelect: false, // 多选框
+        index: true, // 显示序号, 多选则 mutiSelect
+        loading: false, // 表格动画
+        initTable: false, // 是否一挂载就加载数据
+        border: true,
+        height: '250px'
+      },
+      SortieNoTableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
       tableCheckItems: [],
       tableData: [],
       tableRequset: {
@@ -235,17 +271,19 @@ export default {
         updateTime: ''
       },
       debounceFn: debounce(this.fetch, 500),
-      agloForm: {
+      executeForm: {
         sortieNo: '',
         aircraftId: '',
-        agloType: '',
-        agloName: '',
-        paramsList: []
+        ossId: '',
+        modelId: '',
+        param: '',
+        columnData: []
       },
       aircaftCatalogAll: [],
       transferData: [],
+      transferRightData: [],
       algoTypeList: [{ id: 5, name: '故障诊断' }],
-      algoNameList: [],
+      modelList: [],
       percentage: 0,
       sortieNoList: []
     }
@@ -261,23 +299,25 @@ export default {
   },
   methods: {
     async getAircaftCatalogTreeAPI(params) {
-      const { data } = await getAircaftCatalogTree(params)
-      this.menuTreeData = data
-      const getAircaftCatalogAllParams = {
-        keyWord: '',
-        aircaftModelIdList: []
-      }
-      const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
-      this.aircaftCatalogAll = data2
-      if (data.length) {
-        this.currentNodeKey = data[0].id
-        this.currentNode = data[0]
-        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
-          .map((e) => e.id)
-          .toString()
-        this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
-        // this.getDataImportAPI()
-      }
+      try {
+        const { data } = await getAircaftCatalogTree(params)
+        this.menuTreeData = data
+        const getAircaftCatalogAllParams = {
+          keyWord: '',
+          aircaftModelIdList: []
+        }
+        const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
+        this.aircaftCatalogAll = data2
+        if (data.length) {
+          this.currentNodeKey = data[0].id
+          this.currentNode = data[0]
+          this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+            .map((e) => e.id)
+            .toString()
+          this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
+          // this.getDataImportAPI()
+        }
+      } catch (error) {}
     },
 
     async removeFaultDiagnosisAPI(params) {
@@ -315,10 +355,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultDiagnosis({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {
@@ -338,22 +378,6 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.dialogVisible = false
-          this.progressVisible = true
-          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.resultVisible = true
-            }
-          }, 30)
-          this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -373,7 +397,7 @@ export default {
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftId = data.id
+      this.currentNodeKey = this.executeForm.aircraftId = data.id
       this.currentNode = data
       this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
         .map((e) => e.id)
@@ -383,32 +407,23 @@ export default {
     },
 
     openDialog() {
+      this.executeForm.aircraftId = this.currentNodeKey
+      if (this.executeForm.aircraftId !== '') {
+        this.changeAircraftId(this.executeForm.aircraftId)
+      }
       this.dialogTitle = '新增'
       this.dialogVisible = true
-      if (this.form.aircraftId !== '') {
-        this.changeAircraftId(this.form.aircraftId)
-      }
     },
 
     handleClose() {
       this.dialogVisible = false
-      this.form = {
-        id: '',
+      this.executeForm = {
         sortieNo: '',
         aircraftId: '',
-        modelType: '',
-        param: '',
-        columnData: [],
         ossId: '',
-        resultContent: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        modelId: '',
+        param: '',
+        columnData: []
       }
     },
 
@@ -418,6 +433,36 @@ export default {
       this.dialogVisible = true
     },
 
+    changeColumnData(value) {
+      const data = []
+      this.transferData.forEach((item) => {
+        value.forEach((rightData) => {
+          if (rightData === item.key) {
+            data.push(item.label)
+          }
+        })
+      })
+      this.executeForm.columnData = data
+    },
+
+    changeModelId(modelId) {
+      const modelColumnData = JSON.parse(
+        this.modelList.find((item) => {
+          return item.id === modelId
+        }).columnData
+      )
+      const labelToKeyMap = this.transferData.reduce((acc, item) => {
+        acc[item.label] = item.key
+        return acc
+      }, {})
+      modelColumnData?.forEach((item) => {
+        if (labelToKeyMap.hasOwnProperty(item)) {
+          this.executeForm.columnData.push(item)
+          this.transferRightData.push(labelToKeyMap[item])
+        }
+      })
+    },
+
     checkResultList(row) {
       this.form = deepClone(row)
       this.resultVisible = true
@@ -427,35 +472,65 @@ export default {
       // this.agloForm.sortieNo = row.sortieNo
       // this.agloForm.aircraftId = row.aircraftId
     },
-    beginExecute() {
-      // 调用模型接口
-
-      // this.executeVisible = false
+    async beginExecute() {
       this.progressVisible = true
-      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()
-        }
-      }, 30)
+      try {
+        const res = await executeFault(this.executeForm)
+        this.percentage += 1
+        const myTimer = setInterval(() => {
+          if (res?.code === 200 && this.percentage == 100) {
+            this.progressVisible = false
+            clearInterval(myTimer)
+            this.percentage = 0
+            this.handleClose()
+            this.$message({
+              type: 'success',
+              message: '执行成功!'
+            })
+            this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
+          } else {
+            this.percentage += 1
+          }
+        }, 30)
+      } catch (error) {
+        this.progressVisible = false
+        clearInterval(myTimer)
+        this.percentage = 0
+      }
     },
     async changeModelType(type) {
-      const {
-        data: { list }
-      } = await getModel({ type })
-      this.algoNameList = list
+      try {
+        const {
+          data: { list }
+        } = await getModel({ type })
+        this.modelList = list
+      } catch (error) {}
     },
 
     async changeAircraftId(aircraftId) {
-      const {
-        data: { list }
-      } = await getDataImport({ aircraftId })
-      this.sortieNoList = list
+      try {
+        const {
+          data: { list }
+        } = await getDataImport({ aircraftId })
+        this.sortieNoList = list
+      } catch (error) {}
+    },
+
+    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) {
+          this.transferData = []
+          res.data.forEach((item, index) => {
+            this.transferData.push({
+              key: index,
+              label: item
+            })
+          })
+        }
+      }
     },
 
     submit() {
@@ -465,8 +540,7 @@ export default {
           this.handleClose()
           break
         case '新增':
-          this.addFaultDiagnosisAPI()
-          this.handleClose()
+          this.beginExecute()
           break
       }
     },

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

@@ -207,10 +207,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultDiagnosisResult({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -226,10 +226,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultEquipment({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -202,10 +202,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultNotes({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -218,10 +218,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultPersonnel({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -210,10 +210,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultSetps({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -226,10 +226,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFaultSpareParts({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -264,10 +264,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getDataImport({ pageSize, pageIndex, ...params, source: 1 })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -247,10 +247,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFlightSplitask({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -231,10 +231,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getFlightask({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -290,10 +290,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getLifePrediction({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -236,10 +236,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getLifePredictionResult({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -398,10 +398,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getMaintainRecord({ pageSize, pageIndex, aircraftId: params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -327,10 +327,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getMaintenance({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -318,19 +318,19 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getMaintenanceDecision({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
     async getDataImportAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getDataImport({ pageSize, pageIndex, aircraftId: params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -451,10 +451,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getMaintenanceRecord({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -306,10 +306,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getMaintenanceask({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

+ 2 - 2
src/views/als/maintenanceask/viewDetails.vue

@@ -344,10 +344,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getResourceAllocation({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     async getPersonnelAllocationAPI(params) {

+ 4 - 4
src/views/als/model/index.vue

@@ -211,10 +211,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getModel({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {
@@ -224,10 +224,10 @@ export default {
     async searchClick() {
       if (this.keyWordData) {
         const {
-          data: { list, totalCount }
+          data: { list, total }
         } = await getModel({ name: this.keyWordData })
         this.tableData = list
-        this.tableRequset.total = totalCount
+        this.tableRequset.total = total
       } else {
         this.getModelAPI()
       }

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

@@ -275,10 +275,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getPartReplacement({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

+ 190 - 113
src/views/als/preProcessing/index.vue

@@ -19,37 +19,45 @@
         <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
       <!-- 添加或修改预处理对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px" :before-close="handleClose">
-        <el-form ref="form" :model="form" label-width="80px">
-          <el-form-item label="编目" prop="aircraftId">
-            <el-select v-model="form.aircraftId" placeholder="请选择编目" @change="changeAircraftId(form.aircraftId)">
-              <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
-            </el-select>
-          </el-form-item>
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="1000px" :before-close="handleClose">
+        <el-form ref="executeForm" :model="executeForm" label-width="80px">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="编目" prop="aircraftId">
+                <el-select v-model="executeForm.aircraftId" placeholder="请选择编目" @change="changeAircraftId(executeForm.aircraftId)">
+                  <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="模型类型" prop="modelType">
+                <el-select v-model="executeForm.modelType" placeholder="请选择模型类型" @change="changeModelType(executeForm.modelType)">
+                  <el-option v-for="item in algoTypeList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="模型" prop="modelId">
+                <el-select v-model="executeForm.modelId" placeholder="请选择模型" @change="changeModelId(executeForm.modelId)">
+                  <el-option v-for="item in modelList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
           <el-form-item label="架次号" prop="sortieNo">
-            <el-select v-model="form.sortieNo" placeholder="请选择架次号">
-              <el-option v-for="item in sortieNoList" :key="item.sortieNo" :label="item.sortieNo" :value="item.sortieNo"> </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="模型类型">
-            <el-select v-model="form.modelType" placeholder="请选择模型类型" @change="changeModelType(form.modelType)">
-              <el-option v-for="item in algoTypeList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="模型名称">
-            <el-select v-model="form.modelName" placeholder="模型名称">
-              <el-option v-for="item in algoNameList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
+            <LTable ref="sortieNoTableRef" @current-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions" :pagination="SortieNoTableRequset"></LTable>
           </el-form-item>
+
           <el-form-item label="参数" prop="param">
-            <el-input v-model="form.param" placeholder="请输入参数" />
+            <el-input v-model="executeForm.param" type="textarea" :rows="2" placeholder="请输入参数" />
           </el-form-item>
           <el-form-item label="选择数据列" label-width="90px">
-            <el-transfer v-model="form.columnData" :data="transferData"></el-transfer>
+            <el-transfer v-model="transferRightData" :data="transferData" @change="changeColumnData"></el-transfer>
           </el-form-item>
 
           <!-- <el-form-item label="文件Id" prop="ossId">
-            <el-input v-model="form.ossId" placeholder="请输入文件Id" />
+            <el-input v-model="executeForm.ossId" placeholder="请输入文件Id" />
           </el-form-item> -->
         </el-form>
 
@@ -74,6 +82,7 @@
 
 <script>
 import { getPreProcessing, addPreProcessing, updatePreProcessing, removePreProcessing } from '@/api/als/preProcessing'
+import { getColumnDataAPI, executePreProcessing } from '@/api/als/algorithm'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { getDataImport } from '@/api/als/dataImport'
@@ -139,10 +148,10 @@ export default {
           prop: 'columnData',
           label: '数据列'
         },
-        {
-          prop: 'ossId',
-          label: '文件Id'
-        },
+        // {
+        //   prop: 'ossId',
+        //   label: '文件Id'
+        // },
         {
           prop: 'result',
           label: '结果'
@@ -186,6 +195,20 @@ export default {
           ]
         }
       ],
+      sortieNoColumns: [
+        {
+          prop: 'sortieNo',
+          label: '架次号'
+        },
+        {
+          prop: 'source',
+          label: '数据来源'
+        },
+        {
+          prop: 'ossId',
+          label: '文件Id'
+        }
+      ],
       options: {
         stripe: true, // 斑马纹
         mutiSelect: true, // 多选框
@@ -195,6 +218,21 @@ export default {
         border: true,
         height: 'calc(100vh - 300px)'
       },
+      sortieNoOptions: {
+        stripe: true, // 斑马纹
+        mutiSelect: false, // 多选框
+        index: true, // 显示序号, 多选则 mutiSelect
+        loading: false, // 表格动画
+        initTable: false, // 是否一挂载就加载数据
+        border: true,
+        height: '250px'
+      },
+      SortieNoTableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
       tableCheckItems: [],
       tableData: [],
       tableRequset: {
@@ -222,12 +260,13 @@ export default {
         updateBy: '',
         updateTime: ''
       },
-      agloForm: {
+      executeForm: {
         sortieNo: '',
         aircraftId: '',
-        agloType: '',
-        agloName: '',
-        paramsList: []
+        ossId: '',
+        modelId: '',
+        param: '',
+        columnData: []
       },
       debounceFn: debounce(this.fetch, 500),
       aircaftCatalogAll: [],
@@ -237,7 +276,8 @@ export default {
         { id: 2, name: '扩充' },
         { id: 3, name: '补全' }
       ],
-      algoNameList: [],
+      transferRightData: [],
+      modelList: [],
       percentage: 0,
       sortieNoList: []
     }
@@ -253,23 +293,25 @@ export default {
   },
   methods: {
     async getAircaftCatalogTreeAPI(params) {
-      const { data } = await getAircaftCatalogTree(params)
-      // await getAirConfiguration({})
-      this.menuTreeData = data
-      const getAircaftCatalogAllParams = {
-        keyWord: '',
-        aircaftModelIdList: []
-      }
-      const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
-      this.aircaftCatalogAll = data2
-      if (data.length) {
-        this.currentNodeKey = data[0].id
-        this.currentNode = data[0]
-        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
-          .map((e) => e.id)
-          .toString()
-        this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
-      }
+      try {
+        const { data } = await getAircaftCatalogTree(params)
+        // await getAirConfiguration({})
+        this.menuTreeData = data
+        const getAircaftCatalogAllParams = {
+          keyWord: '',
+          aircaftModelIdList: []
+        }
+        const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
+        this.aircaftCatalogAll = data2
+        if (data.length) {
+          this.currentNodeKey = data[0].id
+          this.currentNode = data[0]
+          this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+            .map((e) => e.id)
+            .toString()
+          this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
+        }
+      } catch (error) {}
     },
 
     async removePreProcessingAPI(params) {
@@ -307,10 +349,11 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getPreProcessing({ pageSize, pageIndex, ...params })
+
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {
@@ -330,21 +373,6 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.dialogVisible = false
-          this.progressVisible = true
-          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.resultVisible = true
-            }
-          }, 30)
           this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
@@ -365,7 +393,7 @@ export default {
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftId = data.id
+      this.currentNodeKey = this.executeForm.aircraftId = data.id
       this.currentNode = data
       this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
         .map((e) => e.id)
@@ -374,33 +402,23 @@ export default {
     },
 
     openDialog() {
+      this.executeForm.aircraftId = this.currentNodeKey
+      if (this.executeForm.aircraftId !== '') {
+        this.changeAircraftId(this.executeForm.aircraftId)
+      }
       this.dialogTitle = '新增'
       this.dialogVisible = true
-      if (this.form.aircraftId !== '') {
-        this.changeAircraftId(this.form.aircraftId)
-      }
     },
 
     handleClose() {
       this.dialogVisible = false
-      this.form = {
-        id: '',
+      this.executeForm = {
         sortieNo: '',
         aircraftId: '',
-        modelType: '',
-        modelName: '',
-        param: '',
-        columnData: [],
         ossId: '',
-        result: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        modelId: '',
+        param: '',
+        columnData: []
       }
     },
 
@@ -409,47 +427,107 @@ export default {
       this.form = deepClone(row)
       this.dialogVisible = true
     },
+
+    changeColumnData(value) {
+      const data = []
+      this.transferData.forEach((item) => {
+        value.forEach((rightData) => {
+          if (rightData === item.key) {
+            data.push(item.label)
+          }
+        })
+      })
+      this.executeForm.columnData = data
+    },
+
+    changeModelId(modelId) {
+      const modelColumnData = JSON.parse(
+        this.modelList.find((item) => {
+          return item.id === modelId
+        }).columnData
+      )
+
+      const labelToKeyMap = this.transferData.reduce((acc, item) => {
+        acc[item.label] = item.key
+        return acc
+      }, {})
+
+      modelColumnData?.forEach((item) => {
+        if (labelToKeyMap.hasOwnProperty(item)) {
+          this.executeForm.columnData.push(item)
+          this.transferRightData.push(labelToKeyMap[item])
+        }
+      })
+    },
+
     checkResultList(row) {
       this.form = deepClone(row)
       this.resultVisible = true
-      // this.agloForm.sortieNo = row.sortieNo
-      // this.agloForm.aircraftId = row.aircraftId
-      // this.$router.push({ name: 'PreResult', params: { agloForm: this.agloForm } })
     },
     executeAglo(row) {
       // this.executeVisible = true
       // this.agloForm.sortieNo = row.sortieNo
       // this.agloForm.aircraftId = row.aircraftId
     },
-    beginExecute() {
-      // 调用模型接口
-
-      // this.executeVisible = false
+    async beginExecute() {
       this.progressVisible = true
-      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()
-        }
-      }, 30)
+      try {
+        const res = await executePreProcessing(this.executeForm)
+        this.percentage += 1
+        const myTimer = setInterval(() => {
+          if (res?.code === 200 && this.percentage == 100) {
+            this.progressVisible = false
+            clearInterval(myTimer)
+            this.percentage = 0
+            this.handleClose()
+            this.$message({
+              type: 'success',
+              message: '执行成功!'
+            })
+            this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
+          } else {
+            this.percentage += 1
+          }
+        }, 30)
+      } catch (error) {
+        this.progressVisible = false
+        clearInterval(myTimer)
+        this.percentage = 0
+      }
     },
     async changeModelType(type) {
-      const {
-        data: { list }
-      } = await getModel({ type })
-      this.algoNameList = list
+      try {
+        const {
+          data: { list }
+        } = await getModel({ type })
+        this.modelList = list
+      } catch (error) {}
     },
 
     async changeAircraftId(aircraftId) {
-      const {
-        data: { list }
-      } = await getDataImport({ aircraftId })
-      this.sortieNoList = list
+      try {
+        const {
+          data: { list }
+        } = await getDataImport({ aircraftId })
+        this.sortieNoList = list
+      } catch (error) {}
+    },
+
+    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) {
+          this.transferData = []
+          res.data.forEach((item, index) => {
+            this.transferData.push({
+              key: index,
+              label: item
+            })
+          })
+        }
+      }
     },
 
     submit() {
@@ -459,8 +537,7 @@ export default {
           this.handleClose()
           break
         case '新增':
-          this.addPreProcessingAPI()
-          this.handleClose()
+          this.beginExecute()
           break
       }
     },

+ 4 - 4
src/views/als/preProcessing/preResult.vue

@@ -180,10 +180,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getModel({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {
@@ -193,10 +193,10 @@ export default {
     async searchClick() {
       if (this.keyWordData) {
         const {
-          data: { list, totalCount }
+          data: { list, total }
         } = await getModel({ name: this.keyWordData })
         this.tableData = list
-        this.tableRequset.total = totalCount
+        this.tableRequset.total = total
       } else {
         this.getModelAPI()
       }

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

@@ -220,10 +220,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getProduct({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -207,10 +207,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getSafeRule({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -239,10 +239,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getSafeRuleSub({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

+ 4 - 4
src/views/als/smTask/SMTaskDetails.vue

@@ -347,10 +347,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getResourceAllocation({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     async getPersonnelAllocationAPI(params) {
@@ -358,10 +358,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset2
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getPersonnelAllocation({ pageSize, pageIndex, ...params })
       this.tableData2 = list
-      this.tableRequset2.total = totalCount
+      this.tableRequset2.total = total
     },
 
     fetch() {

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

@@ -352,10 +352,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getSmTask({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -247,10 +247,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getSmaskRecord({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -287,10 +287,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getSmaskSub({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -226,10 +226,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getSortie({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -223,10 +223,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getSpareParts({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -255,10 +255,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getTask({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

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

@@ -215,10 +215,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getTechnicalDoc({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

+ 4 - 4
src/views/als/trainingData/index.vue

@@ -246,10 +246,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getTechnicalDoc({ pageSize, pageIndex, aircaftModelId: params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {
@@ -260,10 +260,10 @@ export default {
       // this.getTechnicalDocAPI(this.currentNodeKey)
       if (this.keyWordData) {
         const {
-          data: { list, totalCount }
+          data: { list, total }
         } = await getTechnicalDoc({ aircaftModelId: this.currentNodeKey, name: this.keyWordData })
         this.tableData = list
-        this.tableRequset.total = totalCount
+        this.tableRequset.total = total
       } else {
         this.getTechnicalDocAPI(this.currentNodeKey)
       }

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

@@ -250,10 +250,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getWarning({ pageSize, pageIndex, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {