| | |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :defaults.sync="defaults" |
| | | :permission="permissionList" |
| | | @row-del="rowDel" |
| | | @row-update="rowUpdate" |
| | |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | <el-button |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | v-if="permission.user_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button type="info" |
| | | <el-button |
| | | size="small" |
| | | plain |
| | | v-if="permission.user_role" |
| | | icon="el-icon-user" |
| | | @click="handleGrant">角色配置 |
| | | </el-button> |
| | | <el-button type="info" |
| | | <el-button |
| | | size="small" |
| | | plain |
| | | v-if="permission.user_reset" |
| | | icon="el-icon-refresh" |
| | | @click="handleReset">密码重置 |
| | | </el-button> |
| | | <el-button type="info" |
| | | <el-button |
| | | size="small" |
| | | plain |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-setting" |
| | | @click="handlePlatform">平台配置 |
| | | </el-button> |
| | | <el-button type="info" |
| | | <el-button |
| | | size="small" |
| | | plain |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-coordinate" |
| | | @click="handleLock">账号解封 |
| | | </el-button> |
| | | <el-button type="success" |
| | | <el-button |
| | | size="small" |
| | | plain |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-upload2" |
| | | @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button type="warning" |
| | | <el-button |
| | | size="small" |
| | | plain |
| | | v-if="userInfo.role_name.includes('admin')" |
| | |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | menuWidth:250, |
| | | viewBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | |
| | | label: "所属租户", |
| | | prop: "tenantName", |
| | | slot: true, |
| | | display: false |
| | | display: false, |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "用户姓名", |
| | |
| | | display: false |
| | | }, |
| | | { |
| | | label: "所属部门", |
| | | label: "所属单位", |
| | | prop: "deptName", |
| | | slot: true, |
| | | display: false |
| | |
| | | trigger: "blur" |
| | | }, { |
| | | min: 2, |
| | | max: 5, |
| | | max: 10, |
| | | message: '姓名长度在2到5个字符' |
| | | }] |
| | | }, |
| | |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | /*control:() =>{ |
| | | if (this.userInfo.role_name.includes("administrator")){ |
| | | debugger |
| | | return{ |
| | | roleId:{ |
| | | disabled:true |
| | | } |
| | | } |
| | | } |
| | | },*/ |
| | | checkStrictly: true, |
| | | slot: true, |
| | | rules: [{ |
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: "所属部门", |
| | | label: "所属单位", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | multiple: true, |
| | |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属部门", |
| | | message: "请选择所属单位", |
| | | trigger: "click" |
| | | }] |
| | | }, |
| | | { |
| | | /* { |
| | | label: "所属岗位", |
| | | prop: "postId", |
| | | type: "tree", |
| | |
| | | message: "请选择所属岗位", |
| | | trigger: "click" |
| | | }], |
| | | }, |
| | | },*/ |
| | | ] |
| | | }, |
| | | ] |
| | |
| | | initData(tenantId) { |
| | | getRoleTree(tenantId).then(res => { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | res.data.data[0].disabled = true; |
| | | // res.data.data[1].disabled = true; |
| | | column.dicData = res.data.data; |
| | | }); |
| | | getDeptTree(tenantId).then(res => { |
| | |
| | | rowSave(row, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | row.roleId = row.roleId.join(","); |
| | | row.postId = row.postId.join(","); |
| | | // row.postId = row.postId.join(","); |
| | | row.postId = ''; |
| | | add(row).then(() => { |
| | | this.initFlag = false; |
| | | this.onLoad(this.page); |
| | |
| | | rowUpdate(row, index, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | row.roleId = row.roleId.join(","); |
| | | row.postId = row.postId.join(","); |
| | | // row.postId = row.postId.join(","); |
| | | row.postId = ''; |
| | | update(row).then(() => { |
| | | this.initFlag = false; |
| | | this.onLoad(this.page); |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | |
| | | if (this.userInfo.role_name != "admin" && this.userInfo.role_name != "administrator"){ |
| | | params["jurisdiction"] = this.userInfo.dept_id; |
| | | } |
| | | |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |