| | |
| | | <el-table-column label="用户编号" align="left" key="id" prop="id" v-if="columns[0].visible" /> |
| | | <el-table-column label="用户名称" align="left" key="user_name" prop="user_name" v-if="columns[1].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="用户昵称" align="left" key="nick_name" prop="nick_name" v-if="columns[2].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="部门" align="left" key="dept_id" prop="dept_id" v-if="columns[3].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="部门" align="left" key="dept_id" prop="parameter.dept_name" v-if="columns[3].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="手机号码" align="left" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" /> |
| | | <el-table-column label="状态" align="left" key="status" prop="status" v-if="columns[5].visible"> |
| | | <template slot-scope="scope"> |
| | |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | // url: process.env.VUE_APP_BASE_API + "/system/user/import" |
| | | // url: process.env.VUE_SERVER_URL + "/system/user/importData" |
| | | url: "http://localhost:8082/admin" + "/system/user/import" |
| | | // url: "http://localhost:8082/admin" + "/system/user/import" |
| | | url: globalConf.baseUrl + "/system/user/import" |
| | | }, |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | pageSize: 15, |
| | | userName: undefined, |
| | | phonenumber: undefined, |
| | | status: undefined, |
| | |
| | | ); |
| | | }, |
| | | /** 查询部门下拉树结构 */ |
| | | getTreeselect() { |
| | | treeselect(this.queryParams.deptId).then(response => { |
| | | getTreeselect(deptId) { |
| | | // treeselect(this.queryParams.deptId).then(response => { |
| | | // this.deptOptions = response.data; |
| | | // }); |
| | | if(deptId == undefined || deptId == ""){ |
| | | this.$modal.alert("请选择一个部门"); |
| | | return false; |
| | | } |
| | | treeselect(deptId).then(response => { |
| | | this.deptOptions = response.data; |
| | | }); |
| | | return true; |
| | | }, |
| | | |
| | | // 2022-12-08,加载顶级机构树列表 |
| | |
| | | // this.$modal.msgSuccess("请先选择一个顶级机构"); |
| | | // return; |
| | | // } |
| | | this.getTreeselect(); |
| | | if(!this.getTreeselect(this.queryParams.deptId)){ |
| | | return; |
| | | } |
| | | // getUser().then(response => { |
| | | getNewUserRoles(this.queryParams.deptId).then(response => { |
| | | // this.postOptions = response.posts; |
| | |
| | | this.title = "添加用户"; |
| | | this.form.password = this.initPassword; |
| | | }); |
| | | |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | this.getTreeselect(); |
| | | // this.getTreeselect(); |
| | | // const userId = row.id || this.ids; |
| | | const userId = row.id; |
| | | getUser(userId).then(response => { |
| | |
| | | this.open = true; |
| | | this.title = "修改用户"; |
| | | this.form.password = ""; |
| | | this.getTreeselect(this.form.dept_id); |
| | | }); |
| | | }, |
| | | /** 重置密码按钮操作 */ |