| | |
| | | label: "登录账号", |
| | | prop: "account", |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | display: false |
| | | }, |
| | | // { |
| | |
| | | leafOnly: false, |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | label: "所属部门", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | // multiple: true, |
| | | multiple: true, |
| | | leafOnly: false, |
| | | dicData: [], |
| | | dataType: "string", |
| | | // dataType: "string", |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | // checkStrictly: true, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | span: 12, |
| | | rules: [{ |
| | |
| | | row['userType'] = 1 |
| | | row.deptId = func.join(row.deptId) |
| | | row.roleId = func.join(row.roleId) |
| | | row.postId = func.join(row.postId) |
| | | // row.postId = func.join(row.postId) |
| | | add(row).then(() => { |
| | | this.initFlag = false |
| | | this.onLoad(this.page) |
| | |
| | | row['userType'] = 1 |
| | | row.deptId = func.join(row.deptId) |
| | | row.roleId = func.join(row.roleId) |
| | | row.postId = func.join(row.postId) |
| | | // row.postId = func.join(row.postId) |
| | | update(row).then(() => { |
| | | this.initFlag = false |
| | | this.onLoad(this.page) |
| | |
| | | handleExport() { |
| | | const account = func.toStr(this.search.account) |
| | | const realName = func.toStr(this.search.realName) |
| | | const deptId = this.treeDeptId |
| | | this.$confirm("是否导出用户数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }).then(() => { |
| | | NProgress.start() |
| | | exportBlob( |
| | | `/api/blade-system/user/export-user?${this.website.tokenHeader}=${getToken()}&account=${account}&realName=${realName}` |
| | | `/api/blade-system/user/export-user?${this.website.tokenHeader}=${getToken()}&account=${account}&realName=${realName}&deptId=${deptId}` |
| | | ).then(res => { |
| | | downloadXls(res.data, `用户数据表${dateNow()}.xlsx`) |
| | | NProgress.done() |
| | |
| | | if (this.form.hasOwnProperty("roleId")) { |
| | | this.form.roleId = this.form.roleId.split(",") |
| | | } |
| | | if (this.form.hasOwnProperty("postId")) { |
| | | this.form.postId = this.form.postId.split(",") |
| | | } |
| | | // if (this.form.hasOwnProperty("postId")) { |
| | | // this.form.postId = this.form.postId.split(",") |
| | | // } |
| | | }) |
| | | } |
| | | this.initFlag = true |