Pārlūkot izejas kodu

合并武汉的代码

Rmengdi 2 mēneši atpakaļ
vecāks
revīzija
f9b92a81e8

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

@@ -115,3 +115,7 @@ export const exportSocialSecurityExcel = async (data) => {
 export const exportSocialSecurityDetailsExcel = async (data) => {
   window.open(process.env.VUE_APP_BASE_API + `/safeguard/socialSecurityDetails/exportExcel?socialSecurityId=${data.socialSecurityId}&avmatCategoriesId=${data.avmatCategoriesId}`)
 }
+//获取任务飞机健康状态(故障统计)
+export const getFaultStatisticsList = async (data) => {
+  return await get('/als/faultStatistics/exclusionListAll')
+}

+ 120 - 0
src/components/FittingsModal/FaultStatisticsDialog/index.js

@@ -0,0 +1,120 @@
+export const columns = (_this) => [
+  {
+    prop: 'faultyPartsName',
+    label: '故障件名称'
+  },
+  {
+    prop: 'faultyPartsModel',
+    label: '故障件型别'
+  },
+  {
+    prop: 'faultyPartsNum',
+    label: '故障件号码'
+  },
+  {
+    prop: 'engineNum',
+    label: '故障件所属发动机编号'
+  },
+  {
+    prop: 'faultyPartsInstallDate',
+    label: '故障件装机日期'
+  },
+  {
+    prop: 'faultyPartsPosition',
+    label: '故障件位置'
+  },
+  {
+    prop: 'faultyAbnormalCode',
+    label: '故障失常码'
+  },
+  {
+    prop: 'faultyPhenomenon',
+    label: '故障现象'
+  },
+  {
+    prop: 'faultyPlace',
+    label: '故障发生地点'
+  },
+  {
+    prop: 'findOpportunity',
+    label: '发现时机'
+  },
+  {
+    prop: 'systems',
+    label: '所属系统'
+  },
+  {
+    prop: 'installationTime',
+    label: '故障件装本机工作时次'
+  },
+  {
+    prop: 'totalWorkTime',
+    label: '故障件总工作时次'
+  },
+  {
+    prop: 'repairTime',
+    label: '故障件修后时次'
+  },
+  {
+    prop: 'replacementPartsModel',
+    label: '故换件型别'
+  },
+  {
+    prop: 'replacementPartsNum',
+    label: '故换件号码'
+  },
+  {
+    prop: 'replacementTotalWorkTime',
+    label: '故换件总工作时次'
+  },
+  {
+    prop: 'replacementRepairTime',
+    label: '故换件修后时次'
+  },
+  {
+    prop: 'faultyReason',
+    label: '故障原因'
+  },
+  {
+    prop: 'faultyNature',
+    label: '故障性质'
+  },
+  {
+    prop: 'faultyConsequence',
+    label: '故障后果'
+  },
+  {
+    prop: 'handlingSuggestions',
+    label: '更换部件'
+  },
+  {
+    prop: 'influenceFrequency',
+    label: '影响次数'
+  },
+  {
+    prop: 'errorFlyFrequency',
+    label: '误飞次数'
+  },
+  {
+    prop: 'exclusionTime',
+    label: '排故时间'
+  },
+  {
+    prop: 'needTestFly',
+    label: '需要试飞'
+  },
+  {
+    prop: 'repairStatus',
+    label: '修理状态'
+  }
+]
+
+export const options = {
+  stripe: true, // 斑马纹
+  mutiSelect: false, // 多选框
+  index: false, // 显示序号, 多选则 mutiSelect
+  loading: false, // 表格动画
+  initTable: true, // 是否一挂载就加载数据
+  border: true,
+  height: 'calc(100vh - 300px)'
+}

+ 82 - 0
src/components/FittingsModal/FaultStatisticsDialog/index.scss

@@ -0,0 +1,82 @@
+.view-AerospaceCompileLineList-left {
+  width: 300px;
+}
+
+.view-AerospaceCompileLineList {
+  display: flex;
+  flex-shrink: 0;
+}
+.view-AerospaceCompileLineList-right-summarizing-btn-right {
+  display: flex;
+  flex-shrink: 0;
+}
+.view-AerospaceCompileLineList-right-summarizing-btn {
+  display: flex;
+  flex-shrink: 0;
+  justify-content: space-between;
+}
+.view-CarrierListMachineryPreparation .view-AerospaceCompileLineList-right-summarizing-btn {
+  margin-top: 30px;
+}
+.view-AerospaceCompileLineList-right-summarizing-btn-right-select {
+  display: flex;
+  align-items: center;
+  margin-right: 30px;
+  > span {
+    color: #fff;
+    margin-right: 15px;
+    width: 60px;
+  }
+}
+.view-AerospaceCompileLineList-right-summarizing-table {
+  margin-top: 30px;
+}
+
+.fittings-modal-box {
+  display: flex;
+}
+
+.fittings-modal-box-left {
+  width: 230px;
+}
+
+.fittings-modal-box-right {
+  width: calc(100% - 260px);
+  margin-left: 30px;
+}
+
+.fittings-modal .el-dialog {
+  margin-top: 5vh !important;
+}
+
+.auto-generation {
+  margin-bottom: 30px;
+  display: flex;
+  align-items: center;
+  > span {
+    color: #fff;
+    margin-right: 15px;
+    width: 80px;
+  }
+  .el-select {
+    width: 100%;
+  }
+}
+.view-CarrierListMachineryPreparation-s {
+  // display: flex;
+  .el-descriptions__body {
+    background-color: transparent !important;
+  }
+}
+
+.view-CarrierListMachineryPreparation-s .el-table {
+  height: calc(100vh - 470px);
+}
+.view-AerospaceCompileLineList-right-summarizing-btn-look {
+  display: flex;
+  justify-content: right;
+}
+
+.view-AerospaceCompileLineList-right-summarizing-btn-right-look {
+  //   width: 300px;
+}

+ 53 - 0
src/components/FittingsModal/FaultStatisticsDialog/index.vue

@@ -0,0 +1,53 @@
+<template>
+  <el-dialog class="fittings-modal" :title="dialogtitle" :visible.sync="dialogVisible" width="1200px" :before-close="handleClose" append-to-body>
+    <LTable :dataSource="tableData" ref="Ltable" :showColumnSetting="false" :options="options" :columns="columns"></LTable>
+  </el-dialog>
+</template>
+
+<script>
+import { columns, options } from './index'
+import { getFaultStatisticsList } from '@/api/task/carrierFlightMission'
+
+export default {
+  name: 'FaultStatisticsDialog',
+  components: {},
+  data() {
+    // 这里存放数据
+    return {
+      dialogtitle: '查看飞机健康状态',
+      dialogVisible: false,
+      columns: columns(this),
+      options,
+      tableData: [],
+      activeRow: null
+    }
+  },
+  mounted() {
+    // this.getFaultStatisticsList()
+  },
+  methods: {
+    opneDialog(row) {
+      this.dialogtitle = '查看飞机' + row.aircaftCatalogCode + '的健康状态'
+      this.activeRow = row
+      this.dialogVisible = true
+      this.getFaultStatisticsList()
+    },
+    handleClose() {
+      this.tableData = []
+      this.activeRow = null
+      this.dialogVisible = false
+    },
+    async getFaultStatisticsList() {
+      const { data, code } = await getFaultStatisticsList()
+      if (code == 200) {
+        const newdata = data.filter((item) => item['aircraftNum'] === this.activeRow.aircaftCatalogCode)
+        this.tableData = newdata
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+@import './index.scss';
+</style>

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

@@ -27,7 +27,16 @@ export const columns = (_this) => [
     width: '240px',
     group: [
       {
-        name: '选择',
+        name: '查看健康状态',
+        type: 'text',
+        round: false,
+        plain: false,
+        onClick: (row, index, scope) => {
+          _this.look(row)
+        }
+      },
+      {
+        name: '确定',
         type: 'text',
         round: false,
         plain: false,

+ 36 - 2
src/components/FittingsModal/index.vue

@@ -5,18 +5,21 @@
         <MenuTree :currentNodeKey="currentNodeKey" :treedata="menuTreeData" @TreeNodeclick="treeNodeClick" v-bind="treeObj"> </MenuTree>
       </div>
       <div class="fittings-modal-box-right">
-        <LTable ref="table" :defaultFetch="false" :columns="columns" :dataSource="dialogTableData" :options="options" :fetch="getAircraftsByCode" :pagination="tableRequset"></LTable>
+        <LTable ref="table" :defaultFetch="false" :showColumnSetting="false" :columns="columns" :dataSource="dialogTableData" :options="options" :fetch="getAircraftsByCode" :pagination="tableRequset"></LTable>
       </div>
     </div>
+    <!-- 查看飞机健康状态 -->
+    <FaultStatisticsDialog ref="FaultStatisticsDialog" />
   </el-dialog>
 </template>
 
 <script>
 import { columns, options, defaultProps } from './index.js'
 import { getAircaftTypeAndModelTree, getAircraftsByCode } from '@/api/task/carrierFlightMission'
+import FaultStatisticsDialog from './FaultStatisticsDialog/index.vue'
 export default {
   name: 'FittingsModal',
-  components: {},
+  components: { FaultStatisticsDialog },
   props: { taskId: {} },
   data() {
     // 这里存放数据
@@ -81,7 +84,38 @@ export default {
     select(row) {
       this.$emit('select', row)
       this.fittingsVisible = false
+    },
+    look(row) {
+      this.$refs.FaultStatisticsDialog.opneDialog(row)
     }
+    // onFaultStatisticsDialogOpen() {
+    //   const modal = document.querySelector('.el-dialog__modal')
+    //   if (modal) {
+    //     modal.style.position = 'absolute'
+    //     modal.style.zIndex = 999
+
+    //     const dialog = this.$refs.FaultStatisticsDialog.$el
+    //     const rect = dialog.getBoundingClientRect()
+    //     modal.style.top = rect.top + 'px'
+    //     modal.style.left = rect.left + 'px'
+    //     modal.style.width = rect.width + 'px'
+    //     modal.style.height = rect.height + 'px'
+    //   }
+    // },
+    // onFaultStatisticsDialogClose() {
+    //   const modal = document.querySelector('.el-dialog__modal')
+    //   if (modal) {
+    //     modal.style.position = 'fixed'
+    //     modal.style.zIndex = 2000
+
+    //     const dialog = this.$refs.FaultStatisticsDialog.$el
+    //     const rect = dialog.getBoundingClientRect()
+    //     modal.style.top = '0'
+    //     modal.style.left = '0'
+    //     modal.style.width = '100%'
+    //     modal.style.height = '100%'
+    //   }
+    // }
   }
 }
 </script>

+ 41 - 2
src/components/TagsView/index.scss

@@ -18,6 +18,45 @@
     padding-right: 16px;
     position: relative;
     z-index: 2;
+    
+    // 一级标签样式
+    &.level-1 {
+      // .tags-view-item-content {
+      //   background-color: #1890ff;
+      // }
+      color: #30daff;
+      &.active {
+        color: #ffdc18e7 !important;
+      }
+    }
+    
+    // 二级标签样式
+    &.level-2 {
+      // .tags-view-item-content {
+      //   background-color: #52c41a;
+      // }
+      color: #30daff;
+      &.active {
+        color: #ffdc18e7 !important;
+      }
+      &:not(.active):hover{
+        color: #30daff !important;
+      }
+    }
+    
+    // 三级标签样式
+    &.level-3 {
+      // .tags-view-item-content {
+      //   background-color: #722ed1;
+      // }
+      color:#722ed1;
+      &.active {
+        color: #ffdc18e7 !important;
+      }
+      &:not(.active):hover{
+        color: #722ed1 !important;
+      }
+    }
     &-left {
       height: 100%;
       width: 22px;
@@ -64,11 +103,11 @@
     }
     i:hover {
       background-color: $theme-color;
-      color: #30daff !important;
+      color: #ffdc18e7 !important;
     }
   }
   .active {
-    color: #30daff !important;
+    color: #ffdc18e7 !important;
   }
 }
 

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

@@ -23,7 +23,8 @@
               <div class="tags-view-item-right"></div>
             </div>
           </el-tooltip>
-          <div v-else @click.self="to(item.fullPath)" @contextmenu.prevent="openmenu($event, index)" class="tags-view-item" :class="isActive(item) ? 'active' : ''">
+          <!-- <div v-else @click.self="to(item.fullPath)" @contextmenu.prevent="openmenu($event, index)" class="tags-view-item" :class="isActive(item) ? 'active' : ''"> -->
+          <div v-else @click.self="to(item.fullPath)" @contextmenu.prevent="openmenu($event, index)" class="tags-view-item" :class="[isActive(item) ? 'active' : '', 'level-' + item.path.split('/').filter(Boolean).length]">
             {{ item.meta.title }}
             <i class="el-icon-close" @click.stop="onClose(index)" v-if="item.fullPath !== '/home'"></i>
             <div class="tags-view-item-left"></div>

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

@@ -29,10 +29,3 @@ export default {
   methods: {}
 }
 </script>
-
-<style lang="scss" scoped>
-.childMenu {
-  max-height: 500px;
-  overflow: hidden;
-}
-</style>

+ 40 - 1
src/store/modules/app.js

@@ -6,13 +6,52 @@ export default {
     tagsViewList: getItem(TAGS_VIEW) || []
   },
   mutations: {
-    //   添加tags
+    //   添加tags,限制最多保留5个标签(不包括首页)
     addTagsViewList(state, tag) {
       const isFind = state.tagsViewList.find((item) => {
         return item.path === tag.path
       })
       if (!isFind) {
+        // 检查是否为同一功能模块的子页面
+        const isSameModule = state.tagsViewList.some((item) => {
+          const itemPath = item.path.split('/')[2]
+          const tagPath = tag.path.split('/')[2]
+          return itemPath === tagPath
+        })
+
+        // 如果是同一模块的子页面,替换该模块最早的子页面标签
+        if (isSameModule) {
+          // const moduleIndex = state.tagsViewList.findIndex((item) => {
+          //   const itemPath = item.path.split('/')[2]
+          //   const tagPath = tag.path.split('/')[2]
+          //   return itemPath === tagPath && item.fullPath !== '/home'
+          // })
+          // if (moduleIndex !== -1) {
+          //   state.tagsViewList.splice(moduleIndex, 1)
+          // }
+
+          const modulePath = tag.path.split('/')[2]
+          const modulePages = state.tagsViewList.filter((item) => {
+            return item.path.split('/')[2] === modulePath && item.fullPath !== '/home'
+          })
+          if (modulePages.length > 1) {
+            //保留最早和最新的子页面
+            const firstPage = modulePages[0]
+            state.tagsViewList = state.tagsViewList.filter((item) => {
+              return item.path.split('/')[2] !== modulePath || item === firstPage
+            })
+          }
+        }
+
         state.tagsViewList.push(tag)
+        // 如果标签数超过5个(不包括首页),删除最早添加的非首页标签
+        if (state.tagsViewList.length > 6) {
+          // 找到第一个非首页的标签的索引
+          const firstNonHomeIndex = state.tagsViewList.findIndex((item) => item.fullPath !== '/home')
+          if (firstNonHomeIndex !== -1) {
+            state.tagsViewList.splice(firstNonHomeIndex, 1)
+          }
+        }
         setItem(TAGS_VIEW, state.tagsViewList)
       }
     },

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

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

+ 11 - 170
src/views/carrierStandard/carrierAllAudit/components/carrierAllAuditLook/index.js

@@ -1,184 +1,25 @@
 export const defaultProps = {
-  children: 'children',
-  label: 'aircraftTypeName'
+  children: 'flyTaskAircraftVos',
+  label: 'aircaftCatalogCode'
 }
-export const mockTableData = [
-  {
-    aircraftTypeName: '全部',
-    parentTypeName: '',
-    parentTypeId: '1',
-    id: '1.1',
-    numbering: '01.1',
-    sequence: '1.1',
-    status: 0,
-    children: [
-      {
-        aircraftTypeName: '歼-20 TZ_001',
-        parentTypeName: '全部',
-        parentTypeId: '',
-        id: '1',
-        numbering: '01',
-        sequence: '1',
-        status: 1
-      },
-      {
-        aircraftTypeName: '歼-20 TZ_002',
-        parentTypeName: '全部',
-        parentTypeId: '',
-        id: '2',
-        numbering: '02',
-        sequence: '2',
-        status: 1
-      },
-      {
-        aircraftTypeName: '歼-20 TZ_003',
-        parentTypeName: '全部',
-        parentTypeId: '',
-        id: '3',
-        numbering: '03',
-        sequence: '3',
-        status: 1
-      },
-      {
-        aircraftTypeName: '歼-20 TZ_004',
-        parentTypeName: '全部',
-        parentTypeId: '',
-        id: '4',
-        numbering: '04',
-        sequence: '4',
-        status: 1
-      },
-      {
-        aircraftTypeName: '歼-20 TZ_005',
-        parentTypeName: '全部',
-        parentTypeId: '',
-        id: '5',
-        numbering: '05',
-        sequence: '5',
-        status: 1
-      },
-      {
-        aircraftTypeName: '歼-20 TZ_006',
-        parentTypeName: '全部',
-        parentTypeId: '',
-        id: '6',
-        numbering: '06',
-        sequence: '4',
-        status: 1
-      },
-      {
-        aircraftTypeName: '歼-20 TZ_007',
-        parentTypeName: '全部',
-        parentTypeId: '',
-        id: '7',
-        numbering: '07',
-        sequence: '7',
-        status: 1
-      }
-    ]
-  }
-]
-
-export const tableData = [
-  {
-    sparePartsCoding: '201',
-    sparePartsName: '后轮',
-    sparePartsModel: 'J-20',
-    meteringUnit: '个',
-    aircraft: '001',
-    sparePartsCoding: '轰炸机',
-    carryQuantity: '10',
-    unitPrice: '100',
-    amount: '1000',
-    updateTime: '2022-10-12',
-    cjr: '张某某',
-    hcfl: '军械'
-  },
-  {
-    sparePartsCoding: '201',
-    sparePartsName: '后轮',
-    meteringUnit: '个',
-    aircraft: '001',
-    sparePartsModel: 'J-20',
-    sparePartsCoding: 'J20',
-    carryQuantity: '1',
-    unitPrice: '99',
-    amount: '99',
-    updateTime: '2022-10-12',
-    cjr: '张某某',
-    hcfl: '无线电'
-  }
-]
 
 export const treeObj = {
   title: '任务飞机',
   activityheight: '275px',
   searchIcon: false,
-  configure: defaultProps
+  configure: {
+    children: 'flyTaskAircraftVos',
+    label: 'aircaftCatalogCode'
+  }
 }
 
-export const fjList = [
-  {
-    aircraftTypeName: '歼-20 TZ_001',
-    parentTypeName: '全部',
-    parentTypeId: '',
-    id: '1',
-    numbering: '01',
-    sequence: '1',
-    status: 1
-  },
-  {
-    aircraftTypeName: '歼-20 TZ_002',
-    parentTypeName: '全部',
-    parentTypeId: '',
-    id: '2',
-    numbering: '02',
-    sequence: '2',
-    status: 1
-  },
-  {
-    aircraftTypeName: '歼-20 TZ_003',
-    parentTypeName: '全部',
-    parentTypeId: '',
-    id: '3',
-    numbering: '03',
-    sequence: '3',
-    status: 1
-  },
-  {
-    aircraftTypeName: '歼-20 TZ_004',
-    parentTypeName: '全部',
-    parentTypeId: '',
-    id: '4',
-    numbering: '04',
-    sequence: '4',
-    status: 1
-  },
-  {
-    aircraftTypeName: '歼-20 TZ_005',
-    parentTypeName: '全部',
-    parentTypeId: '',
-    id: '5',
-    numbering: '05',
-    sequence: '5',
-    status: 1
-  },
+export const addModeOptions = [
   {
-    aircraftTypeName: '歼-20 TZ_006',
-    parentTypeName: '全部',
-    parentTypeId: '',
-    id: '6',
-    numbering: '06',
-    sequence: '4',
-    status: 1
+    value: '1',
+    label: '追加'
   },
   {
-    aircraftTypeName: '歼-20 TZ_007',
-    parentTypeName: '全部',
-    parentTypeId: '',
-    id: '7',
-    numbering: '07',
-    sequence: '7',
-    status: 1
+    value: '2',
+    label: '覆盖'
   }
 ]

+ 12 - 9
src/views/carrierStandard/carrierAllAudit/components/carrierAllAuditLook/index.scss

@@ -1,26 +1,29 @@
+.view-AerospaceCompileLineList-left {
+}
 .view-AerospaceCompileLineList-left {
   width: 300px;
 }
-.view-AerospaceCompileLineList-right-carrierAllAuditLook {
-  flex: 1;
+.view-AerospaceCompileLineList-right {
+  width: calc(100% - 330px);
+  margin-left: 30px;
 }
 .view-AerospaceCompileLineList {
   display: flex;
   flex-shrink: 0;
 }
-.view-AerospaceCompileLineList-right-carrierAllAuditLook-btn-right {
+.view-AerospaceCompileLineList-right-btn-right {
   display: flex;
   flex-shrink: 0;
 }
-.view-AerospaceCompileLineList-right-carrierAllAuditLook-btn {
+.view-AerospaceCompileLineList-right-btn {
   display: flex;
   flex-shrink: 0;
-  justify-content: right;
+  justify-content: space-between;
 }
-.view-CarrierListMachineryPreparation .view-AerospaceCompileLineList-right-carrierAllAuditLook-btn {
+.view-CarrierListMachineryPreparation .view-AerospaceCompileLineList-right-btn {
   margin-top: 30px;
 }
-.view-AerospaceCompileLineList-right-carrierAllAuditLook-btn-right-select {
+.view-AerospaceCompileLineList-right-btn-right-select {
   display: flex;
   align-items: center;
   margin-right: 30px;
@@ -30,10 +33,10 @@
     width: 60px;
   }
 }
-.view-AerospaceCompileLineList-right-carrierAllAuditLook-table {
+.view-AerospaceCompileLineList-right-table {
   margin-top: 30px;
   .el-table {
-    height: 520px;
+    height: 530px;
   }
 }
 

+ 230 - 19
src/views/carrierStandard/carrierAllAudit/components/carrierAllAuditLook/index.vue

@@ -1,24 +1,29 @@
 <template>
   <div class="view-CarrierListMachineryPreparation">
-    <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook">
-      <MissionDetail :detail="detail" />
-      <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook-btn">
-        <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook-btn-right">
+    <div class="view-AerospaceCompileLineList-left">
+      <MenuTree ref="tree" nodeKey="flyTaskAircaftId" :currentNodeKey="currentNodeKey" :treedata="menuTreeData" @TreeNodeclick="treeNodeClick" v-bind="treeObj"> </MenuTree>
+    </div>
+    <div class="view-AerospaceCompileLineList-right">
+      <!-- <MissionDetail :detail="detail" /> -->
+      <div class="view-AerospaceCompileLineList-right-btn">
+        <div class="view-AerospaceCompileLineList-right-btn-left"></div>
+        <div class="view-AerospaceCompileLineList-right-btn-right">
           <el-input placeholder="请输入内容" @keyup.enter.native="getqueryCarryingMainteOrgan('searchValue')" v-model="searchValue" class="input-with-select">
             <el-button @click="getqueryCarryingMainteOrgan('searchValue')" slot="append" icon="el-icon-search"></el-button>
           </el-input>
         </div>
       </div>
 
-      <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook-table">
-        <el-table :data="tableData" border style="width: 100%">
+      <div class="view-AerospaceCompileLineList-right-table">
+        <el-table :data="tableData" border style="width: 100%" height="calc(100vh - 350px)">
           <el-table-column prop="avmatCatalogCode" label="航材编码"> </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="avmatCategoriesName" label="航材分类" align="center"> </el-table-column>
           <el-table-column prop="unit" label="计量单位" align="center"> </el-table-column>
-          <el-table-column prop="carryQuantity" label="携总带数量" align="center"> </el-table-column>
-          <el-table-column prop="purchasePrice" 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>
+          <el-table-column prop="purchasePrice" label="单价/万元" align="center"> </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>
@@ -34,56 +39,160 @@
         style="padding: 20px; text-align: center"
       >
       </el-pagination>
+
+      <!-- 选择航材 -->
+      <AviationMaterialsModal ref="AviationMaterialsModal" avmatType="0" @select="selectAviationMaterialsModal" />
+
+      <!-- 自动生成 -->
+      <el-dialog title="数量自动计算" :visible.sync="dialogVisible" width="500px" :before-close="generationHandleClose">
+        <div class="auto-generation">
+          <span>计算模型</span>
+          <el-select v-model="formulaValue" placeholder="请选择">
+            <el-option v-for="item in formulaOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+          </el-select>
+        </div>
+        <div class="auto-generation">
+          <span>公式展示</span>
+          <el-input v-model="formulaDisplay" placeholder="公式展示"></el-input>
+        </div>
+        <!-- <div class="auto-generation">
+          <span>添加方式</span>
+          <el-radio-group v-model="addModeValue">
+            <el-radio v-for="item in addModeOptions" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
+          </el-radio-group>
+        </div> -->
+
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="generationHandleClose">取 消</el-button>
+          <el-button type="primary" @click="generationHandelClick">确 定</el-button>
+        </span>
+      </el-dialog>
+      <!-- 同步生成 -->
+      <el-dialog title="同步生成" :visible.sync="fjdialogVisible" width="500px" :before-close="fjHandleClose">
+        <div class="auto-generation">
+          <span>目标飞机</span>
+          <el-select ref="onSelect" v-model="fjValue" placeholder="请选择">
+            <el-option hidden :value="fjValue" :label="fjName"></el-option>
+            <el-tree default-expand-all :data="menuTreeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
+          </el-select>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="fjHandleClose">取 消</el-button>
+          <el-button type="primary" @click="fjHandelClick">确 定</el-button>
+        </span>
+      </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
-import { fjList, tableData } from './index'
-import { queryFlyTaskAircraft, queryCarryingMainteOrgan } from '@/api/carrierStandard/carrierListMachineryPreparation'
+import vue from 'vue'
+import { treeObj, addModeOptions } from './index'
+import { useMessage } from '@/utils/element-ui'
+import { queryFlyTaskAircraft, queryCarryingMainteOrgan, batchAddCarryingMainteOrgan, removeCarryingMainteOrgan, syncCarryingMainteOrgan } from '@/api/carrierStandard/carrierListMachineryPreparation'
+
 export default {
-  name: 'carrierAllAuditLook',
+  name: 'CarrierListMachineryPreparationLook',
   components: {},
   data() {
-    // 这里存放数据
     return {
-      fjdialogVisible: false,
       detail: null,
       taskId: this.$route.params.id,
-      fjValue: '',
-      fjList: fjList,
+      fjdialogVisible: false,
+      fjValue: '', //
+      fjName: '',
+      currentNodeKey: 'null',
+      flyTaskActive: '',
+      menuTreeData: [],
+      treeObj: treeObj,
+      defaultProps: {
+        children: 'flyTaskAircraftVos',
+        label: 'aircaftCatalogId'
+      },
       searchValue: '',
       modelValue: '战斗机',
-      tableData: tableData,
+      modelList: [
+        { label: '战斗机', value: '战斗机' },
+        { label: '运输机', value: '运输机' },
+        { label: '轰炸机', value: '轰炸机' }
+      ],
+
+      tableData: [],
       pagination: {
         total: 100,
-        pageSize: 10,
+        pageSize: 20,
         pageIndex: 1
-      }
+      },
+      cache: 'fdz',
+      activeIndex: null,
+
+      dialogVisible: false,
+      formulaValue: '时长模型',
+      formulaOptions: [
+        { label: '时长模型', value: '时长模型' },
+        { label: '次数模型', value: '次数模型' }
+      ],
+      formulaDisplay: '',
+      addModeValue: '1',
+      addModeOptions: addModeOptions,
+      cacheList: []
     }
   },
   mounted() {
     this.initData()
   },
   methods: {
+    async fjHandelClick() {
+      let postData = {
+        aircaftCatalogId: this.fjValue,
+        aimAircaftCatalogId: this.currentNodeKey
+      }
+      const { code, data } = await syncCarryingMainteOrgan(postData)
+      if (code == 200) {
+        this.fjdialogVisible = false
+        this.fjValue = ''
+        this.fjName = ''
+        useMessage('success', '同步成功', 1000)
+        this.getqueryCarryingMainteOrgan()
+      }
+    },
+    fjHandleClose() {
+      this.fjValue = ''
+      this.fjName = ''
+      this.fjdialogVisible = false
+    },
+    openfj() {
+      this.fjdialogVisible = true
+    },
+    handleNodeClick(data) {
+      const { aircaftCatalogId, flyTaskAircaftId } = data
+      this.fjValue = flyTaskAircaftId
+      this.fjName = aircaftCatalogId
+      this.$refs.onSelect.blur()
+    },
     async initData() {
       let postData = {
         taskId: this.taskId
       }
       const { code, data } = await queryFlyTaskAircraft(postData)
       if (code == 200) {
+        this.menuTreeData = data.flys
         this.detail = data
+        this.currentNodeKey = this.menuTreeData[0].flyTaskAircaftId
+        this.currentNode = this.menuTreeData[0]
         this.getqueryCarryingMainteOrgan()
         this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '机务清单总体审核-查看详情', newTitle: `机务清单总体审核-查看详情-${this.detail.taskName}` })
       }
     },
+
     async getqueryCarryingMainteOrgan(searchValue) {
       searchValue ? (this.pagination.pageIndex = 1) : (this.pagination.pageIndex = this.pagination.pageIndex)
       let postData = {
         pageIndex: this.pagination.pageIndex,
         pageSize: this.pagination.pageSize,
-        queryParam: this.searchValue,
+        flyTaskAircaftId: this.currentNodeKey,
         taskId: this.taskId,
+        queryParam: this.searchValue,
         avmatType: '0'
       }
       const { code, data } = await queryCarryingMainteOrgan(postData)
@@ -92,6 +201,7 @@ export default {
         this.pagination.total = data.totalCount
       }
     },
+
     handleIndexChange(val) {
       this.pagination.pageIndex = val
       this.getqueryCarryingMainteOrgan()
@@ -99,6 +209,107 @@ export default {
     handleSizeChange(val) {
       this.pagination.pageSize = val
       this.getqueryCarryingMainteOrgan()
+    },
+    treeNodeClick(node) {
+      this.pagination.pageIndex = 1
+      this.currentNodeKey = node.flyTaskAircaftId
+      this.flyTaskActive = node.aircaftCatalogCode
+      this.currentNode = node
+      this.getqueryCarryingMainteOrgan()
+    },
+    handleRemoveClick(index, row) {
+      if (row.mainteOrganId) {
+        this.$confirm('是否删除该航材', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(async () => {
+            const { code, data } = await removeCarryingMainteOrgan([row.mainteOrganId])
+            if (code == 200) {
+              this.getqueryCarryingMainteOrgan()
+              useMessage('success', '删除成功', 1000)
+            }
+          })
+          .catch(() => {})
+      } else {
+        this.tableData.splice(index, 1)
+        this.$message({
+          type: 'success',
+          message: '操作成功!'
+        })
+      }
+    },
+    carryQuantityBlur(index, row) {
+      row.carryQuantity = row.carryQuantity.value
+      this.tableData[index] = row
+    },
+    addRow() {
+      let obj = {
+        avmatCatalogCode: '', //编码
+        avmatCatalogName: '', // 航材名称
+        specification: '', // 航材型号
+        avmatCategoriesName: '', // 航材分类
+        unit: '',
+        aircaftCatalogCode: this.flyTaskActive, // 指向飞机
+        flyTaskAircaftId: this.currentNodeKey, // 指向飞机的ID
+        taskId: this.taskId,
+        carryQuantity: {
+          // 携带数量
+          value: ''
+        },
+        purchasePrice: '', // 价格
+        updateTime: '' // 更新时间
+      }
+      this.tableData.unshift(obj)
+      this.cacheList.unshift(obj)
+    },
+    editCarryQuantity(index, row) {
+      let value = row.carryQuantity
+      row.carryQuantity = {}
+      vue.set(row.carryQuantity, 'value', value)
+      this.tableData[index] = row
+    },
+    sparePartsCodingClick(index, row) {
+      this.activeIndex = index
+      this.$refs.AviationMaterialsModal.openFittings()
+    },
+    closeStructureEquipping() {},
+    dialogFetchTableData() {},
+
+    selectAviationMaterialsModal(row) {
+      for (const key in this.tableData[this.activeIndex]) {
+        if (key && row[key]) {
+          vue.set(this.tableData[this.activeIndex], key, row[key])
+        }
+      }
+      this.fittingsVisible = false
+      this.activeIndex = null
+    },
+    openDialogVisible() {
+      this.dialogVisible = true
+    },
+    generationHandleClose() {
+      this.dialogVisible = false
+    },
+    generationHandelClick() {
+      useMessage('success', '生成成功', 1000)
+      this.dialogVisible = false
+    },
+    async save() {
+      for (let index = 0; index < this.tableData.length; index++) {
+        const element = this.tableData[index]
+        if (element.avmatCatalogCode == '' || element.carryQuantity == '') {
+          useMessage('error', `第${index + 1}行数据没有填写完整`, 1000)
+          return
+        }
+      }
+      const { code, data } = await batchAddCarryingMainteOrgan(this.tableData)
+      if (code == 200) {
+        useMessage('success', '保存成功', 1000)
+        this.cacheList = []
+        this.getqueryCarryingMainteOrgan()
+      }
     }
   }
 }

+ 20 - 4
src/views/carrierStandard/carrierAllAudit/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="view-carrierFlightMission">
-    <div class="view-carrierFlightMission-FlightMission-btn-mc">
+    <div class="view-common-header">
+      <div class="view-common-header-left">
+        <el-button type="success" :disabled="tableData.length == 0" @click="allExport()">导出</el-button>
+      </div>
       <div class="view-carrierFlightMission-FlightMission-btn-right">
         <div class="input-with-select">
           <span>状态</span>
@@ -21,7 +24,7 @@
 
 <script>
 import { columns, options } from './index'
-import { queryFlyTaskTree, updateFlyTask } from '@/api/task/carrierFlightMission'
+import { queryFlyTaskTree, updateFlyTask, exportExcel } from '@/api/task/carrierFlightMission'
 import { statusList } from '@/utils/status'
 export default {
   name: 'carrierAllAudit',
@@ -102,8 +105,21 @@ export default {
         .catch(() => {})
     },
     look(row) {
-      //   this.$router.push(`/carrierStandard/carrierAllAudit/look/${row.taskId}`)
-      this.$router.push(`/carrierStandard/carrierListMachineryPreparation/look/${row.taskId}`)
+      this.$router.push(`/carrierStandard/carrierAllAudit/look/${row.taskId}`)
+      // this.$router.push(`/carrierStandard/carrierListMachineryPreparation/look/${row.taskId}`)
+    },
+    //导出全部
+    allExport() {
+      debugger
+      var status = this.statusValue
+      if (status == null) {
+        status = ''
+      }
+      let params = {
+        queryParam: this.searchValue,
+        status: status
+      }
+      exportExcel(params)
     }
   }
 }

+ 1 - 1
src/views/carrierStandard/carrierListMachineryPreparation/components/look/index.vue

@@ -181,7 +181,7 @@ export default {
         this.currentNodeKey = this.menuTreeData[0].flyTaskAircaftId
         this.currentNode = this.menuTreeData[0]
         this.getqueryCarryingMainteOrgan()
-        this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '携行清单机务编制-查看详情', newTitle: `携行清单机务编制-查看详情-${this.detail.taskName}` })
+        this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '携行清单机务编修-查看详情', newTitle: `携行清单机务编修-查看详情-${this.detail.taskName}` })
       }
     },
 

+ 19 - 2
src/views/carrierStandard/carrierListMachineryPreparation/index.vue

@@ -1,6 +1,10 @@
 <template>
   <div class="view-carrierFlightMission">
-    <div class="view-carrierFlightMission-FlightMission-btn-mc">
+    <div class="view-common-header">
+      <div class="view-common-header-left">
+        <el-button type="success" :disabled="tableData.length == 0" @click="allExport()">导出</el-button>
+      </div>
+
       <div class="view-carrierFlightMission-FlightMission-btn-right">
         <div class="input-with-select">
           <span>状态</span>
@@ -13,6 +17,7 @@
         </el-input>
       </div>
     </div>
+
     <div class="view-carrierFlightMission-FlightMission-table">
       <LTable ref="table" :defaultFetch="false" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData"></LTable>
     </div>
@@ -21,7 +26,7 @@
 
 <script>
 import { columns, options } from './index'
-import { queryFlyTaskTree, updateFlyTask } from '@/api/task/carrierFlightMission'
+import { queryFlyTaskTree, updateFlyTask, exportExcel } from '@/api/task/carrierFlightMission'
 import { statusList } from '@/utils/status'
 
 export default {
@@ -100,6 +105,18 @@ export default {
           }
         })
         .catch(() => {})
+    },
+    //导出全部
+    allExport() {
+      var status = this.statusValue
+      if (status == null) {
+        status = ''
+      }
+      let params = {
+        queryParam: this.searchValue,
+        status: status
+      }
+      exportExcel(params)
     }
   }
 }

+ 8 - 8
src/views/carrierStandard/carrierListShipping/components/compile/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="view-CarrierListMachineryPreparation-c">
     <div class="view-CarrierListMachineryPreparation-box">
-      <!-- <div class="view-CarrierListMachineryPreparation-box-left">
-        <el-radio-group v-model="summarizing">
-          <el-radio-button label="汇总数据"></el-radio-button>
-          <el-radio-button label="原数据"></el-radio-button>
-        </el-radio-group>
-      </div> -->
+      <!-- <div class="view-CarrierListMachineryPreparation-box-left"> -->
+      <!-- <el-radio-group v-model="summarizing"> -->
+      <!-- <el-radio-button label="汇总数据"></el-radio-button> -->
+      <!-- <el-radio-button label="原数据"></el-radio-button> -->
+      <!-- </el-radio-group> -->
+      <!-- </div> -->
 
       <div class="view-CarrierListMachineryPreparation-box-right">
         <MissionDetail :detail="detail" />
@@ -29,7 +29,7 @@ export default {
   data() {
     // 这里存放数据
     return {
-      summarizing: '汇总数据',
+      summarizing: '数据',
       detail: null
     }
   },
@@ -44,7 +44,7 @@ export default {
       const { code, data } = await queryFlyTaskAircraft(postData)
       if (code == 200) {
         this.detail = data
-        this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '携行清单航材编制-编制', newTitle: `携行清单航材编制-编制-${this.detail.taskName}` })
+        this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '携行清单航材编修-编修', newTitle: `携行清单航材编修-编修-${this.detail.taskName}` })
       }
     }
   }

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

@@ -110,7 +110,7 @@ export default {
       const { code, data } = await getFlyTaskAircraft(postData)
       if (code == 200) {
         this.detail = data
-        this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '飞行任务管理-任务飞机', newTitle: `飞行任务管理-任务飞机-${this.detail.taskCode}` })
+        this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '飞行任务管理-任务飞机', newTitle: `飞行任务管理-任务飞机-${this.detail.taskName}` })
         this.pagination.total = data.pageResult.totalCount
         this.tableData = data.pageResult.list
       }