Просмотр исходного кода

1.按钮权限 2.隐藏 工艺类型

yusheng 1 год назад
Родитель
Сommit
2bba964142
30 измененных файлов с 1147 добавлено и 790 удалено
  1. 2 0
      src/utils/request.js
  2. 4 0
      src/views/classifyManage/treeClassify/details.vue
  3. 4 0
      src/views/classifyManage/treeClassify/index.vue
  4. 6 0
      src/views/documentManagement/certificateManagement/index.vue
  5. 4 1
      src/views/enterpriseModel/dept/index.vue
  6. 5 1
      src/views/enterpriseModel/regionalManage/index.vue
  7. 4 0
      src/views/factoryModel/factoryManagement/index.vue
  8. 10 0
      src/views/factoryModel/jobManagement/index.vue
  9. 4 0
      src/views/factoryModel/plant/index.vue
  10. 11 3
      src/views/factoryModel/productionLine/index.vue
  11. 7 3
      src/views/factoryModel/qualificationManagement/index.vue
  12. 3 0
      src/views/factoryModel/station/index.vue
  13. 161 134
      src/views/factoryModel/workshop/index.vue
  14. 629 453
      src/views/material/BOMmanage/detailsPop.vue
  15. 2 2
      src/views/material/BOMmanage/index.vue
  16. 20 4
      src/views/material/product/components/index-data.vue
  17. 7 3
      src/views/system/organization/components/org-user-list.vue
  18. 5 0
      src/views/system/organization/index.vue
  19. 5 0
      src/views/technology/control/index.vue
  20. 6 1
      src/views/technology/parameter/index.vue
  21. 13 3
      src/views/technology/productParam/index.vue
  22. 2 11
      src/views/technology/production/components/user-edit.vue
  23. 18 9
      src/views/technology/production/index.vue
  24. 5 3
      src/views/technology/route/index.vue
  25. 9 0
      src/views/technology/stepManagement/index.vue
  26. 10 2
      src/views/technology/version/index.vue
  27. 3 0
      src/views/technology/work/index.vue
  28. 5 0
      src/views/workforceManagement/classes/index.vue
  29. 179 157
      src/views/workforceManagement/schedule/index.vue
  30. 4 0
      src/views/workforceManagement/team/index.vue

+ 2 - 0
src/utils/request.js

@@ -94,6 +94,8 @@ console.log(res,'*******************');
         });
       }
       return Promise.reject(new Error(error.response.data?.message));
+    }else if(!error?.response?.status){
+      Message.error('服务调用失败,请联系管理员!');
     }
     return Promise.reject(error);
   }

+ 4 - 0
src/views/classifyManage/treeClassify/details.vue

@@ -16,6 +16,7 @@
                 icon="el-icon-plus"
                 class="ele-btn-icon"
                 @click="openEdit(true)"
+                v-if="$hasPermission('main:categorylevel:save')"
               >
                 新建下级节点
               </el-button>
@@ -26,6 +27,7 @@
                 class="ele-btn-icon"
                 :disabled="!current.id || current.id == rootId"
                 @click="openEdit(false)"
+                v-if="$hasPermission('main:categorylevel:update')"
               >
                 编辑节点
               </el-button>
@@ -36,6 +38,8 @@
                 class="ele-btn-icon"
                 :disabled="!current.id || current.id == rootId"
                 @click="deleteCategory"
+                v-if="$hasPermission('main:categorylevel:delete')"
+
               >
                 删除
               </el-button>

+ 4 - 0
src/views/classifyManage/treeClassify/index.vue

@@ -18,6 +18,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openAddDialog(null)"
+            v-if="$hasPermission('main:categorylevel:save')"
           >
             新建
           </el-button>
@@ -38,6 +39,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openAddDialog(row)"
+            v-if="$hasPermission('main:categorylevel:update')"
           >
             编辑
           </el-link>
@@ -54,6 +56,8 @@
             class="ele-action"
             title="确定要删除此分类吗?"
             @confirm="deleteCategory(row)"
+            v-if="$hasPermission('main:categorylevel:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 6 - 0
src/views/documentManagement/certificateManagement/index.vue

@@ -16,6 +16,8 @@
         <!-- 工具栏 -->
         <template v-slot:toolbar>
           <el-button type="primary" icon="el-icon-plus" @click="handleUpload()"
+          v-if="$hasPermission('main:identityphoto:save')"
+
             >新建</el-button
           >
           <!-- <el-button type="primary" @click="handleUpload">导入</el-button> -->
@@ -52,6 +54,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="handleUpload(row)"
+          v-if="$hasPermission('main:identityphoto:save')"
+
           >
             修改
           </el-link>
@@ -59,6 +63,8 @@
             class="ele-action"
             title="确定要删除此信息吗?"
             @confirm="remove([row.id])"
+          v-if="$hasPermission('main:identityphoto:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 4 - 1
src/views/enterpriseModel/dept/index.vue

@@ -20,6 +20,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit()"
+            v-if="$hasPermission('main:group:save')"
           >
             添加
           </el-button>
@@ -77,6 +78,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit(row)"
+            v-if="$hasPermission('main:group:update')"
+
           >
             修改
           </el-link>
@@ -84,7 +87,7 @@
             class="ele-action"
             title="确定要删除吗?"
             @confirm="remove(row)"
-            v-if="row.id != 99999"
+            v-if="row.id != 99999&&$hasPermission('main:group:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 5 - 1
src/views/enterpriseModel/regionalManage/index.vue

@@ -21,6 +21,8 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('add')"
+            v-if="$hasPermission('main:basicarea:save')"
+
           >
             添加
           </el-button>
@@ -44,6 +46,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit('update',row)"
+            v-if="$hasPermission('main:basicarea:update')"
+
           >
             修改
           </el-link>
@@ -51,7 +55,7 @@
             class="ele-action"
             title="确定要删除吗?"
             @confirm="remove(row)"
-            v-if="row.id != 99999"
+            v-if="row.id != 99999&&$hasPermission('main:basicarea:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 4 - 0
src/views/factoryModel/factoryManagement/index.vue

@@ -20,6 +20,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('add')"
+            v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
           >
             添加
           </el-button>
@@ -37,6 +38,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit('edit', row)"
+            v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
           >
             修改
           </el-link>
@@ -44,6 +46,8 @@
             class="ele-action"
             title="确定要删除此角色吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:factoryarea:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 10 - 0
src/views/factoryModel/jobManagement/index.vue

@@ -22,6 +22,8 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit()"
+            v-if="$hasPermission('main:profession:save')"
+
           >
             新建
           </el-button>
@@ -32,6 +34,8 @@
             class="ele-btn-icon"
             @click="removeBatch"
             plain
+            v-if="$hasPermission('main:profession:delete')"
+
           >
             删除
           </el-button>
@@ -49,6 +53,8 @@
             type="primary"
             icon="el-icon-download"
             class="ele-btn-icon"
+            v-if="$hasPermission('main:profession:update')"
+
             plain
           >
             导入
@@ -62,6 +68,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit(row)"
+            v-if="$hasPermission('main:profession:update')"
+
           >
             修改
           </el-link>
@@ -78,6 +86,8 @@
             class="ele-action"
             title="确定要删除当前工种吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:profession:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 4 - 0
src/views/factoryModel/plant/index.vue

@@ -24,6 +24,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('add')"
+            v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
           >
             添加
           </el-button>
@@ -47,6 +48,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit('edit', row)"
+            v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
           >
             修改
           </el-link>
@@ -54,6 +56,8 @@
             class="ele-action"
             title="确定要删除此角色吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:factoryarea:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 11 - 3
src/views/factoryModel/productionLine/index.vue

@@ -13,7 +13,9 @@
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
-          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit('add')">
+          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit('add')"
+          v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
+          >
             添加
           </el-button>
         </template>
@@ -28,10 +30,16 @@
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit('edit', row)">
+          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit('edit', row)"
+          v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
+          
+          >
             修改
           </el-link>
-          <el-popconfirm class="ele-action" title="确定要删除此角色吗?" @confirm="remove(row)">
+          <el-popconfirm class="ele-action" title="确定要删除此角色吗?" @confirm="remove(row)"
+          v-if="$hasPermission('main:factoryarea:delete')"
+          
+          >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
                 删除

+ 7 - 3
src/views/factoryModel/qualificationManagement/index.vue

@@ -23,6 +23,8 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('','add')"
+            v-if="$hasPermission('main:professionCertification:save')"
+
           >
             新建
           </el-button>
@@ -32,6 +34,8 @@
             icon="el-icon-delete"
             class="ele-btn-icon"
             @click="removeBatch"
+            v-if="$hasPermission('main:professionCertification:delete')"
+
             plain
           >
             删除
@@ -59,7 +63,7 @@
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
-            v-if="[0,3].includes(row.processStatus)"
+            v-if="[0,3].includes(row.processStatus)&&$hasPermission('main:professionCertification:update')"
             type="primary"
             :underline="false"
             icon="el-icon-edit"
@@ -77,7 +81,7 @@
             详情
           </el-link>
           <el-link
-            v-if="[0,3].includes(row.processStatus)"
+            v-if="[0,3].includes(row.processStatus)&&$hasPermission('main:professionCertification:update')"
             type="primary"
             :underline="false"
             icon="el-icon-plus"
@@ -87,7 +91,7 @@
           <el-popconfirm
             class="ele-action"
             title="确定要删除当前资质吗?"
-            v-if="[0,3].includes(row.processStatus)"
+            v-if="[0,3].includes(row.processStatus)&&$hasPermission('main:professionCertification:delete')"
             @confirm="remove(row)"
           >
             <template v-slot:reference>

+ 3 - 0
src/views/factoryModel/station/index.vue

@@ -24,6 +24,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('add')"
+            v-if="$hasPermission('main:factoryworkstation:saveOrUpdate')"
           >
             添加
           </el-button>
@@ -48,6 +49,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit('edit', row)"
+            v-if="$hasPermission('main:factoryworkstation:saveOrUpdate')"
           >
             修改
           </el-link>
@@ -55,6 +57,7 @@
             class="ele-action"
             title="确定要删除此工位吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:factoryworkstation:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 161 - 134
src/views/factoryModel/workshop/index.vue

@@ -1,12 +1,30 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never">
-      <search ref="search" @search="search" :options_groupId="dict.groupId" :options_factory="dict.factory"></search>
-      <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :page-size="pageSize"
-        @columns-change="handleColumnChange" :cache-key="cacheKeyUrl">
+      <search
+        ref="search"
+        @search="search"
+        :options_groupId="dict.groupId"
+        :options_factory="dict.factory"
+      ></search>
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :page-size="pageSize"
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
+      >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
-          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit('add')">
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
+            @click="openEdit('add')"
+          >
             添加
           </el-button>
         </template>
@@ -16,10 +34,21 @@
 
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit('edit', row)">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="openEdit('edit', row)"
+            v-if="$hasPermission('main:factoryarea:saveOrUpdate')"
+          >
             修改
           </el-link>
-          <el-popconfirm class="ele-action" title="确定要删除此角色吗?" @confirm="remove(row)">
+          <el-popconfirm
+            class="ele-action"
+            title="确定要删除此角色吗?"
+            v-if="$hasPermission('main:factoryarea:delete')"
+            @confirm="remove(row)"
+          >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
                 删除
@@ -33,138 +62,136 @@
   </div>
 </template>
 <script>
-import tabMixins from '@/mixins/tableColumnsMixin';
-import search from './components/search.vue';
-import edit from './components/edit.vue';
-import { getFactoryarea, deletefactoryarea } from '@/api/factoryModel';
-import { listOrganizations } from '@/api/system/organization';
-export default {
-  mixins: [tabMixins],
-  components: {
-    search,
-    edit
-  },
-  data() {
-    return {
-      columns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center'
-        },
-        {
-          prop: 'code',
-          label: '车间编码'
-        },
-        {
-          label: '车间名称',
-          prop: 'name'
-        },
-        {
-          label: '所属公司',
-          prop: 'groupId',
-          slot: 'groupId'
-        },
-        {
-          label: '所属工厂',
-          prop: 'factoryName',
-
-        },
-        {
-          label: '所属厂房',
-          prop: 'workshopPlanName',
-          slot: 'factory'
-        },
-        {
-          label: '所属区域',
-          prop: 'areaName',
-        },
-        {
-          label: '详细地址',
-          prop: 'extInfo.location'
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 220,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true
-        }
-      ],
-      dict: {
-        groupId: [],
-        factory: []
-      },
-      pageSize: this.$store.state.tablePageSize,
-      cacheKeyUrl: '8fc13138-factoryModel-workshop'
-    };
-  },
-  created() {
-    this.getGs();
-    this.getFactoryarea();
-  },
-  methods: {
-    datasource({ page, where, limit }) {
-      return getFactoryarea({
-        ...where,
-        pageNum: page,
-        size: limit,
-        type: 3
-      });
-    },
-    search(where) {
-      this.$refs.table.reload({
-        where: where,
-        page: 1
-      });
+  import tabMixins from '@/mixins/tableColumnsMixin';
+  import search from './components/search.vue';
+  import edit from './components/edit.vue';
+  import { getFactoryarea, deletefactoryarea } from '@/api/factoryModel';
+  import { listOrganizations } from '@/api/system/organization';
+  export default {
+    mixins: [tabMixins],
+    components: {
+      search,
+      edit
     },
-    openEdit(type, row) {
-      this.$refs.edit.open(type, row);
-    },
-    // 获取公司数据
-    getGs() {
-      listOrganizations().then((list) => {
-        console.log(list);
-        this.dict.groupId = list;
-      });
+    data() {
+      return {
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center'
+          },
+          {
+            prop: 'code',
+            label: '车间编码'
+          },
+          {
+            label: '车间名称',
+            prop: 'name'
+          },
+          {
+            label: '所属公司',
+            prop: 'groupId',
+            slot: 'groupId'
+          },
+          {
+            label: '所属工厂',
+            prop: 'factoryName'
+          },
+          {
+            label: '所属厂房',
+            prop: 'workshopPlanName',
+            slot: 'factory'
+          },
+          {
+            label: '所属区域',
+            prop: 'areaName'
+          },
+          {
+            label: '详细地址',
+            prop: 'extInfo.location'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 220,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
+        dict: {
+          groupId: [],
+          factory: []
+        },
+        pageSize: this.$store.state.tablePageSize,
+        cacheKeyUrl: '8fc13138-factoryModel-workshop'
+      };
     },
-    // 回显公司名称
-    showgroupName(id) {
-      let result = this.dict.groupId.find((n) => n.id == id);
-      if (result) {
-        return result.name;
-      } else {
-        return '';
-      }
+    created() {
+      this.getGs();
+      this.getFactoryarea();
     },
+    methods: {
+      datasource({ page, where, limit }) {
+        return getFactoryarea({
+          ...where,
+          pageNum: page,
+          size: limit,
+          type: 3
+        });
+      },
+      search(where) {
+        this.$refs.table.reload({
+          where: where,
+          page: 1
+        });
+      },
+      openEdit(type, row) {
+        this.$refs.edit.open(type, row);
+      },
+      // 获取公司数据
+      getGs() {
+        listOrganizations().then((list) => {
+          console.log(list);
+          this.dict.groupId = list;
+        });
+      },
+      // 回显公司名称
+      showgroupName(id) {
+        let result = this.dict.groupId.find((n) => n.id == id);
+        if (result) {
+          return result.name;
+        } else {
+          return '';
+        }
+      },
 
-    // 获取工厂数据
-    getFactoryarea() {
-      let par = {
-        type: 1,
-        size: 9999,
-
-      };
-      getFactoryarea(par).then((res) => {
-        this.dict.factory = res.list;
-      });
-    },
-    remove(row) {
-      deletefactoryarea(row.id)
-        .then((message) => {
-          this.$message.success(message);
-          this.done();
-        })
-        .catch((e) => {
-          this.$message.error(e.message);
+      // 获取工厂数据
+      getFactoryarea() {
+        let par = {
+          type: 1,
+          size: 9999
+        };
+        getFactoryarea(par).then((res) => {
+          this.dict.factory = res.list;
         });
-    },
-    done() {
-      this.$refs.search.search();
+      },
+      remove(row) {
+        deletefactoryarea(row.id)
+          .then((message) => {
+            this.$message.success(message);
+            this.done();
+          })
+          .catch((e) => {
+            this.$message.error(e.message);
+          });
+      },
+      done() {
+        this.$refs.search.search();
+      }
     }
-  }
-};
+  };
 </script>

+ 629 - 453
src/views/material/BOMmanage/detailsPop.vue

@@ -1,112 +1,239 @@
 <template>
   <div>
-    <el-drawer title="" :visible.sync="drawer" :custom-class="isFullscreen ? 'not-fullscreen' : 'is-fullscreen'"
-      :before-close="handleClose" :with-header="false">
+    <el-drawer
+      title=""
+      :visible.sync="drawer"
+      :custom-class="isFullscreen ? 'not-fullscreen' : 'is-fullscreen'"
+      :before-close="handleClose"
+      :with-header="false"
+    >
       <!-- 自定义头部 -->
       <div class="custom-drawer-header" v-if="!isWt">
         <div class="radio_box rx-cc">
-          
-          <el-radio-group size="small" v-model="currentNodeData.bomType" @change="bomChange">
-            <el-radio-button :label="4" v-permissionccc="['main:bomcategory:ebom']">EBOM </el-radio-button>
-            <el-radio-button :label="1" >PBOM </el-radio-button>
+          <el-radio-group
+            size="small"
+            v-model="currentNodeData.bomType"
+            @change="bomChange"
+          >
+            <el-radio-button
+              :label="4"
+              v-permissionccc="['main:bomcategory:ebom']"
+              >EBOM
+            </el-radio-button>
+            <el-radio-button :label="1">PBOM </el-radio-button>
 
             <!-- v-if="
                 searchObj.isProduct ||
                 [1, 9].includes(searchObj.rootPathIdParent)
               " -->
-            <el-radio-button :label="2" v-permissionccc="['main:bomcategory:mbom']">MBOM
+            <el-radio-button
+              :label="2"
+              v-permissionccc="['main:bomcategory:mbom']"
+              >MBOM
             </el-radio-button>
-            <el-radio-button :label="3" v-permissionccc="['main:bomcategory:abom']">ABOM
+            <el-radio-button
+              :label="3"
+              v-permissionccc="['main:bomcategory:abom']"
+              >ABOM
             </el-radio-button>
           </el-radio-group>
 
           <div style="margin-left: 100px">
-            <el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAdd">
+            <el-button
+              type="primary"
+              size="mini"
+              icon="el-icon-plus"
+              @click="handleAdd"
+              v-if="$hasPermission('main:categoryparam:saveBom')"
+            >
               新建
             </el-button>
 
-            <el-button type="danger" size="mini" icon="el-icon-delete" @click="remove" v-if="
-              currentNodeData.approvalStatus == 0 ||
-              currentNodeData.approvalStatus == 3
-            ">
+            <el-button
+              type="danger"
+              size="mini"
+              icon="el-icon-delete"
+              @click="remove"
+              v-if="
+                (currentNodeData.approvalStatus == 0 ||
+                  currentNodeData.approvalStatus == 3) &&
+                $hasPermission('main:categoryparam:deleteBom')
+              "
+            >
               删除
             </el-button>
 
-            <el-button v-if="currentNodeData.bomType == 1" type="primary" size="mini" icon="el-icon-download"
-              plain>导出</el-button>
-
-            <el-button @click="uploadFile" v-if="currentNodeData.bomType == 1" type="primary" size="mini"
-              icon="el-icon-upload2" plain>导入</el-button>
-
-            <el-button type="primary" size="mini" icon="el-icon-refresh" plain @click="transformation('P')"
-              v-if="currentNodeData.bomType == 4">转换PBOM</el-button>
-
-            <el-button type="primary" size="mini" icon="el-icon-refresh" plain @click="transformation('E')"
-              v-if="currentNodeData.bomType == 1">转换EBOM</el-button>
-
-            <el-button type="primary" size="mini" icon="el-icon-refresh" plain @click="transformation('M')" v-if="
-              currentNodeData.bomType == 1 &&
-              (searchObj.isProduct ||
-                [1, 9].includes(searchObj.rootPathIdParent))
-            ">转换MBOM</el-button>
-
-            <el-button type="primary" size="mini" icon="el-icon-refresh" plain @click="transformation('A')" v-if="
-              currentNodeData.bomType == 1 &&
-              (searchObj.isProduct ||
-                [1, 9].includes(searchObj.rootPathIdParent))
-            ">转换ABOM</el-button>
-
-            <el-button type="primary" size="mini" @click="handSubmit" v-if="
-              currentNodeData.approvalStatus == 0 ||
-              currentNodeData.approvalStatus == 3
-            ">
+            <el-button
+              v-if="currentNodeData.bomType == 1"
+              type="primary"
+              size="mini"
+              icon="el-icon-download"
+              plain
+              >导出</el-button
+            >
+
+            <el-button
+              @click="uploadFile"
+              v-if="currentNodeData.bomType == 1"
+              type="primary"
+              size="mini"
+              icon="el-icon-upload2"
+              plain
+              >导入</el-button
+            >
+
+            <el-button
+              type="primary"
+              size="mini"
+              icon="el-icon-refresh"
+              plain
+              @click="transformation('P')"
+              v-if="currentNodeData.bomType == 4"
+              >转换PBOM</el-button
+            >
+
+            <el-button
+              type="primary"
+              size="mini"
+              icon="el-icon-refresh"
+              plain
+              @click="transformation('E')"
+              v-if="currentNodeData.bomType == 1"
+              >转换EBOM</el-button
+            >
+
+            <el-button
+              type="primary"
+              size="mini"
+              icon="el-icon-refresh"
+              plain
+              @click="transformation('M')"
+              v-if="
+                currentNodeData.bomType == 1 &&
+                (searchObj.isProduct ||
+                  [1, 9].includes(searchObj.rootPathIdParent))
+              "
+              >转换MBOM</el-button
+            >
+
+            <el-button
+              type="primary"
+              size="mini"
+              icon="el-icon-refresh"
+              plain
+              @click="transformation('A')"
+              v-if="
+                currentNodeData.bomType == 1 &&
+                (searchObj.isProduct ||
+                  [1, 9].includes(searchObj.rootPathIdParent))
+              "
+              >转换ABOM</el-button
+            >
+
+            <el-button
+              type="primary"
+              size="mini"
+              @click="handSubmit"
+              v-if="
+                currentNodeData.approvalStatus == 0 ||
+                currentNodeData.approvalStatus == 3
+              "
+            >
               提交发布
             </el-button>
 
-            <el-button type="primary" size="mini" @click="handleRefresh" v-if="currentNodeData.approvalStatus != 1">
+            <el-button
+              type="primary"
+              size="mini"
+              @click="handleRefresh"
+              v-if="currentNodeData.approvalStatus != 1"
+            >
               刷新
             </el-button>
           </div>
         </div>
         <div>
-          <el-button type="text" @click="handleDetails()" v-if="isNotData && currentNodeData.approvalStatus == 1"
-            :underline="false">
+          <el-button
+            type="text"
+            @click="handleDetails()"
+            v-if="isNotData && currentNodeData.approvalStatus == 1"
+            :underline="false"
+          >
             {{ approvalStatusOpt[+currentNodeData.approvalStatus] }}
           </el-button>
 
-          <el-button type="text" style="color: #f56c6c" v-if="isNotData && currentNodeData.approvalStatus == 3"
-            :underline="false">
+          <el-button
+            type="text"
+            style="color: #f56c6c"
+            v-if="isNotData && currentNodeData.approvalStatus == 3"
+            :underline="false"
+          >
             {{ approvalStatusOpt[+currentNodeData.approvalStatus] }}
           </el-button>
 
-          <el-button icon="el-icon-full-screen" type="text" @click="handleFull">{{ isFullscreen ? '全屏' : '缩小'
-          }}</el-button>
-          <el-button icon="el-icon-circle-close" type="text" @click="handleClose">关闭</el-button>
+          <el-button
+            icon="el-icon-full-screen"
+            type="text"
+            @click="handleFull"
+            >{{ isFullscreen ? '全屏' : '缩小' }}</el-button
+          >
+          <el-button
+            icon="el-icon-circle-close"
+            type="text"
+            @click="handleClose"
+            >关闭</el-button
+          >
         </div>
       </div>
 
       <!-- 抽屉内容 -->
       <div class="drawer_content">
-        <ele-split-layout width="260px" allow-collapse :resizable="true" :min-size="200" :max-size="-200" :left-style="{
-          overflow: 'hidden',
-          width: '100%'
-        }" :right-style="{ overflow: 'hidden' }" :responsive="false">
+        <ele-split-layout
+          width="260px"
+          allow-collapse
+          :resizable="true"
+          :min-size="200"
+          :max-size="-200"
+          :left-style="{
+            overflow: 'hidden',
+            width: '100%'
+          }"
+          :right-style="{ overflow: 'hidden' }"
+          :responsive="false"
+        >
           <!-- // tree 组件 -->
           <div class="ele-border-lighter sys-organization-list">
-
             <div>
               版本号: &nbsp; &nbsp;
-              <el-select size="mini" style="width: 72%; margin: 6px 0" v-model="searchObj.versions"
-                placeholder="请选择bom版本" @change="getTreeData" :disabled="isWt">
-                <el-option v-for="item in versList" :label="'V' + item.versions + '.0'" :value="item.versions"
-                  :key="item.id">
+              <el-select
+                size="mini"
+                style="width: 72%; margin: 6px 0"
+                v-model="searchObj.versions"
+                placeholder="请选择bom版本"
+                @change="getTreeData"
+                :disabled="isWt"
+              >
+                <el-option
+                  v-for="item in versList"
+                  :label="'V' + item.versions + '.0'"
+                  :value="item.versions"
+                  :key="item.id"
+                >
                 </el-option>
               </el-select>
             </div>
 
-            <el-tree class="treeData" :data="treeList" :expand-on-click-node="false" :props="defaultProps" ref="treeRef"
-              :default-expanded-keys="current && current.id ? [current.id] : []" :highlight-current="true" node-key="id"
-              @node-click="handleNodeClick">
+            <el-tree
+              class="treeData"
+              :data="treeList"
+              :expand-on-click-node="false"
+              :props="defaultProps"
+              ref="treeRef"
+              :default-expanded-keys="current && current.id ? [current.id] : []"
+              :highlight-current="true"
+              node-key="id"
+              @node-click="handleNodeClick"
+            >
               <span class="custom-tree-node" slot-scope="{ node, data }">
                 {{ data.categoryCode }} / {{ node.label }}
               </span>
@@ -118,59 +245,111 @@
             <baseInfo :dataInfo="currentNodeData" />
 
             <!-- table -->
-            <el-tabs v-model="activeName" class="tab-box" type="border-card" @tab-click="handleClick">
+            <el-tabs
+              v-model="activeName"
+              class="tab-box"
+              type="border-card"
+              @tab-click="handleClick"
+            >
               <el-tab-pane label="属性" name="属性">
-                <attribute :attributeData="currentNodeData" :isWt="isWt"></attribute>
+                <attribute
+                  :attributeData="currentNodeData"
+                  :isWt="isWt"
+                ></attribute>
               </el-tab-pane>
 
-              <el-tab-pane :label="currentNodeData.bomType == 1
-                ? 'PBOM明细表'
-                : currentNodeData.bomType == 2
-                  ? 'MBOM明细表'
-                  : currentNodeData.bomType == 3
+              <el-tab-pane
+                :label="
+                  currentNodeData.bomType == 1
+                    ? 'PBOM明细表'
+                    : currentNodeData.bomType == 2
+                    ? 'MBOM明细表'
+                    : currentNodeData.bomType == 3
                     ? 'ABOM明细表'
                     : 'EBOM明细表'
-                " name="明细表">
-                <detailedList v-if="activeName == '明细表'" :isTemp="searchObj.isTemp" :attributeData="currentNodeData"
-                  :treeId="treeId" :isWt="isWt"></detailedList>
+                "
+                name="明细表"
+              >
+                <detailedList
+                  v-if="activeName == '明细表'"
+                  :isTemp="searchObj.isTemp"
+                  :attributeData="currentNodeData"
+                  :treeId="treeId"
+                  :isWt="isWt"
+                ></detailedList>
               </el-tab-pane>
 
-              <el-tab-pane label="工艺路线" name="工艺路线" v-if="currentNodeData.bomType != 4">
-                <routing v-if="activeName == '工艺路线'" ref="routingRef" :isWt="isWt" :attributeData="currentNodeData"
-                  :taskParam="currentNodeData" :resourceBomId="resourceBomId"></routing>
+              <el-tab-pane
+                label="工艺路线"
+                name="工艺路线"
+                v-if="currentNodeData.bomType != 4"
+              >
+                <routing
+                  v-if="activeName == '工艺路线'"
+                  ref="routingRef"
+                  :isWt="isWt"
+                  :attributeData="currentNodeData"
+                  :taskParam="currentNodeData"
+                  :resourceBomId="resourceBomId"
+                ></routing>
               </el-tab-pane>
-              <el-tab-pane label="工序配置" name="工序配置" v-if="
-                currentNodeData.bomType != 4
-
-              ">
+              <el-tab-pane
+                label="工序配置"
+                name="工序配置"
+                v-if="currentNodeData.bomType != 4"
+              >
                 <!-- && (searchObj.isProduct ||
               [1, 9].includes(searchObj.rootPathIdParent)) -->
-                <workmanship v-if="activeName == '工序配置'" ref="workmanshipRef" :attributeData="currentNodeData"
-                  :taskParam="currentNodeData" :resourceBomId="resourceBomId"></workmanship>
+                <workmanship
+                  v-if="activeName == '工序配置'"
+                  ref="workmanshipRef"
+                  :attributeData="currentNodeData"
+                  :taskParam="currentNodeData"
+                  :resourceBomId="resourceBomId"
+                ></workmanship>
               </el-tab-pane>
             </el-tabs>
           </template>
 
           <template v-slot:content v-else>
-            <el-empty :image-size="200" :description="currentNodeData.bomType == 1
-              ? 'PBOM 暂无数据,请先新建'
-              : currentNodeData.bomType == 2
-                ? 'MBOM 暂无数据,请先新建'
-                : currentNodeData.bomType == 3
+            <el-empty
+              :image-size="200"
+              :description="
+                currentNodeData.bomType == 1
+                  ? 'PBOM 暂无数据,请先新建'
+                  : currentNodeData.bomType == 2
+                  ? 'MBOM 暂无数据,请先新建'
+                  : currentNodeData.bomType == 3
                   ? 'ABOM 暂无数据,请先新建'
                   : 'EBOM 暂无数据,请先新建'
-              "></el-empty>
+              "
+            ></el-empty>
           </template>
         </ele-split-layout>
       </div>
     </el-drawer>
 
-    <baseInfoSave v-if="baseInfoShow" @close="baseClose" :categoryObj="currentNodeData"
-      :categoryId="searchObj.categoryId" :categoryName="searchObj.categoryName"></baseInfoSave>
-
-    <importDialog :defModule="moudleName" ref="importDialogRef" @success="getTreeData" />
-
-    <el-dialog title="发布" :visible.sync="isSubmit" v-if="isSubmit" width="30%" center>
+    <baseInfoSave
+      v-if="baseInfoShow"
+      @close="baseClose"
+      :categoryObj="currentNodeData"
+      :categoryId="searchObj.categoryId"
+      :categoryName="searchObj.categoryName"
+    ></baseInfoSave>
+
+    <importDialog
+      :defModule="moudleName"
+      ref="importDialogRef"
+      @success="getTreeData"
+    />
+
+    <el-dialog
+      title="发布"
+      :visible.sync="isSubmit"
+      v-if="isSubmit"
+      width="30%"
+      center
+    >
       <div>
         <el-radio v-model="radioSubmit" :label="1">药品</el-radio>
         <el-radio v-model="radioSubmit" :label="2">器械</el-radio>
@@ -186,428 +365,425 @@
 </template>
 
 <script>
-import {
-  getBomTreeList,
-  versionList,
-  getBomGetById,
-  convert,
-  convertABom,
-  convertEBOM,
-  convertEBomToPBOM,
-  deleteBomTreeList,
-  bomSubmit,
-  jsBomSubmit,
-  deviceBomSubmit,
-  hasNewVersion
-} from '@/api/material/BOM.js';
-
-import baseInfo from './components/baseInfo.vue';
-import baseInfoSave from './components/baseInfoSave.vue';
-import attribute from './components/attribute.vue';
-import detailedList from './components/detailedList.vue';
-import importDialog from './qualityTesting/import-dialog.vue';
-import LCdetail from './components/LCdetail.vue';
-import routing from './components/routing.vue';
-import workmanship from './components/workmanship.vue';
-
-export default {
-  components: {
-    baseInfo,
-    baseInfoSave,
-    attribute,
-    detailedList,
-    importDialog,
-    LCdetail,
-    routing,
-    workmanship
-  },
-  data() {
-    return {
-      drawer: false,
-      isFullscreen: true,
-      resourceBomId:'',
-      currentNodeData: {
-        bomType: 1,
-        children: []
-      },
-
-      current: {},
-      treeList: [],
-      versList: [],
-      treeLoading: false,
-
-      defaultProps: {
-        children: 'children',
-        label: 'name'
-      },
-
-      searchObj: {
-        versions: '',
-        categoryId: '',
-        isProduct: false,
-        isTemp: 0
-      },
+  import {
+    getBomTreeList,
+    versionList,
+    getBomGetById,
+    convert,
+    convertABom,
+    convertEBOM,
+    convertEBomToPBOM,
+    deleteBomTreeList,
+    bomSubmit,
+    jsBomSubmit,
+    deviceBomSubmit,
+    hasNewVersion
+  } from '@/api/material/BOM.js';
+
+  import baseInfo from './components/baseInfo.vue';
+  import baseInfoSave from './components/baseInfoSave.vue';
+  import attribute from './components/attribute.vue';
+  import detailedList from './components/detailedList.vue';
+  import importDialog from './qualityTesting/import-dialog.vue';
+  import LCdetail from './components/LCdetail.vue';
+  import routing from './components/routing.vue';
+  import workmanship from './components/workmanship.vue';
+
+  export default {
+    components: {
+      baseInfo,
+      baseInfoSave,
+      attribute,
+      detailedList,
+      importDialog,
+      LCdetail,
+      routing,
+      workmanship
+    },
+    data() {
+      return {
+        drawer: false,
+        isFullscreen: true,
+        resourceBomId: '',
+        currentNodeData: {
+          bomType: 1,
+          children: []
+        },
 
-      activeName: '属性',
+        current: {},
+        treeList: [],
+        versList: [],
+        treeLoading: false,
 
-      baseInfoShow: false,
-      isNotData: true,
+        defaultProps: {
+          children: 'children',
+          label: 'name'
+        },
 
-      moudleName: 'mainUser',
-      isSubmit: false,
-      radioSubmit: 1,
+        searchObj: {
+          versions: '',
+          categoryId: '',
+          isProduct: false,
+          isTemp: 0
+        },
 
-      treeId: null,
+        activeName: '属性',
 
-      approvalStatusOpt: {
-        0: '未提交',
-        1: '审核中',
-        2: '审核通过',
-        3: '审核不通过'
-      },
+        baseInfoShow: false,
+        isNotData: true,
 
-      isWt: false,
+        moudleName: 'mainUser',
+        isSubmit: false,
+        radioSubmit: 1,
 
-    };
-  },
+        treeId: null,
 
-  computed: {
-    clientEnvironmentId() {
-      return this.$store.state.user.info.clientEnvironmentId;
-    }
-  },
+        approvalStatusOpt: {
+          0: '未提交',
+          1: '审核中',
+          2: '审核通过',
+          3: '审核不通过'
+        },
 
-  methods: {
-    open(row) {
-      this.searchObj = row;
+        isWt: false
+      };
+    },
 
-      if (Object.prototype.hasOwnProperty.call(row, 'isWt') && row.isWt) {
-        this.isWt = row.isWt;
-        this.isFullscreen = false;
+    computed: {
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
+    },
 
-      if (Object.prototype.hasOwnProperty.call(row, 'bomType')) {
-        this.currentNodeData.bomType = row.bomType;
-      }
-      this.drawer = true;
+    methods: {
+      open(row) {
+        this.searchObj = row;
 
-      this.getTreeData();
-      this.getVersion();
+        if (Object.prototype.hasOwnProperty.call(row, 'isWt') && row.isWt) {
+          this.isWt = row.isWt;
+          this.isFullscreen = false;
+        }
 
+        if (Object.prototype.hasOwnProperty.call(row, 'bomType')) {
+          this.currentNodeData.bomType = row.bomType;
+        }
+        this.drawer = true;
 
-    },
+        this.getTreeData();
+        this.getVersion();
+      },
 
-    handleClose() {
-      this.searchObj = {
-        versions: '',
-        categoryId: '',
-        isProduct: false,
-        isTemp: 0
-      };
-      this.activeName = '属性';
-      this.drawer = false;
-    },
+      handleClose() {
+        this.searchObj = {
+          versions: '',
+          categoryId: '',
+          isProduct: false,
+          isTemp: 0
+        };
+        this.activeName = '属性';
+        this.drawer = false;
+      },
 
-    handleFull() {
-      this.isFullscreen = !this.isFullscreen;
-      this.$forceUpdate();
-    },
+      handleFull() {
+        this.isFullscreen = !this.isFullscreen;
+        this.$forceUpdate();
+      },
 
-    bomChange(e) {
-      this.searchObj.versions = '';
-      this.currentNodeData.bomType = e;
+      bomChange(e) {
+        this.searchObj.versions = '';
+        this.currentNodeData.bomType = e;
 
-      this.getTreeData();
-      this.getVersion();
-    },
+        this.getTreeData();
+        this.getVersion();
+      },
 
-    async getTreeData() {
-      try {
-        this.treeLoading = true;
+      async getTreeData() {
+        try {
+          this.treeLoading = true;
 
-        const res = await getBomTreeList({
-          categoryId: this.searchObj.categoryId,
-          versions: this.searchObj.versions,
-          bomType: this.currentNodeData.bomType,
-          isTemp: this.searchObj.isTemp || 0
-        });
-        this.treeLoading = false;
-        if (res?.code === '0') {
-          if (res.data?.length > 0) {
-            this.treeList = res.data;
-            this.$nextTick(() => {
-              this.isNotData = true;
-              // 默认高亮第一个
-              this.$refs.treeRef.setCurrentKey(res.data[0].id);
-              this.handleNodeClick(res.data[0]);
-            });
-          } else {
-            this.isNotData = false;
-            this.treeList = [];
+          const res = await getBomTreeList({
+            categoryId: this.searchObj.categoryId,
+            versions: this.searchObj.versions,
+            bomType: this.currentNodeData.bomType,
+            isTemp: this.searchObj.isTemp || 0
+          });
+          this.treeLoading = false;
+          if (res?.code === '0') {
+            if (res.data?.length > 0) {
+              this.treeList = res.data;
+              this.$nextTick(() => {
+                this.isNotData = true;
+                // 默认高亮第一个
+                this.$refs.treeRef.setCurrentKey(res.data[0].id);
+                this.handleNodeClick(res.data[0]);
+              });
+            } else {
+              this.isNotData = false;
+              this.treeList = [];
+            }
+            return this.treeList;
           }
-          return this.treeList;
+        } catch (error) {
+          console.log(error);
         }
-      } catch (error) {
-        console.log(error);
-      }
-      this.treeLoading = false;
-    },
+        this.treeLoading = false;
+      },
 
-    handleNodeClick(data) {
-      this.treeId = data.id;
-      this.resourceBomId = data.parentId!=0 ? data.resourceBomId || data.id : data.id;
-      this.handBomDetails(this.treeId);
-    },
+      handleNodeClick(data) {
+        this.treeId = data.id;
+        this.resourceBomId =
+          data.parentId != 0 ? data.resourceBomId || data.id : data.id;
+        this.handBomDetails(this.treeId);
+      },
 
-    handBomDetails(id) {
-      if (id) {
-        getBomGetById(id).then((res) => {
-          res.data.attributeType = res.data.category.attributeType;
+      handBomDetails(id) {
+        if (id) {
+          getBomGetById(id).then((res) => {
+            res.data.attributeType = res.data.category.attributeType;
 
-          this.currentNodeData = res.data;
-          this.searchObj.versions = this.currentNodeData.versions;
+            this.currentNodeData = res.data;
+            this.searchObj.versions = this.currentNodeData.versions;
 
+            this.$forceUpdate();
+          });
+        } else {
+          this.currentNodeData = {
+            bomType: 1,
+            children: []
+          };
+        }
+      },
 
-          this.$forceUpdate();
-        });
-      } else {
-        this.currentNodeData = {
-          bomType: 1,
-          children: []
+      getVersion(type) {
+        let param = {
+          categoryId: this.searchObj.categoryId,
+          bomType: this.currentNodeData.bomType,
+          isTemp: this.searchObj.isTemp || 0
         };
-      }
-    },
+        versionList(param).then((res) => {
+          this.versList = res || [];
+          if (type == 'del' || type == 'add') {
+            if (this.versList.length >= 1) {
+              this.searchObj.versions =
+                this.versList[this.versList.length - 1].versions;
+            } else {
+              this.searchObj.versions = '';
+            }
 
-    getVersion(type) {
-      let param = {
-        categoryId: this.searchObj.categoryId,
-        bomType: this.currentNodeData.bomType,
-        isTemp: this.searchObj.isTemp || 0
-      };
-      versionList(param).then((res) => {
-        this.versList = res || [];
-        if (type == 'del' || type == 'add') {
-          if (this.versList.length >= 1) {
-            this.searchObj.versions =
-              this.versList[this.versList.length - 1].versions;
-          } else {
-            this.searchObj.versions = '';
+            this.getTreeData();
           }
+        });
+      },
 
-          this.getTreeData();
+      handleClick(tab) {},
+      remove() {
+        if (this.currentNodeData.status == 1) {
+          return this.$message.warning('已发布版本不能删除');
         }
-      });
-    },
 
-    handleClick(tab) { },
-    remove() {
-      if (this.currentNodeData.status == 1) {
-        return this.$message.warning('已发布版本不能删除');
-      }
-
-      this.$confirm('是否确认删除?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          deleteBomTreeList([this.currentNodeData.id]).then((msg) => {
-            this.$message.success('删除' + msg);
-            this.getVersion('del');
-          });
+        this.$confirm('是否确认删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
         })
-        .finally(() => { });
-    },
+          .then(() => {
+            deleteBomTreeList([this.currentNodeData.id]).then((msg) => {
+              this.$message.success('删除' + msg);
+              this.getVersion('del');
+            });
+          })
+          .finally(() => {});
+      },
 
-    async transformation(tt) {
-      if (this.currentNodeData.status != 1) {
-        return this.$message.warning('只有已发布版本才可以转换');
-      }
+      async transformation(tt) {
+        if (this.currentNodeData.status != 1) {
+          return this.$message.warning('只有已发布版本才可以转换');
+        }
 
-      let _type = tt == 'P' ? 1 : tt == 'M' ? 2 : tt == 'A' ? 3 : 4;
-      if (!this.isEdit) {
-        let isHas = await this.hasVersionFn(_type);
-        if (!isHas) return;
-      }
+        let _type = tt == 'P' ? 1 : tt == 'M' ? 2 : tt == 'A' ? 3 : 4;
+        if (!this.isEdit) {
+          let isHas = await this.hasVersionFn(_type);
+          if (!isHas) return;
+        }
 
-      this.loadingInstance = this.$loading({
-        lock: true,
-        text: '转换中...',
-        background: 'rgba(0, 0, 0, 0.7)'
-      });
-      let ULR =
-        tt == 'M'
-          ? convert
-          : tt == 'A'
+        this.loadingInstance = this.$loading({
+          lock: true,
+          text: '转换中...',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        let ULR =
+          tt == 'M'
+            ? convert
+            : tt == 'A'
             ? convertABom
             : tt == 'E'
-              ? convertEBOM
-              : tt == 'P'
-                ? convertEBomToPBOM
-                : '';
-      ULR({
-        versions: this.searchObj.versions,
-        categoryId: this.searchObj.categoryId
-      }).then((data) => {
-        if (data.code == '0') {
-          this.loadingInstance.close();
-          this.$message.success('转换成功');
-
-          this.currentNodeData.bomType = _type;
-          this.searchObj.versions = '';
-          this.getTreeData();
-          this.getVersion();
-        }
-      });
-    },
+            ? convertEBOM
+            : tt == 'P'
+            ? convertEBomToPBOM
+            : '';
+        ULR({
+          versions: this.searchObj.versions,
+          categoryId: this.searchObj.categoryId
+        }).then((data) => {
+          if (data.code == '0') {
+            this.loadingInstance.close();
+            this.$message.success('转换成功');
 
-    handleAdd() {
-      this.baseInfoShow = true;
-    },
+            this.currentNodeData.bomType = _type;
+            this.searchObj.versions = '';
+            this.getTreeData();
+            this.getVersion();
+          }
+        });
+      },
 
-    baseClose(val) {
-      if (val) {
-        this.getVersion('add');
-      }
-      this.activeName = '属性';
-      this.baseInfoShow = false;
-    },
+      handleAdd() {
+        this.baseInfoShow = true;
+      },
 
-    uploadFile() {
-      this.$refs.importDialogRef.open();
-    },
+      baseClose(val) {
+        if (val) {
+          this.getVersion('add');
+        }
+        this.activeName = '属性';
+        this.baseInfoShow = false;
+      },
 
-    handleRefresh() {
-      this.getTreeData()
-    },
+      uploadFile() {
+        this.$refs.importDialogRef.open();
+      },
+
+      handleRefresh() {
+        this.getTreeData();
+      },
+
+      handSubmit() {
+        if (this.clientEnvironmentId == 5) {
+          this.isSubmit = true;
+        } else {
+          this.$alert('确定要发布吗?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              bomSubmit({ businessId: this.currentNodeData.id }).then((res) => {
+                if (res?.code == 0) {
+                  this.$message.success('发布成功');
+                  this.getTreeData();
+                }
+              });
+            })
+            .catch(() => {});
+        }
+      },
 
-    handSubmit() {
-      if (this.clientEnvironmentId == 5) {
-        this.isSubmit = true;
-      } else {
+      handJsSubmit() {
+        let URL = this.radioSubmit == 1 ? jsBomSubmit : deviceBomSubmit;
         this.$alert('确定要发布吗?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         })
           .then(() => {
-            bomSubmit({ businessId: this.currentNodeData.id }).then((res) => {
-              if (res?.code == 0) {
-                this.$message.success('发布成功');
-                this.getTreeData();
-              }
+            URL({ businessId: this.currentNodeData.id }).then((res) => {
+              this.isSubmit = false;
+              this.$message.success('发布成功');
+              this.getTreeData();
             });
           })
-          .catch(() => { });
-      }
-    },
-
-    handJsSubmit() {
-      let URL = this.radioSubmit == 1 ? jsBomSubmit : deviceBomSubmit;
-      this.$alert('确定要发布吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          URL({ businessId: this.currentNodeData.id }).then((res) => {
-            this.isSubmit = false;
-            this.$message.success('发布成功');
-            this.getTreeData();
-          });
-        })
-        .catch(() => { });
-    },
+          .catch(() => {});
+      },
 
-    handleDetails() {
-      if (!this.currentNodeData.processInstanceId) {
-        this.$message.info('未提交没有审核流程');
-      } else {
-        this.$refs.detailRef.open(this.currentNodeData.processInstanceId);
-      }
-    },
+      handleDetails() {
+        if (!this.currentNodeData.processInstanceId) {
+          this.$message.info('未提交没有审核流程');
+        } else {
+          this.$refs.detailRef.open(this.currentNodeData.processInstanceId);
+        }
+      },
 
-    async hasVersionFn(bomType) {
-      return new Promise((resolve) => {
-        let param = {
-          categoryId: this.searchObj.categoryId,
-          bomType: bomType
-        };
-        hasNewVersion(param).then((res) => {
-          if (res.data == 1) {
-            this.$confirm('已经草稿版本存在,是否覆盖?', '提示', {
-              confirmButtonText: '覆盖',
-              cancelButtonText: '取消',
-              type: 'warning'
-            })
-              .then(() => {
-                resolve(true);
+      async hasVersionFn(bomType) {
+        return new Promise((resolve) => {
+          let param = {
+            categoryId: this.searchObj.categoryId,
+            bomType: bomType
+          };
+          hasNewVersion(param).then((res) => {
+            if (res.data == 1) {
+              this.$confirm('已经草稿版本存在,是否覆盖?', '提示', {
+                confirmButtonText: '覆盖',
+                cancelButtonText: '取消',
+                type: 'warning'
               })
-              .catch(() => {
-                resolve(false);
-              });
-          } else {
-            resolve(true);
-          }
+                .then(() => {
+                  resolve(true);
+                })
+                .catch(() => {
+                  resolve(false);
+                });
+            } else {
+              resolve(true);
+            }
+          });
         });
-      });
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-/* 自定义全屏样式 */
-::v-deep .is-fullscreen {
-  width: 100vw !important;
-  height: 100vh !important;
-  overflow: hidden !important;
-  /* 隐藏滚动条 */
-}
-
-::v-deep .not-fullscreen {
-  width: calc(100vw - 260px) !important;
-  height: 100vh !important;
-  overflow: hidden !important;
-  /* 隐藏滚动条 */
-}
-
-.custom-drawer-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 4px 15px;
-  background-color: #f5f7fa;
-  /* 自定义背景色 */
-  border-bottom: 1px solid #ebeef5;
-  /* 自定义边框,与抽屉内容分隔 */
-}
-
-.drawer_content {
-  margin: 10px 20px;
-  box-sizing: border-box;
-}
-
-.sys-organization-list {
-  height: calc(100vh - 65px);
-  box-sizing: border-box;
-  border-width: 1px;
-  border-style: solid;
-  overflow: auto;
-  padding: 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-direction: column;
-  overflow: hidden;
-
-  .treeData {
-    height: 0 1 auto;
-    overflow-y: auto;
-    height: calc(100vh - 125px);
+  /* 自定义全屏样式 */
+  ::v-deep .is-fullscreen {
+    width: 100vw !important;
+    height: 100vh !important;
+    overflow: hidden !important;
+    /* 隐藏滚动条 */
+  }
+
+  ::v-deep .not-fullscreen {
+    width: calc(100vw - 260px) !important;
+    height: 100vh !important;
+    overflow: hidden !important;
+    /* 隐藏滚动条 */
+  }
+
+  .custom-drawer-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 4px 15px;
+    background-color: #f5f7fa;
+    /* 自定义背景色 */
+    border-bottom: 1px solid #ebeef5;
+    /* 自定义边框,与抽屉内容分隔 */
+  }
+
+  .drawer_content {
+    margin: 10px 20px;
+    box-sizing: border-box;
   }
-}
 
-.tab-box {
-  margin-top: 12px;
-}
+  .sys-organization-list {
+    height: calc(100vh - 65px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+    padding: 0 10px;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+
+    .treeData {
+      height: 0 1 auto;
+      overflow-y: auto;
+      height: calc(100vh - 125px);
+    }
+  }
+
+  .tab-box {
+    margin-top: 12px;
+  }
 </style>

+ 2 - 2
src/views/material/BOMmanage/index.vue

@@ -62,11 +62,11 @@
           <template v-slot:action="{ row }">
             <el-link type="primary" @click="handelDetail(row)">详情</el-link>
 
-            <el-link v-if="row.status != 1 && (row.approvalStatus == 0 || row.approvalStatus == 3)" type="primary"
+            <el-link v-if="row.status != 1 && (row.approvalStatus == 0 || row.approvalStatus == 3)&&$hasPermission('main:bomcategory:delete')" type="primary"
               @click="handSubmit(row)">发布</el-link>
 
             <el-link type="danger" :underline="false"
-              v-if="activeName == 1 && row.status != 1 && (row.approvalStatus == 0 || row.approvalStatus == 3)"
+              v-if="activeName == 1 && row.status != 1 && (row.approvalStatus == 0 || row.approvalStatus == 3)&&$hasPermission('main:bomcategory:delete')"
               @click="handDel(row)">
               删除
             </el-link>

+ 20 - 4
src/views/material/product/components/index-data.vue

@@ -27,11 +27,15 @@
           icon="el-icon-plus"
           class="ele-btn-icon"
           @click="openEdit({}, 2)"
+          v-if="$hasPermission('main:categoryparam:save')"
         >
           新建
         </el-button>
 
-        <div class="upload" v-if="rootTreeId == 6">
+        <div
+          class="upload"
+          v-if="rootTreeId == 6 && $hasPermission('main:categoryparam:update')"
+        >
           <el-upload
             v-if="!isLoading"
             :show-file-list="false"
@@ -63,7 +67,7 @@
         </div>
 
         <el-button
-          v-else
+          v-if="$hasPermission('main:categoryparam:update') && rootTreeId != 6"
           type="primary"
           size="small"
           icon="el-icon-upload2"
@@ -84,6 +88,7 @@
           icon="el-icon-thumb"
           class="ele-btn-icon"
           @click="moveTo()"
+          v-if="$hasPermission('main:categoryparam:update')"
         >
           设置采购员
         </el-button>
@@ -133,16 +138,27 @@
       </template>
 
       <template v-slot:action="{ row }">
-        <el-link type="primary" :underline="false" @click="openEdit(row, 1)">
+        <el-link
+          type="primary"
+          :underline="false"
+          @click="openEdit(row, 1)"
+          v-if="$hasPermission('main:categoryparam:save')"
+        >
           复制
         </el-link>
-        <el-link type="primary" :underline="false" @click="openEdit(row, 0)">
+        <el-link
+          type="primary"
+          :underline="false"
+          @click="openEdit(row, 0)"
+          v-if="$hasPermission('main:categoryparam:update')"
+        >
           修改
         </el-link>
         <el-popconfirm
           class="ele-action"
           title="确定要删除此物料吗?"
           @confirm="remove(row)"
+          v-if="$hasPermission('main:categoryparam:delete')"
         >
           <template v-slot:reference>
             <el-link type="danger" :underline="false"> 删除 </el-link>

+ 7 - 3
src/views/system/organization/components/org-user-list.vue

@@ -21,6 +21,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit()"
+            v-if="$hasPermission('main:user:save')"
           >
             添加
           </el-button>
@@ -30,6 +31,7 @@
             icon="el-icon-upload2"
             plain
             @click="uploadFile"
+            v-if="$hasPermission('main:user:save')"
             >导入</el-button
           >
           <el-button
@@ -76,11 +78,13 @@
           :underline="false"
           icon="el-icon-edit"
           @click="openEdit(row)"
+          v-if="$hasPermission('main:user:save')"
+
         >
           修改
         </el-link>
         <el-link
-          v-if="row.loginName"
+          v-if="row.loginName&&$hasPermission('main:user:save')"
           type="primary"
           :underline="false"
           icon="el-icon-unlock"
@@ -89,7 +93,7 @@
           解绑
         </el-link>
         <el-link
-          v-if="!row.loginName"
+          v-if="!row.loginName&&$hasPermission('main:user:save')"
           type="primary"
           :underline="false"
           icon="el-icon-add"
@@ -101,7 +105,7 @@
           class="ele-action"
           title="确定要删除此用户吗?"
           @confirm="remove(row)"
-          v-if="!row.loginName"
+          v-if="!row.loginName&&$hasPermission('main:user:delete')"
         >
           <template v-slot:reference>
             <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 5 - 0
src/views/system/organization/index.vue

@@ -16,6 +16,7 @@
                 icon="el-icon-plus"
                 class="ele-btn-icon"
                 @click="openEdit()"
+                v-if="$hasPermission('main:group:save')"
               >
                 添加
               </el-button>
@@ -26,6 +27,8 @@
                 class="ele-btn-icon"
                 :disabled="!current"
                 @click="openEdit(current)"
+                v-if="$hasPermission('main:group:update')"
+
               >
                 修改
               </el-button>
@@ -36,6 +39,8 @@
                 class="ele-btn-icon"
                 :disabled="!current"
                 @click="remove"
+                v-if="$hasPermission('main:group:delete')"
+
               >
                 删除
               </el-button>

+ 5 - 0
src/views/technology/control/index.vue

@@ -23,6 +23,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit()"
+            v-if="$hasPermission('main:producecontrol:save')"
           >
             新建
           </el-button>
@@ -46,6 +47,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit(row)"
+            v-if="$hasPermission('main:producecontrol:update')"
+
           >
             修改
           </el-link>
@@ -54,6 +57,8 @@
             class="ele-action"
             title="确定要删除当前工序吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:producecontrol:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 6 - 1
src/views/technology/parameter/index.vue

@@ -23,6 +23,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit()"
+            v-if="$hasPermission('main:produceparam:save')"
           >
             新建
           </el-button>
@@ -69,13 +70,17 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit(row)"
+            v-if="$hasPermission('main:produceparam:update')"
+
           >
             修改
           </el-link>
 
           <el-popconfirm
             class="ele-action"
-            title="确定要删除当前工序吗?"
+            title="确定要删除吗?"
+            v-if="$hasPermission('main:produceparam:delete')"
+
             @confirm="remove(row)"
           >
             <template v-slot:reference>

+ 13 - 3
src/views/technology/productParam/index.vue

@@ -15,7 +15,10 @@
         >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
-          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit()">
+          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit()"
+          v-if="$hasPermission('main:categoryparam:save')"
+
+          >
             新建
           </el-button>
           <!-- <el-button
@@ -36,11 +39,18 @@
 
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)">
+          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)"
+          v-if="$hasPermission('main:categoryparam:update')"
+          
+          >
             修改
           </el-link>
 
-          <el-popconfirm class="ele-action" title="确定要删除当前参数吗?" @confirm="remove(row)">
+          
+          <el-popconfirm class="ele-action" title="确定要删除当前参数吗?" @confirm="remove(row)"
+          v-if="$hasPermission('main:categoryparam:delete')"
+
+          >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
                 删除

+ 2 - 11
src/views/technology/production/components/user-edit.vue

@@ -32,16 +32,7 @@
             <el-input @click.native="chooseWorkCenter" v-model="form.workCenterName" readonly />
           </el-form-item>
         </el-col>
-        <el-col :span="8">
-          <el-form-item label="工艺类型:" prop="produceVersionId">
-            <el-select v-model="form.produceVersionId" filterable placeholder="请选择" :style="{ width: '100%' }"
-              :disabled="isUpdate">
-              <el-option v-for="item in versionList" :key="item.code" :label="item.code + '-' + item.name"
-                :value="item.id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
+
         <el-col :span="8">
           <el-form-item label="工序类型:" prop="type">
             <el-select v-model="form.type" filterable>
@@ -495,7 +486,7 @@ export default {
       });
 
       this.versionList = res.list;
-      this.form.produceVersionId = this.versionList[0].id;
+
     },
     chooseWorkCenter() {
       this.$refs.centerRefs.open(this.form)

+ 18 - 9
src/views/technology/production/index.vue

@@ -11,10 +11,14 @@
       :cache-key="cacheKeyUrl">
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
-          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit()">
+          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit()"
+          v-if="$hasPermission('main:producetask:save')"
+          >
             新建
           </el-button>
-          <el-button size="small" type="danger" icon="el-icon-delete" class="ele-btn-icon" @click="removeBatch">
+          <el-button size="small" type="danger" icon="el-icon-delete" class="ele-btn-icon" @click="removeBatch"
+          v-if="$hasPermission('main:producetask:delete')"
+          >
             删除
           </el-button>
           <el-button
@@ -23,7 +27,7 @@
             icon="el-icon-download"
             class="ele-btn-icon"
             plain
-
+            v-if="$hasPermission('main:producetask:update')"
             @click="uploadFile()"
           >
             导入
@@ -45,14 +49,19 @@
 
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)">
+          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)"
+          v-if="$hasPermission('main:producetask:update')"
+          
+          >
             修改
           </el-link>
           <!-- <el-link type="primary" :underline="false" icon="el-icon-setting" @click="openSetting(row)">
             配置工艺参数
           </el-link> -->
 
-          <el-popconfirm class="ele-action" title="确定要删除当前工序吗?" @confirm="remove(row)">
+          <el-popconfirm class="ele-action" title="确定要删除当前工序吗?" @confirm="remove(row)"
+          v-if="$hasPermission('main:producetask:delete')"
+          >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
                 删除
@@ -183,10 +192,10 @@ export default {
         //   label: '抽样质检'
         // },
         
-        // {
-        //   value: 3,
-        //   label: '抽样质检'
-        // }, 
+        {
+          value: 3,
+          label: '抽样质检'
+        }, 
         {
           value: 4,
           label: '包装工序'

+ 5 - 3
src/views/technology/route/index.vue

@@ -23,6 +23,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit(null)"
+            v-if="$hasPermission('main:producerouting:save')"
             >新增</el-button
           >
 
@@ -68,7 +69,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit(row)"
-            v-if="[0, 3].includes(row.approvalStatus)"
+            v-if="[0, 3].includes(row.approvalStatus)&&$hasPermission('main:producerouting:update')"
+            
           >
             修改
           </el-link>
@@ -77,7 +79,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="approve(row)"
-            v-if="[0, 3].includes(row.approvalStatus)"
+            v-if="[0, 3].includes(row.approvalStatus)&&$hasPermission('main:producerouting:update')"
           >
             发布
           </el-link>
@@ -92,7 +94,7 @@
           </el-link>
 
           <el-popconfirm
-            v-if="row.status != 1 && [0, 3].includes(row.approvalStatus)"
+            v-if="row.status != 1 && [0, 3].includes(row.approvalStatus)&&$hasPermission('main:producerouting:delete')"
             class="ele-action"
             title="确定要删除当前工序吗?"
             @confirm="remove(row)"

+ 9 - 0
src/views/technology/stepManagement/index.vue

@@ -22,6 +22,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit()"
+            v-if="$hasPermission('main:categoryparam:save')"
           >
             新建
           </el-button>
@@ -31,6 +32,8 @@
             icon="el-icon-delete"
             class="ele-btn-icon"
             @click="removeBatch"
+            v-if="$hasPermission('main:categoryparam:delete')"
+
             plain
           >
             删除
@@ -52,6 +55,8 @@
             icon="el-icon-download"
             class="ele-btn-icon"
             plain
+            v-if="$hasPermission('main:stepManagement:update')"
+
             @click="uploadFile()"
           >
             导入
@@ -84,6 +89,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit(row)"
+            v-if="$hasPermission('main:stepManagement:update')"
+
           >
             修改
           </el-link>
@@ -100,6 +107,8 @@
             class="ele-action"
             title="确定要删除当前工步吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:stepManagement:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 10 - 2
src/views/technology/version/index.vue

@@ -17,6 +17,8 @@
         <template v-slot:toolbar>
 
           <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon"
+          v-if="$hasPermission('main:produceversion:save')"
+
             @click="openEdit(null)">新增</el-button>
 
           <el-button size="small" type="primary" icon="el-icon-refresh-left" class="ele-btn-icon" :loading="loading"
@@ -33,7 +35,10 @@
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
 
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)">
+          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)"
+          v-if="$hasPermission('main:produceversion:update')"
+          
+          >
             修改
           </el-link>
 
@@ -41,7 +46,10 @@
             查看
           </el-link>
 
-          <el-popconfirm class="ele-action" title="确定要删除此版本吗?" @confirm="remove(row)">
+          <el-popconfirm class="ele-action" title="确定要删除此版本吗?" @confirm="remove(row)"
+          v-if="$hasPermission('main:produceversion:delete')"
+          
+          >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
                 删除

+ 3 - 0
src/views/technology/work/index.vue

@@ -27,6 +27,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit()"
+            v-if="$hasPermission('main:workcenter:save')"
           >
             新建
           </el-button>
@@ -50,6 +51,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit(row)"
+            v-if="$hasPermission('main:workcenter:update')"
           >
             修改
           </el-link>
@@ -58,6 +60,7 @@
             class="ele-action"
             title="确定要删除当前工序吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:workcenter:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 5 - 0
src/views/workforceManagement/classes/index.vue

@@ -18,6 +18,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('add')"
+            v-if="$hasPermission('main:teamtime:save')"
           >
             新建
           </el-button>
@@ -29,6 +30,8 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit('edit', row)"
+            v-if="$hasPermission('main:teamtime:update')"
+
           >
             修改
           </el-link>
@@ -36,6 +39,8 @@
             class="ele-action"
             title="确定要删除此班次吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:teamtime:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">

+ 179 - 157
src/views/workforceManagement/schedule/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never">
-      <useSearch @search="reload" ></useSearch>
+      <useSearch @search="reload"></useSearch>
       <ele-pro-table
         ref="table"
         :columns="columns"
@@ -13,26 +13,48 @@
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
-          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openAdd('add')">
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            v-if="$hasPermission('main:teamqueue:save')"
+            @click="openAdd('add')"
+          >
             新建
           </el-button>
         </template>
 
-
         <template v-slot:status="{ row }">
           {{ dict.enabled[row.status] }}
         </template>
 
-
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="SchedulingGroupPeople(row)">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            v-if="$hasPermission('main:teamqueue:save')"
+            @click="SchedulingGroupPeople(row)"
+          >
             按人排班
           </el-link>
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="bpb(row)">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            v-if="$hasPermission('main:teamqueue:save')"
+            @click="bpb(row)"
+          >
             按班排班
           </el-link>
-          <el-popconfirm class="ele-action" title="确定要删除此排班吗?" v-if="row.status == 0" @confirm="remove(row)">
+          <el-popconfirm
+            class="ele-action"
+            title="确定要删除此排班吗?"
+            v-if="row.status == 0 && $hasPermission('main:teamqueue:delete')"
+            @confirm="remove(row)"
+          >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
                 删除
@@ -40,17 +62,16 @@
             </template>
           </el-popconfirm>
 
-
-          <el-popconfirm class="ele-action" title="确定要发布此排班?" @confirm="issue(row)" v-if="row.status == 0">
+          <el-popconfirm
+            class="ele-action"
+            title="确定要发布此排班?"
+            @confirm="issue(row)"
+            v-if="row.status == 0 && $hasPermission('main:teamqueue:update')"
+          >
             <template v-slot:reference>
-              <el-link type="primary" :underline="false">
-                发布
-              </el-link>
+              <el-link type="primary" :underline="false"> 发布 </el-link>
             </template>
           </el-popconfirm>
-
-
-
         </template>
       </ele-pro-table>
     </el-card>
@@ -58,158 +79,159 @@
   </div>
 </template>
 <script>
-import tabMixins from '@/mixins/tableColumnsMixin';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
-import SchedulingGroup from './components/SchedulingGroup.vue';
-import {
-  teamqueuepage,
-  deleteteamtime,
-  teamqueueUpdate
-} from '@/api/workforceManagement/schedule';
-import useSearch from './components/use-search'
-export default {
-  mixins: [tabMixins],
-  components: {
-    SchedulingGroup,
-    useSearch
-  },
-  data() {
-    return {
-      columns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          prop: 'name',
-          label: '排班组名称'
-        },
-        {
-          label: '总人数',
-          prop: 'totalPersonNumber'
-        },
-        {
-          label: '创建人',
-          prop: 'createUserName'
-        },
-        {//修改此prop名称时,请同步修改columnKey属性和下方selectType方法
-          label: '状态',
-          prop: 'status',
-          slot: 'status',
-          filters: [
+  import SchedulingGroup from './components/SchedulingGroup.vue';
+  import {
+    teamqueuepage,
+    deleteteamtime,
+    teamqueueUpdate
+  } from '@/api/workforceManagement/schedule';
+  import useSearch from './components/use-search';
+  export default {
+    mixins: [tabMixins],
+    components: {
+      SchedulingGroup,
+      useSearch
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            prop: 'name',
+            label: '排班组名称'
+          },
+          {
+            label: '总人数',
+            prop: 'totalPersonNumber'
+          },
+          {
+            label: '创建人',
+            prop: 'createUserName'
+          },
+          {
+            //修改此prop名称时,请同步修改columnKey属性和下方selectType方法
+            label: '状态',
+            prop: 'status',
+            slot: 'status',
+            filters: [
               { value: 1, text: '发布' },
-              { value: 0, text: '草稿' },
+              { value: 0, text: '草稿' }
             ],
-          filterMultiple: false,
-          columnKey: 'status'
-        },
+            filterMultiple: false,
+            columnKey: 'status'
+          },
 
-        {
-          label: '创建时间',
-          prop: 'createTime'
+          {
+            label: '创建时间',
+            prop: 'createTime'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 300,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ],
+        dict: {
+          enabled: {
+            1: '发布',
+            0: '草稿'
+          }
         },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 300,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true,
-          fixed: 'right'
-        }
-      ],
-      dict: {
-        enabled: {
-          1: '发布',
-          0: '草稿'
-        }
-      },
-      pageSize: this.$store.state.tablePageSize,
-      cacheKeyUrl: '7b18d31c-workforceManagement-schedule'
-    };
-  },
-  methods: {
-    selectType(value) {
-      let where = {}
-      if (value.status.length > 0) {
-        where['status'] = value.status[0]
-      }
-      this.reload(where)
-    },
-    datasource({ page, where, limit }) {
-      let data = teamqueuepage({
-        ...where,
-        pageNum: page,
-        size: limit
-      });
-      console.log(data);
-      return data;
+        pageSize: this.$store.state.tablePageSize,
+        cacheKeyUrl: '7b18d31c-workforceManagement-schedule'
+      };
     },
-
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ where: where });
-    },
-
-    // 按人排班
-    SchedulingGroupPeople(row) {
-      this.$router.push({
-        path: '/workforceManagement/schedule/detail',
-        query: {
-          type: 'edit',
-          id: row.id
-        }
-      });
-    },
-    // 按班排班
-    bpb(row) {
-      this.$router.push({
-        path: '/workforceManagement/schedule/detail',
-        query: {
-          type: 'edit',
-          id: row.id,
-          isSchedule: '1'
+    methods: {
+      selectType(value) {
+        let where = {};
+        if (value.status.length > 0) {
+          where['status'] = value.status[0];
         }
-      });
-    },
-    // 排版组
-    openAdd() {
-      this.$refs.SchedulingGroup.open();
-    },
-    remove(row) {
-      let par = [row.id];
-      deleteteamtime(par)
-        .then((message) => {
-        this.$message.success(message);
-        this.done();
-        })
+        this.reload(where);
+      },
+      datasource({ page, where, limit }) {
+        let data = teamqueuepage({
+          ...where,
+          pageNum: page,
+          size: limit
+        });
+        console.log(data);
+        return data;
+      },
 
-    },
-    done() {
-      this.$refs.table.reload({
-        page: 1
-      });
-    },
-    openclass() {
-      this.$refs.setclasses.open();
-    },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ where: where });
+      },
 
-    issue(row) {
-      let param = {
-        id: row.id,
-        status: 1
-      }
-      teamqueueUpdate(param).then((msg) => {
+      // 按人排班
+      SchedulingGroupPeople(row) {
+        this.$router.push({
+          path: '/workforceManagement/schedule/detail',
+          query: {
+            type: 'edit',
+            id: row.id
+          }
+        });
+      },
+      // 按班排班
+      bpb(row) {
+        this.$router.push({
+          path: '/workforceManagement/schedule/detail',
+          query: {
+            type: 'edit',
+            id: row.id,
+            isSchedule: '1'
+          }
+        });
+      },
+      // 排版组
+      openAdd() {
+        this.$refs.SchedulingGroup.open();
+      },
+      remove(row) {
+        let par = [row.id];
+        deleteteamtime(par).then((message) => {
           this.$message.success(message);
           this.done();
-      }).catch((e) => {
-          this.$message.error(e.message);
         });
-    },
-  }
-};
+      },
+      done() {
+        this.$refs.table.reload({
+          page: 1
+        });
+      },
+      openclass() {
+        this.$refs.setclasses.open();
+      },
+
+      issue(row) {
+        let param = {
+          id: row.id,
+          status: 1
+        };
+        teamqueueUpdate(param)
+          .then((msg) => {
+            this.$message.success(message);
+            this.done();
+          })
+          .catch((e) => {
+            this.$message.error(e.message);
+          });
+      }
+    }
+  };
 </script>

+ 4 - 0
src/views/workforceManagement/team/index.vue

@@ -21,6 +21,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('add')"
+            v-if="$hasPermission('main:team:save')"
           >
             新建
           </el-button>
@@ -40,6 +41,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="openEdit('edit', row)"
+            v-if="$hasPermission('main:team:update')"
           >
             修改
           </el-link>
@@ -47,6 +49,8 @@
             class="ele-action"
             title="确定要删除此角色吗?"
             @confirm="remove(row)"
+            v-if="$hasPermission('main:team:delete')"
+
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">