【update】 起草组会议相关判断的增加

This commit is contained in:
fengchenchen
2024-01-11 18:03:59 +08:00
parent 3cb7496a05
commit 289a764751
11 changed files with 112 additions and 13 deletions
+46 -10
View File
@@ -7,7 +7,7 @@ Page({
data: {
statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
index: 0,
type: '', // project 是来款项目 work 是工作组 ziliao是资料网员
type: '', // project 是来款项目 work 是工作组 ziliao是资料网员 draft 是起草组
list: [], // 项目列表
searchParams: {
pageNo: 1,
@@ -22,6 +22,14 @@ Page({
pageTitle:'项目'
}
},
// 编辑联系人信息
editContactsInfo(e) {
// 跳转到联系人页面
wx.navigateTo({
url: `../contacts/contacts?id=${e.currentTarget.dataset.project.id}&type=${this.data.type}&workingGroupId=${e.currentTarget.dataset.project.workingGroupId}`,
})
},
goBack(){
wx.navigateBack()
},
@@ -156,6 +164,28 @@ Page({
duration: 2000
})
})
} else if(this.data.type == 'draft'){
UserApi.draftList(this.data.searchParams).then(res=>{
if(res.success){
// 搜索时,把原数据清空,重新筛选
if(that.data.searchParams.pageNo === 1) {
that.setData({
list: []
})
}
if(res.result.records && res.result.records.length){
that.setData({
list: [...that.data.list, ...res.result.records]
})
}
}
}).catch(err=>{
wx.showToast({
title: '加载失败',
icon: 'none',
duration: 2000
})
})
}
},
/**
@@ -180,20 +210,26 @@ Page({
*/
onLoad: function (options) {
this.data.type = options.type
let pageTitle = ''
switch(options.type){
case 'ziliao': this.setData({
pageTitle:'资料网员'
})
case 'ziliao':
pageTitle = '资料网员'
break
case 'work': this.setData({
pageTitle:'工作组'
})
case 'work':
pageTitle = '工作组'
break
default : this.setData({
pageTitle:'项目'
})
case 'draft':
pageTitle = '起草组'
break
default :
pageTitle = '项目'
break
}
this.setData({
pageTitle: pageTitle,
type: this.data.type
})
this.loadData()
},
/**