Commit 321aa03f by fengzhaoyu

定位到天 编辑缺失roomId

parent 9df00aff
...@@ -179,17 +179,19 @@ export function getScheduleDetail(data) { ...@@ -179,17 +179,19 @@ export function getScheduleDetail(data) {
}) })
} }
// 文件上传 // 文件上传
export function uploadPermissions() { export function uploadPermissions(data) {
return $http({ return $http({
method: 'get', method: 'post',
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=add&ddUserId=${getApp().globalData.userid}` data: JSON.stringify(data),
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace`
}) })
} }
// 文件预览 // 文件预览
export function previewPermissions(fileIds) { export function previewPermissions(data) {
return $http({ return $http({
method: 'get', method: 'post',
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=download&ddUserId=${getApp().globalData.userid}&fileIds=${fileIds}` data: JSON.stringify(data),
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace`
}) })
} }
// 编辑日程 // 编辑日程
......
{ {
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/uploadFile/uploadFile",
"pages/editFile/editFile", "pages/editFile/editFile",
"pages/place/place", "pages/place/place",
"pages/meetingRoomList/meetingRoomList", "pages/meetingRoomList/meetingRoomList",
"pages/uploadFile/uploadFile",
"pages/addRemark/addRemark", "pages/addRemark/addRemark",
"pages/uploadFile/uploadFile", "pages/uploadFile/uploadFile",
"pages/repetitionTime/repetitionTime", "pages/repetitionTime/repetitionTime",
...@@ -14,8 +14,5 @@ ...@@ -14,8 +14,5 @@
"pages/scheduleDetail/scheduleDetail", "pages/scheduleDetail/scheduleDetail",
"pages/participantsDetail/participantsDetail", "pages/participantsDetail/participantsDetail",
"pages/createOrEditSchedule/createOrEditSchedule" "pages/createOrEditSchedule/createOrEditSchedule"
], ]
"window": {
"titleBarColor": "#FFFFFF"
}
} }
@import "../../font/iconfont.acss";
.toast {
width: 188rpx;
height: 60rpx;
background: rgba(0, 0, 0, 0.8);
border-radius: 30px;
color: #fff;
text-align: center;
line-height: 60rpx;
position: fixed;
top: 400rpx;
left: 50%;
margin-left: -94rpx;
vertical-align: top;
}
.toasContent {
line-height: 60rpx;
font-size: 24rpx;
vertical-align: top;
}
.toastIcon {
margin-right: 10rpx;
font-size: 30rpx;
line-height: 60rpx;
vertical-align: middle;
}
\ No newline at end of file
<view>
<view class="toast" a:if="{{showToast}}">
<text class="toastIcon iconfont iconcanjia3 "></text>
<text class="toasContent">回复成功</text>
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {
},
props: {
showToast: '',
duration: ''
},
didMount() {
},
didUpdate(preProps, prevData) {
},
didUnmount() { },
methods: {
},
});
{
"component": true
}
\ No newline at end of file
...@@ -53,18 +53,22 @@ page { ...@@ -53,18 +53,22 @@ page {
padding: 0; padding: 0;
/* overflow-y: hidden; */ /* overflow-y: hidden; */
} }
.AllTimeUnAction { .AllTimeUnAction {
background: url('../../assests/AllTimeUnAction.png'); background: url('../../assests/AllTimeUnAction.png');
background-size: cover; background-size: cover;
} }
.startTimeAction { .startTimeAction {
background: url('../../assests/startTimeAction.png'); background: url('../../assests/startTimeAction.png');
background-size: cover; background-size: cover;
} }
.endTimeAction { .endTimeAction {
background: url('../../assests/endTimeAction.png'); background: url('../../assests/endTimeAction.png');
background-size: cover; background-size: cover;
} }
.timeContainer { .timeContainer {
font-family: DINAlternate-Bold; font-family: DINAlternate-Bold;
display: flex; display: flex;
...@@ -116,12 +120,11 @@ page { ...@@ -116,12 +120,11 @@ page {
.endTime { .endTime {
text-indent: 75rpx; text-indent: 75rpx;
} }
.endTime::before {
} .endTime::before {}
.endTime::after {
.endTime::after {}
}
.icon, .text { .icon, .text {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -437,3 +440,47 @@ page { ...@@ -437,3 +440,47 @@ page {
.list:nth-child(2) { .list:nth-child(2) {
color: #3296FA; color: #3296FA;
} }
.listBg {
position: fixed;
top: 0;
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 0.12);
font-family: 'PingFangSC-Regular';
font-size: 40rpx;
color: #191F25;
text-align: center;
z-index: 9999;
}
.listContent {
padding: 0 20rpx;
position: fixed;
bottom: 18rpx;
width: 710rpx;
}
.listItemCont {
background: #FFFFFF;
border-radius: 26rpx;
width: 100%;
}
.listItem {
height: 112rpx;
line-height: 112rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.listItem:last-child {
border: none;
}
.cancelList {
background: #fff;
height: 112rpx;
line-height: 112rpx;
margin-top: 16rpx;
border-radius: 26rpx;
}
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 主题 --> <!-- 主题 -->
<view class="container {{!!scheduleItem?(organizer==permissions?'':'noPermissions'):''}}"> <view class="container {{!!scheduleItem?(organizer==permissions?'':'noPermissions'):''}}">
<view class="theme"> <view class="theme">
<input placeholder="添加主题" type="text" onInput="getTitle" value="{{title}}" focus="{{!!scheduleItem?false:true}}"/> <input placeholder="{{title}}" type="text" onInput="getTitle" value="{{!!scheduleItem?title:''}}" focus="{{!!scheduleItem?false:true}}"/>
</view> </view>
<view class="permissions" a:if="{{!!scheduleItem?(organizer==permissions?false:true):false}}"> <view class="permissions" a:if="{{!!scheduleItem?(organizer==permissions?false:true):false}}">
</view> </view>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<view class="icon iconfont iconcanhuiren"> <view class="icon iconfont iconcanhuiren">
</view> </view>
<view class="text"> <view class="text">
<view a:if="{{participatorList.length}}"> <view a:if="{{!!scheduleItem?participatorList.length>1:participatorList.length}}">
<view class="people"> <view class="people">
<view class="scrollPeople" catchTap="nextPage" data-nextPage="participantsDetail"> <view class="scrollPeople" catchTap="nextPage" data-nextPage="participantsDetail">
<text class="imageGroup" a:for="{{participatorList}}" a:for-item="item"> <text class="imageGroup" a:for="{{participatorList}}" a:for-item="item">
...@@ -189,8 +189,8 @@ ...@@ -189,8 +189,8 @@
删除 删除
</view> </view>
</view> </view>
<view a:if="{{!!scheduleItem&&isRepeat==1}}"> <view a:if="{{!!scheduleItem&&isRepeat==1}}" onTap="showList" data-type="del">
<picker range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule"> <!-- <picker range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule"> -->
<view class="listGroup" data-icon="iconshanchu"> <view class="listGroup" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu3"> <view class="listIcon iconfont iconshanchu3">
</view> </view>
...@@ -198,19 +198,19 @@ ...@@ -198,19 +198,19 @@
删除 删除
</view> </view>
</view> </view>
</picker> <!-- </picker> -->
</view> </view>
</view> </view>
<!-- 编辑重复的时候的保存 --> <!-- 编辑重复的时候的保存 -->
<picker a:if="{{isRepeat=='1'}}" value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat"> <!--<picker value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat"> -->
<view> <view a:if="{{isRepeat=='1'}}" onTap="showList" data-type="save">
<view class="save"> <view class="save" >
<view> <view>
{{buttonText}} {{buttonText}}
</view> </view>
</view> </view>
</view> </view>
</picker> <!--</picker> -->
<!-- 保存 --> <!-- 保存 -->
<view class="save" a:else> <view class="save" a:else>
<view onTap="{{!isClicked ? 'showModel' : ''}}"> <view onTap="{{!isClicked ? 'showModel' : ''}}">
...@@ -227,4 +227,19 @@ ...@@ -227,4 +227,19 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 选择列表 -->
<view class="showList" a:if="{{showList}}">
<view class="listBg">
<view class="listContent">
<view class="listItemCont">
<view class="listItem" data-item="{{item}}" a:for="{{showItem}}" onTap="{{type=='save'?'saveRepeat':'deleteRepeatSchedule'}}">
{{item.content}}
</view>
</view>
<view class="cancelList" onTap="listHide">
取消
</view>
</view>
</view>
</view>
</block> </block>
\ No newline at end of file
...@@ -38,7 +38,10 @@ create.Page({ ...@@ -38,7 +38,10 @@ create.Page({
], ],
needNotice: '', needNotice: '',
isShowPopupWindowList: false, isShowPopupWindowList: false,
isClicked: false isClicked: false,
showList: false,
showItem: [],
type: ''
}, },
onLoad(event) { onLoad(event) {
let index = new Date().getDay() let index = new Date().getDay()
...@@ -50,6 +53,7 @@ create.Page({ ...@@ -50,6 +53,7 @@ create.Page({
} }
this.store.data.repeatable = 0 this.store.data.repeatable = 0
this.store.data.locationName = '' this.store.data.locationName = ''
this.store.data.roomId = ''
this.store.data.conflictPeople = [] this.store.data.conflictPeople = []
this.store.data.participatorList = [] this.store.data.participatorList = []
this.store.data.locationName = '' this.store.data.locationName = ''
...@@ -68,8 +72,8 @@ create.Page({ ...@@ -68,8 +72,8 @@ create.Page({
let date2 = new Date(DateTimeStr); let date2 = new Date(DateTimeStr);
date2.setMinutes(date2.getMinutes() + 30) date2.setMinutes(date2.getMinutes() + 30)
this.setData({ this.setData({
time1: `${date1.getFullYear()}/${date1.getMonth() < 9 ? '0'+(date1.getMonth()+1):date1.getMonth()+1}/${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()} ${date1.getHours() < 10 ? '0' + date1.getHours() : date1.getHours()}:${date1.getMinutes()<10? '0'+date1.getMinutes():date1.getMinutes()}:00`, time1: `${date1.getFullYear()}/${date1.getMonth() < 9 ? '0' + (date1.getMonth() + 1) : date1.getMonth() + 1}/${date1.getDate() < 10 ? "0" + date1.getDate() : date1.getDate()} ${date1.getHours() < 10 ? '0' + date1.getHours() : date1.getHours()}:${date1.getMinutes() < 10 ? '0' + date1.getMinutes() : date1.getMinutes()}:00`,
time2: `${date2.getFullYear()}/${date2.getMonth() < 9 ? '0'+(date2.getMonth()+1):date2.getMonth()+1}/${date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate()} ${date2.getHours() < 10 ? '0' + date2.getHours() : date2.getHours()}:${date2.getMinutes()<10? '0'+date2.getMinutes():date2.getMinutes()}:00`, time2: `${date2.getFullYear()}/${date2.getMonth() < 9 ? '0' + (date2.getMonth() + 1) : date2.getMonth() + 1}/${date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate()} ${date2.getHours() < 10 ? '0' + date2.getHours() : date2.getHours()}:${date2.getMinutes() < 10 ? '0' + date2.getMinutes() : date2.getMinutes()}:00`,
week1: w, week1: w,
week2: w, week2: w,
type: event.type, type: event.type,
...@@ -112,11 +116,11 @@ create.Page({ ...@@ -112,11 +116,11 @@ create.Page({
}, 100) }, 100)
if (this.store.data.startTime && this.store.data.endTime) { if (this.store.data.startTime && this.store.data.endTime) {
var weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] var weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
var date1 = new Date(this.store.data.startTime.replace(/-/g,'/')); var date1 = new Date(this.store.data.startTime.replace(/-/g, '/'));
var date2 = new Date(this.store.data.endTime.replace(/-/g,'/')); var date2 = new Date(this.store.data.endTime.replace(/-/g, '/'));
this.setData({ this.setData({
time1: this.store.data.startTime.replace(/-/g,'/'), time1: this.store.data.startTime.replace(/-/g, '/'),
time2: this.store.data.endTime.replace(/-/g,'/'), time2: this.store.data.endTime.replace(/-/g, '/'),
week1: weekList[date1.getDay()], week1: weekList[date1.getDay()],
week2: weekList[date2.getDay()] week2: weekList[date2.getDay()]
}) })
...@@ -344,7 +348,7 @@ create.Page({ ...@@ -344,7 +348,7 @@ create.Page({
addUserList: this.data.addUserList, addUserList: this.data.addUserList,
modifyModel: this.data.modifyModel, modifyModel: this.data.modifyModel,
planDate: this.data.scheduleItem.planDate, planDate: this.data.scheduleItem.planDate,
title: this.data.title || '无主题', title: this.data.title || `${getApp().globalData.name}创建的会议`,
scheduleId: this.data.scheduleItem.id, scheduleId: this.data.scheduleItem.id,
templateId: this.data.scheduleItem.scheduleTemplateId, templateId: this.data.scheduleItem.scheduleTemplateId,
location: { location: {
...@@ -366,6 +370,7 @@ create.Page({ ...@@ -366,6 +370,7 @@ create.Page({
} }
this.resetStore() this.resetStore()
modifySchedule(data).then(res => { modifySchedule(data).then(res => {
console.log(JSON.stringify(res))
dd.navigateBack({ dd.navigateBack({
delta: 2 delta: 2
}) })
...@@ -373,7 +378,7 @@ create.Page({ ...@@ -373,7 +378,7 @@ create.Page({
} else { } else {
let data = { let data = {
title: this.data.title || '无主题', title: this.data.title || `${getApp().globalData.name}创建的会议`,
location: { location: {
longitude: '10', longitude: '10',
latitude: '10', latitude: '10',
...@@ -460,6 +465,7 @@ create.Page({ ...@@ -460,6 +465,7 @@ create.Page({
participatorList.push(item.participator) participatorList.push(item.participator)
}) })
this.store.data.locationName = res.data.data.location.locationName this.store.data.locationName = res.data.data.location.locationName
this.store.data.roomId = res.data.data.meetingRoomId
this.store.data.repeatable = res.data.data.repeatable this.store.data.repeatable = res.data.data.repeatable
this.store.data.aheadTimes = res.data.data.aheadTimes this.store.data.aheadTimes = res.data.data.aheadTimes
this.store.data.participatorUserId = participatorUserId this.store.data.participatorUserId = participatorUserId
...@@ -573,21 +579,24 @@ create.Page({ ...@@ -573,21 +579,24 @@ create.Page({
}, },
// 保存重复日程 // 保存重复日程
saveRepeat(event) { saveRepeat(event) {
let id = event.target.dataset.item.id
let modifyModel = '' let modifyModel = ''
if (event.detail.value == 0) { if (id == 0) {
modifyModel = 'only' modifyModel = 'only'
} else if (event.detail.value == 1) { } else if (id == 1) {
modifyModel = 'future' modifyModel = 'future'
} else { } else {
modifyModel = 'all' modifyModel = 'all'
} }
this.setData({ this.setData({
modifyModel: modifyModel modifyModel: modifyModel,
showList: false
}) })
this.showModel() this.showModel()
}, },
// 删除重复日程 // 删除重复日程
deleteRepeatSchedule(event) { deleteRepeatSchedule(event) {
let id = event.target.dataset.item.id
let deleteModel = '' let deleteModel = ''
let identify = 'major' let identify = 'major'
if (!!this.data.scheduleItem) { if (!!this.data.scheduleItem) {
...@@ -597,15 +606,16 @@ create.Page({ ...@@ -597,15 +606,16 @@ create.Page({
identify = 'secondary' identify = 'secondary'
} }
} }
if (event.detail.value == 0) { if (id == 0) {
deleteModel = 'only'; deleteModel = 'only';
} else if (event.detail.value == 1) { } else if (id == 1) {
deleteModel = 'future'; deleteModel = 'future';
} else { } else {
deleteModel = 'all'; deleteModel = 'all';
} }
this.setData({ this.setData({
deleteModel: deleteModel deleteModel: deleteModel,
showList: false
}) })
let data = { let data = {
planDate: this.data.scheduleItem.planDate, planDate: this.data.scheduleItem.planDate,
...@@ -677,5 +687,30 @@ create.Page({ ...@@ -677,5 +687,30 @@ create.Page({
else { else {
this.saveCreate() this.saveCreate()
} }
}, 1000) }, 1000),
// 展示选择列表
showList(event) {
let type = event.target.dataset.type
let showItem = []
// 点击参加按钮
if (type == "save") {
showItem = [{ id: 0, content: '仅保存本次' }, { id: 1, content: '保存以后' }, { id: 2, content: '保存所有' }]
}
// 点击不参加按钮
else {
showItem = [{ id: 0, content: '仅删除本次' }, { id: 1, content: '删除以后' }, { id: 2, content: '删除所有' }]
}
this.setData({
showItem: showItem,
showList: true,
type: type
})
// this.showModel()
},
// listHide
listHide() {
this.setData({
showList: false
})
}
}); });
<!--<mw-select></mw-select> --> <!--<mw-select></mw-select> -->
版本号:122 版本号:128
<view class="index"> <view class="index">
<view a:if="{{startPageOnLoad&&startPageOnShow}}"> <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}}"> <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}}">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</view> </view>
</block> </block>
<block a:elif="{{item.type == 'today'}}"> <block a:elif="{{item.type == 'today'}}">
<view class="date"> <view class="date" id="{{item.value.dateStr}}">
<view class="dateTime {{item.isThisDay}}"> <view class="dateTime {{item.isThisDay}}">
<view style="color: rgb(50, 150, 250)"> <view style="color: rgb(50, 150, 250)">
{{item.value.week}} {{item.value.week}}
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<text style="color: rgb(50, 150, 250)">{{item.value.day}}</text> <text style="color: rgb(50, 150, 250)">{{item.value.day}}</text>
</view> </view>
<view class="dataSchedule"> <view class="dataSchedule">
<view class="thisDayLine thisDayHavaMeeting" style="margin-bottom: 7.5rpx"></view> <!-- <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="{{!isClicked?'nextDetail':''}}">
<view class="dataScheduleName"> <view class="dataScheduleName">
<text>{{item2.title}}{{item2.isfirstDayOrEndDay ? `(第${item2.isFewDays}天,共${item2.duration}天)` : '' }}</text> <text>{{item2.title}}{{item2.isfirstDayOrEndDay ? `(第${item2.isFewDays}天,共${item2.duration}天)` : '' }}</text>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</view> </view>
</block> </block>
<block a:elif="{{item.type == 'thisDay'}}"> <block a:elif="{{item.type == 'thisDay'}}">
<view class="date"> <view class="date" id="{{item.value.dateStr}}">
<view class="dateTime thisDay"> <view class="dateTime thisDay">
<view> <view>
{{item.value.week}} {{item.value.week}}
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<text>暂无日程安排,</text> <text>暂无日程安排,</text>
<text onTap="{{!isClicked?'nextPage':''}}">创建日程</text> <text onTap="{{!isClicked?'nextPage':''}}">创建日程</text>
</view> </view>
<view class="thisDayLine"></view> <!-- <view class="thisDayLine"></view> -->
</view> </view>
</view> </view>
</block> </block>
......
...@@ -8,7 +8,7 @@ Page({ ...@@ -8,7 +8,7 @@ Page({
thisYear: '', thisYear: '',
maxYear: '', maxYear: '',
minYear: '', minYear: '',
isClicked:false, isClicked: false,
startPageOnLoad: false, startPageOnLoad: false,
startPageOnShow: false, startPageOnShow: false,
isFirstLoad: true isFirstLoad: true
...@@ -34,20 +34,22 @@ Page({ ...@@ -34,20 +34,22 @@ Page({
} }
let that = this let that = this
getHomeUserSchedule(data).then(res => { getHomeUserSchedule(data).then(res => {
console.log(res.data.data)
that.setData({ that.setData({
AllScheduleList: res.data.data AllScheduleList: res.data.data
}, () => { }, () => {
let now = new Date() let now = new Date()
let year = now.getFullYear(); let year = now.getFullYear();
let scheduleList = []; let scheduleList = [];
for (let i = 0; i<= year - 2019; i++) { for (let i = 0; i <= year - 2019; i++) {
scheduleList.push(that.returnScheduleList(2019 + i)) scheduleList.push(that.returnScheduleList(2019 + i))
} }
if (this.data.isFirstLoad){ // 第一次加载
if (this.data.isFirstLoad) {
const today = new Date() const today = new Date()
// finalDate 是用来定位到今天的
const finalDate = new Date(today) const finalDate = new Date(today)
finalDate.setDate(today.getDate() - today.getDay()) // finalDate.setDate(today.getDate() - today.getDay())
console.log(finalDate.toLocaleDateString())
that.setData({ that.setData({
scheduleList: scheduleList, scheduleList: scheduleList,
todayStr: finalDate.toLocaleDateString(), todayStr: finalDate.toLocaleDateString(),
...@@ -74,18 +76,22 @@ Page({ ...@@ -74,18 +76,22 @@ Page({
let weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] let weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
let DateMap = new Map(); let DateMap = new Map();
let isLeapYear = year % 4 == 0 && year % 100 != 0 || year % 400 == 0 let isLeapYear = year % 4 == 0 && year % 100 != 0 || year % 400 == 0
// 闰年
if (isLeapYear) { if (isLeapYear) {
let isFirstWeek = false; let isFirstWeek = false;
for (let i = 1; i <= 366; i++) { for (let i = 1; i <= 366; i++) {
// 判断一月第一周的第一个周一
if (i < 7 && new Date(year, 0, i).getDay() === 0) { if (i < 7 && new Date(year, 0, i).getDay() === 0) {
isFirstWeek = true isFirstWeek = true
} }
// 是第一个月第一个周一
if (isFirstWeek) { if (isFirstWeek) {
DateMap.set(`${new Date(year, 0, i).toLocaleDateString()}`, { DateMap.set(`${new Date(year, 0, i).toLocaleDateString()}`, {
scheduleList: [] scheduleList: []
}) })
} }
} }
// 跨年的那几天不是周一的
let num = 6 - new Date(year, 0, 366).getDay() let num = 6 - new Date(year, 0, 366).getDay()
for (let i = 0; i <= num; i++) { for (let i = 0; i <= num; i++) {
DateMap.set(`${new Date(year, 0, 366 + i).toLocaleDateString()}`, { DateMap.set(`${new Date(year, 0, 366 + i).toLocaleDateString()}`, {
...@@ -111,12 +117,15 @@ Page({ ...@@ -111,12 +117,15 @@ Page({
}) })
} }
} }
// 遍历所有日程
for (let y = 0; y < this.data.AllScheduleList.length; y++) { for (let y = 0; y < this.data.AllScheduleList.length; y++) {
let date1 = this.data.AllScheduleList[y].startTime.slice(0, 10).replace(/-/g, '/') let date1 = this.data.AllScheduleList[y].startTime.slice(0, 10).replace(/-/g, '/')
let date2 = this.data.AllScheduleList[y].endTime.slice(0, 10).replace(/-/g, '/') let date2 = this.data.AllScheduleList[y].endTime.slice(0, 10).replace(/-/g, '/')
let count = this.count(date1, date2) let count = this.count(date1, date2)
// 不跨天
if (count == 0) { if (count == 0) {
if (DateMap.get(`${new Date(this.data.AllScheduleList[y].startTime.replace(/-/g, '/')).toLocaleDateString()}`)){ // 每年的第一周和跨天的那几天有日程就push进去
if (DateMap.get(`${new Date(this.data.AllScheduleList[y].startTime.replace(/-/g, '/')).toLocaleDateString()}`)) {
DateMap.get(`${new Date(this.data.AllScheduleList[y].startTime.replace(/-/g, '/')).toLocaleDateString()}`).scheduleList.push({ DateMap.get(`${new Date(this.data.AllScheduleList[y].startTime.replace(/-/g, '/')).toLocaleDateString()}`).scheduleList.push({
...this.data.AllScheduleList[y], ...this.data.AllScheduleList[y],
thisDayStartTime: this.data.AllScheduleList[y].startTime.slice(11, 16), thisDayStartTime: this.data.AllScheduleList[y].startTime.slice(11, 16),
...@@ -124,11 +133,13 @@ Page({ ...@@ -124,11 +133,13 @@ Page({
isBeOverdue: new Date().getTime() > new Date(this.data.AllScheduleList[y].endTime.replace(/-/g, '/')).getTime() ? true : false isBeOverdue: new Date().getTime() > new Date(this.data.AllScheduleList[y].endTime.replace(/-/g, '/')).getTime() ? true : false
}) })
} }
} else { }
// 跨天
else {
for (let j = 0; j <= count; j++) { for (let j = 0; j <= count; j++) {
let time = new Date(date1); let time = new Date(date1);
time.setDate(time.getDate() + j) time.setDate(time.getDate() + j)
if (DateMap.get(new Date(time.getFullYear(), time.getMonth(), time.getDate()).toLocaleDateString())){ if (DateMap.get(new Date(time.getFullYear(), time.getMonth(), time.getDate()).toLocaleDateString())) {
DateMap.get(new Date(time.getFullYear(), time.getMonth(), time.getDate()).toLocaleDateString()).scheduleList.push({ DateMap.get(new Date(time.getFullYear(), time.getMonth(), time.getDate()).toLocaleDateString()).scheduleList.push({
...this.data.AllScheduleList[y], ...this.data.AllScheduleList[y],
isfirstDayOrEndDay: j === 0 ? '0' : j === count ? '2' : '1', // 0 第一天,1中间的天,2结束的天 isfirstDayOrEndDay: j === 0 ? '0' : j === count ? '2' : '1', // 0 第一天,1中间的天,2结束的天
...@@ -144,6 +155,7 @@ Page({ ...@@ -144,6 +155,7 @@ Page({
} }
let DateList = []; let DateList = [];
let listMonth = ''; let listMonth = '';
// 第一个月的第一天
let listWeek = new Date(year, 0, 1).getDay() === 0 ? 0 : 1; let listWeek = new Date(year, 0, 1).getDay() === 0 ? 0 : 1;
DateList.push({ DateList.push({
type: 'year', type: 'year',
...@@ -151,8 +163,9 @@ Page({ ...@@ -151,8 +163,9 @@ Page({
}) })
let thisDay = new Date().toLocaleDateString() let thisDay = new Date().toLocaleDateString()
DateMap.forEach(function (value, key, map) { DateMap.forEach(function (value, key, map) {
if (new Date(key).getDay() === 0 && that.count(key, new Date(year, 0, isLeapYear ? 366 : 365).toLocaleDateString()) >7) { if (new Date(key).getDay() === 0 && that.count(key, new Date(year, 0, isLeapYear ? 366 : 365).toLocaleDateString()) > 7) {
listWeek = listWeek + 1 listWeek = listWeek + 1
// 有此月份
if (new Date(key).getMonth() !== listMonth) { if (new Date(key).getMonth() !== listMonth) {
listMonth = new Date(key).getMonth() listMonth = new Date(key).getMonth()
DateList.push({ DateList.push({
...@@ -170,7 +183,9 @@ Page({ ...@@ -170,7 +183,9 @@ Page({
value: `第${listWeek}周,${rangeMonth1 + 1}${rangeDay1}日 - ${rangeMonth2 == rangeMonth1 ? '' : rangeMonth2 + 1 + '月'}${rangeDay2}日`, value: `第${listWeek}周,${rangeMonth1 + 1}${rangeDay1}日 - ${rangeMonth2 == rangeMonth1 ? '' : rangeMonth2 + 1 + '月'}${rangeDay2}日`,
dayStr: key dayStr: key
}) })
} else { }
// 没有此月份
else {
let rangeYear1 = new Date(key).getFullYear() let rangeYear1 = new Date(key).getFullYear()
let rangeMonth1 = new Date(key).getMonth() let rangeMonth1 = new Date(key).getMonth()
let rangeDay1 = new Date(key).getDate() let rangeDay1 = new Date(key).getDate()
...@@ -197,6 +212,7 @@ Page({ ...@@ -197,6 +212,7 @@ Page({
dayStr: key dayStr: key
}) })
} }
// 有日程长度 并且不是今天
if (value.scheduleList.length !== 0 && key !== thisDay) { if (value.scheduleList.length !== 0 && key !== thisDay) {
DateList.push({ DateList.push({
type: 'day', type: 'day',
...@@ -207,29 +223,38 @@ Page({ ...@@ -207,29 +223,38 @@ Page({
week: weekList[new Date(key).getDay()] week: weekList[new Date(key).getDay()]
}, },
}) })
} else if (value.scheduleList.length !== 0 && key === thisDay) { }
// 有日程长度,并且是今天
else if (value.scheduleList.length !== 0 && key === thisDay) {
console.log(key)
console.log(2222)
DateList.push({ DateList.push({
type: 'today', type: 'today',
value: { value: {
value: value.scheduleList, value: value.scheduleList,
day: new Date(key).getDate() < 10 ? '0' + new Date(key).getDate() : new Date(key).getDate(), day: new Date(key).getDate() < 10 ? '0' + new Date(key).getDate() : new Date(key).getDate(),
week: weekList[new Date(key).getDay()] week: weekList[new Date(key).getDay()],
dateStr: key
}, },
}) })
} }
if (value.scheduleList.length === 0 && key === thisDay) { if (value.scheduleList.length === 0 && key === thisDay) {
console.log(key)
console.log(111111)
DateList.push({ DateList.push({
type: 'thisDay', type: 'thisDay',
value: { value: {
value: value.scheduleList, value: value.scheduleList,
day: new Date(key).getDate() < 10 ? '0' + new Date(key).getDate() : new Date(key).getDate(), day: new Date(key).getDate() < 10 ? '0' + new Date(key).getDate() : new Date(key).getDate(),
week: weekList[new Date(key).getDay()] week: weekList[new Date(key).getDay()],
dateStr: key
}, },
}) })
} }
}); });
return DateList return DateList
}, },
// 是否跨天 返回跨天数
count(date1, date2) { count(date1, date2) {
var date1 = new Date(date1); var date1 = new Date(date1);
var date2 = new Date(date2); var date2 = new Date(date2);
......
...@@ -224,6 +224,7 @@ ...@@ -224,6 +224,7 @@
width: 100%; width: 100%;
height: 838rpx; height: 838rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 19rpx 19rpx 0 0;
box-shadow: 0 -2px 20px 0 rgba(25, 31, 37, 0.12); box-shadow: 0 -2px 20px 0 rgba(25, 31, 37, 0.12);
} }
...@@ -394,7 +395,7 @@ ...@@ -394,7 +395,7 @@
.roomScrollView { .roomScrollView {
height: 100vh; height: 100vh;
padding-top: 192rpx; padding-top: 96rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="searchHeader2"> <!-- <view class="searchHeader2">
<scroll-view scroll-x='{{true}}' scroll-left='{{100}}' scroll-into-view='searchList'> <scroll-view scroll-x='{{true}}' scroll-left='{{100}}' scroll-into-view='searchList'>
<view a:for="{{equipFacilityList}}" class="equipFacilityList" onTap="changeSearchEquipFacility" data-id='{{item.id}}'> <view a:for="{{equipFacilityList}}" class="equipFacilityList" onTap="changeSearchEquipFacility" data-id='{{item.id}}'>
<view class="selectListcheck"> <view class="selectListcheck">
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view> -->
</view> </view>
<scroll-view scroll-y="{{canScroll}}" class="roomScrollView"> <scroll-view scroll-y="{{canScroll}}" class="roomScrollView">
<view class="reserveMeeting"> <view class="reserveMeeting">
<view class="meetingRoomContent" a:for="{{reserveRoomList}}" data-roomid="{{item.meetingRoomId}}" data-roomname="{{item.name}}" onTap="changeRoomTime"> <view class="meetingRoomContent" a:for="{{reserveRoomList}}" data-roomid="{{item.meetingRoomId}}" data-roomname="{{item.meetingRoomFullName}}" onTap="changeRoomTime">
<view class="roomMessage"> <view class="roomMessage">
<view class="reserveRoomMsg"> <view class="reserveRoomMsg">
<view class="reserveRoomTitle"> <view class="reserveRoomTitle">
{{item.name}} {{item.meetingRoomFullName}}
</view> </view>
<view class="reserveRoomEquipFacility" a:if="{{item.equipFacilityNames.length>0}}"> <view class="reserveRoomEquipFacility" a:if="{{item.equipFacilityNames.length>0}}">
<text class="locationIcon iconfont iconshebei"></text><text a:for="{{item.equipFacilityNames}}" a:if="{{item2 !== null}}" a:for-item="item2" a:for-index="index2">{{item2}}{{index2 === item.equipFacilityNames.length-1 ? '' : '/'}}</text> <text class="locationIcon iconfont iconshebei"></text><text a:for="{{item.equipFacilityNames}}" a:if="{{item2 !== null}}" a:for-item="item2" a:for-index="index2">{{item2}}{{index2 === item.equipFacilityNames.length-1 ? '' : '/'}}</text>
......
...@@ -45,7 +45,7 @@ page { ...@@ -45,7 +45,7 @@ page {
.title { .title {
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
padding: 0 32rpx; padding: 0 35rpx;
opacity: 0.75; opacity: 0.75;
font-size: 28rpx; font-size: 28rpx;
color: #191F25; color: #191F25;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
暂无可用会议室 暂无可用会议室
</view> </view>
<block a:for="{{availableMeetingRoom}}"> <block a:for="{{availableMeetingRoom}}">
<view class="mettingRoom" data-locationName="{{item.name}}" data-locationid="{{item.meetingRoomId}}" onTap="selectMeetingRoom"> <view class="mettingRoom" data-locationName="{{item.meetingRoomFullName}}" data-locationid="{{item.meetingRoomId}}" onTap="selectMeetingRoom">
<view class="icon iconfont iconhuiyishi2"> <view class="icon iconfont iconhuiyishi2">
</view> </view>
<view class="mettingRoomRight"> <view class="mettingRoomRight">
......
...@@ -286,7 +286,6 @@ page { ...@@ -286,7 +286,6 @@ page {
z-index: 9; z-index: 9;
top: -73rpx; top: -73rpx;
left: 50%; left: 50%;
background: red;
} }
.modFile>view { .modFile>view {
...@@ -404,11 +403,14 @@ page { ...@@ -404,11 +403,14 @@ page {
} }
.selectDynamicright { .selectDynamicright {
padding: 0 4rpx;
position: absolute; position: absolute;
top: 0; top: 0;
height: 100%; height: 100%;
width: 100%; width: 100%;
background: rgba(25, 31, 37, 0.12) background: rgba(25, 31, 37, 0.12);
border-radius: 6rpx;
} }
.line { .line {
...@@ -441,6 +443,55 @@ page { ...@@ -441,6 +443,55 @@ page {
z-index: 9999; z-index: 9999;
background: red; background: red;
} }
.icondingwei1 { .icondingwei1 {
font-size: 34rpx; font-size: 34rpx;
} }
.listBg {
position: fixed;
top: 0;
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 0.12);
font-family: 'PingFangSC-Regular';
font-size: 40rpx;
color: #191F25;
text-align: center;
z-index: 9999;
}
.listContent {
padding: 0 20rpx;
position: fixed;
bottom: 18rpx;
width: 710rpx;
}
.listItemCont {
background: #FFFFFF;
border-radius: 26rpx;
width: 100%;
}
.listItem {
height: 112rpx;
line-height: 112rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.listItem:last-child {
border: none;
}
.cancelList {
background: #fff;
height: 112rpx;
line-height: 112rpx;
margin-top: 16rpx;
border-radius: 26rpx;
}
.del {
text-decoration: line-through;
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="place" a:if="{{!!location.locationName}}"> <view class="place" a:if="{{!!location.locationName}}">
<view class="icon icondingwei1 iconfont"> <view class="icon icondingwei1 iconfont">
</view> </view>
<view class="text"> <view class="text {{mrReserveStatus=='Y'?'del':''}}">
{{location.locationName}} {{location.locationName}}
</view> </view>
</view> </view>
...@@ -136,22 +136,22 @@ ...@@ -136,22 +136,22 @@
<text class="iconcanjia3 iconfont" a:else ></text> <text class="iconcanjia3 iconfont" a:else ></text>
<text class="{{currentParStaus == 1?'green': ''}}">参加</text> <text class="{{currentParStaus == 1?'green': ''}}">参加</text>
</view> </view>
<view class="buttonGroup" a:if="{{(organizer != pemissions)&&isRepeatable == 1}}"> <view class="buttonGroup" a:if="{{(organizer != pemissions)&&isRepeatable == 1}}" data-type="participate" onTap="showList">
<picker range="{{['仅参加本次', '参加所有']}}" data-value=1 onChange="confirmRepeatAtten"> <!-- <picker range="{{['仅参加本次', '参加所有']}}" data-value=1 onChange="confirmRepeatAtten"> -->
<view> <view>
<text class="iconcanjia2 iconfont" a:if="{{currentParStaus == 1}}"></text> <text class="iconcanjia2 iconfont" a:if="{{currentParStaus == 1}}"></text>
<text class="iconcanjia3 iconfont" a:else></text> <text class="iconcanjia3 iconfont" a:else></text>
<text class="{{currentParStaus == 1?'green': ''}}">参加</text> <text class="{{currentParStaus == 1?'green': ''}}">参加</text>
</view> </view>
</picker> <!-- </picker> -->
</view> </view>
<view class="buttonGroup" data-value=0 onTap="confirmAtten" a:if="{{(organizer != pemissions)&&isRepeatable == 0}}"> <view class="buttonGroup" data-value=0 onTap="confirmAtten" a:if="{{(organizer != pemissions)&&isRepeatable == 0}}">
<text class="iconbucanjia2 iconfont" a:if="{{currentParStaus == 0}}"></text> <text class="iconbucanjia2 iconfont" a:if="{{currentParStaus == 0}}"></text>
<text class="iconbucanjia3 iconfont" a:else></text> <text class="iconbucanjia3 iconfont" a:else></text>
<text class="{{currentParStaus == 0?'red': ''}}">不参加</text> <text class="{{currentParStaus == 0?'red': ''}}">不参加</text>
</view> </view>
<view class="buttonGroup" a:if="{{(organizer != pemissions)&&isRepeatable == 1}}"> <view class="buttonGroup" a:if="{{(organizer != pemissions)&&isRepeatable == 1}}" data-type="noParticipate" onTap="showList">
<picker range="{{['仅不参加本次', '不参加所有']}}" data-value=0 onChange="cancelRepeatAtten" a:if="{{!(organizer == pemissions)&&isRepeatable == 1}}"> <!-- <picker range="{{['仅不参加本次', '不参加所有']}}" data-value=0 onChange="cancelRepeatAtten" a:if="{{!(organizer == pemissions)&&isRepeatable == 1}}"> -->
<view> <view>
<text class="iconbucanjia2 iconfont" a:if="{{currentParStaus == 0}}"></text> <text class="iconbucanjia2 iconfont" a:if="{{currentParStaus == 0}}"></text>
<text class="iconbucanjia3 iconfont" a:else></text> <text class="iconbucanjia3 iconfont" a:else></text>
...@@ -165,4 +165,20 @@ ...@@ -165,4 +165,20 @@
</view> </view>
</view> </view>
</view> </view>
<toast showToast="{{showToast}}"></toast>
<!-- 选择列表 -->
<view class="showList" a:if="{{showList}}">
<view class="listBg">
<view class="listContent">
<view class="listItemCont">
<view class="listItem" data-item="{{item}}" a:for="{{showItem}}" data-item="{{item}}" onTap="{{type=='participate'?'confirmRepeatAtten':'cancelRepeatAtten'}}">
{{item.content}}
</view>
</view>
<view class="cancelList" onTap="listHide">
取消
</view>
</view>
</view>
</view>
</block> </block>
\ No newline at end of file
...@@ -26,7 +26,12 @@ create.Page({ ...@@ -26,7 +26,12 @@ create.Page({
isRepeatable: '', isRepeatable: '',
recModel: '', recModel: '',
showPage: false, showPage: false,
currentParStaus: '' currentParStaus: '',
showToast: false,
showList: false,
showItem: [],
type: '',
mrReserveStatus: ''
}, },
onLoad(event) { onLoad(event) {
let scheduleItem = JSON.parse(event.scheduleItem) let scheduleItem = JSON.parse(event.scheduleItem)
...@@ -48,11 +53,12 @@ create.Page({ ...@@ -48,11 +53,12 @@ create.Page({
res.data.data.userList.forEach((item, index) => { res.data.data.userList.forEach((item, index) => {
if (item.participator.userId == getApp().globalData.userid) { if (item.participator.userId == getApp().globalData.userid) {
this.setData({ this.setData({
currentParStaus: item.confirmAttendance currentParStaus: item.confirmAttendance == null ? -1 : item.confirmAttendance
}) })
} }
}) })
this.setData({ this.setData({
mrReserveStatus:res.data.data.mrReserveStatus,
title: res.data.data.title, title: res.data.data.title,
isRepeatable: res.data.data.repeatable, isRepeatable: res.data.data.repeatable,
location: res.data.data.location, location: res.data.data.location,
...@@ -67,7 +73,12 @@ create.Page({ ...@@ -67,7 +73,12 @@ create.Page({
this.store.data.remark = res.data.data.remark this.store.data.remark = res.data.data.remark
this.acrossDay(res.data.data.startTime, res.data.data.endTime) this.acrossDay(res.data.data.startTime, res.data.data.endTime)
this.update() this.update()
return uploadPermissions() let data1 = {
ddUserId: getApp().globalData.userid,
type: 'add',
projectName: 'MING_MEETING'
}
return uploadPermissions(data1)
}).then(res => { }).then(res => {
this.setData({ this.setData({
uploadSpaceId: res.data.data uploadSpaceId: res.data.data
...@@ -114,12 +125,17 @@ create.Page({ ...@@ -114,12 +125,17 @@ create.Page({
}, },
// 上传文件 // 上传文件
upload() { upload() {
// dd.showLoading({
// content: '上传中...',
// });
const _that = this const _that = this
dd.uploadAttachmentToDingTalk({ dd.uploadAttachmentToDingTalk({
image: { multiple: true, compress: true, max: 9, spaceId: _that.data.uploadSpaceId }, image: { multiple: true, compress: true, max: 9, spaceId: _that.data.uploadSpaceId },
space: { spaceId: _that.data.uploadSpaceId, compress: true, isCopy: 1, max: 9 }, space: { spaceId: _that.data.uploadSpaceId, compress: true, isCopy: 1, max: 9 },
types: ["photo", "camera", "space"], types: ["photo", "camera", "space"],
success: (res) => { success: (res) => {
console.log(_that.data.uploadSpaceId)
console.log(JSON.stringify(res))
dd.navigateTo({ url: `./../uploadFile/uploadFile?scheduleItem=${JSON.stringify(_that.data.scheduleItem)}&upLoadInfo=${encodeURIComponent(JSON.stringify(res))}` }) dd.navigateTo({ url: `./../uploadFile/uploadFile?scheduleItem=${JSON.stringify(_that.data.scheduleItem)}&upLoadInfo=${encodeURIComponent(JSON.stringify(res))}` })
}, },
fail: (err) => { fail: (err) => {
...@@ -133,7 +149,14 @@ create.Page({ ...@@ -133,7 +149,14 @@ create.Page({
preview(event) { preview(event) {
const _that = this const _that = this
let file = event.target.dataset.file let file = event.target.dataset.file
previewPermissions(file.fileId).then(res => { console.log(file)
let data = {
ddUserId: getApp().globalData.userid,
type: 'download',
fileIds: file.fileId,
projectName: 'MING_MEETING'
}
previewPermissions(data).then(res => {
_that.setData({ _that.setData({
previewSpaceId: res.data.data previewSpaceId: res.data.data
}) })
...@@ -270,6 +293,7 @@ create.Page({ ...@@ -270,6 +293,7 @@ create.Page({
}, },
// 确认参加不参加 单次的会议 // 确认参加不参加 单次的会议
confirmAtten(event) { confirmAtten(event) {
const that = this
let value = event.target.dataset.value let value = event.target.dataset.value
let data = { let data = {
value: value, value: value,
...@@ -284,13 +308,19 @@ create.Page({ ...@@ -284,13 +308,19 @@ create.Page({
templateId: this.data.scheduleItem.scheduleTemplateId templateId: this.data.scheduleItem.scheduleTemplateId
} }
isParticipate(data).then(res => { isParticipate(data).then(res => {
setTimeout(function () {
that.setData({
showToast: false
})
}, 800)
getScheduleDetail(data1).then(success => { getScheduleDetail(data1).then(success => {
this.store.data.userList = success.data.data.userList this.store.data.userList = success.data.data.userList
this.update() this.update()
success.data.data.userList.forEach((item, index) => { success.data.data.userList.forEach((item, index) => {
if (item.participator.userId == getApp().globalData.userid) { if (item.participator.userId == getApp().globalData.userid) {
this.setData({ this.setData({
currentParStaus: item.confirmAttendance currentParStaus: item.confirmAttendance == null ? -1 : item.confirmAttendance,
showToast: true
}) })
} }
}) })
...@@ -299,8 +329,13 @@ create.Page({ ...@@ -299,8 +329,13 @@ create.Page({
}, },
// 重复会议的参加 // 重复会议的参加
confirmRepeatAtten(event) { confirmRepeatAtten(event) {
let id = event.target.dataset.item.id
this.setData({
showList: false
})
const that = this
let type = 'only' let type = 'only'
if (event.detail.value == 0) { if (id == 0) {
type = 'only' type = 'only'
} else { } else {
type = 'all' type = 'all'
...@@ -318,13 +353,21 @@ create.Page({ ...@@ -318,13 +353,21 @@ create.Page({
templateId: this.data.scheduleItem.scheduleTemplateId templateId: this.data.scheduleItem.scheduleTemplateId
} }
isParticipate(data).then(res => { isParticipate(data).then(res => {
that.setData({
showToast: true
})
setTimeout(function () {
that.setData({
showToast: false
})
}, 800)
getScheduleDetail(data1).then(success => { getScheduleDetail(data1).then(success => {
this.store.data.userList = success.data.data.userList this.store.data.userList = success.data.data.userList
this.update() this.update()
success.data.data.userList.forEach((item, index) => { success.data.data.userList.forEach((item, index) => {
if (item.participator.userId == getApp().globalData.userid) { if (item.participator.userId == getApp().globalData.userid) {
this.setData({ this.setData({
currentParStaus: item.confirmAttendance currentParStaus: item.confirmAttendance == null ? -1 : item.confirmAttendance
}) })
} }
}) })
...@@ -333,8 +376,13 @@ create.Page({ ...@@ -333,8 +376,13 @@ create.Page({
}, },
// 重复会议取消参加 // 重复会议取消参加
cancelRepeatAtten(event) { cancelRepeatAtten(event) {
let id = event.target.dataset.item.id
this.setData({
showList: false
})
const that = this
let type = 'only' let type = 'only'
if (event.detail.value == 0) { if (id == 0) {
type = 'only' type = 'only'
} else { } else {
type = 'all' type = 'all'
...@@ -352,13 +400,21 @@ create.Page({ ...@@ -352,13 +400,21 @@ create.Page({
templateId: this.data.scheduleItem.scheduleTemplateId templateId: this.data.scheduleItem.scheduleTemplateId
} }
isParticipate(data).then(res => { isParticipate(data).then(res => {
that.setData({
showToast: true
})
setTimeout(function () {
that.setData({
showToast: false
})
}, 800)
getScheduleDetail(data1).then(success => { getScheduleDetail(data1).then(success => {
this.store.data.userList = success.data.data.userList this.store.data.userList = success.data.data.userList
this.update() this.update()
success.data.data.userList.forEach((item, index) => { success.data.data.userList.forEach((item, index) => {
if (item.participator.userId == getApp().globalData.userid) { if (item.participator.userId == getApp().globalData.userid) {
this.setData({ this.setData({
currentParStaus: item.confirmAttendance currentParStaus: item.confirmAttendance == null ? -1 : item.confirmAttendance
}) })
} }
}) })
...@@ -367,17 +423,42 @@ create.Page({ ...@@ -367,17 +423,42 @@ create.Page({
}, },
// 隐藏删除编辑弹窗 // 隐藏删除编辑弹窗
hideModel() { hideModel() {
console.log(22238888)
this.setData({ this.setData({
meetingLogId: '' meetingLogId: ''
}) })
}, },
// 空方法 阻止冒泡 // 空方法 阻止冒泡
blank(e) { blank(e) {
if(e.currentTarget.dataset.scheduleid !== this.data.meetingLogId) { if (e.currentTarget.dataset.scheduleid !== this.data.meetingLogId) {
this.setData({ this.setData({
meetingLogId: '' meetingLogId: ''
}) })
} }
},
// 展示选择列表
showList(event) {
let type = event.target.dataset.type
let showItem = []
// 点击参加按钮
if (type == "participate") {
showItem = [{ id: 0, content: '仅参加本次' }, { id: 1, content: '参加所有' }]
}
// 点击不参加按钮
else {
showItem = [{ id: 0, content: '仅不参加本次' }, { id: 1, content: '不参加所有' }]
}
this.setData({
showItem: showItem,
showList: true,
type: type
})
},
// listHide
listHide() {
this.setData({
showList: false
})
} }
}) })
{ {
"defaultTitle": "会议详情" "defaultTitle": "会议详情",
"usingComponents": {
"toast": "../../components/toast/toast"
}
} }
\ No newline at end of file
...@@ -61,15 +61,17 @@ page { ...@@ -61,15 +61,17 @@ page {
} }
.icontianjia1 { .icontianjia1 {
vertical-align: top; height: 100%;
line-height: 32rpx; display: inline-block;
vertical-align: middle;
line-height: 30rpx;
color: #3296fa; color: #3296fa;
margin-right: 16rpx; margin-right: 16rpx;
} }
.addText { .addText {
height: 32rpx;
line-height: 32rpx; line-height: 32rpx;
vertical-align: top;
font-size: 28rpx; font-size: 28rpx;
color: #3296FA; color: #3296FA;
} }
......
import create from 'dd-store' import create from 'dd-store'
import exampleStore from '/stores/exampleStore' import exampleStore from '/stores/exampleStore'
import { saveFileInfo, addSchedule, uploadPermissions, previewPermissions } from '../../api/request.js' import { saveFileInfo, addSchedule, uploadPermissions, previewPermissions } from '../../api/request.js'
import { throttle } from './../../utils/utils.js'
create.Page({ create.Page({
store: exampleStore, store: exampleStore,
useAll: true, useAll: true,
...@@ -43,7 +44,12 @@ create.Page({ ...@@ -43,7 +44,12 @@ create.Page({
}) })
}, },
add() { add() {
uploadPermissions().then(res => { let data1 = {
ddUserId: getApp().globalData.userid,
type: 'add',
projectName: 'MING_MEETING'
}
uploadPermissions(data1).then(res => {
this.setData({ this.setData({
uploadSpaceId: res.data.data uploadSpaceId: res.data.data
}) })
...@@ -80,6 +86,7 @@ create.Page({ ...@@ -80,6 +86,7 @@ create.Page({
} }
}, },
// 保存的接口 // 保存的接口
// saveUpload ()
saveUpload(id) { saveUpload(id) {
let data = { let data = {
scheduleId: id, scheduleId: id,
...@@ -94,9 +101,6 @@ create.Page({ ...@@ -94,9 +101,6 @@ create.Page({
descript: this.data.descript descript: this.data.descript
} }
saveFileInfo(data).then(res => { saveFileInfo(data).then(res => {
console.log(1111)
console.log(JSON.stringify(res))
console.log(1111)
dd.navigateBack({ dd.navigateBack({
delta: 1 delta: 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