Ver Fonte

通讯管理增删改查,故障管理增删改

caowencheng há 6 meses atrás
pai
commit
50679d149b
96 ficheiros alterados com 5582 adições e 2047 exclusões
  1. 93 0
      package-lock.json
  2. 4 0
      package.json
  3. 5 0
      src/api/als/algorithm.js
  4. 45 0
      src/api/als/faultStatistics.js
  5. 26 2
      src/api/als/intelligentQA.js
  6. 26 0
      src/api/als/judgeFaultLogic.js
  7. 35 0
      src/api/als/lifetimeSpareParts.js
  8. 9 0
      src/api/als/smTask.js
  9. 5 0
      src/api/als/warning.js
  10. 10 0
      src/api/carrierStandard/carrierSailingMaterialConsumeRecord.js
  11. 9 0
      src/api/carrierStandard/carrierSailingMaterialConsumeRegularities.js
  12. 5 0
      src/api/system/user.js
  13. 10 0
      src/api/task/carrierFlightMission.js
  14. 1 1
      src/assets/font/demo_index.html
  15. BIN
      src/assets/images/飞机.png
  16. 1 1
      src/components/AddUserDialog/index.js
  17. 7 1
      src/components/CrudDialog/index.vue
  18. 1 1
      src/components/FittingsModal/index.js
  19. 29 2
      src/components/TagsView/index.vue
  20. 6 15
      src/components/TagsView/scrollPane.vue
  21. 9 2
      src/components/aviationMaterialsModal/index.js
  22. 31 0
      src/layout/components/NavBar/MenuItem.vue
  23. 24 0
      src/layout/components/NavBar/index.scss
  24. 11 1
      src/layout/components/NavBar/index.vue
  25. 33 69
      src/layout/components/NavBar/menu.vue
  26. 20 15
      src/pemission.js
  27. 67 0
      src/router/modules/als/dataManage.js
  28. 21 1
      src/router/modules/als/qualityManage.js
  29. 306 334
      src/router/modules/carrierStandard.js
  30. 39 0
      src/router/modules/faultDiagnosis.js
  31. 30 0
      src/router/modules/faultStatistics.js
  32. 39 0
      src/router/modules/lifePrediction.js
  33. 39 0
      src/router/modules/maintenanceDecision.js
  34. 341 92
      src/router/modules/system.js
  35. 89 0
      src/router/modules/systemTest.js
  36. 68 0
      src/router/modules/test.js
  37. 89 34
      src/router/private-routes.js
  38. 1 7
      src/router/public-routes.js
  39. 2 1
      src/store/getters.js
  40. 21 2
      src/store/modules/permission.js
  41. 25 1
      src/utils/route.js
  42. 2 3
      src/views/als/airInstall/index.vue
  43. 211 489
      src/views/als/falseAlarm/index.vue
  44. 162 389
      src/views/als/faultDiagnosis/index.vue
  45. 418 0
      src/views/als/faultStatistics/echarts.vue
  46. 69 0
      src/views/als/faultStatistics/importDialog/index.vue
  47. 1059 0
      src/views/als/faultStatistics/index.vue
  48. 30 66
      src/views/als/flightData/index.vue
  49. 26 0
      src/views/als/index.scss
  50. 98 15
      src/views/als/intelligentQA/index.scss
  51. 175 55
      src/views/als/intelligentQA/index.vue
  52. 373 0
      src/views/als/judgeFaultLogic/index.vue
  53. 72 214
      src/views/als/lifePrediction/index.vue
  54. 69 0
      src/views/als/lifetimeSpareParts/importDialog/index.vue
  55. 543 0
      src/views/als/lifetimeSpareParts/index.vue
  56. 53 18
      src/views/als/model/index.vue
  57. 10 29
      src/views/als/preProcessing/index.vue
  58. 69 0
      src/views/als/smTask/importDialog/index.vue
  59. 59 24
      src/views/als/smTask/index.vue
  60. 1 1
      src/views/als/utils/enum-data.js
  61. 1 1
      src/views/basicData/dataAircraftCataloging/index.js
  62. 1 1
      src/views/basicData/dataAircraftCataloging/index.vue
  63. 3 0
      src/views/basicData/dataEnvironment/src/regularitiesChoose.vue
  64. 4 0
      src/views/basicData/dataSailingMaterialPrice/index.js
  65. 2 1
      src/views/carrierStandard/carrierAllAudit/index.vue
  66. 1 1
      src/views/carrierStandard/carrierComputationalModel/index.vue
  67. 1 1
      src/views/carrierStandard/carrierListExecutionRegistration/components/look/index.js
  68. 1 1
      src/views/carrierStandard/carrierListExecutionRegistration/components/registering/index.js
  69. 10 10
      src/views/carrierStandard/carrierListMachineryPreparation/components/compile/index.vue
  70. 1 1
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.js
  71. 1 17
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/index.vue
  72. 13 2
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/outboundRecord.vue
  73. 12 2
      src/views/carrierStandard/carrierSailingMaterialConsumeRecord/warehousingRecord.vue
  74. 69 0
      src/views/carrierStandard/carrierSailingMaterialConsumeRegularities/components/importDialog/index.vue
  75. 54 18
      src/views/carrierStandard/carrierSailingMaterialConsumeRegularities/index.vue
  76. 17 1
      src/views/carrierStandard/carrierUseRegistration/components/sailingMaterial/index.vue
  77. 3 3
      src/views/carrierStandard/safeguardCost/index.js
  78. 10 18
      src/views/carrierStandard/safeguardCost/index.vue
  79. 11 7
      src/views/carrierStandard/safeguardCost/priceList.js
  80. 9 17
      src/views/carrierStandard/safeguardCost/priceList.vue
  81. 40 0
      src/views/home/index.scss
  82. 39 1
      src/views/home/index.vue
  83. 1 1
      src/views/login/index.vue
  84. 1 1
      src/views/statisticalAnalysis/statisticalAnalysisSailingMaterialSpareParts/index.vue
  85. 2 2
      src/views/system/dept/index.js
  86. 13 13
      src/views/system/dept/index.vue
  87. 1 1
      src/views/system/role/index.js
  88. 9 12
      src/views/system/role/index.vue
  89. 17 6
      src/views/system/systemBackup/index.vue
  90. 4 3
      src/views/system/systemDataDictionary/data.vue
  91. 14 5
      src/views/system/user/index.js
  92. 24 2
      src/views/system/user/index.vue
  93. 2 2
      src/views/task/carrierFlightMission/components/aircraft/index.vue
  94. 2 0
      src/views/task/carrierFlightMission/index.js
  95. 57 10
      src/views/task/carrierFlightMission/index.vue
  96. 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)
+}

+ 45 - 0
src/api/als/faultStatistics.js

@@ -0,0 +1,45 @@
+import { get, put, post, deletes } from '@/http/index'
+
+// 查询故障统计列表
+export const getFaultStatistics = async (data) => {
+  return await get('/als/faultStatistics/list', data)
+}
+
+// 查询故障统计列表
+export const getFaultStatisticsEcharts = async (data) => {
+  return await get('/als/faultStatistics/statistics', data)
+}
+
+// 新增故障统计
+export const addFaultStatistics = async (data) => {
+  return await post('/als/faultStatistics', data)
+}
+
+// 修改故障统计
+export const updateFaultStatistics = async (data) => {
+  return await put('/als/faultStatistics', data)
+}
+
+// 删除故障统计
+export const removeFaultStatistics = async (id) => {
+  return await deletes('/als/faultStatistics/' + id)
+}
+
+//  获取机种和机型树
+export const getAircaftTypeAndModelTree = async (data) => {
+  return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
+}
+
+//下载模板
+export const downLoadFaultStatistics = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + '/als/faultStatistics/importTemplate')
+}
+//导出
+export const exportFaultStatisticsExcel = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + '/als/faultStatistics/export', data)
+}
+
+// 查询故障统计列表
+export const getFaultStatisticsListAll = async (data) => {
+  return await get('/als/faultStatistics/listAll', data)
+}

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

@@ -1,6 +1,30 @@
-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 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)
 }

+ 26 - 0
src/api/als/judgeFaultLogic.js

@@ -0,0 +1,26 @@
+import { get, put, post, deletes } from '@/http/index'
+
+// 查询判故逻辑列表
+export const getJudgeFaultLogic = async (data) => {
+  return await get('/als/judgeFaultLogic/list', data)
+}
+
+// 新增判故逻辑
+export const addJudgeFaultLogic = async (data) => {
+  return await post('/als/judgeFaultLogic', data)
+}
+
+// 修改判故逻辑
+export const updateJudgeFaultLogic = async (data) => {
+  return await put('/als/judgeFaultLogic', data)
+}
+
+// 删除判故逻辑
+export const removeJudgeFaultLogic = async (id) => {
+  return await deletes('/als/judgeFaultLogic/' + id)
+}
+
+//  获取机种和机型树
+export const getAircaftTypeAndModelTree = async (data) => {
+  return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
+}

+ 35 - 0
src/api/als/lifetimeSpareParts.js

@@ -0,0 +1,35 @@
+import { get, put, post, deletes } from '@/http/index'
+
+// 查询有寿件列表
+export const getLifetimeSpareParts = async (data) => {
+  return await get('/als/lifetimeSpareParts/list', data)
+}
+
+// 新增有寿件
+export const addLifetimeSpareParts = async (data) => {
+  return await post('/als/lifetimeSpareParts', data)
+}
+
+// 修改有寿件
+export const updateLifetimeSpareParts = async (data) => {
+  return await put('/als/lifetimeSpareParts', data)
+}
+
+// 删除有寿件
+export const removeLifetimeSpareParts = async (id) => {
+  return await deletes('/als/lifetimeSpareParts/' + id)
+}
+
+//  获取机种和机型树
+export const getAircaftTypeAndModelTree = async (data) => {
+  return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
+}
+
+//下载模板
+export const downLoadLifetimeSpareParts = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + '/als/lifetimeSpareParts/importTemplate')
+}
+//导出
+export const exportLifetimeSparePartsExcel = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + '/als/lifetimeSpareParts/export', data)
+}

+ 9 - 0
src/api/als/smTask.js

@@ -29,3 +29,12 @@ export const removeSmTask = async (id) => {
 export const getAircaftTypeAndModelTree = async (data) => {
   return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
 }
+
+//下载模板
+export const downLoadSmTask = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + '/als/smTask/importTemplate')
+}
+//导出
+export const exportSmTask = async (data) => {
+  window.open(process.env.VUE_APP_BASE_API + '/als/smTask/export', 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

+ 33 - 69
src/layout/components/NavBar/menu.vue

@@ -1,62 +1,11 @@
 <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: {
@@ -64,30 +13,45 @@ export default {
       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))
     }
   },
-
-  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: {
     handleSelect(key) {
-      this.$router.push(key)
+      if (key === '/faultStatistics') {
+        // 数据在前 统计在后
+        this.$router.push(key)
+        this.$nextTick(() => {
+          // 设置一个1000毫秒后执行的定时器
+          setTimeout(() => {
+            this.$router.push('/faultStatisticsEcharts')
+            setTimeout(() => {
+              this.$router.push(key)
+            }, 500)
+          }, 500)
+        })
+      } else {
+        this.$router.push(key)
+      }
     }
   }
 }
 </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 })
       }

+ 67 - 0
src/router/modules/als/dataManage.js

@@ -200,3 +200,70 @@ export const airInstall = {
     }
   ]
 }
+
+export const judgeFaultLogic = {
+  path: '/basicData',
+  redirect: '/basicData/dataSpecies',
+  component: Layout,
+  name: 'JudgeFaultLogic',
+  meta: {
+    title: '基础数据',
+    icon: 'el-icon-s-platform'
+  },
+  children: [
+    {
+      path: '/basicData/judgeFaultLogic',
+      component: () => import('@/views/als/judgeFaultLogic/index.vue'),
+      meta: {
+        title: '判故逻辑管理'
+      },
+      sort: 13
+    }
+  ]
+}
+
+export const faultStatistics = {
+  path: '/faultStatistics',
+  name: 'FaultStatistics',
+  component: Layout,
+  meta: {
+    title: '故障数据',
+    icon: 'el-icon-s-platform'
+  },
+  children: [
+    {
+      path: '/faultStatistics',
+      component: () => import('@/views/als/faultStatistics/index.vue'),
+      meta: {
+        title: '故障数据'
+      }
+    }
+    // {
+    //   path: '/faultStatisticsEcharts',
+    //   component: () => import('@/views/als/faultStatistics/echarts.vue'),
+    //   meta: {
+    //     title: '故障统计'
+    //   }
+    // }
+  ]
+}
+
+export const faultStatisticsEcharts = {
+  path: '/faultStatisticsEcharts',
+  redirect: '/faultStatisticsEcharts',
+  name: 'FaultStatisticsEcharts',
+  component: Layout,
+  meta: {
+    title: '故障统计',
+    icon: 'el-icon-s-platform'
+  },
+  children: [
+    {
+      path: '/faultStatisticsEcharts',
+      component: () => import('@/views/als/faultStatistics/echarts.vue'),
+      meta: {
+        title: '故障统计'
+      }
+    }
+  ]
+}

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

@@ -63,12 +63,32 @@ export const lifePrediction = {
       path: '/qualityManage/lifePrediction',
       component: () => import('@/views/als/lifePrediction/index.vue'),
       meta: {
-        title: '寿命预测'
+        title: '退化评估'
       },
       sort: 3
     }
   ]
 }
+export const lifetimeSpareParts = {
+  path: '/qualityManage',
+  redirect: '/qualityManage/preProcessing',
+  name: 'LifetimeSpareParts',
+  component: Layout,
+  meta: {
+    title: '质量管理',
+    icon: 'el-icon-s-platform'
+  },
+  children: [
+    {
+      path: '/qualityManage/lifetimeSpareParts',
+      component: () => import('@/views/als/lifetimeSpareParts/index.vue'),
+      meta: {
+        title: '有寿件管理'
+      },
+      sort: 4
+    }
+  ]
+}
 export const faultDiagnosis = {
   path: '/qualityManage',
   redirect: '/qualityManage/preProcessing',

+ 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: '/qualityManage/falseAlarm',
+        component: () => import('@/views/als/falseAlarm/index.vue'),
+        meta: {
+          parent: 'FaultManage',
+          title: '虚警抑制'
+        }
+      },
+      {
+        name: 'FaultDiagnosis',
+        path: '/qualityManage/faultDiagnosis',
+        component: () => import('@/views/als/faultDiagnosis/index.vue'),
+        meta: {
+          parent: 'FaultManage',
+          title: '智能故障诊断'
+        }
+      }
+    ]
+  }
+]

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

@@ -0,0 +1,30 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * FalseAlarm               故障统计
+ */
+
+export default [
+  {
+    name: 'FaultStatistics',
+    path: '/als/',
+    redirect: '/als/falseAlarm',
+    component: Layout,
+    meta: {
+      title: '故障统计'
+    },
+    children: [
+      {
+        name: 'FaultStatistics',
+        path: '/als/falseAlarm',
+        component: () => import('@/views/als/falseAlarm/index.vue'),
+        meta: {
+          roleMenuHide: true,
+          parent: 'FaultStatistics',
+          title: '故障统计',
+          icon: 'el-icon-s-platform'
+        }
+      }
+    ]
+  }
+]

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

@@ -0,0 +1,39 @@
+import Layout from '@/layout/index.vue'
+/**
+ *
+ * FalseAlarm               有寿件管理
+ * FaultDiagnosis           退化分析
+ */
+
+export default [
+  {
+    name: 'LifeManage',
+    path: '/lifeManage',
+    redirect: '/lifeManage/',
+    component: Layout,
+    meta: {
+      title: '寿命预测',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      {
+        name: 'FalseAlarm',
+        path: '/qualityManage/falseAlarm',
+        component: () => import('@/views/als/falseAlarm/index.vue'),
+        meta: {
+          parent: 'LifeManage',
+          title: '有寿件管理'
+        }
+      },
+      {
+        name: 'FaultDiagnosis',
+        path: '/qualityManage/faultDiagnosis',
+        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'
+/**
+ *
+ * FalseAlarm               有寿件管理
+ * FaultDiagnosis           退化分析
+ */
+
+export default [
+  {
+    name: 'MaintenanceDecision',
+    path: '/maintenanceDecision',
+    redirect: '/maintenanceDecision/',
+    component: Layout,
+    meta: {
+      title: '维修决策',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      {
+        name: 'FalseAlarm',
+        path: '/qualityManage/falseAlarm',
+        component: () => import('@/views/als/falseAlarm/index.vue'),
+        meta: {
+          parent: 'MaintenanceDecision',
+          title: '故障字典'
+        }
+      },
+      {
+        name: 'IntelligentDecision',
+        path: '/qualityManage/maintenanceDecision',
+        component: () => import('@/views/als/maintenanceDecision/index.vue'),
+        meta: {
+          parent: 'MaintenanceDecision',
+          title: '智能辅助决策'
+        }
+      }
+    ]
+  }
+]

+ 341 - 92
src/router/modules/system.js

@@ -1,108 +1,357 @@
 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: '用户管理'
+export default [
+  {
+    name: 'System',
+    path: '/system',
+    redirect: '/system/',
+    component: Layout,
+    meta: {
+      title: '系统管理',
+      icon: 'el-icon-s-platform'
+    },
+    children: [
+      /**
+       * ----------------------------模型管理-----------------------------
+       */
+      {
+        name: 'ModelManage',
+        path: '/modelManage',
+        meta: {
+          parent: 'System',
+          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: '部门管理'
+      {
+        name: 'AgloManage',
+        path: '/agloManage',
+        component: () => import('@/views/als/model/index.vue'),
+        meta: {
+          parent: 'ModelManage',
+          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: '日志信息'
+      {
+        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: 'MDCData',
+        path: '/dataManage/MDCData',
+        component: () => import('@/views/als/MDCData/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: '字典数据'
+        }
       },
-      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: '数据字典'
+      /**
+       * ----------------------------系统设置-----------------------------
+       */
+      {
+        name: 'SystemConfig',
+        path: '/systemConfig',
+        meta: {
+          parent: 'System',
+          title: '系统设置'
+        }
       },
-      sort: 4
-    },
-    {
-      path: '/system/systemDataDictionary/:dictId',
-      component: () => import('@/views/system/systemDataDictionary/data.vue'),
-      meta: {
-        title: '字典数据',
-        hide: true
+      {
+        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: '系统备份'
+        }
       }
     }
   ]
-}
+
 
 export const systemRole = {
   path: '/system',

+ 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) {

+ 211 - 489
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: {},
+  name: 'DataImport',
+  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>

+ 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(() => {})
     }
   }
 }

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

@@ -0,0 +1,418 @@
+<template>
+  <div class="view-carrierFlightMission">
+    <div class="view-carrierFlightMission-FlightMission-btn">
+      <div class="view-carrierFlightMission-FlightMission-btn-right">
+        <div class="input-with-select">
+          <span>日期</span>
+          <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="statisticsDate" placeholder="选择日期"> </el-date-picker>
+        </div>
+        <div class="input-with-select">
+          <span>地区</span>
+          <el-select v-model="select.groups" placeholder="请选择">
+            <el-option v-for="item in groupsList" :key="item.groups" :label="item.groups" :value="item.groups"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>专业</span>
+          <el-select v-model="select.major" placeholder="请选择">
+            <el-option v-for="item in majorList" :key="item.major" :label="item.major" :value="item.major"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>机型</span>
+          <el-select v-model="select.aircraftModel" placeholder="请选择" @change="getFaultStatisticsListAll({ distinctField: 'aircraft_num' })">
+            <el-option v-for="item in aircraftModelList" :key="item.aircraftModel" :label="item.aircraftModel" :value="item.aircraftModel"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>机号</span>
+          <el-select v-model="select.aircraftNum" placeholder="请选择">
+            <el-option v-for="item in aircraftNumList" :key="item.aircraftNum" :label="item.aircraftNum" :value="item.aircraftNum"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>部件</span>
+          <el-select v-model="select.faultyPartsName" placeholder="请选择">
+            <el-option v-for="item in faultyPartsNameList" :key="item.faultyPartsName" :label="item.faultyPartsName" :value="item.faultyPartsName"> </el-option>
+          </el-select>
+        </div>
+        <el-button @click="searchClick" style="border-color: rgb(13, 128, 164); background-color: rgb(13, 128, 164); color: #fff">查询</el-button>
+      </div>
+    </div>
+    <div class="view-dataType-table">
+      <el-row>
+        <el-col :span="12">
+          <Card title="故障件数量统计图">
+            <template slot="content">
+              <div class="baseBar-box" ref="echartLeft"></div>
+            </template>
+          </Card>
+        </el-col>
+        <el-col :span="12">
+          <Card title="故障件数量统计图">
+            <template slot="content">
+              <div class="baseBar-box" ref="echartRight"></div>
+            </template>
+          </Card>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getFaultStatisticsListAll, getAircaftTypeAndModelTree, removeFaultStatistics, getFaultStatisticsEcharts } from '@/api/als/faultStatistics'
+import { debounce } from '@/utils/index'
+import * as echarts from 'echarts'
+export default {
+  name: 'FaultStatistics',
+  data() {
+    // 这里存放数据
+    return {
+      keyWord: '',
+      aircaftModelIdList: [],
+      currentNodeKey: null,
+      currentNode: null,
+      menuTreeData: [],
+      treeObj: {
+        title: '所属机种',
+        activityheight: '275px',
+        searchIcon: false,
+        configure: {
+          children: 'children',
+          label: 'label'
+        }
+      },
+      groupsList: [],
+      majorList: [],
+      aircraftModelList: [],
+      aircraftNumList: [],
+      faultyPartsNameList: [],
+      statisticsDate: [],
+      select: {
+        startStatisticsDate: '',
+        endStatisticsDate: '',
+        major: '特设',
+        aircraftModel: 'J-11'
+      },
+      typeTree: {
+        children: 'children',
+        label: 'label'
+      },
+      searchValue: '',
+      options: {
+        stripe: true, // 斑马纹
+        mutiSelect: true, // 多选框
+        index: false, // 显示序号, 多选则 mutiSelect
+        loading: false, // 表格动画
+        initTable: false, // 是否一挂载就加载数据
+        border: true,
+        height: 'calc(100vh - 300px)'
+      },
+      tableCheckItems: [],
+      form: {
+        id: '',
+        statisticsDate: '',
+        warZone: '',
+        army: '',
+        division: '',
+        groups: '',
+        squadron: '',
+        aircraftNum: '',
+        aircraftModel: '',
+        factoryNum: '',
+        machineType: '',
+        machineNum: '',
+        machineModel: '',
+        machineName: '',
+        landingGear: '',
+        major: '',
+        faultyPartsName: '',
+        faultyPartsModel: '',
+        faultyPartsNum: '',
+        engineModel: '',
+        engineNum: '',
+        engineSerialNum: '',
+        faultyPartsPosition: '',
+        faultyPhenomenon: '',
+        faultyPlace: '',
+        findOpportunity: '',
+        systems: '',
+        timingType: '',
+        faultyPartsManufacturer: '',
+        faultyPartsRenovate: '',
+        installationTime: '',
+        totalWorkTime: '',
+        repairTime: '',
+        replacementPartsModel: '',
+        replacementPartsNum: '',
+        replacementPartsManufacturer: '',
+        replacementTotalWorkTime: '',
+        replacementPartsRenovate: '',
+        replacementRepairTime: '',
+        faultyAbnormalCode: '',
+        faultyPartsInstallDate: '',
+        faultyReason: '',
+        faultyNature: '',
+        faultyResponsibility: '',
+        faultyConsequence: '',
+        handlingSuggestions: '',
+        influenceFrequency: '',
+        errorFlyFrequency: '',
+        identificationMethod: '',
+        discoveredPeople: '',
+        exclusionMethod: '',
+        exclusionPeople: '',
+        examinePeople: '',
+        examineTime: '',
+        exclusionDate: '',
+        exclusionWorkTime: '',
+        exclusionPeopleNum: '',
+        exclusionTime: '',
+        isAchievement: '',
+        needTestFly: '',
+        repairStatus: '',
+        remarks: '',
+        tenantId: '',
+        delFlag: '',
+        version: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      },
+      debounceFn: debounce(this.fetch, 500)
+    }
+  },
+  watch: {
+    keyWord() {
+      this.debounceFn()
+    }
+  },
+  mounted() {
+    this.getFaultStatisticsAPI()
+    // this.getAircaftTypeAndModelTreeAPI()
+  },
+  methods: {
+    async getFaultStatisticsListAll(params) {
+      if (params.distinctField == 'aircraft_num') {
+        params.aircraftModel = this.select.aircraftModel
+      }
+      const { data } = await getFaultStatisticsListAll({ ...params })
+      if (params.distinctField == 'groups') {
+        this.groupsList = data
+      } else if (params.distinctField == 'major') {
+        this.majorList = data
+      } else if (params.distinctField == 'aircraft_model') {
+        this.aircraftModelList = data
+      } else if (params.distinctField == 'aircraft_num') {
+        this.aircraftNumList = data
+      } else if (params.distinctField == 'faulty_parts_name') {
+        this.faultyPartsNameList = data
+      }
+    },
+
+    async getAircaftTypeAndModelTreeAPI(params) {
+      const { data } = await getAircaftTypeAndModelTree(params)
+      this.menuTreeData = data
+      if (data.length) {
+        this.currentNodeKey = data[0].value
+        this.currentNode = data[0]
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children).map((e) => e.id)
+        this.getFaultStatisticsAPI({ aircaftModelIdList: this.aircaftModelIdList })
+      }
+    },
+    getTreeLeafData(list) {
+      const newArr = []
+      function getLeaf(data, arr) {
+        data.forEach((e) => {
+          if (e.type === 1) {
+            arr.push(e)
+          }
+          if (e.children.length) {
+            getLeaf(e.children, arr)
+          }
+        })
+      }
+      getLeaf(list, newArr)
+      return newArr
+    },
+    echartsLeft(names, values) {
+      const echartLeft = echarts.init(this.$refs.echartLeft)
+      const option = {
+        tooltip: {
+          trigger: 'item'
+        },
+        xAxis: {
+          axisLabel: {
+            color: '#fff'
+          },
+          type: 'category',
+          data: names
+        },
+        yAxis: {
+          type: 'value',
+          axisLabel: {
+            color: '#fff'
+          }
+        },
+        series: [
+          {
+            data: values,
+            type: 'bar'
+          }
+        ]
+      }
+      echartLeft.setOption(option)
+    },
+    echartsRight(values) {
+      const echartRight = echarts.init(this.$refs.echartRight)
+      const option = {
+        tooltip: {
+          trigger: 'item'
+        },
+        legend: {
+          orient: 'vertical',
+          left: 'left',
+          textStyle: {
+            color: '#fff'
+          }
+        },
+        series: [
+          {
+            name: 'Access From',
+            type: 'pie',
+            radius: '50%',
+            label: {
+              color: '#fff'
+            },
+            data: values,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
+              }
+            }
+          }
+        ]
+      }
+      echartRight.setOption(option)
+    },
+    async getFaultStatisticsAPI(params) {
+      const { keyWord } = this
+      const res = await getFaultStatisticsEcharts({ keyWord, ...params })
+      this.getFaultStatisticsListAll({ distinctField: 'groups' })
+      this.getFaultStatisticsListAll({ distinctField: 'major' })
+      this.getFaultStatisticsListAll({ distinctField: 'aircraft_model' })
+      this.getFaultStatisticsListAll({ distinctField: 'aircraft_num' })
+      this.getFaultStatisticsListAll({ distinctField: 'faulty_parts_name' })
+      const names = []
+      const values = []
+      const data = []
+      res.data.forEach((e) => {
+        names.push(e.faultyPartsName)
+        values.push(e.nameCount)
+        data.push({
+          name: e.faultyPartsName,
+          value: e.nameCount
+        })
+      })
+      this.echartsLeft(names, values)
+      this.echartsRight(data)
+    },
+
+    fetch() {
+      this.getFaultStatisticsAPI()
+    },
+
+    searchClick() {
+      console.log(this.statisticsDate)
+      if (this.statisticsDate != null) {
+        this.select.startStatisticsDate = this.statisticsDate[0]
+        this.select.endStatisticsDate = this.statisticsDate[1]
+      }
+      this.getFaultStatisticsAPI(this.select)
+    },
+
+    handleClose() {
+      this.dialogVisible = false
+      this.form = {
+        id: '',
+        statisticsDate: '',
+        warZone: '',
+        army: '',
+        division: '',
+        groups: '',
+        squadron: '',
+        aircraftNum: '',
+        aircraftModel: '',
+        factoryNum: '',
+        machineType: '',
+        machineNum: '',
+        machineModel: '',
+        machineName: '',
+        landingGear: '',
+        major: '',
+        faultyPartsName: '',
+        faultyPartsModel: '',
+        faultyPartsNum: '',
+        engineModel: '',
+        engineNum: '',
+        engineSerialNum: '',
+        faultyPartsPosition: '',
+        faultyPhenomenon: '',
+        faultyPlace: '',
+        findOpportunity: '',
+        systems: '',
+        timingType: '',
+        faultyPartsManufacturer: '',
+        faultyPartsRenovate: '',
+        installationTime: '',
+        totalWorkTime: '',
+        repairTime: '',
+        replacementPartsModel: '',
+        replacementPartsNum: '',
+        replacementPartsManufacturer: '',
+        replacementTotalWorkTime: '',
+        replacementPartsRenovate: '',
+        replacementRepairTime: '',
+        faultyAbnormalCode: '',
+        faultyPartsInstallDate: '',
+        faultyReason: '',
+        faultyNature: '',
+        faultyResponsibility: '',
+        faultyConsequence: '',
+        handlingSuggestions: '',
+        influenceFrequency: '',
+        errorFlyFrequency: '',
+        identificationMethod: '',
+        discoveredPeople: '',
+        exclusionMethod: '',
+        exclusionPeople: '',
+        examinePeople: '',
+        examineTime: '',
+        exclusionDate: '',
+        exclusionWorkTime: '',
+        exclusionPeopleNum: '',
+        exclusionTime: '',
+        isAchievement: '',
+        needTestFly: '',
+        repairStatus: '',
+        remarks: '',
+        tenantId: '',
+        delFlag: '',
+        version: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+@import '../index.scss';
+</style>

+ 69 - 0
src/views/als/faultStatistics/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: '导入故障统计信息',
+      dialogVisible: false,
+      fileApi: process.env.VUE_APP_BASE_API + '/als/faultStatistics/importData',
+      fileList: [],
+      fileData: {
+        userName: ''
+      }
+    }
+  },
+  methods: {
+    triggerDialog() {
+      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>

+ 1059 - 0
src/views/als/faultStatistics/index.vue

@@ -0,0 +1,1059 @@
+<template>
+  <div class="view-carrierFlightMission">
+    <div class="view-carrierFlightMission-FlightMission-btn">
+      <div class="view-carrierFlightMission-FlightMission-btn-box" style="width: 24%">
+        <el-button type="success" @click="openDialog()" :disabled="currentNode && currentNode.type == 0">新增</el-button>
+        <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
+        <el-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="view-carrierFlightMission-FlightMission-btn-right">
+        <div class="input-with-select">
+          <span>日期</span>
+          <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="statisticsDate" placeholder="选择日期"> </el-date-picker>
+        </div>
+        <div class="input-with-select">
+          <span>地区</span>
+          <el-select v-model="select.groups" placeholder="请选择">
+            <el-option v-for="item in groupsList" :key="item.groups" :label="item.groups" :value="item.groups"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>专业</span>
+          <el-select v-model="select.major" placeholder="请选择">
+            <el-option v-for="item in majorList" :key="item.major" :label="item.major" :value="item.major"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>机型</span>
+          <el-select v-model="select.aircraftModel" placeholder="请选择" @change="getFaultStatisticsListAll({ distinctField: 'aircraft_num' })">
+            <el-option v-for="item in aircraftModelList" :key="item.aircraftModel" :label="item.aircraftModel" :value="item.aircraftModel"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>机号</span>
+          <el-select v-model="select.aircraftNum" placeholder="请选择">
+            <el-option v-for="item in aircraftNumList" :key="item.aircraftNum" :label="item.aircraftNum" :value="item.aircraftNum"> </el-option>
+          </el-select>
+        </div>
+        <div class="input-with-select">
+          <span>部件</span>
+          <el-select v-model="select.faultyPartsName" placeholder="请选择">
+            <el-option v-for="item in faultyPartsNameList" :key="item.faultyPartsName" :label="item.faultyPartsName" :value="item.faultyPartsName"> </el-option>
+          </el-select>
+        </div>
+        <el-button @click="searchClick" style="border-color: rgb(13, 128, 164); background-color: rgb(13, 128, 164); color: #fff">查询</el-button>
+        <!-- <el-input placeholder="请输入关键字" v-model="keyWord" class="input1">
+          <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
+        </el-input> -->
+      </div>
+    </div>
+    <div class="view-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="1200px" :before-close="handleClose">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-row>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="日期" prop="statisticsDate">
+              <el-date-picker clearable v-model="form.statisticsDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="战区" prop="warZone">
+              <el-input v-model="form.warZone" placeholder="请输入战区" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="军" prop="army">
+              <el-input v-model="form.army" placeholder="请输入军" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="师" prop="division">
+              <el-input v-model="form.division" placeholder="请输入师" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="团" prop="groups">
+              <el-input v-model="form.groups" placeholder="请输入团" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="中队" prop="squadron">
+              <el-input v-model="form.squadron" placeholder="请输入中队" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="飞机号" prop="aircraftNum">
+              <el-input v-model="form.aircraftNum" placeholder="请输入飞机号" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="机型" prop="aircraftModel">
+              <el-input v-model="form.aircraftModel" placeholder="请输入机型" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="出厂号码" prop="factoryNum">
+              <el-input v-model="form.factoryNum" placeholder="请输入出厂号码" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="机件号" prop="machineNum">
+              <el-input v-model="form.machineNum" placeholder="请输入机件号" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="机件型别" prop="machineModel">
+              <el-input v-model="form.machineModel" placeholder="请输入机件型别" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="机件名称" prop="machineName">
+              <el-input v-model="form.machineName" placeholder="请输入机件名称" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="起落" prop="landingGear">
+              <el-input v-model="form.landingGear" placeholder="请输入起落" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="专业" prop="major">
+              <el-input v-model="form.major" placeholder="请输入专业" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件名称" prop="faultyPartsName">
+              <el-input v-model="form.faultyPartsName" placeholder="请输入故障件名称" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件型别" prop="faultyPartsModel">
+              <el-input v-model="form.faultyPartsModel" placeholder="请输入故障件型别" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件号码" prop="faultyPartsNum">
+              <el-input v-model="form.faultyPartsNum" placeholder="请输入故障件号码" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件所属发动机型别" prop="engineModel">
+              <el-input v-model="form.engineModel" placeholder="请输入故障件所属发动机型别" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件所属发动机号码" prop="engineNum">
+              <el-input v-model="form.engineNum" placeholder="请输入故障件所属发动机号码" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件所属发动机号码" prop="engineSerialNum">
+              <el-input v-model="form.engineSerialNum" placeholder="请输入故障件所属发动机号码" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件位置" prop="faultyPartsPosition">
+              <el-input v-model="form.faultyPartsPosition" placeholder="请输入故障件位置" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障现象" prop="faultyPhenomenon">
+              <el-input v-model="form.faultyPhenomenon" placeholder="请输入故障现象" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障发生地点" prop="faultyPlace">
+              <el-input v-model="form.faultyPlace" placeholder="请输入故障发生地点" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="发现时机" prop="findOpportunity">
+              <el-input v-model="form.findOpportunity" placeholder="请输入发现时机" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="系统" prop="systems">
+              <el-input v-model="form.systems" placeholder="请输入系统" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件制造厂" prop="faultyPartsManufacturer">
+              <el-input v-model="form.faultyPartsManufacturer" placeholder="请输入故障件制造厂" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件翻修厂" prop="faultyPartsRenovate">
+              <el-input v-model="form.faultyPartsRenovate" placeholder="请输入故障件翻修厂" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件装本机工作时次" prop="installationTime">
+              <el-input v-model="form.installationTime" placeholder="请输入故障件装本机工作时次" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件总工作时次" prop="totalWorkTime">
+              <el-input v-model="form.totalWorkTime" placeholder="请输入故障件总工作时次" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件修后时次" prop="repairTime">
+              <el-input v-model="form.repairTime" placeholder="请输入故障件修后时次" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故换件型别" prop="replacementPartsModel">
+              <el-input v-model="form.replacementPartsModel" placeholder="请输入故换件型别" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故换件号码" prop="replacementPartsNum">
+              <el-input v-model="form.replacementPartsNum" placeholder="请输入故换件号码" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故换件制造厂" prop="replacementPartsManufacturer">
+              <el-input v-model="form.replacementPartsManufacturer" placeholder="请输入故换件制造厂" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故换件总工作时次" prop="replacementTotalWorkTime">
+              <el-input v-model="form.replacementTotalWorkTime" placeholder="请输入故换件总工作时次" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故换件翻修厂" prop="replacementPartsRenovate">
+              <el-input v-model="form.replacementPartsRenovate" placeholder="请输入故换件翻修厂" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故换件修后时次" prop="replacementRepairTime">
+              <el-input v-model="form.replacementRepairTime" placeholder="请输入故换件修后时次" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障失常码" prop="faultyAbnormalCode">
+              <el-input v-model="form.faultyAbnormalCode" placeholder="请输入故障失常码" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障件装机日期" prop="faultyPartsInstallDate">
+              <el-date-picker clearable v-model="form.faultyPartsInstallDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择故障件装机日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障原因" prop="faultyReason">
+              <el-input v-model="form.faultyReason" placeholder="请输入故障原因" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障性质" prop="faultyNature">
+              <el-input v-model="form.faultyNature" placeholder="请输入故障性质" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障责任" prop="faultyResponsibility">
+              <el-input v-model="form.faultyResponsibility" placeholder="请输入故障责任" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="故障后果" prop="faultyConsequence">
+              <el-input v-model="form.faultyConsequence" placeholder="请输入故障后果" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="处理意见" prop="handlingSuggestions">
+              <el-input v-model="form.handlingSuggestions" placeholder="请输入处理意见" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="影响次数" prop="influenceFrequency">
+              <el-input v-model="form.influenceFrequency" placeholder="请输入影响次数" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="误飞次数" prop="errorFlyFrequency">
+              <el-input v-model="form.errorFlyFrequency" placeholder="请输入误飞次数" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="判明方法" prop="identificationMethod">
+              <el-input v-model="form.identificationMethod" placeholder="请输入判明方法" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="发现人" prop="discoveredPeople">
+              <el-input v-model="form.discoveredPeople" placeholder="请输入发现人" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="排除方法" prop="exclusionMethod">
+              <el-input v-model="form.exclusionMethod" placeholder="请输入排除方法" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="排故人" prop="exclusionPeople">
+              <el-input v-model="form.exclusionPeople" placeholder="请输入排故人" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="审核人" prop="examinePeople">
+              <el-input v-model="form.examinePeople" placeholder="请输入审核人" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="审核时间" prop="examineTime">
+              <el-date-picker clearable v-model="form.examineTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择审核时间"></el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="排除日期" prop="exclusionDate">
+              <el-date-picker clearable v-model="form.exclusionDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择排除日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="排故工时" prop="exclusionWorkTime">
+              <el-input v-model="form.exclusionWorkTime" placeholder="请输入排故工时" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="排故人数" prop="exclusionPeopleNum">
+              <el-input v-model="form.exclusionPeopleNum" placeholder="请输入排故人数" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="排故时间" prop="exclusionTime">
+              <el-input v-model="form.exclusionTime" placeholder="请输入排故时间" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="是否立功" prop="isAchievement">
+              <el-input v-model="form.isAchievement" placeholder="请输入是否立功" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="需要试飞" prop="needTestFly">
+              <el-input v-model="form.needTestFly" placeholder="请输入需要试飞" />
+            </el-form-item>
+          </el-col>
+          <el-col v-bind="{ span: 12 }">
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="form.remarks" 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>
+    <!-- 导入 -->
+    <ImportDialog ref="ImportDialog" @submitCallBack="ImportDialogCallBack" />
+  </div>
+</template>
+
+<script>
+import { getFaultStatistics, getFaultStatisticsListAll, getAircaftTypeAndModelTree, addFaultStatistics, updateFaultStatistics, removeFaultStatistics, downLoadFaultStatistics, exportFaultStatisticsExcel } from '@/api/als/faultStatistics'
+import { deepClone, debounce } from '@/utils/index'
+import ImportDialog from './importDialog/index.vue'
+export default {
+  name: 'FaultStatistics',
+  components: { ImportDialog },
+  data() {
+    // 这里存放数据
+    return {
+      dialogTitle: '新增',
+      dialogVisible: false,
+      keyWord: '',
+      aircaftModelIdList: [],
+      currentNodeKey: null,
+      currentNode: null,
+      menuTreeData: [],
+      treeObj: {
+        title: '所属机种',
+        activityheight: '275px',
+        searchIcon: false,
+        configure: {
+          children: 'children',
+          label: 'label'
+        }
+      },
+      groupsList: [],
+      majorList: [],
+      aircraftModelList: [],
+      aircraftNumList: [],
+      faultyPartsNameList: [],
+      statisticsDate: [],
+      select: {
+        startStatisticsDate: '',
+        endStatisticsDate: '',
+        major: '特设',
+        aircraftModel: 'J-11'
+      },
+      typeTree: {
+        children: 'children',
+        label: 'label'
+      },
+      searchValue: '',
+      columns: [
+        { prop: 'id', label: '编号' },
+        {
+          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: '需要试飞'
+        },
+        {
+          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: '',
+        statisticsDate: '',
+        warZone: '',
+        army: '',
+        division: '',
+        groups: '',
+        squadron: '',
+        aircraftNum: '',
+        aircraftModel: '',
+        factoryNum: '',
+        machineType: '',
+        machineNum: '',
+        machineModel: '',
+        machineName: '',
+        landingGear: '',
+        major: '',
+        faultyPartsName: '',
+        faultyPartsModel: '',
+        faultyPartsNum: '',
+        engineModel: '',
+        engineNum: '',
+        engineSerialNum: '',
+        faultyPartsPosition: '',
+        faultyPhenomenon: '',
+        faultyPlace: '',
+        findOpportunity: '',
+        systems: '',
+        timingType: '',
+        faultyPartsManufacturer: '',
+        faultyPartsRenovate: '',
+        installationTime: '',
+        totalWorkTime: '',
+        repairTime: '',
+        replacementPartsModel: '',
+        replacementPartsNum: '',
+        replacementPartsManufacturer: '',
+        replacementTotalWorkTime: '',
+        replacementPartsRenovate: '',
+        replacementRepairTime: '',
+        faultyAbnormalCode: '',
+        faultyPartsInstallDate: '',
+        faultyReason: '',
+        faultyNature: '',
+        faultyResponsibility: '',
+        faultyConsequence: '',
+        handlingSuggestions: '',
+        influenceFrequency: '',
+        errorFlyFrequency: '',
+        identificationMethod: '',
+        discoveredPeople: '',
+        exclusionMethod: '',
+        exclusionPeople: '',
+        examinePeople: '',
+        examineTime: '',
+        exclusionDate: '',
+        exclusionWorkTime: '',
+        exclusionPeopleNum: '',
+        exclusionTime: '',
+        isAchievement: '',
+        needTestFly: '',
+        repairStatus: '',
+        remarks: '',
+        tenantId: '',
+        delFlag: '',
+        version: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      },
+      rules: {
+        statisticsDate: [{ required: true, message: '日期不能为空', trigger: 'blur' }],
+        installationTime: [{ required: true, message: '故障件装本机工作时次不能为空', trigger: 'blur' }],
+        totalWorkTime: [{ required: true, message: '故障件总工作时次不能为空', trigger: 'blur' }]
+      },
+      debounceFn: debounce(this.fetch, 500)
+    }
+  },
+  watch: {
+    keyWord() {
+      this.tableRequset.pageIndex = 1
+      this.debounceFn()
+    }
+  },
+  mounted() {
+    this.getFaultStatisticsAPI()
+    // this.getAircaftTypeAndModelTreeAPI()
+  },
+  methods: {
+    async getFaultStatisticsListAll(params) {
+      if (params.distinctField == 'aircraft_num') {
+        params.aircraftModel = this.select.aircraftModel
+      }
+      const { data } = await getFaultStatisticsListAll({ ...params })
+      if (params.distinctField == 'groups') {
+        this.groupsList = data
+      } else if (params.distinctField == 'major') {
+        this.majorList = data
+      } else if (params.distinctField == 'aircraft_model') {
+        this.aircraftModelList = data
+      } else if (params.distinctField == 'aircraft_num') {
+        this.aircraftNumList = data
+      } else if (params.distinctField == 'faulty_parts_name') {
+        this.faultyPartsNameList = data
+      }
+    },
+
+    async getAircaftTypeAndModelTreeAPI(params) {
+      const { data } = await getAircaftTypeAndModelTree(params)
+      this.menuTreeData = data
+      if (data.length) {
+        this.currentNodeKey = data[0].value
+        this.currentNode = data[0]
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children).map((e) => e.id)
+        this.getFaultStatisticsAPI({ aircaftModelIdList: this.aircaftModelIdList })
+      }
+    },
+
+    async removeFaultStatisticsAPI(params) {
+      try {
+        const { code } = await removeFaultStatistics(params)
+        if (code === 200) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          await this.getFaultStatisticsAPI()
+          this.handleClose()
+        }
+      } catch (error) {}
+    },
+
+    getTreeLeafData(list) {
+      const newArr = []
+      function getLeaf(data, arr) {
+        data.forEach((e) => {
+          if (e.type === 1) {
+            arr.push(e)
+          }
+          if (e.children.length) {
+            getLeaf(e.children, arr)
+          }
+        })
+      }
+      getLeaf(list, newArr)
+      return newArr
+    },
+
+    async getFaultStatisticsAPI(params) {
+      if (this.$refs.table) this.$refs.table.clearSelection()
+      const { keyWord } = this
+      const { pageSize, pageIndex } = this.tableRequset
+      const {
+        data: { list, total }
+      } = await getFaultStatistics({ pageSize, pageNum: pageIndex, keyWord, ...params })
+      this.tableData = list
+      this.tableRequset.total = total
+      this.getFaultStatisticsListAll({ distinctField: 'groups' })
+      this.getFaultStatisticsListAll({ distinctField: 'major' })
+      this.getFaultStatisticsListAll({ distinctField: 'aircraft_model' })
+      this.getFaultStatisticsListAll({ distinctField: 'aircraft_num' })
+      this.getFaultStatisticsListAll({ distinctField: 'faulty_parts_name' })
+    },
+
+    fetch() {
+      this.getFaultStatisticsAPI()
+    },
+
+    searchClick() {
+      console.log(this.statisticsDate)
+      if (this.statisticsDate != null) {
+        this.select.startStatisticsDate = this.statisticsDate[0]
+        this.select.endStatisticsDate = this.statisticsDate[1]
+      }
+      this.getFaultStatisticsAPI(this.select)
+    },
+
+    async addFaultStatisticsAPI() {
+      this.$refs['form'].validate(async (valid) => {
+        if (valid) {
+          try {
+            delete this.form.aircaftModelName
+            const { code } = await addFaultStatistics({ ...this.form })
+            if (code === 200) {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              })
+              this.getFaultStatisticsAPI()
+              this.handleClose()
+            }
+          } catch (error) {}
+        }
+      })
+    },
+
+    async updateFaultStatisticsAPI() {
+      this.$refs['form'].validate(async (valid) => {
+        if (valid) {
+          try {
+            const { code } = await updateFaultStatistics({ ...this.form })
+            if (code === 200) {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              })
+              this.getFaultStatisticsAPI()
+              this.handleClose()
+            }
+          } 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.getFaultStatisticsAPI()
+    },
+
+    openDialog() {
+      this.dialogTitle = '新增'
+      this.dialogVisible = true
+      this.form.aircaftModelName = this.currentNode.label
+      this.form.aircaftModelId = this.currentNode.id
+    },
+
+    handleClose() {
+      this.dialogVisible = false
+      this.form = {
+        id: '',
+        statisticsDate: '',
+        warZone: '',
+        army: '',
+        division: '',
+        groups: '',
+        squadron: '',
+        aircraftNum: '',
+        aircraftModel: '',
+        factoryNum: '',
+        machineType: '',
+        machineNum: '',
+        machineModel: '',
+        machineName: '',
+        landingGear: '',
+        major: '',
+        faultyPartsName: '',
+        faultyPartsModel: '',
+        faultyPartsNum: '',
+        engineModel: '',
+        engineNum: '',
+        engineSerialNum: '',
+        faultyPartsPosition: '',
+        faultyPhenomenon: '',
+        faultyPlace: '',
+        findOpportunity: '',
+        systems: '',
+        timingType: '',
+        faultyPartsManufacturer: '',
+        faultyPartsRenovate: '',
+        installationTime: '',
+        totalWorkTime: '',
+        repairTime: '',
+        replacementPartsModel: '',
+        replacementPartsNum: '',
+        replacementPartsManufacturer: '',
+        replacementTotalWorkTime: '',
+        replacementPartsRenovate: '',
+        replacementRepairTime: '',
+        faultyAbnormalCode: '',
+        faultyPartsInstallDate: '',
+        faultyReason: '',
+        faultyNature: '',
+        faultyResponsibility: '',
+        faultyConsequence: '',
+        handlingSuggestions: '',
+        influenceFrequency: '',
+        errorFlyFrequency: '',
+        identificationMethod: '',
+        discoveredPeople: '',
+        exclusionMethod: '',
+        exclusionPeople: '',
+        examinePeople: '',
+        examineTime: '',
+        exclusionDate: '',
+        exclusionWorkTime: '',
+        exclusionPeopleNum: '',
+        exclusionTime: '',
+        isAchievement: '',
+        needTestFly: '',
+        repairStatus: '',
+        remarks: '',
+        tenantId: '',
+        delFlag: '',
+        version: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      }
+    },
+
+    handUpdate(row) {
+      this.dialogTitle = '编辑'
+      this.form = deepClone(row)
+      this.dialogVisible = true
+    },
+
+    submit() {
+      switch (this.dialogTitle) {
+        case '编辑':
+          this.updateFaultStatisticsAPI()
+          // this.handleClose()
+          break
+        case '新增':
+          this.addFaultStatisticsAPI()
+          // this.handleClose()
+          break
+      }
+    },
+
+    selection(val) {
+      this.tableCheckItems = val
+    },
+
+    remove(row) {
+      this.$confirm('是否删除该机种', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.removeFaultStatisticsAPI(row.map((e) => e.id))
+        })
+        .catch(() => {})
+    },
+    //更多按钮
+    handleExport(type) {
+      this[type]()
+    },
+    //导入
+    importOperation() {
+      this.$refs.ImportDialog.triggerDialog()
+    },
+    //导入回写
+    ImportDialogCallBack() {
+      this.getFaultStatisticsAPI()
+    },
+    //导出全部
+    async allExport() {
+      // const params = {
+      //   queryParam: this.searchValue
+      // }
+      await exportFaultStatisticsExcel({})
+    },
+    //下载模板
+    async downloadTemplate() {
+      await downLoadFaultStatistics()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+@import '../index.scss';
+</style>

+ 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 })
     },
     // 提交上传文件

+ 26 - 0
src/views/als/index.scss

@@ -25,3 +25,29 @@
 ::-webkit-scrollbar{
   display: none;
 }
+.view-carrierFlightMission-FlightMission-btn {
+  display: flex;
+  justify-content: space-between;
+}
+.view-carrierFlightMission-FlightMission-btn-right {
+  display: flex;
+  .input-with-select {
+    display: flex;
+    margin-right: 20px;
+    > span {
+      color: #fff;
+      display: block;
+      margin-right: 10px;
+      width: 60px;
+      line-height: 30px;
+    }
+  }
+}
+
+.c-card-content-echars {
+  height: calc(100vh - 142px - 90px - 20px);
+  .baseBar-box {
+    width: 100%;
+    height: 100%;
+  }
+}

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

@@ -5,20 +5,54 @@
   
 }
 
-.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{
+        float: right;
+        height: 40px;
+        line-height: 40px;
+      }
+      .historyMore:hover{
+        cursor: pointer;
+      }
+    }
+
+  }
+  
 }
 
 .chat{
   flex: 1;
   width: 100%;
-  max-width: 1400px;
+  // max-width: 1400px;
   margin: 0 auto;
   overflow-y: auto;
   display: flex;
@@ -45,9 +79,8 @@
       width: 100%;
       max-width: 1200px;
       margin: 0 auto;
-      
-      // overflow-y: auto;
     }
+    
     .chatRow {
       margin: 20px 10px;
       display: flex;
@@ -66,15 +99,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 +161,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;

+ 175 - 55
src/views/als/intelligentQA/index.vue

@@ -1,21 +1,30 @@
 <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-more historyMore" @click="historyDetail(item.id)"></i>
+        </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.answer" 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 +35,81 @@
         </div>
       </div>
     </div>
+    <div class="statistics">
+      <div class="statisticsTitle">统计列表</div>
+    </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, getQAHistoryDetail } 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: {}
     }
   },
   mounted() {
+    this.getHistory()
     this.adjustHeight()
   },
   watch: {},
@@ -69,9 +131,19 @@ export default {
         }
       })
     },
+
+    async getHistory() {
+      try {
+        const {
+          data: { list, total }
+        } = await getQAHistoryList()
+        this.historyData = list
+        // console.log('this.historyData', this.historyData)
+      } catch (error) {}
+    },
+
     handleKeydown(event) {
       if (event.key === 'Enter') {
-        // 检查是否按下了 Ctrl 键
         if (event.ctrlKey) {
           // 按下了 Ctrl+Enter,则插入换行符
           this.questionInput += '\n'
@@ -90,10 +162,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 {
@@ -104,22 +177,37 @@ export default {
           answer: '正在解析您的问题,请稍后......'
         })
         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 })
+        // const { code, data } = await handlerAsk(sendInput)
+        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: '维修策略' }
+              ]
             }
-          })
-          newData.graph.categories = categories
+          }
+        }
 
+        if (code == 200) {
+          // const newData = this.handleData(JSON.parse(data))
+          const newData = this.handleData(data)
           this.chatInfo.pop()
           this.chatInfo.push(newData)
         }
@@ -129,41 +217,73 @@ 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: '维修策略' }]
+    handleData(data) {
+      // 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
     },
-    showGraph(graphData) {
-      const { data, links } = graphData
+
+    handleMore(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
+    },
+
+    async historyDetail(id) {
+      try {
+        const { data } = await getQAHistoryDetail(id)
+        const newData = this.handleData(data)
+        this.chatInfo = []
+        this.chatInfo.push(newData)
+      } 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>

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

@@ -0,0 +1,373 @@
+<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 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>
+          <!-- <el-button type="primary">导入模板</el-button>
+          <el-button type="primary">导出模板</el-button> -->
+        </div>
+        <div class="view-dataType-title-search">
+          <el-input placeholder="请输入机型/HMC码" v-model="keyWord" 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="600px" :before-close="handleClose">
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+          <el-form-item label="机型" prop="model">
+            <el-input v-model="form.model" placeholder="请输入机型" />
+          </el-form-item>
+          <el-form-item label="HMC码" prop="hmcCode">
+            <el-input v-model="form.hmcCode" placeholder="请输入HMC码" />
+          </el-form-item>
+          <el-form-item label="参数列" prop="parameterColumn">
+            <el-checkbox-group v-model="form.parameterColumn">
+              <div style="column-count: 3">
+                <el-checkbox v-for="dict in dictData" :key="dict.dictValue" :value="dict.dictValue" :label="dict.dictLabel">{{ dict.dictLabel }}</el-checkbox>
+              </div>
+            </el-checkbox-group>
+          </el-form-item>
+          <el-form-item label="模型" prop="pattern">
+            <el-select v-model="form.pattern" placeholder="请选择模型">
+              <el-option v-for="item in modelData.list" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+          </el-form-item>
+        </el-form>
+
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="handleClose">取 消</el-button>
+          <el-button type="primary" @click="submit">确 定</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getJudgeFaultLogic, getAircaftTypeAndModelTree, addJudgeFaultLogic, updateJudgeFaultLogic, removeJudgeFaultLogic } from '@/api/als/judgeFaultLogic'
+import { deepClone, debounce } from '@/utils/index'
+import { getDict } from '@/api/dict'
+import { getModel } from '@/api/als/model'
+export default {
+  name: 'JudgeFaultLogic',
+  components: {},
+  data() {
+    // 这里存放数据
+    return {
+      dialogTitle: '新增',
+      dialogVisible: false,
+      keyWord: '',
+      aircaftModelIdList: [],
+      currentNodeKey: null,
+      currentNode: null,
+      menuTreeData: [],
+      dictData: [],
+      modelData: [],
+      treeObj: {
+        title: '所属机种',
+        activityheight: '275px',
+        searchIcon: false,
+        configure: {
+          children: 'children',
+          label: 'label'
+        }
+      },
+      typeTree: {
+        children: 'children',
+        label: 'label'
+      },
+      searchValue: '',
+      columns: [
+        { prop: 'id', label: '编号' },
+        {
+          prop: 'model',
+          label: '机型'
+        },
+        {
+          prop: 'hmcCode',
+          label: 'HMC码'
+        },
+        {
+          prop: 'parameterColumn',
+          label: '参数列'
+        },
+        {
+          prop: 'pattern',
+          label: '模型',
+          render: (h, params) => {
+            const matchedItem = this.modelData.list.find((item) => params.row.pattern === item.id)
+            if (matchedItem) {
+              return h('span', matchedItem.name)
+            } else {
+              return h('span', {}, '')
+            }
+          }
+        },
+        {
+          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: '',
+        model: '',
+        hmcCode: '',
+        parameterColumn: [],
+        pattern: '',
+        remarks: '',
+        tenantId: '',
+        delFlag: '',
+        version: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      },
+      rules: {
+        model: [{ required: true, message: '机型不能为空', trigger: 'blur' }],
+        hmcCode: [{ required: true, message: 'HMC码不能为空', trigger: 'blur' }],
+        parameterColumn: [{ required: true, message: '参数列不能为空', trigger: 'blur' }],
+        pattern: [{ required: true, message: '模型不能为空', trigger: 'blur' }]
+      },
+      debounceFn: debounce(this.fetch, 500)
+    }
+  },
+  watch: {
+    keyWord() {
+      this.tableRequset.pageIndex = 1
+      this.debounceFn()
+    }
+  },
+  mounted() {
+    this.getDict()
+    this.getModelAPI()
+    this.getJudgeFaultLogicAPI()
+    // this.getAircaftTypeAndModelTreeAPI()
+  },
+  methods: {
+    async getDict() {
+      const { data } = await getDict('als_parameter_column')
+      this.dictData = data
+    },
+
+    async getModelAPI() {
+      const { data } = await getModel({ pageSize: 100, pageNum: 1, ...{ type: 5 } })
+      this.modelData = data
+    },
+
+    async getAircaftTypeAndModelTreeAPI(params) {
+      const { data } = await getAircaftTypeAndModelTree(params)
+      this.menuTreeData = data
+      if (data.length) {
+        this.currentNodeKey = data[0].value
+        this.currentNode = data[0]
+        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children).map((e) => e.id)
+        this.getJudgeFaultLogicAPI()
+      }
+    },
+
+    async removeJudgeFaultLogicAPI(params) {
+      try {
+        const { code } = await removeJudgeFaultLogic(params)
+        if (code === 200) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          await this.getJudgeFaultLogicAPI()
+          this.handleClose()
+        }
+      } catch (error) {}
+    },
+
+    getTreeLeafData(list) {
+      const newArr = []
+      function getLeaf(data, arr) {
+        data.forEach((e) => {
+          if (e.type === 1) {
+            arr.push(e)
+          }
+          if (e.children.length) {
+            getLeaf(e.children, arr)
+          }
+        })
+      }
+      getLeaf(list, newArr)
+      return newArr
+    },
+
+    async getJudgeFaultLogicAPI(params) {
+      if (this.$refs.table) this.$refs.table.clearSelection()
+      const { keyWord } = this
+      const { pageSize, pageIndex } = this.tableRequset
+      const {
+        data: { list, totalCount }
+      } = await getJudgeFaultLogic({ pageSize, pageNum: pageIndex, keyWord, ...params })
+      this.tableData = list
+      this.tableRequset.total = totalCount
+    },
+
+    fetch() {
+      this.getJudgeFaultLogicAPI()
+    },
+
+    searchClick() {
+      this.getJudgeFaultLogicAPI()
+    },
+
+    async addJudgeFaultLogicAPI() {
+      this.form.parameterColumn = this.form.parameterColumn.toString()
+      this.$refs['form'].validate(async (valid) => {
+        if (valid) {
+          try {
+            delete this.form.aircaftModelName
+            const { code } = await addJudgeFaultLogic({ ...this.form })
+            if (code === 200) {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              })
+              this.getJudgeFaultLogicAPI()
+              this.handleClose()
+            }
+          } catch (error) {}
+        }
+      })
+    },
+
+    async updateJudgeFaultLogicAPI() {
+      this.form.parameterColumn = this.form.parameterColumn.toString()
+      try {
+        const { code } = await updateJudgeFaultLogic({ ...this.form })
+        if (code === 200) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          this.getJudgeFaultLogicAPI()
+          this.handleClose()
+        }
+      } 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.getJudgeFaultLogicAPI()
+    },
+
+    openDialog() {
+      this.dialogTitle = '新增'
+      this.dialogVisible = true
+      // this.form.aircaftModelName = this.currentNode.label
+      // this.form.aircaftModelId = this.currentNode.id
+    },
+
+    handleClose() {
+      this.dialogVisible = false
+      this.form = {
+        id: '',
+        model: '',
+        hmcCode: '',
+        parameterColumn: [],
+        pattern: '',
+        remarks: '',
+        tenantId: '',
+        delFlag: '',
+        version: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      }
+    },
+
+    handUpdate(row) {
+      this.dialogTitle = '编辑'
+      this.form = deepClone(row)
+      this.form.parameterColumn = this.form.parameterColumn.split(',')
+      this.dialogVisible = true
+    },
+
+    submit() {
+      switch (this.dialogTitle) {
+        case '编辑':
+          this.updateJudgeFaultLogicAPI()
+          break
+        case '新增':
+          this.addJudgeFaultLogicAPI()
+          break
+      }
+    },
+
+    selection(val) {
+      this.tableCheckItems = val
+    },
+
+    remove(row) {
+      this.$confirm('是否删除该机种', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.removeJudgeFaultLogicAPI(row.map((e) => e.id))
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style 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
       }

+ 69 - 0
src/views/als/lifetimeSpareParts/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: '导入有寿件信息',
+      dialogVisible: false,
+      fileApi: process.env.VUE_APP_BASE_API + '/als/lifetimeSpareParts/importData',
+      fileList: [],
+      fileData: {
+        userName: ''
+      }
+    }
+  },
+  methods: {
+    triggerDialog() {
+      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>

+ 543 - 0
src/views/als/lifetimeSpareParts/index.vue

@@ -0,0 +1,543 @@
+<template>
+  <div class="view-table-content">
+    <div class="view-dataSpecies-left" style="display: flex; width: 430px">
+      <MenuTree :currentNodeKey="currentNodeKey" nodeKey="id" :treedata="menuTreeData" @TreeNodeclick="treeNodeClick" v-bind="treeObj" style="width: 250px"> </MenuTree>
+      <MenuTree :currentNodeKey="currentConfigNodeKey" nodeKey="id" :treedata="configTreeData" @TreeNodeclick="treeConfigNodeClick" v-bind="configurationTreeObj" style="width: 250px"> </MenuTree>
+    </div>
+    <div class="view-dataSpecies-right">
+      <div class="view-dataType-title">
+        <div class="view-dataType-title-btn">
+          <el-button type="success" @click="openDialog()" :disabled="currentConfigNodeKey === ''">新增</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="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="view-dataType-title-search">
+          <el-input placeholder="请输入关键字" v-model="keyWord" class="input1">
+            <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
+          </el-input>
+        </div> -->
+      </div>
+      <div class="view-dataType-table">
+        <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
+      </div>
+      <!-- 添加或修改有寿件对话框 -->
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+          <el-form-item label="机型" prop="airModelId">
+            <el-select v-model="form.airModelId" 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="airId">
+            <el-select v-model="form.airId" 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="configId">
+            <el-select v-model="form.configId" placeholder="请选择构型" disabled>
+              <el-option v-for="item in configAll" :key="item.id" :label="item.name" :value="item.id"> </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="部件名称" prop="componentName">
+            <el-input v-model="form.componentName" placeholder="请输入部件名称" />
+          </el-form-item>
+          <el-form-item label="部件型号" prop="componentModel">
+            <el-input v-model="form.componentModel" placeholder="请输入部件型号" />
+          </el-form-item>
+          <el-form-item label="部件编码" prop="componentNum">
+            <el-input v-model="form.componentNum" placeholder="请输入部件编码" />
+          </el-form-item>
+          <el-form-item label="出厂日期" prop="factoryDate">
+            <el-date-picker clearable v-model="form.factoryDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择出厂日期"></el-date-picker>
+          </el-form-item>
+          <el-form-item label="当前安装飞机" prop="currentInstallAircraft">
+            <el-input v-model="form.currentInstallAircraft" placeholder="请输入当前安装飞机" />
+          </el-form-item>
+          <el-form-item label="工作时次" prop="workTime">
+            <el-input v-model="form.workTime" placeholder="请输入工作时次" />
+          </el-form-item>
+          <el-form-item label="额定寿命" prop="ratedLifetime">
+            <el-input v-model="form.ratedLifetime" placeholder="请输入额定寿命" />
+          </el-form-item>
+          <el-form-item label="剩余寿命" prop="remainingLifetime">
+            <el-input v-model="form.remainingLifetime" placeholder="请输入剩余寿命" />
+          </el-form-item>
+        </el-form>
+
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="handleClose">取 消</el-button>
+          <el-button type="primary" @click="submit">确 定</el-button>
+        </span>
+      </el-dialog>
+      <!-- 导入 -->
+      <ImportDialog ref="ImportDialog" @submitCallBack="ImportDialogCallBack" />
+    </div>
+  </div>
+</template>
+
+<script>
+import { getLifetimeSpareParts, addLifetimeSpareParts, updateLifetimeSpareParts, removeLifetimeSpareParts, downLoadLifetimeSpareParts, exportLifetimeSparePartsExcel } from '@/api/als/lifetimeSpareParts'
+import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
+import { getAvmatCatalog } from '@/api/basicData/dataSailingMaterialMaterialCoding'
+import { getAirConfiguration } from '@/api/als/airConfiguration'
+import { deepClone, debounce } from '@/utils/index'
+import { handleTree, flattenTree } from '../utils/common'
+import { getAircaftModelAll, getAircaftCatalogAll } from '@/api/als/aircraft'
+import ImportDialog from './importDialog/index.vue'
+export default {
+  name: 'LifetimeSpareParts',
+  components: { ImportDialog },
+  data() {
+    // 这里存放数据
+    return {
+      dialogTitle: '新增',
+      dialogVisible: false,
+      keyWord: '',
+      aircaftModelIdList: [],
+      currentNodeKey: '',
+      currentNode: {},
+      currentConfigNodeKey: '',
+      currentConfigNode: {},
+      menuTreeData: [],
+      configTreeData: [],
+      treeObj: {
+        title: '所属机种',
+        activityheight: '275px',
+        searchIcon: false,
+        configure: {
+          children: 'children',
+          label: 'label'
+        }
+      },
+      configurationTreeObj: {
+        title: '飞机构型',
+        activityheight: '275px',
+        searchIcon: false,
+        configure: {
+          children: 'children',
+          label: 'name'
+        }
+      },
+      typeTree: {
+        children: 'children',
+        label: 'label'
+      },
+      searchValue: '',
+      columns: [
+        { prop: 'id', label: '编号' },
+        {
+          prop: 'airModelId',
+          label: '机型',
+          render: (h, params) => {
+            const matchedItem = this.aircaftModelAll.find((item) => params.row.airModelId === item.aircaftModelId)
+            if (matchedItem) {
+              return h('span', matchedItem.aircaftModelName)
+            } else {
+              return h('span', params.row.airModelId)
+            }
+          }
+        },
+        {
+          prop: 'airId',
+          label: '编目',
+          render: (h, params) => {
+            const matchedItem = this.aircaftCatalogAll.find((item) => params.row.airId.trim() === item.aircaftCatalogId.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.aircaftCatalogCode)
+            } else {
+              return h('span', params.row.airId)
+            }
+          }
+        },
+        {
+          prop: 'configId',
+          label: '构型',
+          render: (h, params) => {
+            const matchedItem = this.configAll.find((item) => params.row.configId.trim() === item.id.trim())
+            if (matchedItem) {
+              return h('span', matchedItem.name)
+            } else {
+              return h('span', params.row.configId)
+            }
+          }
+        },
+        {
+          prop: 'componentName',
+          label: '部件名称'
+        },
+        {
+          prop: 'componentModel',
+          label: '部件型号'
+        },
+        {
+          prop: 'componentNum',
+          label: '部件编码'
+        },
+        {
+          prop: 'factoryDate',
+          label: '出厂日期'
+        },
+        {
+          prop: 'currentInstallAircraft',
+          label: '当前安装飞机'
+        },
+        {
+          prop: 'workTime',
+          label: '工作时次'
+        },
+        {
+          prop: 'ratedLifetime',
+          label: '额定寿命'
+        },
+        {
+          prop: 'remainingLifetime',
+          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: [],
+      avmatTableData: [],
+      tableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
+      avmatTableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 20,
+        searchValue: ''
+      },
+      form: {
+        id: '',
+        airId: '',
+        airModelId: '',
+        configId: '',
+        componentName: '',
+        componentModel: '',
+        componentNum: '',
+        factoryDate: '',
+        currentInstallAircraft: '',
+        workTime: '',
+        ratedLifetime: '',
+        remainingLifetime: '',
+        remarks: '',
+        tenantId: '',
+        delFlag: '',
+        version: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
+      },
+      debounceFn: debounce(this.fetch, 500),
+      aircaftModelAll: [],
+      aircaftCatalogAll: [],
+      configAll: [],
+      rules: {
+        airId: [{ required: true, message: '编目不能为空', trigger: 'blur' }],
+        airModelId: [{ required: true, message: '机型不能为空', trigger: 'blur' }],
+        configId: [{ required: true, message: '构型不能为空', trigger: 'blur' }],
+        componentName: [{ required: true, message: '部件名称不能为空', trigger: 'blur' }],
+        componentModel: [{ required: true, message: '部件型号不能为空', trigger: 'blur' }],
+        componentNum: [{ required: true, message: '部件编码不能为空', trigger: 'blur' }],
+        factoryDate: [{ required: true, message: '出厂日期不能为空', trigger: 'blur' }],
+        currentInstallAircraft: [{ required: true, message: '当前安装飞机不能为空', trigger: 'blur' }],
+        workTime: [{ required: true, message: '工作时次不能为空', trigger: 'blur' }],
+        ratedLifetime: [{ required: true, message: '额定寿命不能为空', trigger: 'blur' }]
+      }
+    }
+  },
+  watch: {
+    keyWord() {
+      this.tableRequset.pageIndex = 1
+      this.debounceFn()
+    }
+  },
+  mounted() {
+    this.getAircaftTypeAndModelTreeAPI()
+  },
+  methods: {
+    async getAircaftTypeAndModelTreeAPI(params) {
+      const { data } = await getAircaftCatalogTree(params)
+      this.menuTreeData = data
+      const { pageSize, pageIndex } = this.avmatTableRequset
+      const {
+        data: { list, totalCount }
+      } = await getAvmatCatalog({
+        pageIndex,
+        pageSize,
+        avmatCategoriesId: '',
+        avmatType: '1'
+      })
+      this.avmatTableData = flattenTree(list)
+      this.avmatTableRequset.total = totalCount
+      const getAircaftModelAllParams = {
+        aircaftTypeCode: '',
+        aircaftTypeId: '',
+        queryParam: ''
+      }
+      const { data: data1 } = await getAircaftModelAll(getAircaftModelAllParams)
+      this.aircaftModelAll = data1
+      const { data: data2 } = await getAircaftCatalogAll({
+        keyWord: '',
+        aircaftModelIdList: []
+      })
+      this.aircaftCatalogAll = flattenTree(data2)
+    },
+
+    async removeLifetimeSparePartsAPI(params) {
+      try {
+        const { code } = await removeLifetimeSpareParts(params)
+        if (code === 200) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          await this.getLifetimeSparePartsAPI({ configId: this.currentConfigNodeKey })
+          this.handleClose()
+        }
+      } catch (error) {}
+    },
+
+    getTreeLeafData(list) {
+      const newArr = []
+      function getLeaf(data, arr) {
+        data.forEach((e) => {
+          if (e.type === 1) {
+            arr.push(e)
+          }
+          if (e.children.length) {
+            getLeaf(e.children, arr)
+          }
+        })
+      }
+      getLeaf(list, newArr)
+      return newArr
+    },
+
+    async getLifetimeSparePartsAPI(params) {
+      if (this.$refs.table) this.$refs.table.clearSelection()
+      const { keyWord } = this
+      const { pageSize, pageIndex } = this.tableRequset
+      const {
+        data: { list, totalCount }
+      } = await getLifetimeSpareParts({ pageSize, pageNum: pageIndex, keyWord, ...params })
+      this.tableData = list
+      this.tableRequset.total = totalCount
+    },
+
+    fetch() {
+      this.getLifetimeSparePartsAPI({ configId: this.currentConfigNodeKey })
+    },
+
+    searchClick() {
+      this.getLifetimeSparePartsAPI({ configId: this.currentConfigNodeKey })
+    },
+
+    async addLifetimeSparePartsAPI() {
+      this.$refs['form'].validate(async (valid) => {
+        if (valid) {
+          try {
+            delete this.form.aircaftModelName
+            const { code } = await addLifetimeSpareParts({ ...this.form })
+            if (code === 200) {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              })
+              this.getLifetimeSparePartsAPI({ configId: this.currentConfigNodeKey })
+              this.handleClose()
+            }
+          } catch (error) {}
+        }
+      })
+    },
+
+    async updateLifetimeSparePartsAPI() {
+      this.$refs['form'].validate(async (valid) => {
+        if (valid) {
+          try {
+            const { code } = await updateLifetimeSpareParts({ ...this.form })
+            if (code === 200) {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              })
+              this.getLifetimeSparePartsAPI({ configId: this.currentConfigNodeKey })
+              this.handleClose()
+            }
+          } catch (error) {}
+        }
+      })
+    },
+
+    async treeNodeClick(data) {
+      // 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.getAirInstallAPI(this.currentNodeKey)
+      let dataTree = []
+      if (data.type === 1) {
+        const { data: data1 } = await getAirConfiguration({ aircraftType: data.id })
+        dataTree = data1
+      } else if (data.type === 2) {
+        const { data: data1 } = await getAirConfiguration({ aircraftType: data.parentId })
+        dataTree = data1
+      }
+      this.configAll = dataTree
+      this.configTreeData = []
+      const topNode = { id: 1, name: '整机', children: [] }
+      // topNode.children = data1
+      topNode.children = handleTree(dataTree, 'id')
+      this.configTreeData.push(topNode)
+      console.log(this.aircaftModelAll)
+      console.log(this.aircaftCatalogAll)
+      console.log(this.configAll)
+    },
+
+    treeConfigNodeClick(data) {
+      this.$refs.table.clearSelection()
+      this.currentConfigNodeKey = this.form.configId = data.id
+      this.currentConfigNode = data
+      // const dataTree = this.configTreeData
+      // console.log('dataTree', dataTree)
+      // this.configNodeIdList = String(this.getAllTreeData(dataTree[0].children.length ? dataTree[0].children : [dataTree[0]]).map((e) => e.id))
+      // console.log('this.configNodeIdList', this.configNodeIdList)
+      // this.getAirInstallAPI({ configId: this.configNodeIdList })
+      this.getLifetimeSparePartsAPI({ configId: this.currentConfigNodeKey })
+    },
+
+    openDialog() {
+      this.dialogTitle = '新增'
+      this.dialogVisible = true
+      this.form.aircaftModelName = this.currentNode.label
+      this.form.aircaftModelId = this.currentNode.id
+    },
+
+    handleClose() {
+      this.dialogVisible = false
+      this.form.componentName = ''
+      this.form.componentModel = ''
+      this.form.componentNum = ''
+      this.form.factoryDate = ''
+      this.form.currentInstallAircraft = ''
+      this.form.workTime = ''
+      this.form.ratedLifetime = ''
+      this.form.remainingLifetime = ''
+      this.form.remarks = ''
+      this.form.tenantId = ''
+      this.form.delFlag = ''
+      this.form.version = ''
+      this.form.createBy = ''
+      this.form.createTime = ''
+      this.form.updateBy = ''
+      this.form.updateTime = ''
+    },
+
+    handUpdate(row) {
+      this.dialogTitle = '编辑'
+      this.form = deepClone(row)
+      this.dialogVisible = true
+    },
+
+    submit() {
+      switch (this.dialogTitle) {
+        case '编辑':
+          this.updateLifetimeSparePartsAPI()
+          break
+        case '新增':
+          this.addLifetimeSparePartsAPI()
+          break
+      }
+    },
+
+    selection(val) {
+      this.tableCheckItems = val
+    },
+
+    remove(row) {
+      this.$confirm('是否删除该机种', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.removeLifetimeSparePartsAPI(row.map((e) => e.id))
+        })
+        .catch(() => {})
+    },
+    //更多按钮
+    handleExport(type) {
+      this[type]()
+    },
+    //导入
+    importOperation() {
+      this.$refs.ImportDialog.triggerDialog()
+    },
+    //导入回写
+    ImportDialogCallBack() {
+      this.getAircaftTypeAndModelTreeAPI()
+    },
+    //导出全部
+    async allExport() {
+      // const params = {
+      //   queryParam: this.searchValue
+      // }
+      await exportLifetimeSparePartsExcel({})
+    },
+    //下载模板
+    async downloadTemplate() {
+      await downLoadLifetimeSpareParts()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+@import '../index.scss';
+</style>

+ 53 - 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,11 @@ 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
+        console.log('this.aircraftTypeTreeData', this.aircraftTypeTreeData)
       } catch (error) {}
     },
 
@@ -221,7 +232,7 @@ export default {
       }
     },
 
-    aircaftTypeNormalizer(node) {
+    aircraftTypeNormalizer(node) {
       if (node.children && !node.children.length) {
         delete node.children
       }
@@ -232,6 +243,24 @@ 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) {
+      console.log('node', node)
+      this.form.partId = node.id
+    },
+
     async removeModelAPI(params) {
       try {
         const { code } = await removeModel(params)
@@ -306,11 +335,11 @@ export default {
         name: '',
         type: '',
         url: '',
-        aircaftType: null,
+        aircraftType: null,
         partId: null,
         param: '',
         columnData: '',
-        status: '',
+        status: '1',
         remark: ''
       }
     },
@@ -318,6 +347,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 +365,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) {}

+ 69 - 0
src/views/als/smTask/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: '导入定检任务信息',
+      dialogVisible: false,
+      fileApi: process.env.VUE_APP_BASE_API + '/als/smTask/importData',
+      fileList: [],
+      fileData: {
+        userName: ''
+      }
+    }
+  },
+  methods: {
+    triggerDialog() {
+      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>

+ 59 - 24
src/views/als/smTask/index.vue

@@ -8,6 +8,14 @@
         <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>
+          <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="view-dataType-title-search">
           <el-input placeholder="请输入关键字" v-model="keyWord" class="input1">
@@ -31,8 +39,8 @@
               <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="name">
-            <el-input v-model="form.name" placeholder="请输入任务名称" />
+          <el-form-item label="检查项名称" prop="name">
+            <el-input v-model="form.name" placeholder="请输入检查项名称" />
           </el-form-item>
           <el-form-item label="专业" prop="specialty">
             <el-input v-model="form.specialty" placeholder="请输入专业" />
@@ -43,9 +51,9 @@
           <el-form-item label="周期" prop="periodTime">
             <el-input v-model="form.periodTime" placeholder="请输入周期" />
           </el-form-item>
-          <el-form-item label="剩余时间" prop="remainTime">
+          <!-- <el-form-item label="剩余时间" prop="remainTime">
             <el-input v-model="form.remainTime" placeholder="请输入剩余时间" />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="负责人" prop="headName">
             <el-input v-model="form.headName" placeholder="请输入负责人" />
           </el-form-item>
@@ -65,20 +73,23 @@
           <el-button type="primary" @click="submit">确 定</el-button>
         </span>
       </el-dialog>
+      <!-- 导入 -->
+      <ImportDialog ref="ImportDialog" @submitCallBack="ImportDialogCallBack" />
     </div>
   </div>
 </template>
 
 <script>
-import { getSmTask, addSmTask, updateSmTask, removeSmTask } from '@/api/als/smTask'
+import { getSmTask, addSmTask, updateSmTask, removeSmTask, downLoadSmTask, exportSmTask } from '@/api/als/smTask'
 import { deepClone, debounce } from '@/utils/index'
 import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { getAircaftModelAll, getAircaftCatalogAll } from '@/api/als/aircraft'
 import { flattenTree } from '../utils/common'
+import ImportDialog from './importDialog/index.vue'
 
 export default {
   name: 'SmTask',
-  components: {},
+  components: { ImportDialog },
   data() {
     // 这里存放数据
     return {
@@ -112,7 +123,7 @@ export default {
             if (matchedItem) {
               return h('span', matchedItem.aircaftModelName)
             } else {
-              return h('span', {}, '')
+              return h('span', params.row.aircraftModel)
             }
           }
         },
@@ -124,13 +135,13 @@ export default {
             if (matchedItem) {
               return h('span', matchedItem.aircaftCatalogCode)
             } else {
-              return h('span', {}, '')
+              return h('span', params.row.aircraftId)
             }
           }
         },
         {
           prop: 'name',
-          label: '任务名称'
+          label: '检查项名称'
         },
         {
           prop: 'specialty',
@@ -144,10 +155,10 @@ export default {
           prop: 'periodTime',
           label: '周期'
         },
-        {
-          prop: 'remainTime',
-          label: '剩余时间'
-        },
+        // {
+        //   prop: 'remainTime',
+        //   label: '剩余时间'
+        // },
         {
           prop: 'headName',
           label: '负责人'
@@ -160,17 +171,17 @@ export default {
           prop: 'contents',
           label: '任务内容'
         },
-        {
-          prop: 'status',
-          label: '状态',
-          render: (h, params) => {
-            if (params.row.status == 0) {
-              return h('span', { class: 'warning-state' }, '未分配')
-            } else {
-              return h('span', { class: 'success-state' }, '已分配')
-            }
-          }
-        },
+        // {
+        //   prop: 'status',
+        //   label: '状态',
+        //   render: (h, params) => {
+        //     if (params.row.status == 0) {
+        //       return h('span', { class: 'warning-state' }, '未分配')
+        //     } else {
+        //       return h('span', { class: 'success-state' }, '已分配')
+        //     }
+        //   }
+        // },
         {
           prop: 'remark',
           label: '备注'
@@ -361,6 +372,7 @@ export default {
     async treeNodeClick(data) {
       this.$refs.table.clearSelection()
       this.currentNodeKey = this.form.aircraftId = data.id
+      console.log(data)
       this.currentNode = data
       this.aircaftModelIdList = String(this.getTreeLeafData(data.children.length ? data.children : [data]).map((e) => e.id))
       this.getSmTaskAPI({ aircraftId: this.aircaftModelIdList })
@@ -434,6 +446,29 @@ export default {
           smTaskId: row.id
         }
       })
+    },
+    //更多按钮
+    handleExport(type) {
+      this[type]()
+    },
+    //导入
+    importOperation() {
+      this.$refs.ImportDialog.triggerDialog()
+    },
+    //导入回写
+    ImportDialogCallBack() {
+      this.getAircaftCatalogTreeAPI()
+    },
+    //导出全部
+    async allExport() {
+      // const params = {
+      //   queryParam: this.searchValue
+      // }
+      await exportSmTask({})
+    },
+    //下载模板
+    async downloadTemplate() {
+      await downLoadSmTask()
     }
   }
 }

+ 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;
+}

+ 39 - 1
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="table" :defaultFetch="true" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" class="tabl-box" />
+          </template>
+        </Card>
+      </el-col>
+    </el-row>
     <el-row>
       <el-col :span="12" style="margin-bottom: 15px">
         <Card title="历年任务">
@@ -74,7 +111,8 @@ export default {
       setTopOptions,
       bottomLeftOptions,
       bottomCenterOptions,
-      bottomRightOptions
+      bottomRightOptions,
+      imgUrl: require('@/assets/images/飞机.png')
     }
   },
   mounted() {

+ 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: {