居民档案结构重组
This commit is contained in:
		
							
								
								
									
										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> | ||||
		Reference in New Issue
	
	Block a user