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.
75 lines
1.9 KiB
75 lines
1.9 KiB
import { getIssueDetail, issueProcessList } from '../../../../../api/issue'
|
|
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
issueId: "",
|
|
issueState: "",
|
|
detailData: {},
|
|
processList: [],
|
|
handleSubmitData: {},
|
|
optionsCascader: [], // 分类列表
|
|
visible: false,
|
|
detailType: 'issue'
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
wx.showLoading({
|
|
title: '加载中',
|
|
})
|
|
this.setData({
|
|
id: options.Id
|
|
})
|
|
this.getIssueDetail() // 获取议题详情
|
|
this.getIssueProcessList() // 获取议题处理进度
|
|
},
|
|
// 获取议题详情
|
|
getIssueDetail() {
|
|
let that = this
|
|
getIssueDetail(that.data.id).then((res: any) => {
|
|
that.setData({
|
|
detailData: {
|
|
id: res.data.id,
|
|
eventId: res.data.eventId,
|
|
avatar: res.data.avatar,
|
|
nickname: res.data.nickname,
|
|
distributeTime: res.data.distributeTime,
|
|
images: res.data.images,
|
|
content: res.data.content,
|
|
mobile: res.data.mobile,
|
|
address: res.data.address,
|
|
categoryName: res.data.categoryName,
|
|
statementNum: res.data.statementNum,
|
|
approveNum: res.data.approveNum,
|
|
opposeNum: res.data.opposeNum,
|
|
commentNum: res.data.commentNum,
|
|
browseNum: res.data.browseNum,
|
|
allDeptNames: res.data.allDeptNames,
|
|
pageName: 'issueDetails'
|
|
}
|
|
})
|
|
})
|
|
},
|
|
// 获取处理进度
|
|
getIssueProcessList() {
|
|
console.log(':::::::::')
|
|
let that = this
|
|
issueProcessList(that.data.id).then((res: any) => {
|
|
console.log(res.data)
|
|
if (res.data.length > 1) {
|
|
res.data[res.data.length - 1].lastProcess = true
|
|
}
|
|
res.data[0].firstProcess = true
|
|
that.setData({
|
|
processList: res.data
|
|
})
|
|
wx.hideLoading()
|
|
})
|
|
}
|
|
})
|