Commit 49c660b7 by xiexiaoqin

Merge branch 'dev' into release_beta/1.0.0

parents 542e2251 e86bbc37
......@@ -3,7 +3,6 @@ Component({
data: {},
props: {},
didMount() {
console.log(this.props.centerPopupList)
},
didUpdate() { },
didUnmount() { },
......
.desc {
color: rgba(10, 10, 10, 1);
font-size: 32rpx;
font-size: 28rpx;
line-height: 48rpx;
margin-top: 10rpx;
}
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,27 @@
"description": "",
"glyphs": [
{
"icon_id": "14283585",
"name": "icon_icon",
"font_class": "icon_icon",
"unicode": "e748",
"unicode_decimal": 59208
},
{
"icon_id": "14034573",
"name": "icon_uncheck",
"font_class": "icon_uncheck",
"unicode": "e747",
"unicode_decimal": 59207
},
{
"icon_id": "13973566",
"name": "icon_room2",
"font_class": "icon_room",
"unicode": "e746",
"unicode_decimal": 59206
},
{
"icon_id": "13861351",
"name": "icon_repeat",
"font_class": "icon_repeat1",
......
......@@ -20,6 +20,15 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="icon_icon" unicode="&#59208;" d="M784.384 688.64h-64c0 35.328-28.672 64-64 64H207.36C172.032 752.64 143.36 723.968 143.36 688.64v-448.512c0-35.328 28.672-64 64-64v-64c-70.656 0-128 57.344-128 128V688.64c0 70.656 57.344 128 128 128h448.512c71.168 0 128.512-57.344 128.512-128z m-544.768-609.28V528.384c0 70.656 57.344 128 128 128h448.512c70.656 0 128-57.344 128-128v-448.512c0-70.656-57.344-128-128-128H367.616c-70.656-0.512-128 56.832-128 127.488z" horiz-adv-x="1024" />
<glyph glyph-name="icon_uncheck" unicode="&#59207;" d="M512 30.72c-195.072 0-353.28 158.208-353.28 353.28s158.208 353.28 353.28 353.28 353.28-158.208 353.28-353.28-158.208-353.28-353.28-353.28z m0-64c230.4 0 417.28 186.88 417.28 417.28S742.4 801.28 512 801.28 94.72 614.4 94.72 384 281.6-33.28 512-33.28z" horiz-adv-x="1024" />
<glyph glyph-name="icon_room" unicode="&#59206;" d="M480.256 429.568c-17.408 0-31.744-14.336-31.744-31.744 0-17.408 14.336-31.744 31.744-31.744s31.744 14.336 31.744 31.744c0 17.92-14.336 31.744-31.744 31.744z m0-128c-17.408 0-31.744-14.336-31.744-31.744 0-17.408 14.336-31.744 31.744-31.744s31.744 14.336 31.744 31.744c0 17.408-14.336 31.744-31.744 31.744z m180.736 342.016v-640.512h191.488V643.584h-191.488z m0 64h233.984c11.776 0 21.504-9.728 21.504-21.504v-726.016c0-11.776-9.728-21.504-21.504-21.504H129.024c-11.776 0-21.504 9.728-21.504 21.504v716.8c0 9.728 6.656 18.432 15.872 20.48l510.976 131.072c11.264 3.072 23.04-4.096 26.112-15.36 0.512-1.536 0.512-3.584 0.512-5.12v-100.352z" horiz-adv-x="1024" />
<glyph glyph-name="icon_repeat1" unicode="&#59205;" d="M115.2 233.472l-13.824-7.168c-25.6-12.8-53.248 13.824-41.472 40.448l32.768 74.752 56.832 128c5.632 14.336 21.504 21.504 36.352 17.408l134.656-37.888L407.04 424.96c26.624-7.68 30.208-44.544 5.632-57.344l-53.76-28.16c-15.872-8.704-21.504-27.648-12.8-42.496 5.12-9.216 10.752-18.944 16.384-27.136 93.184-138.752 292.352-177.664 450.048-145.408 7.168 1.536 11.264-7.168 6.656-11.776-150.528-145.408-447.488-190.464-600.576 6.656-17.408 22.016-45.056 66.048-62.464 100.352-7.68 14.848-26.112 20.992-40.96 13.824z m792.576 310.784l13.824 7.68c25.6 13.312 53.76-12.8 43.008-39.424l-31.232-75.264-53.248-129.536c-5.632-14.336-21.504-22.016-36.352-18.432l-135.68 34.816-86.016 22.016c-27.136 6.656-31.744 43.52-7.168 56.832l52.736 29.184c14.848 8.704 19.968 27.648 11.776 42.496-5.632 8.704-11.264 17.92-17.408 26.624C565.76 636.416 368.64 670.72 213.504 636.416 204.8 634.88 199.68 645.12 205.312 651.264 353.28 797.696 645.12 847.36 801.792 655.872c17.408-20.992 46.08-65.024 64.512-98.816 8.192-14.848 26.624-20.48 41.472-12.8z" horiz-adv-x="1024" />
......
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -86,7 +86,7 @@
</view>
<view>{{item.hasDateLabel}}</view>
</view>
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" onTap="nextDetail">
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" data-index="{{index}}" onTap="nextDetail">
<view class="scheduleTitle">
<text>{{item.value.title}}{{item.value.isDaySpan ? `(第${item.value.isFewDays}天,共${item.value.duration}天)` : '' }}</text>
</view>
......
......@@ -29,7 +29,7 @@ import create from "dd-store";
let maxClickCount = 5;
create.Page({
data: {
sign: '',
sign: "",
refresh: false,
$data: null,
iconDay: currentDate.getDate(),
......@@ -46,7 +46,8 @@ create.Page({
current: 1,
pages: 1,
listLoading: true,
isIPX: checkFullScren()
isIPX: checkFullScren(),
scheduleListIndex: ''
},
scrollTop: 0,
pageSize: 10,
......@@ -63,23 +64,16 @@ create.Page({
todayIndex: 0,
onShow() {
//如果是重复会议重新算
if (this.$store.data.indexNeedUpdate) {
//单次会议往DateMap中添加
if (this.$store.data.onceMeetingContent) {
dd.setNavigationBar({
title: "日程"
});
DateMap = getDateMap(this.minYear, this.maxYear);
this.getData();
this.isFirstLoad = true;
this.$store.data.indexNeedUpdate = false;
this.update();
}
//单次会议往DateMap中添加
if (this.$store.data.onceMeetingContent) {
this.getScheduleList(this.$store.data.onceMeetingContent, "once");
this.$store.data.onceMeetingContent = null;
this.update();
}
//刷新动态列表
if (this.$store.data.isIndexAffairListNeedUpdate) {
this.getPages(1);
......@@ -88,19 +82,44 @@ create.Page({
}
//开启一个定时器
this.timer = setInterval(() => {
this.getData()
}, 30000)
this.getData();
}, 30000);
},
//修改重复会议
modifyErpeatMeeting() {
this.getData();
},
//修改会议,除单次会议修改成重复会议
modifyOnceMeetingContent(content) {
this.getData(true);
const scheduleListIndex = `scheduleList[${this.data.scheduleListIndex}].value`;
const item = this.data.scheduleList[this.data.scheduleListIndex].value
this.setData({
[scheduleListIndex]: {
...item,
...content
}
});
for (let i = 0; i < this.scheduleList.length; i++) {
if (typeof this.scheduleList[i].value !== 'string') {
if (this.scheduleList[i].value.id === item.id) {
this.scheduleList[i].value = { ...this.scheduleList[i].value, ...content };
break;
}
}
}
},
onHide() {
clearInterval(this.timer);
this.timer = null;
},
refresh() {
this.onLoad()
this.onLoad();
},
onLoad(query) {
console.log(query);
if (query && JSON.stringify(query) !== '{}') {
if (query && JSON.stringify(query) !== "{}") {
this.setData({
listLoading: false
});
......@@ -114,11 +133,19 @@ create.Page({
dd.setNavigationBar({
title: "动态"
});
this.isFirstLoad = true;
//获取动态列表
this.getPages(1);
//获取日程列表
this.getData();
this.isFirstLoad = true;
this.$store.modifyOnceMeetingContent = (content) => {
this.modifyOnceMeetingContent(content);
}
this.$store.modifyErpeatMeeting = () => {
this.modifyErpeatMeeting()
}
this.update();
},
//动态列表侧滑的时候禁止页面上下滑动
setBodyDisableScroll(isStopBodyScroll) {
......@@ -136,7 +163,8 @@ create.Page({
getDynamicList({
current,
size: 10
}).then(res => {
})
.then(res => {
if (!res.data.data) {
this.setData({
listLoading: false,
......@@ -197,11 +225,12 @@ create.Page({
if (callBack) {
callBack();
}
}).catch(err => {
})
.catch(err => {
if (err && err.refresh) {
this.setData({
refresh: true
})
});
}
});
},
......@@ -298,19 +327,50 @@ create.Page({
}
}
},
getData() {
getData(onlyChangeSign) {
getHomeUserSchedule1({
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
}).then(res => {
//是否刷新页面
if (this.data.sign && res.data.data.sign !== this.data.sign) {
DateMap = getDateMap(this.minYear, this.maxYear);
//只修改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 (res.data.data.sign !== this.data.sign) {
//定时任务是否刷新页面
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
})
......@@ -318,7 +378,7 @@ create.Page({
if (err && err.refresh) {
this.setData({
refresh: true
})
});
}
});
},
......@@ -358,7 +418,6 @@ create.Page({
}
}
}
if (DateMap.has(toLocaleDateString(startTime))) {
DateMap.get(toLocaleDateString(startTime)).push(pushItem);
}
......@@ -391,10 +450,12 @@ create.Page({
const initialTimeList = item.initialTime.split("-");
const startTimeList = item.startTime.split(":");
const DTSTART = `${initialTimeList[0]}${initialTimeList[1]}${initialTimeList[2]}T${startTimeList[0]}${startTimeList[1]}00Z`;
const rule = RRule.fromString(
let rule = { all: () => [] };
if (item.recurrenceModel.recurrenceRule) {
rule = RRule.fromString(
`${item.recurrenceModel.recurrenceRule};DTSTART=${DTSTART}`
);
}
const setDateMapValueAll = (startTime, endTime, item) => {
//如果有日程会议则用日程会议替换
let replaceItem = [];
......@@ -415,6 +476,7 @@ create.Page({
};
// 需要剔除某一天
if (item.excludePlanDates) {
const excludeData = getExcludeDate(item.excludePlanDates.split(","));
rule.all().forEach(startTime => {
//修正时间(时间有8小时时差)
......@@ -452,7 +514,7 @@ create.Page({
}
},
//日程数据
getScheduleList(response, type) {
getScheduleList(response, type, changePagination) {
if (type == "once") {
this.setDateMapValue(response.startTime, response.endTime, response);
} else {
......@@ -534,17 +596,28 @@ create.Page({
});
this.scheduleList = DateList;
this.getPagination(this.scheduleList);
// 第一次加载
this.setData({
scheduleList: this.scheduleList.slice(
this.firstPage * this.pageSize,
this.currentPage * this.pageSize
),
loading: false
});
//定位到当前日期
this.backToToday("first");
// 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() {
......@@ -728,9 +801,15 @@ create.Page({
dd.navigateTo({ url: "./../createMeeting/createMeeting" });
},
nextDetail: throttle(function (e) {
const { item, index } = e.target.dataset;
if (index) {
this.setData({
scheduleListIndex: index
})
}
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(e.target.dataset.item)
JSON.stringify(item)
)}`
});
}, 1000),
......@@ -810,7 +889,7 @@ create.Page({
maxClickCount--;
if (maxClickCount == 0) {
dd.alert({
content: "0.0.13"
content: "0.0.14"
});
maxClickCount = 5;
}
......
......@@ -149,11 +149,11 @@
</view>
<view class="mettingWayText" onTap="setCopy" data-item="513410069">
<text>ID:513410069</text>
<text class="icon iconfont iconicon_task1"></text>
<text class="icon iconfont iconicon_icon"></text>
</view>
<view class="mettingWayText passWord" onTap="setCopy" data-item="4ez3am">
<text >密码:4ez3am</text>
<text class="icon iconfont iconicon_task1"></text>
<text class="icon iconfont iconicon_icon"></text>
</view>
</view>
</view>
......
......@@ -651,8 +651,14 @@ create.Page({
return new Promise((resolve, rejects) => {
modifySchedule(Object.assign(data, obj)).then(res => {
if (res.data.code === 0) {
that.$store.data.indexNeedUpdate = true
that.update()
// that.$store.data.indexNeedUpdate = true
// that.update()
if (data.modifyContent !== 'title') {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
}
if (this.$store.data.originalData.repeatable === 1 && !!res.data.data) {
observer.notice(res.data.data)
}
......@@ -748,12 +754,21 @@ create.Page({
}
isParticipate(data1).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.update()
// this.$store.data.indexNeedUpdate = true
// this.update()
this.setData({
confirmAttendance: 0
})
this.conflictPeople()
if (data1.type === 'only') {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 0 })
}
} else {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
}
}
})
break
......@@ -767,14 +782,23 @@ create.Page({
}
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.update()
// this.$store.data.indexNeedUpdate = true
// this.update()
this.setData({
aheadTimes: [15],
'comListData.aheadTimesListId': [15],
confirmAttendance: 1
})
this.conflictPeople()
if (data.type === 'only') {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 1 })
}
} else {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
}
}
})
break
......@@ -794,7 +818,10 @@ create.Page({
planDate: this.data.scheduleItem.planDate
}
deleteSchedule(data).then(res => {
_that.$store.data.indexNeedUpdate = true;
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
// _that.$store.data.indexNeedUpdate = true;
_that.$store.data.isIndexAffairListNeedUpdate = true;
_that.update()
dd.navigateBack({
......@@ -903,8 +930,21 @@ create.Page({
modifyContent: 'title'
}
this.modifySchedule(dataTitle).then(res => {
this.$store.data.isIndexAffairListNeedUpdate = true
this.$store.data.isIndexAffairListNeedUpdate = true;
this.$store.data.originalData.title = this.data.title
if (this.data.repeatable == 0) {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({
title: this.data.title
})
}
} else {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
}
this.update()
}).catch(err => {
this.setData({
......@@ -1214,7 +1254,11 @@ create.Page({
deleteModel: 'only'
}
deleteSchedule(data).then(res => {
_that.$store.data.indexNeedUpdate = true;
// _that.$store.data.indexNeedUpdate = true;
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
_that.$store.data.isIndexAffairListNeedUpdate = true;
_that.update()
dd.navigateBack({
......@@ -1241,14 +1285,20 @@ create.Page({
} else {
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.update()
// this.$store.data.indexNeedUpdate = true
// this.update()
this.setData({
aheadTimes: [15],
'comListData.aheadTimesListId': [15],
confirmAttendance: 1
})
this.conflictPeople()
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 1 })
}
}
})
}
......@@ -1268,12 +1318,15 @@ create.Page({
} else {
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.update()
// this.$store.data.indexNeedUpdate = true
// this.update()
this.setData({
confirmAttendance: 0
})
this.conflictPeople()
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 0 })
}
}
})
}
......@@ -1294,12 +1347,22 @@ create.Page({
}
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.update()
// this.$store.data.indexNeedUpdate = true
// this.update()
this.setData({
confirmAttendance: -9
})
this.conflictPeople()
if (this.data.repeatable === 1) {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
} else {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: -9 })
}
}
}
})
},
......
......@@ -42,7 +42,7 @@
}
.dynamicTime {
margin-bottom: 24rpx;
margin-bottom: 16rpx;
}
.dynamicTime text:nth-of-type(1) {
......
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