[update] 用户管理 角色配置

This commit is contained in:
zhaomeijing
2022-05-24 16:47:49 +08:00
parent a8184eaec6
commit 78815fd1d7
4 changed files with 203 additions and 7 deletions
+29 -7
View File
@@ -84,15 +84,16 @@
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
<!-- </a-upload>-->
<!-- <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>-->
<div @click="handleExportXls($t('userInformation'))" class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
<a-button type="primary" icon="hdd" @click="RoleAssignment">{{$t('RoleAssignment')}}</a-button>
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('departmentAllocation')}}</a-button>
<!-- <div @click="handleExportXls($t('userInformation'))" class="operator-text">-->
<!-- <a-icon type="export" :rotate="-90"/>-->
<!-- {{$t('export')}}-->
<!-- </div>-->
</div>
<!-- table区域-begin -->
<div>
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<a-table
ref="table"
rowKey="id"
@@ -100,6 +101,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<template slot="avatarslot" slot-scope="text, record, index">
@@ -108,7 +110,7 @@
</div>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)" >{{$t('RoleAssignment')}}</a>
<a @click="handleEdit(record)" >{{$t('edit')}}</a>
</span>
</a-table>
@@ -121,11 +123,15 @@
<!-- 用户回收站 -->
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
<!-- 角色配置 -->
<a-modal v-model="rolevisible" :title="$t('RoleAssignment')" width='650px' :footer="null">
<role-assignment v-if='rolevisible'></role-assignment>
</a-modal>
</a-card>
</template>
<script>
import RoleAssignment from './modules/RoleAssignment'
import UserModal from './modules/UserModal'
import PasswordModal from './modules/PasswordModal'
import { putAction, getFileAccessHttpUrl } from '@/api/manage'
@@ -139,6 +145,7 @@
name: 'UserList',
mixins: [JeroListMixin],
components: {
RoleAssignment,
UserModal,
PasswordModal,
JInput,
@@ -151,6 +158,9 @@
queryParam: {},
recycleBinVisible: false,
toggleSearchStatus:false,
rolevisible: false, // 角色配置得弹框
selectedRowKeys: [],
selectedRowKeysvalue: [],
columns: [
{
title: this.$t('serialNumber'),
@@ -240,6 +250,18 @@
}
},
methods: {
onSelectChange(val,value) {
console.log(val)
console.log(value)
this.selectedRowKeys = val
this.selectedRowKeysvalue = value
},
rolehandleOk() {
console.log('角色配置得弹框控制')
},
RoleAssignment: function(){
this.rolevisible = true
},
getAvatarView: function(avatar) {
return getFileAccessHttpUrl(avatar)
},