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.
60 lines
1.8 KiB
60 lines
1.8 KiB
import {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: '',
|
|
},
|
|
lifetimes: {
|
|
ready() {
|
|
this.getData()
|
|
}
|
|
},
|
|
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
|
|
})
|
|
},
|
|
getData() {
|
|
let params = {
|
|
queryType: this.data.tabValue
|
|
}
|
|
satisfactionCrowdPortrait(params).then(({data}) => {
|
|
this.setData({
|
|
gender: data.gender,
|
|
marriageName: data.marriageName,
|
|
ageClassification: data.ageClassification,
|
|
cultureLevel: data.cultureLevel,
|
|
gridName: data.gridName,
|
|
monthIncomeLevel: data.monthIncomeLevel,
|
|
residentTagName: data.residentTagName,
|
|
matchPeopleNum: data.matchPeopleNum,
|
|
searchParams: JSON.stringify({...data, ...params})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
});
|
|
|