| | |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button v-if="permission.user_delete" |
| | | <el-button v-if="permissionList.delBtn" |
| | | icon="el-icon-delete" |
| | | plain |
| | | size="small" |
| | | type="danger" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button v-if="permission.user_role" |
| | | <el-button v-if="permissionList.roleBtn" |
| | | icon="el-icon-user" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleGrant">角色配置 |
| | | </el-button> |
| | | <el-button v-if="permission.user_reset" |
| | | <el-button v-if="permissionList.resetBtn" |
| | | icon="el-icon-refresh" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleReset">密码重置 |
| | | </el-button> |
| | | <el-button size="small" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.pwdStrategyBtn" |
| | | size="small" |
| | | type="success" |
| | | icon="el-icon-setting" |
| | | @click="handlepass"> |
| | | 配置密码策略 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.unsealBtn" |
| | | icon="el-icon-coordinate" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleLock">账号解封 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.importBtn" |
| | | icon="el-icon-upload2" |
| | | plain |
| | | size="small" |
| | | type="success" |
| | | @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.exportBtn" |
| | | icon="el-icon-download" |
| | | plain |
| | | size="small" |
| | | type="warning" |
| | | @click="handleExport">导出 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button v-if="permissionList.deactEnBtn" |
| | | size="small" |
| | | type="warning" |
| | | icon="el-icon-setting" |
| | | @click="updateUserStatus"> |
| | |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | /* 下面这三个属性默认设置为true, |
| | | 实际根据permissionList中对照的属性进行控制的 */ |
| | | viewBtn: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //行选中时高亮 |
| | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | /** 按钮显示隐藏控制 */ |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.user.user_add, false), |
| | |
| | | unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | }; |
| | | }, |
| | | platformPermissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.user.user_add, false), |
| | | viewBtn: this.vaildData(this.permission.user.user_view, false), |
| | | delBtn: this.vaildData(this.permission.user.user_delete, false), |
| | | editBtn: this.vaildData(this.permission.user.user_edit, false), |
| | | deactEnBtn: this.vaildData(this.permission.user.user_deact_en,false), |
| | | exportBtn: this.vaildData(this.permission.user.user_export,false), |
| | | pwdStrategyBtn: this.vaildData(this.permission.user.user_pwd_strategy,false), |
| | | importBtn: this.vaildData(this.permission.user.user_import,false), |
| | | resetBtn: this.vaildData(this.permission.user.user_reset,false), |
| | | roleBtn: this.vaildData(this.permission.user.user_role,false), |
| | | unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | }; |
| | | }, |
| | | // platformPermissionList() { |
| | | // return { |
| | | // addBtn: this.vaildData(this.permission.user.user_add, false), |
| | | // viewBtn: this.vaildData(this.permission.user.user_view, false), |
| | | // delBtn: this.vaildData(this.permission.user.user_delete, false), |
| | | // editBtn: this.vaildData(this.permission.user.user_edit, false), |
| | | // deactEnBtn: this.vaildData(this.permission.user.user_deact_en,false), |
| | | // exportBtn: this.vaildData(this.permission.user.user_export,false), |
| | | // pwdStrategyBtn: this.vaildData(this.permission.user.user_pwd_strategy,false), |
| | | // importBtn: this.vaildData(this.permission.user.user_import,false), |
| | | // resetBtn: this.vaildData(this.permission.user.user_reset,false), |
| | | // roleBtn: this.vaildData(this.permission.user.user_role,false), |
| | | // unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | // }; |
| | | // }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |