Commit 5b3f5acf by xiexiaoqin

Merge branch 'dev' into release_beta/1.0.0

parents 57fc275d 780a8bf7
......@@ -24,7 +24,6 @@ Component({
didUnmount() { },
methods: {
comSelectList(event) {
console.log(event, 2222)
if (this.props.multiple && event.currentTarget.dataset.item.id != -1) {
if (this.data.comSelectList.includes(-1)) {
this.setData({
......
......@@ -343,17 +343,29 @@ create.Page({
if (res.data.code === 0) {
this.$store.data.tabBarIndex = '1'
if (this.data.repeatable === 0) {
this.$store.data.onceMeetingContent = {
startTime: new Date(this.$store.data.startTime),
endTime: new Date(this.$store.data.endTime),
confirmAttendance: res.data.data.confirmAttendance,
title: res.data.data.title,
id: res.data.data.id
// this.$store.data.onceMeetingContent = {
// startTime: new Date(this.$store.data.startTime),
// endTime: new Date(this.$store.data.endTime),
// confirmAttendance: res.data.data.confirmAttendance,
// title: res.data.data.title,
// id: res.data.data.id
// }
if (this.$store.addOnceMeeting) {
this.$store.addOnceMeeting({
startTime: new Date(this.$store.data.startTime),
endTime: new Date(this.$store.data.endTime),
confirmAttendance: res.data.data.confirmAttendance,
title: res.data.data.title,
id: res.data.data.id
})
}
} else {
this.$store.data.indexNeedUpdate = true
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
// this.$store.data.indexNeedUpdate = true
}
console.log(this.$store.data.onceMeetingContent)
this.update()
dd.navigateBack({
......
......@@ -57,23 +57,13 @@ create.Page({
scheduleList: [],
timer: null,
isFirstLoad: true,
isLoaded: false,
blankDataLength: 0,
blankDataLengthAfter: 0,
minYear: minYear,
maxYear: maxYear,
todayIndex: 0,
onShow() {
//单次会议往DateMap中添加
if (this.$store.data.onceMeetingContent) {
dd.setNavigationBar({
title: "日程"
});
this.getScheduleList(this.$store.data.onceMeetingContent, "once");
this.$store.data.onceMeetingContent = null;
this.update();
}
//刷新动态列表
if (this.$store.data.isIndexAffairListNeedUpdate) {
this.getPages(1);
......@@ -85,6 +75,54 @@ create.Page({
this.getData();
}, 30000);
},
onLoad(query) {
console.log(query);
if (query && JSON.stringify(query) !== "{}") {
this.setData({
listLoading: false
});
const scheduleItem = JSON.parse(Object.keys(query)[0].split("=")[1]);
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(scheduleItem)
)}`
});
}
dd.setNavigationBar({
title: "动态"
});
this.isFirstLoad = true;
//获取动态列表
this.getPages(1);
//获取日程列表
this.getData();
this.$store.modifyOnceMeetingContent = (content) => {
this.modifyOnceMeetingContent(content);
}
this.$store.modifyErpeatMeeting = () => {
this.modifyErpeatMeeting()
}
this.$store.addOnceMeeting = (content) => {
this.addOnceMeeting(content)
}
this.update();
},
//添加单次会议
addOnceMeeting(content) {
this.getData(true);
dd.setNavigationBar({
title: "日程"
});
this.getScheduleList(content, "once");
this.setData({
scheduleList: this.scheduleList.slice(
this.firstPage * this.pageSize,
this.currentPage * this.pageSize
),
loading: false
});
},
//修改重复会议
modifyErpeatMeeting() {
this.getData();
......@@ -110,6 +148,61 @@ create.Page({
}
}
},
getData(onlyChangeSign) {
getHomeUserSchedule1({
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
}).then(res => {
//只修改sign, 防止30S后刷新页面
if (onlyChangeSign) {
console.log('只修改sign')
this.setData({
sign: res.data.data.sign
})
return
}
//第一次加载
if (this.isFirstLoad && !this.isLoaded) {
console.log('第一次加载')
this.getScheduleList(res.data.data);
this.getPagination(this.scheduleList);
this.setData({
scheduleList: this.scheduleList.slice(
this.firstPage * this.pageSize,
this.currentPage * this.pageSize
),
sign: res.data.data.sign,
loading: false
});
this.isLoaded = true;
return;
}
//是否刷新页面
if (res.data.data.sign !== this.data.sign) {
console.log('刷新页面')
DateMap = getDateMap(this.minYear, this.maxYear);
this.getScheduleList(res.data.data);
this.totalPages = Math.ceil(this.scheduleList.length / this.pageSize);
this.setData({
scheduleList: this.scheduleList.slice(
this.firstPage * this.pageSize,
this.currentPage * this.pageSize
),
sign: res.data.data.sign
});
}
}).catch(err => {
if (err && err.refresh) {
this.setData({
refresh: true
});
}
});
},
onHide() {
clearInterval(this.timer);
this.timer = null;
......@@ -117,36 +210,6 @@ create.Page({
refresh() {
this.onLoad();
},
onLoad(query) {
console.log(query);
if (query && JSON.stringify(query) !== "{}") {
this.setData({
listLoading: false
});
const scheduleItem = JSON.parse(Object.keys(query)[0].split("=")[1]);
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(scheduleItem)
)}`
});
}
dd.setNavigationBar({
title: "动态"
});
this.isFirstLoad = true;
//获取动态列表
this.getPages(1);
//获取日程列表
this.getData();
this.$store.modifyOnceMeetingContent = (content) => {
this.modifyOnceMeetingContent(content);
}
this.$store.modifyErpeatMeeting = () => {
this.modifyErpeatMeeting()
}
this.update();
},
//动态列表侧滑的时候禁止页面上下滑动
setBodyDisableScroll(isStopBodyScroll) {
this.setData({
......@@ -327,61 +390,7 @@ create.Page({
}
}
},
getData(onlyChangeSign) {
getHomeUserSchedule1({
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
}).then(res => {
//只修改sign, 防止30S后刷新页面
if (onlyChangeSign) {
console.log('只修改sign')
this.setData({
sign: res.data.data.sign
})
return
}
//第一次加载
if (this.isFirstLoad) {
console.log('第一次加载')
this.getScheduleList(res.data.data);
this.getPagination(this.scheduleList);
this.setData({
scheduleList: this.scheduleList.slice(
this.firstPage * this.pageSize,
this.currentPage * this.pageSize
),
loading: false
});
this.backToToday("first");
}
//定时任务是否刷新页面
if (this.data.sign && res.data.data.sign !== this.data.sign) {
console.log('刷新页面')
DateMap = getDateMap(this.minYear, this.maxYear);
this.getScheduleList(res.data.data);
this.setData({
scheduleList: this.scheduleList.slice(
this.firstPage * this.pageSize,
this.currentPage * this.pageSize
),
loading: false
});
}
this.setData({
sign: res.data.data.sign
})
}).catch(err => {
if (err && err.refresh) {
this.setData({
refresh: true
});
}
});
},
//生成DateMap值
setDateMapValue(startTime, endTime, item, type) {
const pushItem = {
......@@ -514,7 +523,7 @@ create.Page({
}
},
//日程数据
getScheduleList(response, type, changePagination) {
getScheduleList(response, type) {
if (type == "once") {
this.setDateMapValue(response.startTime, response.endTime, response);
} else {
......@@ -595,29 +604,6 @@ create.Page({
}
});
this.scheduleList = DateList;
// if (changePagination) {
// this.setData({
// scheduleList: this.scheduleList.slice(
// this.firstPage * this.pageSize,
// this.currentPage * this.pageSize
// ),
// loading: false
// });
// return
// }
// this.getPagination(this.scheduleList);
// // 第一次加载
// this.setData({
// scheduleList: this.scheduleList.slice(
// this.firstPage * this.pageSize,
// this.currentPage * this.pageSize
// ),
// loading: false
// });
// //定位到当前日期
// this.backToToday("first");
},
//日程上拉加载
lower() {
......@@ -715,7 +701,7 @@ create.Page({
}
if (offset == "next") {
for (let i = this.data.currentDataIndex; i < rect[0].length; i++) {
if (rect[0][i].top > 0) {
if (rect[0][i] && rect[0][i].top > 0) {
if (
this.data.scheduleList[i].dateStr.split("/")[1] !==
this.data.currentData.split("/")[1]
......@@ -734,7 +720,7 @@ create.Page({
this.data.scheduleList.length - 1
);
for (; i > 0; i--) {
if (rect[0][i].top < 50) {
if (rect[0][i] && rect[0][i].top < 50) {
if (
this.data.scheduleList[i].dateStr.split("/")[1] !==
this.data.currentData.split("/")[1]
......
......@@ -5,8 +5,14 @@
/* height: calc(100vh - 200rpx); */
}
.affair-list-margin-top {
margin-top: 16rpx;
page {
background: #fff;
}
.affair-list-margin-line {
width: 100%;
height: 16rpx;
background: #f5f6f7;
}
.simple-column {
......
......@@ -221,6 +221,8 @@
<!-- 动态列表 -->
<import src="../../template/avater/index.axml"/>
<import src="../../template/affairBlank/index.axml"/>
<view class="affair-list-margin-line">
</view>
<view class="affair-list {{isExpand? '' : 'affair-list-margin-top'}} {{!isExpand&&$data.participatorList.length>1 ? 'addPadding' : ''}}" onTap="hideFileOperate">
<view a:if="{{!isExpand}}" class="affair-list-title">会议动态</view>
<block a:if="{{!affairLoading}}">
......
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