Commit 5c185c19 by liang ce

合并冲突

parents 57d678a5 5644cfff
......@@ -168,6 +168,8 @@ create.Component({
});
},
nextPage(event) {
this.$store.data.tabBarIndex = '0'
this.update()
dd.navigateTo({ url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(event.currentTarget.dataset.item)}` });
},
}
......
{
"component": true,
"disableScroll": true,
"allowsBounceVertical": "NO",
"usingComponents": {
"task-list": "../../components/taskList/taskList",
"file-list": "../../components/fileList/fileList",
......
......@@ -46,9 +46,9 @@ create.Component({
this.getDate();
}
},
didUnmount() {},
didUnmount() { },
methods: {
getDate: throttle(function(e) {
getDate: throttle(function (e) {
let data = {
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
......@@ -82,7 +82,9 @@ create.Component({
});
});
}, 1000),
nextDetail: throttle(function(e) {
nextDetail: throttle(function (e) {
this.$store.data.tabBarIndex = '1'
this.update()
let item = e.target.dataset.item;
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(
......@@ -175,8 +177,8 @@ create.Component({
item.recurrenceModel.startTime;
let endTime = new Date(
getFormatDate(time, "yyyyMMdd") +
" " +
item.recurrenceModel.startTime
" " +
item.recurrenceModel.startTime
);
endTime.setMinutes(
endTime.getMinutes() + item.recurrenceModel.duration
......@@ -204,8 +206,8 @@ create.Component({
item.recurrenceModel.startTime;
let endTime = new Date(
getFormatDate(time, "yyyyMMdd") +
" " +
item.recurrenceModel.startTime
" " +
item.recurrenceModel.startTime
);
endTime.setMinutes(
endTime.getMinutes() + item.recurrenceModel.duration
......@@ -244,7 +246,7 @@ create.Component({
);
}
});
scheduleMap.forEach(function(value, key, map) {
scheduleMap.forEach(function (value, key, map) {
scheduleList.push(value);
});
return scheduleList;
......@@ -309,9 +311,9 @@ create.Component({
duration: count + 1,
isBeOverdue:
new Date().getTime() >
new Date(
AllScheduleList[y].endTime.replace(/-/g, "/")
).getTime()
new Date(
AllScheduleList[y].endTime.replace(/-/g, "/")
).getTime()
? true
: false
});
......@@ -323,7 +325,7 @@ create.Component({
// 第一个月的第一天
let listWeek = new Date(year, 0, 1).getDay() === 0 ? 0 : 1;
let thisDay = new Date().toLocaleDateString();
DateMap.forEach(function(value, key, map) {
DateMap.forEach(function (value, key, map) {
const keyDate = new Date(key);
if (keyDate.getDay() === 0) {
let rangeYear1 = keyDate.getFullYear();
......@@ -336,7 +338,7 @@ create.Component({
type: "week",
value: `第${listWeek}周,${rangeMonth1 + 1}${rangeDay1}日 - ${
rangeMonth2 == rangeMonth1 ? "" : rangeMonth2 + 1 + "月"
}${rangeDay2}日`,
}${rangeDay2}日`,
dayStr: key
});
listWeek += 1;
......
{
"pages": [
"pages/index/index",
"pages/meetingRoomList/meetingRoomList",
"pages/scheduleList/scheduleList",
"pages/index/index",
"pages/scheduleList/scheduleList",
"pages/meetingDetail/meetingDetail",
"pages/excutorList/excutorList",
"pages/createMeeting/createMeeting",
......@@ -14,6 +15,6 @@
"pages/attendeeList/attendeeList"
],
"window": {
"allowsBounceVertical": "NO"
"allowsBounceVertical": "YES"
}
}
......@@ -2,8 +2,8 @@
<view class="desc" a:if='{{fileView.description}}'>
{{fileView.description}}
</view>
<view class="task-list" a:if="{{fileView.fileInfos && fileView.fileInfos.length > 0}}">
<view class="file-box {{isCanDelete ? 'file-box-close': ''}}" a:for="{{ fileView.fileInfos}}" catchTap="preview" data-file="{{item}}">
<view class="task-list" a:if="{{fileView.fileInfos && fileView.fileInfos.length > 0}}" a:for="{{ fileView.fileInfos}}">
<view class="file-box {{isCanDelete ? 'file-box-close': ''}}" catchTap="preview" data-file="{{item}}">
<view class="file-icon {{item.fileType}}"></view>
<view class="file-title">
<text>{{item.fileName.slice(0, item.fileName.length - 5)}}</text>
......
......@@ -24,6 +24,7 @@ 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({
......
......@@ -7,7 +7,7 @@
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-size: 36rpx;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
......
{
"dependencies": {
"dd-store": "^1.8.4",
"less": "^3.11.1",
"rrule": "^2.6.4"
}
}
......@@ -15,8 +15,8 @@ create.Page({
],
meetingWayList: [
// { id: 0, text: 'Webex meeting', imageUrl: '../../assests/Webex.png', meetingWayModel: { model: 'webex' } },
{ id: 1, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } },
{ id: 2, text: '钉钉', imageUrl: '../../assests/dingding.png', meetingWayModel: { model: 'dingtalk' } }
{ id: 0, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } },
{ id: 1, text: '钉钉', imageUrl: '../../assests/dingding.png', meetingWayModel: { model: 'dingtalk' } }
],
comSelectListId: 0,
meetingWayModelId: null,
......@@ -183,7 +183,7 @@ create.Page({
value.recurrenceModel.initialTime = this.$store.data.startTime.replace(/\//g, "-").substring(0, 10)
value.recurrenceModel.terminateTime = this.getTwoYearToday(this.$store.data.startTime)
if (index === 2) {
value.recurrenceModel.weekDayList = [this.data.repeatWeek[new Date().getDay()]]
value.recurrenceModel.weekDayList = [this.data.repeatWeek[new Date(this.$store.data.startTime).getDay()]]
} else if (index === 4) {
value.recurrenceModel.daysOfMonth = [this.$store.data.startTime.replace(/\//g, "-").substring(8, 10)]
}
......@@ -193,7 +193,7 @@ create.Page({
}
this.setData({
'comListData.repeatList': repeatList,
week: this.data.weekList[new Date(this.$store.data.startTime.replace(/\//g, "-")).getDay()]
week: this.data.weekList[new Date(this.$store.data.startTime).getDay()]
})
},
......@@ -315,12 +315,12 @@ create.Page({
this.$store.data.endTime = `${event.endTime}:00`
this.update()
this.acrossDay(this.$store.data.startTime, this.$store.data.endTime)
this.setData({
popupShow: false,
week: this.data.weekList[new Date(this.$store.data.startTime).getDay()],
})
this.conflictPeople()
this.resetRepeatList()
},
addSchedule: throttle(function () {
let data = {
......
......@@ -28,7 +28,7 @@ create.Page({
let title = "动态";
switch (e.currentTarget.dataset.tabbar) {
case '0':
title = '动态181';
title = '动态185';
break;
case "1":
title = "日程";
......
@import "../../template/affairBlank/index.acss";
page {
background: rgba(232, 237, 240, 1);
}
.affair-list {
background: #fff;
padding: 48rpx 32rpx 220rpx 32rpx;
......@@ -438,6 +434,7 @@ input {
.participate>text {
margin-right: 10rpx;
color: #15BC83;
vertical-align: middle;
}
.noParticipateStatus {
......@@ -582,4 +579,8 @@ input {
.iconicon_repeat1 {
color: rgba(10, 10, 10, 0.4)
}
.participateText {
vertical-align: middle
}
\ No newline at end of file
......@@ -149,11 +149,12 @@
<view class="originStaus" a:if="{{confirmAttendance === -9}}">
<view catchTap="participate">
<text class="iconfont iconicon_Agreed1"></text>
<text>参加</text></view>
<text class="participateText">参加</text>
</view>
<text class="devider"></text>
<view catchTap="noParticipate">
<text class="iconfont iconicon_noAgreed1"></text>
<text>不参加</text>
<text class="participateText">不参加</text>
</view>
</view>
<!--参加状态-->
......@@ -171,13 +172,13 @@
<text class="devider"></text>
<view class="participate" catchTap="initialState">
<text class="iconfont iconicon_Agreed1"></text>
<text>参加</text>
<text class="participateText">参加</text>
</view>
</view>
<!--不参加状态 -->
<view class="noParticipateStatus" a:if="{{confirmAttendance === 0}}" catchTap="initialState">
<text class="iconfont iconicon_noAgreed1"></text>
<text>不参加</text>
<text class="participateText">不参加</text>
</view>
</view>
<view class="footerBottom">
......@@ -208,7 +209,7 @@
<text class="iconfont iconicon_task1"></text>
</view>
<view class="title">
会议任务
会议任务
<text>{{item.createTime}}</text>
</view>
<task-list onShowPop="showPop" onSetCurrentTask="setCurrentTask" taskList="{{item.taskViewList}}" onChangeTaskStatusOnList="changeTaskStatusOnList"/>
......@@ -216,7 +217,7 @@
<view a:if="{{item.category == '2' && item.fileView && item.fileView.fileInfos && item.fileView.fileInfos.length > 0 }}" class='compose-column'>
<template is="avater" data="{{item: item.fileView.creatorInfo}}"/>
<view class="title">
{{item.fileView.creatorInfo.username}}
{{item.fileView.creatorInfo.username}}
<text>{{item.createTime}}</text>
</view>
<file-list fileView="{{item.fileView}}" organizer="{{organizer}}" currentPeople="{{currentPeople}}" onDeleteMeetingFile="deleteMeetingFile"/>
......
......@@ -30,9 +30,8 @@ create.Page({
{ id: 4, text: '每月', icon: '', repeatable: 1, recurrenceModel: { model: 'absoluteMonthly', daysOfMonth: ['23'], interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } }
],
meetingWayList: [
// { id: 0, text: 'Webex meeting', imageUrl: '../../assests/Webex.png', meetingWayModel: { model: 'webex' } },
{ id: 1, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } },
{ id: 2, text: '钉钉', imageUrl: '../../assests/dingding.png', meetingWayModel: { model: 'dingtalk' } }
{ id: 0, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } },
{ id: 1, text: '钉钉', imageUrl: '../../assests/dingding.png', meetingWayModel: { model: 'dingtalk' } }
],
aheadTimesList: [
{ id: -1, text: '不提醒', icon: 'iconicon_cycle' },
......@@ -124,7 +123,6 @@ create.Page({
}
},
onLoad(event) {
this.reset()
dd.setNavigationBar({
title: `会议详情`
......@@ -179,9 +177,7 @@ create.Page({
this.setData({
confirmAttendance: res.data.data.confirmAttendance === null ? -9 : res.data.data.confirmAttendance,
organizer: res.data.data.organizer,
'comListData.meetingWayModelId': res.data.data.meetingWayModel.model === null ? null : (res.data.data.meetingWayModel.model === 'dingtalk' ? 2 : (res.data.data.meetingWayModel.model === 'zoom' ? 1 : 0)),
// 'scheduleItem.id': res.data.data.id,
// 'scheduleItem.groupId': res.data.data.groupId,
'comListData.meetingWayModelId': res.data.data.meetingWayModel.model === null ? null : (res.data.data.meetingWayModel.model === 'dingtalk' ? 1 : 0),
repeatable: res.data.data.repeatable,
recurrenceModel: res.data.data.repeatable ? { model: res.data.data.recurrenceModel.model, daysOfMonth: res.data.data.recurrenceModel.daysOfMonth, interval: 1, initialTime: res.data.data.recurrenceModel.initialTime, terminateTime: res.data.data.recurrenceModel.terminateTime, weekDayList: res.data.data.recurrenceModel.weekDayList } : { model: 'no_repeat' },
title: res.data.data.title,
......@@ -212,6 +208,7 @@ create.Page({
this.store.data.groupId = res.data.data.groupId;
this.update();
this.reload(this.data.scheduleItem.id);
this.resetRepeatList()
} else {
}
......@@ -384,7 +381,7 @@ create.Page({
value.recurrenceModel.initialTime = this.$store.data.startTime.replace(/\//g, "-").substring(0, 10)
value.recurrenceModel.terminateTime = this.getTwoYearToday(this.$store.data.startTime)
if (index === 2) {
value.recurrenceModel.weekDayList = [this.data.repeatWeek[new Date().getDay()]]
value.recurrenceModel.weekDayList = [this.data.repeatWeek[new Date(this.$store.data.startTime).getDay()]]
} else if (index === 4) {
value.recurrenceModel.daysOfMonth = [this.$store.data.startTime.replace(/\//g, "-").substring(8, 10)]
}
......@@ -394,9 +391,8 @@ create.Page({
}
this.setData({
'comListData.repeatList': repeatList,
week: this.data.weekList[new Date(this.$store.data.startTime.replace(/\//g, "-")).getDay()]
week: this.data.weekList[new Date(this.$store.data.startTime).getDay()]
})
},
// 选择完comList后的回调 重复 会议方式
selectComList(event) {
......@@ -420,6 +416,7 @@ create.Page({
this.resetRepeatList()
this.setData({
popupShow: false,
'conSelectPopupData.selectType': 'common',
'comListData.comSelectListId': event.currentTarget.dataset.item.id,
repeatable: event.currentTarget.dataset.item.repeatable,
recurrenceModel: event.currentTarget.dataset.item.recurrenceModel
......@@ -545,11 +542,12 @@ create.Page({
this.acrossDay(this.$store.data.startTime, this.$store.data.endTime)
this.setData({
popupShow: false,
'conSelectPopupData.selectType': 'common',
week: this.data.weekList[new Date(this.$store.data.startTime).getDay()],
editType: '',
forbiddenScroll: false
})
this.conflictPeople()
this.resetRepeatList()
if (this.data.repeatable) {
this.setData({
'conSelectPopupData.showSelectPopup': true,
......@@ -588,7 +586,6 @@ create.Page({
modifySchedule(Object.assign(data, obj)).then(res => {
if (res.data.code === 0) {
that.$store.data.indexNeedUpdate = true
that.$store.data.tabBarIndex = '1'
that.update()
if (this.$store.data.originalData.repeatable === 1 && !!res.data.data) {
observer.notice(res.data.data)
......@@ -681,7 +678,6 @@ create.Page({
isParticipate(data1).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 0
......@@ -701,7 +697,6 @@ create.Page({
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 1
......@@ -1003,6 +998,38 @@ create.Page({
this.$store.data.originalData.startTime = this.$store.data.startTime.replace(/\//g, "-")
this.$store.data.originalData.endTime = this.$store.data.endTime.replace(/\//g, "-")
this.update()
this.resetRepeatList()
if (this.data.recurrenceModel.model === 'weekly' && this.data.recurrenceModel.weekDayList.length === 1) {
let dataRepeat4 = {
startTime: this.$store.data.startTime.replace(/\//g, "-"),
endTime: this.$store.data.endTime.replace(/\//g, "-"),
modifyModel: modifyModel,
modifyContent: 'change_rule',
recurrenceModel: this.data.comListData.repeatList[2].recurrenceModel,
repeatable: this.data.repeatable
}
this.modifySchedule(dataRepeat4).then(() => {
this.setData({
recurrenceModel: this.data.comListData.repeatList[2].recurrenceModel
})
})
} else if (this.data.recurrenceModel.model === 'absoluteMonthly') {
let dataRepeat5 = {
startTime: this.$store.data.startTime.replace(/\//g, "-"),
endTime: this.$store.data.endTime.replace(/\//g, "-"),
modifyModel: modifyModel,
modifyContent: 'change_rule',
recurrenceModel: this.data.comListData.repeatList[4].recurrenceModel,
repeatable: this.data.repeatable
}
this.modifySchedule(dataRepeat5).then(() => {
this.setData({
recurrenceModel: this.data.comListData.repeatList[4].recurrenceModel
})
})
}
this.modifySchedule(data, needNotice)
})
break
case 'aheadTimes':
......@@ -1113,7 +1140,6 @@ create.Page({
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 1
......@@ -1139,7 +1165,6 @@ create.Page({
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 0
......@@ -1166,7 +1191,6 @@ create.Page({
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: -9
......
......@@ -73,8 +73,8 @@ create.Page({
}
},
onLoad(query) {
// let date = new Date(this.$store.data.startTime.replace(/-/g, "/"))
let date = new Date();
let date = new Date(this.$store.data.startTime.replace(/-/g, "/"));
// let date = new Date();
let year = date.getFullYear();
let month = ("00" + (date.getMonth() + 1)).slice(-2);
let day = ("00" + date.getDate()).slice(-2);
......
<view class="outLookContact">
<!-- 输入邮箱联系人 -->
<view class="addContact">
<input placeholder="请输入邮箱" onInput="onInput" value="{{value}}" focus="{{false}}" />
<input placeholder="请输入邮箱" onInput="onInput" value="{{value}}" onConfirm="addEmail" onBlur="addEmail"/>
<view class="icon iconfont iconicon_add " onTap="addEmail">
</view>
</view>
......
......@@ -96,7 +96,9 @@ create.Page({
outlookContact: outlookContact
})
this.conflictPeople()
} else {
}
else if (!!this.data.value) { }
else {
dd.alert({
content: '请输入正确的邮箱格式',
buttonText: '确定'
......
import { RRule, RRuleSet, rrulestr } from "rrule";
import { padZero } from "../../utils/utils";
export function getDateMap(minYear, maxYear) {
const DateMap = new Map();
const getOneYear = (year) => {
const yearDays = (year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 366 : 365;
for (let i = 1; i <= yearDays; i++) {
DateMap.set(new Date(year, 0, i).toLocaleDateString(), []);
}
}
for (let i = minYear; i <= maxYear; i++) {
getOneYear(i);
}
return DateMap
}
// 返回删除的日期
/**
* 如果删除单次重复会议返回['2020-04-20'],
* 如果删除此次及以后重复会议返回['future2020-04-20']
*/
export function getExcludeDate(data = []) {
const excludeDateList = [];
const futureList = [];
data.forEach(item => {
//删除此次及以后
if (item.length > 10) {
futureList.push(new Date(item.slice(6, 16).replace(/-/g, "/")).getTime());
}
//删除单次
else {
excludeDateList.push(item);
}
});
return {
excludeDateList,
minFutureTime: Math.min(...futureList)
};
}
// 返回跨天数
export function getNextDateList(startTime, endTime) {
let days = 0;
const nextDateList = [];
if (startTime.getDate() !== endTime.getDate()) {
//同一个月
if (startTime.getMonth() !== endTime.getMonth()) {
days = endTime.getDate() - startTime.getDate();
}
//跨月
else {
// 一个月份有多少天new Date(year, month, 0).getDate()
const startMonth = new Date(startTime.getFullYear(), startTime.getMonth(), 0).getDate();
days = startMonth - startTime.getDate() + endTime.getDate()
}
} else {
//跨一个月 不考虑
}
//返回跨天的日期数组
for (let i = 1; i <= days; i++) {
const newDate = new Date(startTime);
const nextDate = new Date(newDate.setDate(newDate.getDate() + i)).toLocaleDateString();
nextDateList.push(nextDate)
}
return nextDateList
}
export function getWeekNumber(year, month, days) {
const isLeapYear = (year) => (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0)
const getMonthDays = (year, month) => [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] || (isLeapYear(year) ? 29 : 28);
//那一天是那一年中的第多少天
for (var i = 0; i < month; i++) {
days += getMonthDays(year, i);
}
//那一年第一天是星期几
var yearFirstDay = new Date(year, 0, 1).getDay();
var week = null;
if (yearFirstDay == 0) {
week = Math.ceil(days / 7);
} else {
days -= (6 - yearFirstDay + 1);
week = Math.ceil(days / 7);
}
return week;
}
export function getBlankList(year) {
const dateMap = getDateMap(year, year);
const DateList = [];
dateMap.forEach(function (value, key) {
const keyDate = new Date(key);
const year = keyDate.getFullYear();
const month = keyDate.getMonth();
const date = keyDate.getDate();
const day = keyDate.getDay();
// 生成年
if (month === 0 && date === 1) {
DateList.push({
type: "year",
value: year,
dateStr: `${year}`
});
}
//生成月
if (date === 1) {
DateList.push({
type: "month",
value: month + 1,
dateStr: `${year}/${month + 1}`
});
}
//生成周
if (day === 0) {
const rangeDate = new Date(year, month, date + 6);
const rangeMonth2 = new Date(rangeDate).getMonth();
const rangeDay2 = new Date(rangeDate).getDate();
DateList.push({
type: "week",
value: `第${getWeekNumber(year, month, date)}周,${month + 1}${date}日 - ${
rangeMonth2 == month ? "" : rangeMonth2 + 1 + "月"
}${rangeDay2}日`,
dateStr: `${year}/${month + 1}/${date}-week`
});
}
})
return DateList;
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
</view>
</view>
</view>
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="100" onScrollToLower="lower" onScrollToUpper="upper" scroll-into-view="{{todayStr}}">
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="100" onScrollToLower="lower" scroll-into-view="{{todayStr}}">
<block a:for="{{scheduleList}}" key="{{item.dateStr}}">
<!-- 年 -->
<block a:if="{{item.type == 'year'}}">
......
{
"allowsBounceVertical": "YES",
"pullRefresh": true,
"usingComponents": {
"popup": "../../components/popup/index"
}
}
}
\ No newline at end of file
......@@ -51,6 +51,8 @@ export function getFormatDate(time, format, symbol) {
: `${year}/${month}/${day}`;
} else if (format === "HH:mm:ss") {
return `${hour}:${minutes}:${seconds}`;
} else if (format === "HH:mm") {
return `${hour}:${minutes}`;
}
}
// 返回每个月的第一天
......@@ -142,3 +144,7 @@ export function getCreateShowTime(createdTime) {
return timeResule
}
export function padZero(val) {
return ("00" + val).slice(-2);
}
\ No newline at end of file
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