tangning il y a 10 mois
Parent
commit
723c73b1b7
2 fichiers modifiés avec 18 ajouts et 14 suppressions
  1. 13 10
      src/views/lanUser/list.vue
  2. 5 4
      src/views/lanUser/platformList.vue

+ 13 - 10
src/views/lanUser/list.vue

@@ -5,9 +5,11 @@
         <a-button
           type="primary"
           @click="handleCreate"
+          v-if="getCheckPerm('lanuser-add')"
           >添加用户</a-button
         ><a-button
           type="primary"
+          v-if="getCheckPerm('lanuser-all')"
           @click="openModalPut(true, {})"
           >批量导入</a-button
         >
@@ -32,13 +34,13 @@
             //  onClick: handleOpenModal.bind(null, record),
             //},{
               label: '编辑',
-              //ifShow:getCheckPerm('lanuser-update'),
+              ifShow: getCheckPerm('lanuser-update'),
               onClick: handleEdit.bind(null, record),
             },
             {
               label: '删除',
               color: 'error',
-              //ifShow:getCheckPerm('lanuser-delete'),
+              ifShow: getCheckPerm('lanuser-delete'),
               onClick:handDelconfirm.bind(null, record),
             },
           ]"
@@ -172,14 +174,15 @@
             });
           },
         },
-        {
-          title: '操作',
-          dataIndex: '',
-          // ifShow: !getCheckRole('tourist'),
-          slots: { customRender: 'action' },
-          fixed: 'right',
-          width: 100,
-        },
+        // {
+        //   title: '操作',
+        //   dataIndex: '',
+        //   // ifShow: !getCheckRole('tourist'),
+        //   slots: { customRender: 'action' },
+        //   fixed: 'right',
+        //   flag: 'ACTION',
+        //   width: 100,
+        // },
       ];
 
       const searchForm: Partial<FormProps> = {

+ 5 - 4
src/views/lanUser/platformList.vue

@@ -2,7 +2,7 @@
   <div class="p-4">
     <BasicTable @register="registerTable">
       <template #toolbar>
-        <a-button type="primary" @click="handleCreate">创建平台</a-button>
+        <a-button v-if="getCheckPerm('platformList-add')" type="primary" @click="handleCreate">创建平台</a-button>
       </template>
       <template #role="{ record }">
         {{ renderRoleType(record.role) }}
@@ -19,19 +19,19 @@
           :actions="[
             {
               color: 'warning',
-              ifShow: record.status === 0,
+              ifShow: getCheckPerm('platformList-disable') && record.status === 0,
               label: '禁用',
               onClick: handleOpenModal.bind(null, record),
             },
             {
               color: 'warning',
               label: '启用',
-              ifShow: record.status != 0,
+              ifShow: getCheckPerm('platformList-enable') && record.status != 0,
               onClick: handEnable.bind(null, record.id),
             },
             {
               label: '编辑',
-              //ifShow:getCheckPerm('lanuser-update'),
+              ifShow: getCheckPerm('platformList-update'),
               onClick: handleEdit.bind(null, record), //handleEdit.bind(null, record),
             },
             //{
@@ -178,6 +178,7 @@
           // ifShow: !getCheckRole('tourist'),
           slots: { customRender: 'action' },
           // fixed: 'right',
+          flag: 'ACTION',
           width: 80,
         },
       ];