Commit c889abea by xiexiaoqin

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

parent c75c022b
...@@ -76,33 +76,64 @@ create.Page({ ...@@ -76,33 +76,64 @@ create.Page({
return return
} }
this.setData({ limitClick: true }); 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({ updateMeetingTask({
meetingId: this.data.meetingId, meetingId: this.data.meetingId,
platform: 'dingTalk', platform: 'dingTalk',
taskCreateModel: { taskCreateModel
endTime: task.endTime ? task.endTime.replace(/\//g, '-') : '',
title: task.title,
innerTaskExecutorList: task.excutorId ? [task.excutor] : null
}
}).then(res => { }).then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
//重置 //重置
this.store.data.currentTask = {}; this.store.data.currentTask = {};
this.update(); this.update();
// 修改动态列表
if (res.data.data) { if (this.data.type === 'edit') {
const addData = res.data.data[0].commentListDataModelList[0]; // 修改动态列表
addData.updateTime = getCreateShowTime(addData.updateTime); if (res.data.data) {
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData); }
this.store.data.isNeedReloadIndexList = true; } else {
if (this.store.data.separateIndex !== -1) { // 修改动态列表
this.store.data.separateIndex += 1; 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 }); this.setData({ limitClick: false });
}) })
......
...@@ -1055,6 +1055,8 @@ create.Page({ ...@@ -1055,6 +1055,8 @@ create.Page({
this.store.data.currentTask = { this.store.data.currentTask = {
endTime: task.endTime, endTime: task.endTime,
excutor: executor, excutor: executor,
originExcutor: executor,
originExcutorId: executor.userId,
title: task.title, title: task.title,
excutorId: executor.userId 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