|
@ -35,7 +35,8 @@ Page({ |
|
|
content: "", //内容
|
|
|
content: "", //内容
|
|
|
address: "", //地址
|
|
|
address: "", //地址
|
|
|
demandType:'chengguan', |
|
|
demandType:'chengguan', |
|
|
status: "processing" |
|
|
status: "processing", |
|
|
|
|
|
satisfaction:'' |
|
|
}, |
|
|
}, |
|
|
minDate: '2018-01-01 00:00:00', |
|
|
minDate: '2018-01-01 00:00:00', |
|
|
|
|
|
|
|
@ -90,6 +91,17 @@ Page({ |
|
|
|
|
|
|
|
|
categoryIds:'', |
|
|
categoryIds:'', |
|
|
processData: [], |
|
|
processData: [], |
|
|
|
|
|
|
|
|
|
|
|
//满意度评价
|
|
|
|
|
|
selBad: false, |
|
|
|
|
|
selGood: false, |
|
|
|
|
|
selPerfect: false, |
|
|
|
|
|
badurl: "../../../images/satisfy-images/face1.png", |
|
|
|
|
|
badurl_light: "../../../images/satisfy-images/face1_light.png", |
|
|
|
|
|
goodurl: "../../../images/satisfy-images/face2.png", |
|
|
|
|
|
goodurl_light: "../../../images/satisfy-images/face2_light.png", |
|
|
|
|
|
perfecturl: "../../../images/satisfy-images/face3.png", |
|
|
|
|
|
perfecturl_light: "../../../images/satisfy-images/face3_light.png", |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -177,6 +189,7 @@ Page({ |
|
|
'fmData.responsibleName': res.data.responsibleName, |
|
|
'fmData.responsibleName': res.data.responsibleName, |
|
|
'fmData.responsibleMobile': res.data.responsibleMobile, |
|
|
'fmData.responsibleMobile': res.data.responsibleMobile, |
|
|
'fmData.status': res.data.status, |
|
|
'fmData.status': res.data.status, |
|
|
|
|
|
'fmData.satisfaction': res.data.satisfaction!=null?res.data.satisfaction:'', |
|
|
agencyName: res.data.gridName, |
|
|
agencyName: res.data.gridName, |
|
|
showTime: res.data.happenTime, |
|
|
showTime: res.data.happenTime, |
|
|
addressContent: res.data.address, |
|
|
addressContent: res.data.address, |
|
@ -199,6 +212,22 @@ Page({ |
|
|
if (this.data.uploadRecord) { |
|
|
if (this.data.uploadRecord) { |
|
|
this.downLoadAudio() |
|
|
this.downLoadAudio() |
|
|
} |
|
|
} |
|
|
|
|
|
if(this.data.fmData.satisfaction==='bad'){ |
|
|
|
|
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
selBad: true |
|
|
|
|
|
}); |
|
|
|
|
|
}else if(this.data.fmData.satisfaction==='good'){ |
|
|
|
|
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
selGood: true |
|
|
|
|
|
}); |
|
|
|
|
|
}else if(this.data.fmData.satisfaction==='perfect'){ |
|
|
|
|
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
selPerfect: true |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err); |
|
|
console.log(err); |
|
|
}) |
|
|
}) |
|
@ -425,6 +454,50 @@ formatTimestamp(timestamp) { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
comment(){ |
|
|
|
|
|
let that = this |
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '确定要提交满意度吗?', |
|
|
|
|
|
success(res) { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
that.icEventOldComment() |
|
|
|
|
|
} else if (res.cancel) {} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
icEventOldComment() { |
|
|
|
|
|
const parm = {} |
|
|
|
|
|
parm.icEventId = this.data.optionsId |
|
|
|
|
|
if (this.data.selBad) { |
|
|
|
|
|
parm.satisfaction = "bad"; |
|
|
|
|
|
} else if (this.data.selGood) { |
|
|
|
|
|
parm.satisfaction = "good"; |
|
|
|
|
|
} else if (this.data.selPerfect) { |
|
|
|
|
|
parm.satisfaction = "perfect"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
api.icEventOldComment(parm).then(res => { |
|
|
|
|
|
if (res.code === 0) { |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '评价成功', |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
success() { |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
wx.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}) |
|
|
|
|
|
}, 3000) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
icEventOldDelete() { |
|
|
icEventOldDelete() { |
|
|
api.icEventOldDelete([this.data.optionsId]).then(res => { |
|
|
api.icEventOldDelete([this.data.optionsId]).then(res => { |
|
|
if (res.code === 0) { |
|
|
if (res.code === 0) { |
|
@ -1757,6 +1830,28 @@ formatTimestamp(timestamp) { |
|
|
url: `/subpages/myTroubleshootDemand/pages/event/event?id=${this.data.optionsId}&categoryIds=${this.data.categoryIds}`, |
|
|
url: `/subpages/myTroubleshootDemand/pages/event/event?id=${this.data.optionsId}&categoryIds=${this.data.categoryIds}`, |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
clickSatisfy(e){ |
|
|
|
|
|
const type = e.currentTarget.dataset.satisfy; |
|
|
|
|
|
if (type === "bad") { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
selGood: false, |
|
|
|
|
|
selPerfect: false, |
|
|
|
|
|
selBad: true |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (type === "good") { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
selGood: true, |
|
|
|
|
|
selPerfect: false, |
|
|
|
|
|
selBad: false |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (type === "perfect") { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
selGood: false, |
|
|
|
|
|
selPerfect: true, |
|
|
|
|
|
selBad: false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
previewImage(e) { |
|
|
previewImage(e) { |
|
|
const currentUrl = e.currentTarget.dataset.url; |
|
|
const currentUrl = e.currentTarget.dataset.url; |
|
|
wx.previewImage({ |
|
|
wx.previewImage({ |
|
|