epmet 工作端 小程序
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.
 

122 lines
3.2 KiB

import {icEventOldList, maporg} from "../../../../../utils/statisticsApi";
Page({
data: {
orgList: [],
orgIndex: 0,
satisfactionSourceIndex: -1,
satisfactionSourceOptions: [
{
value: "0",
label: "随手拍/随时讲",
},
{
value: "1",
label: "多媒体反应",
},
{
value: "2",
label: "社区电话",
},
// {
// value: "3",
// label: "12345",
// },
{
value: "4",
label: "网络员手持终端",
},
{
value: "5",
label: "北尚诉办",
},
],
tagIndex: -1,
tagOptions: [
{
value: "1",
label: "难点痛点",
},
{
value: "2",
label: "矛盾纠纷",
},
{
value: "3",
label: "自身问题",
},
{
value: "4",
label: "超出服务范围",
}],
list: [],
total: 0,
pageNo: 1,
pageSize: 20,
},
onLoad(options) {
this.getOrg()
},
getOrg() {
maporg().then(async ({data}) => {
let parent = {value: data.id, label: data.name}
this.setData({
orgList: [
parent, ...data.children.map(item => {
return {
value: item.id,
label: item.name
}
})
]
})
this.getList()
})
},
sourceChange(e) {
console.log(e)
},
onConfirm() {
this.setData({
list: [],
})
this.getList();
},
getList() {
let params = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
agencyId: this.data.orgList[this.data.orgIndex].value,
sourceType: this.data.satisfactionSourceIndex >= 0 ? this.data.satisfactionSourceOptions[this.data.satisfactionSourceIndex].value : '',
type: this.data.tagIndex >= 0 ? this.data.tagOptions[this.data.tagIndex].value : '',
}
icEventOldList({
...params,
status: "processing"
}).then(res => {
/* res.data.list.forEach(item => {
item.happenTime = this.formatTime(item.happenTime)
})*/
this.setData({
list: this.data.list.concat(res.data.list),
total: res.data.total
})
})
},
gotopage(e) {
wx.navigateTo({
url: '/subpages/statistics/pages/event/detail/detail?is12345=2&id=' + e.currentTarget.dataset.id
})
},
scrolltolower() {
if (this.data.list.length < this.data.total) {
this.setData({
pageNo: this.data.pageNo + 1
})
this.getList()
}
}
})