积分统计基本完成
This commit is contained in:
		| @@ -10,7 +10,7 @@ | ||||
|           <span>{{ info.phone || "-" }}</span> | ||||
|         </div> | ||||
|         <div class="detail-info__item"> | ||||
|           <h2>个人积分</h2> | ||||
|           <h2>获取积分</h2> | ||||
|           <span style="color: #2266FF;">{{ info.personalIntegral || 0 }}</span> | ||||
|         </div> | ||||
|         <div class="detail-info__item"> | ||||
| @@ -40,6 +40,7 @@ | ||||
|                     :isShowPagination="false" | ||||
|                     tableSize="small" | ||||
|                     :border="true" | ||||
|                     :dict="dict" | ||||
|                     @getList="getList"> | ||||
|           </ai-table> | ||||
|         </template> | ||||
| @@ -55,7 +56,6 @@ export default { | ||||
|     instance: Function, | ||||
|     dict: Object | ||||
|   }, | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       page: { | ||||
| @@ -68,14 +68,12 @@ export default { | ||||
|       tableData: [] | ||||
|     } | ||||
|   }, | ||||
|  | ||||
|   created() { | ||||
|     this.getInfo() | ||||
|     this.getList() | ||||
|   }, | ||||
|  | ||||
|   computed: { | ||||
|     colConfigs() { | ||||
|       const _this = this | ||||
|       return [ | ||||
|         { | ||||
|           prop: 'doTime', | ||||
| @@ -86,9 +84,7 @@ export default { | ||||
|           prop: 'doType', | ||||
|           align: 'center', | ||||
|           label: '类型', | ||||
|           render(h, {row}) { | ||||
|             return h('span', {}, _this.dict.getLabel('integralDetailType', row.bizType)) | ||||
|           } | ||||
|           dict:"integralDetailType", | ||||
|         }, | ||||
|         { | ||||
|           prop: 'changeIntegral', | ||||
| @@ -106,22 +102,24 @@ export default { | ||||
|           align: 'left' | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|     }, | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|     getInfo() { | ||||
|       let {id} = this.$route.query | ||||
|       this.instance.post(`/app/appresident/detail?id=${id}`).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.info = res.data.resident | ||||
|           this.instance.post(`/app/appvillagerintegraldetail/IntegralList?bizType=${this.doType}&type=1&residentId=${res.data.resident.id}`, null, { | ||||
|             params: this.page | ||||
|           }).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.tableData = res.data.records | ||||
|             } | ||||
|           }) | ||||
|       this.instance.post(`/app/appportaluser/list?id=${id}`).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.info = res.data.records?.[0] | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getList() { | ||||
|       let {id: portalUserId} = this.$route.query | ||||
|       this.instance.post(`/appvillagerintegraldetail/list`, null, { | ||||
|         params: {...this.page, portalUserId} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data.records | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   | ||||
| @@ -41,37 +41,6 @@ | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog class="family-list" | ||||
|                title="成员列表" | ||||
|                :visible.sync="addMemberVisible" | ||||
|                :customFooter="true" | ||||
|                :destroyOnClose="true" | ||||
|                width="780px"> | ||||
|       <ai-table | ||||
|           :tableData="familyList" | ||||
|           :col-configs="familycolConfigs" | ||||
|           :total="familyPage.total" | ||||
|           :current.sync="familyPage.current" | ||||
|           :size.sync="familyPage.size" | ||||
|           :isShowPagination="false" | ||||
|           tableSize="small" | ||||
|           @getList="familyMember(rowInfo)"> | ||||
|         <el-table-column label="与户主关系" slot="householdRelation" align="center" width="120"> | ||||
|           <template v-slot="{row}"> | ||||
|             <span v-if="row.householdIdNumber == row.idNumber">户主</span> | ||||
|             <span v-else>{{ dict.getLabel('householdRelation', row.householdRelation) }}</span> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|         <el-table-column label="身份证号" slot="idNumber" align="center" width="165"> | ||||
|           <template v-slot="{row}"> | ||||
|             <ai-id mode="show" :show-eyes="false" :value="row.idNumber"/> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|       <div class="dialog-footer" slot="footer"> | ||||
|         <el-button @click="addMemberVisible=false" size="medium">关 闭</el-button> | ||||
|       </div> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| @@ -87,19 +56,11 @@ export default { | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       areaId: '', | ||||
|       searchObj: { | ||||
|         householdName: '', | ||||
|         con: '', | ||||
|         isPositive: '' | ||||
|       }, | ||||
|       householdNameList: [{ | ||||
|         dictName: '是', | ||||
|         dictValue: '1' | ||||
|       }, { | ||||
|         dictName: '否', | ||||
|         dictValue: '0' | ||||
|       }], | ||||
|       isPositiveList: [{ | ||||
|         dictName: '是', | ||||
|         dictValue: '1' | ||||
| @@ -112,45 +73,11 @@ export default { | ||||
|         size: 10, | ||||
|         total: 0 | ||||
|       }, | ||||
|       familyPage: { | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         total: 0 | ||||
|       }, | ||||
|       exportParams: {}, | ||||
|       tableData: [], | ||||
|       dialog: { | ||||
|         title: '添加家庭', | ||||
|         visible: false | ||||
|       }, | ||||
|       dialogInfo: { | ||||
|         personType: '0', | ||||
|         name: '', | ||||
|         idNumber: '', | ||||
|         phone: '', | ||||
|         villageGroup: '', | ||||
|         status: '', | ||||
|         areaId: '', | ||||
|         householdRelation: '', | ||||
|         avatar: '' | ||||
|       }, | ||||
|       addMemberVisible: false, | ||||
|       personUrl: '', | ||||
|       familyList: [], | ||||
|       familyId: '', | ||||
|       detailInfo: {}, | ||||
|       rowInfo: {} | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     params() { | ||||
|       return { | ||||
|         ...this.searchObj, | ||||
|         areaId: this.areaId, | ||||
|         exportType: 1 | ||||
|       } | ||||
|     }, | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         { | ||||
| @@ -175,89 +102,8 @@ export default { | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     familycolConfigs() { | ||||
|       return [ | ||||
|         { | ||||
|           prop: 'householdRelation', | ||||
|           align: 'center', | ||||
|           slot: 'householdRelation', | ||||
|           label: '与户主关系', | ||||
|           width: 165, | ||||
|         }, | ||||
|  | ||||
|         // { | ||||
|         //   prop: 'householdRelation', | ||||
|         //   align: 'center', | ||||
|         //   label: '与户主关系', | ||||
|         //   render(h, {row}) { | ||||
|         //     return h('span', {}, _.$dict.getLabel('householdRelation', row.householdRelation)) | ||||
|         //   } | ||||
|         // }, | ||||
|         { | ||||
|           prop: 'residentType', | ||||
|           align: 'center', | ||||
|           label: '类型', | ||||
|           formart: v => this.dict.getLabel('residentType', v) | ||||
|         }, | ||||
|         { | ||||
|           prop: 'name', | ||||
|           align: 'center', | ||||
|           label: '姓名', | ||||
|         }, | ||||
|         { | ||||
|           prop: 'idNumber', | ||||
|           align: 'center', | ||||
|           slot: 'idNumber', | ||||
|           label: '身份证号', | ||||
|           width: 165, | ||||
|         }, | ||||
|         { | ||||
|           prop: 'phone', | ||||
|           align: 'center', | ||||
|           label: '联系电话', | ||||
|           width: 120, | ||||
|         } | ||||
|  | ||||
|       ] | ||||
|     }, | ||||
|     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() { | ||||
|     this.areaId = this.user.info.areaId; | ||||
|     this.getList(); | ||||
|   }, | ||||
|   methods: { | ||||
| @@ -266,7 +112,6 @@ export default { | ||||
|         params: { | ||||
|           ...this.searchObj, | ||||
|           ...this.page, | ||||
|           areaId: this.areaId | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res.code == 0) { | ||||
| @@ -277,41 +122,9 @@ 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 = ""; | ||||
|     }, | ||||
|     add() { | ||||
|       this.dialog.visible = true; | ||||
|       this.dialog.title = '添加家庭'; | ||||
|     }, | ||||
|     addFamily() { | ||||
|       this.dialog.visible = true; | ||||
|       this.dialog.title = '添加成员'; | ||||
|     }, | ||||
|     init(formName) { | ||||
|       this.$refs[formName].clearValidate(); | ||||
|       Object.keys(this.dialogInfo).forEach(e => { | ||||
|         this.dialogInfo[e] = '' | ||||
|       }) | ||||
|       this.dialogInfo.personType = '0'; | ||||
|       this.personUrl = ''; | ||||
|     }, | ||||
|     familyMember(row) { | ||||
|       this.instance.post(`/app/appresident/detail?id=${row.id}`).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           this.familyList = res.data.family | ||||
|           this.familyPage.total = res.data.family.length | ||||
|           this.addMemberVisible = true | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     goDetail(row) { | ||||
|       this.$router.push({query: {id: row.id}}) | ||||
|       let {id} = row | ||||
|       this.$router.push({query: {id}}) | ||||
|     } | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user