Commit 75d6be2e by fengzhaoyu

Merge branch 'release/2.0.0' of http://gitlab.roboming.com/fengzhaoyu/schedule into release/2.0.0

parents 34957fde bd181f3c
......@@ -75,6 +75,8 @@ create.Page({
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData);
this.store.data.isNeedReloadIndexList = true;
this.update();
dd.navigateBack();
}
}
......
......@@ -23,7 +23,7 @@
<view class="userDynamic">
<view class="dynamicTime" data-groupId="{{item.meetingId}}" catchTap="nextDetail" data-item="{{item}}">
<text>{{dynamicItem.creator && dynamicItem.creator.name}}</text>
<text>{{dynamicItem.actionLog}}</text>
<text>{{actionLog[dynamicItem.commentCategory]}}</text>
<text>{{dynamicItem.createTime}}</text>
</view>
<view class="desc" a:if="{{dynamicItem.remark}}">{{dynamicItem.remark}}</view>
......
......@@ -32,6 +32,15 @@ let maxClickCount = 5;
create.Page({
store: pageStore,
data: {
actionLog: {
"comment_reply": "添加了评论",
"file_create": "上传了文件",
"notes_create": "添加了笔记",
"notes_modify": "更新了笔记",
"task_create": "添加了任务",
"task_modify_success": "更新了任务",
"meeting_create": "添加了会议",
},
relatedAppPlatform: null,
sign: "",
refresh: false,
......
......@@ -80,6 +80,13 @@ create.Page({
this.update();
}
// 告诉首页要刷新数据
if (this.store.data.isNeedReloadIndexList) {
this.store.data.isNeedReloadIndexList = false
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
if (this.$store.data.updateInfo.isUpate) {
if (this.$store.data.updateInfo.updateType === "modify_location") {
this.setData({
......@@ -1026,7 +1033,9 @@ create.Page({
dd.pageScrollTo({
scrollTop: 0
})
})
});
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
},
// 创建任务
goCreateTask(e) {
......@@ -1099,8 +1108,19 @@ create.Page({
}
}).then(res => {
if (res.data.code == 0) {
this.getAffairList(this.store.data.scheduleId);
//修改列表数据
if (res.data.data) {
const addData = res.data.data[0].commentListDataModelList[0];
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
}
this.closePopup();
// 通知更新
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
})
},
......@@ -1123,6 +1143,10 @@ create.Page({
// clear
this.store.data.notes = null;
this.update();
// 通知更新
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
})
},
......@@ -1193,11 +1217,12 @@ create.Page({
const deleteData = this.store.data.affairList.splice(index, 1);
this.update();
// 如果删除的动态包含文件和任务,需要修改
console.log(deleteData)
if (deleteData[0].fileDetailList || deleteData[0].meetingTaskSimpleViewModel) {
this.getTaskAndFiles(this.store.data.affairList);
}
// 通知更新
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
}
}
......@@ -1263,6 +1288,10 @@ create.Page({
// clear
this.store.data.remark = null;
this.update();
// 通知更新
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
})
},
......
......@@ -16,6 +16,7 @@ class Store {
scheduleId: '',
groupId: '',
isNeedReloadList: false,
isNeedReloadIndexList: false,
logId: '',
relatedAppPlatform: null
}
......
......@@ -86,7 +86,6 @@ create.Page({
fileList: fileInfos
}
}
console.log(data)
updateMeetingTask(data).then(res => {
this.store.data.isNeedReloadList = true;
......
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