Commit 8be7797f by xiexiaoqin

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

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