const _Http = getApp().globalData.http; Component({ properties: { list: Array }, data: { viewIndex: null }, options: { addGlobalClass: true }, methods: { selectClient(e) { const { item } = e.currentTarget.dataset, pages = getCurrentPages(), page = pages[pages.length - 1]; this.setData({ taskname: item.taskname, content: { sa_projectid: page.data.detail.sa_projectid, "sa_projtaskmagid": item.sa_projtaskmagid, "sa_projstagemagid": item.sa_projstagemagid, } }) if (item.partiestype.length != 0) { wx.navigateTo({ url: '/packageA/select/setclient/select?params=' + JSON.stringify({ "id": 20221129152204, content: { model: "#Task", nocache: true, sa_projectid: page.data.detail.sa_projectid, "sa_projtaskmagid": item.sa_projtaskmagid, pageNumber: 1, pageTotal: 1, pageSize: 20, total: null, where: { condition: "", } }, }), }); } else { this.handleAdd([]); } }, handleAdd(ids) { let content = this.data.content; content.sa_project_partiesids = ids wx.redirectTo({ url: '/packageA/project/modules/task/add?content=' + JSON.stringify(content) + '&taskname=' + this.data.taskname, }) }, viewHistory(e) { const { sa_projectid, sa_projtaskmagid, sa_projstagemagid } = e.currentTarget.dataset.item, content = { nocheca: true, sa_projectid, sa_projtaskmagid, sa_projstagemagid, pageNumber: 1, pageTotal: 1, pageSize: 20 }; if (!content.sa_projectid) { let page = getCurrentPages().find(v => v.__route__ == 'packageA/project/detail'); content.sa_projectid = page.data.detail.sa_projectid; } wx.navigateTo({ url: '/packageA/project/modules/task/history?content=' + JSON.stringify(content), }) } } })