| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listUser, getUser, delUser, addUser, updateUser, getAllFamilys,resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user"; |
| | | import { listUser, getUser, delUser, updateUserInfo,addUser, updateUser, getAllFamilys,resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | |
| | | methods: { |
| | | getRole(){ |
| | | this.form.roleIds = [] |
| | | alert(123) |
| | | //alert(123) |
| | | this.form.roleIds.push(this.rt) |
| | | }, |
| | | getFamlilyInfo(){ |
| | |
| | | // alert(this.fid) |
| | | //alert(this.rt) |
| | | |
| | | alert(this.form.roleIds) |
| | | // alert(this.form.roleIds) |
| | | let ps = true |
| | | // alert(this.rt) |
| | | // alert(this.fid) |
| | | |
| | | let _this = this |
| | | if(this.rt===2 && (this.fid!="无")) |
| | | { |
| | | ps = false |
| | | |
| | | } |
| | | // alert(ps) |
| | | if(ps) |
| | | { |
| | | if (valid) { |
| | | if (this.form.userId != undefined) { |
| | | updateUser(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | |
| | | let fm = {} |
| | | fm.userId = _this.form.userId |
| | | |
| | | if(_this.fid==="无") |
| | | fm.familyId= -1 |
| | | else |
| | | fm.familyId = _this.fid |
| | | updateUserInfo(fm).then(response=>{ |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }) |
| | | }); |
| | | } else { |
| | | addUser(this.form).then(response => { |