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