| | |
| | | <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | |
| | | </el-row> |
| | | |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="角色" prop="role"> |
| | | <el-select v-model="form.role" placeholder="请选择角色" @change="getRole"> |
| | | |
| | | |
| | | <el-option |
| | | v-for="item in roleOptions" |
| | | :key="item.roleId" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否本家" prop="isMyFamily"> |
| | | |
| | | |
| | | <el-col :span="12" v-if="form.role == 102"> |
| | | <el-form-item label="是否本家" prop="isMyFamily" > |
| | | <el-select v-model="form.isMyFamily" placeholder="请输入是否本家" @change="handleFamily"> |
| | | |
| | | |
| | | <el-option |
| | | v-for="item in famOptions" |
| | | :key="item.opsi" |
| | | :label="item.opName" |
| | | :value="item.opsi" |
| | | |
| | | |
| | | ></el-option> |
| | | |
| | | |
| | | </el-select> |
| | | |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-row v-if="form.role != 2 && form.isMyFamily == 1"> |
| | | |
| | | |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="父亲" prop="fid"> |
| | | <el-select v-model="form.fid" placeholder="请选择父亲" @change="hanldeLoop"> |
| | |
| | | :value="item.userId" |
| | | ></el-option> |
| | | </el-select> |
| | | |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row > |
| | | |
| | | |
| | | |
| | | |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="12"> |
| | | <el-form-item label="配偶信息" prop="spouseId"> |
| | | <el-row v-if="form.role != 2 && form.isMyFamily == 0"> |
| | | <el-col :span="12" > |
| | | <el-form-item label="配偶信息" prop="spouseId" > |
| | | <el-select v-model="form.spouseId" placeholder="请选择配偶信息"> |
| | | <el-option |
| | | v-for="item in allInfo" |
| | |
| | | deptId: [ |
| | | { required: true, message: "用户角色不能为空", trigger: "blur" } |
| | | ], |
| | | |
| | | |
| | | password: [ |
| | | { required: true, message: "用户密码不能为空", trigger: "blur" }, |
| | | { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' } |
| | |
| | | this.isshowMar = false |
| | | } |
| | | }, |
| | | |
| | | |
| | | hanldeLoop(){ |
| | | let fid = this.form.fid |
| | | let _this = this |
| | |
| | | //_this.form.mid = _this.allInfo[i].spouseId |
| | | _this.$set(_this.form,'mid',_this.allInfo[i].spouseId); |
| | | jsd = false |
| | | |
| | | |
| | | } |
| | | if(jsd == true) |
| | | _this.$set(_this.form,'mid',''); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | |
| | | //alert(this.cuid) |
| | | |
| | | |
| | | //alert(fid) |
| | | updateFM(this.cuid, fid).then(response => { |
| | | //alert(response.data) |
| | |
| | | { |
| | | //_this.form.mid = _this.allInfo[i].spouseId |
| | | _this.$set(_this.form,'mid',_this.allInfo[i].spouseId); |
| | | |
| | | |
| | | } |
| | | } |
| | | }else |
| | |
| | | //_this.form.fid = _this.allInfo[i].spouseId |
| | | jsd = false |
| | | _this.$set(_this.form,'fid',_this.allInfo[i].spouseId); |
| | | |
| | | |
| | | } |
| | | } |
| | | if(jsd == true) |
| | |
| | | { |
| | | //_this.form.fid = _this.allInfo[i].spouseId |
| | | _this.$set(_this.form,'fid',_this.allInfo[i].spouseId); |
| | | |
| | | |
| | | } |
| | | } |
| | | }else |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleFamily() |
| | | handleFamily(value) |
| | | { |
| | | |
| | | if(this.form.isMyFamily=="0") |
| | | this.isshowMri = true |
| | | }, |
| | |
| | | //console.log('----sdfdsfds') |
| | | }) |
| | | }, |
| | | getRole(){ |
| | | getRole(value){ |
| | | this.form.roleIds = [] |
| | | this.form.roleIds.push(this.rt) |
| | | }, |
| | |
| | | // console.log(response.data) |
| | | if(response.data!=undefined) |
| | | { |
| | | |
| | | |
| | | _this.orfid = response.data.fatherId |
| | | _this.ormid = response.data.momId |
| | | //alert(response.data.roleId) |
| | | |
| | | |
| | | _this.$set(_this.form,'fid',response.data.fatherId); |
| | | _this.$set(_this.form,'mid',response.data.momId); |
| | | _this.$set(_this.form,'isMyFamily',response.data.isMyFamily); |
| | |
| | | |
| | | let ps = true |
| | | |
| | | |
| | | |
| | | let _this = this |
| | | |
| | | |
| | | |
| | | |
| | | if(ps) |
| | | { |
| | | let fm = {} |
| | |
| | | fm.mid = this.form.mid |
| | | // alert(this.form.isMyFamily) |
| | | fm.isMyFamily = this.form.isMyFamily=='1'?1:0 |
| | | |
| | | |
| | | fm.spouseId = this.form.spouseId |
| | | fm.sysId = this.form.userId |
| | | fm.userName = this.form.userName |
| | | |
| | | |
| | | console.log(fm) |
| | | if (valid) { |
| | | if (this.form.userId != undefined) { |
| | |
| | | |
| | | this.open = false; |
| | | this.getList(); |
| | | |
| | | |
| | | |
| | | |
| | | // this.isshowMar = false |
| | | // this.isshowMri = false |
| | | // updateUserInfo(fm).then(response=>{ |
| | |
| | | // }) |
| | | }); |
| | | } else { |
| | | |
| | | |
| | | addUser(fm).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | _this.rt = undefined |
| | | |
| | | |
| | | // this.isshowMar = false |
| | | // this.isshowMri = false |
| | | }); |