居民档案结构重组
This commit is contained in:
		| @@ -12,17 +12,17 @@ | |||||||
|         </el-tabs> |         </el-tabs> | ||||||
|       </template> |       </template> | ||||||
|     </ai-list> |     </ai-list> | ||||||
|     <component v-else :is="detailComponent" :instance="instance" :dict="dict" :permissions="permissions"/> |     <component v-else :is="detailComponent" :instance="instance" :dict="dict" :permissions="permissions" | ||||||
|  |                :name="dict.getLabel('residentType',activeName)"/> | ||||||
|   </section> |   </section> | ||||||
| </template> | </template> | ||||||
| <script> | <script> | ||||||
| import {mapState} from "vuex"; | import {mapState} from "vuex"; | ||||||
| import localResident from "./localResident"; | import ResidentList from "./residentList"; | ||||||
| import ListTpl from "./listTpl"; |  | ||||||
| import MobileResident from "./mobileResident"; |  | ||||||
| import ResidentSta from "./residentSta"; | import ResidentSta from "./residentSta"; | ||||||
| import auditList from "./auditList"; | import auditList from "./auditList"; | ||||||
| import auditDetail from "./audtiDetail"; | import auditDetail from "./auditDetail"; | ||||||
|  | import ResidentDetail from "./residentDetail"; | ||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   name: "AppResident", |   name: "AppResident", | ||||||
| @@ -37,25 +37,9 @@ export default { | |||||||
|       resident: this |       resident: this | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   components: {ResidentSta, MobileResident, ListTpl, localResident, auditList, audtiDetail: auditDetail}, |   components: {ResidentDetail, ResidentSta, ResidentList, auditList, auditDetail}, | ||||||
|   computed: { |   computed: { | ||||||
|     ...mapState(["user"]), |     ...mapState(["user"]), | ||||||
|     tabs() { |  | ||||||
|       let details = { |  | ||||||
|         "本地居民": localResident, |  | ||||||
|         "流动人员": MobileResident, |  | ||||||
|       } |  | ||||||
|       return [ |  | ||||||
|         ...this.dict.getDict('residentType').map(e => ({ |  | ||||||
|           label: e.dictName, |  | ||||||
|           value: e.dictValue, |  | ||||||
|           comp: ListTpl, |  | ||||||
|           detail: details[e.dictName] |  | ||||||
|         })), |  | ||||||
|         {label: "居民统计", value: "3", comp: ResidentSta}, |  | ||||||
|         {label: "居民档案审核", value: "4", comp: auditList, detail: auditDetail} |  | ||||||
|       ] |  | ||||||
|     }, |  | ||||||
|     hideLevel() { |     hideLevel() { | ||||||
|       return this.user.info.areaList?.length || 0 |       return this.user.info.areaList?.length || 0 | ||||||
|     }, |     }, | ||||||
| @@ -71,6 +55,21 @@ export default { | |||||||
|     return { |     return { | ||||||
|       areaId: '', |       areaId: '', | ||||||
|       activeName: "0", |       activeName: "0", | ||||||
|  |       tabs: [] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initTabs() { | ||||||
|  |       this.tabs = [ | ||||||
|  |         ...this.dict.getDict('residentType').map(e => ({ | ||||||
|  |           label: e.dictName, | ||||||
|  |           value: e.dictValue, | ||||||
|  |           comp: ResidentList, | ||||||
|  |           detail: ResidentDetail | ||||||
|  |         })), | ||||||
|  |         {label: "居民统计", value: "3", comp: ResidentSta}, | ||||||
|  |         {label: "居民档案审核", value: "4", comp: auditList, detail: auditDetail} | ||||||
|  |       ] | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
| @@ -79,7 +78,7 @@ export default { | |||||||
|     this.dict.load('residentType', "sex", "faithType", "fileStatus", "legality", "education", "maritalStatus", |     this.dict.load('residentType', "sex", "faithType", "fileStatus", "legality", "education", "maritalStatus", | ||||||
|         "politicsStatus", "householdName", "nation", "liveReason", "certificateType", "job", "militaryStatus", |         "politicsStatus", "householdName", "nation", "liveReason", "certificateType", "job", "militaryStatus", | ||||||
|         "householdRelation", "logoutReason", "nation", "registerStatus", "residentTipType", "liveCategory", |         "householdRelation", "logoutReason", "nation", "registerStatus", "residentTipType", "liveCategory", | ||||||
|         "livePeriod", "language", "nationality", "residentType"); |         "livePeriod", "language", "nationality", "importTips").then(() => this.initTabs()); | ||||||
|   }, |   }, | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| <template> | <template> | ||||||
|   <section class="addAborigines"> |   <section class="auditDetail"> | ||||||
|     <ai-detail> |     <ai-detail> | ||||||
|       <ai-title slot="title" title="详情" isShowBack @onBackClick="$router.push({query:{}})" isShowBottomBorder/> |       <ai-title slot="title" title="详情" isShowBack @onBackClick="$router.push({query:{}})" isShowBottomBorder/> | ||||||
|       <template #content> |       <template #content> | ||||||
| @@ -482,7 +482,7 @@ export default { | |||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| <style lang="scss" scoped> | <style lang="scss" scoped> | ||||||
| .addAborigines { | .auditDetail { | ||||||
|   height: 100%; |   height: 100%; | ||||||
|   font-size: 14px; |   font-size: 14px; | ||||||
| 
 | 
 | ||||||
							
								
								
									
										77
									
								
								packages/meta/AppResident/components/tagsManage.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								packages/meta/AppResident/components/tagsManage.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,77 @@ | |||||||
|  | <template> | ||||||
|  |   <section class="tagsManage"> | ||||||
|  |     <el-form ref="PersonalAssets" :model="form" size="small" label-width="0"> | ||||||
|  |       <ai-edit-card title="标签信息" :show-btn="permissions('app_appresident_edit')" | ||||||
|  |                     @save="submitTags" @cancel="getTags"> | ||||||
|  |         <template #edit> | ||||||
|  |           <el-form-item prop=""> | ||||||
|  |             <el-checkbox label="1">标签1</el-checkbox> | ||||||
|  |           </el-form-item> | ||||||
|  |         </template> | ||||||
|  |         <template> | ||||||
|  |           <el-tag effect="dark">标签二</el-tag> | ||||||
|  |         </template> | ||||||
|  |       </ai-edit-card> | ||||||
|  |     </el-form> | ||||||
|  |   </section> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  | import {mapState} from "vuex"; | ||||||
|  | import AiEditCard from "./AiEditCard"; | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |   name: "tagsManage", | ||||||
|  |   components: {AiEditCard}, | ||||||
|  |   props: { | ||||||
|  |     instance: Function, | ||||||
|  |     dict: Object, | ||||||
|  |     permissions: Function, | ||||||
|  |     residentId: {required: true, default: ""} | ||||||
|  |   }, | ||||||
|  |   computed: { | ||||||
|  |     ...mapState(['user']), | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       form: {} | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     getTags() { | ||||||
|  |       let {residentId} = this | ||||||
|  |       this.instance.post("/app/appresidentvehicle/list", null, { | ||||||
|  |         params: {residentId} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.form.cars = res.data.records || [] | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     submitTags(cb) { | ||||||
|  |       this.$refs.PersonalAssets.validate(v => { | ||||||
|  |         if (v) { | ||||||
|  |           let {residentId, form: {cars: residentVehicleList}} = this | ||||||
|  |           this.instance.post("/app/appresidentvehicle/update", { | ||||||
|  |             residentId, residentVehicleList | ||||||
|  |           }).then(res => { | ||||||
|  |             if (res?.code == 0) { | ||||||
|  |               this.$message.success("提交成功") | ||||||
|  |               this.getCars() | ||||||
|  |               cb?.() | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.getTags() | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .tagsManage { | ||||||
|  | } | ||||||
|  | </style> | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,11 +1,11 @@ | |||||||
| <template> | <template> | ||||||
|   <section class="localResident"> |   <section class="residentDetail"> | ||||||
|     <ai-detail> |     <ai-detail> | ||||||
|       <ai-title slot="title" :title="pageTitle" isShowBack @onBackClick="back" isShowBottomBorder> |       <ai-title slot="title" :title="pageTitle" isShowBack @onBackClick="back" isShowBottomBorder> | ||||||
|         <template v-if="showDetail" #rightBtn> |         <template v-if="showDetail" #rightBtn> | ||||||
|           <el-button @click="beforeWriteOff()" icon="el-icon-switch-button" v-if="baseInfo.fileStatus==0">注销档案 |           <el-button @click="beforeWriteOff()" icon="el-icon-switch-button" v-if="baseInfo.fileStatus==0">注销档案 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button icon="iconfont iconDelete" @click="handleDelete()" v-if="$permissions('app_appresident_del')"> |           <el-button icon="iconfont iconDelete" @click="handleDelete()" v-if="permissions('app_appresident_del')"> | ||||||
|             删除人员 |             删除人员 | ||||||
|           </el-button> |           </el-button> | ||||||
|         </template> |         </template> | ||||||
| @@ -199,17 +199,7 @@ | |||||||
|                   </ai-table> |                   </ai-table> | ||||||
|                 </div> |                 </div> | ||||||
|               </ai-card> |               </ai-card> | ||||||
|               <ai-edit-card title="标签信息" :show-btn="permissions('app_appresident_edit')" |               <tags-manage v-if="currentTab=='0'" v-bind="$props" :resident-id="baseInfo.id"/> | ||||||
|                             @save="saveFrom" @cancel="getDetail(baseInfo.id)"> |  | ||||||
|                 <template #edit> |  | ||||||
|                   <el-form-item label-width="0"> |  | ||||||
|                     <el-checkbox label="1">标签1</el-checkbox> |  | ||||||
|                   </el-form-item> |  | ||||||
|                 </template> |  | ||||||
|                 <template> |  | ||||||
|                   <el-tag effect="dark">标签二</el-tag> |  | ||||||
|                 </template> |  | ||||||
|               </ai-edit-card> |  | ||||||
|             </el-tab-pane> |             </el-tab-pane> | ||||||
|             <el-tab-pane label="资产信息" lazy> |             <el-tab-pane label="资产信息" lazy> | ||||||
|               <personal-assets v-if="currentTab==1" :resident-id="baseInfo.id" v-bind="$props"/> |               <personal-assets v-if="currentTab==1" :resident-id="baseInfo.id" v-bind="$props"/> | ||||||
| @@ -441,14 +431,16 @@ | |||||||
| import {mapState} from "vuex"; | import {mapState} from "vuex"; | ||||||
| import AiEditCard from "./components/AiEditCard"; | import AiEditCard from "./components/AiEditCard"; | ||||||
| import PersonalAssets from "./components/personalAssets"; | import PersonalAssets from "./components/personalAssets"; | ||||||
|  | import TagsManage from "./components/tagsManage"; | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: "localResident", |   name: "residentDetail", | ||||||
|   components: {PersonalAssets, AiEditCard}, |   components: {TagsManage, PersonalAssets, AiEditCard}, | ||||||
|   props: { |   props: { | ||||||
|     instance: Function, |     instance: Function, | ||||||
|     dict: Object, |     dict: Object, | ||||||
|     permissions: Function, |     permissions: Function, | ||||||
|  |     name: {default: ""} | ||||||
|   }, |   }, | ||||||
|   data() { |   data() { | ||||||
|     let IdNumberPass = (rule, value, callback) => { |     let IdNumberPass = (rule, value, callback) => { | ||||||
| @@ -557,7 +549,8 @@ export default { | |||||||
|       return !!this.$route.query?.id |       return !!this.$route.query?.id | ||||||
|     }, |     }, | ||||||
|     pageTitle() { |     pageTitle() { | ||||||
|       return this.showDetail ? '本地居民信息' : '添加本地居民' |       let {name} = this | ||||||
|  |       return this.showDetail ? `${name}信息` : `添加${name}` | ||||||
|     }, |     }, | ||||||
|     hasSpecial() { |     hasSpecial() { | ||||||
|       //是否有特殊人员信息 |       //是否有特殊人员信息 | ||||||
| @@ -708,7 +701,7 @@ export default { | |||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| <style lang="scss" scoped> | <style lang="scss" scoped> | ||||||
| .localResident { | .residentDetail { | ||||||
|   height: 100%; |   height: 100%; | ||||||
|   font-size: 14px; |   font-size: 14px; | ||||||
| 
 | 
 | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <template> | <template> | ||||||
|   <section class="listTpl"> |   <section class="ResidentList"> | ||||||
|     <ai-list isTabs> |     <ai-list isTabs> | ||||||
|       <template #content> |       <template #content> | ||||||
|         <ai-search-bar> |         <ai-search-bar> | ||||||
| @@ -160,7 +160,7 @@ | |||||||
| import {mapState} from "vuex"; | import {mapState} from "vuex"; | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: "listTpl", |   name: "ResidentList", | ||||||
|   inject: ['resident'], |   inject: ['resident'], | ||||||
|   props: { |   props: { | ||||||
|     areaId: {default: ""}, |     areaId: {default: ""}, | ||||||
| @@ -347,7 +347,7 @@ export default { | |||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <style lang="scss" scoped> | <style lang="scss" scoped> | ||||||
| .listTpl { | .ResidentList { | ||||||
|   height: 100%; |   height: 100%; | ||||||
| } | } | ||||||
| </style> | </style> | ||||||
		Reference in New Issue
	
	Block a user