Rmengdi hai 7 meses
pai
achega
9581cca301

+ 127 - 5
package-lock.json

@@ -10,10 +10,13 @@
       "dependencies": {
         "@grapecity/spread-sheets": "^15.1.1",
         "@grapecity/spread-sheets-vue": "^15.1.1",
+        "@riophae/vue-treeselect": "^0.4.0",
         "axios": "^0.27.2",
+        "bignumber.js": "^9.1.0",
         "core-js": "^3.8.3",
         "echarts": "^5.3.2",
         "element-ui": "^2.15.9",
+        "html2canvas": "^1.4.1",
         "lodash": "^4.17.21",
         "md5": "^2.3.0",
         "qs": "^6.10.3",
@@ -21,6 +24,7 @@
         "screenfull": "^6.0.1",
         "vue": "^2.6.14",
         "vue-router": "^3.5.1",
+        "vue-smooth-dnd": "^0.8.1",
         "vuex": "^3.6.2"
       },
       "devDependencies": {
@@ -1845,7 +1849,6 @@
       "version": "7.18.3",
       "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.18.3.tgz",
       "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==",
-      "dev": true,
       "license": "MIT",
       "dependencies": {
         "regenerator-runtime": "^0.13.4"
@@ -2124,6 +2127,24 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/@riophae/vue-treeselect": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmmirror.com/@riophae/vue-treeselect/-/vue-treeselect-0.4.0.tgz",
+      "integrity": "sha512-J4atYmBqXQmiPFK/0B5sXKjtnGc21mBJEiyKIDZwk0Q9XuynVFX6IJ4EpaLmUgL5Tve7HAS7wkiGGSti6Uaxcg==",
+      "dependencies": {
+        "@babel/runtime": "^7.3.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.3",
+        "easings-css": "^1.0.0",
+        "fuzzysearch": "^1.0.3",
+        "is-promise": "^2.1.0",
+        "lodash": "^4.0.0",
+        "material-colors": "^1.2.6",
+        "watch-size": "^2.0.0"
+      },
+      "peerDependencies": {
+        "vue": "^2.2.0"
+      }
+    },
     "node_modules/@sideway/address": {
       "version": "4.1.4",
       "resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.4.tgz",
@@ -3699,6 +3720,14 @@
         "node": "*"
       }
     },
+    "node_modules/bignumber.js": {
+      "version": "9.1.2",
+      "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.2.tgz",
+      "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==",
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/binary-extensions": {
       "version": "2.2.0",
       "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -5475,6 +5504,11 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/easings-css": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/easings-css/-/easings-css-1.0.0.tgz",
+      "integrity": "sha512-7Uq7NdazNfVtr0RNmPAys8it0zKCuaqxJStYKEl72D3j4gbvXhhaM7iWNbqhA4C94ygCye6VuyhzBRQC4szeBg=="
+    },
     "node_modules/easy-stack": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/easy-stack/-/easy-stack-1.0.1.tgz",
@@ -6655,6 +6689,11 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/fuzzysearch": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmmirror.com/fuzzysearch/-/fuzzysearch-1.0.3.tgz",
+      "integrity": "sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg=="
+    },
     "node_modules/gensync": {
       "version": "1.0.0-beta.2",
       "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -7626,6 +7665,11 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/is-promise": {
+      "version": "2.2.2",
+      "resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-2.2.2.tgz",
+      "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
+    },
     "node_modules/is-regex": {
       "version": "1.1.4",
       "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
@@ -8233,6 +8277,11 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/material-colors": {
+      "version": "1.2.6",
+      "resolved": "https://registry.npmmirror.com/material-colors/-/material-colors-1.2.6.tgz",
+      "integrity": "sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg=="
+    },
     "node_modules/md5": {
       "version": "2.3.0",
       "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
@@ -10412,7 +10461,6 @@
       "version": "0.13.9",
       "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
       "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
-      "dev": true,
       "license": "MIT"
     },
     "node_modules/regenerator-transform": {
@@ -11162,6 +11210,11 @@
         "url": "https://github.com/chalk/slice-ansi?sponsor=1"
       }
     },
+    "node_modules/smooth-dnd": {
+      "version": "0.12.1",
+      "resolved": "https://registry.npmmirror.com/smooth-dnd/-/smooth-dnd-0.12.1.tgz",
+      "integrity": "sha512-Dndj/MOG7VP83mvzfGCLGzV2HuK1lWachMtWl/Iuk6zV7noDycIBnflwaPuDzoaapEl3Pc4+ybJArkkx9sxPZg=="
+    },
     "node_modules/sockjs": {
       "version": "0.3.24",
       "resolved": "https://registry.npmmirror.com/sockjs/-/sockjs-0.3.24.tgz",
@@ -12157,6 +12210,14 @@
       "integrity": "sha512-x+/DLAJZv2mcQ7glH2oV9ze8uPwcI+H+GgTgTmb5I55bCgY3+vXWIsqbYUzbBSZnwFHEJku4eoaH/x98veyymQ==",
       "license": "MIT"
     },
+    "node_modules/vue-smooth-dnd": {
+      "version": "0.8.1",
+      "resolved": "https://registry.npmmirror.com/vue-smooth-dnd/-/vue-smooth-dnd-0.8.1.tgz",
+      "integrity": "sha512-eZVVPTwz4A1cs0+CjXx/ihV+gAl3QBoWQnU6+23Gp59t0WBU99z7ducBQ4FvjBamqOlg8SDOE5eFHQedxwB4Wg==",
+      "dependencies": {
+        "smooth-dnd": "0.12.1"
+      }
+    },
     "node_modules/vue-style-loader": {
       "version": "4.1.3",
       "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
@@ -12223,6 +12284,11 @@
         "vue": "^2.0.0"
       }
     },
+    "node_modules/watch-size": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmmirror.com/watch-size/-/watch-size-2.0.0.tgz",
+      "integrity": "sha512-M92R89dNoTPWyCD+HuUEDdhaDnh9jxPGOwlDc0u51jAgmjUvzqaEMynXSr3BaWs+QdHYk4KzibPy1TFtjLmOZQ=="
+    },
     "node_modules/watchpack": {
       "version": "2.4.0",
       "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz",
@@ -14110,7 +14176,6 @@
       "version": "7.18.3",
       "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.18.3.tgz",
       "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==",
-      "dev": true,
       "requires": {
         "regenerator-runtime": "^0.13.4"
       }
@@ -14324,6 +14389,21 @@
       "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==",
       "dev": true
     },
+    "@riophae/vue-treeselect": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmmirror.com/@riophae/vue-treeselect/-/vue-treeselect-0.4.0.tgz",
+      "integrity": "sha512-J4atYmBqXQmiPFK/0B5sXKjtnGc21mBJEiyKIDZwk0Q9XuynVFX6IJ4EpaLmUgL5Tve7HAS7wkiGGSti6Uaxcg==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.3",
+        "easings-css": "^1.0.0",
+        "fuzzysearch": "^1.0.3",
+        "is-promise": "^2.1.0",
+        "lodash": "^4.0.0",
+        "material-colors": "^1.2.6",
+        "watch-size": "^2.0.0"
+      }
+    },
     "@sideway/address": {
       "version": "4.1.4",
       "resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.4.tgz",
@@ -15509,6 +15589,11 @@
       "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
       "dev": true
     },
+    "bignumber.js": {
+      "version": "9.1.2",
+      "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.2.tgz",
+      "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug=="
+    },
     "binary-extensions": {
       "version": "2.2.0",
       "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -16786,6 +16871,11 @@
       "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
       "dev": true
     },
+    "easings-css": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/easings-css/-/easings-css-1.0.0.tgz",
+      "integrity": "sha512-7Uq7NdazNfVtr0RNmPAys8it0zKCuaqxJStYKEl72D3j4gbvXhhaM7iWNbqhA4C94ygCye6VuyhzBRQC4szeBg=="
+    },
     "easy-stack": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/easy-stack/-/easy-stack-1.0.1.tgz",
@@ -17642,6 +17732,11 @@
       "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
       "dev": true
     },
+    "fuzzysearch": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmmirror.com/fuzzysearch/-/fuzzysearch-1.0.3.tgz",
+      "integrity": "sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg=="
+    },
     "gensync": {
       "version": "1.0.0-beta.2",
       "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -18296,6 +18391,11 @@
         "isobject": "^3.0.1"
       }
     },
+    "is-promise": {
+      "version": "2.2.2",
+      "resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-2.2.2.tgz",
+      "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
+    },
     "is-regex": {
       "version": "1.1.4",
       "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
@@ -18735,6 +18835,11 @@
         "semver": "^6.0.0"
       }
     },
+    "material-colors": {
+      "version": "1.2.6",
+      "resolved": "https://registry.npmmirror.com/material-colors/-/material-colors-1.2.6.tgz",
+      "integrity": "sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg=="
+    },
     "md5": {
       "version": "2.3.0",
       "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
@@ -20211,8 +20316,7 @@
     "regenerator-runtime": {
       "version": "0.13.9",
       "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
-      "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
-      "dev": true
+      "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
     },
     "regenerator-transform": {
       "version": "0.15.0",
@@ -20735,6 +20839,11 @@
         "is-fullwidth-code-point": "^3.0.0"
       }
     },
+    "smooth-dnd": {
+      "version": "0.12.1",
+      "resolved": "https://registry.npmmirror.com/smooth-dnd/-/smooth-dnd-0.12.1.tgz",
+      "integrity": "sha512-Dndj/MOG7VP83mvzfGCLGzV2HuK1lWachMtWl/Iuk6zV7noDycIBnflwaPuDzoaapEl3Pc4+ybJArkkx9sxPZg=="
+    },
     "sockjs": {
       "version": "0.3.24",
       "resolved": "https://registry.npmmirror.com/sockjs/-/sockjs-0.3.24.tgz",
@@ -21465,6 +21574,14 @@
       "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz",
       "integrity": "sha512-x+/DLAJZv2mcQ7glH2oV9ze8uPwcI+H+GgTgTmb5I55bCgY3+vXWIsqbYUzbBSZnwFHEJku4eoaH/x98veyymQ=="
     },
+    "vue-smooth-dnd": {
+      "version": "0.8.1",
+      "resolved": "https://registry.npmmirror.com/vue-smooth-dnd/-/vue-smooth-dnd-0.8.1.tgz",
+      "integrity": "sha512-eZVVPTwz4A1cs0+CjXx/ihV+gAl3QBoWQnU6+23Gp59t0WBU99z7ducBQ4FvjBamqOlg8SDOE5eFHQedxwB4Wg==",
+      "requires": {
+        "smooth-dnd": "0.12.1"
+      }
+    },
     "vue-style-loader": {
       "version": "4.1.3",
       "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
@@ -21519,6 +21636,11 @@
       "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==",
       "requires": {}
     },
+    "watch-size": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmmirror.com/watch-size/-/watch-size-2.0.0.tgz",
+      "integrity": "sha512-M92R89dNoTPWyCD+HuUEDdhaDnh9jxPGOwlDc0u51jAgmjUvzqaEMynXSr3BaWs+QdHYk4KzibPy1TFtjLmOZQ=="
+    },
     "watchpack": {
       "version": "2.4.0",
       "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz",

+ 1 - 0
package.json

@@ -10,6 +10,7 @@
   "dependencies": {
     "@grapecity/spread-sheets": "^15.1.1",
     "@grapecity/spread-sheets-vue": "^15.1.1",
+    "@riophae/vue-treeselect": "^0.4.0",
     "axios": "^0.27.2",
     "bignumber.js": "^9.1.0",
     "core-js": "^3.8.3",

+ 2 - 2
src/main.js

@@ -6,7 +6,7 @@ import ElementUI from 'element-ui'
 import { resetForm } from '@/utils/element-ui'
 import { selectDictLabel, parseTime } from '@/utils/dataDict'
 import { mymsgbox, myNotification, popupduration } from '@/utils/variouspopups'
-import dataV from '@jiaminghi/data-view'
+// import dataV from '@jiaminghi/data-view'
 import 'element-ui/lib/theme-chalk/index.css'
 import '@/assets/font/iconfont.css'
 import './pemission'
@@ -50,7 +50,7 @@ Vue.prototype.popupduration = popupduration
 
 Vue.component('FileUpload', FileUpload)
 Vue.use(ElementUI)
-Vue.use(dataV)
+// Vue.use(dataV)
 
 new Vue({
   router,

+ 9 - 7
src/router/modules/als/qualityManage.js

@@ -16,13 +16,15 @@ export const preProcessing = {
       meta: {
         title: '数据预处理'
       }
-      // children: [
-      //   {
-      //     path: '/qualityManage/preProcessing/preResult',
-      //     component: () => import('@/views/als/preProcessing/preResult.vue'),
-      //     hidden: true
-      //   }
-      // ]
+    },
+    {
+      path: '/qualityManage/preProcessing/preResult',
+      component: () => import('@/views/als/preProcessing/preResult.vue'),
+      name: 'PreResult',
+      meta: {
+        title: '预处理结果',
+        hide: true
+      }
     }
   ]
 }

+ 16 - 16
src/router/public-routes.js

@@ -36,21 +36,21 @@ export const publicRoutes = [
         component: () => import('@/views/err-page/401.vue')
       }
     ]
-  },
-  {
-    path: '/preResult',
-    redirect: '/qualityManage/preProcessing/preResult',
-    name: 'preProcessResult',
-    component: Layout,
-    children: [
-      {
-        path: '/qualityManage/preProcessing/preResult',
-        component: () => import('@/views/als/preProcessing/preResult.vue'),
-        name: 'PreResult',
-        meta: {
-          title: '预处理结果'
-        }
-      }
-    ]
   }
+  // {
+  //   path: '/preResult',
+  //   redirect: '/qualityManage/preProcessing/preResult',
+  //   name: 'preProcessResult',
+  //   component: Layout,
+  //   children: [
+  //     {
+  //       path: '/qualityManage/preProcessing/preResult',
+  //       component: () => import('@/views/als/preProcessing/preResult.vue'),
+  //       name: 'PreResult',
+  //       meta: {
+  //         title: '预处理结果'
+  //       }
+  //     }
+  //   ]
+  // }
 ]

+ 18 - 22
src/views/als/MDCData/index.vue

@@ -45,7 +45,6 @@
           </el-form-item>
           <el-form-item label="飞行日期" prop="flightDate">
             <el-date-picker v-model="form.flightDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择飞行日期"> </el-date-picker>
-            <!-- <el-date-picker v-model="form.flightDate" type="datetime" value-format="YYYY-MM-DD HH:MM:SS" placeholder="请选择飞行日期"> </el-date-picker> -->
           </el-form-item>
           <el-form-item label="数据导入" prop="ossId">
             <FileUpload :fileSize="500" :fileType="['xls', 'xlsx']" />
@@ -99,7 +98,6 @@ export default {
           prop: 'ossId',
           label: '文件编号'
         },
-
         {
           prop: 'source',
           label: '数据源'
@@ -222,7 +220,10 @@ export default {
       if (data.length) {
         this.currentNodeKey = data[0].value
         this.currentNode = data[0]
-        this.getDataImportAPI()
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+          .map((e) => e.id)
+          .toString()
+        this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
       }
     },
 
@@ -234,7 +235,8 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getDataImportAPI(this.currentNodeKey === 'quanbu' ? null : this.currentNodeKey)
+          // await this.getDataImportAPI(this.currentNodeKey === 'quanbu' ? null : this.currentNodeKey)
+          await this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
           this.handleClose()
         }
       } catch (error) {}
@@ -262,25 +264,17 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getDataImport({ pageSize, pageIndex, aircraftId: params, source: 2 })
+      } = await getDataImport({ pageSize, pageIndex, ...params, source: 2 })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
 
     fetch() {
-      this.getDataImportAPI(this.currentNodeKey)
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
-    async searchClick() {
-      if (this.keyWordData) {
-        const {
-          data: { list, totalCount }
-        } = await getDataImport({ aircraftId: this.currentNodeKey, sortieNo: this.keyWordData, source: 2 })
-        this.tableData = list
-        this.tableRequset.total = totalCount
-      } else {
-        this.getDataImportAPI(this.currentNodeKey)
-      }
+    searchClick() {
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
     },
 
     async addDataImportAPI() {
@@ -292,7 +286,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getDataImportAPI(this.currentNodeKey)
+          this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -305,17 +299,19 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getDataImportAPI(this.currentNodeKey)
+          this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftId = data.id
+      this.currentNodeKey = data.id
       this.currentNode = data
-      this.form.aircaftModel = data.parentId
-      this.getDataImportAPI(this.currentNodeKey)
+      this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
+        .map((e) => e.id)
+        .toString()
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     openDialog() {
@@ -370,7 +366,7 @@ export default {
     },
 
     remove(row) {
-      this.$confirm('是否删除该机种', '提示', {
+      this.$confirm('是否删除该数据', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'

+ 81 - 56
src/views/als/airConfiguration/index.vue

@@ -6,13 +6,13 @@
     <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.parentId == 0">新增</el-button>
+          <el-button type="success" @click="openDialog()" :disabled="!(currentNode.type == 1 && currentNode.children.length == 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>
+          <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-input placeholder="请输入产品名称" v-model="keyWordData" class="input1">
             <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
           </el-input>
         </div>
@@ -23,6 +23,10 @@
       <!-- 添加或修改飞机构型对话框 -->
       <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="上级名称" prop="conCode">
+            <treeselect v-model="form.parentId" :normalizer="normalizer" :options="tableData" :show-count="true" placeholder="选择上级名称" />
+            <!-- <el-input v-model="form.conCode" placeholder="请输入构型编码" /> -->
+          </el-form-item>
           <el-form-item label="构型编码" prop="conCode">
             <el-input v-model="form.conCode" placeholder="请输入构型编码" />
           </el-form-item>
@@ -41,18 +45,6 @@
           <el-form-item label="描述" prop="remarks">
             <el-input v-model="form.remarks" placeholder="请输入描述" />
           </el-form-item>
-          <!-- <el-form-item label="创建人" prop="createdBy">
-            <el-input v-model="form.createdBy" placeholder="请输入创建人" />
-          </el-form-item>
-          <el-form-item label="创建时间" prop="createdTime">
-            <el-date-picker clearable v-model="form.createdTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择创建时间"> </el-date-picker>
-          </el-form-item>
-          <el-form-item label="更新人" prop="updatedBy">
-            <el-input v-model="form.updatedBy" placeholder="请输入更新人" />
-          </el-form-item>
-          <el-form-item label="更新时间" prop="updatedTime">
-            <el-date-picker clearable v-model="form.updatedTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择更新时间"> </el-date-picker>
-          </el-form-item> -->
         </el-form>
 
         <span slot="footer" class="dialog-footer">
@@ -68,15 +60,19 @@
 import { getAirConfiguration, addAirConfiguration, updateAirConfiguration, removeAirConfiguration } from '@/api/als/airConfiguration'
 import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
 import { deepClone, debounce } from '@/utils/index'
+import { getAircaftModelAll } from '@/api/als/aircraft'
+import { handleTree } from '../utils/common'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 export default {
   name: 'AirConfiguration',
-  components: {},
+  components: { Treeselect },
   data() {
     // 这里存放数据
     return {
       dialogTitle: '新增',
       dialogVisible: false,
-      keyWord: '',
+      keyWordData: '',
       aircaftModelIdList: [],
       currentNodeKey: '',
       currentNode: {},
@@ -99,7 +95,15 @@ export default {
         { prop: 'id', label: '唯一ID' },
         {
           prop: 'aircraftType',
-          label: '机型'
+          label: '机型',
+          render: (h, params) => {
+            const matchedItem = this.aircaftModelAll.find((item) => params.row.aircraftType === item.aircaftModelId)
+            if (matchedItem) {
+              return h('span', matchedItem.aircaftModelName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'conCode',
@@ -125,22 +129,6 @@ export default {
           prop: 'remarks',
           label: '描述'
         },
-        {
-          prop: 'createdBy',
-          label: '创建人'
-        },
-        {
-          prop: 'createdTime',
-          label: '创建时间'
-        },
-        {
-          prop: 'updatedBy',
-          label: '更新人'
-        },
-        {
-          prop: 'updatedTime',
-          label: '更新时间'
-        },
         {
           button: true,
           label: '操作',
@@ -152,7 +140,7 @@ export default {
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                _this.handUpdate(row)
+                this.handUpdate(row)
               }
             },
             {
@@ -161,7 +149,7 @@ export default {
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                _this.remove([row])
+                this.remove([row])
               }
             }
           ]
@@ -174,7 +162,11 @@ export default {
         loading: false, // 表格动画
         initTable: false, // 是否一挂载就加载数据
         border: true,
-        height: 'calc(100vh - 300px)'
+        height: 'calc(100vh - 300px)',
+        treeProps: {
+          children: 'children',
+          hasChildren: 'hasChildren'
+        }
       },
       tableCheckItems: [],
       tableData: [],
@@ -201,7 +193,8 @@ export default {
         updatedBy: '',
         updatedTime: ''
       },
-      debounceFn: debounce(this.fetch, 500)
+      debounceFn: debounce(this.fetch, 500),
+      aircaftModelAll: []
     }
   },
   watch: {
@@ -217,10 +210,32 @@ export default {
     async getAircaftCatalogTreeAPI(params) {
       const { data } = await getAircaftTypeAndModelTree(params)
       this.menuTreeData = data
+      const getAircaftModelAllParams = {
+        aircaftTypeCode: '',
+        aircaftTypeId: '',
+        queryParam: ''
+      }
+      const { data: data1 } = await getAircaftModelAll(getAircaftModelAllParams)
+      this.aircaftModelAll = data1
       if (data.length) {
         this.currentNodeKey = data[0].id
         this.currentNode = data[0]
-        this.getAirConfigurationAPI()
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+          .map((e) => e.id)
+          .toString()
+        this.getAirConfigurationAPI({ aircraftType: this.aircaftModelIdList })
+        // this.getAirConfigurationAPI()
+      }
+    },
+
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children
+      }
+      return {
+        id: node.id,
+        label: node.name,
+        children: node.children
       }
     },
 
@@ -232,7 +247,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getAirConfigurationAPI(this.currentNodeKey)
+          await this.getAirConfigurationAPI({ aircraftType: this.aircaftModelIdList })
           this.handleClose()
         }
       } catch (error) {}
@@ -258,19 +273,28 @@ export default {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
-      const {
-        data: { list, totalCount }
-      } = await getAirConfiguration({ pageSize, pageIndex, aircraftId: params })
-      this.tableData = list
-      this.tableRequset.total = totalCount
+      const { data } = await getAirConfiguration({ pageSize, pageIndex, ...params })
+      this.tableData = []
+      if (!(this.currentNode.type == 1 && this.currentNode.children.length == 0)) {
+        if (data?.length !== 0) {
+          const allData = handleTree(data, 'id')
+          this.tableData = allData
+        }
+      } else {
+        const menu = { id: 1, aircraftType: this.currentNode.id, name: '整机', children: [] }
+        if (data?.length !== 0) {
+          menu.children = handleTree(data, 'id')
+          this.tableData.push(menu)
+        }
+      }
     },
 
     fetch() {
-      this.getAirConfigurationAPI(this.currentNodeKey)
+      this.getAirConfigurationAPI({ aircraftType: this.aircaftModelIdList })
     },
 
     searchClick() {
-      this.getAirConfigurationAPI(this.currentNodeKey)
+      this.getAirConfigurationAPI({ aircraftType: this.aircaftModelIdList, name: this.keyWordData })
     },
 
     async addAirConfigurationAPI() {
@@ -282,7 +306,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getAirConfigurationAPI(this.currentNodeKey)
+          this.getAirConfigurationAPI({ aircraftType: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -295,24 +319,25 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getAirConfigurationAPI(this.currentNodeKey)
+          this.getAirConfigurationAPI({ aircraftType: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftId = data.id
+      this.currentNodeKey = data.id
       this.currentNode = data
-      this.form.aircraftType = data.label
-      this.getAirConfigurationAPI(this.currentNodeKey)
+      this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
+        .map((e) => e.id)
+        .toString()
+      this.getAirConfigurationAPI({ aircraftType: this.aircaftModelIdList })
     },
 
     openDialog() {
       this.dialogTitle = '新增'
       this.dialogVisible = true
-      this.form.aircraftId = this.currentNodeKey
-      this.form.aircraftType = this.currentNode.label
+      this.form.aircraftType = this.currentNodeKey
     },
 
     handleClose() {
@@ -360,7 +385,7 @@ export default {
     },
 
     remove(row) {
-      this.$confirm('是否删除该机种', '提示', {
+      this.$confirm('是否删除该数据', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'

+ 54 - 46
src/views/als/airInstall/index.vue

@@ -1,12 +1,13 @@
 <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 class="view-dataSpecies-left" style="display: flex; width: 430px">
+      <MenuTree :currentNodeKey="currentNodeKey" nodeKey="id" :treedata="menuTreeData" @TreeNodeclick="treeNodeClick" v-bind="treeObj" style="width: 250px"> </MenuTree>
+      <MenuTree :currentNodeKey="currentConfigNodeKey" nodeKey="id" :treedata="configTreeData" @TreeNodeclick="treeConfigNodeClick" v-bind="configurationTreeObj" style="width: 250px"> </MenuTree>
     </div>
-    <div class="view-dataSpecies-right">
+    <div class="view-dataSpecies-right" style="width: calc(100% - 460px)">
       <div class="view-dataType-title">
         <div class="view-dataType-title-btn">
-          <el-button type="success" @click="openDialog()" :disabled="!(currentNode.type == 1 && currentNode.children.length == 0)">新增</el-button>
+          <el-button type="success" @click="openDialog()" :disabled="currentConfigNodeKey === ''">新增</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>
@@ -17,9 +18,11 @@
           </el-input>
         </div>
       </div>
+
       <div class="view-dataType-table">
         <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="600px" :before-close="handleClose">
         <el-form ref="form" :model="form" label-width="80px">
@@ -75,6 +78,7 @@
 import { getAirInstall, addAirInstall, updateAirInstall, removeAirInstall } from '@/api/als/airInstall'
 import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
 import { getAircaftModelAll, getAircaftCatalogAll } from '@/api/als/aircraft'
+import { getAirConfiguration } from '@/api/als/airConfiguration'
 import { deepClone, debounce } from '@/utils/index'
 export default {
   name: 'AirInstall',
@@ -88,7 +92,10 @@ export default {
       aircaftModelIdList: [],
       currentNodeKey: '',
       currentNode: {},
+      currentConfigNodeKey: '',
+      currentConfigNode: {},
       menuTreeData: [],
+      configTreeData: [],
       treeObj: {
         title: '所属机种',
         activityheight: '275px',
@@ -98,6 +105,15 @@ export default {
           label: 'label'
         }
       },
+      configurationTreeObj: {
+        title: '飞机构型',
+        activityheight: '275px',
+        searchIcon: false,
+        configure: {
+          children: 'children',
+          label: 'name'
+        }
+      },
       typeTree: {
         children: 'children',
         label: 'label'
@@ -145,26 +161,6 @@ export default {
           prop: 'serviceLife',
           label: '是否有寿'
         },
-        {
-          prop: 'remarks',
-          label: '备注'
-        },
-        {
-          prop: 'createdBy',
-          label: '创建人'
-        },
-        {
-          prop: 'createdTime',
-          label: '创建时间'
-        },
-        {
-          prop: 'updatedBy',
-          label: '更新人'
-        },
-        {
-          prop: 'updatedTime',
-          label: '更新时间'
-        },
         {
           button: true,
           label: '操作',
@@ -245,22 +241,22 @@ export default {
     async getAircaftCatalogTreeAPI(params) {
       const { data } = await getAircaftCatalogTree(params)
       this.menuTreeData = data
-      if (data.length) {
-        this.currentNodeKey = data[0].id
-        this.currentNode = data[0]
-        this.getAirInstallAPI()
-      }
+      // if (data.length) {
+      //   this.currentNodeKey = data[0].id
+      //   this.currentNode = data[0]
+      //   this.getAirInstallAPI()
+      // }
     },
 
     async removeAirInstallAPI(params) {
       try {
-        const { success } = await removeAirInstall(params)
-        if (success) {
+        const { code } = await removeAirInstall(params)
+        if (code === 200) {
           this.$message({
             type: 'success',
             message: '操作成功!'
           })
-          await this.getAirInstallAPI(this.currentNodeKey)
+          await this.getAirInstallAPI({ airConfigurationId: this.currentConfigNodeKey })
           this.handleClose()
         }
       } catch (error) {}
@@ -288,52 +284,64 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getAirInstall({ pageSize, pageIndex, aircraftId: params })
+      } = await getAirInstall({ pageSize, pageIndex, ...params })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
 
     fetch() {
-      this.getAirInstallAPI(this.currentNodeKey)
+      this.getAirInstallAPI({ airConfigurationId: this.currentConfigNodeKey })
     },
 
     searchClick() {
-      this.getAirInstallAPI(this.currentNodeKey)
+      this.getAirInstallAPI({ airConfigurationId: this.currentConfigNodeKey })
     },
 
     async addAirInstallAPI() {
       try {
         delete this.form.aircaftModelName
-        const { success } = await addAirInstall({ ...this.form })
-        if (success) {
+        const { code } = await addAirInstall({ ...this.form })
+        if (code === 200) {
           this.$message({
             type: 'success',
             message: '操作成功!'
           })
-          this.getAirInstallAPI(this.currentNodeKey)
+          this.getAirInstallAPI({ airConfigurationId: this.currentConfigNodeKey })
         }
       } catch (error) {}
     },
 
     async updateAirInstallAPI() {
       try {
-        const { success } = await updateAirInstall({ ...this.form })
-        if (success) {
+        const { code } = await updateAirInstall({ ...this.form })
+        if (code === 200) {
           this.$message({
             type: 'success',
             message: '操作成功!'
           })
-          this.getAirInstallAPI(this.currentNodeKey)
+          this.getAirInstallAPI({ airConfigurationId: this.currentConfigNodeKey })
         }
       } catch (error) {}
     },
 
-    treeNodeClick(data) {
+    async treeNodeClick(data) {
+      // this.$refs.table.clearSelection()
+      // this.currentNodeKey = this.form.aircraftId = data.id
+      // this.currentNode = data
+      // this.form.aircraftType = data.label
+      // this.getAirInstallAPI(this.currentNodeKey)
+      this.configTreeData = []
+      const { data: data1 } = await getAirConfiguration({ aircraftType: data.parentId })
+      const topNode = { id: 1, name: '整机', children: [] }
+      topNode.children = data1
+      this.configTreeData.push(topNode)
+    },
+
+    treeConfigNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftId = data.id
-      this.currentNode = data
-      this.form.aircraftType = data.label
-      this.getAirInstallAPI(this.currentNodeKey)
+      this.currentConfigNodeKey = data.id
+      this.currentConfigNode = data
+      this.getAirInstallAPI({ airConfigurationId: this.currentConfigNodeKey })
     },
 
     openDialog() {

+ 83 - 37
src/views/als/faultCase/index.vue

@@ -23,21 +23,50 @@
       <!-- 添加或修改故障案例对话框 -->
       <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="飞机编号" prop="aircraftCode">
+            <el-select v-model="form.aircraftCode" placeholder="请选择飞机编号">
+              <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="故障代码" prop="faultCode">
             <el-input v-model="form.faultCode" placeholder="请输入故障代码" />
           </el-form-item>
           <el-form-item label="故障名称" prop="faultName">
             <el-input v-model="form.faultName" placeholder="请输入故障名称" />
           </el-form-item>
+          <el-form-item label="故障文件" prop="ossId">
+            <FileUpload :fileSize="500" :fileType="['xls', 'xlsx']" />
+          </el-form-item>
+          <el-form-item label="故障日期" prop="faultDate">
+            <el-date-picker v-model="form.faultDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择故障日期"> </el-date-picker>
+          </el-form-item>
+          <el-form-item label="所属系统" prop="systemItem">
+            <el-select v-model="form.systemItem" placeholder="请选择所属系统">
+              <el-option v-for="item in systemItemList" :key="item.id" :label="item.label" :value="item.id"> </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="专业" prop="specialty">
+            <el-input v-model="form.specialty" placeholder="请输入专业" />
+          </el-form-item>
           <el-form-item label="故障位置" prop="location">
             <el-input v-model="form.location" placeholder="请输入故障位置" />
           </el-form-item>
-          <el-form-item label="故障等级" prop="level">
-            <el-input v-model="form.level" placeholder="请输入故障等级" />
+          <el-form-item label="故障性质" prop="level">
+            <el-select v-model="form.level" placeholder="请输入故障性质">
+              <el-option v-for="item in levelList" :key="item.id" :label="item.label" :value="item.id"> </el-option>
+            </el-select>
           </el-form-item>
           <el-form-item label="故障现象" prop="symptoms">
             <el-input v-model="form.symptoms" placeholder="请输入故障现象" />
           </el-form-item>
+          <el-form-item label="排除方法" prop="methodRectification">
+            <el-input v-model="form.methodRectification" placeholder="请输入排除方法" />
+          </el-form-item>
+          <el-form-item label="故障原因分类" label-width="100px" prop="faultCauseType">
+            <el-select v-model="form.faultCauseType" placeholder="请输入故障原因分类">
+              <el-option v-for="item in faultCauseTypeList" :key="item.id" :label="item.label" :value="item.id"> </el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="故障原因" prop="faultCause">
             <el-input v-model="form.faultCause" placeholder="请输入故障原因" />
           </el-form-item>
@@ -58,6 +87,7 @@
 <script>
 import { getFaultCase, addFaultCase, updateFaultCase, removeFaultCase } from '@/api/als/faultCase'
 import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
+import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
 export default {
   name: 'FaultCase',
@@ -93,32 +123,32 @@ export default {
           label: '机型'
         },
         {
-          prop: 'faultCode',
-          label: '故障代码'
+          prop: 'aircraftCode',
+          label: '飞机编号'
         },
         {
           prop: 'faultName',
           label: '故障名称'
         },
         {
-          prop: 'location',
-          label: '故障位置'
+          prop: 'faultDate',
+          label: '故障日期'
         },
         {
-          prop: 'level',
-          label: '故障等级'
+          prop: 'systemItem',
+          label: '所属系统'
         },
         {
-          prop: 'symptoms',
-          label: '故障现象'
+          prop: 'faultCauseType',
+          label: '故障原因分类'
         },
         {
-          prop: 'faultCause',
-          label: '故障原因'
+          prop: 'level',
+          label: '故障性质'
         },
         {
-          prop: 'remarks',
-          label: '备注'
+          prop: 'ossId',
+          label: '文件'
         },
         {
           button: true,
@@ -166,10 +196,17 @@ export default {
       form: {
         id: '',
         aircraftType: '',
+        aircraftCode: '',
         faultCode: '',
         faultName: '',
+        ossId: '',
+        faultDate: '',
+        systemItem: '',
+        specialty: '',
+        faultCauseType: '',
         location: '',
         level: '',
+        methodRectification: '',
         symptoms: '',
         faultCause: '',
         remarks: '',
@@ -181,7 +218,21 @@ export default {
         updateBy: '',
         updateTime: ''
       },
-      debounceFn: debounce(this.fetch, 500)
+      debounceFn: debounce(this.fetch, 500),
+      aircaftCatalogAll: [],
+      systemItemList: [{ id: 1, label: '特设' }],
+      levelList: [
+        { id: 1, label: '一般故障' },
+        { id: 2, label: '较大故障' },
+        { id: 3, label: '重大故障' }
+      ],
+      faultCauseTypeList: [
+        { id: 1, label: '设计原因' },
+        { id: 2, label: '制造原因' },
+        { id: 3, label: '使用维护' },
+        { id: 4, label: '成品维护' },
+        { id: 5, label: '其他原因' }
+      ]
     }
   },
   watch: {
@@ -200,7 +251,10 @@ export default {
       if (data.length) {
         this.currentNodeKey = data[0].id
         this.currentNode = data[0]
-        this.getFaultCaseAPI()
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+          .map((e) => e.id)
+          .toString()
+        this.getFaultCaseAPI({ aircraftType: this.aircaftModelIdList })
       }
     },
 
@@ -212,7 +266,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getFaultCaseAPI(this.currentNode.label)
+          await this.getFaultCaseAPI({ aircraftType: this.aircaftModelIdList })
           this.handleClose()
         }
       } catch (error) {}
@@ -240,26 +294,17 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getFaultCase({ pageSize, pageIndex, aircraftType: params })
+      } = await getFaultCase({ pageSize, pageIndex, ...params })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
 
     fetch() {
-      this.getFaultCaseAPI(this.currentNode.label)
+      this.getFaultCaseAPI({ aircraftType: this.aircaftModelIdList })
     },
 
     async searchClick() {
-      // this.getFaultCaseAPI(this.currentNode.label)
-      if (this.keyWordData) {
-        const {
-          data: { list, totalCount }
-        } = await getFaultCase({ faultName: this.keyWordData })
-        this.tableData = list
-        this.tableRequset.total = totalCount
-      } else {
-        this.getFaultCaseAPI()
-      }
+      this.getFaultCaseAPI({ aircraftType: this.aircaftModelIdList, faultName: this.keyWordData })
     },
 
     async addFaultCaseAPI() {
@@ -271,7 +316,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getFaultCaseAPI(this.currentNode.label)
+          this.getFaultCaseAPI({ aircraftType: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -284,21 +329,22 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getFaultCaseAPI(this.currentNode.label)
+          this.getFaultCaseAPI({ aircraftType: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
 
-    treeNodeClick(data) {
+    async treeNodeClick(data) {
       this.$refs.table.clearSelection()
       this.currentNodeKey = data.id
       this.currentNode = data
-      this.aircraftType = data.label
-      if (data.value === 'quanbu') {
-        this.getFaultCaseAPI()
-      } else {
-        this.getFaultCaseAPI(this.currentNode.label)
+      this.getFaultCaseAPI({ aircraftType: this.aircaftModelIdList })
+      const getAircaftCatalogAllParams = {
+        keyWord: '',
+        aircaftModelIdList: [this.currentNodeKey]
       }
+      const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
+      this.aircaftCatalogAll = data2
     },
 
     openDialog() {

+ 17 - 20
src/views/als/flightData/index.vue

@@ -220,9 +220,12 @@ export default {
       const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
       this.aircaftCatalogAll = data2
       if (data.length) {
-        this.currentNodeKey = data[0].value
+        this.currentNodeKey = data[0].id
         this.currentNode = data[0]
-        this.getDataImportAPI()
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+          .map((e) => e.id)
+          .toString()
+        this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
       }
     },
 
@@ -234,7 +237,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getDataImportAPI(this.currentNodeKey === 'quanbu' ? null : this.currentNodeKey)
+          await this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
           this.handleClose()
         }
       } catch (error) {}
@@ -262,25 +265,17 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getDataImport({ pageSize, pageIndex, aircraftId: params, source: 1 })
+      } = await getDataImport({ pageSize, pageIndex, ...params, source: 1 })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
 
     fetch() {
-      this.getDataImportAPI(this.currentNodeKey)
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     async searchClick() {
-      if (this.keyWordData) {
-        const {
-          data: { list, totalCount }
-        } = await getDataImport({ aircraftId: this.currentNodeKey, sortieNo: this.keyWordData, source: 1 })
-        this.tableData = list
-        this.tableRequset.total = totalCount
-      } else {
-        this.getDataImportAPI(this.currentNodeKey)
-      }
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
     },
 
     async addDataImportAPI() {
@@ -292,7 +287,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getDataImportAPI(this.currentNodeKey)
+          this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -305,17 +300,19 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getDataImportAPI(this.currentNodeKey)
+          this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftId = data.id
+      this.currentNodeKey = data.id
       this.currentNode = data
-      this.form.aircaftModel = data.parentId
-      this.getDataImportAPI(this.currentNodeKey)
+      this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
+        .map((e) => e.id)
+        .toString()
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     openDialog() {
@@ -370,7 +367,7 @@ export default {
     },
 
     remove(row) {
-      this.$confirm('是否删除该机种', '提示', {
+      this.$confirm('是否删除该数据', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'

+ 20 - 14
src/views/als/maintenanceRecord/index.vue

@@ -12,7 +12,7 @@
           <el-button type="primary">导出</el-button>
         </div>
         <div class="view-dataType-title-search">
-          <el-input placeholder="请输入关键字" v-model="keyWord" class="input1">
+          <el-input placeholder="请输入故障件名称" v-model="keyWord" class="input1">
             <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
           </el-input>
         </div>
@@ -303,7 +303,7 @@ export default {
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                _this.handUpdate(row)
+                this.handUpdate(row)
               }
             },
             {
@@ -312,7 +312,7 @@ export default {
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                _this.remove([row])
+                this.remove([row])
               }
             }
           ]
@@ -408,7 +408,11 @@ export default {
       if (data.length) {
         this.currentNodeKey = data[0].id
         this.currentNode = data[0]
-        this.getMaintenanceRecordAPI()
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+          .map((e) => e.id)
+          .toString()
+        this.getMaintenanceRecordAPI({ aircraftId: this.aircaftModelIdList })
+        // this.getMaintenanceRecordAPI()
       }
     },
 
@@ -420,7 +424,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getMaintenanceRecordAPI(this.currentNodeKey)
+          await this.getMaintenanceRecordAPI({ aircraftId: this.aircaftModelIdList })
           this.handleClose()
         }
       } catch (error) {}
@@ -448,17 +452,17 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getMaintenanceRecord({ pageSize, pageIndex, aircraftId: params })
+      } = await getMaintenanceRecord({ pageSize, pageIndex, ...params })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
 
     fetch() {
-      this.getMaintenanceRecordAPI(this.currentNodeKey)
+      this.getMaintenanceRecordAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     searchClick() {
-      this.getMaintenanceRecordAPI(this.currentNodeKey)
+      this.getMaintenanceRecordAPI({ aircraftId: this.aircaftModelIdList, itemName: this.keyWord })
     },
 
     async addMaintenanceRecordAPI() {
@@ -470,7 +474,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getMaintenanceRecordAPI(this.currentNodeKey)
+          this.getMaintenanceRecordAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -483,17 +487,19 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getMaintenanceRecordAPI(this.currentNodeKey)
+          this.getMaintenanceRecordAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftId = data.id
+      this.currentNodeKey = data.id
       this.currentNode = data
-      this.form.aircraftType = data.parentId
-      this.getMaintenanceRecordAPI(this.currentNodeKey)
+      this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
+        .map((e) => e.id)
+        .toString()
+      this.getMaintenanceRecordAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     openDialog() {
@@ -570,7 +576,7 @@ export default {
     },
 
     remove(row) {
-      this.$confirm('是否删除该机种', '提示', {
+      this.$confirm('是否删除该数据', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'

+ 18 - 20
src/views/als/partReplacement/index.vue

@@ -80,7 +80,7 @@ export default {
       dialogTitle: '新增',
       dialogVisible: false,
       keyWordData: '',
-      aircaftModelIdList: [],
+      aircraftCodeIdList: [],
       currentNodeKey: '',
       currentNode: {},
       menuTreeData: [],
@@ -232,7 +232,11 @@ export default {
       if (data.length) {
         this.currentNodeKey = data[0].id
         this.currentNode = data[0]
-        this.getPartReplacementAPI()
+        this.aircraftCodeIdList = this.getTreeLeafData(data[0]?.children)
+          .map((e) => e.id)
+          .toString()
+        this.getPartReplacementAPI({ aircraftCode: this.aircraftCodeIdList })
+        // this.getPartReplacementAPI()
       }
     },
 
@@ -244,7 +248,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getPartReplacementAPI(this.currentNodeKey)
+          await this.getPartReplacementAPI({ aircraftCode: this.aircraftCodeIdList })
           this.handleClose()
         }
       } catch (error) {}
@@ -272,25 +276,17 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getPartReplacement({ pageSize, pageIndex, aircraftCode: params })
+      } = await getPartReplacement({ pageSize, pageIndex, ...params })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
 
     fetch() {
-      this.getPartReplacementAPI(this.currentNodeKey)
+      this.getPartReplacementAPI({ aircraftCode: this.aircraftCodeIdList })
     },
 
     async searchClick() {
-      if (this.keyWordData) {
-        const {
-          data: { list, totalCount }
-        } = await getPartReplacement({ aircraftCode: this.currentNodeKey, beforeEquipmentName: this.keyWordData })
-        this.tableData = list
-        this.tableRequset.total = totalCount
-      } else {
-        this.getPartReplacementAPI(this.currentNodeKey)
-      }
+      this.getPartReplacementAPI({ aircraftCode: this.aircraftCodeIdList, beforeEquipmentName: this.keyWordData })
     },
 
     async addPartReplacementAPI() {
@@ -302,7 +298,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getPartReplacementAPI(this.currentNodeKey)
+          this.getPartReplacementAPI({ aircraftCode: this.aircraftCodeIdList })
         }
       } catch (error) {}
     },
@@ -315,17 +311,19 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getPartReplacementAPI(this.currentNodeKey)
+          this.getPartReplacementAPI({ aircraftCode: this.aircraftCodeIdList })
         }
       } catch (error) {}
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftCode = data.id
+      this.currentNodeKey = data.id
       this.currentNode = data
-      this.form.aircraftType = data.label
-      this.getPartReplacementAPI(this.currentNodeKey)
+      this.aircraftCodeIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
+        .map((e) => e.id)
+        .toString()
+      this.getPartReplacementAPI({ aircraftCode: this.aircraftCodeIdList })
     },
 
     openDialog() {
@@ -382,7 +380,7 @@ export default {
     },
 
     remove(row) {
-      this.$confirm('是否删除该机种', '提示', {
+      this.$confirm('是否删除该数据', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'

+ 84 - 47
src/views/als/preProcessing/index.vue

@@ -6,13 +6,11 @@
     <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="success" @click="openDialog()" :disabled="!(currentNode.type == 1 && currentNode.children.length == 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="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>
@@ -21,26 +19,38 @@
         <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="600px" :before-close="handleClose">
+      <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-form-item label="架次号" prop="sortieNo">
-            <el-input v-model="form.sortieNo" placeholder="请输入架次号" />
+            <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="机号" prop="aircraftId">
-            <el-input v-model="form.aircraftId" placeholder="请输入机号" />
+          <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>
           </el-form-item>
           <el-form-item label="参数" prop="param">
             <el-input v-model="form.param" placeholder="请输入参数" />
           </el-form-item>
-          <el-form-item label="数据列" prop="columnData">
-            <el-input v-model="form.columnData" placeholder="请输入数据列" />
+          <el-form-item label="选择数据列">
+            <el-transfer v-model="form.columnData" :data="transferData"></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="结果" prop="result">
-            <el-input v-model="form.result" placeholder="请输入结果" />
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
 
         <span slot="footer" class="dialog-footer">
@@ -49,7 +59,7 @@
         </span>
       </el-dialog>
       <!-- 算法执行页面 -->
-      <el-dialog title="选择算法" :visible.sync="executeVisible" width="800px" :before-close="handleClose">
+      <!-- <el-dialog title="选择算法" :visible.sync="executeVisible" width="800px" :before-close="handleClose">
         <el-form :inline="true" :model="agloForm" class="demo-form-inline">
           <el-form-item label="算法类型">
             <el-select v-model="agloForm.agloType" placeholder="请选择算法类型" @change="changeAgloType(agloForm.agloType)">
@@ -72,7 +82,7 @@
       </el-dialog>
       <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> -->
     </div>
   </div>
 </template>
@@ -83,7 +93,9 @@ import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { getDataImport } from '@/api/als/dataImport'
 import { getModel } from '@/api/als/model'
+import { getAirConfiguration } from '@/api/als/airConfiguration'
 import { deepClone, debounce } from '@/utils/index'
+
 export default {
   name: 'PreProcessing',
   components: {},
@@ -212,6 +224,7 @@ export default {
         sortieNo: '',
         aircraftId: '',
         modelType: '',
+        modelName: '',
         param: '',
         columnData: '',
         ossId: '',
@@ -241,7 +254,8 @@ export default {
         { id: 3, name: '补全' }
       ],
       algoNameList: [],
-      percentage: 0
+      percentage: 0,
+      sortieNoList: []
     }
   },
   watch: {
@@ -256,6 +270,7 @@ export default {
   methods: {
     async getAircaftCatalogTreeAPI(params) {
       const { data } = await getAircaftCatalogTree(params)
+      // await getAirConfiguration({})
       this.menuTreeData = data
       const getAircaftCatalogAllParams = {
         keyWord: '',
@@ -264,10 +279,13 @@ export default {
       const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
       this.aircaftCatalogAll = data2
       if (data.length) {
-        this.currentNodeKey = data[0].value
+        this.currentNodeKey = data[0].id
         this.currentNode = data[0]
-        // this.getPreProcessingAPI(this.currentNodeKey)
-        this.getDataImportAPI()
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
+          .map((e) => e.id)
+          .toString()
+        this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
+        // this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
       }
     },
 
@@ -279,7 +297,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getPreProcessingAPI(this.currentNodeKey)
+          await this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
           this.handleClose()
         }
       } catch (error) {}
@@ -307,7 +325,7 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getPreProcessing({ pageSize, pageIndex, aircraftId: params })
+      } = await getPreProcessing({ pageSize, pageIndex, ...params })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
@@ -317,26 +335,18 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, totalCount }
-      } = await getDataImport({ pageSize, pageIndex, aircraftId: params })
+      } = await getDataImport({ pageSize, pageIndex, ...params })
       this.tableData = list
       this.tableRequset.total = totalCount
     },
 
     fetch() {
-      this.getPreProcessingAPI(this.currentNodeKey)
+      this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     async searchClick() {
-      // this.getPreProcessingAPI(this.currentNodeKey)
-      if (this.keyWordData && this.currentNodeKey !== 'quanbu') {
-        const {
-          data: { list, totalCount }
-        } = await getDataImport({ aircraftId: this.currentNodeKey, sortieNo: this.keyWordData })
-        this.tableData = list
-        this.tableRequset.total = totalCount
-      } else {
-        this.getDataImportAPI(this.currentNodeKey)
-      }
+      this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
+      // this.getDataImportAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
     },
 
     async addPreProcessingAPI() {
@@ -348,7 +358,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getPreProcessingAPI(this.currentNodeKey)
+          this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -361,31 +371,49 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          this.getPreProcessingAPI(this.currentNodeKey)
+          this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = data.id
+      this.currentNodeKey = this.form.aircraftId = data.id
       this.currentNode = data
-      this.getDataImportAPI(this.currentNodeKey)
+      this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
+        .map((e) => e.id)
+        .toString()
+      this.getPreProcessingAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     openDialog() {
       this.dialogTitle = '新增'
       this.dialogVisible = true
-      this.form.aircaftModelName = this.currentNode.label
-      this.form.aircaftModelId = this.currentNode.id
+      if (this.form.aircraftId !== '') {
+        this.changeAircraftId(this.form.aircraftId)
+      }
     },
 
     handleClose() {
-      this.executeVisible = false
-      this.agloForm = {
-        agloType: '',
-        agloName: '',
-        paramsList: []
+      this.dialogVisible = false
+      this.form = {
+        id: '',
+        sortieNo: '',
+        aircraftId: '',
+        modelType: '',
+        modelName: '',
+        param: '',
+        columnData: '',
+        ossId: '',
+        result: '',
+        status: '',
+        tenantId: '',
+        version: '',
+        delFlag: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
       }
     },
 
@@ -421,13 +449,22 @@ export default {
         }
       }, 30)
     },
-    async changeAgloType(type) {
+    async changeModelType(type) {
       const {
         data: { list }
       } = await getModel({ type })
       this.algoNameList = list
     },
 
+    async changeAircraftId(aircraftId) {
+      const {
+        data: { list }
+      } = await getDataImport({ aircraftId })
+      debugger
+      console.log('list', list)
+      this.sortieNoList = list
+    },
+
     submit() {
       switch (this.dialogTitle) {
         case '编辑':

+ 12 - 2
src/views/als/preProcessing/preResult.vue

@@ -33,7 +33,7 @@
             <el-input v-model="form.dataParams" placeholder="请输入参数" />
           </el-form-item>
         </el-form>
-        <div style="height: 200px">虚警抑制结果</div>
+        <div style="height: 200px">算法结果</div>
         <span slot="footer" class="dialog-footer">
           <el-button type="primary">确 定</el-button>
         </span>
@@ -91,6 +91,15 @@ export default {
                 this.checkResult(row)
               }
             },
+            {
+              name: '执行',
+              type: 'text',
+              round: false,
+              plain: false,
+              onClick: (row, index, scope) => {
+                this.executeAglo(row)
+              }
+            },
             {
               name: '删除',
               type: 'text',
@@ -227,7 +236,8 @@ export default {
     },
     backPage() {
       this.$router.go(-1)
-    }
+    },
+    executeAglo(row) {}
   }
 }
 </script>

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

@@ -35,7 +35,7 @@
           <el-form-item label="资料类型" prop="type">
             <el-input v-model="form.type" placeholder="请输入资料类型" />
           </el-form-item>
-          <el-form-item label="机型" prop="aircaftModel">
+          <el-form-item label="机型" prop="aircaftModelId">
             <el-select v-model="form.aircaftModelId" placeholder="请选择机型" disabled>
               <el-option v-for="item in aircaftModelAll" :key="item.aircaftModelId" :label="item.aircaftModelName" :value="item.aircaftModelId"> </el-option>
             </el-select>
@@ -107,7 +107,15 @@ export default {
         },
         {
           prop: 'aircaftModelId',
-          label: '所属机型'
+          label: '所属机型',
+          render: (h, params) => {
+            const matchedItem = this.aircaftModelAll.find((item) => params.row.aircraftType === item.aircaftModelId)
+            if (matchedItem) {
+              return h('span', matchedItem.aircaftModelName)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'ossId',

+ 50 - 0
src/views/als/utils/common.js

@@ -0,0 +1,50 @@
+/**
+ * 构造树型结构数据
+ * @param {*} data 数据源
+ * @param {*} id id字段 默认 'id'
+ * @param {*} parentId 父节点字段 默认 'parentId'
+ * @param {*} children 孩子节点字段 默认 'children'
+ */
+export function handleTree(data, id, parentId, children) {
+  let config = {
+    id: id || 'id',
+    parentId: parentId || 'parentId',
+    childrenList: children || 'children'
+  }
+
+  var childrenListMap = {}
+  var nodeIds = {}
+  var tree = []
+
+  for (let d of data) {
+    let parentId = d[config.parentId]
+    if (childrenListMap[parentId] == null) {
+      childrenListMap[parentId] = []
+    }
+    nodeIds[d[config.id]] = d
+    childrenListMap[parentId].push(d)
+  }
+
+  for (let d of data) {
+    let parentId = d[config.parentId]
+    if (nodeIds[parentId] == null) {
+      tree.push(d)
+    }
+  }
+
+  for (let t of tree) {
+    adaptToChildrenList(t)
+  }
+
+  function adaptToChildrenList(o) {
+    if (childrenListMap[o[config.id]] !== null) {
+      o[config.childrenList] = childrenListMap[o[config.id]]
+    }
+    if (o[config.childrenList]) {
+      for (let c of o[config.childrenList]) {
+        adaptToChildrenList(c)
+      }
+    }
+  }
+  return tree
+}