| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- const _Http = getApp().globalData.http;
- Component({
- properties: {
- disabled: {
- type: Boolean
- }
- },
- data: {
- sa_projectid: null,
- "content": {
- nocache: true,
- pageSize: 9999,
- "isAll": 0,
- "total": null
- }
- },
- lifetimes: {
- attached: function () {
- getApp().globalData.Language.getLanguagePackage(this)
- }
- },
- 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.code != '1') 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))
- }
- }
- })
|