Commit 8be7797f by xiexiaoqin

feat:会议详情修改动态返回时刷新动态列表

parent 404a390a
......@@ -120,7 +120,9 @@ create.Page({
this.setData({
'conToastData.showToast': true,
'conToastData.title': '保存成功',
})
});
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
if (this.$store.data.updateInfo.isUpate) {
......@@ -1365,13 +1367,14 @@ create.Page({
//刷新列表,这里为什么不在promie后执行
setTimeout(() => {
console.log(this.store.data.isNeedReloadList)
if (this.store.data.isNeedReloadList) {
this.reload(this.data.scheduleItem.id);
this.setData({
'conToastData.showToast': true,
'conToastData.title': '编辑成功',
})
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
}, 500)
}
......@@ -1436,6 +1439,8 @@ create.Page({
"id": id
}, () => {
this.reload(this.data.scheduleItem.id);
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
})
},
// 删除执行人
......@@ -1477,6 +1482,8 @@ create.Page({
'id': task.id
}, () => {
this.reload(this.data.scheduleItem.id);
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
})
},
//弹窗修改任务状态
......@@ -1493,6 +1500,8 @@ create.Page({
}, () => {
this.closePop();
this.reload(this.data.scheduleItem.id);
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
})
},
//修改任务
......@@ -1546,6 +1555,9 @@ create.Page({
//重置
this.store.data.currentTask = {};
this.update();
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
})
},
......@@ -1556,12 +1568,11 @@ create.Page({
})
},
onShareAppMessage() {
console.log('click')
return {
type: 1, //分享类型,0:全部组件 默认; 1:只能分享到钉钉;2:不能分享,只有刷新按钮
control: true,
title: '明我会议室标题',
desc: '明我会议室描述',
title: '智能会议室',
desc: '会议详情',
path: 'pages/index/index'
};
},
......
......@@ -38,9 +38,6 @@ export function getExcludeDate(data = []) {
// 返回跨天数
export function getNextDateList(startTime, endTime) {
// if (startTime.getTime() == new Date('2020/4/15 23:55').getTime()) {
// debugger
// }
let days = 0;
const nextDateList = [];
if (startTime.getDate() !== endTime.getDate()) {
......
......@@ -61,8 +61,12 @@ create.Page({
onShow() {
//如果是重复会议重新算
if (this.$store.data.indexNeedUpdate) {
dd.setNavigationBar({
title: "日程"
});
DateMap = getDateMap(this.minYear, this.maxYear);
this.onLoad();
this.getData();
this.isFirstLoad = true;
this.$store.data.indexNeedUpdate = false;
this.update();
}
......@@ -72,13 +76,19 @@ create.Page({
this.$store.data.onceMeetingContent = null;
this.update();
}
//刷新动态列表
if (this.$store.data.isIndexAffairListNeedUpdate) {
this.getPages(1);
this.$store.data.isIndexAffairListNeedUpdate = false;
this.update();
}
},
onLoad() {
this.setData({
isFullscreen: getApp().globalData.isFullscreen
});
dd.setNavigationBar({
title: this.$store.data.tabBarIndex == "0" ? "动态" : "日程"
title: "动态"
});
//获取动态列表
this.getPages(1);
......@@ -618,16 +628,16 @@ create.Page({
},
setScrollOffset(rect) {
if (rect[0][this.todayIndex]) {
if (rect[0][this.todayIndex].top <= 50 && rect[0][this.todayIndex].top >= 20) {
if (rect[0][this.todayIndex].top <= 60 && rect[0][this.todayIndex].top >= 30) {
if (this.data.offset !== 'stop') {
this.setData({ offset: 'stop' })
}
} else if (rect[0][this.todayIndex].top < 50) {
} else if (rect[0][this.todayIndex].top < 60) {
if (this.data.offset !== 'next') {
this.setData({ offset: 'next' })
}
} else if (rect[0][this.todayIndex].top > 20) {
} else if (rect[0][this.todayIndex].top > 30) {
if (this.data.offset !== 'before') {
this.setData({ offset: 'before' })
}
......
......@@ -11,6 +11,7 @@ class Store {
originUsersId: [],
originalData: null,
indexNeedUpdate: false,
isIndexAffairListNeedUpdate: false,
tabBarIndex: '0',
updateInfo: {
updateType: '',
......
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