Commit c889abea by xiexiaoqin

feat: 对接修改任务的接口,还没改完

parent c75c022b
......@@ -76,33 +76,64 @@ create.Page({
return
}
this.setData({ limitClick: true });
const excutor = task.excutorId ? [task.excutor] : null;
let taskCreateModel = {
endTime: task.endTime ? task.endTime.replace(/\//g, '-') : '',
title: task.title,
innerTaskExecutorList: excutor
}
if (this.data.type === 'edit') {
delete taskCreateModel.innerTaskExecutorList;
if (excutor) {
if (task.originExcutorId !== excutor[0].id) {
taskCreateModel.userList = excutor;
}
if (task.originExcutorId) {
taskCreateModel.removeUserList = [originExcutor]
}
} else {
if (task.originExcutorId) {
taskCreateModel.removeUserList = [originExcutor]
}
}
}
updateMeetingTask({
meetingId: this.data.meetingId,
platform: 'dingTalk',
taskCreateModel: {
endTime: task.endTime ? task.endTime.replace(/\//g, '-') : '',
title: task.title,
innerTaskExecutorList: task.excutorId ? [task.excutor] : null
}
taskCreateModel
}).then(res => {
if (res.data.code == 0) {
//重置
this.store.data.currentTask = {};
this.update();
// 修改动态列表
if (res.data.data) {
const addData = res.data.data[0].commentListDataModelList[0];
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData);
this.store.data.isNeedReloadIndexList = true;
if (this.store.data.separateIndex !== -1) {
this.store.data.separateIndex += 1;
if (this.data.type === 'edit') {
// 修改动态列表
if (res.data.data) {
}
} else {
// 修改动态列表
if (res.data.data) {
const addData = res.data.data[0].commentListDataModelList[0];
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData);
this.store.data.isNeedReloadIndexList = true;
if (this.store.data.separateIndex !== -1) {
this.store.data.separateIndex += 1;
}
this.update();
dd.navigateBack();
}
this.update();
dd.navigateBack();
}
}
this.setData({ limitClick: false });
})
......
......@@ -1055,6 +1055,8 @@ create.Page({
this.store.data.currentTask = {
endTime: task.endTime,
excutor: executor,
originExcutor: executor,
originExcutorId: executor.userId,
title: task.title,
excutorId: executor.userId
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment