You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							74 lines
						
					
					
						
							2.3 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							74 lines
						
					
					
						
							2.3 KiB
						
					
					
				| import {dictlist, satisfactionCrowdPortrait} from "../../../../utils/statisticsApi"; | |
| 
 | |
| Component({ | |
|     properties: {}, | |
|     data: { | |
|         tabList: [{ | |
|             label: "按省及社区满意度\n调查结果", | |
|             value: 'provinceAndSelf' | |
|         }, { | |
|             label: '按12345热线\n投诉结果', | |
|             value: '12345' | |
|         }], | |
|         tabValue: 'provinceAndSelf', | |
|         gender: '', | |
|         marriageName: '', | |
|         ageClassification: '', | |
|         cultureLevel: '', | |
|         gridName: '', | |
|         monthIncomeLevel: '', | |
|         residentTagName: '', | |
|         matchPeopleNum: '', | |
|         searchParams: '', | |
|         typeCondition: 0, | |
|         typeConditionList: [], | |
|     }, | |
|     lifetimes: { | |
|         ready() { | |
|             this.getDisKey() | |
|         } | |
|     }, | |
|     methods: { | |
|         tabChange({detail}) { | |
|             this.setData({ | |
|                 tabValue: this.data.tabList[detail].value | |
|             }) | |
|             this.getData() | |
|         }, | |
|         gotopage() { | |
|             wx.navigateTo({ | |
|                 url: '/subpages/statistics/pages/crowdPortrait/crowdPortrait?data=' + this.data.searchParams | |
|             }) | |
|         }, | |
|         getDisKey() { | |
|             dictlist({dictType: "satisfaction_category"}).then(({data}) => { | |
|                 this.setData({ | |
|                     typeConditionList:data | |
|                 }); | |
|                 this.getData() | |
|             }); | |
|         }, | |
|         getData() { | |
|             let params = { | |
|                 queryType: this.data.tabValue | |
|             } | |
|             console.log(this.data.resultType) | |
|             if (this.data.tabValue === "provinceAndSelf") { | |
|                params.category = this.data.typeConditionList[this.data.typeCondition].value | |
|             } | |
|             satisfactionCrowdPortrait(params).then(({data}) => { | |
|                 this.setData({ | |
|                     gender: data.gender, | |
|                     marriageName: data.marriageName, | |
|                     ageClassification: data.ageClassification, | |
|                     cultureName: data.cultureName, | |
|                     gridName: data.gridName, | |
|                     monthIncomeLevel: data.monthIncomeLevel, | |
|                     residentTagName: data.residentTagName.split(','), | |
|                     matchPeopleNum: data.matchPeopleNum, | |
|                     searchParams: JSON.stringify({...data, ...params}) | |
|                 }) | |
|             }) | |
|         } | |
|     } | |
| });
 | |
| 
 |