Commit 1517b4e4 by fengzhaoyu

今天 明天 后天 修改

parent 321aa03f
......@@ -177,7 +177,8 @@ create.Page({
})
}
} else {
if (new Date(timeStr).getTime() <= new Date(this.data.time1).getTime()) {
if (new Date(timeStr).getTime() < new Date(this.data.time1).getTime() || (new Date(timeStr).getTime() == new Date(this.data.time1).getTime())) {
dd.alert({
title: '提示',
content: '会议结束时间不能小于等于开始时间',
......
<!--<mw-select></mw-select> -->
版本号:128
版本号:142 调试版本
<view class="index">
<view a:if="{{startPageOnLoad&&startPageOnShow}}">
<scroll-view a:if="{{todayStr !== ''}}" scroll-y="{{true}}" upper-threshold="50" lower-threshold="50" onScrollToLower="lower" onScroll="onScroll" style="height: 100vh;" scroll-into-view="{{todayStr}}">
......@@ -31,7 +31,7 @@
<text>{{item.value.day}}</text>
</view>
<view class="dataSchedule">
<view a:for="{{item.value.value}}" a:for-item="item2" data-item="{{item2}}" class="{{ item2.isBeOverdue ? 'overdue' : item2.confirmAttendance === 0 ? 'cancel' : '' }}" onTap="{{!isClicked?'nextDetail':''}}">
<view a:for="{{item.value.value}}" a:for-item="item2" data-item="{{item2}}" class="{{ item2.isBeOverdue ? 'overdue' : item2.confirmAttendance === 0 ? 'cancel' : '' }}" onTap="nextDetail">
<view class="dataScheduleName">
<text>{{item2.title}}{{item2.isfirstDayOrEndDay ? `(第${item2.isFewDays}天,共${item2.duration}天)` : '' }}</text>
</view>
......@@ -55,7 +55,7 @@
</view>
<view class="dataSchedule">
<!-- <view class="thisDayLine thisDayHavaMeeting" style="margin-bottom: 7.5rpx"></view> -->
<view a:for="{{item.value.value}}" a:for-item="item2" data-item="{{item2}}" class="{{ item2.isBeOverdue ? 'overdue' : item2.confirmAttendance === 0 ? 'cancel' : '' }}" onTap="{{!isClicked?'nextDetail':''}}">
<view a:for="{{item.value.value}}" a:for-item="item2" data-item="{{item2}}" class="{{ item2.isBeOverdue ? 'overdue' : item2.confirmAttendance === 0 ? 'cancel' : '' }}" onTap="nextDetail">
<view class="dataScheduleName">
<text>{{item2.title}}{{item2.isfirstDayOrEndDay ? `(第${item2.isFewDays}天,共${item2.duration}天)` : '' }}</text>
</view>
......@@ -80,7 +80,7 @@
<view class="NoSchedule">
<view>
<text>暂无日程安排,</text>
<text onTap="{{!isClicked?'nextPage':''}}">创建日程</text>
<text onTap="nextPage">创建日程</text>
</view>
<!-- <view class="thisDayLine"></view> -->
</view>
......
......@@ -8,7 +8,7 @@ Page({
thisYear: '',
maxYear: '',
minYear: '',
isClicked: false,
// isClicked: false,
startPageOnLoad: false,
startPageOnShow: false,
isFirstLoad: true
......@@ -284,17 +284,19 @@ Page({
path: 'pages/index/index',
};
},
// nextPage() {
nextPage() {
// isClicked(this)
// dd.navigateTo({ url: './../createOrEditSchedule/createOrEditSchedule' })
// },
dd.navigateTo({ url: './../createOrEditSchedule/createOrEditSchedule' })
},
nextDetail: throttle(function (e) {
console.log(11111111)
let item = e.target.dataset.item
dd.navigateTo({ url: `./../scheduleDetail/scheduleDetail?scheduleItem=${JSON.stringify(item)}` })
}, 1000),
nextPage: throttle(function (e) {
dd.navigateTo({ url: './../createOrEditSchedule/createOrEditSchedule' })
}, 1000),
// nextPage: throttle(function (e) {
// console.log(11111111)
// dd.navigateTo({ url: './../createOrEditSchedule/createOrEditSchedule' })
// }, 1000),
lower() {
let year = this.data.maxYear + 1
let DateList = this.returnScheduleList(year)
......
......@@ -91,9 +91,9 @@
</view>
</view>
<view class="changeDay">
<view class="{{dataNum == '0' ? 'dataNumSelected' : ''}}" onTap="chooseDate" data-num="0">今天</view>
<view class="{{dataNum == '1' ? 'dataNumSelected' : ''}}" onTap="chooseDate" data-num="1">明天</view>
<view class="{{dataNum == '2' ? 'dataNumSelected' : ''}}" onTap="chooseDate" data-num="2">后天</view>
<view class="{{dataNum == '0' ? 'dataNumSelected' : ''}}" onTap="chooseDate" data-num="0">{{search.time.replace(/-/g,".")}}</view>
<view class="{{dataNum == '1' ? 'dataNumSelected' : ''}}" onTap="chooseDate" data-num="1">{{tomorrowTime}}</view>
<view class="{{dataNum == '2' ? 'dataNumSelected' : ''}}" onTap="chooseDate" data-num="2">{{afterTomorrowTime}}</view>
<!-- <view onTap="selectDate">自定义</view> -->
</view>
<scroll-view scroll-y='{{true}}' class="modalOccupyTimeSlot" onScroll="modalScroll" scroll-into-view="{{toThisTime}}">
......
......@@ -10,7 +10,7 @@ create.Page({
equipFacilityList: [],
reserveRoomList: [],
lableTreeList: [],
timeListStr:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],
timeListStr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
search: {
category: '',
locationName: '全部区域',
......@@ -26,7 +26,7 @@ create.Page({
},
dataNum: '0',
noRoom: false,
location:{
location: {
id: '',
name: ''
},
......@@ -41,21 +41,30 @@ create.Page({
meetingRoomName: ''
},
canScroll: true,
toThisTime: '123'
toThisTime: '123',
tomorrowTime: '',
afterTomorrowTime: ''
},
onLoad(query) {
let date = new Date(this.store.data.startTime.replace(/-/g, "/"))
console.log(date, 111)
console.log(this.store.data.startTime, 111)
// let date = new Date()
let year = date.getFullYear()
let month = `${date.getMonth() + 1}`
let day = `${date.getDate()}`
let hour = date.getHours()
let minute = date.getMinutes()
let search = {
time: `${year}-${month.length > 1 ? month : '0'+month}-${day.length > 1 ? day : '0'+day}`,
time: `${year}-${month.length > 1 ? month : '0' + month}-${day.length > 1 ? day : '0' + day}`,
category: '全部分类',
location: '全部区域'
}
this.setData({
'search.time': `${year}-${month.length > 1 ? month : '0'+month}-${day.length > 1 ? day : '0'+day}`
// 'meetingTime.startTime': startTime,
'search.time': `${year}-${month.length > 1 ? month : '0' + month}-${day.length > 1 ? day : '0' + day}`,
tomorrowTime: this.getDay(search.time, 1),
afterTomorrowTime: this.getDay(search.time, 2)
})
this.getPageData()
},
......@@ -118,7 +127,9 @@ create.Page({
success: (res) => {
if (res !== {}) {
that.setData({
'search.time': res.date
'search.time': res.date,
tomorrowTime: this.getDay(res.date, 1),
afterTomorrowTime: this.getDay(res.date, 2)
}, () => {
that.getRoomList()
})
......@@ -136,7 +147,7 @@ create.Page({
let dateTime = this.data.search.time
let modalDate = new Date();
let modalMins = modalDate.getMinutes();
let modalHour = modalMins<30 ? modalDate.getHours()<10? '0'+modalDate.getHours():modalDate.getHours() : (modalDate.getHours() + 1)<10? '0'+ (modalDate.getHours() + 1):(modalDate.getHours() + 1)
let modalHour = modalMins < 30 ? modalDate.getHours() < 10 ? '0' + modalDate.getHours() : modalDate.getHours() : (modalDate.getHours() + 1) < 10 ? '0' + (modalDate.getHours() + 1) : (modalDate.getHours() + 1)
let data = {
meetingRoomId: roomId,
startTime: dateTime
......@@ -168,18 +179,18 @@ create.Page({
that.setData({
modalList: modalList,
isShowModal: true,
toThisTime: `${modalHour}:${modalMins<30? '30' : '00'}`,
toThisTime: `${modalHour}:${modalMins < 30 ? '30' : '00'}`,
canScroll: false
})
})
},
modalScroll(){
modalScroll() {
this.setData({
toThisTime: '12312312'
})
},
// 修改弹框checkBox
onChangeModalTime(e){
onChangeModalTime(e) {
let that = this;
let index = e.currentTarget.dataset.index;
let data = this.data.modalList[index]; // 点击的数据
......@@ -196,7 +207,7 @@ create.Page({
'meetingTime.startTime': data.reserveStartTime,
[listStr]: 'checked',
'modalFooter.startTime': data.reserveStartTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': 30,
'modalFooter.isOneDay': true,
})
......@@ -214,20 +225,20 @@ create.Page({
'modalFooter.isOneDay': true,
})
console.log('2.1')
} else if (new Date(this.data.meetingTime.startTime.replace(/-/g, '/')).getTime() > new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()){
} else if (new Date(this.data.meetingTime.startTime.replace(/-/g, '/')).getTime() > new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()) {
//比已选时间小
console.log('2.2')
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'),data.reserveStartTime.replace(/-/g, '/'))) {
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'), data.reserveStartTime.replace(/-/g, '/'))) {
//非跨天
if (this.isOptional(data.reserveStartTime, this.data.meetingTime.startTime)) {
let modalFooterTime = new Date(that.data.meetingTime.startTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.startTime': data.reserveStartTime,
'meetingTime.endTime': that.data.meetingTime.startTime,
'modalFooter.startTime': data.reserveStartTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': true,
}, () => {
......@@ -242,12 +253,12 @@ create.Page({
if (res) {
let modalFooterTime = new Date(that.data.meetingTime.startTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()) / 60000
that.setData({
'meetingTime.startTime': data.reserveStartTime,
'meetingTime.endTime': that.data.meetingTime.startTime,
'modalFooter.startTime': data.reserveStartTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': false,
}, () => {
......@@ -263,16 +274,16 @@ create.Page({
} else {
//比已选时间大
console.log('2.3')
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'),data.reserveStartTime.replace(/-/g, '/'))) {
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'), data.reserveStartTime.replace(/-/g, '/'))) {
// 非跨天
if (this.isOptional(this.data.meetingTime.startTime, data.reserveStartTime)) {
let modalFooterTime = new Date(data.reserveStartTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.endTime': data.reserveStartTime,
'modalFooter.startTime': that.data.meetingTime.startTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': true,
}, () => {
......@@ -287,11 +298,11 @@ create.Page({
if (res) {
let modalFooterTime = new Date(data.reserveStartTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.endTime': data.reserveStartTime,
'modalFooter.startTime': that.data.meetingTime.startTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': false,
}, () => {
......@@ -312,7 +323,7 @@ create.Page({
console.log('3.1')
let startTimeDate = new Date(this.data.meetingTime.startTime.replace(/-/g, '/'))
startTimeDate.setMinutes(startTimeDate.getMinutes() + 30)
let meetingStartTime = `${startTimeDate.getFullYear()}-${startTimeDate.getMonth()+1<10 ? '0' + (startTimeDate.getMonth()+1) : startTimeDate.getMonth()+1}-${startTimeDate.getDate()<10? '0' + startTimeDate.getDate(): startTimeDate.getDate()} ${startTimeDate.getHours()<10?'0'+startTimeDate.getHours():startTimeDate.getHours()}:${startTimeDate.getMinutes()<10?'0'+startTimeDate.getMinutes():startTimeDate.getMinutes()}`
let meetingStartTime = `${startTimeDate.getFullYear()}-${startTimeDate.getMonth() + 1 < 10 ? '0' + (startTimeDate.getMonth() + 1) : startTimeDate.getMonth() + 1}-${startTimeDate.getDate() < 10 ? '0' + startTimeDate.getDate() : startTimeDate.getDate()} ${startTimeDate.getHours() < 10 ? '0' + startTimeDate.getHours() : startTimeDate.getHours()}:${startTimeDate.getMinutes() < 10 ? '0' + startTimeDate.getMinutes() : startTimeDate.getMinutes()}`
if (meetingStartTime === this.data.meetingTime.endTime) {
let modalFooterTime = new Date(that.data.meetingTime.endTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
......@@ -320,72 +331,72 @@ create.Page({
'meetingTime.startTime': meetingStartTime,
'meetingTime.endTime': '',
'modalFooter.startTime': meetingStartTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': 30,
'modalFooter.isOneDay': true,
},() => {
}, () => {
that.refreshModalList()
})
} else {
let modalFooterTime = new Date(that.data.meetingTime.endTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(meetingStartTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(meetingStartTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.startTime': meetingStartTime,
'modalFooter.startTime': meetingStartTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
},() => {
}, () => {
that.refreshModalList()
})
}
} else if(this.data.meetingTime.endTime === data.reserveStartTime){
} else if (this.data.meetingTime.endTime === data.reserveStartTime) {
//开始时间等于点击的结束时间,取消最后一个的操作
console.log('3.2')
let endTimeDate = new Date(this.data.meetingTime.endTime.replace(/-/g, '/'))
endTimeDate.setMinutes(endTimeDate.getMinutes() - 30)
let meetingEndTime = `${endTimeDate.getFullYear()}-${endTimeDate.getMonth()+1<10 ? '0' + (endTimeDate.getMonth()+1) : endTimeDate.getMonth()+1}-${endTimeDate.getDate()<10?'0'+endTimeDate.getDate():endTimeDate.getDate()} ${endTimeDate.getHours()<10?'0'+endTimeDate.getHours():endTimeDate.getHours()}:${endTimeDate.getMinutes()<10?'0'+endTimeDate.getMinutes():endTimeDate.getMinutes()}`
let meetingEndTime = `${endTimeDate.getFullYear()}-${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}-${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}`
if (meetingEndTime === this.data.meetingTime.startTime) {
let modalFooterTime = new Date(this.data.meetingTime.startTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
this.setData({
'meetingTime.endTime': '',
'modalFooter.startTime': that.data.meetingTime.startTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': 30,
},() => {
}, () => {
that.refreshModalList()
})
} else {
let modalFooterTime = new Date(meetingEndTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.endTime': meetingEndTime,
'modalFooter.startTime': that.data.meetingTime.startTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
},() => {
}, () => {
that.refreshModalList()
})
}
} else if(new Date(this.data.meetingTime.startTime.replace(/-/g, '/')).getTime() > new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()){
} else if (new Date(this.data.meetingTime.startTime.replace(/-/g, '/')).getTime() > new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()) {
//比已选时间小
console.log('3.3')
// 判断是否跨天
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'),data.reserveStartTime.replace(/-/g, '/'))) {
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'), data.reserveStartTime.replace(/-/g, '/'))) {
// 非跨天
if (data.reserveStartTime, this.data.meetingTime.startTime) {
let modalFooterTime = new Date(that.data.meetingTime.endTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.startTime': data.reserveStartTime,
'modalFooter.startTime': data.reserveStartTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': true,
},() => {
}, () => {
that.refreshModalList()
})
}
......@@ -395,14 +406,14 @@ create.Page({
if (res) {
let modalFooterTime = new Date(that.data.meetingTime.endTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(data.reserveStartTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.startTime': data.reserveStartTime,
'modalFooter.startTime': data.reserveStartTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': false,
},() => {
}, () => {
that.refreshModalList()
})
} else {
......@@ -415,21 +426,21 @@ create.Page({
} else {
//比已选时间大直接赋值endTime
console.log('3.4')
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'),data.reserveStartTime.replace(/-/g, '/'))) {
if (this.isDaySpan(this.data.meetingTime.startTime.replace(/-/g, '/'), data.reserveStartTime.replace(/-/g, '/'))) {
// 非跨天
if (this.isOptional(this.data.meetingTime.startTime, data.reserveStartTime)) {
//是否可选中
let modalFooterTime2 = new Date(data.reserveStartTime.replace(/-/g, '/'))
modalFooterTime2.setMinutes(modalFooterTime2.getMinutes() + 30)
let allMinutes = (modalFooterTime2 - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime())/60000
console.log('3.4.1',allMinutes)
let allMinutes = (modalFooterTime2 - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime()) / 60000
console.log('3.4.1', allMinutes)
this.setData({
'meetingTime.endTime': data.reserveStartTime,
'modalFooter.startTime': that.data.meetingTime.startTime,
'modalFooter.endTime': `${modalFooterTime2.getFullYear()}-${modalFooterTime2.getMonth()<9 ? '0'+(modalFooterTime2.getMonth()+1):modalFooterTime2.getMonth()+1}-${modalFooterTime2.getDate()<10? '0'+modalFooterTime2.getDate(): modalFooterTime2.getDate()} ${modalFooterTime2.getHours()<10? '0'+modalFooterTime2.getHours(): modalFooterTime2.getHours()}:${modalFooterTime2.getMinutes()<10? '0'+modalFooterTime2.getMinutes(): modalFooterTime2.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime2.getFullYear()}-${modalFooterTime2.getMonth() < 9 ? '0' + (modalFooterTime2.getMonth() + 1) : modalFooterTime2.getMonth() + 1}-${modalFooterTime2.getDate() < 10 ? '0' + modalFooterTime2.getDate() : modalFooterTime2.getDate()} ${modalFooterTime2.getHours() < 10 ? '0' + modalFooterTime2.getHours() : modalFooterTime2.getHours()}:${modalFooterTime2.getMinutes() < 10 ? '0' + modalFooterTime2.getMinutes() : modalFooterTime2.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': true,
},() => {
}, () => {
that.refreshModalList()
})
}
......@@ -439,14 +450,14 @@ create.Page({
if (res) {
let modalFooterTime = new Date(data.reserveStartTime.replace(/-/g, '/'))
modalFooterTime.setMinutes(modalFooterTime.getMinutes() + 30)
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime())/60000
let allMinutes = (modalFooterTime - new Date(that.data.meetingTime.startTime.replace(/-/g, '/')).getTime()) / 60000
this.setData({
'meetingTime.endTime': data.reserveStartTime,
'modalFooter.startTime': that.data.meetingTime.startTime,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth()<9 ? '0'+(modalFooterTime.getMonth()+1):modalFooterTime.getMonth()+1}-${modalFooterTime.getDate()<10? '0'+modalFooterTime.getDate(): modalFooterTime.getDate()} ${modalFooterTime.getHours()<10? '0'+modalFooterTime.getHours(): modalFooterTime.getHours()}:${modalFooterTime.getMinutes()<10? '0'+modalFooterTime.getMinutes(): modalFooterTime.getMinutes()}`,
'modalFooter.endTime': `${modalFooterTime.getFullYear()}-${modalFooterTime.getMonth() < 9 ? '0' + (modalFooterTime.getMonth() + 1) : modalFooterTime.getMonth() + 1}-${modalFooterTime.getDate() < 10 ? '0' + modalFooterTime.getDate() : modalFooterTime.getDate()} ${modalFooterTime.getHours() < 10 ? '0' + modalFooterTime.getHours() : modalFooterTime.getHours()}:${modalFooterTime.getMinutes() < 10 ? '0' + modalFooterTime.getMinutes() : modalFooterTime.getMinutes()}`,
'modalFooter.allMinutes': allMinutes,
'modalFooter.isOneDay': false,
},() => {
}, () => {
that.refreshModalList()
})
} else {
......@@ -460,13 +471,13 @@ create.Page({
}
},
// 接口判断跨天会议是否可点击
getAllScheduleWithMeetingRoomByTime(startTime,endTime){
getAllScheduleWithMeetingRoomByTime(startTime, endTime) {
let endTimeDate = new Date(endTime.replace(/-/g, '/'))
endTimeDate.setMinutes(endTimeDate.getMinutes() + 30)
let data = {
meetingRoomId: this.data.meetingTime.meetingRoomId,
startTime: `${startTime}:00`,
endTime: `${endTimeDate.getFullYear()}-${endTimeDate.getMonth()+1<10 ? '0'+ (endTimeDate.getMonth()+1) : endTimeDate.getMonth()+1}-${endTimeDate.getDate()<10?'0'+endTimeDate.getDate():endTimeDate.getDate()} ${endTimeDate.getHours()<10? '0'+endTimeDate.getHours():endTimeDate.getHours()}:${endTimeDate.getMinutes()<10? '0'+endTimeDate.getMinutes():endTimeDate.getMinutes()}:00`
endTime: `${endTimeDate.getFullYear()}-${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}-${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}:00`
}
return getAllScheduleWithMeetingRoomByTime(data).then(res => {
return res.data.data
......@@ -479,7 +490,7 @@ create.Page({
let UnDisable = true
this.data.modalList.map(item => {
let itemReserveStartTime = new Date(item.reserveStartTime.replace(/-/g, '/')).getTime();
if ( itemReserveStartTime >= startTimeMS && itemReserveStartTime <= endTimeMs) {
if (itemReserveStartTime >= startTimeMS && itemReserveStartTime <= endTimeMs) {
if (item.reserveStatus === 'expired' || item.reserveStatus === 'occupied') {
UnDisable = false
}
......@@ -488,7 +499,7 @@ create.Page({
return UnDisable;
},
// 更新渲染数据
refreshModalList(){
refreshModalList() {
let startTimeMS = new Date(this.data.meetingTime.startTime.replace(/-/g, '/')).getTime();
let endTimeMs = new Date(this.data.meetingTime.endTime.replace(/-/g, '/')).getTime();
let modalList = this.data.modalList.map(item => {
......@@ -499,7 +510,7 @@ create.Page({
status: 'checked'
}
} else {
if (item.reserveStatus=== 'expired' || item.reserveStatus=== 'occupied') {
if (item.reserveStatus === 'expired' || item.reserveStatus === 'occupied') {
return {
...item,
status: 'BeOverdue'
......@@ -517,21 +528,21 @@ create.Page({
})
},
isDaySpan(date1, date2) {
var date1 = new Date(date1.substr(0,10));
var date2 = new Date(date2.substr(0,10));
var date1 = new Date(date1.substr(0, 10));
var date2 = new Date(date2.substr(0, 10));
var date = (date2.getTime() - date1.getTime()) / (1000 * 60 * 60 * 24);/*不用考虑闰年否*/
return date === 0
},
// 点击今天明天后天
chooseDate(e){
chooseDate(e) {
let that = this;
let modalDate = new Date();
let modalMins = modalDate.getMinutes();
let modalHour = modalMins<30 ? modalDate.getHours()<10? '0'+modalDate.getHours():modalDate.getHours() : (modalDate.getHours() + 1)<10? '0'+ (modalDate.getHours() + 1):(modalDate.getHours() + 1)
let modalHour = modalMins < 30 ? modalDate.getHours() < 10 ? '0' + modalDate.getHours() : modalDate.getHours() : (modalDate.getHours() + 1) < 10 ? '0' + (modalDate.getHours() + 1) : (modalDate.getHours() + 1)
let num = parseInt(e.currentTarget.dataset.num);
let selectDate = new Date(this.data.meetingTime.date);
selectDate.setDate(selectDate.getDate() + num)
let meetingDate = `${selectDate.getFullYear()}-${selectDate.getMonth()+1<10 ? '0' + (selectDate.getMonth()+1) : selectDate.getMonth()+1}-${selectDate.getDate()<10? '0' + selectDate.getDate(): selectDate.getDate()}`
let meetingDate = `${selectDate.getFullYear()}-${selectDate.getMonth() + 1 < 10 ? '0' + (selectDate.getMonth() + 1) : selectDate.getMonth() + 1}-${selectDate.getDate() < 10 ? '0' + selectDate.getDate() : selectDate.getDate()}`
let data = {
meetingRoomId: that.data.meetingTime.meetingRoomId,
startTime: meetingDate
......@@ -582,18 +593,33 @@ create.Page({
that.setData({
modalList: modalList2,
dataNum: num,
toThisTime: `${modalHour}:${modalMins<30? '30' : '00'}`
toThisTime: `${modalHour}:${modalMins < 30 ? '30' : '00'}`
})
} else {
that.setData({
modalList: modalList,
dataNum: num,
toThisTime: `${modalHour}:${modalMins<30? '30' : '00'}`
toThisTime: `${modalHour}:${modalMins < 30 ? '30' : '00'}`
})
}
})
},
onCancel(){
// 计算明天 后天的日期
getDay(currentDate, AddDayCount) {
let now = ''
if (currentDate.indexOf("-") != -1) {
now = new Date(currentDate.replace(/-/g, '/'))
} else {
now = new Date(currentDate)
}
let time = now.setDate(now.getDate() + AddDayCount)
let year = new Date(time).getFullYear()
let month = new Date(time).getMonth() + 1
let date = new Date(time).getDate()
return `${year}.${month < 10 ? '0' + month : month}.${date < 10 ? '0' + date : date}`
},
onCancel() {
this.setData({
isShowModal: false,
modalList: [],
......@@ -607,31 +633,30 @@ create.Page({
canScroll: true
})
},
onDetermine(){
onDetermine() {
let startTime = this.data.meetingTime.startTime
if (this.data.meetingTime.endTime) {
// let startTime = `${year}-${month.length > 1 ? month : '0' + month}-${day.length > 1 ? day : '0' + day} ${hour < 10 ? '0' + hour : hour}`
// startTime = startTime + ':00'
if (startTime && this.data.meetingTime.endTime) {
var endTimeDate = new Date(this.data.meetingTime.endTime.replace(/-/g, '/'))
endTimeDate.setMinutes(endTimeDate.getMinutes() + 30)
this.store.data.startTime = `${startTime.replace(/-/g,'/')}:00`
this.store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth()+1<10 ? '0'+ (endTimeDate.getMonth()+1) : endTimeDate.getMonth()+1}/${endTimeDate.getDate()<10?'0'+endTimeDate.getDate():endTimeDate.getDate()} ${endTimeDate.getHours()<10? '0'+endTimeDate.getHours():endTimeDate.getHours()}:${endTimeDate.getMinutes()<10? '0'+endTimeDate.getMinutes():endTimeDate.getMinutes()}:00`
this.store.data.startTime = `${startTime.replace(/-/g, '/')}:00`
this.store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}/${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}:00`
this.store.data.locationName = this.data.meetingTime.meetingRoomName
this.store.data.roomId = this.data.meetingTime.meetingRoomId
this.update()
dd.navigateBack({
delta: 2
})
} else {
} else if (startTime) {
var endTimeDate = new Date(this.data.meetingTime.startTime.replace(/-/g, '/'))
endTimeDate.setMinutes(endTimeDate.getMinutes() + 30)
this.store.data.startTime = `${startTime.replace(/-/g, '/')}:00`
this.store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth()+1<10 ? '0'+ (endTimeDate.getMonth()+1) : endTimeDate.getMonth()+1}/${endTimeDate.getDate()<10?'0'+endTimeDate.getDate():endTimeDate.getDate()} ${endTimeDate.getHours()<10? '0'+endTimeDate.getHours():endTimeDate.getHours()}:${endTimeDate.getMinutes()<10? '0'+endTimeDate.getMinutes():endTimeDate.getMinutes()}:00`
this.store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}/${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}:00`
this.store.data.locationName = this.data.meetingTime.meetingRoomName
this.store.data.roomId = this.data.meetingTime.meetingRoomId
this.update()
}
dd.navigateBack({
delta: 2
})
}
},
getRoomList() {
let that = this
......@@ -666,7 +691,7 @@ create.Page({
}
})
},
changeLocation(){
changeLocation() {
let that = this
let data = {
scene: 'meeting_room_location'
......@@ -681,14 +706,14 @@ create.Page({
})
})
},
onPropsCS(e){
onPropsCS(e) {
let that = this
if (e.type == 'sure') {
this.setData({
isShowLableModal: false,
'search.locationId': e.id,
'search.locationName': e.name
},() => {
}, () => {
that.getRoomList()
})
} else {
......@@ -697,11 +722,11 @@ create.Page({
})
}
},
changeSearchEquipFacility(e){
changeSearchEquipFacility(e) {
let that = this
let id = e.currentTarget.dataset.id;
let index = this.data.search.equipFacilityIds.indexOf(id)
if ( index === -1) {
if (index === -1) {
let data = [...this.data.search.equipFacilityIds]
data.push(id)
this.setData({
......
<block a:if="{{showPage}}">
<view class="scheduleDetail" onTap="hideModel">
<view class="scheduleInfo">
......
......@@ -31,21 +31,26 @@ create.Page({
showList: false,
showItem: [],
type: '',
mrReserveStatus: ''
mrReserveStatus: '',
id1: '',
planDate1: '',
scheduleTemplateId1: ''
},
onLoad(event) {
let scheduleItem = JSON.parse(event.scheduleItem)
let scheduleItem = {}
if (!!event.scheduleItem) {
scheduleItem = JSON.parse(event.scheduleItem)
} else {
scheduleItem = JSON.parse(Object.keys(event)[0].split('=')[1])
}
this.setData({
scheduleItem: scheduleItem,
pemissions: getApp().globalData.userid
})
},
onShow() {
// this.setData({
// meetingLogId: ''
// })
let data = {
id: this.data.scheduleItem.id,
id: this.data.scheduleItem.id ,
planDate: this.data.scheduleItem.planDate,
templateId: this.data.scheduleItem.scheduleTemplateId
}
......@@ -58,7 +63,7 @@ create.Page({
}
})
this.setData({
mrReserveStatus:res.data.data.mrReserveStatus,
mrReserveStatus: res.data.data.mrReserveStatus,
title: res.data.data.title,
isRepeatable: res.data.data.repeatable,
location: res.data.data.location,
......
//防止多次重复点击 (函数节流)
export function throttle(fn, gapTime) {
console.log(222222,123)
if (gapTime == null || gapTime == undefined) {
gapTime = 1500
}
......
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