清理复制代码
This commit is contained in:
		| @@ -242,41 +242,6 @@ export default { | |||||||
|  |  | ||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     formRules() { |  | ||||||
|       let IdNumberPass = (rule, value, callback) => { |  | ||||||
|         if (value) { |  | ||||||
|           console.log(this.idCardNoUtil); |  | ||||||
|           if (this.idCardNoUtil.checkIdCardNo(value)) { |  | ||||||
|             callback(); |  | ||||||
|           } else { |  | ||||||
|             callback(new Error("身份证号格式错误")); |  | ||||||
|           } |  | ||||||
|         } else { |  | ||||||
|           callback(new Error("请输入身份证号")); |  | ||||||
|         } |  | ||||||
|       }; |  | ||||||
|       if (this.dialog.title.indexOf('家庭') != -1) { |  | ||||||
|  |  | ||||||
|         return { |  | ||||||
|           personType: [{required: true, message: "请选择类型", trigger: 'change'}], |  | ||||||
|           name: [{required: true, message: "请填写户主", trigger: 'change'}], |  | ||||||
|           idNumber: [{required: true, validator: IdNumberPass, trigger: 'change'}], |  | ||||||
|           phone: [{required: true, message: "请填写联系电话", trigger: 'blur'}], |  | ||||||
|           villageGroup: [{required: true, message: "请选择所属组", trigger: 'change'}], |  | ||||||
|           status: [{required: true, message: "请选择状态", trigger: 'change'}], |  | ||||||
|           householdRelation: [{required: true, message: "请选择与户主关系", trigger: 'change'}] |  | ||||||
|         } |  | ||||||
|       } else { |  | ||||||
|         return { |  | ||||||
|           personType: [{required: true, message: "请选择类型", trigger: 'change'}], |  | ||||||
|           name: [{required: true, message: "请填写户主", trigger: 'change'}], |  | ||||||
|           idNumber: [{required: true, validator: IdNumberPass, trigger: 'change'}], |  | ||||||
|           villageGroup: [{required: true, message: "请选择所属组", trigger: 'change'}], |  | ||||||
|           status: [{required: true, message: "请选择状态", trigger: 'change'}], |  | ||||||
|           householdRelation: [{required: true, message: "请选择与户主关系", trigger: 'change'}] |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
|     this.areaId = this.user.info.areaId; |     this.areaId = this.user.info.areaId; | ||||||
| @@ -298,48 +263,6 @@ export default { | |||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     typeChange(val) { |  | ||||||
|       val == '0' ? this.personUrl = '/app/appresident/list?fileStatus=0' : this.personUrl = '/app/apprecurrentpopulation/list?fileStatus=0'; |  | ||||||
|       this.dialogInfo.name = ""; |  | ||||||
|       this.dialogInfo.idNumber = ""; |  | ||||||
|       this.dialogInfo.phone = ""; |  | ||||||
|       this.dialogInfo.avatar = ""; |  | ||||||
|       this.dialogInfo.areaId = ""; |  | ||||||
|     }, |  | ||||||
|     init(formName) { |  | ||||||
|       this.$refs[formName].clearValidate(); |  | ||||||
|       Object.keys(this.dialogInfo).forEach(e => { |  | ||||||
|         this.dialogInfo[e] = '' |  | ||||||
|       }) |  | ||||||
|       this.dialogInfo.personType = '0'; |  | ||||||
|       this.personUrl = ''; |  | ||||||
|     }, |  | ||||||
|     reset() { |  | ||||||
|       Object.keys(this.searchObj).forEach(e => { |  | ||||||
|         this.searchObj[e] = '' |  | ||||||
|       }); |  | ||||||
|       this.getList(); |  | ||||||
|     }, |  | ||||||
|     getSelect(val) { |  | ||||||
|       if (val) { |  | ||||||
|         this.dialogInfo.name = val.name; |  | ||||||
|         this.dialogInfo.idNumber = val.idNumber; |  | ||||||
|         this.dialogInfo.avatar = val.photo; |  | ||||||
|         if (this.dialogInfo.personType == 0) { |  | ||||||
|           this.dialogInfo.areaId = val.householdAreaId; |  | ||||||
|         } else { |  | ||||||
|           this.dialogInfo.areaId = val.currentAreaId; |  | ||||||
|         } |  | ||||||
|       } else { |  | ||||||
|         this.dialogInfo.name = ''; |  | ||||||
|         this.dialogInfo.idNumber = ''; |  | ||||||
|         this.dialogInfo.phone = ''; |  | ||||||
|         this.dialogInfo.areaId = ''; |  | ||||||
|         this.dialogInfo.avatar = ''; |  | ||||||
|         this.$refs['rules'].clearValidate(); |  | ||||||
|       } |  | ||||||
|  |  | ||||||
|     }, |  | ||||||
|     familyMember(row) { |     familyMember(row) { | ||||||
|       this.rowInfo = {...row} |       this.rowInfo = {...row} | ||||||
|       this.familyId = row.id; |       this.familyId = row.id; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user