diff --git a/src/views/system/DepartList.vue b/src/views/system/DepartList.vue index 7446961..73cfbd1 100644 --- a/src/views/system/DepartList.vue +++ b/src/views/system/DepartList.vue @@ -5,13 +5,13 @@ - {{ $t('depart.addDepartment') }} - {{ $t('depart.addSubordinate') }} - {{ $t('export') }} + {{ $t('depart.addDepartment') }} + {{ $t('depart.addSubordinate') }} + {{ $t('export') }} - {{ $t('batchDelete') }} + {{ $t('batchDelete') }}
@@ -37,8 +37,8 @@ - {{ $t('add') }} - {{ $t('delete') }} + {{ $t('add') }} + {{ $t('delete') }} {{ $t('cancel') }} diff --git a/src/views/system/RoleUserList.vue b/src/views/system/RoleUserList.vue index 98bb2dd..7416bd0 100644 --- a/src/views/system/RoleUserList.vue +++ b/src/views/system/RoleUserList.vue @@ -37,7 +37,7 @@
- {{ $t('roleManage.newRole') }} + {{ $t('roleManage.newRole') }} @@ -58,30 +58,9 @@ :loading="loading" :scroll="{x: 500, y: yScrollHeight}" :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" + :operationList="operationList" + @operationClick="operationClick" @change="handleTableChange"> - - {{ $t('roleManage.userBtn') }} - - - - - - - - - {{ $t('roleManage.toGrantAuthorization') }} - - - {{ $t('edit') }} - - - - {{ $t('delete') }} - - - - -
@@ -292,7 +271,33 @@ export default { deleteBatch2: '/sys/user/deleteUserRoleBatch', exportXlsUrl: 'sys/role/exportXls', importExcelUrl: 'sys/role/importExcel' - } + }, + operationList: [ + // 用户 + { + text: this.$t('roleManage.userBtn'), + clickEvent: 'handleOpen', + has: '' + }, + // 授权 + { + text: this.$t('roleManage.toGrantAuthorization'), + clickEvent: 'handlePerssion', + has: '' + }, + // 编辑 + { + text: this.$t('edit'), + clickEvent: 'handleEdit', + has: 'sys:role:edit' + }, + // 删除 + { + text: this.$t('delete'), + clickEvent: 'handleDelete1', + has: 'sys:role:del' + } + ] } }, computed: { @@ -307,6 +312,15 @@ export default { } }, methods: { + operationClick (operation, record) { + if (operation.clickEvent === 'handleDelete1') { + this.handleDelete1(record.id) + } else if (operation.clickEvent === 'handlePerssion') { + this.handlePerssion(record.id) + } else { + this[operation.clickEvent](record) + } + }, onSelectChange2 (selectedRowKeys, selectionRows) { this.selectedRowKeys2 = selectedRowKeys this.selectionRows2 = selectionRows diff --git a/src/views/system/UserList.vue b/src/views/system/UserList.vue index f05abb4..b778b08 100644 --- a/src/views/system/UserList.vue +++ b/src/views/system/UserList.vue @@ -86,8 +86,8 @@
- {{ $t('user.addUser') }} - {{ $t('export') }} + {{ $t('user.addUser') }} + {{ $t('export') }} @@ -308,10 +308,7 @@ export default { { text: this.$t('details'), clickEvent: 'handleDetail', - has: '', - show: (record) => { - return this.isDev - } + has: '' }, // 密码 { @@ -350,10 +347,7 @@ export default { { text: this.$t('user.uploadHandStamp'), clickEvent: 'handleUploadHandStamp', - has: 'user:uploadHandStamp', - show: (record) => { - return false - } + has: 'user:uploadHandStamp' } ] }