Browse Source

解决冲突

彭笙 6 tháng trước cách đây
mục cha
commit
e023335405
88 tập tin đã thay đổi với 3696 bổ sung2328 xóa
  1. 93 0
      package-lock.json
  2. 4 0
      package.json
  3. 5 0
      src/api/als/algorithm.js
  4. 17 0
      src/api/als/communication.js
  5. 1 6
      src/api/als/faultCase.js
  6. 36 2
      src/api/als/intelligentQA.js
  7. 5 0
      src/api/als/warning.js
  8. 10 0
      src/api/carrierStandard/carrierSailingMaterialConsumeRecord.js
  9. 9 0
      src/api/carrierStandard/carrierSailingMaterialConsumeRegularities.js
  10. 5 0
      src/api/system/user.js
  11. 10 0
      src/api/task/carrierFlightMission.js
  12. 1 1
      src/assets/font/demo_index.html
  13. BIN
      src/assets/images/飞机.png
  14. 1 1
      src/components/AddUserDialog/index.js
  15. 7 1
      src/components/CrudDialog/index.vue
  16. 1 1
      src/components/FittingsModal/index.js
  17. 29 2
      src/components/TagsView/index.vue
  18. 6 15
      src/components/TagsView/scrollPane.vue
  19. 9 2
      src/components/aviationMaterialsModal/index.js
  20. 31 0
      src/layout/components/NavBar/MenuItem.vue
  21. 24 0
      src/layout/components/NavBar/index.scss
  22. 11 1
      src/layout/components/NavBar/index.vue
  23. 15 81
      src/layout/components/NavBar/menu.vue
  24. 20 15
      src/pemission.js
  25. 1 1
      src/router/modules/als/qualityManage.js
  26. 306 334
      src/router/modules/carrierStandard.js
  27. 39 0
      src/router/modules/faultDiagnosis.js
  28. 38 0
      src/router/modules/faultStatistics.js
  29. 39 0
      src/router/modules/lifePrediction.js
  30. 39 0
      src/router/modules/maintenanceDecision.js
  31. 356 142
      src/router/modules/system.js
  32. 89 0
      src/router/modules/systemTest.js
  33. 68 0
      src/router/modules/test.js
  34. 89 34
      src/router/private-routes.js
  35. 1 7
      src/router/public-routes.js
  36. 2 1
      src/store/getters.js
  37. 21 2
      src/store/modules/permission.js
  38. 25 1
      src/utils/route.js
  39. 2 3
      src/views/als/airInstall/index.vue
  40. 210 488
      src/views/als/falseAlarm/index.vue
  41. 238 235
      src/views/als/faultCase/index.vue
  42. 162 389
      src/views/als/faultDiagnosis/index.vue
  43. 4 0
      src/views/als/faultStatistics/echarts.vue
  44. 30 66
      src/views/als/flightData/index.vue
  45. 146 15
      src/views/als/intelligentQA/index.scss
  46. 224 57
      src/views/als/intelligentQA/index.vue
  47. 72 214
      src/views/als/lifePrediction/index.vue
  48. 51 18
      src/views/als/model/index.vue
  49. 10 29
      src/views/als/preProcessing/index.vue
  50. 373 0
      src/views/als/systemCommunication/index.vue
  51. 1 1
      src/views/als/utils/enum-data.js
  52. 1 1
      src/views/basicData/dataAircraftCataloging/index.js
  53. 1 1
      src/views/basicData/dataAircraftCataloging/index.vue
  54. 3 0
      src/views/basicData/dataEnvironment/src/regularitiesChoose.vue
  55. 4 0
      src/views/basicData/dataSailingMaterialPrice/index.js
  56. 2 1
      src/views/carrierStandard/carrierAllAudit/index.vue
  57. 1 1
      src/views/carrierStandard/carrierComputationalModel/index.vue
  58. 1 1
      src/views/carrierStandard/carrierListExecutionRegistration/components/look/index.js
  59. 1 1
      src/views/carrierStandard/carrierListExecutionRegistration/components/registering/index.js
  60. 10 10
      src/views/carrierStandard/carrierListMachineryPreparation/components/compile/index.vue
  61. 1 1
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.js
  62. 1 17
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.vue
  63. 13 2
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/outboundRecord.vue
  64. 12 2
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/warehousingRecord.vue
  65. 69 0
      src/views/carrierStandard/carrierSailingMaterialConsumeRegularities/components/importDialog/index.vue
  66. 54 18
      src/views/carrierStandard/carrierSailingMaterialConsumeRegularities/index.vue
  67. 17 1
      src/views/carrierStandard/carrierUseRegistration/components/sailingMaterial/index.vue
  68. 3 3
      src/views/carrierStandard/safeguardCost/index.js
  69. 10 18
      src/views/carrierStandard/safeguardCost/index.vue
  70. 11 7
      src/views/carrierStandard/safeguardCost/priceList.js
  71. 9 17
      src/views/carrierStandard/safeguardCost/priceList.vue
  72. 40 0
      src/views/home/index.scss
  73. 49 2
      src/views/home/index.vue
  74. 249 0
      src/views/home/table.js
  75. 1 1
      src/views/login/index.vue
  76. 1 1
      src/views/statisticalAnalysis/statisticalAnalysisSailingMaterialSpareParts/index.vue
  77. 2 2
      src/views/system/dept/index.js
  78. 13 13
      src/views/system/dept/index.vue
  79. 1 1
      src/views/system/role/index.js
  80. 9 12
      src/views/system/role/index.vue
  81. 17 6
      src/views/system/systemBackup/index.vue
  82. 4 3
      src/views/system/systemDataDictionary/data.vue
  83. 14 5
      src/views/system/user/index.js
  84. 24 2
      src/views/system/user/index.vue
  85. 2 2
      src/views/task/carrierFlightMission/components/aircraft/index.vue
  86. 2 0
      src/views/task/carrierFlightMission/index.js
  87. 57 10
      src/views/task/carrierFlightMission/index.vue
  88. 1 1
      vue.config.js

+ 93 - 0
package-lock.json

@@ -12,6 +12,9 @@
         "@grapecity/spread-sheets-vue": "^15.1.1",
         "@jiaminghi/data-view": "^2.10.0",
         "@riophae/vue-treeselect": "^0.4.0",
+        "@vue-office/docx": "^1.6.2",
+        "@vue-office/pdf": "^2.0.9",
+        "@vue/composition-api": "^1.7.2",
         "axios": "^0.27.2",
         "bignumber.js": "^9.1.0",
         "core-js": "^3.8.3",
@@ -25,6 +28,7 @@
         "relation-graph": "^1.1.0",
         "screenfull": "^6.0.1",
         "vue": "^2.6.14",
+        "vue-demi": "^0.14.10",
         "vue-router": "^3.5.1",
         "vue-smooth-dnd": "^0.8.1",
         "vuex": "^3.6.2"
@@ -2499,6 +2503,38 @@
         "@types/node": "*"
       }
     },
+    "node_modules/@vue-office/docx": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.2.tgz",
+      "integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ==",
+      "hasInstallScript": true,
+      "peerDependencies": {
+        "@vue/composition-api": "^1.7.1",
+        "vue": "^2.0.0 || >=3.0.0",
+        "vue-demi": "^0.14.6"
+      },
+      "peerDependenciesMeta": {
+        "@vue/composition-api": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@vue-office/pdf": {
+      "version": "2.0.9",
+      "resolved": "https://registry.npmmirror.com/@vue-office/pdf/-/pdf-2.0.9.tgz",
+      "integrity": "sha512-sRjIiMV1CDDFv1Ls4U7zglkjkMr1Ntm16q8Krh0m1Lh7vAdVox1EcgEw4MXU6Mqsz7NB6nppxCPlSms6ue9eIQ==",
+      "hasInstallScript": true,
+      "peerDependencies": {
+        "@vue/composition-api": "^1.7.1",
+        "vue": "^2.0.0 || >=3.0.0",
+        "vue-demi": "^0.14.6"
+      },
+      "peerDependenciesMeta": {
+        "@vue/composition-api": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/@vue/babel-helper-vue-jsx-merge-props": {
       "version": "1.2.1",
       "resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
@@ -3015,6 +3051,14 @@
         "url": "https://opencollective.com/postcss/"
       }
     },
+    "node_modules/@vue/composition-api": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmmirror.com/@vue/composition-api/-/composition-api-1.7.2.tgz",
+      "integrity": "sha512-M8jm9J/laYrYT02665HkZ5l2fWTK4dcVg3BsDHm/pfz+MjDYwX+9FUaZyGwEyXEDonQYRCo0H7aLgdklcIELjw==",
+      "peerDependencies": {
+        "vue": ">= 2.5 < 2.7"
+      }
+    },
     "node_modules/@vue/vue-loader-v15": {
       "name": "vue-loader",
       "version": "15.9.8",
@@ -12139,6 +12183,31 @@
       "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==",
       "license": "MIT"
     },
+    "node_modules/vue-demi": {
+      "version": "0.14.10",
+      "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
+      "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
+      "hasInstallScript": true,
+      "bin": {
+        "vue-demi-fix": "bin/vue-demi-fix.js",
+        "vue-demi-switch": "bin/vue-demi-switch.js"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      },
+      "peerDependencies": {
+        "@vue/composition-api": "^1.0.0-rc.1",
+        "vue": "^3.0.0-0 || ^2.6.0"
+      },
+      "peerDependenciesMeta": {
+        "@vue/composition-api": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/vue-eslint-parser": {
       "version": "8.3.0",
       "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
@@ -14773,6 +14842,18 @@
         "@types/node": "*"
       }
     },
+    "@vue-office/docx": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.2.tgz",
+      "integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ==",
+      "requires": {}
+    },
+    "@vue-office/pdf": {
+      "version": "2.0.9",
+      "resolved": "https://registry.npmmirror.com/@vue-office/pdf/-/pdf-2.0.9.tgz",
+      "integrity": "sha512-sRjIiMV1CDDFv1Ls4U7zglkjkMr1Ntm16q8Krh0m1Lh7vAdVox1EcgEw4MXU6Mqsz7NB6nppxCPlSms6ue9eIQ==",
+      "requires": {}
+    },
     "@vue/babel-helper-vue-jsx-merge-props": {
       "version": "1.2.1",
       "resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
@@ -15146,6 +15227,12 @@
         }
       }
     },
+    "@vue/composition-api": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmmirror.com/@vue/composition-api/-/composition-api-1.7.2.tgz",
+      "integrity": "sha512-M8jm9J/laYrYT02665HkZ5l2fWTK4dcVg3BsDHm/pfz+MjDYwX+9FUaZyGwEyXEDonQYRCo0H7aLgdklcIELjw==",
+      "requires": {}
+    },
     "@vue/vue-loader-v15": {
       "version": "npm:vue-loader@15.9.8",
       "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.9.8.tgz",
@@ -21594,6 +21681,12 @@
       "resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
       "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
     },
+    "vue-demi": {
+      "version": "0.14.10",
+      "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
+      "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
+      "requires": {}
+    },
     "vue-eslint-parser": {
       "version": "8.3.0",
       "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",

+ 4 - 0
package.json

@@ -12,6 +12,9 @@
     "@grapecity/spread-sheets-vue": "^15.1.1",
     "@jiaminghi/data-view": "^2.10.0",
     "@riophae/vue-treeselect": "^0.4.0",
+    "@vue-office/docx": "^1.6.2",
+    "@vue-office/pdf": "^2.0.9",
+    "@vue/composition-api": "^1.7.2",
     "axios": "^0.27.2",
     "bignumber.js": "^9.1.0",
     "core-js": "^3.8.3",
@@ -25,6 +28,7 @@
     "relation-graph": "^1.1.0",
     "screenfull": "^6.0.1",
     "vue": "^2.6.14",
+    "vue-demi": "^0.14.10",
     "vue-router": "^3.5.1",
     "vue-smooth-dnd": "^0.8.1",
     "vuex": "^3.6.2"

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

@@ -29,3 +29,8 @@ export const executeFalseAlarm = async (data) => {
 export const executeFault = async (data) => {
   return await post('/als/algorithm/execute/fault', data)
 }
+
+// 执行退化评估算法
+export const executeEvaluation = async (data) => {
+  return await post('/als/algorithm/execute/evaluation', data)
+}

+ 17 - 0
src/api/als/communication.js

@@ -0,0 +1,17 @@
+import { get, post, put, deletes } from '@/http/index'
+
+export const getCommunication = async (data) => {
+  return await get('/als/communication/list', data)
+}
+
+export const addCommunication = async (data) => {
+  return await post('/als/communication', data)
+}
+
+export const updateCommunication = async (data) => {
+  return await put('/als/communication', data)
+}
+
+export const removeCommunication = async (data) => {
+  return await deletes('/als/communication/' + data)
+}

+ 1 - 6
src/api/als/faultCase.js

@@ -2,7 +2,7 @@ import { get, put, post, deletes } from '@/http/index'
 
 // 查询故障案例列表
 export const getFaultCase = async (data) => {
-  return await get('/als/faultCase/list', data)
+  return await get('/als/faultCase/esList', data)
 }
 
 // 新增故障案例
@@ -19,8 +19,3 @@ export const updateFaultCase = async (data) => {
 export const removeFaultCase = async (id) => {
   return await deletes('/als/faultCase/' + id)
 }
-
-//  获取机种和机型树
-export const getAircaftTypeAndModelTree = async (data) => {
-  return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
-}

+ 36 - 2
src/api/als/intelligentQA.js

@@ -1,6 +1,40 @@
-import { post } from '@/http/index'
+import { get, post, deletes } from '@/http/index'
 
+// 问答接口
+// export const handlerAsk = async (data) => {
+//   return await post('/kgqa/ask/', data)
+// }
 // 问答接口
 export const handlerAsk = async (data) => {
-  return await post('/kgqa/ask/', data)
+  return await post('/als/algorithm/execute/qa', data)
+}
+
+// 历史记录
+export const getQAHistoryList = async (data) => {
+  return await get('/als/qaHistory/list', data)
+}
+
+// 查询问答历史记录列表不分页
+export const getQAHistoryListAll = async (data) => {
+  return await get('/als/qaHistory/list/all', data)
+}
+
+// 获取问答历史记录详细信息
+export const getQAHistoryDetail = async (id) => {
+  return await get('/als/qaHistory/' + id)
+}
+
+// 新增问答历史记录
+export const addQAHistory = async (data) => {
+  return await post('/als/qaHistory', data)
+}
+
+// 删除问答历史记录
+export const removeQAHistory = async (id) => {
+  return await deletes('/als/qaHistory/' + id)
+}
+
+// 统计列表
+export const getGroup = async (data) => {
+  return await get('/als/qaHistory/group', data)
 }

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

@@ -24,3 +24,8 @@ export const removeWarning = async (id) => {
 export const getAircaftTypeAndModelTree = async (data) => {
   return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
 }
+
+// 根据hmc码和架次号获取曲线内容
+export const getCurveData = async (hmc, sortieNo) => {
+  return await get(`/als/warning/${hmc}/${sortieNo}`)
+}

+ 10 - 0
src/api/carrierStandard/carrierSailingMaterialConsumeRecord.js

@@ -51,3 +51,13 @@ export const handMatching = async (data) => {
 export const sumCalculate = async (data) => {
   return await get('/carryingtask/overyearAvmatConsume/sumCalculate', data)
 }
+
+//导出出库记录
+export const exportOutboundRecordExcel = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + `/carryingtask/overyearAvmatConsume/exportOutboundRecordExcel?queryParam=${data.queryParam}&consumeDataId=${data.consumeDataId}`)
+}
+
+//导出入库记录
+export const exportWarehousingRecordExcel = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + `/carryingtask/overyearAvmatConsume/exportWarehousingRecordExcel?queryParam=${data.queryParam}&consumeDataId=${data.consumeDataId}`)
+}

+ 9 - 0
src/api/carrierStandard/carrierSailingMaterialConsumeRegularities.js

@@ -15,3 +15,12 @@ export const updateAvmatConsumeRule = async (data) => {
 export const removeAvmatConsumeRule = async (data) => {
   return await post('/carryingtask/avmatConsumeRule/removeAvmatConsumeRule', data)
 }
+
+//下载模板
+export const downLoadFile = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + '/carryingtask/avmatConsumeRule/downLoadFile')
+}
+//导出
+export const exportExcel = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + `/carryingtask/avmatConsumeRule/exportExcel?avmatCategoriesId=${data.avmatCategoriesId}&avmatCategoriesName=${data.avmatCategoriesName}&avmatCategoriesCode=${data.avmatCategoriesCode}`)
+}

+ 5 - 0
src/api/system/user.js

@@ -44,3 +44,8 @@ export const optionselect = async (query) => {
 export const authRole = async (query) => {
   return await post('/system/user/authRole', query)
 }
+
+// 重置密码
+export const resetBtn = async (query) => {
+  return await post('/system/user/resetPwd', query)
+}

+ 10 - 0
src/api/task/carrierFlightMission.js

@@ -105,3 +105,13 @@ export const socialSecurityDetailsPage = async (data) => {
 export const generatePriceList = async (data) => {
   return await post('/safeguard/socialSecurityDetails/generatePriceList', data)
 }
+
+//导出年度社会化保障参考数据
+export const exportSocialSecurityExcel = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + `/safeguard/socialSecurity/exportExcel?keyword=${data.keyword}`)
+}
+
+//导出年度社会化保障参考价格清单数据
+export const exportSocialSecurityDetailsExcel = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + `/safeguard/socialSecurityDetails/exportExcel?socialSecurityId=${data.socialSecurityId}&avmatCategoriesId=${data.avmatCategoriesId}`)
+}

+ 1 - 1
src/assets/font/demo_index.html

@@ -36,7 +36,7 @@
 </head>
 <body>
   <div class="main">
-    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
+    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 综合看板" target="_blank">
       <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
       
     </a></h1>

BIN
src/assets/images/飞机.png


+ 1 - 1
src/components/AddUserDialog/index.js

@@ -11,7 +11,7 @@ export const columns = (_this) => {
     },
     {
       prop: 'deptName',
-      label: '所属部门'
+      label: '所属机构'
     },
     {
       prop: 'majorName',

+ 7 - 1
src/components/CrudDialog/index.vue

@@ -9,7 +9,13 @@
               <el-col v-bind="item.colLayout || { span: 12 }">
                 <el-form-item :label="item.label" :prop="item.key" class="form-item" :style="itemStyle" v-if="!item.isHidden">
                   <template v-if="item.type === 'input'">
-                    <el-input v-model="formData[`${item.key}`]" :placeholder="item.placeHolder ? item.placeHolder : `请输入${item.label}`" v-bind="item.inputOptions" :disabled="item.disabled"></el-input>
+                    <el-input
+                      v-model="formData[`${item.key}`]"
+                      :placeholder="item.placeHolder ? item.placeHolder : `请输入${item.label}`"
+                      v-bind="item.inputOptions"
+                      :disabled="item.disabled"
+                      :show-password="item.showPassword ? item.showPassword : false"
+                    ></el-input>
                   </template>
 
                   <template v-if="item.type === 'inputNumber'">

+ 1 - 1
src/components/FittingsModal/index.js

@@ -19,7 +19,7 @@ export const columns = (_this) => [
 
   {
     prop: 'mechanician',
-    label: '机械师'
+    label: '驾驶员'
   },
   {
     button: true,

+ 29 - 2
src/components/TagsView/index.vue

@@ -1,8 +1,18 @@
 <template>
   <div class="tags-view">
-    <ScrollPane>
+    <ScrollPane ref="ScrollPane">
       <transition-group name="drag" class="list" tag="div">
-        <div class="tags-view-tp" v-for="(item, index) in $store.getters.tagsViewList" :key="item.fullPath" @drop="drop($event, index)" @dragover="dragover($event, index)" @dragstart="dragstart(index)" :draggable="item.fullPath !== '/home'">
+        <div
+          ref="tag"
+          class="tags-view-tp"
+          v-for="(item, index) in $store.getters.tagsViewList"
+          :key="item.fullPath"
+          :to="item.path"
+          @drop="drop($event, index)"
+          @dragover="dragover($event, index)"
+          @dragstart="dragstart(index)"
+          :draggable="item.fullPath !== '/home'"
+        >
           <el-tooltip v-if="item.meta.title.length > 10" class="item" effect="dark" :content="item.meta.title" placement="top-start">
             <!-- '/home'页不允许拖拽 -->
             <div @click.self="to(item.fullPath)" @contextmenu.prevent="openmenu($event, index)" class="tags-view-item" :class="isActive(item) ? 'active' : ''">
@@ -78,9 +88,11 @@ export default {
       this.conTextMenStyle.left = x + 'px'
       this.conTextMenStyle.top = y + 'px'
     },
+
     openVisibles() {
       this.visible = !this.visible
     },
+
     to(path) {
       this.$router.push(path)
     },
@@ -97,11 +109,26 @@ export default {
         this.dragIndex = index
       }
     },
+
     dragover(e, index) {
       e.preventDefault()
+    },
+
+    moveTo() {
+      const tags = this.$refs.tag
+      this.$nextTick(() => {
+        for (const tag of tags) {
+          if (tag.getAttribute('to') === this.$route.path) {
+            this.$refs.ScrollPane.moveToTarget(tag)
+          }
+        }
+      })
     }
   },
   watch: {
+    $route() {
+      this.moveTo()
+    },
     // 当tag 操作拦打开 给body添加 关闭操作拦事件 当tag 操作拦关闭 给body移除 关闭操作拦事件
     visible(val) {
       if (val) {

+ 6 - 15
src/components/TagsView/scrollPane.vue

@@ -44,32 +44,23 @@ export default {
       const $containerWidth = $container.offsetWidth
       const $scrollWrapper = this.scrollWrapper
       const tagList = this.$parent.$refs.tag
-
       let firstTag = null
       let lastTag = null
-
       // 找到第一个标签和最后一个标签
       if (tagList.length > 0) {
         firstTag = tagList[0]
         lastTag = tagList[tagList.length - 1]
       }
-
       if (firstTag === currentTag) {
         $scrollWrapper.scrollLeft = 0
       } else if (lastTag === currentTag) {
-        $scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth
+        $scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth + currentTag.offsetWidth
       } else {
-        // 找到preTag和nextag
-        const currentIndex = tagList.findIndex((item) => item === currentTag)
-        const prevTag = tagList[currentIndex - 1]
-        const nextTag = tagList[currentIndex + 1]
-
-        // 标签的offsetLeft在nextag之后
-        const afterNextTagOffsetLeft = nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing
-
-        // 标签的offsetLeft在prevTag之前g
-        const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing
-
+        const currentTagIndex = tagList.findIndex((e) => e === currentTag)
+        const prevTag = tagList[currentTagIndex - 1]
+        const nextTag = tagList[currentTagIndex + 1]
+        const afterNextTagOffsetLeft = nextTag.offsetLeft + nextTag.offsetWidth + tagAndTagSpacing
+        const beforePrevTagOffsetLeft = prevTag.offsetLeft - tagAndTagSpacing
         if (afterNextTagOffsetLeft > $scrollWrapper.scrollLeft + $containerWidth) {
           $scrollWrapper.scrollLeft = afterNextTagOffsetLeft - $containerWidth
         } else if (beforePrevTagOffsetLeft < $scrollWrapper.scrollLeft) {

+ 9 - 2
src/components/aviationMaterialsModal/index.js

@@ -27,15 +27,22 @@ export const dialogColumns = (_this) => [
     prop: 'avmatCatalogCode',
     label: '航材编号'
   },
+  {
+    prop: 'specification',
+    label: '规格型号'
+  },
+  {
+    prop: 'unit',
+    label: '计量单位'
+  },
   {
     prop: 'avmatCategoriesName',
     label: '航材分类'
   },
-
   {
     button: true,
     label: '操作',
-    width: '240px',
+    width: '100px',
     group: [
       {
         name: '选择',

+ 31 - 0
src/layout/components/NavBar/MenuItem.vue

@@ -0,0 +1,31 @@
+<template>
+  <div v-if="item.meta && !item.meta.navHide">
+    <el-menu-item popper-class="nav-bar-menu-submenu-open" v-if="!item.children || item.children.length == 0" :index="item.path">
+      <i :class="item.meta.icon"></i>
+      {{ item.meta.title }}
+    </el-menu-item>
+
+    <el-submenu v-else popper-class="nav-bar-menu-submenu-open" :show-timeout="100" :hide-timeoutt="100" :index="item.path" popper-append-to-body>
+      <template slot="title">
+        <i :class="item.meta.icon"></i>
+        {{ item.meta.title }}
+      </template>
+      <menu-item v-for="child in item.children" :key="child.path" :item="child"></menu-item>
+    </el-submenu>
+  </div>
+</template>
+<script>
+export default {
+  name: 'MenuItem',
+  props: {
+    item: {
+      type: Object,
+      required: true
+    }
+  },
+  data() {
+    return {}
+  },
+  methods: {}
+}
+</script>

+ 24 - 0
src/layout/components/NavBar/index.scss

@@ -360,3 +360,27 @@
 .el-dropdown-menu__item:not(.is-disabled):hover {
   background-color: #072a36 !important;
 }
+
+//  nav menus 下面
+
+.nav-bar-menu .el-menu--horizontal .el-menu-item {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 130px;
+  height: 50px;
+  line-height: 50px;
+  color: #fff;
+  background-color: transparent;
+}
+
+.nav-bar-menu .el-menu--horizontal .el-submenu .el-submenu__title {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 130px;
+  height: 50px;
+  line-height: 50px;
+  color: #fff;
+  background-color: transparent;
+}

+ 11 - 1
src/layout/components/NavBar/index.vue

@@ -6,7 +6,7 @@
     </div>
     <div class="nav-bar-logo-bg"></div>
     <div class="nav-bar-menu">
-      <Menu />
+      <Menu :tree-data="newRoute" />
       <User />
     </div>
   </div>
@@ -16,12 +16,22 @@
 import Menu from './menu.vue'
 import User from './user.vue'
 import logo from '@/assets/images/logo.png'
+import { buildTreeData, navMenus } from '@/router/private-routes'
 export default {
   name: 'NavBar',
   components: {
     Menu,
     User
   },
+  computed: {
+    mainMenu() {
+      return this.$router.getRoutes()
+    },
+    newRoute() {
+      return this.$store.getters.navMenus
+    }
+  },
+
   data: function () {
     return {
       logo

+ 15 - 81
src/layout/components/NavBar/menu.vue

@@ -1,92 +1,20 @@
 <template>
-  <el-menu :collapse-transition="false" :default-active="activeIndex2" mode="horizontal" @select="handleSelect">
-    <template v-for="(item, index) in newRoute">
-      <template v-if="index <= visibleNumber">
-        <el-menu-item popper-class="nav-bar-menu-submenu-open" v-if="!item.children.length" :index="item.path" :key="index">
-          <i :class="item.meta.icon"></i>
-          {{ item.meta.title }}
-        </el-menu-item>
-        <el-menu-item popper-class="nav-bar-menu-submenu-open" v-else-if="item.children.length > 0 && item.children.every((i) => i.meta.hide)" :index="item.path" :key="index">
-          <i :class="item.meta.icon"></i>
-          {{ item.meta.title }}
-        </el-menu-item>
-        <el-submenu v-else popper-class="nav-bar-menu-submenu-open" :show-timeout="100" :hide-timeoutt="100" :key="index" :index="item.path">
-          <template slot="title">
-            <i :class="item.meta.icon"></i>
-            {{ item.meta.title }}
-          </template>
-          <template v-for="(items, n) in item.children">
-            <el-menu-item v-if="!items.meta.hide" :open="index.toString() + '-' + n.toString()" :key="n" :index="items.path">
-              <i v-if="items.meta.icon" :class="items.meta.icon"></i>
-              {{ items.meta.title }}
-            </el-menu-item>
-          </template>
-        </el-submenu>
-      </template>
-    </template>
-    <el-submenu v-if="newRoute.length > visibleNumber" index="more" popper-class="nav-bar-menu-submenu-open">
-      <template slot="title">更多菜单</template>
-      <template v-for="(item, index) in newRoute">
-        <template v-if="index > visibleNumber">
-          <el-menu-item popper-class="nav-bar-menu-submenu-open" v-if="!item.children.length" :index="item.path" :key="index">
-            <i :class="item.meta.icon"></i>
-            {{ item.meta.title }}
-          </el-menu-item>
-          <el-menu-item popper-class="nav-bar-menu-submenu-open" v-else-if="item.children.length > 0 && item.children.every((i) => i.meta.hide)" :index="item.path" :key="index">
-            <i :class="item.meta.icon"></i>
-            {{ item.meta.title }}
-          </el-menu-item>
-          <el-submenu v-else popper-class="nav-bar-menu-submenu-open" :show-timeout="100" :hide-timeoutt="100" :key="index" :index="item.path">
-            <template slot="title">
-              <i :class="item.meta.icon"></i>
-              {{ item.meta.title }}
-            </template>
-            <template v-for="(items, n) in item.children">
-              <el-menu-item v-if="!items.meta.hide" :open="index.toString() + '-' + n.toString()" :key="n" :index="items.path">
-                <i v-if="items.meta.icon" :class="items.meta.icon"></i>
-                {{ items.meta.title }}
-              </el-menu-item>
-            </template>
-          </el-submenu>
-        </template>
-      </template>
-    </el-submenu>
+  <el-menu class="el-menu-demo" mode="horizontal" @select="handleSelect">
+    <menu-item v-for="item in treeData" :key="item.path" :item="item"></menu-item>
   </el-menu>
 </template>
 
 <script>
-import { filterRoutes, generteMenus, changeSortMenus } from '@/utils/route'
-
+import MenuItem from './MenuItem.vue'
 export default {
   name: 'Menu',
-  computed: {
-    mainMenu() {
-      return this.$router.getRoutes()
-    },
-    newRoute() {
-      this.mainMenu.forEach((item, key) => {
-        if (item.path === '/faultStatisticsEcharts') {
-          delete this.mainMenu[key]
-        }
-      })
-      const froutes = filterRoutes(this.mainMenu)
-      return changeSortMenus(generteMenus(froutes))
-    }
+  components: {
+    MenuItem
   },
-
-  data() {
-    return {
-      activeIndex2: '0',
-      // 顶部栏初始数
-      visibleNumber: 4
-    }
-  },
-  mounted() {
-    this.activeIndex2 = this.$route.path
-  },
-  watch: {
-    $route() {
-      this.activeIndex2 = this.$route.path
+  props: {
+    treeData: {
+      type: Array,
+      default: () => []
     }
   },
   methods: {
@@ -96,3 +24,9 @@ export default {
   }
 }
 </script>
+<style></style>
+<style lang="scss" scoped>
+.el-menu-demo {
+  display: flex;
+}
+</style>

+ 20 - 15
src/pemission.js

@@ -2,8 +2,8 @@ import router from './router'
 import store from './store'
 import { getItem } from '@/utils/index'
 import { TOKEN } from '@/utils/constant'
-import { getMenusData, flatMenus } from '@/utils/route'
-import { privateRoutes } from '@/router/private-routes'
+import { filterPermissionsRoutes, flattenedRoutes, buildTreeData } from '@/router/private-routes'
+import Layout from '@/layout/index.vue'
 
 // 白名单
 const whiteList = ['/login']
@@ -18,24 +18,29 @@ router.beforeEach(async (to, from, next) => {
     if (to.path === '/login') {
       next('/')
     } else {
-      // console.log(store.getters.hasUserInfo)
-      // 判断用户资料是否存在 如果不存才 则需要获取用户信息
-
       if (!store.getters.hasUserInfo) {
-        // todo: 做权限的时候解开
-        // 拿到后台返回的权限列表
         const { permissions } = await store.dispatch('user/getUserInfo')
+        const fRoutes = await filterPermissionsRoutes(flattenedRoutes, permissions)
 
-        // 这里是在做排序
-        const allMenus = flatMenus(getMenusData()) // Array.from(new Set())
-        const orderPermissions = allMenus.filter((item) => permissions.includes(item))
-        // 通过比对路由 动态添加
-        const filterRoutes = await store.dispatch('permission/filterRoutes', orderPermissions)
-
-        filterRoutes.forEach((item) => {
-          router.addRoute(item)
+        fRoutes.forEach(async (item) => {
+          await router.addRoute(item)
         })
 
+        const navMenus = fRoutes.map(({ name, meta, path }) => ({ name, meta, path, children: [] }))
+        store.dispatch('permission/setNavMenus', buildTreeData(navMenus))
+
+        await router.addRoute({
+          path: '/*',
+          name: 'Layout',
+          component: Layout,
+          children: [
+            {
+              path: '/*',
+              name: 'redirect',
+              component: () => import('@/views/err-page/404.vue')
+            }
+          ]
+        })
         return next(to.path)
         next({ ...to, replace: true })
       }

+ 1 - 1
src/router/modules/als/qualityManage.js

@@ -63,7 +63,7 @@ export const lifePrediction = {
       path: '/qualityManage/lifePrediction',
       component: () => import('@/views/als/lifePrediction/index.vue'),
       meta: {
-        title: '寿命预测'
+        title: '退化评估'
       },
       sort: 3
     }

+ 306 - 334
src/router/modules/carrierStandard.js

@@ -1,359 +1,331 @@
 import Layout from '@/layout/index.vue'
-
 /**
  *
+ * CarrierFlightMission                      飞行任务管理
  * carrierListMachineryPreparation           携行清单机务编修
  * carrierAllAudit                           机务清单总体审核
  * carrierListShipping                       携行清单航材编修
  * carrierListExecutionRegistration          任务执行情况登记
  * useRegistration                           携行航材使用登记
- * carrierComputationalModel                 携行计算模型管理
- * carrierComputationalModelVersion          携行计算模型版本管理
- * carrierSailingMaterialConsumeRegularities 航材消耗规律管理
- * carrierSailingMaterialConsumeRecord       航材历年消耗管理
  * safeguardCost                             社会化保障参考
- *
+ * safeguardCost                             社会化保障参考
  */
 
-//携行清单机务编修
-export const carrierListMachineryPreparation = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'CarrierListMachineryPreparation',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/carrierListMachineryPreparation',
-      component: () => import('@/views/carrierStandard/carrierListMachineryPreparation/index.vue'),
-      meta: {
-        title: '携行清单机务编修'
-      },
-      sort: 1
+export default [
+  {
+    name: 'CarrierStandard',
+    path: '/carrierStandard',
+    redirect: '/carrierStandard/',
+    component: Layout,
+    meta: {
+      title: '携行规划',
+      icon: 'el-icon-s-platform'
     },
-    {
-      path: '/carrierStandard/carrierListMachineryPreparation/compile/:id',
-      component: () => import('@/views/carrierStandard/carrierListMachineryPreparation/components/compile/index.vue'),
-      meta: {
-        title: '携行清单机务编修-编修',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierListMachineryPreparation/look/:id',
-      component: () => import('@/views/carrierStandard/carrierListMachineryPreparation/components/look/index.vue'),
-      meta: {
-        title: '携行清单机务编修-查看详情',
-        hide: true
-      }
-    }
-  ]
-}
-
-//机务清单总体审核
-export const carrierAllAudit = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'CarrierAllAudit',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/carrierAllAudit',
-      component: () => import('@/views/carrierStandard/carrierAllAudit/index.vue'),
-      meta: {
-        title: '机务清单总体审核'
+    children: [
+      /**
+       * ----------------------------飞行任务管理-----------------------------
+       */
+      {
+        name: 'CarrierFlightMission',
+        path: '/task/carrierFlightMission',
+        component: () => import('@/views/task/carrierFlightMission/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          title: '飞行任务管理'
+        }
       },
-      sort: 2
-    },
-    {
-      path: '/carrierStandard/carrierAllAudit/look/:id',
-      component: () => import('@/views/carrierStandard/carrierAllAudit/components/carrierAllAuditLook/index.vue'),
-      meta: {
-        title: '机务清单总体审核-查看详情',
-        hide: true
-      }
-    }
-  ]
-}
-
-//携行清单航材编修
-export const carrierListShipping = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'CarrierListShipping',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/carrierListShipping',
-      component: () => import('@/views/carrierStandard/carrierListShipping/index.vue'),
-      meta: {
-        title: '携行清单航材编修'
+      {
+        name: 'CarrierFlightMission',
+        path: '/task/carrierFlightMission/compile',
+        component: () => import('@/views/task/carrierFlightMission/components/compile/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '飞行任务管理-任务编制'
+        }
       },
-      sort: 3
-    },
-    {
-      path: '/carrierStandard/carrierListShipping/compile/:id',
-      component: () => import('@/views/carrierStandard/carrierListShipping/components/compile/index.vue'),
-      meta: {
-        title: '携行清单航材编修-编修',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierListShipping/look/:id',
-      component: () => import('@/views/carrierStandard/carrierListShipping/components/look/index.vue'),
-      meta: {
-        title: '携行清单航材编修-详情',
-        hide: true
-      }
-    }
-  ]
-}
-
-//任务执行情况登记
-export const carrierListExecutionRegistration = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'CarrierListExecutionRegistration',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 10,
-  children: [
-    {
-      path: '/carrierStandard/carrierListExecutionRegistration',
-      component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/index.vue'),
-      meta: {
-        title: '任务执行情况登记'
+      {
+        name: 'CarrierFlightMission',
+        path: '/task/carrierFlightMission/aircraft/:id/:status',
+        component: () => import('@/views/task/carrierFlightMission/components/aircraft/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '飞行任务管理-任务飞机'
+        }
       },
-      sort: 5
-    },
-    {
-      path: '/carrierStandard/carrierListExecutionRegistration/aerospaceSpareParts',
-      component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/aerospaceSpareParts/index.vue'),
-      meta: {
-        title: '携行清单执行登记-航材',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierListExecutionRegistration/missionPlane',
-      component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/missionPlane/index.vue'),
-      meta: {
-        title: '携行清单执行登记-任务飞机',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierListExecutionRegistration/compile',
-      component: () => import('@/views/carrierStandard/carrierListExecutionRegistrationCompile/index.vue'),
-      meta: {
-        title: '携行清单执行登记-编修',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierListExecutionRegistration/registering/:taskId',
-      component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/registering/index.vue'),
-      meta: {
-        title: '任务执行情况登记-登记',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierListExecutionRegistration/look/:taskId',
-      component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/look/index.vue'),
-      meta: {
-        title: '任务执行情况登记-查看详情',
-        hide: true
-      }
-    }
-    //
-  ]
-}
-
-//携行航材使用登记
-export const useRegistration = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'UseRegistration',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/carrierUseRegistration',
-      component: () => import('@/views/carrierStandard/carrierUseRegistration/index.vue'),
-      meta: {
-        title: '携行航材使用登记'
+      {
+        name: 'CarrierFlightMission',
+        path: '/task/carrierFlightMission/aerospaceSpareParts',
+        component: () => import('@/views/task/carrierFlightMission/components/aerospaceSpareParts/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '飞行任务管理-航材'
+        }
+      },
+      {
+        name: 'CarrierFlightMission',
+        path: '/task/carrierFlightMission/missionPlane',
+        component: () => import('@/views/task/carrierFlightMission/components/missionPlane/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '飞行任务管理-任务飞机'
+        }
+      },
+      /**
+       * ----------------------------携行清单机务编修-----------------------------
+       */
+      {
+        name: 'CarrierListMachineryPreparation',
+        path: '/carrierStandard/carrierListMachineryPreparation',
+        component: () => import('@/views/carrierStandard/carrierListMachineryPreparation/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          title: '携行清单机务编修'
+        }
+      },
+      {
+        name: 'CarrierListMachineryPreparation',
+        path: '/carrierStandard/carrierListMachineryPreparation/compile/:id',
+        component: () => import('@/views/carrierStandard/carrierListMachineryPreparation/components/compile/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行清单机务编修-编修'
+        }
+      },
+      {
+        name: 'CarrierListMachineryPreparation',
+        path: '/carrierStandard/carrierListMachineryPreparation/look/:id',
+        component: () => import('@/views/carrierStandard/carrierListMachineryPreparation/components/look/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行清单机务编修-查看详情'
+        }
+      },
+      /**
+       * ----------------------------机务清单总体审核-----------------------------
+       */
+      {
+        name: 'CarrierAllAudit',
+        path: '/carrierStandard/carrierAllAudit',
+        component: () => import('@/views/carrierStandard/carrierAllAudit/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          title: '机务清单总体审核'
+        }
+      },
+      {
+        name: 'CarrierAllAudit',
+        path: '/carrierStandard/carrierAllAudit/look/:id',
+        component: () => import('@/views/carrierStandard/carrierAllAudit/components/carrierAllAuditLook/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '机务清单总体审核-查看详情'
+        }
+      },
+      /**
+       * ----------------------------携行清单航材编修-----------------------------
+       */
+      {
+        name: 'CarrierListShipping',
+        path: '/carrierStandard/carrierListShipping',
+        component: () => import('@/views/carrierStandard/carrierListShipping/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          title: '携行清单航材编修'
+        }
+      },
+      {
+        name: 'CarrierListShipping',
+        path: '/carrierStandard/carrierListShipping/compile/:id',
+        component: () => import('@/views/carrierStandard/carrierListShipping/components/compile/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行清单航材编修-编修'
+        }
+      },
+      {
+        name: 'CarrierListShipping',
+        path: '/carrierStandard/carrierListShipping/look/:id',
+        component: () => import('@/views/carrierStandard/carrierListShipping/components/look/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行清单航材编修-详情'
+        }
       },
-      sort: 5
-    },
-    {
-      path: '/carrierStandard/carrierSailingMaterial/:id',
-      component: () => import('@/views/carrierStandard/carrierUseRegistration/components/sailingMaterial/index.vue'),
-      meta: {
-        title: '携行航材使用登记-航材',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierUseRegistration/look/:id',
-      component: () => import('@/views/carrierStandard/carrierUseRegistration/components/look/index.vue'),
-      meta: {
-        title: '携行航材使用登记-查看详情',
-        hide: true
-      }
-    }
-  ]
-}
 
-//携行计算模型管理
-export const carrierComputationalModel = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'CarrierComputationalModel',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/carrierComputationalModel',
-      component: () => import('@/views/carrierStandard/carrierComputationalModel/index.vue'),
-      meta: {
-        title: '携行计算模型管理'
+      /**
+       * ----------------------------任务执行情况登记-----------------------------
+       */
+      {
+        name: 'CarrierListExecutionRegistration',
+        path: '/carrierStandard/carrierListExecutionRegistration',
+        component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          title: '任务执行情况登记'
+        }
+      },
+      {
+        name: 'CarrierListExecutionRegistration',
+        path: '/carrierStandard/carrierListExecutionRegistration/aerospaceSpareParts',
+        component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/aerospaceSpareParts/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行清单执行登记-航材'
+        }
+      },
+      {
+        name: 'CarrierListExecutionRegistration',
+        path: '/carrierStandard/carrierListExecutionRegistration/missionPlane',
+        component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/missionPlane/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行清单执行登记-任务飞机'
+        }
+      },
+      {
+        name: 'CarrierListExecutionRegistration',
+        path: '/carrierStandard/carrierListExecutionRegistration/compile',
+        component: () => import('@/views/carrierStandard/carrierListExecutionRegistrationCompile/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行清单执行登记-编修'
+        }
+      },
+      {
+        name: 'CarrierListExecutionRegistration',
+        path: '/carrierStandard/carrierListExecutionRegistration/registering/:taskId',
+        component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/registering/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '任务执行情况登记-登记'
+        }
+      },
+      {
+        name: 'CarrierListExecutionRegistration',
+        path: '/carrierStandard/carrierListExecutionRegistration/look/:taskId',
+        component: () => import('@/views/carrierStandard/carrierListExecutionRegistration/components/look/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '任务执行情况登记-查看详情'
+        }
       },
-      sort: 6
-    }
-  ]
-}
 
-//航材消耗规律管理
-export const carrierSailingMaterialConsumeRegularities = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'CarrierSailingMaterialConsumeRegularities',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/carrierSailingMaterialConsumeRegularities',
-      component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRegularities/index.vue'),
-      meta: {
-        title: '航材消耗规律管理'
+      /**
+       * ----------------------------携行航材使用登记-----------------------------
+       */
+      {
+        name: 'carrierUseRegistration',
+        path: '/carrierStandard/carrierUseRegistration',
+        component: () => import('@/views/carrierStandard/carrierUseRegistration/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          title: '携行航材使用登记'
+        }
+      },
+      {
+        name: 'carrierUseRegistration',
+        path: '/carrierStandard/carrierSailingMaterial/:id',
+        component: () => import('@/views/carrierStandard/carrierUseRegistration/components/sailingMaterial/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行航材使用登记-航材'
+        }
+      },
+      {
+        name: 'carrierUseRegistration',
+        path: '/carrierStandard/carrierUseRegistration/look/:id',
+        component: () => import('@/views/carrierStandard/carrierUseRegistration/components/look/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '携行航材使用登记-查看详情'
+        }
       },
-      sort: 7
-    }
-  ]
-}
 
-//历年航材消耗数据
-export const carrierSailingMaterialConsumeRecord = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'CarrierSailingMaterialConsumeRecord',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/carrierSailingMaterialConsumeRecord',
-      component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.vue'),
-      meta: {
-        title: '历年航材消耗数据'
+      /**
+       * ----------------------------社会化保障参考-----------------------------
+       */
+      {
+        name: 'SafeguardCost',
+        path: '/carrierStandard/safeguardCost',
+        component: () => import('@/views/carrierStandard/safeguardCost/index.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          title: '社会化保障参考'
+        }
+      },
+      {
+        name: 'SafeguardCost',
+        path: '/carrierStandard/safeguardCost/:id',
+        component: () => import('@/views/carrierStandard/safeguardCost/priceList.vue'),
+        meta: {
+          parent: 'CarrierStandard',
+          roleMenuHide: true,
+          navHide: true,
+          title: '社会化保障参考-价格清单'
+        }
       },
-      sort: 8
-    },
-    // {
-    //   path: '/carrierStandard/carrierSailingMaterialConsumeRecord',
-    //   component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/annualManagement.vue'),
-    //   meta: {
-    //     title: '历年航材消耗数据-年度管理'
-    //   }
-    // },
-    {
-      path: '/carrierStandard/carrierSailingMaterialConsumeRecord/outboundRecord/:consumeDataId',
-      component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/outboundRecord.vue'),
-      meta: {
-        title: '历年航材消耗数据-出库记录',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierSailingMaterialConsumeRecord/warehousingRecord/:consumeDataId',
-      component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/warehousingRecord.vue'),
-      meta: {
-        title: '历年航材消耗数据-入库记录',
-        hide: true
-      }
-    },
-    {
-      path: '/carrierStandard/carrierSailingMaterialConsumeRecord/summarizedCalculation/:consumeDataId',
-      component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/summarizedCalculation.vue'),
-      meta: {
-        title: '历年航材消耗数据-汇总计算',
-        hide: true
-      }
-    }
-  ]
-}
 
-//社会化保障参考
-export const safeguardCost = {
-  path: '/carrierStandard',
-  redirect: '/carrierStandard/carrierListMachineryPreparation',
-  component: Layout,
-  name: 'SafeguardCost',
-  meta: {
-    title: '航材管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 9,
-  children: [
-    {
-      path: '/carrierStandard/safeguardCost',
-      component: () => import('@/views/carrierStandard/safeguardCost/index.vue'),
-      meta: {
-        title: '社会化保障参考'
+      /**
+       * ----------------------------携行航材指标分析-----------------------------
+       */
+      {
+        name: 'StatisticalAnalysis',
+        path: '/statisticalAnalysis',
+        meta: {
+          parent: 'CarrierStandard',
+          title: '携行航材指标分析'
+        }
       },
-      sort: 9
-    },
-    {
-      path: '/carrierStandard/safeguardCost/:id',
-      component: () => import('@/views/carrierStandard/safeguardCost/priceList.vue'),
-      meta: {
-        title: '社会化保障参考-价格清单',
-        hide: true
+      {
+        name: 'statisticalAnalysisSailingMaterialSpareParts',
+        path: '/statisticalAnalysis/statisticalAnalysisSailingMaterialSpareParts',
+        component: () => import('@/views/statisticalAnalysis/statisticalAnalysisSailingMaterialSpareParts/index.vue'),
+        meta: {
+          parent: 'StatisticalAnalysis',
+          title: '军事指标'
+        }
+      },
+      {
+        name: 'statisticalAnalysisSafeguardSynthesize',
+        path: '/statisticalAnalysis/statisticalAnalysisSafeguardSynthesize',
+        component: () => import('@/views/statisticalAnalysis/statisticalAnalysisSafeguardSynthesize/index.vue'),
+        meta: {
+          parent: 'StatisticalAnalysis',
+          title: '经济指标'
+        }
       }
-    }
-  ]
-}
+    ]
+  }
+]

+ 39 - 0
src/router/modules/faultDiagnosis.js

@@ -0,0 +1,39 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * FalseAlarm               虚警抑制
+ * FaultDiagnosis           智能故障诊断
+ */
+
+export default [
+  {
+    name: 'FaultManage',
+    path: '/faultManage',
+    redirect: '/faultManage/',
+    component: Layout,
+    meta: {
+      title: '故障诊断',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      {
+        name: 'FalseAlarm',
+        path: '/falseAlarm',
+        component: () => import('@/views/als/falseAlarm/index.vue'),
+        meta: {
+          parent: 'FaultManage',
+          title: '虚警抑制'
+        }
+      },
+      {
+        name: 'FaultDiagnosis',
+        path: '/faultDiagnosis',
+        component: () => import('@/views/als/faultDiagnosis/index.vue'),
+        meta: {
+          parent: 'FaultManage',
+          title: '智能故障诊断'
+        }
+      }
+    ]
+  }
+]

+ 38 - 0
src/router/modules/faultStatistics.js

@@ -0,0 +1,38 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * FaultStatistics               故障统计
+ */
+
+export default [
+  {
+    name: 'Fault',
+    path: '/fault',
+    redirect: '/fault/',
+    component: Layout,
+    meta: {
+      title: '故障统计'
+    },
+    children: [
+      {
+        name: 'FaultStatistics',
+        path: '/faultStatistics',
+        component: () => import('@/views/als/faultStatistics/index.vue'),
+        meta: {
+          // roleMenuHide: true,
+          parent: 'Fault',
+          title: '故障数据'
+        }
+      },
+      {
+        name: 'faultStatisticsEcharts',
+        path: '/faultStatisticsEcharts',
+        component: () => import('@/views/als/faultStatistics/echarts.vue'),
+        meta: {
+          parent: 'Fault',
+          title: '故障统计'
+        }
+      }
+    ]
+  }
+]

+ 39 - 0
src/router/modules/lifePrediction.js

@@ -0,0 +1,39 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * LifetimeSpareParts               有寿件管理
+ * LifePrediction           退化分析/寿命预测
+ */
+
+export default [
+  {
+    name: 'LifeManage',
+    path: '/lifeManage',
+    redirect: '/lifeManage/',
+    component: Layout,
+    meta: {
+      title: '寿命预测',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      {
+        name: 'LifetimeSpareParts',
+        path: '/lifetimeSpareParts',
+        component: () => import('@/views/als/lifetimeSpareParts/index.vue'),
+        meta: {
+          parent: 'LifeManage',
+          title: '有寿件管理'
+        }
+      },
+      {
+        name: 'LifePrediction',
+        path: '/lifePrediction',
+        component: () => import('@/views/als/lifePrediction/index.vue'),
+        meta: {
+          parent: 'LifeManage',
+          title: '退化分析'
+        }
+      }
+    ]
+  }
+]

+ 39 - 0
src/router/modules/maintenanceDecision.js

@@ -0,0 +1,39 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * FaultCase               故障字典
+ * IntelligentQA           智能辅助决策
+ */
+
+export default [
+  {
+    name: 'MaintenanceDecision',
+    path: '/maintenanceDecision',
+    redirect: '/maintenanceDecision/',
+    component: Layout,
+    meta: {
+      title: '维修决策',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      {
+        name: 'FaultCase',
+        path: '/faultCase',
+        component: () => import('@/views/als/faultCase/index.vue'),
+        meta: {
+          parent: 'MaintenanceDecision',
+          title: '故障字典'
+        }
+      },
+      {
+        name: 'IntelligentQA',
+        path: '/intelligentQA',
+        component: () => import('@/views/als/intelligentQA/index.vue'),
+        meta: {
+          parent: 'MaintenanceDecision',
+          title: '智能辅助决策'
+        }
+      }
+    ]
+  }
+]

+ 356 - 142
src/router/modules/system.js

@@ -1,149 +1,363 @@
 import Layout from '@/layout/index.vue'
 /**
  *
- * systemUser                   用户管理
- * systemRole                   角色管理
- * systemJurisdiction           权限管理
- * systemDataDictionary         数据字典
- * systemLog                    日志信息
+ * ModelManage                  模型管理
+ * BasicData                    基础数据管理
+ * SystemConfig                 系统设置
  */
 
-export const systemUser = {
-  path: '/system',
-  redirect: '/system/program',
-  component: Layout,
-  name: 'SystemUser',
-  meta: {
-    title: '系统管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 11,
-  children: [
-    {
-      path: '/system/user',
-      component: () => import('@/views/system/user/index.vue'),
-      meta: {
-        title: '用户管理'
-      },
-      sort: 1
-    }
-  ]
-}
-
-export const systemDept = {
-  path: '/system',
-  redirect: '/system/program',
-  component: Layout,
-  name: 'SystemDept',
-  meta: {
-    title: '系统管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 11,
-  children: [
-    {
-      path: '/system/dept',
-      component: () => import('@/views/system/dept/index.vue'),
-      meta: {
-        title: '部门管理'
-      },
-      sort: 2
-    }
-  ]
-}
-
-export const systemLog = {
-  path: '/system',
-  redirect: '/system/program',
-  component: Layout,
-  name: 'SystemLog',
-  meta: {
-    title: '系统管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 11,
-  children: [
-    {
-      path: '/system/systemLog',
-      component: () => import('@/views/system/systemLog/index.vue'),
-      meta: {
-        title: '日志信息'
-      },
-      sort: 3
-    }
-  ]
-}
-
-export const systemDataDictionary = {
-  path: '/system',
-  redirect: '/system/program',
-  component: Layout,
-  name: 'SystemDataDictionary',
-  meta: {
-    title: '系统管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 11,
-  children: [
-    {
-      path: '/system/systemDataDictionary',
-      component: () => import('@/views/system/systemDataDictionary/index.vue'),
-      meta: {
-        title: '数据字典'
-      },
-      sort: 4
+export default [
+  {
+    name: 'System',
+    path: '/system',
+    redirect: '/system/',
+    component: Layout,
+    meta: {
+      title: '系统管理',
+      icon: 'el-icon-s-platform'
     },
-    {
-      path: '/system/systemDataDictionary/:dictId',
-      component: () => import('@/views/system/systemDataDictionary/data.vue'),
-      meta: {
-        title: '字典数据',
-        hide: true
-      }
-    }
-  ]
-}
-
-export const systemRole = {
-  path: '/system',
-  redirect: '/system/program',
-  component: Layout,
-  name: 'SystemRole',
-  meta: {
-    title: '系统管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 11,
-  children: [
-    {
-      path: '/system/role',
-      component: () => import('@/views/system/role/index.vue'),
-      meta: {
-        title: '角色管理'
-      },
-      sort: 5
-    }
-  ]
-}
+    children: [
+      /**
+       * ----------------------------模型管理-----------------------------
+       */
+      {
+        name: 'ModelManage',
+        path: '/modelManage',
+        meta: {
+          parent: 'System',
+          title: '模型管理'
+        }
+      },
+      {
+        name: 'AgloManage',
+        path: '/agloManage',
+        component: () => import('@/views/als/model/index.vue'),
+        meta: {
+          parent: 'ModelManage',
+          title: '机务算法模型管理'
+        }
+      },
+      {
+        name: 'CarrierComputationalModel',
+        path: '/carrierStandard/carrierComputationalModel',
+        component: () => import('@/views/carrierStandard/carrierComputationalModel/index.vue'),
+        meta: {
+          parent: 'ModelManage',
+          title: '航材计算模型管理'
+        }
+      },
+      /**
+       * ----------------------------基础数据-----------------------------
+       */
+      {
+        name: 'BasicData',
+        path: '/basicData',
+        meta: {
+          parent: 'System',
+          title: '基础数据'
+        }
+      },
+      {
+        name: 'DataType',
+        path: '/basicData/dataType',
+        component: () => import('@/views/basicData/dataType/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '机种管理'
+        }
+      },
+      {
+        name: 'DataSpecies',
+        path: '/basicData/dataSpecies',
+        component: () => import('@/views/basicData/dataSpecies/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '机型管理'
+        }
+      },
+      {
+        name: 'AirConfiguration',
+        path: '/dataManage/airConfiguration',
+        component: () => import('@/views/als/airConfiguration/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '构型管理'
+        }
+      },
+      {
+        name: 'DataAircraftCataloging',
+        path: '/basicData/dataAircraftCataloging',
+        component: () => import('@/views/basicData/dataAircraftCataloging/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '飞机编目管理'
+        }
+      },
+      {
+        name: 'AirInstall',
+        path: '/dataManage/airInstall',
+        component: () => import('@/views/als/airInstall/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '装机管理'
+        }
+      },
+      {
+        name: 'DataSailingMaterialClassification',
+        path: '/basicData/dataSailingMaterialClassification',
+        component: () => import('@/views/basicData/dataSailingMaterialClassification/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '航材分类管理'
+        }
+      },
+      {
+        name: 'DataSailingMaterialMaterialCoding',
+        path: '/basicData/dataSailingMaterialMaterialCoding',
+        component: () => import('@/views/basicData/dataSailingMaterialMaterialCoding/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '航材物资编目-机务'
+        }
+      },
+      {
+        name: 'DataSailingMaterialMaterialCodingAviation',
+        path: '/basicData/dataSailingMaterialMaterialCodingAviation',
+        component: () => import('@/views/basicData/dataSailingMaterialMaterialCodingAviation/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '航材物资编目-航材'
+        }
+      },
+      {
+        name: 'DataSailingMaterialPrice',
+        path: '/basicData/dataSailingMaterialPrice',
+        component: () => import('@/views/basicData/dataSailingMaterialPrice/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '航材价格管理'
+        }
+      },
+      /**
+       * ----------------------------基础数据(环境因子管理)-----------------------------
+       */
+      {
+        name: 'DataEnvironment',
+        path: '/basicData/dataEnvironment',
+        component: () => import('@/views/basicData/dataEnvironment/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '环境因子管理'
+        }
+      },
+      {
+        name: 'DataEnvironment',
+        path: '/basicData/dataEnvironment/:id/:name/:value',
+        component: () => import('@/views/basicData/dataEnvironment/suitableSpareParts.vue'),
+        meta: {
+          parent: 'System',
+          roleMenuHide: true,
+          navHide: true,
+          title: '环境因子管理-适用航材'
+        }
+      },
+      /**
+       * ----------------------------基础数据(航材消耗规律管理)-----------------------------
+       */
+      {
+        name: 'CarrierSailingMaterialConsumeRegularities',
+        path: '/carrierStandard/carrierSailingMaterialConsumeRegularities',
+        component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRegularities/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '航材消耗规律管理'
+        }
+      },
+      /**
+       * ----------------------------基础数据(历年航材消耗数据)-----------------------------
+       */
+      {
+        name: 'CarrierSailingMaterialConsumeRecord',
+        path: '/carrierStandard/carrierSailingMaterialConsumeRecord',
+        component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '历年航材消耗数据'
+        }
+      },
+      {
+        name: 'CarrierSailingMaterialConsumeRecord',
+        path: '/carrierStandard/carrierSailingMaterialConsumeRecord/outboundRecord/:consumeDataId',
+        component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/outboundRecord.vue'),
+        meta: {
+          parent: 'System',
+          roleMenuHide: true,
+          navHide: true,
+          title: '历年航材消耗数据-出库记录'
+        }
+      },
+      {
+        name: 'CarrierSailingMaterialConsumeRecord',
+        path: '/carrierStandard/carrierSailingMaterialConsumeRecord/warehousingRecord/:consumeDataId',
+        component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/warehousingRecord.vue'),
+        meta: {
+          parent: 'System',
+          roleMenuHide: true,
+          navHide: true,
+          title: '历年航材消耗数据-入库记录'
+        }
+      },
+      {
+        name: 'CarrierSailingMaterialConsumeRecord',
+        path: '/carrierStandard/carrierSailingMaterialConsumeRecord/summarizedCalculation/:consumeDataId',
+        component: () => import('@/views/carrierStandard/carrierSailingMaterialConsumeRecord/summarizedCalculation.vue'),
+        meta: {
+          parent: 'System',
+          roleMenuHide: true,
+          navHide: true,
+          title: '历年航材消耗数据-汇总计算'
+        }
+      },
+      {
+        name: 'FlightData',
+        path: '/dataManage/flightData',
+        component: () => import('@/views/als/flightData/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '飞参数据'
+        }
+      },
+      {
+        name: 'JudgeFaultLogic',
+        path: '/dataManage/judgeFaultLogic',
+        component: () => import('@/views/als/judgeFaultLogic/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '判故逻辑管理'
+        }
+      },
+      {
+        name: 'TrainingData',
+        path: '/dataManage/trainingData',
+        component: () => import('@/views/als/trainingData/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '故障数据统计'
+        }
+      },
+      /**
+       * ----------------------------基础数据(定检任务)-----------------------------
+       */
+      {
+        name: 'SmTask',
+        path: '/dataManage/smTask',
+        component: () => import('@/views/als/smTask/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '定检任务'
+        }
+      },
+      {
+        name: 'SmTask',
+        path: '/dataManage/smTask/SMTaskDetails',
+        component: () => import('@/views/als/smTask/SMTaskDetails.vue'),
+        meta: {
+          parent: 'System',
+          roleMenuHide: true,
+          navHide: true,
+          title: '任务分配',
+          hide: true
+        }
+      },
+      /**
+       * ----------------------------基础数据(数据字典)-----------------------------
+       */
+      {
+        name: 'SystemDataDictionary',
+        path: '/system/systemDataDictionary',
+        component: () => import('@/views/system/systemDataDictionary/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '数据字典'
+        }
+      },
+      {
+        name: 'SystemDataDictionary',
+        path: '/system/systemDataDictionary/:dictId',
+        component: () => import('@/views/system/systemDataDictionary/data.vue'),
+        meta: {
+          parent: 'System',
+          roleMenuHide: true,
+          navHide: true,
+          title: '字典数据'
+        }
+      },
 
-export const systemBackup = {
-  path: '/system',
-  redirect: '/system/program',
-  component: Layout,
-  name: 'SystemBackup',
-  meta: {
-    title: '系统管理',
-    icon: 'el-icon-s-platform'
-  },
-  sort: 11,
-  children: [
-    {
-      path: '/system/systemBackup',
-      component: () => import('@/views/system/systemBackup/index.vue'),
-      meta: {
-        title: '系统备份'
-      },
-      sort: 6
-    }
-  ]
-}
+      /**
+       * ----------------------------系统设置-----------------------------
+       */
+      {
+        name: 'SystemConfig',
+        path: '/systemConfig',
+        meta: {
+          parent: 'System',
+          title: '系统设置'
+        }
+      },
+      {
+        name: 'SystemDept',
+        path: '/system/dept',
+        component: () => import('@/views/system/dept/index.vue'),
+        meta: {
+          parent: 'SystemConfig',
+          title: '组织机构管理'
+        }
+      },
+      {
+        name: 'SystemUser',
+        path: '/system/user',
+        component: () => import('@/views/system/user/index.vue'),
+        meta: {
+          parent: 'SystemConfig',
+          title: '用户管理'
+        }
+      },
+      {
+        name: 'SystemRole',
+        path: '/system/role',
+        component: () => import('@/views/system/role/index.vue'),
+        meta: {
+          parent: 'SystemConfig',
+          title: '角色管理'
+        }
+      },
+      {
+        name: 'SystemLog',
+        path: '/system/systemLog',
+        component: () => import('@/views/system/systemLog/index.vue'),
+        meta: {
+          parent: 'SystemConfig',
+          title: '日志信息'
+        }
+      },
+      {
+        name: 'SystemBackup',
+        path: '/system/systemBackup',
+        component: () => import('@/views/system/systemBackup/index.vue'),
+        meta: {
+          parent: 'SystemConfig',
+          title: '系统备份'
+        }
+      },
+      {
+        name: 'SystemCommunication',
+        path: '/system/systemCommunication',
+        component: () => import('@/views/als/systemCommunication/index.vue'),
+        meta: {
+          parent: 'SystemConfig',
+          title: '通讯管理'
+        }
+      }
+    ]
+  }
+]

+ 89 - 0
src/router/modules/systemTest.js

@@ -0,0 +1,89 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * systemUser                   用户管理
+ * systemRole                   角色管理
+ * systemJurisdiction           权限管理
+ * systemDataDictionary         数据字典
+ * systemLog                    日志信息
+ */
+
+export default [
+  {
+    name: 'System',
+    path: '/system',
+    redirect: '/system/',
+    component: Layout,
+    meta: {
+      title: '系统管理',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      {
+        path: '/system/user',
+        name: 'SystemUser',
+        component: () => import('@/views/system/user/index.vue'),
+        meta: {
+          parent: 'System',
+          title: '用户管理'
+        }
+      },
+      {
+        path: '/system/dept',
+        name: 'SystemDept',
+        component: () => import('@/views/system/dept/index.vue'),
+        meta: {
+          parent: 'System',
+          title: '组织机构管理'
+        }
+      },
+      {
+        path: '/system/systemLog',
+        name: 'SystemLog',
+        component: () => import('@/views/system/systemLog/index.vue'),
+        meta: {
+          parent: 'System',
+          title: '日志信息'
+        }
+      },
+      {
+        name: 'SystemDataDictionary',
+        path: '/system/systemDataDictionary',
+        component: () => import('@/views/system/systemDataDictionary/index.vue'),
+        meta: {
+          parent: 'System',
+          title: '数据字典'
+        }
+      },
+      {
+        name: 'SystemDataDictionary',
+        path: '/system/systemDataDictionary/:dictId',
+        component: () => import('@/views/system/systemDataDictionary/data.vue'),
+        meta: {
+          parent: 'System',
+          roleMenuHide: true,
+          navHide: true,
+          title: '数据字典'
+        }
+      },
+      {
+        name: 'SystemRole',
+        path: '/system/role',
+        component: () => import('@/views/system/role/index.vue'),
+        meta: {
+          parent: 'System',
+          title: '角色管理'
+        }
+      },
+      {
+        name: 'SystemBackup',
+        path: '/system/systemBackup',
+        component: () => import('@/views/system/systemBackup/index.vue'),
+        meta: {
+          parent: 'System',
+          title: '系统备份'
+        }
+      }
+    ]
+  }
+]

+ 68 - 0
src/router/modules/test.js

@@ -0,0 +1,68 @@
+import Layout from '@/layout/index.vue'
+
+//示例
+export default [
+  {
+    name: 'Task',
+    path: '/task',
+    component: Layout,
+    meta: {
+      title: '质量管理',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      {
+        path: '/task/1',
+        name: 'SJDR',
+        meta: {
+          parent: 'Task',
+          title: '数据导入'
+        }
+      },
+      {
+        path: '/task/1/1',
+        name: 'sjdr1',
+        meta: {
+          parent: 'SJDR',
+          title: '数据导1入1'
+        }
+      },
+      {
+        path: '/task/1/1/1',
+        name: 'sjdr2',
+        component: () => import('@/views/system/user/index.vue'),
+        meta: {
+          parent: 'sjdr1',
+          title: '数据导2入2'
+        }
+      },
+      {
+        path: '/task/1/1/2',
+        name: 'sjdr3',
+        component: () => import('@/views/system/user/index.vue'),
+        meta: {
+          parent: 'sjdr1',
+          title: '数据导2入3'
+        }
+      },
+      {
+        path: '/task/1/2',
+        name: 'FLYCan1',
+        meta: {
+          parent: 'Task',
+          title: 'MDC数据'
+        },
+        children: []
+      }
+      // {
+      //   path: '/task/1/3',
+      //   name: 'FLYCan2',
+      //   meta: {
+      //     parent: 'Task',
+      //     title: '警告列表'
+      //   },
+      //   children: []
+      // }
+    ]
+  }
+]

+ 89 - 34
src/router/private-routes.js

@@ -1,41 +1,96 @@
 import Layout from '@/layout/index.vue'
-//  这里举例说明 系统管理菜单路由 写法 详见 `/modules/system.js`
-//  目前暂时只支持二级路由 没有三级路由
 
-// 任务管理
-import * as task from './modules/task'
+//故障诊断
+import faultDiagnosis from './modules/faultDiagnosis'
+//寿命预测
+import lifePrediction from './modules/lifePrediction'
+//维修决策
+import maintenanceDecision from './modules/maintenanceDecision'
+//故障统计
 
-// 航材管理
-import * as carrierStandard from './modules/carrierStandard'
+import faultStatistics from './modules/faultStatistics'
+//携行规划
+import carrierStandard from './modules/carrierStandard'
+// 系统
+import system from './modules/system'
 
-// 基础数据
-import * as basicData from './modules/basicData'
-// 数据管理
-import * as dataManage from './modules/als/dataManage'
-import * as agloManage from './modules/als/agloManage'
-import * as intelligentQA from './modules/als/intelligentQA'
-import * as knowledgeGraph from './modules/als/knowledgeGraph'
-import * as qualityManage from './modules/als/qualityManage'
+export const privateRoutes = [
+  {
+    path: '/home',
+    name: 'Home',
+    meta: {
+      title: '综合看板',
+      icon: 'el-icon-s-home'
+    }
+  },
+  ...faultDiagnosis,
+  ...lifePrediction,
+  ...maintenanceDecision,
+  ...faultStatistics,
+  ...carrierStandard,
+  ...system
+]
 
-// // 统计分析
-// import * as statisticalAnalysis from './modules/statisticalAnalysis'
+export const flattenedRoutes = flattenedData(privateRoutes)
 
-//  用户管理 角色管理 权限管理  日志管理 系统配置
-import * as system from './modules/system'
-const allRouter = [dataManage, agloManage, knowledgeGraph, intelligentQA, qualityManage, task, carrierStandard, basicData, system]
+export function buildTreeData(routes) {
+  const flatRoutes = []
+  const nodeMap = []
+  const res = []
+  function flattened(routes, res = []) {
+    routes.forEach((r) => {
+      const { name, meta, path, children } = r
+      flatRoutes.push({ name, meta, path })
+      if (children && children.length > 0) {
+        flattened(r.children, res)
+      }
+    })
+  }
+  flattened(routes)
 
-// 私有路由表
-export const privateRoutes = [
-  // carrierListMachineryPreparation,
-  // carrierAllAudit,
-  // carrierListShipping,
-  // carrierListExecutionRegistration,
-  // useRegistration,
-  // carrierComputationalModel,
-  // carrierSailingMaterialConsumeRegularities,
-  // carrierSailingMaterialConsumeRecord
-  // safeguardCost
-]
-allRouter.forEach((i) => {
-  privateRoutes.push(...Object.values(i))
-})
+  flatRoutes.forEach((r) => {
+    const node = { ...r, children: [] }
+    nodeMap[r.name] = node
+    const parentName = r.meta?.parent
+    if (parentName) {
+      const parentNode = nodeMap[parentName]
+      if (parentNode) {
+        parentNode.children.push(node)
+      }
+    } else {
+      res.push(node)
+    }
+  })
+  return res
+}
+
+// 过滤出权限可用routes
+export function filterPermissionsRoutes(routes, p) {
+  return routes.filter((r) => {
+    if (p.includes(r.name)) {
+      if (r.children) {
+        r.children = filterPermissionsRoutes(r.children, p)
+      }
+      return true
+    }
+    if (r.children) {
+      const filterC = filterPermissionsRoutes(r.children, p)
+      if (filterC.length > 0) {
+        r.children = filterC
+        return true
+      }
+    }
+    return false
+  })
+}
+
+// tree to 扁平化
+export function flattenedData(routes, res = []) {
+  routes.forEach((r) => {
+    res.push({ ...r })
+    if (r.children?.length) {
+      flattenedData(r.children, res)
+    }
+  })
+  return res
+}

+ 1 - 7
src/router/public-routes.js

@@ -19,16 +19,10 @@ export const publicRoutes = [
         name: 'Home',
         component: () => import('@/views/home/index.vue'),
         meta: {
-          title: '首页',
+          title: '综合看板',
           icon: 'el-icon-s-home'
         }
       },
-      // 404
-      {
-        path: '/404',
-        name: 'redirect',
-        component: () => import('@/views/err-page/404.vue')
-      },
       // 401
       {
         path: '/401',

+ 2 - 1
src/store/getters.js

@@ -5,7 +5,8 @@ const getters = {
   },
   tagsViewList: (state) => state.app.tagsViewList,
   userInfo: (state) => state.user.userInfo,
-  getterstheme: (state) => state.settings.theme
+  getterstheme: (state) => state.settings.theme,
+  navMenus: (state) => state.permission.navMenus
 }
 
 export default getters

+ 21 - 2
src/store/modules/permission.js

@@ -4,12 +4,17 @@ export default {
   namespaced: true,
   state: {
     //   路由表: 初始时所拥有的路由表
-    routes: publicRoutes
+    routes: publicRoutes,
+    navMenus: []
   },
   mutations: {
     //   增加路由的方法
     setRoutes(state, newRoutes) {
       state.routes = [...publicRoutes, ...newRoutes]
+    },
+
+    setNavMenus(state, data) {
+      state.navMenus = data
     }
   },
   actions: {
@@ -29,9 +34,23 @@ export default {
         path: '/:catchAll(.*)',
         redirect: '/404'
       })
-
       context.commit('setRoutes', routes)
       return routes
+    },
+
+    setNavMenus(context, data) {
+      context.commit('setNavMenus', [
+        {
+          path: '/home',
+          name: 'Home',
+          // children: [],
+          meta: {
+            title: '综合看板',
+            icon: 'el-icon-s-home'
+          }
+        },
+        ...data
+      ])
     }
   }
 }

+ 25 - 1
src/utils/route.js

@@ -1,5 +1,5 @@
 import { isNull } from './index'
-import { privateRoutes } from '@/router/private-routes'
+import { privateRoutes, flattenedRoutes } from '@/router/private-routes'
 
 /**
  * 所有子集路由
@@ -117,6 +117,30 @@ export const getMenusData = () => {
   return result
 }
 
+// 过滤
+export function whitelistFilter(arr, w) {
+  return arr.filter((e) => !w.includes(e.name))
+}
+
+export const transformTreeData = (routes, res = []) => {
+  routes.forEach((item, i) => {
+    if (item.meta && item.meta.roleMenuHide) return
+    const node = {
+      id: item.name,
+      label: item.meta.title,
+      children: []
+    }
+    if (item.children && item.children.length) {
+      const children = transformTreeData(item.children)
+      if (children && children.length) {
+        node.children = children
+      }
+    }
+    res.push(node)
+  })
+  return res
+}
+
 export const flatMenus = (router) => {
   const arr = []
   router.sort((a, b) => a.sort - b.sort)

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

@@ -7,7 +7,7 @@
     <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="currentConfigNodeKey === ''">新增</el-button>
+          <el-button type="success" @click="openDialog()" :disabled="!(currentNode.type == 2) || currentConfigNodeKey === ''">新增</el-button>
           <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
         </div>
         <div class="view-dataType-title-search">
@@ -502,8 +502,7 @@ export default {
       // this.$refs.table.clearSelection()
       this.currentAirId = this.form.airId = data.id
       this.currentAirModelId = this.form.airModelId = data.parentId
-      // this.currentNode = data
-      // this.form.aircraftType = data.label
+      this.currentNode = data
       // this.getAirInstallAPI(this.currentNodeKey)
       let dataTree = []
       if (data.type === 1) {

+ 210 - 488
src/views/als/falseAlarm/index.vue

@@ -5,104 +5,67 @@
     </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.type == 2)">新增</el-button>
-          <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
-        </div>
+        <div class="view-dataType-title-btn"></div>
         <div class="view-dataType-title-search">
           <el-input placeholder="请输入架次号" v-model="keyWordData" class="input1">
-            <el-button slot="append" icon="el-icon-search" @click="searchClick" :disabled="!(currentNode.type == 2)"></el-button>
+            <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
           </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="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="请选择编目" 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" @current-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions" :pagination="SortieNoTableRequset"></LTable>
+      <!-- 警告列表对话框 -->
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" :before-close="handleClose" width="1200px">
+        <el-dialog width="80%" title="飞参数据曲线" :visible.sync="innerVisible" :before-close="innerDialogClose" append-to-body>
+          <div style="width: 100%; position: relative; color: #fff">
+            <el-radio-group class="isFalseAlarm" v-model="isFalseAlarm" size="small">
+              <el-radio-button label="0">实警</el-radio-button>
+              <el-radio-button label="1">虚警</el-radio-button>
+            </el-radio-group>
+          </div>
+          <PlayBackChart :chartData="chartData" />
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="innerDialogClose">取 消</el-button>
+            <el-button type="primary" @click="submit">确 定</el-button>
+          </span>
+        </el-dialog>
+        <el-form ref="airForm" :inline="true" :model="airForm" label-width="80px" disabled>
+          <el-form-item label="编目" prop="aircraftId">
+            <el-select v-model="airForm.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="warningIds">
-            <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="警告名称" align="center"> </el-table-column>
-              <el-table-column prop="code" label="警告代码" align="center"> </el-table-column>
-              <el-table-column prop="describe" label="描述" align="center"> </el-table-column>
-            </el-table>
+          <el-form-item label="架次" prop="sortieNo">
+            <el-input v-model="airForm.sortieNo" />
           </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-transfer v-model="transferRightData" :data="transferData" @change="changeColumnData"></el-transfer>
+          <el-form-item label="飞行时间" prop="flightDate">
+            <el-input v-model="airForm.flightDate" />
           </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>
-      <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="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 type="primary" @click="resultVisible = false">确 定</el-button>
-        </span>
+        <LTable ref="warningTable" @selection-change="selection" :defaultFetch="false" :columns="warningColumns" :dataSource="warningTableData" :options="warningOptions" :pagination="warningTableRequset"></LTable>
       </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
-import { getFalseAlarm, addFalseAlarm, updateFalseAlarm, removeFalseAlarm } from '@/api/als/falseAlarm'
-import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
-import { getFalseAlarmResult } from '@/api/als/falseAlarmResult'
-import { getColumnDataAPI, executeFalseAlarm } from '@/api/als/algorithm'
+import { getDataImport } from '@/api/als/dataImport'
+import { getCurveData, getWarning, updateWarning } from '@/api/als/warning'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
-import { getDataImport } from '@/api/als/dataImport'
-import { getModel } from '@/api/als/model'
+import PlayBackChart from '@/views/als/components/Charts/playBackChart.vue'
 import { deepClone, debounce } from '@/utils/index'
-import { getWarning } from '@/api/als/warning'
-import { flattenTree } from '../utils/common'
 
 export default {
   name: 'FalseAlarm',
-  components: {},
+  components: { PlayBackChart },
   data() {
     // 这里存放数据
     return {
       dialogTitle: '新增',
       dialogVisible: false,
-      progressVisible: false,
-      resultVisible: false,
+      innerVisible: false,
       keyWordData: '',
       aircaftModelIdList: [],
       currentNodeKey: '',
@@ -123,18 +86,6 @@ export default {
       },
       searchValue: '',
       columns: [
-        {
-          prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
-        },
         {
           prop: 'aircraftId',
           label: '编目',
@@ -148,37 +99,21 @@ export default {
           }
         },
         {
-          prop: 'modelType',
-          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',
-          label: '参数'
+          prop: 'sortieNo',
+          label: '架次号'
         },
         {
-          prop: 'columnData',
-          label: '数据列'
+          prop: 'flightDate',
+          label: '飞行时间'
         },
-        // {
-        //   prop: 'ossId',
-        //   label: '文件Id'
-        // },
         {
-          prop: 'status',
-          label: '状态',
+          prop: 'source',
+          label: '数据源',
           render: (h, params) => {
-            if (params.row.status == 0) {
-              return h('span', { class: 'warning-state' }, '失败')
+            if (params.row.source == 1) {
+              return h('span', { class: 'success-state' }, '飞参数据')
             } else {
-              return h('span', { class: 'success-state' }, '成功')
+              return h('span', { class: 'success-state' }, 'MDC数据')
             }
           }
         },
@@ -188,192 +123,117 @@ export default {
           width: '240px',
           group: [
             {
-              name: '查看',
-              type: 'text',
-              round: false,
-              plain: false,
-              onClick: (row, index, scope) => {
-                this.checkResultList(row)
-              }
-            },
-            {
-              name: '删除',
+              name: '查看警告列表',
               type: 'text',
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                this.remove([row])
+                this.checkWarningList(row)
               }
             }
           ]
         }
       ],
-      sortieNoColumns: [
-        {
-          prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
-        },
-        {
-          prop: 'source',
-          label: '数据来源',
-          render: (h, params) => {
-            if (params.row.source == 1) {
-              return h('span', { class: 'success-state' }, '飞参数据')
-            } else {
-              return h('span', { class: 'success-state' }, 'MDC数据')
-            }
-          }
-        },
-        {
-          prop: 'ossId',
-          label: '文件Id'
-        }
-      ],
-      resultColumns: [
-        {
-          prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
-        },
-        {
-          prop: 'aircraftId',
-          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', {}, '')
-            }
-          }
-        },
+      options: {
+        stripe: true, // 斑马纹
+        mutiSelect: true, // 多选框
+        index: false, // 显示序号, 多选则 mutiSelect
+        loading: false, // 表格动画
+        initTable: false, // 是否一挂载就加载数据
+        border: true,
+        height: 'calc(100vh - 300px)'
+      },
+      tableCheckItems: [],
+      tableData: [],
+      tableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
+      warningColumns: [
         {
           prop: 'code',
-          label: '警告代码'
+          label: 'HMC码'
         },
         {
           prop: 'name',
-          label: '警告名称'
+          label: '名称'
         },
         {
           prop: 'describe',
-          label: '警告描述'
+          label: '描述'
         },
         {
           prop: 'status',
-          label: '结果',
+          label: '是否虚警',
           render: (h, params) => {
-            const result = JSON.parse(params.row.status)[0]
-            const isfalseAlarm = result['是否虚警']
-            if (isfalseAlarm == 0) {
-              return h('span', { class: 'warning-state' }, '否')
+            if (params.row.status == '0') {
+              return h('span', { class: 'warning-state' }, '实警')
             } else {
-              return h('span', { class: 'success-state' }, '')
+              return h('span', { class: 'success-state' }, '虚警')
             }
           }
+        },
+        {
+          button: true,
+          label: '操作',
+          width: '240px',
+          group: [
+            {
+              name: '查看',
+              type: 'text',
+              round: false,
+              plain: false,
+              onClick: (row, index, scope) => {
+                this.checkCurve(row)
+              }
+            }
+          ]
         }
       ],
-      options: {
+      warningOptions: {
         stripe: true, // 斑马纹
         mutiSelect: true, // 多选框
         index: false, // 显示序号, 多选则 mutiSelect
         loading: false, // 表格动画
         initTable: false, // 是否一挂载就加载数据
         border: true,
-        height: 'calc(100vh - 300px)'
-      },
-      sortieNoOptions: {
-        stripe: 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,
-        pageSize: 10,
-        searchValue: ''
+        height: 'calc(100vh - 600px)'
       },
-      tableRequset: {
+      warningTableCheckItems: [],
+      warningTableData: [],
+      warningTableRequset: {
         total: 0,
         pageIndex: 1,
         pageSize: 10,
         searchValue: ''
       },
-      executeForm: {
-        modelId: '',
-        modelType: '',
-        ossId: '',
-        aircraftId: '',
-        sortieNo: '',
-        param: '',
-        columnData: [],
-        warningIds: []
+      debounceFn: debounce(this.fetch, 500),
+      aircaftCatalogAll: [],
+      chartData: {
+        title: '',
+        legendData: [],
+        xAxisData: [],
+        yAxisData: [],
+        seriesData: []
       },
       form: {
         id: '',
         sortieNo: '',
         aircraftId: '',
-        modelType: '',
-        param: '',
-        columnData: [],
-        ossId: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        code: '',
+        name: '',
+        describe: [],
+        status: ''
       },
-      debounceFn: debounce(this.fetch, 500),
-      aircaftCatalogAll: [],
-      transferData: [],
-      transferRightData: [],
-      algoTypeList: [{ id: 4, name: '虚警抑制' }],
-      modelList: [],
-      percentage: 0,
-      sortieNoList: [],
-      warningIdsList: [],
-      sortieNoTableCheck: [],
-      allTaskExecond: []
+      airForm: {
+        aircraftId: '',
+        sortieNo: '',
+        flightDate: ''
+      },
+      isFalseAlarm: '0',
+      currentSortieNo: ''
     }
   },
   watch: {
@@ -382,6 +242,12 @@ export default {
       this.debounceFn()
     }
   },
+  // computed: {
+  //   falseAlarmText() {
+  //     console.log('this.isFalseAlarm', this.isFalseAlarm)
+  //     return this.isFalseAlarm === '1' ? '实警' : '虚警'
+  //   }
+  // },
   mounted() {
     this.getAircaftCatalogTreeAPI()
   },
@@ -402,28 +268,7 @@ export default {
           this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
             .map((e) => e.id)
             .toString()
-          this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
-        }
-        const res = await getTaskExecondRegister({
-          status: null,
-          queryParam: '',
-          taskId: '',
-          aircaftCatalogId: ''
-        })
-        this.allTaskExecond = flattenTree(res.data)
-      } catch (error) {}
-    },
-
-    async removeFalseAlarmAPI(params) {
-      try {
-        const { code } = await removeFalseAlarm(params)
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          await this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
-          this.handleClose()
+          this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -444,280 +289,154 @@ export default {
       return newArr
     },
 
-    async getFalseAlarmAPI(params) {
+    async getDataImportAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, total }
-      } = await getFalseAlarm({ pageSize, pageNum: pageIndex, ...params })
+      } = await getDataImport({ pageSize, pageNum: pageIndex, ...params, source: 1 })
       this.tableData = list
       this.tableRequset.total = total
     },
 
-    async getFalseAlarmResultAPI(params) {
-      if (this.$refs.resultTableRef) {
-        this.$refs.resultTableRef.clearSelection()
-        this.resultTableData = []
-      }
-      const { keyWord } = this
-      const { pageSize, pageIndex } = this.resultTableRequset
-      const {
-        data: { list, total }
-      } = await getFalseAlarmResult({ pageSize, pageNum: pageIndex, ...params })
-      this.resultTableData = list
-      this.resultTableRequset.total = total
-    },
-
     fetch() {
-      this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     async searchClick() {
-      this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
-    },
-
-    async addFalseAlarmAPI() {
-      try {
-        delete this.form.aircaftModelName
-        const { code } = await addFalseAlarm({ ...this.form })
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
-        }
-      } catch (error) {}
-    },
-
-    async updateFalseAlarmAPI() {
-      try {
-        const { code } = await updateFalseAlarm({ ...this.form })
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.handleClose()
-          this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
-        }
-      } catch (error) {}
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.executeForm.aircraftId = data.id
+      this.currentNodeKey = data.id
       this.currentNode = data
       this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
         .map((e) => e.id)
         .toString()
-      this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
+      if (!this.aircaftModelIdList) {
+        this.aircaftModelIdList = '#'
+      }
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     openDialog() {
-      this.executeForm.aircraftId = this.currentNodeKey
-      if (this.executeForm.aircraftId !== '') {
-        this.changeAircraftId(this.executeForm.aircraftId)
-      }
-      this.dialogTitle = '新增'
+      this.dialogTitle = '警告列表'
       this.dialogVisible = true
     },
 
     handleClose() {
-      this.$refs.sortieNoTableRef.clearSelection()
-      this.$refs.warningTableRef.clearSelection()
-      this.sortieNoList = []
-      this.warningIdsList = []
       this.dialogVisible = false
-      this.transferRightData = []
-      this.executeForm = {
-        modelId: '',
-        modelType: '',
-        ossId: '',
+      this.warningTableData = []
+      this.currentSortieNo = ''
+      this.airForm = {
         aircraftId: '',
         sortieNo: '',
-        param: '',
-        columnData: [],
-        warningIds: []
+        flightDate: ''
       }
     },
 
-    handUpdate(row) {
-      this.dialogTitle = '编辑'
-      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
-    },
-    checkResultList(row) {
-      if (row.status === '0') {
-        this.$message({
-          type: 'warning',
-          message: '执行失败,无法查看结果!'
-        })
-        return
+    innerDialogClose() {
+      this.innerVisible = false
+      this.chartData = {
+        title: '',
+        legendData: [],
+        xAxisData: [],
+        yAxisData: [],
+        seriesData: []
       }
-      this.getFalseAlarmResultAPI({ falseAlarmId: row.id })
-      this.resultVisible = true
+      this.isFalseAlarm = false
+    },
+
+    submit() {
+      this.form.status = this.isFalseAlarm
+      this.updateWarningAPI()
     },
-    async beginExecute() {
-      if (this.warningIdsList.length == 0 || this.executeForm.warningIds.length == 0) {
-        this.$message({
-          type: 'warning',
-          message: '该架次未选择警告,无法进行虚警抑制!'
-        })
-        return
-      }
-      this.progressVisible = true
-      let myTimer = setInterval(() => {
-        if (this.percentage < 100) {
-          this.percentage += 1
-        } else {
-          clearInterval(myTimer)
-          this.$message({
-            type: 'error',
-            message: '执行有误'
-          })
-          this.progressVisible = false
-          this.percentage = 0
-        }
-      }, 30)
 
+    async updateWarningAPI() {
       try {
-        const res = await executeFalseAlarm(this.executeForm)
-        this.percentage = 100
-        clearInterval(myTimer)
-        if (res?.code === 200) {
+        const { code } = await updateWarning({ ...this.form })
+        if (code === 200) {
           this.$message({
             type: 'success',
-            message: '执行成功!'
-          })
-          this.handleClose()
-          const result = JSON.parse(res.data)[0]
-          const isfalseAlarm = result['是否虚警'] === 0 ? '否' : '是'
-          this.getFalseAlarmAPI({ aircraftId: this.aircaftModelIdList })
-          this.$alert(`故障编码为:${result['故障编码']},是否虚警:${isfalseAlarm},`, '虚警抑制结果', {
-            confirmButtonText: '确定'
+            message: '操作成功!'
           })
+          this.innerDialogClose()
+          this.getWarningAPI({ sortieNo: this.currentSortieNo })
         }
-      } catch (error) {
-        clearInterval(myTimer)
-      } finally {
-        this.progressVisible = false
-        this.percentage = 0
-      }
-    },
-    async changeModelType(type) {
-      try {
-        const {
-          data: { list }
-        } = await getModel({ type })
-        this.modelList = list
       } catch (error) {}
     },
 
-    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])
-        }
-      })
-    },
-
-    async changeAircraftId(aircraftId) {
-      try {
-        const {
-          data: { list, total }
-        } = await getDataImport({ aircraftId })
-        this.sortieNoList = list
-        this.SortieNoTableRequset.total = total
-      } catch (error) {}
+    selection(val) {
+      this.tableCheckItems = val
     },
 
-    async changeSortieNo(sortieNo) {
-      try {
-        const {
-          data: { list }
-        } = await getWarning({ aircraftId: this.executeForm.aircraftId, sortieNo })
-        this.executeForm.sortieNo = sortieNo
-        this.warningIdsList = list
-      } catch (error) {}
+    checkWarningList(row) {
+      this.currentSortieNo = this.airForm.sortieNo = row.sortieNo
+      this.airForm.aircraftId = row.aircraftId
+      this.airForm.flightDate = row.flightDate
+      this.getWarningAPI({ sortieNo: this.currentSortieNo })
+      this.openDialog()
     },
 
-    submit() {
-      switch (this.dialogTitle) {
-        case '编辑':
-          this.updateFalseAlarmAPI()
-          break
-        case '新增':
-          this.beginExecute()
-          break
-      }
+    async getWarningAPI(params) {
+      if (this.$refs.warningTable) this.$refs.warningTable.clearSelection()
+      const { pageSize, pageIndex } = this.warningTableRequset
+      const {
+        data: { list, total }
+      } = await getWarning({ pageSize, pageNum: pageIndex, ...params })
+      this.warningTableData = list
+      this.warningTableRequset.total = total
     },
 
-    selection(val) {
-      this.tableCheckItems = val
+    async checkCurve(row) {
+      this.isFalseAlarm = row.status
+      this.form = deepClone(row)
+      const { data } = await getCurveData(row.code, row.sortieNo)
+      this.getResultData(data)
     },
 
-    async sortieNoSelection(val) {
-      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.sortieNo)
-          }
-        } catch (error) {}
+    getResultData(data) {
+      this.chartData = {
+        title: '',
+        legendData: [],
+        xAxisData: [],
+        yAxisData: [],
+        seriesData: []
       }
-    },
-
-    warningSelection(val) {
-      this.executeForm.warningIds = [val.id]
-      if (this.executeForm.modelId) {
-        this.changeModelId(this.executeForm.modelId)
+      // const { contentData, headData } = this.handleResultData(JSON.parse(data))
+      const contentData = JSON.parse(data)
+      const headData = Object.keys(contentData)
+      this.chartData.legendData = headData
+      for (var key in contentData) {
+        if (key === '时间') {
+          this.chartData.xAxisData = contentData['时间']
+        } else {
+          this.chartData.seriesData.push({
+            name: key,
+            type: 'line',
+            data: contentData[key],
+            connectNulls: true
+          })
+        }
       }
+      this.innerVisible = true
     },
 
-    remove(row) {
-      this.$confirm('是否删除该数据', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
+    handleResultData(resultData) {
+      console.log('resultData', resultData)
+      const headData = Object.keys(resultData)
+      const contentData = {}
+      headData.forEach((headItem) => {
+        contentData[headItem] = []
       })
-        .then(() => {
-          this.removeFalseAlarmAPI(row.map((e) => e.id))
-        })
-        .catch(() => {})
+      resultData.forEach((item) => {
+        for (var key in item) {
+          contentData[key].push(item[key])
+        }
+      })
+      return { contentData, headData }
     }
   }
 }
@@ -725,7 +444,10 @@ export default {
 
 <style lang="scss" scoped>
 @import '../index.scss';
-::v-deep .single-select-table thead .el-table-column--selection .cell {
-  display: none;
+.isFalseAlarm {
+  position: absolute;
+  right: 20px;
+  color: #fff;
+  z-index: 9999;
 }
 </style>

+ 238 - 235
src/views/als/faultCase/index.vue

@@ -1,17 +1,22 @@
 <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 style="width: 100%">
       <div class="view-dataType-title">
         <div class="view-dataType-title-btn">
-          <el-button type="success" @click="openDialog()" :disabled="!(currentNode.type == 2)">新增</el-button>
+          <el-button type="success" @click="openDialog()" :disabled="currentNode.type == 2">新增</el-button>
           <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
+          <el-dropdown split-button type="primary" style="margin-left: 10px" trigger="click" @command="handleExport">
+            更多
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="handleImport">导入</el-dropdown-item>
+              <el-dropdown-item command="handleExport" :disabled="tableData.length == 0">导出</el-dropdown-item>
+              <el-dropdown-item command="importTemplate">下载数据模板</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
         </div>
         <div class="view-dataType-title-search">
-          <el-input placeholder="请输入故障名称" v-model="keyWordData" class="input1">
-            <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
+          <el-input placeholder="请输入故障现象" v-model="keyWordData" class="input1">
+            <el-button slot="append" icon="el-icon-search" @click="searchClick(keyWordData)"></el-button>
           </el-input>
         </div>
       </div>
@@ -21,62 +26,21 @@
       <!-- 添加或修改故障案例对话框 -->
       <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="aircraftType">
-            <el-select v-model="form.aircraftType" placeholder="请选择机型" disabled>
-              <el-option v-for="item in aircaftModelAll" :key="item.aircaftModelId" :label="item.aircaftModelName" :value="item.aircaftModelId"> </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="编目" prop="aircraftCode">
-            <el-select v-model="form.aircraftCode" placeholder="请选择编目" 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-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="faultDate">
-            <el-date-picker v-model="form.faultDate" type="date" value-format="yyyy-MM-dd" placement="bottom-start" 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.label"> </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-select v-model="form.level" placeholder="请输入故障性质">
-              <el-option v-for="item in levelList" :key="item.id" :label="item.label" :value="item.label"> </el-option>
-            </el-select>
+          <el-form-item label="机型" prop="aircraftTypeName">
+            <treeselect :value="form.aircraftTypeName" :normalizer="aircraftTypeNormalizer" :options="aircraftTypeTreeData" :show-count="true" placeholder="请选择机型" @select="aircraftTypeChange" />
           </el-form-item>
-          <el-form-item label="故障现象" prop="symptoms">
-            <el-input type="textarea" :rows="2" v-model="form.symptoms" placeholder="请输入故障现象" />
+          <el-form-item label="系统" prop="aircraftSystemName">
+            <el-input v-model="form.aircraftSystemName" placeholder="请输入系统" />
           </el-form-item>
-          <el-form-item label="排除方法" prop="methodRectification">
-            <el-input v-model="form.methodRectification" placeholder="请输入排除方法" />
+          <el-form-item label="分系统" prop="aircraftSubsystemName">
+            <el-input v-model="form.aircraftSubsystemName" 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.label"> </el-option>
-            </el-select>
+          <el-form-item label="故障现象" prop="faultPhenomenon">
+            <el-input v-model="form.faultPhenomenon" placeholder="请输入故障现象" />
           </el-form-item>
           <el-form-item label="故障原因" prop="faultCause">
             <el-input v-model="form.faultCause" placeholder="请输入故障原因" />
           </el-form-item>
-          <el-form-item label="故障文件" prop="ossId">
-            <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx']" />
-          </el-form-item>
-          <!-- <el-form-item label="备注" prop="remarks">
-            <el-input v-model="form.remarks" type="textarea" :rows="2" placeholder="请输入备注" />
-          </el-form-item> -->
         </el-form>
 
         <span slot="footer" class="dialog-footer">
@@ -87,40 +51,63 @@
 
       <el-dialog title="故障案例详情" :visible.sync="detailVisible" width="1000px" :show-close="false">
         <el-descriptions border>
-          <el-descriptions-item label="飞机型号">{{ detailAircraftType }}</el-descriptions-item>
-          <el-descriptions-item label="编目">{{ detailAircraftCode }}</el-descriptions-item>
-          <el-descriptions-item label="故障名称">{{ form.faultName }}</el-descriptions-item>
-          <el-descriptions-item label="故障日期">{{ form.faultDate }}</el-descriptions-item>
-          <el-descriptions-item label="故障现象">{{ form.symptoms }}</el-descriptions-item>
-          <el-descriptions-item label="所属系统">{{ form.systemItem }}</el-descriptions-item>
-          <el-descriptions-item label="专业">{{ form.specialty }}</el-descriptions-item>
-          <el-descriptions-item label="故障位置">{{ form.location }}</el-descriptions-item>
-          <el-descriptions-item label="排除方法">{{ form.methodRectification }}</el-descriptions-item>
-          <el-descriptions-item :span="1" label="故障原因分类">{{ form.faultCauseType }}</el-descriptions-item>
-          <el-descriptions-item :span="2" label="故障性质">{{ form.level }}</el-descriptions-item>
-          <el-descriptions-item :span="3" label="故障原因">{{ form.faultCause }}</el-descriptions-item>
-          <el-descriptions-item label="故障文件">{{ detailOssId }}</el-descriptions-item>
+          <el-descriptions-item label="机型">{{ detailAircraftType }}</el-descriptions-item>
+          <el-descriptions-item label="系统">{{ form.aircraftSystemName }}</el-descriptions-item>
+          <el-descriptions-item label="分系统">{{ form.aircraftSubsystemName }}</el-descriptions-item>
+          <el-descriptions-item label="故障现象">{{ form.faultPhenomenon }}</el-descriptions-item>
+          <el-descriptions-item label="故障原因">{{ form.faultCause }}</el-descriptions-item>
+          <!-- <el-descriptions-item :span="1" label="排故方法">{{ form.troubleshootingMethodPath }}</el-descriptions-item>
+          <el-descriptions-item label="故障图"><img :src="faultPicturePathUrl" width="200px" /></el-descriptions-item>
+          <el-descriptions-item label="故障树"><img :src="faultPicturePathUrl" width="200px" /></el-descriptions-item> -->
         </el-descriptions>
         <span slot="footer" class="dialog-footer">
           <el-button @click="detailSubmit">确 定</el-button>
         </span>
       </el-dialog>
+
+      <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+        <el-upload
+          ref="upload"
+          :limit="1"
+          accept=".xlsx, .xls"
+          :headers="upload.headers"
+          :action="upload.url + '?updateSupport=' + upload.updateSupport"
+          :disabled="upload.isUploading"
+          :on-progress="handleFileUploadProgress"
+          :on-success="handleFileSuccess"
+          :auto-upload="false"
+          drag
+        >
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+          <div class="el-upload__tip text-center" slot="tip">
+            <div class="el-upload__tip" slot="tip"><el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据</div>
+            <span>仅允许导入xls、xlsx格式文件。</span>
+          </div>
+        </el-upload>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="submitFileForm">确 定</el-button>
+          <el-button @click="upload.open = false">取 消</el-button>
+        </div>
+      </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
 import { getFaultCase, addFaultCase, updateFaultCase, removeFaultCase } from '@/api/als/faultCase'
-import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
-import { getAircaftModelAll, getAircaftCatalogAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
 import { getListByIdsApi } from '@/api/als/oss'
-import FileUpload from '@/views/als/components/FileUpload'
-import { flattenTree } from '../utils/common'
+import { getItem } from '@/utils/index'
+import { getAircaftTypeAndModelTree } from '@/api/als/sideTree'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import { flattenTree, download } from '../utils/common'
+// import FileUpload from '@/views/als/components/FileUpload'
 
 export default {
   name: 'FaultCase',
-  components: { FileUpload },
+  components: { Treeselect },
   data() {
     // 这里存放数据
     return {
@@ -132,15 +119,6 @@ export default {
       currentNodeKey: '',
       currentNode: {},
       menuTreeData: [],
-      treeObj: {
-        title: '所属机种',
-        activityheight: '275px',
-        searchIcon: false,
-        configure: {
-          children: 'children',
-          label: 'label'
-        }
-      },
       typeTree: {
         children: 'children',
         label: 'label'
@@ -148,53 +126,67 @@ export default {
       searchValue: '',
       columns: [
         {
-          prop: 'aircraftType',
+          prop: 'aircraftTypeName',
           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: 'aircraftCode',
-          label: '编目',
-          render: (h, params) => {
-            const matchedItem = this.aircaftCatalogAll.find((item) => params.row.aircraftCode === item.aircaftCatalogId)
+            const matchedItem = this.aircraftTypeAll.find((item) => params.row.aircraftTypeName.trim() === item.id.trim())
             if (matchedItem) {
-              return h('span', matchedItem.aircaftCatalogCode)
+              return h('span', matchedItem.label)
             } else {
               return h('span', {}, '')
             }
           }
         },
         {
-          prop: 'faultName',
-          label: '故障名称'
-        },
-        {
-          prop: 'faultDate',
-          label: '故障日期'
+          prop: 'aircraftSystemName',
+          label: '系统'
         },
         {
-          prop: 'systemItem',
-          label: '所属系统'
+          prop: 'aircraftSubsystemName',
+          label: '分系统'
         },
         {
-          prop: 'faultCauseType',
-          label: '故障原因分类'
+          prop: 'faultPhenomenon',
+          label: '故障现象',
+          render: (h, params) => {
+            return h('span', {
+              domProps: {
+                innerHTML: params.row.faultPhenomenon ? params.row.faultPhenomenon : params.row.pcontent
+              }
+            })
+          }
         },
         {
-          prop: 'level',
-          label: '故障性质'
+          prop: 'faultCause',
+          label: '故障原因',
+          render: (h, params) => {
+            return h('span', {
+              domProps: {
+                innerHTML: params.row.faultCause ? params.row.faultCause : params.row.fcontent
+              }
+            })
+          }
         },
         {
-          prop: 'ossId',
-          label: '文件编号'
+          prop: 'viewCount',
+          label: '浏览次数'
         },
+        // {
+        //   prop: 'createBy',
+        //   label: '创建人'
+        // },
+        // {
+        //   prop: 'createTime',
+        //   label: '创建时间'
+        // },
+        // {
+        //   prop: 'updateBy',
+        //   label: '最后修改人'
+        // },
+        // {
+        //   prop: 'updateTime',
+        //   label: '最后修改时间'
+        // },
         {
           button: true,
           label: '操作',
@@ -232,11 +224,11 @@ export default {
       ],
 
       options: {
-        stripe: true, // 斑马纹
-        mutiSelect: true, // 多选框
-        index: false, // 显示序号, 多选则 mutiSelect
-        loading: false, // 表格动画
-        initTable: false, // 是否一挂载就加载数据
+        stripe: true,
+        mutiSelect: false,
+        index: true,
+        loading: false,
+        initTable: false,
         border: true,
         height: 'calc(100vh - 300px)'
       },
@@ -249,49 +241,35 @@ export default {
         searchValue: ''
       },
       form: {
-        id: '',
-        aircraftType: '',
-        aircraftCode: '',
-        faultCode: '',
-        faultName: '',
-        ossId: '',
-        faultDate: '',
-        systemItem: '',
-        specialty: '',
-        faultCauseType: '',
-        location: '',
-        level: '',
-        methodRectification: '',
-        symptoms: '',
+        aircraftTypeName: null,
+        aircraftSystemName: '',
+        aircraftSubsystemName: '',
+        faultPhenomenon: '',
         faultCause: '',
-        remarks: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
+        faultTreePath: '',
+        faultPicturePath: '',
+        troubleshootingMethodPath: '',
+        viewCount: 0,
         createBy: '',
         createTime: '',
         updateBy: '',
         updateTime: ''
       },
       debounceFn: debounce(this.fetch, 500),
-      aircaftModelAll: [],
-      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: '其他原因' }
-      ],
-      detailAircraftType: '',
-      detailAircraftCode: '',
-      detailOssId: ''
+      faultPicturePathUrl: '',
+      faultTreePathUrl: '',
+      upload: {
+        open: false,
+        title: '',
+        isUploading: false,
+        updateSupport: 0,
+        headers: { Authorization: getItem('token') },
+        // 上传的地址
+        url: '/api/als/faultCase/importData'
+      },
+      aircraftTypeTreeData: [],
+      aircraftTypeAll: [],
+      detailAircraftType: ''
     }
   },
   watch: {
@@ -301,34 +279,10 @@ export default {
     }
   },
   mounted() {
-    this.getAircaftCatalogTreeAPI()
+    this.getAirTypeData()
+    this.getFaultCaseAPI()
   },
   methods: {
-    async getAircaftCatalogTreeAPI(params) {
-      try {
-        const { data } = await getAircaftCatalogTree(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.aircaftModelIdList = String(this.getTreeLeafData(data[0]?.children).map((e) => e.id))
-          this.getFaultCaseAPI({ aircraftCodes: this.aircaftModelIdList })
-        }
-        const { data: data2 } = await getAircaftCatalogAll({
-          keyWord: '',
-          aircaftModelIdList: []
-        })
-        this.aircaftCatalogAll = flattenTree(data2)
-      } catch (error) {}
-    },
-
     async removeFaultCaseAPI(params) {
       try {
         const { code } = await removeFaultCase(params)
@@ -337,28 +291,12 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
-          await this.getFaultCaseAPI({ aircraftCodes: this.aircaftModelIdList })
+          await this.getFaultCaseAPI({ faultPhenomenon: keyWordData })
           this.handleClose()
         }
       } catch (error) {}
     },
 
-    getTreeLeafData(list) {
-      const newArr = []
-      function getLeaf(data, arr) {
-        data.forEach((e) => {
-          if (e.type === 2) {
-            arr.push(e)
-          }
-          if (e.children.length) {
-            getLeaf(e.children, arr)
-          }
-        })
-      }
-      getLeaf(list, newArr)
-      return newArr
-    },
-
     async getFaultCaseAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { keyWord } = this
@@ -370,25 +308,39 @@ export default {
       this.tableRequset.total = total
     },
 
+    async getAirTypeData() {
+      try {
+        const { data } = await getAircaftTypeAndModelTree()
+        this.aircraftTypeTreeData = data[0].children
+        this.aircraftTypeAll = flattenTree(data[0].children)
+      } catch (error) {}
+    },
+
+    async getFaultCaseByEsAPI(keyWordData) {
+      console.log(keyWordData)
+    },
+
     fetch() {
-      this.getFaultCaseAPI({ aircraftCodes: this.aircaftModelIdList })
+      this.getFaultCaseAPI({ faultPhenomenon: keyWordData })
     },
 
-    async searchClick() {
-      this.getFaultCaseAPI({ aircraftCodes: this.aircaftModelIdList, faultName: this.keyWordData })
+    async searchClick(keyWordData) {
+      // this.getFaultCaseByEsAPI(keyWordData)
+      this.getFaultCaseAPI({ faultPhenomenon: keyWordData })
     },
 
     async addFaultCaseAPI() {
       try {
-        delete this.form.aircaftModelName
         const { code } = await addFaultCase({ ...this.form })
         if (code === 200) {
           this.$message({
             type: 'success',
-            message: '操作成功!'
+            duration: 3000,
+            message: 'ES数据同步中,稍后查询!'
           })
+
           this.handleClose()
-          this.getFaultCaseAPI({ aircraftCodes: this.aircaftModelIdList })
+          this.getFaultCaseAPI({ faultPhenomenon: keyWordData })
         }
       } catch (error) {}
     },
@@ -402,41 +354,32 @@ export default {
             message: '操作成功!'
           })
           this.handleClose()
-          this.getFaultCaseAPI({ aircraftCodes: this.aircaftModelIdList })
+          this.getFaultCaseAPI({ faultPhenomenon: keyWordData })
         }
       } catch (error) {}
     },
 
-    async treeNodeClick(data) {
-      this.$refs.table.clearSelection()
-      this.currentNodeKey = this.form.aircraftCode = data.id
-      this.currentNode = data
-      this.aircaftModelIdList = String(this.getTreeLeafData(data.children.length ? data.children : [data]).map((e) => e.id))
-      this.getFaultCaseAPI({ aircraftCodes: this.aircaftModelIdList })
-    },
-
     openDialog() {
       this.dialogTitle = '新增'
       this.dialogVisible = true
-      this.form.aircraftType = this.currentNode.parentId
-      this.form.aircraftCode = this.currentNodeKey
+    },
+
+    aircraftTypeChange(node) {
+      this.form.aircraftTypeName = node.id
     },
 
     handleClose() {
       this.dialogVisible = false
       this.form = {
-        id: '',
-        aircraftType: '',
-        faultCode: '',
-        faultName: '',
-        location: '',
-        level: '',
-        symptoms: '',
+        aircraftTypeName: null,
+        aircraftSystemName: '',
+        aircraftSubsystemName: '',
+        faultPhenomenon: '',
         faultCause: '',
-        remarks: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
+        faultTreePath: '',
+        faultPicturePath: '',
+        troubleshootingMethodPath: '',
+        viewCount: 0,
         createBy: '',
         createTime: '',
         updateBy: '',
@@ -447,7 +390,8 @@ export default {
     handUpdate(row) {
       this.dialogTitle = '编辑'
       this.form = deepClone(row)
-      this.form.aircraftType = this.currentNode.parentId
+      this.form.faultPhenomenon = row.pcontent
+      this.form.faultCause = row.fcontent
       this.dialogVisible = true
     },
 
@@ -462,6 +406,17 @@ export default {
       }
     },
 
+    aircraftTypeNormalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children
+      }
+      return {
+        id: node.id,
+        label: node.label,
+        children: node.children
+      }
+    },
+
     selection(val) {
       this.tableCheckItems = val
     },
@@ -480,22 +435,70 @@ export default {
 
     async checkDetails(row) {
       this.form = deepClone(row)
-      const aircraftTypeItem = this.aircaftModelAll.find((item) => row.aircraftType === item.aircaftModelId)
-      const aircraftCodeItem = this.aircaftCatalogAll.find((item) => row.aircraftCode === item.aircaftCatalogId)
-      if (row.ossId) {
-        const res = await getListByIdsApi(row.ossId)
-        this.detailOssId = res.data[0].originalName
-      } else {
-        this.detailOssId = row.ossId
-      }
-      this.detailAircraftType = aircraftTypeItem.aircaftModelName
-      this.detailAircraftCode = aircraftCodeItem.aircaftCatalogCode
+      const matchedItem = this.aircraftTypeAll.find((item) => row.aircraftTypeName.trim() === item.id.trim())
+      this.detailAircraftType = matchedItem.label
+      // if (row.faultPicturePath) {
+      //   const res = await getListByIdsApi(row.faultPicturePath)
+      //   this.faultPicturePathUrl = res.data[0].url
+      //   const res2 = await getListByIdsApi(row.faultTreePath)
+      //   this.faultTreePathUrl = res.data[0].url
+      // } else {
+      //   this.faultPicturePathUrl = row.faultPicturePath
+      //   this.faultTreePathUrl = row.faultTreePathUrl
+      // }
+      this.form.faultPhenomenon = row.pcontent
+      this.form.faultCause = row.fcontent
       this.detailVisible = true
+      this.addViewCount(row)
+      // this.form = deepClone(row)
+    },
+
+    async addViewCount(row) {
+      try {
+        await updateFaultCase({ id: row.id, viewCount: ++row.viewCount })
+      } catch (error) {}
     },
 
     detailSubmit() {
       this.handleClose()
       this.detailVisible = false
+    },
+
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = '警告列表导入'
+      this.upload.open = true
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      download('/faultCase/importTemplate', {}, `faultCase_template_${new Date().getTime()}.xlsx`)
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      if (this.uploadFlag) {
+        this.upload.open = false
+        this.upload.isUploading = false
+        this.$refs.upload.clearFiles()
+      }
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit()
+    },
+    // 导出
+    handleExport() {
+      download(
+        '/faultCase/export',
+        {
+          ...this.form
+        },
+        `faultCase_${new Date().getTime()}.xlsx`
+      )
     }
   }
 }

+ 162 - 389
src/views/als/faultDiagnosis/index.vue

@@ -5,94 +5,63 @@
     </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.type == 2)">新增</el-button>
-          <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
-        </div>
+        <div class="view-dataType-title-btn"></div>
         <div class="view-dataType-title-search">
           <el-input placeholder="请输入架次号" v-model="keyWordData" class="input1">
-            <el-button slot="append" icon="el-icon-search" @click="searchClick" :disabled="!(currentNode.type == 2)"></el-button>
+            <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
           </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="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">
-            <LTable ref="sortieNoTableRef" @current-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions" :pagination="SortieNoTableRequset"></LTable>
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" :before-close="handleClose" width="600px">
+        <el-form ref="form" :model="form" label-width="80px">
+          <el-form-item label="编目" prop="aircraftId">
+            <el-select v-model="form.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-form-item label="参数" prop="param">
-            <el-input v-model="executeForm.param" type="textarea" :rows="2" placeholder="请输入参数" />
+          <el-form-item label="架次" prop="sortieNo">
+            <el-input v-model="form.sortieNo" disabled />
           </el-form-item>
-          <el-form-item label="数据列" prop="columnData">
-            <el-transfer v-model="transferRightData" :data="transferData" @change="changeColumnData"></el-transfer>
+          <el-form-item label="飞行时间" prop="flightDate">
+            <el-input v-model="form.flightDate" disabled />
           </el-form-item>
-          <!-- <el-form-item label="文件Id" prop="ossId">
-            <el-input v-model="form.ossId" placeholder="请输入文件Id" />
+          <el-form-item label="部件" prop="partId">
+            <treeselect :value="form.partId" :normalizer="normalizer" :options="partsData" :show-count="true" placeholder="请选择部件" @select="partIdSelect" />
           </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>
           <el-button type="primary" @click="submit">确 定</el-button>
         </span>
       </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 title="诊断结果" :visible.sync="resultVisible" width="1200px">
+        <LTable ref="resultTable" :defaultFetch="false" :columns="resultColumns" :dataSource="resultTableData" :options="resultOptions" :pagination="resultTableRequset"></LTable>
       </el-dialog>
-      <el-dialog title="结果展示" :visible.sync="resultVisible" width="1200px">
-        <LTable ref="resultTableRef" :columns="resultColumns" :dataSource="resultTableData" :options="resultOptions"></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 title="执行进度" :visible.sync="progressVisible" width="800px">
+        <el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
       </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
-import { getFaultDiagnosis, addFaultDiagnosis, updateFaultDiagnosis, removeFaultDiagnosis } from '@/api/als/faultDiagnosis'
-import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
-import { getColumnDataAPI, executeFault } from '@/api/als/algorithm'
+import { getDataImport } from '@/api/als/dataImport'
+import { getFaultDiagnosis } from '@/api/als/faultDiagnosis'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
-import { deepClone, debounce } from '@/utils/index'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
-import { getDataImport } from '@/api/als/dataImport'
-import { getModel } from '@/api/als/model'
-import { flattenTree } from '../utils/common'
+import { deepClone, debounce } from '@/utils/index'
+import { handleTree } from '../utils/common'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import { getAirConfiguration } from '@/api/als/airConfiguration'
+import { executeFault } from '@/api/als/algorithm'
 
 export default {
   name: 'FaultDiagnosis',
-  components: {},
+  components: { Treeselect },
   data() {
     // 这里存放数据
     return {
@@ -120,18 +89,6 @@ export default {
       },
       searchValue: '',
       columns: [
-        {
-          prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
-        },
         {
           prop: 'aircraftId',
           label: '编目',
@@ -145,41 +102,21 @@ export default {
           }
         },
         {
-          prop: 'modelType',
-          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',
-          label: '参数'
+          prop: 'sortieNo',
+          label: '架次号'
         },
         {
-          prop: 'columnData',
-          label: '数据列'
+          prop: 'flightDate',
+          label: '飞行时间'
         },
-        // {
-        //   prop: 'ossId',
-        //   label: '文件Id'
-        // },
-        // {
-        //   prop: 'result',
-        //   label: '结果'
-        // },
         {
-          prop: 'status',
-          label: '状态',
+          prop: 'source',
+          label: '数据源',
           render: (h, params) => {
-            if (params.row.status == 0) {
-              return h('span', { class: 'warning-state' }, '失败')
+            if (params.row.source == 1) {
+              return h('span', { class: 'success-state' }, '飞参数据')
             } else {
-              return h('span', { class: 'success-state' }, '成功')
+              return h('span', { class: 'success-state' }, 'MDC数据')
             }
           }
         },
@@ -189,38 +126,47 @@ export default {
           width: '240px',
           group: [
             {
-              name: '查看',
+              name: '故障诊断',
               type: 'text',
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                this.checkResultList(row)
+                this.faultExecute(row)
               }
             },
             {
-              name: '删除',
+              name: '查看结果',
               type: 'text',
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                this.remove([row])
+                this.checkRelustList(row)
               }
             }
           ]
         }
       ],
+      options: {
+        stripe: true, // 斑马纹
+        mutiSelect: true, // 多选框
+        index: false, // 显示序号, 多选则 mutiSelect
+        loading: false, // 表格动画
+        initTable: false, // 是否一挂载就加载数据
+        border: true,
+        height: 'calc(100vh - 300px)'
+      },
+      tableCheckItems: [],
+      tableData: [],
+      tableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
       resultColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
+          label: '架次号'
         },
         {
           prop: 'aircraftId',
@@ -235,10 +181,10 @@ export default {
           }
         },
         {
-          prop: 'modelType',
-          label: '模型类型',
+          prop: 'param',
+          label: '部件',
           render: (h, params) => {
-            const matchedItem = this.$enumData.agloModelList.find((item) => params.row.modelType === item.key)
+            const matchedItem = this.allAirConfig.find((item) => params.row.param === item.id)
             if (matchedItem) {
               return h('span', matchedItem.name)
             } else {
@@ -247,116 +193,53 @@ export default {
           }
         },
         {
-          prop: 'resultContent',
-          label: '结果'
-        }
-      ],
-      sortieNoColumns: [
-        {
-          prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
-        },
-        {
-          prop: 'source',
-          label: '数据来源',
+          prop: 'status',
+          label: '状态',
           render: (h, params) => {
-            if (params.row.source == 1) {
-              return h('span', { class: 'success-state' }, '飞参数据')
+            if (params.row.status == 0) {
+              return h('span', { class: 'warning-state' }, '失败')
             } else {
-              return h('span', { class: 'success-state' }, 'MDC数据')
+              return h('span', { class: 'success-state' }, '成功')
             }
           }
         },
         {
-          prop: 'ossId',
-          label: '文件Id'
+          prop: 'resultContent',
+          label: '结果'
         }
       ],
-      options: {
+      resultOptions: {
         stripe: true, // 斑马纹
         mutiSelect: true, // 多选框
         index: false, // 显示序号, 多选则 mutiSelect
         loading: false, // 表格动画
         initTable: false, // 是否一挂载就加载数据
         border: true,
-        height: 'calc(100vh - 300px)'
-      },
-      sortieNoOptions: {
-        stripe: true, // 斑马纹
-        mutiSelect: false, // 多选框
-        index: true, // 显示序号, 多选则 mutiSelect
-        loading: false, // 表格动画
-        initTable: false, // 是否一挂载就加载数据
-        border: true,
-        height: '250px'
+        height: 'calc(100vh - 600px)'
       },
-      resultOptions: {
-        stripe: true,
-        mutiSelect: false,
-        index: false,
-        loading: false,
-        initTable: false,
-        border: true,
-        height: '300px'
-      },
-      SortieNoTableRequset: {
-        total: 0,
-        pageIndex: 1,
-        pageSize: 10,
-        searchValue: ''
-      },
-      tableCheckItems: [],
-      tableData: [],
+      resultTableCheckItems: [],
       resultTableData: [],
-      tableRequset: {
+      resultTableRequset: {
         total: 0,
         pageIndex: 1,
         pageSize: 10,
         searchValue: ''
       },
+      debounceFn: debounce(this.fetch, 500),
+      aircaftCatalogAll: [],
       form: {
         id: '',
         sortieNo: '',
-        aircraftId: '',
-        modelType: '',
-        param: '',
-        columnData: [],
         ossId: '',
-        resultContent: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
-      },
-      debounceFn: debounce(this.fetch, 500),
-      executeForm: {
-        sortieNo: '',
         aircraftId: '',
-        ossId: '',
-        modelId: '',
-        param: '',
-        columnData: []
+        flightDate: '',
+        status: '',
+        partId: null
       },
-      aircaftCatalogAll: [],
-      transferData: [],
-      transferRightData: [],
-      algoTypeList: [{ id: 5, name: '故障诊断' }],
-      modelList: [],
-      percentage: 0,
-      sortieNoList: [],
-      allTaskExecond: []
+      currentSortieNo: '',
+      partsData: [],
+      allAirConfig: [],
+      percentage: 0
     }
   },
   watch: {
@@ -379,35 +262,15 @@ export default {
         }
         const { data: data2 } = await getAircaftCatalogAll(getAircaftCatalogAllParams)
         this.aircaftCatalogAll = data2
+        const { data: airConfigData } = await getAirConfiguration()
+        this.allAirConfig = airConfigData
         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()
-        }
-        const res = await getTaskExecondRegister({
-          status: null,
-          queryParam: '',
-          taskId: '',
-          aircaftCatalogId: ''
-        })
-        this.allTaskExecond = flattenTree(res.data)
-      } catch (error) {}
-    },
-
-    async removeFaultDiagnosisAPI(params) {
-      try {
-        const { code } = await removeFaultDiagnosis(params)
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          await this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
-          this.handleClose()
+          this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {}
     },
@@ -424,170 +287,147 @@ export default {
           }
         })
       }
-
       getLeaf(list, newArr)
       return newArr
     },
 
     async getFaultDiagnosisAPI(params) {
+      if (this.$refs.resultTable) this.$refs.resultTable.clearSelection()
+      const { keyWord } = this
+      const { pageSize, pageIndex } = this.resultTableRequset
+      const {
+        data: { list, total }
+      } = await getFaultDiagnosis({ pageSize, pageNum: pageIndex, ...params })
+      this.resultTableData = list
+      this.resultTableRequset.total = total
+    },
+
+    async getDataImportAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, total }
-      } = await getFaultDiagnosis({ pageSize, pageNum: pageIndex, ...params })
+      } = await getDataImport({ pageSize, pageNum: pageIndex, ...params, source: 1 })
       this.tableData = list
       this.tableRequset.total = total
     },
 
     fetch() {
-      this.getFaultDiagnosisAPI(this.currentNodeKey)
-    },
-
-    searchClick() {
-      this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
-    async addFaultDiagnosisAPI() {
-      try {
-        delete this.form.aircaftModelName
-        const { code } = await addFaultDiagnosis({ ...this.form })
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-        }
-      } catch (error) {}
-    },
-
-    async updateFaultDiagnosisAPI() {
-      try {
-        const { code } = await updateFaultDiagnosis({ ...this.form })
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.handleClose()
-          this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
-        }
-      } catch (error) {}
+    async searchClick() {
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList, sortieNo: this.keyWordData })
     },
 
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
-      this.currentNodeKey = this.executeForm.aircraftId = data.id
+      this.currentNodeKey = data.id
       this.currentNode = data
       this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
         .map((e) => e.id)
         .toString()
-      this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
-      // this.getDataImportAPI(this.currentNodeKey)
+      if (!this.aircaftModelIdList) {
+        this.aircaftModelIdList = '#'
+      }
+      this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
     },
 
     openDialog() {
-      this.executeForm.aircraftId = this.currentNodeKey
-      if (this.executeForm.aircraftId !== '') {
-        this.changeAircraftId(this.executeForm.aircraftId)
-      }
-      this.dialogTitle = '新增'
+      this.dialogTitle = '诊断结果'
+      this.dialogVisible = true
+    },
+
+    async getAirConfigurationAPI(params) {
+      try {
+        const { data } = await getAirConfiguration(params)
+        const treeData = handleTree(data, 'id')
+        this.partsData = treeData
+      } catch (error) {}
+    },
+
+    faultExecute(row) {
+      this.dialogTitle = '选择诊断部件'
+      this.form = deepClone(row)
+      this.currentSortieNo = row.sortieNo
+      const item = this.aircaftCatalogAll.find((item) => item.aircaftCatalogId === this.form.aircraftId)
+      // this.form.aircraftType = item.aircraftType
+      this.getAirConfigurationAPI({ aircraftType: item.aircaftModelId })
       this.dialogVisible = true
     },
 
+    partIdSelect(node) {
+      this.form.partId = node.id
+    },
+
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children
+      }
+      return {
+        id: node.id,
+        label: node.name,
+        children: node.children
+      }
+    },
     handleClose() {
       this.dialogVisible = false
-      this.transferRightData = []
-      this.$refs.sortieNoTableRef.clearSelection()
-      this.executeForm = {
+      this.currentSortieNo = ''
+      this.form = {
+        id: '',
         sortieNo: '',
-        aircraftId: '',
         ossId: '',
-        modelId: '',
-        param: '',
-        columnData: []
+        aircraftId: '',
+        flightDate: '',
+        status: '',
+        partId: null
       }
     },
 
-    handUpdate(row) {
-      this.dialogTitle = '编辑'
-      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
+    submit() {
+      this.beginExecute()
     },
 
-    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])
-        }
-      })
+    selection(val) {
+      this.tableCheckItems = val
     },
 
-    checkResultList(row) {
-      if (row.status === '0') {
-        this.$message({
-          type: 'warning',
-          message: '执行失败,无法查看结果!'
-        })
-        return
-      }
-      this.resultTableData = [row]
+    checkRelustList(row) {
+      // resultTableData
+      this.getFaultDiagnosisAPI({ sortieNo: row.sortieNo })
       this.resultVisible = true
     },
+
     async beginExecute() {
       this.progressVisible = true
 
       let myTimer = setInterval(() => {
         if (this.percentage < 100) {
-          this.percentage += 1
-        } else {
-          clearInterval(myTimer)
-          this.$message({
-            type: 'error',
-            message: '执行有误'
-          })
-          this.progressVisible = false
-          this.percentage = 0
+          if (this.percentage === 99) {
+            this.percentage = 99
+          } else {
+            this.percentage += 1
+          }
         }
       }, 30)
 
       try {
-        const res = await executeFault(this.executeForm)
-        this.percentage = 100
+        const res = await executeFault(this.form)
         clearInterval(myTimer)
         if (res?.code === 200) {
+          this.percentage = 100
           this.$message({
             type: 'success',
             message: '执行成功!'
           })
-          this.handleClose()
+
           const result = res.data
           this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
             confirmButtonText: '确定'
           })
-          this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
+          this.getFaultDiagnosisAPI({ sortieNo: this.currentSortieNo })
+          this.handleClose()
         }
       } catch (error) {
         clearInterval(myTimer)
@@ -595,73 +435,6 @@ export default {
         this.progressVisible = false
         this.percentage = 0
       }
-    },
-    async changeModelType(type) {
-      try {
-        const {
-          data: { list }
-        } = await getModel({ type })
-        this.modelList = list
-      } catch (error) {}
-    },
-
-    async changeAircraftId(aircraftId) {
-      try {
-        const {
-          data: { list, total }
-        } = await getDataImport({ aircraftId })
-        this.sortieNoList = list
-        this.SortieNoTableRequset.total = total
-      } catch (error) {}
-    },
-
-    async sortieNoSelection(val) {
-      this.executeForm.ossId = val.ossId
-      this.executeForm.sortieNo = val.sortieNo
-      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
-              })
-            })
-            if (this.executeForm.modelId) {
-              this.changeModelId(this.executeForm.modelId)
-            }
-          }
-        } catch (error) {}
-      }
-    },
-
-    submit() {
-      switch (this.dialogTitle) {
-        case '编辑':
-          this.updateFaultDiagnosisAPI()
-          break
-        case '新增':
-          this.beginExecute()
-          break
-      }
-    },
-
-    selection(val) {
-      this.tableCheckItems = val
-    },
-
-    remove(row) {
-      this.$confirm('是否删除该数据', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.removeFaultDiagnosisAPI(row.map((e) => e.id))
-        })
-        .catch(() => {})
     }
   }
 }

+ 4 - 0
src/views/als/faultStatistics/echarts.vue

@@ -66,8 +66,12 @@ import { debounce } from '@/utils/index'
 import * as echarts from 'echarts'
 import CardEcharts from '@/components/CardEcharts/index.vue'
 export default {
+<<<<<<< HEAD
   name: 'FaultStatistics',
   components: { CardEcharts },
+=======
+  name: 'FaultStatisticsEcharts',
+>>>>>>> master
   data() {
     // 这里存放数据
     return {

+ 30 - 66
src/views/als/flightData/index.vue

@@ -30,15 +30,6 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
-              <el-form-item label="机型" prop="aircaftModel">
-                <el-select v-model="form.aircaftModel" placeholder="请选择机型" disabled>
-                  <el-option v-for="item in aircaftModelAll" :key="item.aircaftModelId" :label="item.aircaftModelName" :value="item.aircaftModelId"> </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="编目" prop="aircraftId">
                 <el-select v-model="form.aircraftId" placeholder="请选择编目" disabled>
@@ -46,25 +37,25 @@
                 </el-select>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="飞行时间" prop="flightDate">
                 <el-date-picker v-model="form.flightDate" type="datetime" placement="bottom-start" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择飞行时间" @change="flightDateChange"></el-date-picker>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="架次号" prop="sortieNo">
                 <el-input disabled v-model="form.sortieNo" placeholder="选择飞行时间自动生成" />
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="上传飞参数据" label-width="100px" prop="ossId">
                 <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx']" />
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="警告列表导入" label-width="100px">
                 <el-upload
@@ -103,12 +94,12 @@
 <script>
 import { getDataImport, addDataImport, updateDataImport, removeDataImport } from '@/api/als/dataImport'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
-import { getAircaftModelAll, getAircaftCatalogAll, getSortieNo } from '@/api/als/aircraft'
-import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
+import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
 import FileUpload from '@/views/als/components/FileUpload'
 import { flattenTree, download } from '../utils/common'
 import { getItem } from '@/utils/index'
+import { getWarning } from '@/api/als/warning'
 
 export default {
   name: 'DataImport',
@@ -174,6 +165,10 @@ export default {
             }
           }
         },
+        {
+          prop: 'flightDate',
+          label: '飞行时间'
+        },
         {
           prop: 'ossId',
           label: '文件编号'
@@ -225,24 +220,13 @@ export default {
         id: '',
         ossId: '',
         source: '1',
-        aircaftModel: '',
         aircraftId: '',
         sortieNo: '',
         flightDate: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        status: ''
       },
       debounceFn: debounce(this.fetch, 500),
-      aircaftModelAll: [],
       aircaftCatalogAll: [],
-      sortieNoList: [],
-      allTaskExecond: [],
       upload: {
         // 是否显示弹出层
         open: false,
@@ -257,7 +241,8 @@ export default {
         // 上传的地址
         url: '/api/als/warning/importData'
       },
-      warnFileList: []
+      warnFileList: [],
+      uploadFlag: false
     }
   },
   watch: {
@@ -274,13 +259,6 @@ export default {
       try {
         const { data } = await getAircaftCatalogTree(params)
         this.menuTreeData = data
-        const getAircaftModelAllParams = {
-          aircaftTypeCode: '',
-          aircaftTypeId: '',
-          queryParam: ''
-        }
-        const { data: data1 } = await getAircaftModelAll(getAircaftModelAllParams)
-        this.aircaftModelAll = data1
         const getAircaftCatalogAllParams = {
           keyWord: '',
           aircaftModelIdList: []
@@ -295,13 +273,6 @@ export default {
             .toString()
           this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
         }
-        const res = await getTaskExecondRegister({
-          status: null,
-          queryParam: '',
-          taskId: '',
-          aircaftCatalogId: ''
-        })
-        this.allTaskExecond = flattenTree(res.data)
       } catch (error) {}
     },
 
@@ -363,6 +334,7 @@ export default {
             type: 'success',
             message: '操作成功!'
           })
+          this.uploadFlag = true
           this.handleClose()
           this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
           this.submitBtnLoading = false
@@ -396,14 +368,6 @@ export default {
         this.aircaftModelIdList = '#'
       }
       this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
-      this.getSortieNoAPI(data.label)
-    },
-
-    async getSortieNoAPI(aircaftCatalogCode) {
-      const res = await getSortieNo({ aircaftCatalogCode })
-      this.sortieNoList = res.data.filter((item) => {
-        return item.taskName
-      })
     },
 
     openDialog() {
@@ -419,26 +383,23 @@ export default {
         id: '',
         ossId: '',
         source: '1',
-        aircaftModel: '',
         sortieNo: '',
         aircraftId: '',
         flightDate: '',
-        status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        status: ''
       }
     },
 
-    handUpdate(row) {
+    async handUpdate(row) {
       this.dialogTitle = '编辑'
-      const matchedItem = this.aircaftCatalogAll.find((item) => row.aircraftId.trim() === item.aircaftCatalogId.trim())
-      this.getSortieNoAPI(matchedItem.aircaftCatalogCode)
       this.form = deepClone(row)
+      // const {
+      //   data: { list, total }
+      // }=await getWarning({ sortieNo: row.SortieNo })
+      // if(total!==0){
+
+      // }
+      // console.log('this.form', this.form)
       this.dialogVisible = true
     },
 
@@ -449,11 +410,12 @@ export default {
             case '编辑':
               this.submitBtnLoading = true
               this.updateDataImportAPI()
+              this.submitFileForm()
               break
             case '新增':
               this.submitBtnLoading = true
-              this.submitFileForm()
               this.addDataImportAPI()
+              this.submitFileForm()
               break
           }
         }
@@ -508,9 +470,11 @@ export default {
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
-      this.upload.open = false
-      this.upload.isUploading = false
-      this.$refs.upload.clearFiles()
+      if (this.uploadFlag) {
+        this.upload.open = false
+        this.upload.isUploading = false
+        this.$refs.upload.clearFiles()
+      }
       // this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
     },
     // 提交上传文件

+ 146 - 15
src/views/als/intelligentQA/index.scss

@@ -5,20 +5,102 @@
   
 }
 
-.aside{
+.history,
+.statistics{
   background-color: #11536771;
   border: 1px solid #209cc1;
   width: 250px;
   height: calc(100vh - 200px);
   color: #fff;
-  text-align: center;
-  line-height: 200px;
+  
+  // line-height: 200px;
+}
+
+.history{
+  .historyTitle{
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+  }
+  .historyContent{
+    width: 100%;
+    box-sizing: border-box;
+    height: calc(100vh - 300px);
+    overflow: hidden;
+    padding: 0px 20px;
+
+    .historyItem{
+      height: 40px;
+      width: 100%;
+      line-height: 40px;
+      overflow: hidden;
+
+      .historyMore{
+        font-size: 1.2rem;
+        float: right;
+        height: 40px;
+        line-height: 40px;
+      }
+      .historyMore:hover{
+        cursor: pointer;
+      }
+    }
+
+  }
+  
+}
+.statistics{
+  .statisticsTitle{
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+  }
+  .statisticsContent{
+    width: 100%;
+    box-sizing: border-box;
+    height: calc(100vh - 300px);
+    overflow: hidden;
+    padding: 0px 20px;
+
+    .statisticsItem{
+      height: 40px;
+      width: 100%;
+      line-height: 40px;
+      overflow: hidden;
+      position: relative;
+    }
+
+    li:after{
+      content: "";
+      display: inline-block;
+      width: 20px;
+      height: 20px;
+      line-height: 20px;
+      text-align: center;
+      color: #FFF;
+      background: #999999;
+      text-align: center;
+      position: absolute;
+      left: 0;
+      top: 8px;
+    }
+    li:first-child:after {content: "1";background: #FD8C84;}
+    li:nth-child(2):after {content: "2";background: #FFCC99;}
+    li:nth-child(3):after {content: "3";background: #7FD75A;}
+    li:nth-child(4):after {content: "4";background: #CCCCFF;}
+    li:nth-child(5):after {content: "5";background: #60C4FD;}
+    li:nth-child(6):after {content: "6";}
+    li:nth-child(7):after {content: "7";}
+    li:nth-child(8):after {content: "8";}
+    li:nth-child(9):after {content: "9";}
+    li:nth-child(10):after {content: "10";}
+  }
 }
 
 .chat{
   flex: 1;
   width: 100%;
-  max-width: 1400px;
+  // max-width: 1400px;
   margin: 0 auto;
   overflow-y: auto;
   display: flex;
@@ -45,9 +127,8 @@
       width: 100%;
       max-width: 1200px;
       margin: 0 auto;
-      
-      // overflow-y: auto;
     }
+    
     .chatRow {
       margin: 20px 10px;
       display: flex;
@@ -66,15 +147,27 @@
     }
     .answerData{
       max-width: 800px;
-        display: inline-block;
-        border-radius: 8px;
-        padding: 6px 12px;
-        background: #11536771;
-        box-shadow: 0 16px 20px 0 rgba(174, 167, 223, 0.06);
-        color: #fff;
-        .answer{
-          margin: 20px 0;
-        }
+      display: inline-block;
+      border-radius: 8px;
+      padding: 6px 12px;
+      background: #11536771;
+      box-shadow: 0 16px 20px 0 rgba(174, 167, 223, 0.06);
+      color: #fff;
+      position: relative;
+      .answer{
+        margin: 20px 0;
+      }
+    }
+    
+    .more{
+      border-radius: 50%;
+      position: absolute;
+      font-size: 1.5rem;
+      right: -30px;
+      bottom: 0;
+    }
+    .more:hover{
+      cursor: pointer;
     }
   }
 
@@ -116,6 +209,44 @@
   }
 }
 
+.dialogContent{
+  width: 100%;
+  height: calc(100vh - 350px);
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+
+  .contentLeft{
+    width: 620px;
+    height: 100%;
+    // background-color: #cfcbcb;
+    border-right: 1px solid #cfcbcb;
+
+    .moreAnswer{
+      font-size: 1rem;
+      color: #fff;
+      margin-bottom: 20px;
+    }
+  }
+  .contentRight{
+    width: calc(100% - 620px);
+    height: 100%;
+    .source{
+      float: right;
+      color: #fff;
+      margin-bottom: 20px;
+    }
+  }
+}
+
+.statistics{
+  .statisticsTitle{
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+  }
+}
+
 ::-webkit-scrollbar{
   display: none;  //隐藏滚动条
   width: 5px;

+ 224 - 57
src/views/als/intelligentQA/index.vue

@@ -1,21 +1,34 @@
 <template>
   <div class="intelligentQA">
-    <div class="aside">历史记录</div>
+    <div class="history">
+      <div class="historyTitle">历史记录</div>
+      <div class="historyContent">
+        <div v-for="item in historyData" :key="item.id" class="historyItem">
+          <span style="float: left"> {{ item.question }}</span>
+          <i class="el-icon-delete historyMore" style="margin-left: 10px" @click="deleteHistory(item.id)"></i>
+          <i class="el-icon-more historyMore" @click="historyDetail(item.id)"></i>
+          <!-- <el-tooltip class="item" effect="dark" content="详情" placement="top">
+            
+          </el-tooltip> -->
+        </div>
+      </div>
+    </div>
     <div class="chat">
       <!-- <div class="header">Header</div> -->
       <div ref="main" class="main">
         <div class="chatLine">
           <div v-for="(item, index) in chatInfo" :key="index">
+            <div class="chatRow chatQ" v-if="item.question">
+              <div class="questionContent">{{ item.question }}</div>
+            </div>
             <div class="chatRow" v-if="item.answer">
               <div class="answerData">
                 <div class="answer">{{ item.answer }}</div>
                 <!-- <div class="graph"></div> -->
                 <graphECharts v-if="item.graph" :graphData="item.graph" class="charts"></graphECharts>
+                <i v-if="item.user_id && item.ossID" class="el-icon-more more" @click="handleMore(item)"></i>
               </div>
             </div>
-            <div class="chatRow chatQ" v-if="item.question">
-              <div class="questionContent">{{ item.question }}</div>
-            </div>
           </div>
         </div>
       </div>
@@ -26,28 +39,88 @@
         </div>
       </div>
     </div>
+    <div class="statistics">
+      <div class="statisticsTitle">统计列表</div>
+      <ul class="statisticsContent">
+        <li v-for="item in statisticsData" :key="item.question" class="statisticsItem">
+          <span style="padding-left: 30px"> {{ item.question }}</span>
+        </li>
+      </ul>
+    </div>
+    <el-dialog title="更多" :visible.sync="dialogVisible" width="1500px" :before-close="handleClose">
+      <div class="dialogContent">
+        <div class="contentLeft">
+          <div>
+            <div class="moreAnswer">{{ moreData.answer }}</div>
+            <graphECharts :graphData="moreData.graph"></graphECharts>
+          </div>
+        </div>
+        <div class="contentRight">
+          <div>
+            <div class="source">
+              <el-link :href="`${fileInfo.url}`" style="color: #209cc1" :underline="false" target="_blank">
+                <el-tooltip class="item" effect="dark" content="点击可下载" placement="top">
+                  <span> 来源:《{{ moreData.file_name }}{{ moreData.fileName }}》</span>
+                </el-tooltip>
+              </el-link>
+            </div>
+            <div class="fileContent">
+              <div v-if="fileInfo.fileSuffix == '.docx' || fileInfo.fileSuffix == '.doc'">
+                <VueOfficeDocx style="width: 100%; height: calc(100vh - 400px)" :src="fileInfo.url" />
+              </div>
+              <div v-if="fileInfo.fileSuffix == '.pdf'">
+                <VueOfficePdf style="width: 100%; height: calc(100vh - 400px)" :src="fileInfo.url" />
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <!-- <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+      </span> -->
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import store from '@/store'
-import { handlerAsk } from '@/api/als/intelligentQA'
+import { handlerAsk, getQAHistoryList, getGroup, getQAHistoryListAll, getQAHistoryDetail, removeQAHistory } from '@/api/als/intelligentQA'
 import graphECharts from '@/views/als/components/Charts/graph.vue'
 import axios from 'axios'
+import { getListByIdsApi } from '@/api/als/oss'
+//引入VueOfficeDocx组件
+import VueOfficeDocx from '@vue-office/docx'
+import VueOfficePdf from '@vue-office/pdf'
+import '@vue-office/docx/lib/index.css'
 
 export default {
   name: 'IntelligentQA',
-  components: { graphECharts },
+  components: { graphECharts, VueOfficeDocx, VueOfficePdf },
   data() {
     return {
+      dialogVisible: false,
       chatInfo: [],
       questionInput: '', //202310150010
       currentHeight: 'auto',
       lastScrollHeight: 0,
-      isScrollable: false
+      isScrollable: false,
+      moreData: {
+        user_id: '',
+        answer: '',
+        file_name: '',
+        ossID: '',
+        graph: {}
+      },
+      historyData: [],
+      fileInfo: {},
+      statisticsData: []
     }
   },
   mounted() {
+    this.getHistoryAll()
+    this.getGroupAPI()
     this.adjustHeight()
   },
   watch: {},
@@ -69,9 +142,24 @@ export default {
         }
       })
     },
+
+    async getHistoryAll() {
+      try {
+        const { data } = await getQAHistoryListAll()
+        this.historyData = data
+        // console.log('this.historyData', this.historyData)
+      } catch (error) {}
+    },
+
+    async getGroupAPI() {
+      try {
+        const { data } = await getGroup()
+        this.statisticsData = data
+      } catch (error) {}
+    },
+
     handleKeydown(event) {
       if (event.key === 'Enter') {
-        // 检查是否按下了 Ctrl 键
         if (event.ctrlKey) {
           // 按下了 Ctrl+Enter,则插入换行符
           this.questionInput += '\n'
@@ -90,10 +178,11 @@ export default {
         }
       }
     },
+
     async sendQuestion() {
       const sendInput = {
         question: this.questionInput,
-        user_id: String(store.state.user.userInfo.user.userId)
+        userId: String(store.state.user.userInfo.user.userId)
       }
 
       try {
@@ -105,23 +194,40 @@ export default {
         })
         this.questionInput = ''
         const { code, data } = await handlerAsk(sendInput)
-        if (code == 200) {
-          let newData = data
-          const graphData = eval('(' + newData.graph + ')')
-          newData.graph = graphData
-          const categories = []
-          newData.graph.data.forEach((node) => {
-            const flag = categories.find((item) => {
-              return item.name === node.category
-            })
-            if (!flag) {
-              categories.push({ name: node.category })
-            }
-          })
-          newData.graph.categories = categories
+        // const { code, data } = {
+        //   code: 200,
+        //   msg: '',
+        //   data: {
+        //     user_id: 'user',
+        //     answer: '解决办法为:更换电池或遥控器',
+        //     file_name: '排故手册',
+        //     // ossID: '225825878820585472',//pdf
+        //     ossID: '225840762526433280', //word
+        //     graph: {
+        //       data: [
+        //         { name: '202310150010', category: 'HMC' },
+        //         { name: '电视', category: '成品' },
+        //         { name: '电视遥控器失灵', category: '故障描述' },
+        //         { name: '家用电器', category: '系统' },
+        //         { name: '更换电池或遥控器', category: '维修策略' }
+        //       ],
+        //       links: [
+        //         { source: '202310150010', target: '电视', value: '成品' },
+        //         { source: '202310150010', target: '电视遥控器失灵', value: '故障描述' },
+        //         { source: '202310150010', target: '家用电器', value: '系统' },
+        //         { source: '202310150010', target: '更换电池或遥控器', value: '维修策略' }
+        //       ]
+        //     }
+        //   }
+        // }
 
+        if (code == 200) {
+          console.log(1111)
+          const newData = this.handleData(JSON.parse(data))
+          // const newData = this.handleData(data)
           this.chatInfo.pop()
           this.chatInfo.push(newData)
+          // this.getHistoryAll()
         }
         // 等处理过返回数据后,调用使视图保持在最底部
         let main = this.$refs.main
@@ -129,45 +235,106 @@ export default {
           main.scrollTop = main.scrollHeight
         }, 0)
       } catch (error) {}
-      // {
-      //   code: 200,
-      //   msg: '',
-      //   data: {
-      //     user_id: 'user',
-      //     answer: '解决办法为:更换电池或遥控器',
-      //     graph: {
-      //       data: [
-      //         { name: '202310150010', category: 'HMC' },
-      //         { name: '电视', category: '成品' },
-      //         { name: '电视遥控器失灵', category: '故障描述' },
-      //         { name: '家用电器', category: '系统' },
-      //         { name: '更换电池或遥控器', category: '维修策略' }
-      //       ],
-      //       links: [
-      //         { source: '202310150010', target: '电视', value: '成品' },
-      //         { source: '202310150010', target: '电视遥控器失灵', value: '故障描述' },
-      //         { source: '202310150010', target: '家用电器', value: '系统' },
-      //         { source: '202310150010', target: '更换电池或遥控器', value: '维修策略' }
-      //       ],
-      //       categories: [{ name: 'HMC' }, { name: '成品' }, { name: '故障描述' }, { name: '维修策略' }, { name: '系统' }]
-      //     }
-      //   }
-      // }
-
-      // data: [
-      //           { name: '111', category: 'HMC' },
-      //           { name: '更换手机屏幕', category: '维修策略' }
-      //         ],
-      //         links: [{ source: '111', target: '更换手机屏幕', value: '维修策略' }],
-      //         categories: [{ name: 'HMC' }, { name: '维修策略' }]
     },
-    showGraph(graphData) {
-      const { data, links } = graphData
+
+    handleData(data) {
+      if (data.graph) {
+        const graphData = eval('(' + data.graph + ')')
+        data.graph = graphData
+        const categories = []
+        data.graph.data.forEach((node) => {
+          const flag = categories.find((item) => {
+            return item.name === node.category
+          })
+          if (!flag) {
+            categories.push({ name: node.category })
+          }
+        })
+        data.graph.categories = categories
+      }
+      return data
+    },
+
+    handleMore(data) {
+      console.log('data', data)
+      this.getListById(data.ossID)
+      this.moreData = data
+      this.dialogVisible = true
+    },
+
+    async getListById(id) {
+      const { data } = await getListByIdsApi(id)
+      this.fileInfo = data[0]
+    },
+
+    handleClose() {
+      this.dialogVisible = false
+      this.fileInfo = {}
+    },
+
+    async historyDetail(id) {
+      try {
+        const { data } = await getQAHistoryDetail(id)
+        const newData = this.handleData(data)
+        this.chatInfo = []
+        this.chatInfo.push(newData)
+      } catch (error) {}
+    },
+
+    deleteHistory(id) {
+      this.$confirm('是否删除该条记录?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.removeQAHistoryAPI(id)
+        })
+        .catch(() => {})
+    },
+
+    async removeQAHistoryAPI(params) {
+      try {
+        const { code } = await removeQAHistory(params)
+        if (code === 200) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          this.getHistoryAll()
+        }
+      } catch (error) {}
     }
+
+    // const { code, data } = {
+    //   code: 200,
+    //   msg: '',
+    //   data: {
+    //     user_id: 'user',
+    //     answer: '解决办法为:更换电池或遥控器',
+    //     file_name: '排故手册',
+    //     ossID: 2,
+    //     graph: {
+    //       data: [
+    //         { name: '202310150010', category: 'HMC' },
+    //         { name: '电视', category: '成品' },
+    //         { name: '电视遥控器失灵', category: '故障描述' },
+    //         { name: '家用电器', category: '系统' },
+    //         { name: '更换电池或遥控器', category: '维修策略' }
+    //       ],
+    //       links: [
+    //         { source: '202310150010', target: '电视', value: '成品' },
+    //         { source: '202310150010', target: '电视遥控器失灵', value: '故障描述' },
+    //         { source: '202310150010', target: '家用电器', value: '系统' },
+    //         { source: '202310150010', target: '更换电池或遥控器', value: '维修策略' }
+    //       ]
+    //     }
+    //   }
+    // }
   }
 }
 </script>
 
-<style lang="scss">
+<style scoped lang="scss">
 @import './index.scss';
 </style>

+ 72 - 214
src/views/als/lifePrediction/index.vue

@@ -20,29 +20,17 @@
       <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="800px" :before-close="handleClose">
-        <el-form ref="executeForm" :model="executeForm" label-width="80px">
+      <!-- 添加或修改退化评估对话框 -->
+      <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="aircraftId">
-            <el-select v-model="executeForm.aircraftId" placeholder="请选择编目" @change="changeAircraftId(executeForm.aircraftId)" disabled>
+            <el-select v-model="form.aircraftId" placeholder="请选择编目" @change="changeAircraftId(form.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-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-form-item label="架次号" prop="sortieNo">
-            <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="name">
-            <el-input v-model="executeForm.name" placeholder="请输入部件" />
-            <!-- <treeselect v-model="executeForm.name" :normalizer="normalizer" :options="partsTreeData" :show-count="true" placeholder="请选择部件" /> -->
+          <el-form-item label="部件" prop="partId">
+            <treeselect :value="form.partId" :normalizer="normalizer" :options="partsData" :show-count="true" placeholder="请选择部件" @select="partIdSelect" />
           </el-form-item>
-          <!-- <el-form-item label="所属系统" prop="system">
-            <el-input v-model="form.system" placeholder="请输入所属系统" />
-          </el-form-item> -->
         </el-form>
 
         <span slot="footer" class="dialog-footer">
@@ -66,19 +54,18 @@
 
 <script>
 import { getLifePrediction, addLifePrediction, updateLifePrediction, removeLifePrediction } from '@/api/als/lifePrediction'
-import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { deepClone, debounce } from '@/utils/index'
-import { getDataImport } from '@/api/als/dataImport'
-import { getModel } from '@/api/als/model'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
-import { flattenTree } from '../utils/common'
-// import Treeselect from '@riophae/vue-treeselect'
-// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import { getAirConfiguration } from '@/api/als/airConfiguration'
+import { handleTree } from '../utils/common'
+import { executeEvaluation } from '@/api/als/algorithm'
 
 export default {
   name: 'LifePrediction',
-  components: {},
+  components: { Treeselect },
   data() {
     // 这里存放数据
     return {
@@ -106,11 +93,6 @@ export default {
       },
       searchValue: '',
       columns: [
-        { prop: 'id', label: '编号' },
-        {
-          prop: 'sortieNo',
-          label: '架次号'
-        },
         {
           prop: 'aircraftId',
           label: '编目',
@@ -129,24 +111,24 @@ export default {
         },
         {
           prop: 'model',
-          label: '型号'
-        },
-        {
-          prop: 'system',
-          label: '所属系统'
+          label: '部件型号'
         },
         {
-          prop: 'methodType',
-          label: '处理方式'
+          prop: 'code',
+          label: '部件编码'
         },
         {
-          prop: 'remainTiem',
-          label: '剩余时长'
+          prop: 'createTime',
+          label: '创建时间'
         },
         {
           prop: 'status',
           label: '状态'
         },
+        {
+          prop: 'resultContent',
+          label: '结果'
+        },
         {
           button: true,
           label: '操作',
@@ -158,7 +140,7 @@ export default {
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                this.checkResultList(row)
+                this.checkResult(row)
               }
             },
             {
@@ -173,35 +155,6 @@ export default {
           ]
         }
       ],
-      sortieNoColumns: [
-        {
-          prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
-        },
-        {
-          prop: 'source',
-          label: '数据来源',
-          render: (h, params) => {
-            if (params.row.source == 1) {
-              return h('span', { class: 'success-state' }, '飞参数据')
-            } else {
-              return h('span', { class: 'success-state' }, 'MDC数据')
-            }
-          }
-        },
-        {
-          prop: 'ossId',
-          label: '文件Id'
-        }
-      ],
       options: {
         stripe: true, // 斑马纹
         mutiSelect: true, // 多选框
@@ -211,21 +164,6 @@ export default {
         border: true,
         height: 'calc(100vh - 300px)'
       },
-      sortieNoOptions: {
-        stripe: true,
-        mutiSelect: false,
-        index: true,
-        loading: false,
-        initTable: false,
-        border: true,
-        height: '250px'
-      },
-      SortieNoTableRequset: {
-        total: 0,
-        pageIndex: 1,
-        pageSize: 10,
-        searchValue: ''
-      },
       tableCheckItems: [],
       tableData: [],
       tableRequset: {
@@ -237,33 +175,19 @@ export default {
       form: {
         id: '',
         aircraftId: '',
+        partId: null,
+        aircraftType: '',
+        code: '',
         name: '',
         model: '',
-        system: '',
         methodType: '',
-        remainTiem: '',
         status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        resultContent: ''
       },
       debounceFn: debounce(this.fetch, 500),
-      executeForm: {
-        sortieNo: '',
-        aircraftId: '',
-        modelType: '',
-        name: ''
-      },
       aircaftCatalogAll: [],
-      algoTypeList: [{ id: 6, name: '寿命预测' }],
       percentage: 0,
-      modelList: [],
-      sortieNoList: [],
-      allTaskExecond: []
+      partsData: []
     }
   },
   watch: {
@@ -295,13 +219,6 @@ export default {
         // this.getLifePredictionAPI()
         // this.getDataImportAPI()
       }
-      const res = await getTaskExecondRegister({
-        status: null,
-        queryParam: '',
-        taskId: '',
-        aircaftCatalogId: ''
-      })
-      this.allTaskExecond = flattenTree(res.data)
     },
 
     async removeLifePredictionAPI(params) {
@@ -353,34 +270,6 @@ export default {
       this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
     },
 
-    async addLifePredictionAPI() {
-      try {
-        delete this.form.aircaftModelName
-        const { code } = await addLifePrediction({ ...this.form })
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
-        }
-      } catch (error) {}
-    },
-
-    async updateLifePredictionAPI() {
-      try {
-        const { code } = await updateLifePrediction({ ...this.form })
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.handleClose()
-          this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
-        }
-      } catch (error) {}
-    },
-
     treeNodeClick(data) {
       this.$refs.table.clearSelection()
       this.currentNodeKey = this.form.aircraftId = data.id
@@ -392,102 +281,74 @@ export default {
     },
 
     openDialog() {
-      this.executeForm.aircraftId = this.currentNodeKey
-      if (this.executeForm.aircraftId !== '') {
-        this.changeAircraftId(this.executeForm.aircraftId)
-      }
+      const aircraftType = this.currentNode.parentId
+      this.getAirConfigurationAPI({ aircraftType })
       this.dialogTitle = '新增'
       this.dialogVisible = true
     },
 
+    partIdSelect(node) {
+      this.form.partId = node.id
+    },
+
+    async getAirConfigurationAPI(params) {
+      try {
+        const { data } = await getAirConfiguration(params)
+        const treeData = handleTree(data, 'id')
+        this.partsData = treeData
+      } catch (error) {}
+    },
+
     handleClose() {
       this.dialogVisible = false
       this.form = {
         id: '',
         aircraftId: '',
+        partId: null,
+        aircraftType: '',
+        code: '',
         name: '',
         model: '',
-        system: '',
         methodType: '',
-        remainTiem: '',
         status: '',
-        tenantId: '',
-        version: '',
-        delFlag: '',
-        createBy: '',
-        createTime: '',
-        updateBy: '',
-        updateTime: ''
+        resultContent: ''
       }
     },
-    handUpdate(row) {
-      this.dialogTitle = '编辑'
-      this.form = deepClone(row)
-      this.dialogVisible = true
-    },
-    checkResultList(row) {
-      this.form = deepClone(row)
+    checkResult(row) {
+      // this.form = deepClone(row)
       this.resultVisible = true
     },
-    executeAglo(row) {
-      // this.executeVisible = true
-      // this.agloForm.sortieNo = row.sortieNo
-      // this.agloForm.aircraftId = row.aircraftId
-    },
-    beginExecute() {
-      try {
-        // 调用算法接口
-        this.progressVisible = true
-        this.percentage += 1
-        const myTimer = setInterval(() => {
-          if (this.percentage < 100) {
-            this.percentage += 1
+    async beginExecute() {
+      this.progressVisible = true
+
+      let myTimer = setInterval(() => {
+        if (this.percentage < 100) {
+          if (this.percentage === 99) {
+            this.percentage = 99
           } else {
-            this.progressVisible = false
-            this.percentage = 0
-            clearInterval(myTimer)
-            // this.$router.push({ name: 'PreResult', params: { agloForm: this.agloForm } })
-            this.handleClose()
-            this.$message({
-              type: 'success',
-              message: '执行成功!'
-            })
-            this.$alert('寿命预测结果为:寿命前期', '寿命预测结果', {
-              confirmButtonText: '确定'
-            })
+            this.percentage += 1
           }
-        }, 30)
-      } catch (error) {
-        this.progressVisible = false
-        if (myTimer) {
-          clearInterval(myTimer)
         }
-        this.percentage = 0
-      }
-    },
+      }, 30)
 
-    async changeAircraftId(aircraftId) {
       try {
-        const {
-          data: { list, total }
-        } = await getDataImport({ aircraftId })
-        this.sortieNoList = list
-        this.SortieNoTableRequset.total = total
-      } catch (error) {}
-    },
+        const res = await executeEvaluation(this.form)
 
-    async sortieNoSelection(val) {
-      this.executeForm.ossId = val.ossId //得到架次数据
-      this.executeForm.sortieNo = val.sortieNo
-    },
-
-    async changeModelType(type) {
-      try {
-        const {
-          data: { list }
-        } = await getModel({ type })
-        this.modelList = list
-      } catch (error) {}
+        clearInterval(myTimer)
+        if (res?.code === 200) {
+          this.handleClose()
+          this.$message({
+            type: 'success',
+            message: '执行成功!'
+          })
+          this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
+        }
+      } catch (error) {
+        clearInterval(myTimer)
+      } finally {
+        this.progressVisible = false
+        this.percentage = 0
+      }
     },
 
     normalizer(node) {
@@ -504,11 +365,8 @@ export default {
     submit() {
       switch (this.dialogTitle) {
         case '编辑':
-          this.updateLifePredictionAPI()
           break
         case '新增':
-          // this.addLifePredictionAPI()
-          // this.handleClose()
           this.beginExecute()
           break
       }

+ 51 - 18
src/views/als/model/index.vue

@@ -29,11 +29,14 @@
           <el-form-item label="模型链接" prop="url">
             <el-input v-model="form.url" placeholder="请输入模型链接" />
           </el-form-item>
-          <el-form-item v-show="['5', '6'].includes(form.type)" label="机型" prop="aircaftType">
-            <treeselect v-model="form.aircaftType" :normalizer="aircaftTypeNormalizer" :options="aircaftTypeTreeData" :show-count="true" placeholder="请选择机型" />
+          <el-form-item v-show="['5', '6'].includes(form.type)" label="机型" prop="aircraftType">
+            <treeselect :value="form.aircraftType" :normalizer="aircraftTypeNormalizer" :options="aircraftTypeTreeData" :show-count="true" placeholder="请选择机型" @select="aircraftTypeChange" />
           </el-form-item>
           <el-form-item v-show="['5', '6'].includes(form.type)" label="部件" prop="partId">
-            <treeselect v-model="form.parentId" :normalizer="normalizer" :options="partsData" :show-count="true" placeholder="请选择部件" />
+            <treeselect :value="form.partId" :normalizer="normalizer" :options="partsData" :show-count="true" placeholder="请选择部件" @select="partIdSelect" />
+            <!-- <el-select v-model="form.partId" filterable placeholder="请选择部件">
+              <el-option v-for="item in partsData" :key="item.id" :label="item.devicesName" :value="item.id"> </el-option>
+            </el-select> -->
           </el-form-item>
           <el-form-item label="参数" prop="param">
             <el-input type="textarea" :rows="2" v-model="form.param" placeholder="请输入参数" />
@@ -66,6 +69,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import { handleTree } from '../utils/common'
 import { agloModelList } from '@/views/als/utils/enum-data'
 import { getAirConfiguration } from '@/api/als/airConfiguration'
+import { getAirInstall } from '@/api/als/airInstall'
 import { getAircaftTypeAndModelTree } from '@/api/als/sideTree'
 
 export default {
@@ -80,7 +84,6 @@ export default {
       aircaftModelIdList: [],
       searchValue: '',
       columns: [
-        { prop: 'id', label: '编号' },
         {
           prop: 'name',
           label: '模型名称'
@@ -103,7 +106,15 @@ export default {
         },
         {
           prop: 'partId',
-          label: '部件'
+          label: '部件',
+          render: (h, params) => {
+            const matchedItem = this.allAirConfig.find((item) => params.row.partId === item.id)
+            if (matchedItem) {
+              return h('span', matchedItem.name)
+            } else {
+              return h('span', {}, '')
+            }
+          }
         },
         {
           prop: 'param',
@@ -176,16 +187,17 @@ export default {
         name: '',
         type: '',
         url: '',
-        aircaftType: null,
+        aircraftType: null,
         partId: null,
         param: '',
         columnData: '',
-        status: '',
+        status: '1',
         remark: ''
       },
       debounceFn: debounce(this.fetch, 500),
       partsData: [],
-      aircaftTypeTreeData: []
+      aircraftTypeTreeData: [],
+      allAirConfig: []
     }
   },
   watch: {
@@ -201,12 +213,10 @@ export default {
   methods: {
     async getPartData() {
       try {
-        const { data } = await getAirConfiguration()
-        const { data: aircaftTypeData } = await getAircaftTypeAndModelTree()
-        this.aircaftTypeTreeData = aircaftTypeData
-        console.log('this.aircaftTypeTreeData', this.aircaftTypeTreeData)
-        const treeData = handleTree(data, 'id')
-        this.partsData = treeData
+        const { data } = await getAircaftTypeAndModelTree()
+        const { data: airConfigData } = await getAirConfiguration()
+        this.allAirConfig = airConfigData
+        this.aircraftTypeTreeData = data[0].children
       } catch (error) {}
     },
 
@@ -221,7 +231,7 @@ export default {
       }
     },
 
-    aircaftTypeNormalizer(node) {
+    aircraftTypeNormalizer(node) {
       if (node.children && !node.children.length) {
         delete node.children
       }
@@ -232,6 +242,23 @@ export default {
       }
     },
 
+    aircraftTypeChange(node) {
+      this.form.aircraftType = node.id
+      this.getAirConfigurationAPI({ aircraftType: this.form.aircraftType })
+    },
+
+    async getAirConfigurationAPI(params) {
+      try {
+        const { data } = await getAirConfiguration(params)
+        const treeData = handleTree(data, 'id')
+        this.partsData = treeData
+      } catch (error) {}
+    },
+
+    partIdSelect(node) {
+      this.form.partId = node.id
+    },
+
     async removeModelAPI(params) {
       try {
         const { code } = await removeModel(params)
@@ -306,11 +333,11 @@ export default {
         name: '',
         type: '',
         url: '',
-        aircaftType: null,
+        aircraftType: null,
         partId: null,
         param: '',
         columnData: '',
-        status: '',
+        status: '1',
         remark: ''
       }
     },
@@ -318,6 +345,13 @@ export default {
     handUpdate(row) {
       this.dialogTitle = '编辑'
       this.form = deepClone(row)
+      console.log('this.form', this.form)
+      if (['5', '6'].includes(this.form.type)) {
+        const item = this.allAirConfig.find((item) => item.id === this.form.partId)
+        this.form.aircraftType = item.aircraftType
+        this.getAirConfigurationAPI({ aircraftType: this.form.aircraftType })
+      }
+
       this.dialogVisible = true
     },
 
@@ -329,7 +363,6 @@ export default {
           break
         case '新增':
           this.addModelAPI()
-
           break
       }
     },

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

@@ -126,15 +126,7 @@ export default {
         // { prop: 'id', label: '编号' },
         {
           prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
+          label: '架次号'
         },
         {
           prop: 'aircraftId',
@@ -225,15 +217,7 @@ export default {
       sortieNoColumns: [
         {
           prop: 'sortieNo',
-          label: '架次号',
-          render: (h, params) => {
-            const matchedItem = this.allTaskExecond.find((item) => params.row.sortieNo.trim() === item.taskId.trim())
-            if (matchedItem) {
-              return h('span', matchedItem.taskName)
-            } else {
-              return h('span', {}, '')
-            }
-          }
+          label: '架次号'
         },
         {
           prop: 'source',
@@ -583,23 +567,20 @@ export default {
 
       let myTimer = setInterval(() => {
         if (this.percentage < 100) {
-          this.percentage += 1
-        } else {
-          clearInterval(myTimer)
-          this.$message({
-            type: 'error',
-            message: '执行有误'
-          })
-          this.progressVisible = false
-          this.percentage = 0
+          if (this.percentage === 99) {
+            this.percentage = 99
+          } else {
+            this.percentage += 1
+          }
         }
       }, 30)
 
       try {
         const res = await executePreProcessing(this.executeForm)
-        this.percentage = 100
+
         clearInterval(myTimer)
         if (res?.code === 200) {
+          this.percentage = 100
           this.$message({
             type: 'success',
             message: '执行成功!'
@@ -628,7 +609,7 @@ export default {
       try {
         const {
           data: { list, total }
-        } = await getDataImport({ aircraftId })
+        } = await getDataImport({ aircraftId, source: 1 })
         this.sortieNoList = list
         this.SortieNoTableRequset.total = total
       } catch (error) {}

+ 373 - 0
src/views/als/systemCommunication/index.vue

@@ -0,0 +1,373 @@
+<template>
+  <div class="view-table-content">
+    <div style="width: 100%">
+      <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>
+        </div>
+        <div class="view-dataType-title-search">
+          <el-input placeholder="请输入名称" v-model="keyWordData" class="input1">
+            <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
+          </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="800px" :before-close="handleClose">
+        <el-form ref="form" :inline="true" :model="form" label-width="80px">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="名称" prop="name">
+                <el-input v-model="form.name" placeholder="请输入名称" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="IP地址" prop="ipAddress">
+                <el-input v-model="form.ipAddress" placeholder="请输入IP地址" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="网段" prop="networkSegment">
+                <el-input v-model="form.networkSegment" placeholder="请输入网段" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="子网掩码" prop="subnetMask">
+                <el-input v-model="form.subnetMask" placeholder="请输入子网掩码" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="DNS" prop="dns"> <el-input v-model="form.dns" placeholder="请输入DNS" /> </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="网关" prop="gateway"> <el-input v-model="form.gateway" placeholder="请输入网关" /> </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12"
+              ><el-form-item label="http" prop="http"> <el-input v-model="form.http" placeholder="请输入http" /> </el-form-item>
+            </el-col>
+            <el-col :span="12"
+              ><el-form-item label="端口号" prop="port"> <el-input v-model="form.port" placeholder="请输入端口号" /> </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12"
+              ><el-form-item label="用户名" prop="userName"> <el-input v-model="form.userName" placeholder="请输入用户名" /> </el-form-item>
+            </el-col>
+            <el-col :span="12"
+              ><el-form-item label="密码" prop="password"> <el-input v-model="form.password" placeholder="请输入密码" /> </el-form-item>
+            </el-col>
+          </el-row>
+        </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 { getCommunication, addCommunication, updateCommunication, removeCommunication } from '@/api/als/communication'
+import { deepClone, debounce } from '@/utils/index'
+export default {
+  name: 'Communication',
+  components: {},
+  data() {
+    // 这里存放数据
+    return {
+      dialogTitle: '新增',
+      dialogVisible: false,
+      keyWordData: '',
+      communicationModelIdList: [],
+      currentNodeKey: null,
+      currentNode: null,
+      menuTreeData: [],
+      treeObj: {
+        title: '所属机种',
+        activityheight: '275px',
+        searchIcon: false,
+        configure: {
+          children: 'children',
+          label: 'label'
+        }
+      },
+      typeTree: {
+        children: 'children',
+        label: 'label'
+      },
+      searchValue: '',
+      columns: [
+        {
+          prop: 'name',
+          label: '名称'
+        },
+        {
+          prop: 'ipAddress',
+          label: 'IP地址'
+        },
+        {
+          prop: 'networkSegment',
+          label: '网段'
+        },
+        {
+          prop: 'subnetMask',
+          label: '子网掩码'
+        },
+        {
+          prop: 'dns',
+          label: 'DNS'
+        },
+        {
+          prop: 'gateway',
+          label: '网关'
+        },
+        {
+          prop: 'http',
+          label: 'http'
+        },
+        {
+          prop: 'port',
+          label: '端口号'
+        },
+        {
+          prop: 'userName',
+          label: '用户名'
+        },
+        {
+          prop: 'password',
+          label: '密码'
+        },
+        {
+          button: true,
+          label: '操作',
+          width: '240px',
+          group: [
+            {
+              name: '编辑',
+              type: 'text',
+              round: false,
+              plain: false,
+              onClick: (row, index, scope) => {
+                this.handUpdate(row)
+              }
+            },
+            {
+              name: '删除',
+              type: 'text',
+              round: false,
+              plain: false,
+              onClick: (row, index, scope) => {
+                this.remove([row])
+              }
+            }
+          ]
+        }
+      ],
+      options: {
+        stripe: true, // 斑马纹
+        mutiSelect: true, // 多选框
+        index: false, // 显示序号, 多选则 mutiSelect
+        loading: false, // 表格动画
+        initTable: false, // 是否一挂载就加载数据
+        border: true,
+        height: 'calc(100vh - 300px)'
+      },
+      tableCheckItems: [],
+      tableData: [],
+      tableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
+      form: {
+        id: '',
+        name: '',
+        ipAddress: '',
+        networkSegment: '',
+        subnetMask: '',
+        gateway: '',
+        http: '',
+        port: '',
+        userName: '',
+        password: '',
+        tenantId: '',
+        version: '',
+        delFlag: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      },
+      debounceFn: debounce(this.fetch, 500)
+    }
+  },
+  watch: {
+    keyWord() {
+      this.tableRequset.pageIndex = 1
+      this.debounceFn()
+    }
+  },
+  mounted() {
+    this.getCommunicationAPI()
+  },
+  methods: {
+    async removeCommunicationAPI(params) {
+      try {
+        const { success } = await removeCommunication(params)
+        if (success != false) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          await this.getCommunicationAPI()
+          this.handleClose()
+        }
+      } catch (error) {}
+    },
+
+    getTreeLeafData(list) {
+      const newArr = []
+      function getLeaf(data, arr) {
+        data.forEach((e) => {
+          if (e.type === 2) {
+            arr.push(e)
+          }
+          if (e.children.length) {
+            getLeaf(e.children, arr)
+          }
+        })
+      }
+      getLeaf(list, newArr)
+      return newArr
+    },
+
+    async getCommunicationAPI(params) {
+      if (this.$refs.table) this.$refs.table.clearSelection()
+      const { keyWord } = this
+      const { pageSize, pageIndex } = this.tableRequset
+      const {
+        data: { list, total }
+      } = await getCommunication({ pageSize, pageNum: pageIndex, ...params })
+      this.tableData = list
+      this.tableRequset.total = total
+    },
+
+    fetch() {
+      this.getCommunicationAPI()
+    },
+
+    searchClick() {
+      this.getCommunicationAPI({ name: this.keyWordData })
+    },
+
+    async addCommunicationAPI() {
+      try {
+        const { success } = await addCommunication({ ...this.form })
+        console.log(success)
+        if (success != false) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          this.handleClose()
+          this.getCommunicationAPI()
+        }
+      } catch (error) {}
+    },
+
+    async updateCommunicationAPI() {
+      try {
+        const { success } = await updateCommunication({ ...this.form })
+        if (success != false) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          this.handleClose()
+          this.getCommunicationAPI()
+        }
+      } 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.getAircraftAPI({ aircaftModelIdList: this.aircaftModelIdList })
+    },
+
+    openDialog() {
+      this.dialogTitle = '新增'
+      this.dialogVisible = true
+    },
+
+    handleClose() {
+      this.dialogVisible = false
+      this.form = {
+        id: '',
+        parentId: '',
+        parentName: '',
+        name: '',
+        ancestors: '',
+        orderNum: '',
+        tenantId: '',
+        version: '',
+        delFlag: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      }
+    },
+
+    handUpdate(row) {
+      this.dialogTitle = '编辑'
+      this.form = deepClone(row)
+      this.dialogVisible = true
+    },
+
+    submit() {
+      switch (this.dialogTitle) {
+        case '编辑':
+          this.updateCommunicationAPI()
+          break
+        case '新增':
+          this.addCommunicationAPI()
+          break
+      }
+    },
+
+    selection(val) {
+      this.tableCheckItems = val
+    },
+
+    remove(row) {
+      this.$confirm('是否删除该数据', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.removeCommunicationAPI(row.map((e) => e.id))
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+@import '../index.scss';
+</style>

+ 1 - 1
src/views/als/utils/enum-data.js

@@ -7,7 +7,7 @@ export const agloModelList = [
   { key: '3', name: '补全' },
   { key: '4', name: '虚警抑制' },
   { key: '5', name: '故障诊断' },
-  { key: '6', name: '寿命预测' }
+  { key: '6', name: '退化评估' }
 ]
 
 const enumData = {

+ 1 - 1
src/views/basicData/dataAircraftCataloging/index.js

@@ -11,7 +11,7 @@ export const columns = (_this) => [
   },
   {
     prop: 'mechanician',
-    label: '机械师'
+    label: '驾驶员'
   },
 
   {

+ 1 - 1
src/views/basicData/dataAircraftCataloging/index.vue

@@ -31,7 +31,7 @@
           <el-form-item label="飞机编号">
             <el-input v-model="form.aircaftCatalogCode"></el-input>
           </el-form-item>
-          <el-form-item label="机械师">
+          <el-form-item label="驾驶员">
             <el-input v-model="form.mechanician"></el-input>
           </el-form-item>
           <el-form-item label="所属机型">

+ 3 - 0
src/views/basicData/dataEnvironment/src/regularitiesChoose.vue

@@ -10,6 +10,9 @@
         <el-form-item label="航材编码">
           <el-input v-model="activeRow.avmatCatalogCode" disabled></el-input>
         </el-form-item>
+        <el-form-item label="规格型号">
+          <el-input v-model="activeRow.specification" disabled></el-input>
+        </el-form-item>
         <el-form-item label="所属分类">
           <el-input v-model="activeRow.avmatCategoriesName" disabled></el-input>
         </el-form-item>

+ 4 - 0
src/views/basicData/dataSailingMaterialPrice/index.js

@@ -19,6 +19,10 @@ export const columns = (_this) => [
     prop: 'avmatCatalogCode',
     label: '航材编码'
   },
+  {
+    prop: 'specification',
+    label: '规格型号'
+  },
   {
     prop: 'avmatCategoriesName',
     label: '所属分类'

+ 2 - 1
src/views/carrierStandard/carrierAllAudit/index.vue

@@ -102,7 +102,8 @@ export default {
         .catch(() => {})
     },
     look(row) {
-      this.$router.push(`/carrierStandard/carrierAllAudit/look/${row.taskId}`)
+      //   this.$router.push(`/carrierStandard/carrierAllAudit/look/${row.taskId}`)
+      this.$router.push(`/carrierStandard/carrierListMachineryPreparation/look/${row.taskId}`)
     }
   }
 }

+ 1 - 1
src/views/carrierStandard/carrierComputationalModel/index.vue

@@ -4,7 +4,7 @@
       <div class="view-carrierComputationalModel-btn">
         <el-button type="success" @click="addDialog()">新增</el-button>
         <el-button :disabled="multipleSelection.length == 0" type="warning" @click="allRmove()">删除</el-button>
-        <el-button type="primary">导出</el-button>
+        <!-- <el-button type="primary">导出</el-button> -->
         <el-button :disabled="multipleSelection.length == 0" type="primary" @click="publish()">发布</el-button>
       </div>
       <div class="view-carrierComputationalModel-search">

+ 1 - 1
src/views/carrierStandard/carrierListExecutionRegistration/components/look/index.js

@@ -13,7 +13,7 @@ export const columns = (_this) => [
   },
   {
     prop: 'mechanician',
-    label: '机械师'
+    label: '驾驶员'
   },
   {
     prop: 'planFlyDuration',

+ 1 - 1
src/views/carrierStandard/carrierListExecutionRegistration/components/registering/index.js

@@ -13,7 +13,7 @@ export const columns = (_this) => [
   },
   {
     prop: 'mechanician',
-    label: '机械师'
+    label: '驾驶员'
   },
   {
     prop: 'planFlyDuration',

+ 10 - 10
src/views/carrierStandard/carrierListMachineryPreparation/components/compile/index.vue

@@ -24,19 +24,19 @@
 
       <div class="view-AerospaceCompileLineList-right-table">
         <el-table :data="tableData" border style="width: 100%" height="calc(100vh - 420px)">
-          <el-table-column prop="avmatCatalogCode" label="航材编码">
+          <el-table-column prop="avmatCatalogCode" label="航材编码" width="150px">
             <template slot-scope="scope">
               <i class="el-icon-edit cell-edit" @click="sparePartsCodingClick(scope.$index, scope.row)"></i>
               <span>{{ scope.row.avmatCatalogCode }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="avmatCatalogName" label="航材名称" align="center"> </el-table-column>
-          <el-table-column prop="specification" label="航材型号" align="center"> </el-table-column>
-          <el-table-column prop="mappingCode" label="映射编号" align="center"> </el-table-column>
-          <el-table-column prop="avmatCategoriesName" label="航材分类" align="center"> </el-table-column>
+          <el-table-column prop="avmatCatalogName" label="航材名称" align="center" width="150px"> </el-table-column>
+          <el-table-column prop="specification" label="航材型号" align="center" width="150px"> </el-table-column>
+          <el-table-column prop="mappingCode" label="映射编号" align="center" width="150px"> </el-table-column>
+          <el-table-column prop="avmatCategoriesName" label="航材分类" align="center" width="120px"> </el-table-column>
           <el-table-column prop="unit" label="计量单位" align="center"> </el-table-column>
-          <el-table-column prop="aircaftCatalogCode" label="指向飞机" align="center"> </el-table-column>
-          <el-table-column prop="carryQuantity" label="携带数量" align="center">
+          <el-table-column prop="aircaftCatalogCode" label="指向飞机" align="center" width="150px"> </el-table-column>
+          <el-table-column prop="carryQuantity" label="携带数量" align="center" width="90px">
             <template slot-scope="scope">
               <template v-if="scope.row.carryQuantity.value || scope.row.carryQuantity.value == ''">
                 <el-input @blur="carryQuantityBlur(scope.$index, scope.row)" type="text" v-model="scope.row.carryQuantity.value" />
@@ -47,11 +47,11 @@
               </template>
             </template>
           </el-table-column>
-          <el-table-column prop="purchasePrice" label="单价/万元" align="center"> </el-table-column>
+          <el-table-column prop="purchasePrice" label="单价/万元" align="center" width="120px"> </el-table-column>
           <el-table-column prop="createBy" label="创建人" align="center"> </el-table-column>
           <!-- <el-table-column prop="amount" label="金额/元" align="center"> </el-table-column> -->
-          <el-table-column prop="updateTime" label="更新时间" align="center"> </el-table-column>
-          <el-table-column label="操作" align="center">
+          <el-table-column prop="updateTime" label="更新时间" align="center" width="110px"> </el-table-column>
+          <el-table-column label="操作" align="center" width="150px">
             <template slot-scope="scope">
               <el-button @click="handleRemoveClick(scope.$index, scope.row)" type="text" size="small">删除</el-button>
               <el-button :disabled="!!scope.row.mappingCode" @click="handleUpdateMapClick(scope.$index, scope.row)" type="text" size="small">映射编码</el-button>

+ 1 - 1
src/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.js

@@ -8,7 +8,7 @@ export const modalConfig = (_this) => ({
   labelWidth: '140px',
   itemStyle: { padding: '10px' },
   width: '600px', // 弹框宽度
-  rules: { deptName: [{ required: true, message: '请输入部门名称', trigger: 'blur' }] }
+  rules: { deptName: [{ required: true, message: '请输入机构名称', trigger: 'blur' }] }
 })
 
 /**

+ 1 - 17
src/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.vue

@@ -4,10 +4,9 @@
       <div class="common-box-button">
         <el-button type="success" @click="handleAdd">新增</el-button>
         <el-button type="warning" @click="handleDelete(removeArr)" :disabled="removeArr.length == 0">删除</el-button>
-        <el-button type="primary" @click="handleExport('导出')">导出</el-button>
       </div>
       <div class="common-box-search">
-        <el-input placeholder="请输入分类名称、编号" v-model="queryParam" class="input-with-select" @keyup.enter.native="fetchTableData">
+        <el-input placeholder="请输入年份" v-model="queryParam" class="input-with-select" @keyup.enter.native="fetchTableData">
           <el-button slot="append" icon="el-icon-search" @click="fetchTableData"></el-button>
         </el-input>
       </div>
@@ -119,21 +118,6 @@ export default {
       this.removeArr = data
     },
 
-    handleExport(type) {
-      // let msg = ''
-      // type == '下载模板' ? (msg = '是否确认下载该模板') : (msg = `是否${type}该航材`)
-      // this.$confirm(msg, '提示', {
-      //   confirmButtonText: '确定',
-      //   cancelButtonText: '取消',
-      //   type: 'warning'
-      // })
-      //   .then(() => {
-      //     getImportModel(0)
-      //   })
-      //   .catch(() => {})
-      // this.fetchTableData()
-    },
-
     async addTableRow(params) {
       try {
         const { success } = await addOveryearAvmatConsume(params)

+ 13 - 2
src/views/carrierStandard/carrierSailingMaterialConsumeRecord/outboundRecord.vue

@@ -4,11 +4,12 @@
       <div class="common-box-button">
         <el-button type="primary" @click="handleExport('是否下载模板', 0)">下载模板</el-button>
         <el-button type="primary" @click="upload">导入</el-button>
+        <el-button type="primary" :disabled="tableData.length == 0" @click="allExport">导出</el-button>
         <el-button type="warning" @click="handleDelete(removeArr)" :disabled="removeArr.length == 0">删除</el-button>
         <el-button type="primary" @click="matching('auto')">自动匹配</el-button>
       </div>
       <div class="common-box-search">
-        <el-input placeholder="请输入分类名称、编号" v-model="queryParam" class="input-with-select" @keyup.enter.native="fetchTableData">
+        <el-input placeholder="请输入名称、编号" v-model="queryParam" class="input-with-select" @keyup.enter.native="fetchTableData">
           <el-button slot="append" icon="el-icon-search" @click="fetchTableData"></el-button>
         </el-input>
       </div>
@@ -22,7 +23,7 @@
 <script>
 import MappingCoding from './mappingCoding/index.vue'
 import { columns, options } from './outboundRecord'
-import { autoMatching, handMatching, getOutBoundRecord, removeOutBoundRecord, getImportModel } from '@/api/carrierStandard/carrierSailingMaterialConsumeRecord'
+import { autoMatching, handMatching, getOutBoundRecord, removeOutBoundRecord, getImportModel, exportOutboundRecordExcel } from '@/api/carrierStandard/carrierSailingMaterialConsumeRecord'
 export default {
   components: { MappingCoding },
   name: 'OutboundRecord',
@@ -177,6 +178,16 @@ export default {
           })
         })
         .catch(() => {})
+    },
+
+    //导出全部
+    async allExport() {
+      const { consumeDataId } = this.$route.params
+      let params = {
+        consumeDataId,
+        queryParam: this.queryParam
+      }
+      await exportOutboundRecordExcel(params)
     }
   }
 }

+ 12 - 2
src/views/carrierStandard/carrierSailingMaterialConsumeRecord/warehousingRecord.vue

@@ -4,11 +4,12 @@
       <div class="common-box-button">
         <el-button type="primary" @click="handleExport('是否下载模板', 0)">下载模板</el-button>
         <el-button type="primary" @click="upload">导入</el-button>
+        <el-button type="primary" :disabled="tableData.length == 0" @click="allExport">导出</el-button>
         <el-button type="warning" @click="handleDelete(removeArr)" :disabled="removeArr.length == 0">删除</el-button>
         <el-button type="primary" @click="matching('auto')">自动匹配</el-button>
       </div>
       <div class="common-box-search">
-        <el-input placeholder="请输入分类名称、编号" v-model="queryParam" class="input-with-select" @keyup.enter.native="fetchTableData">
+        <el-input placeholder="请输入名称、编号" v-model="queryParam" class="input-with-select" @keyup.enter.native="fetchTableData">
           <el-button slot="append" icon="el-icon-search" @click="fetchTableData"></el-button>
         </el-input>
       </div>
@@ -22,7 +23,7 @@
 <script>
 import MappingCoding from './mappingCoding/index.vue'
 import { columns, options } from './warehousingRecord'
-import { autoMatching, handMatching, getWarehousingRecord, removeWarehousingRecord, getImportModel } from '@/api/carrierStandard/carrierSailingMaterialConsumeRecord'
+import { autoMatching, handMatching, getWarehousingRecord, removeWarehousingRecord, getImportModel, exportWarehousingRecordExcel } from '@/api/carrierStandard/carrierSailingMaterialConsumeRecord'
 
 export default {
   name: 'WarehousingRecord',
@@ -175,6 +176,15 @@ export default {
           })
         })
         .catch(() => {})
+    },
+    //导出全部
+    async allExport() {
+      const { consumeDataId } = this.$route.params
+      let params = {
+        consumeDataId,
+        queryParam: this.queryParam
+      }
+      await exportWarehousingRecordExcel(params)
     }
   }
 }

+ 69 - 0
src/views/carrierStandard/carrierSailingMaterialConsumeRegularities/components/importDialog/index.vue

@@ -0,0 +1,69 @@
+<template>
+  <el-dialog :title="dialogtitle" :visible.sync="dialogVisible" width="500px" :before-close="handleClose" center>
+    <div class="upload">
+      <div class="upload-left">导入文件</div>
+      <el-upload class="upload-right" ref="upload" accept=".xls,.xlsx" :action="fileApi" :file-list="fileList" :data="fileData" :auto-upload="false" :on-success="onSuccess" :limit="1">
+        <el-button slot="trigger" style="margin-right: 30px" size="small" type="primary">选择文件</el-button>
+        <el-button size="small" type="success" @click="submitUpload">导入数据</el-button>
+        <div slot="tip" class="el-upload__tip" style="margin-left: 10px; margin-top: 10px; font-size: 14px">只能导入 xls / xlsx 文件</div>
+      </el-upload>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { useMessage } from '@/utils/element-ui'
+export default {
+  data() {
+    return {
+      dialogtitle: '导入航材MTBF数据',
+      dialogVisible: false,
+      fileApi: process.env.VUE_APP_BASE_API + '/carryingtask/avmatConsumeRule/importExcel',
+      fileList: [],
+      fileData: {
+        userName: ''
+      }
+    }
+  },
+  methods: {
+    triggerDialog(data) {
+      this.dialogVisible = true
+    },
+
+    handleClose() {
+      this.dialogVisible = false
+    },
+
+    // 上传
+    submitUpload() {
+      const userInfo = this.$store.state.user.userInfo.user
+      this.fileData.userName = userInfo.userName
+      this.$refs.upload.submit()
+    },
+
+    // 上传完成后
+    onSuccess(result) {
+      this.$refs.upload.clearFiles()
+      this.fileList = []
+      const { msg, code } = result
+      useMessage(code == 200 ? 'success' : 'warning', msg, 2000)
+      if (code !== 200) return
+      this.handleClose()
+      this.$emit('submitCallBack')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.el-dialog__wrapper {
+  width: 100%;
+}
+.upload {
+  height: 106px;
+  padding-top: 30px;
+  display: flex;
+  &-left {
+    margin-right: 40px;
+  }
+}
+</style>

+ 54 - 18
src/views/carrierStandard/carrierSailingMaterialConsumeRegularities/index.vue

@@ -8,8 +8,14 @@
         <div class="common-box-button">
           <el-button type="success" @click="openDialog">新增</el-button>
           <el-button type="warning" @click="handleDelete(removeArr)" :disabled="removeArr.length == 0">删除</el-button>
-          <!-- <el-button type="primary" @click="handleExport('导入')">导入模板</el-button>
-          <el-button type="primary" @click="handleExport('导出')">导出模板</el-button> -->
+          <el-dropdown split-button type="primary" style="margin-left: 10px" trigger="click" @command="handleExport">
+            更多
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="importOperation">导入</el-dropdown-item>
+              <el-dropdown-item command="allExport" :disabled="tableData.length == 0">导出</el-dropdown-item>
+              <el-dropdown-item command="downloadTemplate">下载数据模板</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
         </div>
         <div class="common-box-search">
           <el-input placeholder="航材名称" v-model="avmatCategoriesName" class="input-with-select">
@@ -20,6 +26,8 @@
       <LTable ref="table" @selection-change="selection" :defaultFetch="false" :columns="columns" :dataSource="tableData" :dictData="dictData" :options="options" :fetch="fetchTableData" :pagination="tableRequset"></LTable>
     </div>
     <RegularitiesChoose ref="RegularitiesChoose" :monadOptions="dictData.life_unit" @handleRegularities="handleRegularities" />
+    <!-- 导入 -->
+    <ImportDialog ref="ImportDialog" @submitCallBack="ImportDialogCallBack" />
   </div>
 </template>
 
@@ -29,10 +37,12 @@ import { defaultProps, columns, options } from './index'
 import { compareObj, debounce } from '@/utils/index'
 import { getDict } from '@/api/dict'
 import { getAvmatCategoriesTree } from '@/api/basicData/dataSpecies'
-import { getAvmatConsumeRule, addAvmatConsumeRuleVo, updateAvmatConsumeRule, removeAvmatConsumeRule } from '@/api/carrierStandard/carrierSailingMaterialConsumeRegularities'
+import { getAvmatConsumeRule, addAvmatConsumeRuleVo, updateAvmatConsumeRule, removeAvmatConsumeRule, downLoadFile, exportExcel } from '@/api/carrierStandard/carrierSailingMaterialConsumeRegularities'
+import ImportDialog from './components/importDialog/index.vue'
+
 export default {
   name: 'carrierSailingMaterialConsumeRegularities',
-  components: { RegularitiesChoose },
+  components: { RegularitiesChoose, ImportDialog },
   data() {
     // 这里存放数据
     return {
@@ -196,21 +206,47 @@ export default {
         .catch(() => {})
     },
 
+    // handleExport(type) {
+    //   let msg = ''
+    //   type == '下载模板' ? (msg = '是否确认下载该模板') : (msg = `是否${type}该航材`)
+    //   this.$confirm(msg, '提示', {
+    //     confirmButtonText: '确定',
+    //     cancelButtonText: '取消',
+    //     type: 'warning'
+    //   })
+    //     .then(() => {
+    //       this.$message({
+    //         type: 'success',
+    //         message: '操作成功!'
+    //       })
+    //     })
+    //     .catch(() => {})
+    // },
+    //更多按钮
     handleExport(type) {
-      let msg = ''
-      type == '下载模板' ? (msg = '是否确认下载该模板') : (msg = `是否${type}该航材`)
-      this.$confirm(msg, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-        })
-        .catch(() => {})
+      this[type]()
+    },
+    //导入
+    importOperation() {
+      this.$refs.ImportDialog.triggerDialog()
+    },
+    //导入回写
+    ImportDialogCallBack() {
+      this.fetchTableData()
+    },
+
+    //导出全部
+    async allExport() {
+      let params = {
+        avmatCategoriesId: this.avmatCategoriesId,
+        avmatCategoriesName: this.avmatCategoriesName,
+        avmatCategoriesCode: this.currentNodeKey
+      }
+      await exportExcel(params)
+    },
+    //下载模板
+    async downloadTemplate() {
+      await downLoadFile()
     }
   }
 }

+ 17 - 1
src/views/carrierStandard/carrierUseRegistration/components/sailingMaterial/index.vue

@@ -54,6 +54,17 @@
               </template>
             </template>
           </el-table-column>
+          <el-table-column prop="usedNum" label="已使用总数量" align="center">
+            <template slot-scope="scope">
+              <template v-if="scope.row.usedNum.value || scope.row.usedNum.value == ''">
+                <el-input @blur="cellBlue(scope.$index, scope.row, 'usedNum')" type="text" v-model="scope.row.usedNum.value" />
+              </template>
+              <template v-else>
+                <i @click="editCell(scope.$index, scope.row, 'usedNum')" class="el-icon-edit cell-edit"></i>
+                <span>{{ scope.row.usedNum }}</span>
+              </template>
+            </template>
+          </el-table-column>
           <el-table-column label="操作" align="center" width="160px">
             <template slot-scope="scope">
               <el-button @click="handleRemoveClick(scope.$index, scope.row)" type="text" size="small">删除</el-button>
@@ -133,6 +144,7 @@ export default {
         data.list.forEach((item) => {
           item.applyForNum = item.applyForNum ? item.applyForNum : ''
           item.stockRemovalNum = item.stockRemovalNum ? item.stockRemovalNum : ''
+          item.usedNum = item.usedNum ? item.usedNum : ''
         })
         this.tableData = data.list
         this.pagination.total = data.totalCount
@@ -156,6 +168,7 @@ export default {
         avmatCatalogName: '',
         avmatCatalogCode: '',
         avmatCategoriesName: '',
+        specification: '',
         carryQuantity: '',
         purchasePrice: '',
         carryQuantity: 0,
@@ -167,6 +180,9 @@ export default {
         stockRemovalNum: {
           value: ''
         },
+        usedNum: {
+          value: ''
+        },
         taskId: this.$route.params.id,
         taskStatic: 0
       }
@@ -222,7 +238,7 @@ export default {
     async save() {
       for (let index = 0; index < this.tableData.length; index++) {
         const element = this.tableData[index]
-        if (element.applyForNum == '' || element.stockRemovalNum == '') {
+        if (element.applyForNum == '' || element.stockRemovalNum == '' || element.usedNum == '') {
           useMessage('error', `第${index + 1}行数据没有填写完整`, 1000)
           return
         }

+ 3 - 3
src/views/carrierStandard/safeguardCost/index.js

@@ -71,15 +71,15 @@ export const columns = (_this) => [
   },
   {
     prop: 'yearTotalPrice',
-    label: '总价'
+    label: '总价(万元)'
   },
   {
     prop: 'unitPrice',
-    label: '单架飞机保障价格'
+    label: '单架飞机保障价格(万元)'
   },
   {
     prop: 'perHourUnitPrice',
-    label: '单架飞机/小时保障价格'
+    label: '单架飞机/小时保障价格(万元)'
   },
 
   {

+ 10 - 18
src/views/carrierStandard/safeguardCost/index.vue

@@ -5,7 +5,7 @@
       <div class="view-common-header-left">
         <el-button type="success" @click="handleAdd">新增</el-button>
         <el-button type="warning" @click="handleDelete">删除</el-button>
-        <el-button type="primary" @click="handleExport('导出')">导出</el-button>
+        <el-button type="primary" :disabled="tableData.length == 0" @click="allExport">导出</el-button>
       </div>
       <div class="view-common-header-right">
         <el-input @keyup.enter.native="fetchTableData('search')" placeholder="请输入内容" v-model="searchValue" class="input-select">
@@ -21,7 +21,7 @@
 <script>
 import { compareObj } from '@/utils/index'
 import { columns, options, modalConfig, data } from './index'
-import { socialSecurityPage, socialSecurityAdd, socialSecurityEdit, socialSecurityRemove } from '@/api/task/carrierFlightMission'
+import { socialSecurityPage, socialSecurityAdd, socialSecurityEdit, socialSecurityRemove, exportSocialSecurityExcel } from '@/api/task/carrierFlightMission'
 
 export default {
   name: 'AnnualGuarantee',
@@ -131,22 +131,7 @@ export default {
         this.removeArr.push(item.socialSecurityId)
       })
     },
-    handleExport(type) {
-      let msg = ''
-      type == '下载模板' ? (msg = '是否确认下载该模板') : (msg = `是否${type}该航材`)
-      this.$confirm(msg, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-        })
-        .catch(() => {})
-    },
+
     async crudDialogSubmit(data) {
       const { dialogData, type } = data
       if (type == 'update') {
@@ -162,6 +147,13 @@ export default {
     },
     handPriceList(row) {
       this.$router.push(`/carrierStandard/safeguardCost/${row.socialSecurityId}`)
+    },
+    //导出全部
+    async allExport() {
+      let params = {
+        keyword: this.searchValue
+      }
+      await exportSocialSecurityExcel(params)
     }
   }
 }

+ 11 - 7
src/views/carrierStandard/safeguardCost/priceList.js

@@ -18,6 +18,10 @@ export const columns = (_this) => [
     prop: 'avmatCatalogName',
     label: '航材名称'
   },
+  {
+    prop: 'specification',
+    label: '规格型号'
+  },
   {
     prop: 'avmatCatalogCode',
     label: '航材编号'
@@ -28,31 +32,31 @@ export const columns = (_this) => [
   },
   {
     prop: 'newProductAmount',
-    label: '新品数量/个'
+    label: '新品数量'
   },
   {
     prop: 'newProductPrice',
-    label: '新品单价/万元'
+    label: '新品单价(万元)'
   },
   {
     prop: 'newProductTotalPrice',
-    label: '新品总价/万元'
+    label: '新品总价(万元)'
   },
   {
     prop: 'repairItemsAmount',
-    label: '维修品数量/个'
+    label: '维修品数量'
   },
   {
     prop: 'repairItemsPrice',
-    label: '维修品单价/万元'
+    label: '维修品单价(万元)'
   },
   {
     prop: 'repairItemsTotalPrice',
-    label: '维修品总价/万元'
+    label: '维修品总价(万元)'
   },
   {
     prop: 'totalPrice',
-    label: '总价/万元'
+    label: '总价(万元)'
   }
 
   // ,

+ 9 - 17
src/views/carrierStandard/safeguardCost/priceList.vue

@@ -6,7 +6,7 @@
     <div class="view-priceList-right">
       <div style="margin-bottom: 10px">
         <el-button type="warning" @click="handleCreate">生成</el-button>
-        <el-button type="primary" @click="handleExport('导出')">导出</el-button>
+        <el-button type="primary" :disabled="tableData.length == 0" @click="allExport">导出</el-button>
       </div>
 
       <LTable ref="table" :defaultFetch="false" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" :pagination="pagination"></LTable>
@@ -17,7 +17,7 @@
 <script>
 import { columns, data, options, dialogTreeObj } from './priceList'
 import { roleAvmatCategoriesTree, getAvmatCatalog } from '@/api/carrierStandard/carrierListMachineryPreparation'
-import { socialSecurityDetailsPage, generatePriceList } from '@/api/task/carrierFlightMission'
+import { socialSecurityDetailsPage, generatePriceList, exportSocialSecurityDetailsExcel } from '@/api/task/carrierFlightMission'
 
 export default {
   name: 'PriceList',
@@ -92,21 +92,13 @@ export default {
         })
         .catch(() => {})
     },
-    handleExport(type) {
-      let msg = ''
-      type == '下载模板' ? (msg = '是否确认下载该模板') : type == '生成' ? (msg = '将根据历年平均飞行时长的消耗品数量与维修品数量,预测今年计划飞行时长所需要的价格清单') : (msg = `是否${type}该数据`)
-      this.$confirm(msg, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-        })
-        .catch(() => {})
+    //导出全部
+    async allExport() {
+      let params = {
+        socialSecurityId: this.$route.params.id,
+        avmatCategoriesId: this.dialogCurrentNodeKey
+      }
+      await exportSocialSecurityDetailsExcel(params)
     }
   }
 }

+ 40 - 0
src/views/home/index.scss

@@ -1,5 +1,8 @@
 .view-home {
   margin-top: -20px;
+  height: calc(100vh - 140px);
+  overflow: scroll;
+  
 }
 .view-home-card {
   margin: 0 10px;
@@ -200,3 +203,40 @@
   padding-top: 10px;
   height: calc(100% - 10px);
 }
+
+::v-deep .air .c-card-content-echars{
+  height: 300px !important;
+}
+.airStatus{
+  width: 100%;
+  height: 200px;
+  box-sizing: border-box;
+  color: #fff;
+
+  .firstRow,
+  .secondRow{
+    width: 100%;
+    height: 100px;
+    display: flex;
+    justify-content: space-around;
+    padding: 20px 0px;
+  }
+
+  .cell{
+    width: 9%;
+    height: 100px;
+    margin: 0 auto;
+    border: 1px solid #0c3440;
+
+    .info{
+      width: calc(100% - 82px);
+      height: 100%;
+      float: right;
+      text-align: center;
+    }
+  }
+}
+
+::-webkit-scrollbar{
+  display: none;
+}

+ 49 - 2
src/views/home/index.vue

@@ -1,5 +1,42 @@
 <template>
   <div class="view-home">
+    <el-row>
+      <el-col :span="24" style="margin-bottom: 15px">
+        <Card title="飞机状态" class="air">
+          <template slot="content">
+            <div class="airStatus">
+              <div class="firstRow">
+                <div v-for="item of 10" :key="item" class="cell">
+                  <el-image style="width: 80px; height: 80px" :src="imgUrl"></el-image>
+                  <div class="info">
+                    <p>轰0101</p>
+                    <span class="success-state">健康 </span>
+                  </div>
+                </div>
+              </div>
+              <div class="secondRow">
+                <div v-for="item of 10" :key="item" class="cell">
+                  <el-image style="width: 80px; height: 80px" :src="imgUrl"></el-image>
+                  <div class="info">
+                    <p>轰0101</p>
+                    <span class="warning-state">故障 </span>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
+        </Card>
+      </el-col>
+    </el-row>
+    <el-row>
+      <el-col :span="24" style="margin-bottom: 15px">
+        <Card title="维修状态">
+          <template slot="content">
+            <LTable ref="maintainTable" :defaultFetch="true" :columns="maintainColumns" :dataSource="maintainTableData" :options="maintainOptions" :fetch="maintainFetchTableData" class="tabl-box" />
+          </template>
+        </Card>
+      </el-col>
+    </el-row>
     <el-row>
       <el-col :span="12" style="margin-bottom: 15px">
         <Card title="历年任务">
@@ -53,9 +90,11 @@
 
 <script>
 import { getHomeLastMission, getAviationList, getHomeAviationProject, getHomeAviationAmount, getHomeAviationMoney } from '@/api/home'
+import { getFaultStatisticsListAll } from '@/api/als/faultStatistics'
+
 import * as echarts from 'echarts'
 import { setTopOptions, bottomLeftOptions, bottomCenterOptions, bottomRightOptions } from './index'
-import { columns, options } from './table.js'
+import { columns, options, maintainColumns, maintainOptions } from './table.js'
 export default {
   name: 'home',
 
@@ -63,8 +102,11 @@ export default {
     // 这里存放数据
     return {
       tableData: [],
+      maintainTableData: [],
       options,
       columns: columns(this),
+      maintainOptions,
+      maintainColumns: maintainColumns(this),
       selectOptions: [{ avmatCatalogCode: '全部', avmatCatalogName: '全部' }],
 
       model: '全部',
@@ -74,7 +116,8 @@ export default {
       setTopOptions,
       bottomLeftOptions,
       bottomCenterOptions,
-      bottomRightOptions
+      bottomRightOptions,
+      imgUrl: require('@/assets/images/飞机.png')
     }
   },
   mounted() {
@@ -93,6 +136,10 @@ export default {
       this.tableData = data
       this.fetchIndexAnalysis()
     },
+    async maintainFetchTableData() {
+      const { data } = await getFaultStatisticsListAll()
+      this.maintainTableData = data
+    },
     handleChange(item) {
       switch (item) {
         case 1:

+ 249 - 0
src/views/home/table.js

@@ -57,6 +57,255 @@ export const options = {
   height: '100%'
 }
 
+export const maintainColumns = (_this) => [
+  {
+    prop: 'statisticsDate',
+    label: '日期'
+  },
+  {
+    prop: 'warZone',
+    label: '战区'
+  },
+  {
+    prop: 'army',
+    label: '军'
+  },
+  {
+    prop: 'division',
+    label: '师'
+  },
+  {
+    prop: 'groups',
+    label: '团'
+  },
+  {
+    prop: 'squadron',
+    label: '中队'
+  },
+  {
+    prop: 'aircraftNum',
+    label: '飞机号'
+  },
+  {
+    prop: 'aircraftModel',
+    label: '机型'
+  },
+  {
+    prop: 'factoryNum',
+    label: '出厂号码'
+  },
+  {
+    prop: 'machineType',
+    label: '机件类型'
+  },
+  {
+    prop: 'machineNum',
+    label: '机件号'
+  },
+  {
+    prop: 'machineModel',
+    label: '机件型别'
+  },
+  {
+    prop: 'machineName',
+    label: '机件名称'
+  },
+  {
+    prop: 'landingGear',
+    label: '起落'
+  },
+  {
+    prop: 'major',
+    label: '专业'
+  },
+  {
+    prop: 'faultyPartsName',
+    label: '故障件名称'
+  },
+  {
+    prop: 'faultyPartsModel',
+    label: '故障件型别'
+  },
+  {
+    prop: 'faultyPartsNum',
+    label: '故障件号码'
+  },
+  {
+    prop: 'engineModel',
+    label: '故障件所属发动机型别'
+  },
+  {
+    prop: 'engineNum',
+    label: '故障件所属发动机号码'
+  },
+  {
+    prop: 'engineSerialNum',
+    label: '故障件所属发动机号码'
+  },
+  {
+    prop: 'faultyPartsPosition',
+    label: '故障件位置'
+  },
+  {
+    prop: 'faultyPhenomenon',
+    label: '故障现象'
+  },
+  {
+    prop: 'faultyPlace',
+    label: '故障发生地点'
+  },
+  {
+    prop: 'findOpportunity',
+    label: '发现时机'
+  },
+  {
+    prop: 'systems',
+    label: '系统'
+  },
+  {
+    prop: 'timingType',
+    label: '计时类型'
+  },
+  {
+    prop: 'faultyPartsManufacturer',
+    label: '故障件制造厂'
+  },
+  {
+    prop: 'faultyPartsRenovate',
+    label: '故障件翻修厂'
+  },
+  {
+    prop: 'installationTime',
+    label: '故障件装本机工作时次'
+  },
+  {
+    prop: 'totalWorkTime',
+    label: '故障件总工作时次'
+  },
+  {
+    prop: 'repairTime',
+    label: '故障件修后时次'
+  },
+  {
+    prop: 'replacementPartsModel',
+    label: '故换件型别'
+  },
+  {
+    prop: 'replacementPartsNum',
+    label: '故换件号码'
+  },
+  {
+    prop: 'replacementPartsManufacturer',
+    label: '故换件制造厂'
+  },
+  {
+    prop: 'replacementTotalWorkTime',
+    label: '故换件总工作时次'
+  },
+  {
+    prop: 'replacementPartsRenovate',
+    label: '故换件翻修厂'
+  },
+  {
+    prop: 'replacementRepairTime',
+    label: '故换件修后时次'
+  },
+  {
+    prop: 'faultyAbnormalCode',
+    label: '故障失常码'
+  },
+  {
+    prop: 'faultyPartsInstallDate',
+    label: '故障件装机日期'
+  },
+  {
+    prop: 'faultyReason',
+    label: '故障原因'
+  },
+  {
+    prop: 'faultyNature',
+    label: '故障性质'
+  },
+  {
+    prop: 'faultyResponsibility',
+    label: '故障责任'
+  },
+  {
+    prop: 'faultyConsequence',
+    label: '故障后果'
+  },
+  {
+    prop: 'handlingSuggestions',
+    label: '处理意见'
+  },
+  {
+    prop: 'influenceFrequency',
+    label: '影响次数'
+  },
+  {
+    prop: 'errorFlyFrequency',
+    label: '误飞次数'
+  },
+  {
+    prop: 'identificationMethod',
+    label: '判明方法'
+  },
+  {
+    prop: 'discoveredPeople',
+    label: '发现人'
+  },
+  {
+    prop: 'exclusionMethod',
+    label: '排除方法'
+  },
+  {
+    prop: 'exclusionPeople',
+    label: '排故人'
+  },
+  {
+    prop: 'examinePeople',
+    label: '审核人'
+  },
+  {
+    prop: 'examineTime',
+    label: '审核时间'
+  },
+  {
+    prop: 'exclusionDate',
+    label: '排除日期'
+  },
+  {
+    prop: 'exclusionWorkTime',
+    label: '排故工时'
+  },
+  {
+    prop: 'exclusionPeopleNum',
+    label: '排故人数'
+  },
+  {
+    prop: 'exclusionTime',
+    label: '排故时间'
+  },
+  {
+    prop: 'isAchievement',
+    label: '是否立功'
+  },
+  {
+    prop: 'needTestFly',
+    label: '需要试飞'
+  }
+]
+
+export const maintainOptions = {
+  stripe: true, // 斑马纹
+  mutiSelect: false, // 多选框
+  index: false, // 显示序号, 多选则 mutiSelect
+  loading: false, // 表格动画
+  initTable: true, // 是否一挂载就加载数据
+  border: true,
+  height: '100%'
+}
+
 export const data = [
   { taskName: '任务一', taskTime: '2022-9-1', equipmentCompletion: '12%', guaranteeGoodRate: '41%', noForceUtilization: '13%', forceUtilization: '35%' },
   { taskName: '任务二', taskTime: '2023-9-1', equipmentCompletion: '23%', guaranteeGoodRate: '12%', noForceUtilization: '14%', forceUtilization: '36%' },

+ 1 - 1
src/views/login/index.vue

@@ -81,7 +81,7 @@ export default {
     }
   },
   beforeDestroy() {
-    //登录成功去首页 设置tags
+    //登录成功去综合看板 设置tags
     const { fullPath, meta, name, params, path, query } = this.$route
     this.$store.commit('app/addTagsViewList', {
       fullPath,

+ 1 - 1
src/views/statisticalAnalysis/statisticalAnalysisSailingMaterialSpareParts/index.vue

@@ -2,7 +2,7 @@
   <div class="view-statisticalAnalysisSailingMaterialSpareParts">
     <el-row>
       <el-col :span="12" style="margin-bottom: 15px">
-        <Card title="经济指标分析">
+        <Card title="历年任务">
           <template slot="content">
             <LTable ref="table" :defaultFetch="true" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" @handleRowClick="handleRowClick" class="tabl-box" />
           </template>

+ 2 - 2
src/views/system/dept/index.js

@@ -1,6 +1,6 @@
 export const rules = {
-  parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }],
-  deptName: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }],
+  parentId: [{ required: true, message: '上级机构不能为空', trigger: 'blur' }],
+  deptName: [{ required: true, message: '机构名称不能为空', trigger: 'blur' }],
   orderNum: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }],
   email: [
     {

+ 13 - 13
src/views/system/dept/index.vue

@@ -6,13 +6,13 @@
           <el-button type="success" class="btn" @click="handleAdd">新增</el-button>
         </el-col>
         <el-col :span="12" class="flex flex-end flex-middle">
-          <span class="view-dept-status-label">部门状态:</span>
-          <el-select @change="handleQuery" v-model="queryParams.status" placeholder="部门状态" clearable>
+          <span class="view-dept-status-label">状态:</span>
+          <el-select @change="handleQuery" v-model="queryParams.status" placeholder="组织机构状态" clearable>
             <el-option label="正常" value="0" />
             <el-option label="停用" value="1" />
           </el-select>
           <div class="flex-1 ml-15">
-            <el-input slot="append" v-model="queryParams.deptName" placeholder="请输入部门名称" @keyup.enter.native="handleQuery">
+            <el-input slot="append" v-model="queryParams.deptName" placeholder="请输入组织机构名称" @keyup.enter.native="handleQuery">
               <el-button slot="append" icon="el-icon-search" @click="handleQuery"></el-button>
             </el-input>
           </div>
@@ -21,7 +21,7 @@
     </el-form>
 
     <el-table class="mt-20" :data="deptList" height="calc(100vh - 240px)" row-key="deptId" :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
-      <el-table-column prop="deptName" label="部门名称"></el-table-column>
+      <el-table-column prop="deptName" label="组织机构名称"></el-table-column>
       <el-table-column prop="orderNum" label="排序" width="200" align="center"></el-table-column>
       <el-table-column prop="status" label="状态" width="100" align="center">
         <template slot-scope="scope">
@@ -44,19 +44,19 @@
     </el-table>
 
     <!-- 添加或修改部门对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-row>
           <el-col :span="24" v-if="form.parentId !== 0">
-            <el-form-item label="上级部门" prop="parentId">
-              <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
+            <el-form-item label="上级组织机构" prop="parentId">
+              <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级组织机构" />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="部门名称" prop="deptName">
-              <el-input v-model="form.deptName" placeholder="请输入部门名称" />
+            <el-form-item label="组织机构名称" prop="deptName">
+              <el-input v-model="form.deptName" placeholder="请输入组织机构名称" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -84,7 +84,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="部门状态">
+            <el-form-item label="组织机构状态">
               <el-radio-group v-model="form.status">
                 <el-radio label="0">正常</el-radio>
                 <el-radio label="1">停用</el-radio>
@@ -196,7 +196,7 @@ export default {
         this.form.parentId = row.deptId
       }
       this.open = true
-      this.title = '添加部门'
+      this.title = '添加组织机构'
       listDept().then((response) => {
         this.deptOptions = handleTree(response.data, 'deptId')
       })
@@ -208,7 +208,7 @@ export default {
       getDept(row.deptId).then((response) => {
         this.form = response.data
         this.open = true
-        this.title = '修改部门'
+        this.title = '修改组织机构'
         listDeptExcludeChild(row.deptId).then((response) => {
           this.deptOptions = handleTree(response.data, 'deptId')
           if (this.deptOptions.length == 0) {

+ 1 - 1
src/views/system/role/index.js

@@ -104,7 +104,7 @@ export const rightColumns = (_this) => {
     },
     {
       prop: 'deptName',
-      label: '所属部门'
+      label: '所属组织机构'
     },
     {
       prop: 'majorName',

+ 9 - 12
src/views/system/role/index.vue

@@ -11,8 +11,8 @@
       <div class="right-title">{{ rightrolename }}</div>
       <div class="right-table">
         <div class="right-table-btn">
-          <el-button type="success" @click="adduserechodata">添加</el-button>
-          <el-button type="warning" @click="deletuser">删除</el-button>
+          <el-button type="success" @click="adduserechodata">新增用户</el-button>
+          <el-button type="warning" @click="deletuser">删除用户</el-button>
         </div>
         <LTable :fetch="initGetlistByRoleId" class="rightTable" @select-all="selectAll" @selection-change="selection" :pagination="pagination" :dataSource="rightTableData" ref="Rtable" :options="rightOptions" :columns="rightColumns"></LTable>
       </div>
@@ -61,7 +61,9 @@ import { useMessage } from '@/utils/element-ui'
 import { roleList, addRole, addEdit, menuList, roleDelete, listByRoleId, userList, cancelAll, selectAll, roleAuthMenu } from '@/api/system/role'
 import { Addrolerules, options, columns, rightOptions, rightColumns } from './index'
 import { deepClone } from '@/utils/index'
-import { getMenusData } from '@/utils/route'
+import { transformTreeData, whitelistFilter } from '@/utils/route'
+import { buildTreeData, privateRoutes } from '@/router/private-routes'
+
 export default {
   name: 'Role',
   components: {},
@@ -73,7 +75,7 @@ export default {
       rightColumns: rightColumns(this),
       roleCheckedItem: '',
       menuDialog: false,
-      menutreedata: getMenusData(),
+      menutreedata: transformTreeData(buildTreeData(whitelistFilter(privateRoutes, ['Home']))),
       checkedArr: [],
       defaultProps: {
         children: 'children',
@@ -207,15 +209,10 @@ export default {
     // 配置菜单弹框确认按钮
     async menuConfirm() {
       const arr = this.$refs.treeref.getCheckedNodes()
-      const result = arr.map((item) => {
-        if (!item.children) {
-          return item.id
-        }
-      })
-      const orderResult = result.filter((item) => item !== undefined)
+      const result = arr.filter((e) => e.id).map((e) => e.id)
       let params = {
         roleId: this.roleCheckedItem.roleId,
-        menuKeyList: orderResult
+        menuKeyList: result
       }
       await roleAuthMenu(params)
       this.getRoleList('created')
@@ -234,7 +231,7 @@ export default {
     },
 
     tablerow(row) {
-      this.rightrolename = row.roleName + '列表'
+      this.rightrolename = row.roleName + '的用户列表'
       this.activeRow = row
       this.pagination.pageIndex = 1
       this.getlistByRoleId(row.roleId)

+ 17 - 6
src/views/system/systemBackup/index.vue

@@ -15,8 +15,19 @@
         >备份</el-button
       >
       <el-button type="primary" @click="getBackupSet">备份设置</el-button>
-      <el-button type="primary" @click="importBackup">数据同步</el-button>
       <el-button
+        type="warning"
+        @click="
+          confirmation(
+            {
+              msg: '导入的备份文件将全部覆盖本系统数据, 是否继续?'
+            },
+            () => importBackup()
+          )
+        "
+        >数据同步</el-button
+      >
+      <!-- <el-button
         type="warning"
         @click="
           confirmation(
@@ -28,8 +39,8 @@
         "
         :disabled="initloading"
         >系统初始化</el-button
-      >
-      <el-button type="primary" @click="importOperation">导入</el-button>
+      > -->
+      <el-button type="primary" @click="importOperation">导入训练集数据</el-button>
     </div>
     <LTable ref="table" :defaultFetch="false" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" :pagination="pagination" class="systemBackup-table"> </LTable>
     <el-dialog title="备份设置" :visible.sync="dialogVisible" width="400px" :before-close="cancel">
@@ -127,7 +138,7 @@ export default {
           type: 'success',
           message: msg
         })
-        this.$alert(msg + '跳转至首页', '提示', {
+        this.$alert(msg + '跳转至综合看板', '提示', {
           confirmButtonText: '确定',
           callback: (action) => {
             this.$store.dispatch('user/loginOut')
@@ -157,7 +168,7 @@ export default {
           this.fetchTableData()
           this.$message({
             type: 'success',
-            message: '删除成功!'
+            message: '备份成功!'
           })
           this.fetchTableData()
         }
@@ -246,7 +257,7 @@ export default {
         await recover({ sysBackupId: row.sysBackupId })
         this.$message({
           type: 'success',
-          message: '恢复成功! 跳转至首页'
+          message: '恢复成功! 跳转登录页面'
         })
         setTimeout(() => {
           this.fullscreenLoading = false

+ 4 - 3
src/views/system/systemDataDictionary/data.vue

@@ -30,9 +30,9 @@
       <el-col :span="1.5">
         <el-button type="warning" size="mini" :disabled="multiple" @click="handleRemove">删除</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button type="primary" size="mini" :loading="exportLoading" @click="handleExport">导出</el-button>
-      </el-col>
+      </el-col> -->
       <!-- <right-toolbar :show-search.sync="showSearch" @queryTable="getList" /> -->
     </el-row>
 
@@ -130,7 +130,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        dictName: undefined,
+        dictLabel: undefined,
         dictType: undefined,
         status: undefined
       },
@@ -295,6 +295,7 @@ export default {
       })
         .then(() => {
           this.exportLoading = true
+          debugger
           return exportData(queryParams)
         })
         .then((response) => {

+ 14 - 5
src/views/system/user/index.js

@@ -23,7 +23,7 @@ export const columns = (_this) => {
     },
     {
       prop: 'deptName',
-      label: '所属部门'
+      label: '所属机构'
     },
     {
       prop: 'majorName',
@@ -64,7 +64,7 @@ export const columns = (_this) => {
     {
       button: true,
       label: '操作',
-      width: '300px',
+      width: '350px',
       group: [
         {
           name: '编辑',
@@ -106,6 +106,15 @@ export const columns = (_this) => {
             _this.handRemove(row)
           }
         },
+        {
+          name: '重置密码',
+          type: 'text',
+          round: false,
+          plain: false,
+          onClick: (row, index, scope) => {
+            _this.resetPwd(row.userId)
+          }
+        },
         {
           name: '角色分配',
           type: 'text',
@@ -133,12 +142,12 @@ export const options = {
 export const modalConfig = (_this) => ({
   formItems: [
     { key: 'nickName', type: 'input', label: '用户名称', placeHolder: '请输入用户名称' },
-    { key: 'userName', type: 'input', label: '登录账号', placeHolder: '请输入登录账号' },
+    { key: 'userName', type: 'input', label: '登录账号', placeHolder: '请输入登录账号', showPassword: true },
     {
       key: 'deptId',
       keyLabel: 'deptName',
       type: 'treeSelect',
-      label: '所属部门',
+      label: '所属机构',
       valueOptions: _this.valueOptions,
       defaultProps: defaultProps,
       colLayout: { span: 12 }
@@ -181,7 +190,7 @@ export const modalConfig = (_this) => ({
   rules: {
     nickName: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
     userName: [{ required: true, message: '请输入登录账号', trigger: 'blur' }],
-    deptId: [{ required: true, message: '请选择所属部门', trigger: 'blur' }],
+    deptId: [{ required: true, message: '请选择所属机构', trigger: 'blur' }],
     majorId: [{ required: true, message: '请选择所属专业', trigger: 'blur' }],
     sex: [{ required: true, message: '请选择性别', trigger: 'blur' }]
   }

+ 24 - 2
src/views/system/user/index.vue

@@ -10,7 +10,7 @@
       <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
       <el-col :span="6">
         <div class="grid-content bg-purple">
-          <el-input placeholder="请输入用户名/登录账号/所属部门" v-model="keyword" class="input-with-select">
+          <el-input placeholder="请输入用户名/登录账号/所属机构" v-model="keyword" class="input-with-select">
             <el-button slot="append" icon="el-icon-search" @click="findUser"></el-button>
           </el-input>
         </div>
@@ -29,7 +29,7 @@
 
 <script>
 import RoleDialog from './roleDialog.vue'
-import { userList, addUser, deleteUser, changeStatus, deptTree, userUpdate } from '@/api/system/user'
+import { userList, addUser, deleteUser, changeStatus, deptTree, userUpdate, resetBtn } from '@/api/system/user'
 import { getAvmatCategoriesTree } from '@/api/basicData/dataSailingMaterialClassification'
 import { columns, options, modalConfig } from './index'
 import { useMessage } from '@/utils/element-ui'
@@ -186,6 +186,28 @@ export default {
         .catch(() => {})
     },
 
+    // 重置密码
+    resetPwd(selectRow) {
+      this.$confirm('是否重置选中用户密码', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(async () => {
+          const { code } = await resetBtn({ userId: selectRow })
+          debugger
+          if (code == 200) {
+            this.getUserList()
+            this.$refs.Ltable.clearSelection()
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            })
+          }
+        })
+        .catch(() => {})
+    },
+
     async deleteBtn() {
       this.$confirm('是否确认删除选中数据', '提示', {
         confirmButtonText: '确定',

+ 2 - 2
src/views/task/carrierFlightMission/components/aircraft/index.vue

@@ -18,9 +18,8 @@
           </template>
         </el-table-column>
         <el-table-column prop="aircaftModelName" label="机型" align="center"> </el-table-column>
-        <el-table-column prop="createBy" label="创建人" align="center"> </el-table-column>
         <el-table-column prop="aircaftTypeName" label="机种" align="center"> </el-table-column>
-        <el-table-column prop="mechanician" label="机械师" align="center"> </el-table-column>
+        <el-table-column prop="mechanician" label="驾驶员" align="center"> </el-table-column>
         <el-table-column prop="planFlyDuration" label="计划飞行时长/小时" align="center">
           <template slot-scope="scope">
             <template v-if="scope.row.planFlyDuration.value || scope.row.planFlyDuration.value == ''">
@@ -32,6 +31,7 @@
             </template>
           </template>
         </el-table-column>
+        <el-table-column prop="createBy" label="创建人" align="center"> </el-table-column>
         <el-table-column prop="updateTime" label="更新时间" align="center"> </el-table-column>
         <el-table-column label="操作" width="100">
           <template slot-scope="scope">

+ 2 - 0
src/views/task/carrierFlightMission/index.js

@@ -87,6 +87,8 @@ export const columns = (_this) => [
         type: 'text',
         round: false,
         plain: false,
+        statusKey: 'status',
+        unDisableKey: '1',
         onClick: (row, index, scope) => {
           _this.edit(row)
         }

+ 57 - 10
src/views/task/carrierFlightMission/index.vue

@@ -4,7 +4,8 @@
       <div class="view-carrierFlightMission-FlightMission-btn-box">
         <el-button type="success" @click="addDialog()">新增任务</el-button>
         <el-button type="success" @click="addChildDialog()">新增子任务</el-button>
-        <el-button :disabled="!removeArr.length" type="warning" @click="selectRemove">删除</el-button>
+        <el-button :disabled="!removeRow.length" type="warning" @click="selectRemove">删除</el-button>
+        <el-button :disabled="removeRow.length != 1" type="primary" @click="editTask">修改</el-button>
         <el-dropdown split-button type="primary" style="margin-left: 10px" trigger="click" @command="handleExport">
           更多
           <el-dropdown-menu slot="dropdown">
@@ -61,7 +62,7 @@ export default {
         searchValue: ''
       },
       modalConfig: modalConfig(this),
-      removeArr: [],
+      removeRow: [],
       currentRow: []
     }
   },
@@ -83,14 +84,14 @@ export default {
     },
 
     addChildDialog() {
-      if (this.removeArr.length != 1) {
+      if (this.removeRow.length != 1) {
         this.$message({
           type: 'warning',
           message: '请选择一个待提交的主任务!'
         })
         return
       }
-      this.currentRow = this.tableData.find((row) => row.taskId == this.removeArr)
+      this.currentRow = this.removeRow[0]
       if (this.currentRow == undefined || this.currentRow.status != '1') {
         this.$message({
           type: 'warning',
@@ -152,7 +153,35 @@ export default {
       }
       this.$refs.NewDialogRef.open(config)
     },
+    //编辑
+    editTask() {
+      let row = this.removeRow[0]
+      if (row.status != '1') {
+        this.$message({
+          type: 'warning',
+          message: '请选择一个待提交的任务!'
+        })
+        return
+      }
+
+      this.queryFlyTaskMain()
+      this.getTEnvFactorDict()
 
+      const newRow = deepClone(row)
+      const tiemArr = newRow.taskTime.split('/')
+      newRow.taskTime = tiemArr
+      let config = {
+        type: 'upDate',
+        dataShow: newRow,
+        title: '编辑任务'
+      }
+      if (newRow.parentId == null || newRow.parentId == '') {
+        this.modalConfig.formItems[0].isHidden = true
+      } else {
+        this.modalConfig.formItems[0].isHidden = false
+      }
+      this.$refs.NewDialogRef.open(config)
+    },
     toCompile(row) {
       this.$router.push('/task/carrierFlightMission/compile')
       // this.dialogTitle = '编辑'
@@ -189,13 +218,31 @@ export default {
         .catch(() => {})
     },
     selectRemove() {
+      const removeArr = []
+      if (this.removeRow.length > 0) {
+        let shouldBreak = false
+        this.removeRow.forEach((item) => {
+          removeArr.push(item.taskId)
+          if (item.status != '1') {
+            shouldBreak = true
+          }
+        })
+
+        if (shouldBreak) {
+          this.$message({
+            type: 'warning',
+            message: '请选择一个待提交的任务!'
+          })
+          return
+        }
+      }
       this.$confirm('是否删除该任务', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       })
         .then(async () => {
-          const { code } = await removeFlyTask(this.removeArr)
+          const { code } = await removeFlyTask(removeArr)
           if (code == 200) {
             this.$message({
               type: 'success',
@@ -263,20 +310,20 @@ export default {
     },
     // 全选
     selectAll(data) {
-      this.removeArr = []
+      this.removeRow = []
       if (data.length > 0) {
         data.forEach((item) => {
-          this.removeArr.push(item.taskId)
+          this.removeRow.push(item)
         })
       } else {
-        this.removeArr = []
+        this.removeRow = []
       }
     },
     // 单选
     selection(data) {
-      this.removeArr = []
+      this.removeRow = []
       data.forEach((item) => {
-        this.removeArr.push(item.taskId)
+        this.removeRow.push(item)
       })
     },
     async fetchTableData(search) {

+ 1 - 1
vue.config.js

@@ -16,7 +16,7 @@ module.exports = defineConfig({
         }
       },
       ['/api/kgqa']: {
-        target: 'http://192.168.0.100:8000',
+        target: 'http://192.168.0.103:8000',
         ws: false,
         changeOrigin: true,
         pathRewrite: {