27152
This commit is contained in:
		| @@ -1,8 +1,7 @@ | ||||
| <template> | ||||
|   <section class="AppResident"> | ||||
|     <ai-list v-if="!showDetail" isTabs> | ||||
|       <ai-title slot="title" title="居民档案" :instance="instance" :hideLevel="hideLevel-1" isShowArea | ||||
|                 v-model="areaId"/> | ||||
|       <ai-title slot="title" title="居民档案"></ai-title> | ||||
|       <template #tabs> | ||||
|         <el-tabs v-model="activeName"> | ||||
|           <el-tab-pane v-for="op in tabs" :key="op.value" :name="op.value" :label="op.label"> | ||||
|   | ||||
| @@ -4,6 +4,8 @@ | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <ai-area-get style="width: 180px;" placeholder="请选择地区" :instance="resident.instance" v-model="search.areaId" | ||||
|                          @select="onAreaChange"/> | ||||
|             <ai-select placeholder="档案状态" v-model="search.fileStatus" | ||||
|                        :selectList="resident.dict.getDict('fileStatus')" | ||||
|                        @change="page.current=1,refreshTable()"/> | ||||
| @@ -163,7 +165,6 @@ export default { | ||||
|   name: "listTpl", | ||||
|   inject: ['resident'], | ||||
|   props: { | ||||
|     areaId: {default: ""}, | ||||
|     active: {default: ""},//人员类型 | ||||
|   }, | ||||
|   computed: { | ||||
| @@ -176,14 +177,14 @@ export default { | ||||
|       if (this.deleteIds.length) { | ||||
|         params = { | ||||
|           ...params, | ||||
|           areaId: this.areaId, | ||||
|           areaId: this.search.areaId, | ||||
|           ids: this.deleteIds | ||||
|         } | ||||
|       } else { | ||||
|         params = { | ||||
|           areaId: this.areaId, | ||||
|           areaId: this.search.areaId, | ||||
|           ...params, | ||||
|           ...this.search | ||||
|           ...this.search.search | ||||
|         } | ||||
|       } | ||||
|       return params | ||||
| @@ -203,11 +204,7 @@ export default { | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   watch: { | ||||
|     areaId(v) { | ||||
|       v && this.refreshTable() | ||||
|     } | ||||
|   }, | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
| @@ -221,6 +218,7 @@ export default { | ||||
|         birthEnd: "", | ||||
|         faithType: "", | ||||
|         householdName: "", | ||||
|         areaId: '', | ||||
|         con: "", | ||||
|         maritalStatus: "" | ||||
|       }, | ||||
| @@ -236,6 +234,15 @@ export default { | ||||
|       this.multipleSelection = []; | ||||
|       this.searchInit() | ||||
|     }, | ||||
|  | ||||
|     onAreaChange (e) { | ||||
|       this.search.areaId = e | ||||
|       this.page.current = 1 | ||||
|  | ||||
|       this.$nextTick(() => { | ||||
|         this.refreshTable() | ||||
|       }) | ||||
|     }, | ||||
|     searchInit() { | ||||
|       let tempAreaId = this.search.areaId; | ||||
|       this.search = { | ||||
| @@ -305,7 +312,7 @@ export default { | ||||
|     }, | ||||
|     refreshTable() { | ||||
|       this.resident.instance.post(`/app/appresident/list`, null, { | ||||
|         params: {...this.search, ...this.page, areaId: this.areaId, residentType: this.active} | ||||
|         params: {...this.search, ...this.page, residentType: this.active} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data.records | ||||
|   | ||||
| @@ -372,7 +372,7 @@ | ||||
|                 </div> | ||||
|               </div> | ||||
|               <el-form-item label="现住址:" prop="currentAreaId"> | ||||
|                 <ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel" v-model="baseInfo.currentAreaId" | ||||
|                 <ai-area-select clearable always-show :instance="instance" v-model="baseInfo.currentAreaId" | ||||
|                                 :valueLevel="4"/> | ||||
|                 <el-form-item> | ||||
|                   <el-input v-model="baseInfo.currentAddress" placeholder="详细地址" clearable/> | ||||
| @@ -435,8 +435,8 @@ | ||||
|               </div> | ||||
|               <el-form-item label="户籍地:" prop="householdAreaId"> | ||||
|                 <ai-area-select clearable always-show :instance="instance" v-if="showEdit3" | ||||
|                                 v-model="baseInfo.householdAreaId" :disabled-level="disabledLevel" :valueLevel="4"/> | ||||
|                 <el-form-item v-if="baseInfo.householdAreaId"> | ||||
|                                 v-model="baseInfo.householdAreaId" :valueLevel="4"/> | ||||
|                 <el-form-item> | ||||
|                   <el-input v-model="baseInfo.householdAddress" placeholder="详细地址" clearable/> | ||||
|                 </el-form-item> | ||||
|               </el-form-item> | ||||
| @@ -722,16 +722,7 @@ export default { | ||||
|             }, trigger: "blur" | ||||
|           }], | ||||
|         currentAddress: [{message: "请选择现住址详细地址", required: true}], | ||||
|         householdAreaId: [ | ||||
|           {message: "户籍地必须选到村级", required: true,trigger: "blur"}, | ||||
|           { | ||||
|             validator: (r, v, cb) => { | ||||
|               if (/.+0{3}$/.test(v)) { | ||||
|                 cb("户籍地必须选到村级") | ||||
|               } else cb() | ||||
|             },trigger: "blur" | ||||
|           } | ||||
|         ], | ||||
|  | ||||
|         householdName: [ | ||||
|           {required: true, message: "请选择是否户主", trigger: "change"} | ||||
|         ], | ||||
| @@ -740,9 +731,6 @@ export default { | ||||
|         ], | ||||
|         householdIdNumber: [ | ||||
|           {required: true, validator: IdNumberPass, trigger: "blur"} | ||||
|         ], | ||||
|         householdAddress: [ | ||||
|           {required: true, message: "请选择户籍地详细地址", trigger: "blur"} | ||||
|         ] | ||||
|       }, | ||||
|       imgUrl: "", | ||||
| @@ -946,14 +934,11 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.disabledLevel = this.user.info.areaMap[this.user.info.areaId].length; | ||||
|     if (!this.showDetail) { | ||||
|       this.showEdit1 = true; | ||||
|       this.showEdit2 = true; | ||||
|       this.showEdit3 = true; | ||||
|       this.showEdit4 = true; | ||||
|       this.baseInfo.householdAreaId = JSON.parse(JSON.stringify(this.user.info.areaId)) | ||||
|       this.baseInfo.currentAreaId = JSON.parse(JSON.stringify(this.user.info.areaId)) | ||||
|       this.$nextTick(() => this.$refs.ruleForm?.resetFields()) | ||||
|     } else { | ||||
|       this.searchDetail(this.$route.query.id); | ||||
|   | ||||
| @@ -370,7 +370,7 @@ | ||||
|                 </div> | ||||
|               </div> | ||||
|               <el-form-item label="现住址:" prop="currentAreaId"> | ||||
|                 <ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel" v-model="baseInfo.currentAreaId" | ||||
|                 <ai-area-select clearable always-show :instance="instance" v-model="baseInfo.currentAreaId" | ||||
|                                 :valueLevel="4"/> | ||||
|                 <el-form-item> | ||||
|                   <el-input v-model="baseInfo.currentAddress" placeholder="详细地址" clearable/> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user