| | |
| | | }) |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | row.deptId = row.deptId.join(",") |
| | | row.roleId = row.roleId.join(",") |
| | | // row.deptId = row.deptId.join(",") |
| | | // row.roleId = row.roleId.join(",") |
| | | // row.postId = row.postId.join(","); |
| | | row.postId = '' |
| | | add(row).then(() => { |
| | |
| | | }) |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | row.deptId = row.deptId.join(",") |
| | | row.roleId = row.roleId.join(",") |
| | | // row.deptId = row.deptId.join(",") |
| | | // row.roleId = row.roleId.join(",") |
| | | // row.postId = row.postId.join(","); |
| | | row.postId = '' |
| | | update(row).then(() => { |
| | |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].indexOf(type)) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getUser(this.form.id).then(res => { |
| | | this.form = res.data.data |
| | | if (this.form.hasOwnProperty("deptId")) { |
| | | this.form.deptId = this.form.deptId.split(",") |
| | | } |
| | | 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("deptId")) { |
| | | // this.form.deptId = this.form.deptId.split(",") |
| | | // } |
| | | // if (this.form.hasOwnProperty("roleId")) { |
| | | // this.form.roleId = this.form.roleId.split(",") |
| | | // } |
| | | // if (this.form.hasOwnProperty("postId")) { |
| | | // this.form.postId = this.form.postId.split(",") |
| | | // } |
| | | }) |
| | | } |
| | | this.initFlag = true |
| | |
| | | }) |
| | | }, |
| | | platformBeforeOpen (done, type) { |
| | | if (["edit", "view"].indexOf(type)) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getUserPlatform(this.platformForm.id).then(res => { |
| | | this.platformForm = res.data.data |
| | | }) |