|
|
@@ -1,46 +1,47 @@
|
|
|
const _Http = getApp().globalData.http;
|
|
|
Component({
|
|
|
- properties: {
|
|
|
- disabled: Boolean
|
|
|
- },
|
|
|
- data: {
|
|
|
- sa_projectid: null,
|
|
|
- "content": {
|
|
|
- pageSize: 9999,
|
|
|
- "isAll": 0,
|
|
|
- "total": null
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getList(id, init) {
|
|
|
- let content = this.data.content;
|
|
|
- content.sa_projectid = id;
|
|
|
- if (init) content.pageNumber = 1
|
|
|
- _Http.basic({
|
|
|
- "id": "20221201140104",
|
|
|
- content
|
|
|
- }).then(res => {
|
|
|
- console.log("工作任务列表", res)
|
|
|
- if (res.msg != '成功') return wx.showToast({
|
|
|
- title: res.data,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- list: res.data.rows,
|
|
|
- "content.total": res.data.sumscore,
|
|
|
- sa_projectid: id
|
|
|
- })
|
|
|
- console.log(this.data.sumscore, this.data.list)
|
|
|
- })
|
|
|
- },
|
|
|
- onChange() {
|
|
|
- this.setData({
|
|
|
- "content.isAll": this.data.content.isAll == 0 ? 1 : 0
|
|
|
- });
|
|
|
- this.getList(this.data.sa_projectid, true)
|
|
|
- },
|
|
|
- handleSelectProject(item, list) {
|
|
|
- this.selectComponent("#List").handleAdd(list.map(v => v.sa_project_partiesid))
|
|
|
- }
|
|
|
- }
|
|
|
+ properties: {
|
|
|
+ disabled: Boolean
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ sa_projectid: null,
|
|
|
+ "content": {
|
|
|
+ nocache: true,
|
|
|
+ pageSize: 9999,
|
|
|
+ "isAll": 0,
|
|
|
+ "total": null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList(id, init) {
|
|
|
+ let content = this.data.content;
|
|
|
+ content.sa_projectid = id;
|
|
|
+ if (init) content.pageNumber = 1
|
|
|
+ _Http.basic({
|
|
|
+ "id": "20221201140104",
|
|
|
+ content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("工作任务列表", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ list: res.data.rows,
|
|
|
+ "content.total": res.data.sumscore,
|
|
|
+ sa_projectid: id
|
|
|
+ })
|
|
|
+ console.log(this.data.sumscore, this.data.list)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onChange() {
|
|
|
+ this.setData({
|
|
|
+ "content.isAll": this.data.content.isAll == 0 ? 1 : 0
|
|
|
+ });
|
|
|
+ this.getList(this.data.sa_projectid, true)
|
|
|
+ },
|
|
|
+ handleSelectProject(item, list) {
|
|
|
+ this.selectComponent("#List").handleAdd(list.map(v => v.sa_project_partiesid))
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|