28588
This commit is contained in:
		| @@ -25,7 +25,11 @@ | |||||||
|             <el-form-item label="身份证号" prop="idNumber" :rules="[{ required: true, validator: validatorId, trigger: 'blur' }]"> |             <el-form-item label="身份证号" prop="idNumber" :rules="[{ required: true, validator: validatorId, trigger: 'blur' }]"> | ||||||
|               <el-input v-model="form.idNumber" :maxlength="20" size="small" placeholder="请输入..."></el-input> |               <el-input v-model="form.idNumber" :maxlength="20" size="small" placeholder="请输入..."></el-input> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item style="width: 100%!important;" label="所在地区" prop="areaId" :rules="[{ required: true, message: '请选择所在地区', trigger: 'change' }]"> |             <el-form-item | ||||||
|  |               style="width: 100%!important;" | ||||||
|  |               label="所在地区" | ||||||
|  |               prop="areaId" | ||||||
|  |               :rules="[{ required: true, pattern: /([^0]\d{2}|0[^0]\d|0\d[^0])$/, message: '请选择到村', trigger: 'change' }]"> | ||||||
|               <ai-area-select |               <ai-area-select | ||||||
|                 v-model="form.areaId" |                 v-model="form.areaId" | ||||||
|                 always-show |                 always-show | ||||||
| @@ -46,7 +50,7 @@ | |||||||
|     </template> |     </template> | ||||||
|     <template #footer> |     <template #footer> | ||||||
|       <el-button @click="cancel">取消</el-button> |       <el-button @click="cancel">取消</el-button> | ||||||
|       <el-button type="primary" @click="confirm">提交</el-button> |       <el-button type="primary" @click="confirm" :loading="isLoading">提交</el-button> | ||||||
|     </template> |     </template> | ||||||
|   </ai-detail> |   </ai-detail> | ||||||
| </template> | </template> | ||||||
| @@ -97,6 +101,7 @@ | |||||||
|           riskType: '' |           riskType: '' | ||||||
|         }, |         }, | ||||||
|         id: '', |         id: '', | ||||||
|  |         isLoading: false, | ||||||
|         disabledLevel: 3 |         disabledLevel: 3 | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| @@ -134,6 +139,7 @@ | |||||||
|       confirm () { |       confirm () { | ||||||
|         this.$refs.form.validate((valid) => { |         this.$refs.form.validate((valid) => { | ||||||
|           if (valid) { |           if (valid) { | ||||||
|  |             this.isLoading = true | ||||||
|             this.instance.post(`/app/apppreventionreturntopovertyriskperson/addOrUpdate`, { |             this.instance.post(`/app/apppreventionreturntopovertyriskperson/addOrUpdate`, { | ||||||
|               ...this.form |               ...this.form | ||||||
|             }).then(res => { |             }).then(res => { | ||||||
| @@ -141,8 +147,13 @@ | |||||||
|                 this.$message.success('提交成功') |                 this.$message.success('提交成功') | ||||||
|                 setTimeout(() => { |                 setTimeout(() => { | ||||||
|                   this.cancel(true) |                   this.cancel(true) | ||||||
|  |                   this.isLoading = false | ||||||
|                 }, 600) |                 }, 600) | ||||||
|  |               } else { | ||||||
|  |                 this.isLoading = false | ||||||
|               } |               } | ||||||
|  |             }).catch(() => { | ||||||
|  |               this.isLoading = false | ||||||
|             }) |             }) | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user