Commit b1cd604d11d7e69b203faf172c374d3a426c9fb6

Authored by 易文鹏
1 parent 965b2a6c

添加按钮权限控制

jeecg-boot-master/ant-design-vue-jeecg/src/views/system/DepartListSync.vue
... ... @@ -5,14 +5,14 @@
5 5  
6 6 <!-- 按钮操作区域 -->
7 7 <a-row style="margin: 0 0 0 14px" class="table-operator">
8   - <a-button @click="handleAdd(1)" type="primary">添加部门</a-button>
9   - <a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
  8 + <a-button v-has="'depart:addDepart'" @click="handleAdd(1)" type="primary">添加部门</a-button>
  9 + <a-button v-has="'depart:addChildren'" @click="handleAdd(2)" type="primary">添加下级</a-button>
10 10 <a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
11 11 <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
12 12 <a-button type="primary" icon="import">导入</a-button>
13 13 </a-upload>
14 14 <j-third-app-button biz-type="depart" :selected-row-keys="selectedRowKeys" syncToApp @sync-finally="onSyncFinally"/>
15   - <a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
  15 + <a-button v-has="'depart:deleteBatch'" title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
16 16 </a-row>
17 17 <div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
18 18 <a-alert type="info" :showIcon="true">
... ... @@ -270,7 +270,7 @@
270 270 that.departTree = []
271 271 //所有的树节点key信息
272 272 that.allIds = []
273   -
  273 +
274 274 that.iExpandedKeys = []
275 275 //update-begin---author:wangshuai ---date:20220105 for:[JTC-364]sqlserver 部门导入导入失败,部门树数据丢失------------
276 276 //部门树v-if用到了loading,和上传loading冲突了,换一个名称
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/DictList.vue
... ... @@ -25,7 +25,7 @@
25 25 </a-form>
26 26  
27 27 <div class="table-operator" style="border-top: 5px">
28   - <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
  28 + <a-button v-has="'dict:add'" @click="handleAdd" type="primary" icon="plus">添加</a-button>
29 29 <a-button type="primary" icon="download" @click="handleExportXls('字典信息')">导出</a-button>
30 30 <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
31 31 <a-button type="primary" icon="import">导入</a-button>
... ... @@ -45,15 +45,15 @@
45 45 :loading="loading"
46 46 @change="handleTableChange">
47 47 <span slot="action" slot-scope="text, record">
48   - <a @click="handleEdit(record)">
  48 + <a @click="handleEdit(record)" v-has="'dict:edit'">
49 49 <a-icon type="edit"/>
50 50 编辑
51 51 </a>
52 52 <a-divider type="vertical"/>
53   - <a @click="editDictItem(record)"><a-icon type="setting"/> 字典配置</a>
  53 + <a v-has="'dict:config'" @click="editDictItem(record)"><a-icon type="setting"/> 字典配置</a>
54 54 <a-divider type="vertical"/>
55 55 <a-popconfirm title="确定删除吗?" @confirm="() =>handleDelete(record.id)">
56   - <a>删除</a>
  56 + <a v-has="'dict:delete'">删除</a>
57 57 </a-popconfirm>
58 58 </span>
59 59 </a-table>
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/SysAnnouncementList.vue
... ... @@ -30,13 +30,13 @@
30 30  
31 31 <!-- 操作按钮区域 -->
32 32 <div class="table-operator">
33   - <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  33 + <a-button v-has="'announcement:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
34 34 <a-button type="primary" icon="download" @click="handleExportXls('系统通告')">导出</a-button>
35 35 <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
36 36 <!-- <a-button type="primary" icon="import">导入</a-button>-->
37 37 <!-- </a-upload>-->
38 38 <a-dropdown v-if="selectedRowKeys.length > 0">
39   - <a-menu slot="overlay">
  39 + <a-menu slot="overlay" v-has="'announcement:deleteBatch'">
40 40 <a-menu-item key="1" @click="batchDel">
41 41 <a-icon type="delete"/>
42 42 删除
... ... @@ -68,13 +68,13 @@
68 68 @change="handleTableChange">
69 69  
70 70 <span slot="action" slot-scope="text, record">
71   - <a v-if="record.sendStatus == 0" @click="handleEdit(record)">编辑</a>
  71 + <a v-has="'announcement:edit'" v-if="record.sendStatus == 0" @click="handleEdit(record)">编辑</a>
72 72  
73 73 <a-divider type="vertical" v-if="record.sendStatus == 0"/>
74 74 <a-dropdown>
75 75 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
76 76 <a-menu slot="overlay">
77   - <a-menu-item v-if="record.sendStatus != 1">
  77 + <a-menu-item v-if="record.sendStatus != 1" v-has="'announcement:delete'">
78 78 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
79 79 <a>删除</a>
80 80 </a-popconfirm>
... ...