Commit 4cf02361 by fengzhaoyu

暂存

parent aba792bc
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
"pages/createOrEditSchedule/createOrEditSchedule", "pages/createOrEditSchedule/createOrEditSchedule",
"pages/applicationDetails/applicationDetails", "pages/applicationDetails/applicationDetails",
"pages/attendeeList/attendeeList", "pages/attendeeList/attendeeList",
"pages/scheduleList/scheduleList",
"pages/meetingDetail/meetingDetail" "pages/meetingDetail/meetingDetail"
] ]
} }
\ No newline at end of file
.popupWindow {
height: 100%;
width: 100%;
position: fixed;
top: 0;
background: rgba(0, 0, 0, 0.12)
}
.popupWindowCenter {
width: 587rpx;
left: 50%;
margin-left: -293rpx;
height: auto;
position: absolute;
border-radius: 10rpx;
top: 400rpx;
background: #fff;
}
.list {
height: 96rpx;
text-align: center;
line-height: 96rpx;
text-align: center;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.list:nth-child(2) {
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;
}
\ No newline at end of file
<view class="popupWindow" a:if="{{centerPopup}}">
<view class="popupWindowCenter">
<view class="list" a:for="{{popupWindowList}}" onTap="selectSend" data-item="{{item}}">
{{item.text}}
</view>
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {},
});
{
"component": true
}
\ No newline at end of file
...@@ -34,9 +34,18 @@ ...@@ -34,9 +34,18 @@
.com-list .com-list-item-select { .com-list .com-list-item-select {
color: #3070F2; color: #3070F2;
} }
.com-list-item-image>image { .com-list-item-image>image {
width: 46rpx; width: 46rpx;
height: 46rpx; height: 46rpx;
vertical-align: top; vertical-align: top;
margin-right: 34rpx; margin-right: 34rpx;
} }
.compelete {
position: absolute;
color: rgb(10, 10, 10);
font-size: 32rpx;
right: 32rpx;
top: 32rpx;
}
\ No newline at end of file
{{comSelectList}}
<view class="com-list"> <view class="com-list">
<view class="picker-complete" onTap='complete' a:if="{{complete}}" onTap='complete'>完成</view>
<view class=" com-list-item" catchTap="comSelectList" data-item="{{item}}" a:for="{{dataComList}}"> <view class=" com-list-item" catchTap="comSelectList" data-item="{{item}}" a:for="{{dataComList}}">
<view class="iconfont {{item.icon}}" a:if="{{iconType === 'icon'}}"> <view class="iconfont {{item.icon}}" a:if="{{iconType === 'icon'}}">
</view> </view>
...@@ -8,7 +10,9 @@ ...@@ -8,7 +10,9 @@
<view class="com-list-item-text"> <view class="com-list-item-text">
{{item.text}} {{item.text}}
</view> </view>
<view class="iconfont iconicon_ok com-list-item-selectStaus {{comSelectListId == item.id ? 'com-list-item-select' : ''}}"> <view a:if="{{!multiple}}" class="iconfont iconicon_ok com-list-item-selectStaus {{comSelectListId == item.id ? 'com-list-item-select' : ''}}">
</view>
<view a:if="{{multiple}}" class="iconfont iconicon_ok com-list-item-selectStaus {{comSelectList.includes(item.id) ? 'com-list-item-select' : ''}}">
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
Component({ Component({
mixins: [], mixins: [],
data: { data: {
comSelectListId: '' comSelectListId: 0,
comSelectList: []
}, },
props: { props: {
iconType: 'icon' iconType: 'icon',
complete: false,
multiple: false,
}, },
didMount() { didMount() {
console.log(this.props.comSelectListId)
this.setData({ this.setData({
comSelectListId: this.props.comSelectListId comSelectListId: this.props.comSelectListId,
comSelectList: this.props.comSelectList
}) })
}, },
didUpdate() { didUpdate() {
...@@ -20,10 +24,40 @@ Component({ ...@@ -20,10 +24,40 @@ Component({
didUnmount() { }, didUnmount() { },
methods: { methods: {
comSelectList(event) { comSelectList(event) {
if (this.props.multiple && event.currentTarget.dataset.item.id != -1) {
if (this.data.comSelectList.includes(event.target.dataset.item.id)) {
this.data.comSelectList.forEach((item, index) => {
if (item == event.target.dataset.item.id) {
this.data.comSelectList.splice(index, 1)
}
return
})
}
else {
this.data.comSelectList.push(event.target.dataset.item.id)
}
this.setData({
comSelectList: this.data.comSelectList
})
} else if (this.props.multiple && event.currentTarget.dataset.item.id == -1) {
this.setData({
comSelectList: []
})
}
else if (!this.props.multiple) {
this.setData({ this.setData({
comSelectListId: event.currentTarget.dataset.item.id comSelectListId: event.currentTarget.dataset.item.id
}) })
this.props.onComSelectList(event) this.props.onComSelectList(event)
} }
console.log(this.data.comSelectList)
},
complete(event) {
let comSelectList = this.data.comSelectList.sort((a, b) => {
return a - b
})
this.props.onCompelete(comSelectList)
}
}, },
}); });
...@@ -88,3 +88,13 @@ ...@@ -88,3 +88,13 @@
right: 32rpx; right: 32rpx;
top: 32rpx; top: 32rpx;
} }
/* =======
.popupComplet {
display: inline-block;
float: right;
height: 100%;
line-height: 64rpx;
margin-right: 32rpx;
>>>>>>> Stashed changes
} */
\ No newline at end of file
<view <view class="dm-popup {{show ? 'dm-popup-show' : ''}} {{ animation ? 'animation': '' }}" disable-scroll="{{disableScroll}}">
class="dm-popup {{show ? 'dm-popup-show' : ''}} {{ animation ? 'animation': '' }}" <view class="dm-popup-mask" a:if="{{mask}}" onTap="onMaskTap" style="z-index: {{zIndex}}"></view>
disable-scroll="{{disableScroll}}" <view class="dm-popup-content {{className}} dm-popup-{{position}}" style="z-index: {{zIndex}}">
>
<view
class="dm-popup-mask"
a:if="{{mask}}"
onTap="onMaskTap"
style="z-index: {{zIndex}}"
></view>
<view
class="dm-popup-content {{className}} dm-popup-{{position}}"
style="z-index: {{zIndex}}"
>
<view a:if="{{position == 'bottom'}}" class="close-icon"> <view a:if="{{position == 'bottom'}}" class="close-icon">
<text onTap="onMaskTap" class="iconfont iconicon_slide"></text> <text onTap="onMaskTap" class="iconfont iconicon_slide"></text>
<!--<text class="popupComplet">完成</text> -->
</view> </view>
<view class="popup-title" a:if="{{title}}">{{title}}</view> <view class="popup-title" a:if="{{title}}">{{title}}</view>
<slot/> <slot/>
......
...@@ -10,13 +10,19 @@ Component({ ...@@ -10,13 +10,19 @@ Component({
}, },
didMount() { didMount() {
setTimeout(res => {
}, this.props.duration)
}, },
didUpdate(preProps, prevData) { didUpdate(preProps, prevData) {
if (this.props.showToast) {
setTimeout(res => {
this.hide()
}, this.props.duration)
}
}, },
didUnmount() { }, didUnmount() { },
methods: { methods: {
hide() {
this.props.onToastHidden()
}
}, },
}); });
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
</view> </view>
<view class="remark" a:if="{{isShowRemark}}"> <view class="remark" a:if="{{isShowRemark}}">
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" /> <input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" />
</view> </view>
</view> </view>
<!-- roomId locationName 地点 --> <!-- roomId locationName 地点 -->
......
...@@ -48,7 +48,7 @@ create.Page({ ...@@ -48,7 +48,7 @@ create.Page({
conflictPeople: [] conflictPeople: []
}, },
showPop() { showPop(event) {
this.setData({ this.setData({
show: true show: true
}) })
...@@ -79,11 +79,6 @@ create.Page({ ...@@ -79,11 +79,6 @@ create.Page({
// 添加描述 // 添加描述
addRemark() { addRemark() {
let isShowRemark = !this.data.isShowRemark let isShowRemark = !this.data.isShowRemark
if (!isShowRemark) {
this.setData({
remark: ''
})
}
this.setData({ this.setData({
isShowRemark: isShowRemark isShowRemark: isShowRemark
}) })
...@@ -152,19 +147,25 @@ create.Page({ ...@@ -152,19 +147,25 @@ create.Page({
// 选择循环机制 选择会议方式 选择时间 出现popup弹窗 // 选择循环机制 选择会议方式 选择时间 出现popup弹窗
showPopup(event) { showPopup(event) {
let iconType = '' let iconType = ''
let popupTitle = ''
switch (event.currentTarget.dataset.type) { switch (event.currentTarget.dataset.type) {
case 'meetingWayModel': case 'meetingWayModel':
iconType = 'image' iconType = 'image'
popupTitle = '选择会议方式'
break break
case 'repeat': case 'repeat':
iconType = 'icon' iconType = 'icon'
popupTitle = '会议重复'
break break
case 'participator': case 'participator':
popupTitle = '选择参会人'
break break
case 'time': case 'time':
popupTitle = '选择会议时间'
break break
} }
this.setData({ this.setData({
popupTitle: popupTitle,
popupShow: true, popupShow: true,
comType: event.currentTarget.dataset.type, comType: event.currentTarget.dataset.type,
'comListData.iconType': iconType 'comListData.iconType': iconType
...@@ -215,7 +216,6 @@ create.Page({ ...@@ -215,7 +216,6 @@ create.Page({
}, },
// 选择完水平 HList 的回调 // 选择完水平 HList 的回调
selectComHList(event) { selectComHList(event) {
console.log(event)
switch (event.currentTarget.dataset.item.id) { switch (event.currentTarget.dataset.item.id) {
case 0: case 0:
this.addParticipator() this.addParticipator()
...@@ -319,7 +319,7 @@ create.Page({ ...@@ -319,7 +319,7 @@ create.Page({
endTime: this.store.data.endTime.replace(/\//g, "-"), endTime: this.store.data.endTime.replace(/\//g, "-"),
meetingRoomId: this.store.data.roomId, meetingRoomId: this.store.data.roomId,
scheduleType: this.store.data.roomId ? 'meeting' : 'common', scheduleType: this.store.data.roomId ? 'meeting' : 'common',
participatorList: !!this.store.data.participatorList.length ? this.store.data.participatorList : [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar }], participatorList: !!this.store.data.participatorList.length ? this.store.data.participatorList : [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }],
repeatable: this.data.repeatable, repeatable: this.data.repeatable,
remark: this.data.remark, remark: this.data.remark,
recurrenceModel: this.data.recurrenceModel, recurrenceModel: this.data.recurrenceModel,
......
...@@ -296,10 +296,32 @@ input { ...@@ -296,10 +296,32 @@ input {
color: #1B263D; color: #1B263D;
} }
.remindTime { .remind>text {
display: inline-block;
vertical-align: top;
}
.remindTimeContaint {
display: inline-block;
max-width: 400rpx;
overflow: scroll;
white-space: nowrap;
margin: 0 20rpx;
text-align: center;
}
.remindTimeContaint>text {
margin: 0 8rpx;
}
.noRemind {
margin: 0 20rpx; margin: 0 20rpx;
} }
.remindTime {
margin-right: 4rpx;
}
.participate>text { .participate>text {
margin-right: 10rpx; margin-right: 10rpx;
color: #15BC83; color: #15BC83;
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
<!-- title remark 标题 描述 --> <!-- title remark 标题 描述 -->
<view class="createTitle"> <view class="createTitle">
<view class="title"> <view class="title">
<input placeholder-class="placeholder" placeholder="请输入主题" class="text" focus="{{true}}" onInput="onInput" data-type="title" value="{{title}}" /> <input placeholder-class="placeholder" placeholder="请输入主题" class="text" onInput="onInput" data-type="title" data-selectType="common" value="{{title}}" onBlur="onBlur" />
<view class="icon iconfont iconicon_description" onTap="addRemark"> <view class="icon iconfont iconicon_description" onTap="addRemark">
</view> </view>
</view> </view>
<view class="remark" a:if="{{isShowRemark}}"> <view class="remark" a:if="{{isShowRemark}}">
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" /> <input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" onBlur="onBlur" />
</view> </view>
</view> </view>
<!-- roomId locationName 地点 --> <!-- roomId locationName 地点 -->
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</view> </view>
</view> </view>
<!-- 删除该会议 --> <!-- 删除该会议 -->
<view class="delMetting"> <view class="delMetting" onTap="delSheudle">
<view class=" iconfont iconicon_close"> <view class=" iconfont iconicon_close">
</view> </view>
<view> <view>
...@@ -124,19 +124,41 @@ ...@@ -124,19 +124,41 @@
<popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup"> <popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete"></meeting-time-picker> <meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete"></meeting-time-picker>
<hlist a:if="{{'participator' === comType}}" dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist> <hlist a:if="{{'participator' === comType}}" dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
<list a:if="{{comType=='repeat' || comType=='meetingWayModel'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : comListData.meetingWayList}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : comListData.meetingWayModelId}}" iconType="{{comListData.iconType}}"> <list multiple="{{comListData.multiple}}" onCompelete="selectAheadtimes" comSelectList={{aheadTimes}} complete="{{comType=='aheadTime' ? true : false}}"a:if="{{comType=='repeat' || comType=='meetingWayModel' || comType=='aheadTime'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : (comType=='aheadTime' ? comListData.aheadTimesList : comListData.meetingWayList)}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : (comType=='aheadTime'?comListData.aheadTimesListId : comListData.meetingWayModelId)}}" iconType="{{comListData.iconType}}">
</list> </list>
</popup> </popup>
</view> </view>
<!-- 底部导航栏 --> <!-- 底部导航栏 -->
<view class="footNav"> <view class="footNav">
<view class="footNavTop"> <view class="footNavTop">
<view class="originStaus"><view><text class="iconfont iconicon_share"></text><text>参加</text></view><text class="line">|</text><view><text class="iconfont iconicon_share"></text><text>不参加</text></view></view> <view class="originStaus" a:if="{{confirmAttendance === null}}">
<!-- <view class="participateStatus"><view class="remind"><text class="iconfont iconicon_share"></text><text class="remindTime">提前15分钟提醒</text><text class="iconfont iconicon_share"></text></view><text class="line">|</text><view class="participate"><text class="iconfont iconicon_share"></text><text>参加</text></view></view> --> <view catchTap="participate">
<!-- <view class="noParticipateStatus"> <text class="iconfont iconicon_share"></text>
<text>参加</text></view>
<text class="line">|</text>
<view catchTap="noParticipate">
<text class="iconfont iconicon_share"></text>
<text>不参加</text>
</view>
</view>
<view class="participateStatus" a:if="{{confirmAttendance === 1}}">
<view class="remind" catchTap="showPopup" data-type="aheadTime">
<text class="iconfont iconicon_share"></text>
<text class="remindTimeContaint" a:if="{{aheadTimes.length}}">
<text class="remindTime" a:for="{{comListData.aheadTimesList}}" a:if="{{aheadTimes.includes(item.id)}}">
{{item.text}}
</text>
</text>
<text class="noRemind" a:if="{{!aheadTimes.length}}">不提醒</text>
<text class="iconfont iconicon_share"></text></view>
<text class="line">|</text>
<view class="participate" catchTap="noParticipate">
<text class="iconfont iconicon_share"></text>
<text>参加</text></view></view>
<view class="noParticipateStatus" a:if="{{confirmAttendance === 0}}" catchTap="participate">
<text class="iconfont iconicon_share"></text> <text class="iconfont iconicon_share"></text>
<text>不参加</text> <text>不参加</text>
</view> --> </view>
</view> </view>
<view class="footNavBottom"> <view class="footNavBottom">
<view class="iconfont iconicon_share" onTap="uploadFile"> <view class="iconfont iconicon_share" onTap="uploadFile">
...@@ -145,5 +167,5 @@ ...@@ -145,5 +167,5 @@
</view> </view>
</view> </view>
</view> </view>
<toast showToast="{{showToast}}" onToastHidden=" onToastHidden"></toast> <toast showToast="{{conToastData.showToast}}" onToastHidden="onToastHidden"></toast>
<selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.editSaveList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup> <selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.selectType==='noParticipateStatus' ? conSelectPopupData.noParticipateStatusList : conSelectPopupData.selectType==='delSheudle' ? conSelectPopupData.delSheudleList : (conSelectPopupData.selectType === 'participateStatus' ? conSelectPopupData.participateStatusList : conSelectPopupData.editSaveList)}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
\ No newline at end of file
import { getScheduleDetail, getUserScheduleInTime, uploadPermissions } from '../../api/request.js' import { isParticipate, deleteSchedule, getScheduleDetail, getUserScheduleInTime, uploadPermissions, modifySchedule } from '../../api/request.js'
import { throttle } from './../../utils/utils.js' import { throttle } from './../../utils/utils.js'
import create from 'dd-store' import create from 'dd-store'
import exampleStore from '/stores/exampleStore' import exampleStore from '/stores/exampleStore'
...@@ -20,6 +20,20 @@ create.Page({ ...@@ -20,6 +20,20 @@ create.Page({
{ id: 1, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } }, { id: 1, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } },
{ id: 2, text: '钉钉', imageUrl: '../../assests/dingding.png', meetingWayModel: { model: 'dingtalk' } } { id: 2, text: '钉钉', imageUrl: '../../assests/dingding.png', meetingWayModel: { model: 'dingtalk' } }
], ],
aheadTimesList: [
{ id: -1, text: '不提醒', icon: 'iconicon_cycle' },
{ id: 0, text: '会议开始时提醒', icon: '' },
{ id: 5, text: '提前5分钟提醒', icon: '' },
{ id: 15, text: '提前15分钟提醒', icon: '' },
{ id: 30, text: '提前30分钟提醒', icon: '' },
{ id: 60, text: '提前一小时提醒', icon: '' },
{ id: 120, text: '提前二小时提醒', icon: '' },
{ id: 1440, text: '提前一天提醒', icon: '' },
{ id: 105120, text: '提前一周提醒', icon: '' }
],
multiple: false,
complete: false,
aheadTimesListId: [-1],
comSelectListId: 0, comSelectListId: 0,
meetingWayModelId: null, meetingWayModelId: null,
iconType: 'icon' iconType: 'icon'
...@@ -37,8 +51,12 @@ create.Page({ ...@@ -37,8 +51,12 @@ create.Page({
}, },
// 传递给组件selectPopup 的数据 // 传递给组件selectPopup 的数据
conSelectPopupData: { conSelectPopupData: {
showSelectPopup: true, showSelectPopup: false,
editSaveList: [{text: '仅接受此会议', id: 'only'},{text: '接受所有会议', id: 'all'}] selectType: 'common',
editSaveList: [{ text: '仅保存此会议', id: 'only' }, { text: '保存此次及以后会议', id: 'future' }],
delSheudleList: [{ text: '仅删除此会议', id: 'only' }, { text: '删除此次及以后会议', id: 'future' }],
participateStatusList: [{ text: '仅参加此次会议', id: 'only' }, { text: '参加所有会议', id: 'all' }],
noParticipateStatusList: [{ text: '不参加此次会议', id: 'only' }, { text: '不参加所有会议', id: 'all' }]
}, },
title: ``, title: ``,
repeatable: 0, repeatable: 0,
...@@ -56,7 +74,13 @@ create.Page({ ...@@ -56,7 +74,13 @@ create.Page({
conflictPeople: [], conflictPeople: [],
isAcrossDay: false, isAcrossDay: false,
scheduleItem: '', scheduleItem: '',
originalData: new Map() originalData: new Map(),
lock: false,
originUsers: [],
aheadTimes: [],
organizer: '',
editType: '',
confirmAttendance: null
}, },
showPop() { showPop() {
...@@ -74,11 +98,12 @@ create.Page({ ...@@ -74,11 +98,12 @@ create.Page({
this.closePop(); this.closePop();
}, },
onLoad(event) { onLoad(event) {
this.reset()
dd.setNavigationBar({ dd.setNavigationBar({
title: `会议详情` title: `会议详情`
}) })
this.setData({ this.setData({
scheduleItem: JSON.parse(event.scheduleItem) scheduleItem: JSON.parse(event.scheduleItem),
}) })
this.getDetail() this.getDetail()
}, },
...@@ -92,9 +117,13 @@ create.Page({ ...@@ -92,9 +117,13 @@ create.Page({
getScheduleDetail(data).then(res => { getScheduleDetail(data).then(res => {
if (res.data.code === 0) { if (res.data.code === 0) {
let participatorList = [] let participatorList = []
let originUsers = []
let participatorUserId = []
let repeatListMap = new Map() let repeatListMap = new Map()
for (let value of res.data.data.userList) { for (let value of res.data.data.userList) {
participatorList.push(value.participator) participatorList.push(value.participator)
participatorUserId.push(value.participator.userId)
originUsers.push(value.participator)
} }
for (let item of this.data.comListData.repeatList) { for (let item of this.data.comListData.repeatList) {
if (item.recurrenceModel.recurrenceModel !== 'weekly') { if (item.recurrenceModel.recurrenceModel !== 'weekly') {
...@@ -103,22 +132,30 @@ create.Page({ ...@@ -103,22 +132,30 @@ create.Page({
} }
// console.log(repeatListMap, 111) // console.log(repeatListMap, 111)
this.setData({ this.setData({
confirmAttendance: res.data.data.confirmAttendance,
organizer: res.data.data.organizer,
originUsers: originUsers,
'scheduleItem.id': res.data.data.id, 'scheduleItem.id': res.data.data.id,
'comListData.comSelectListId': res.data.data.recurrenceModel.model === 'weekly' ? (res.data.data.recurrenceModel.weekDayList.length > 1 ? 3 : 2) : repeatListMap.get(res.data.data.recurrenceModel.model),
'comListData.meetingWayModelId': res.data.data.meetingWayModel === 'dingtalk' ? 2 : (res.data.data.meetingWayModel === 'zoom' ? 1 : 0), 'comListData.meetingWayModelId': res.data.data.meetingWayModel === 'dingtalk' ? 2 : (res.data.data.meetingWayModel === 'zoom' ? 1 : 0),
repeatable: res.data.repeatable, repeatable: res.data.data.repeatable,
recurrenceModel: res.data.repeatable ? { model: res.data.data.recurrenceModel.model, daysOfMonth: res.data.data.recurrenceModel.daysOfMonth, interval: 1, initialTime: res.data.data.initialTime, terminateTime: res.data.data.terminateTime, weekDayList: res.data.data.weekDayList } : { model: 'no_repeat' }, 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' },
originalData: res.data.data, originalData: res.data.data,
title: res.data.data.title, title: res.data.data.title,
remark: res.data.data.remark, remark: res.data.data.remark,
isShowRemark: res.data.data.remark ? true : false, isShowRemark: res.data.data.remark ? true : false,
week: this.data.weekList[new Date(res.data.data.startTime.replace(/'-'/g, "\/")).getDay()] week: this.data.weekList[new Date(res.data.data.startTime.replace(/'-'/g, "\/")).getDay()]
}) })
if (res.data.data.repeatable) {
this.setData({
'comListData.comSelectListId': res.data.data.recurrenceModel.model === 'weekly' ? (res.data.data.recurrenceModel.weekDayList.length > 1 ? 3 : 2) : repeatListMap.get(res.data.data.recurrenceModel.model),
})
}
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 < 0 ? '' : res.data.data.meetingRoomId this.store.data.roomId = res.data.data.meetingRoomId < 0 ? '' : res.data.data.meetingRoomId
this.store.data.startTime = res.data.data.startTime.replace(/'-'/g, "\/") this.store.data.startTime = res.data.data.startTime.replace(/'-'/g, "\/")
this.store.data.endTime = res.data.data.endTime.replace(/'-'/g, "\/") this.store.data.endTime = res.data.data.endTime.replace(/'-'/g, "\/")
this.store.data.participatorList = participatorList this.store.data.participatorList = participatorList
this.store.data.participatorUserId = participatorUserId
this.update() this.update()
this.conflictPeople() this.conflictPeople()
console.log(res.data.data) console.log(res.data.data)
...@@ -128,11 +165,6 @@ create.Page({ ...@@ -128,11 +165,6 @@ create.Page({
// 添加描述 // 添加描述
addRemark() { addRemark() {
let isShowRemark = !this.data.isShowRemark let isShowRemark = !this.data.isShowRemark
if (!isShowRemark) {
this.setData({
remark: ''
})
}
this.setData({ this.setData({
isShowRemark: isShowRemark isShowRemark: isShowRemark
}) })
...@@ -154,6 +186,34 @@ create.Page({ ...@@ -154,6 +186,34 @@ create.Page({
break break
} }
}, },
// 输入框失去焦点
onBlur(event) {
this.setData({
'conSelectPopupData.selectType': 'common'
})
switch (event.target.dataset.type) {
case 'title':
if (this.data.repeatable) {
this.setData({
'conSelectPopupData.showSelectPopup': true,
editType: 'title'
})
} else {
this.isChange('title', 'only')
}
break
case 'remark':
if (this.data.repeatable) {
this.setData({
'conSelectPopupData.showSelectPopup': true,
editType: 'remark'
})
} else {
this.isChange('remark', 'only')
}
break
}
},
// 初始化 // 初始化
reset() { reset() {
this.store.data.roomId = '' this.store.data.roomId = ''
...@@ -170,7 +230,7 @@ create.Page({ ...@@ -170,7 +230,7 @@ create.Page({
nextPage(event) { nextPage(event) {
switch (event.target.dataset.nextPage) { switch (event.target.dataset.nextPage) {
case 'location': case 'location':
dd.navigateTo({ url: './../place/place' }) dd.navigateTo({ url: `./../place/place?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
break break
case 'participantsDetail': case 'participantsDetail':
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` }) dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
...@@ -201,22 +261,36 @@ create.Page({ ...@@ -201,22 +261,36 @@ create.Page({
// 选择循环机制 选择会议方式 选择时间 出现popup弹窗 // 选择循环机制 选择会议方式 选择时间 出现popup弹窗
showPopup(event) { showPopup(event) {
let iconType = '' let iconType = ''
let complete = false
let multiple = false
switch (event.currentTarget.dataset.type) { switch (event.currentTarget.dataset.type) {
case 'meetingWayModel': case 'meetingWayModel':
iconType = 'image' iconType = 'image',
complete = true
multiple = false
break break
case 'repeat': case 'repeat':
iconType = 'icon' iconType = 'icon',
complete = true,
multiple = false
break break
case 'participator': case 'participator':
break break
case 'time': case 'time':
break break
case 'aheadTime':
iconType = 'icon',
complete = true,
multiple = true
break
} }
this.setData({ this.setData({
popupShow: true, popupShow: true,
comType: event.currentTarget.dataset.type, comType: event.currentTarget.dataset.type,
'comListData.iconType': iconType 'comListData.complete': complete,
'comListData.iconType': iconType,
'comListData.multiple': multiple
}) })
}, },
resetRepeatList() { resetRepeatList() {
...@@ -276,7 +350,7 @@ create.Page({ ...@@ -276,7 +350,7 @@ create.Page({
this.setData({ this.setData({
popupShow: false popupShow: false
}) })
dd.navigateTo({ url: './../outLookContact/outLookContact' }) dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${this.data.scheduleItem}` })
break; break;
} }
}, },
...@@ -294,8 +368,13 @@ create.Page({ ...@@ -294,8 +368,13 @@ create.Page({
const _that = this const _that = this
let require = [] let require = []
let select = [] let select = []
select = this.store.data.participatorUserId if (this.data.organizer === getApp().globalData.userid) {
select = [...this.store.data.participatorUserId]
require = [getApp().globalData.userid] require = [getApp().globalData.userid]
} else {
select = []
require = [...this.store.data.participatorUserId]
}
select = _that.selectedelRequired(require, select).pickedUsers select = _that.selectedelRequired(require, select).pickedUsers
dd.complexChoose({ dd.complexChoose({
title: "选择参会人", //标题 title: "选择参会人", //标题
...@@ -304,38 +383,36 @@ create.Page({ ...@@ -304,38 +383,36 @@ create.Page({
requiredUsers: require, //必选用户(不可取消选中状态) requiredUsers: require, //必选用户(不可取消选中状态)
responseUserOnly: true, //返回人,或者返回人和部门 responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) { success: function (res) {
if (_that.data.organizer === getApp().globalData.userid) {
_that.store.data.participatorList = [] _that.store.data.participatorList = []
_that.store.data.participatorUserId = [] _that.store.data.participatorUserId = []
_that.store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }) _that.store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
_that.store.data.participatorUserId.push(getApp().globalData.userid) _that.store.data.participatorUserId.push(getApp().globalData.userid)
res.users.forEach((item, index) => { res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar })
_that.store.data.participatorUserId.push(item.userId)
})
} else {
_that.store.data.participatorList = []
_that.store.data.participatorUserId = []
_that.data.requireUsersInfo.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.username, headUrl: item.headUrl, platform: 'dingtalk' })
_that.store.data.participatorUserId.push(item.userId)
})
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar, platform: 'dingtalk' }) _that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar, platform: 'dingtalk' })
_that.store.data.participatorUserId.push(item.userId) _that.store.data.participatorUserId.push(item.userId)
}) })
}
_that.store.data.participatorList = _that.setArrary(_that.store.data.participatorList) _that.store.data.participatorList = _that.setArrary(_that.store.data.participatorList)
_that.store.data.participatorUserId = [...new Set(_that.store.data.participatorUserId)] _that.store.data.participatorUserId = [...new Set(_that.store.data.participatorUserId)]
_that.update() _that.update()
_that.conflictPeople()
}, },
fail: function (err) { fail: function (err) {
} }
}) })
}, },
// 已选用户去中去掉必选用户
selectedelRequired(req, pic) {
for (let i = 0; i < req.length; i++) {
for (let m = 0; m < pic.length; m++) {
if (req[i] == pic[m]) {
pic.splice(m, 1)
m--;
}
}
}
return {
requiredUsers: req,
pickedUsers: pic
}
},
// 数组 去重 // 数组 去重
setArrary(arr) { setArrary(arr) {
let containt = {} let containt = {}
...@@ -354,30 +431,50 @@ create.Page({ ...@@ -354,30 +431,50 @@ create.Page({
popupShow: false popupShow: false
}) })
}, },
addSchedule() { // 选择会前提醒时间
selectAheadtimes(event) {
this.setData({
aheadTimes: event,
popupShow: false
})
},
// 保存编辑
modifySchedule(modifyContent, modifyModel) {
let participatorList = this.arrayPoor(this.data.originUsers, this.store.data.participatorList)
let data = { let data = {
modifyContent: modifyContent,
shcheduleType: 'common',
deleteUserList: participatorList.deleteUserList,
addUserList: participatorList.addUserList,
modifyModel: modifyModel,
planDate: this.data.scheduleItem.planDate,
title: this.data.title || `${getApp().globalData.name}创建的会议`, title: this.data.title || `${getApp().globalData.name}创建的会议`,
scheduleId: this.data.scheduleItem.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
location: { location: {
longitude: '10', longitude: '10',
latitude: '10', latitude: '10',
locationName: this.store.data.locationName locationName: this.store.data.locationName || ''
}, },
startTime: this.store.data.startTime.replace(/\//g, "-"), startTime: `${this.store.data.startTime.replace(/\//g, "-")}`,
endTime: this.store.data.endTime.replace(/\//g, "-"), endTime: `${this.store.data.endTime.replace(/\//g, '-')}`,
meetingRoomId: this.store.data.roomId,
scheduleType: this.store.data.roomId ? 'meeting' : 'common', scheduleType: this.store.data.roomId ? 'meeting' : 'common',
noticeType: 'dd_notice',
participatorList: !!this.store.data.participatorList.length ? this.store.data.participatorList : [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar }], participatorList: !!this.store.data.participatorList.length ? this.store.data.participatorList : [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar }],
repeatable: this.data.repeatable, repeatable: this.data.repeatable,
remark: this.data.remark, aheadTimes: this.store.data.aheadTimes,
recurrenceModel: this.data.recurrenceModel, recurrenceModel: this.data.recurrenceModel,
meetingRoomId: this.store.data.roomId, meetingRoomId: this.store.data.roomId,
remark: this.data.remark,
meetingWayModel: this.data.meetingWayModel meetingWayModel: this.data.meetingWayModel
} }
addSchedule(data).then(res => { modifySchedule(data).then(res => {
console.log(res)
if (res.data.code === 0) { if (res.data.code === 0) {
dd.navigateBack({ this.setData({
delta: 1 originUsers: this.store.data.participatorList
})
this.setData({
'conToastData.showToast': true
}) })
} }
}) })
...@@ -452,13 +549,75 @@ create.Page({ ...@@ -452,13 +549,75 @@ create.Page({
}, },
// toast 消失之后的回调 // toast 消失之后的回调
onToastHidden () { onToastHidden() {
this.setData({
'conToastData.showToast': false
})
}, },
// onSelectPopup 选择完的回调 // onSelectPopup 选择完的回调
onSelectPopup(event) { onSelectPopup(event) {
console.log(event.currentTarget.dataset.item) switch (this.data.conSelectPopupData.selectType) {
case 'common':
this.isChange(this.data.editType, event.currentTarget.dataset.item.id)
break
case 'noParticipateStatus':
let data1 = {
type: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
value: 0
}
isParticipate(data1).then(res => {
if (res.data.code === 0) {
this.setData({
confirmAttendance: 0,
'conToastData.showToast': true
})
}
})
break
case 'participateStatus':
let data = {
type: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
value: 1
}
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.setData({
confirmAttendance: 1,
'conToastData.showToast': true
})
}
})
break
case 'delSheudle':
dd.confirm({
title: '删除会议',
content: '确认删除会议吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (success) => {
if (!!success.confirm) {
let data = {
scheduleId: this.data.scheduleItem.id,
identify: this.data.organizer === getApp().globalData.userid ? 'major' : 'identify',
deleteModel: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate
}
deleteSchedule(data).then(res => {
dd.navigateBack({
delta: 1
})
})
}
}
})
break
}
this.setData({ this.setData({
'conSelectPopupData.showSelectPopup': false 'conSelectPopupData.showSelectPopup': false
}) })
...@@ -469,15 +628,179 @@ create.Page({ ...@@ -469,15 +628,179 @@ create.Page({
'conSelectPopupData.showSelectPopup': false 'conSelectPopupData.showSelectPopup': false
}) })
}, },
// 判断数据发生改变 发生改变 // 判断数据发生改变 发生改变 请求
isChange(value) { isChange(value, modifyModel) {
let modifyContent = ''
switch (value) { switch (value) {
case 'title': case 'title':
// if() if (this.data.title !== this.data.originalData.title) {
modifyContent = 'title'
this.modifySchedule(modifyContent, modifyModel)
}
break break
case 'remark':
if (this.data.remark !== this.data.originalData.remark) {
modifyContent = 'remark'
this.modifySchedule(modifyContent, modifyModel)
}
break
case 'meeting_way':
if (this.data.meetingWayModel !== this.data.originalData.meetingWayModel) {
modifyContent = 'meeting_way'
this.modifySchedule(modifyContent, modifyModel)
}
break
case 'operate_user':
if (this.data.remark !== this.data.originalData.remark) {
modifyContent = 'operate_user'
this.modifySchedule(modifyContent, modifyModel)
}
break
case 'repeat':
if (this.data.originalData.repeatable === 0 && this.data.repeatable === 1) {
modifyContent = 'to_repeat'
this.modifySchedule(modifyContent, modifyModel)
}
else if (this.data.originalData.repeatable === 1 && this.data.repeatable === 0) {
modifyContent = 'no_repeat'
this.modifySchedule(modifyContent, modifyModel)
}
else {
modifyContent = 'change_rule'
this.modifySchedule(modifyContent, modifyModel)
}
break
case 'modify_location':
if ((!!this.store.data.roomId ? this.store.data.roomId : -1) !== this.data.originalData.meetingRoomId || this.store.data.locationName !== this.data.originalData.location.locationName) {
modifyContent = 'modify_location'
this.modifySchedule(modifyContent, modifyModel)
}
break
case 'modify_time':
if (this.store.data.startTime !== this.data.originalData.startTime || this.store.data.endTime !== this.store.data.originalData.endTime) {
modifyContent = 'modify_time'
this.modifySchedule(modifyContent, modifyModel)
}
break
}
},
// 数组取差值 原先的数组与现在的比较 增加与减少
arrayPoor(origin, now) {
let originMap = new Map()
let nowMap = new Map()
let add = []
let del = []
for (let x of origin) {
originMap.set(x.userId, x)
}
for (let x of now) {
nowMap.set(x.userId, x)
let status1 = originMap.get(x.userId)
if (!status1) {
add.push(x)
}
}
for (let x of origin) {
let status2 = nowMap.get(x.userId)
if (!status2) {
del.push(x)
}
}
return {
addUserList: add,
deleteUserList: del
}
},
// 已选用户去中去掉必选用户
selectedelRequired(req, pic) {
for (let i = 0; i < req.length; i++) {
for (let m = 0; m < pic.length; m++) {
if (req[i] == pic[m]) {
pic.splice(m, 1)
m--;
}
}
}
return {
requiredUsers: req,
pickedUsers: pic
}
},
// 删除 日程
delSheudle() {
if (this.data.repeatable) {
this.setData({
'conSelectPopupData.selectType': 'delSheudle',
'conSelectPopupData.showSelectPopup': true
})
} else {
dd.confirm({
title: '删除会议',
content: '确认删除会议吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (success) => {
if (!!success.confirm) {
let data = {
scheduleId: this.data.scheduleItem.id,
identify: this.data.organizer === getApp().globalData.userid ? 'major' : 'identify',
deleteModel: 'only'
}
deleteSchedule(data).then(res => {
dd.navigateBack({
delta: 1
})
})
}
}
})
}
},
// 点击参加
participate() {
let data = {
scheduleId: this.data.scheduleItem.id,
value: 1,
type: 'only'
}
if (this.data.repeatable) {
this.setData({
'conSelectPopupData.showSelectPopup': true,
'conSelectPopupData.selectType': 'participateStatus'
})
} else {
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.setData({
confirmAttendance: 1,
'conToastData.showToast': true
})
}
})
}
},
// 点击 不参加
noParticipate() {
let data = {
scheduleId: this.data.scheduleItem.id,
value: 0,
type: 'only'
}
if (this.data.repeatable) {
this.setData({
'conSelectPopupData.showSelectPopup': true,
'conSelectPopupData.selectType': 'noParticipateStatus'
})
} else {
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.setData({
confirmAttendance: 0,
'conToastData.showToast': true
})
}
})
} }
} }
}); });
...@@ -47,6 +47,7 @@ input { ...@@ -47,6 +47,7 @@ input {
} }
.contactImage { .contactImage {
position: relative;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
height: 80rpx; height: 80rpx;
...@@ -92,3 +93,18 @@ input { ...@@ -92,3 +93,18 @@ input {
text-align: center; text-align: center;
line-height: 96rpx; line-height: 96rpx;
} }
.conflict {
line-height: 13px;
vertical-align: top;
width: 13px;
height: 13px;
position: absolute;
background: #fff;
bottom: 0rpx;
color: #FF943E;
font-size: 12px;
right: -3rpx;
border-radius: 50%;
text-align: center;
}
\ No newline at end of file
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
</view> </view>
</view> </view>
<!-- 邮箱联系人列表 --> <!-- 邮箱联系人列表 -->
<view class="contactList" > <view class="contactList">
<view class="contactListItem" a:for="{{outlookContact}}"> <view class="contactListItem" a:for="{{outlookContact}}">
<view class="contactImage"> <view class="contactImage">
{{item.username.substring(0,2)}} {{item.username.substring(0,2)}}
<view a:if="{{conflictPeople.includes(item.userId)}}" class="conflict iconicon_conflict iconfont">
</view>
</view> </view>
<view class="contactText"> <view class="contactText">
{{item.username}} {{item.username}}
......
import { getHomeUserSchedule } from '../../api/request.js' import { getUserScheduleInTime } from '../../api/request.js'
import { throttle } from './../../utils/utils.js' import { throttle } from './../../utils/utils.js'
import create from 'dd-store' import create from 'dd-store'
import exampleStore from '/stores/exampleStore' import exampleStore from '/stores/exampleStore'
...@@ -7,9 +7,12 @@ create.Page({ ...@@ -7,9 +7,12 @@ create.Page({
useAll: true, useAll: true,
data: { data: {
outlookContact: [], outlookContact: [],
value: '' value: '',
conflictPeople: [],
scheduleItem: ''
}, },
onLoad() { onLoad(event) {
let scheduleItem = event.scheduleItem
let outlookContact = this.data.outlookContact let outlookContact = this.data.outlookContact
for (let value of this.store.data.participatorList) { for (let value of this.store.data.participatorList) {
if (value.platform === 'outlook') { if (value.platform === 'outlook') {
...@@ -17,8 +20,10 @@ create.Page({ ...@@ -17,8 +20,10 @@ create.Page({
} }
} }
this.setData({ this.setData({
outlookContact: outlookContact outlookContact: outlookContact,
scheduleItem: scheduleItem
}) })
this.conflictPeople()
}, },
onShow() { onShow() {
}, },
...@@ -44,6 +49,7 @@ create.Page({ ...@@ -44,6 +49,7 @@ create.Page({
value: '', value: '',
outlookContact: outlookContact outlookContact: outlookContact
}) })
this.conflictPeople()
} else { } else {
dd.alert({ dd.alert({
content: '请输入正确的邮箱格式', content: '请输入正确的邮箱格式',
...@@ -78,11 +84,42 @@ create.Page({ ...@@ -78,11 +84,42 @@ create.Page({
save() { save() {
// concat 拼接后生成新的数组 push 返回的是长度 // concat 拼接后生成新的数组 push 返回的是长度
this.store.data.participatorList.push(...this.data.outlookContact) this.store.data.participatorList.push(...this.data.outlookContact)
let participatorList = [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk'}].concat(this.store.data.participatorList) let participatorList = [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }].concat(this.store.data.participatorList)
this.store.data.participatorList = this.setArrary(participatorList) this.store.data.participatorList = this.setArrary(participatorList)
this.update() this.update()
dd.navigateBack({ dd.navigateBack({
delta: 1 delta: 1
}) })
},
// 会议冲突
conflictPeople() {
let userIds = []
for (let value of this.data.outlookContact) {
userIds.push(value.userId)
}
let data = {
startTime: this.store.data.startTime.replace(/\//g, "-"),
endTime: this.store.data.endTime.replace(/\//g, "-"),
userIds: userIds
}
getUserScheduleInTime(data).then(res => {
let conflictPeople = []
for (let value in res.data.data) {
if (!!this.data.scheduleItem) {
if (res.data.data[value].length > 1) {
conflictPeople.push(value)
}
} else {
if (res.data.data[value].length > 0) {
conflictPeople.push(value)
}
}
}
this.setData({
conflictPeople: conflictPeople
})
})
} }
}); });
...@@ -9,9 +9,13 @@ create.Page({ ...@@ -9,9 +9,13 @@ create.Page({
conflictPeople: [] conflictPeople: []
}, },
onLoad(event) { onLoad(event) {
let scheduleItem = JSON.parse(event.scheduleItem)
dd.setNavigationBar({ dd.setNavigationBar({
title: `参会人(${this.store.data.participatorList.length}人)` title: `参会人(${this.store.data.participatorList.length}人)`
}) })
this.setData({
scheduleItem: scheduleItem
})
this.conflictPeople() this.conflictPeople()
}, },
// 保存信息 // 保存信息
...@@ -98,10 +102,17 @@ create.Page({ ...@@ -98,10 +102,17 @@ create.Page({
getUserScheduleInTime(data).then(res => { getUserScheduleInTime(data).then(res => {
let conflictPeople = [] let conflictPeople = []
for (let value in res.data.data) { for (let value in res.data.data) {
if (!!this.data.scheduleItem) {
if (res.data.data[value].length > 1) {
conflictPeople.push(value)
}
} else {
if (res.data.data[value].length > 0) { if (res.data.data[value].length > 0) {
conflictPeople.push(value) conflictPeople.push(value)
} }
} }
}
this.setData({ this.setData({
conflictPeople: conflictPeople conflictPeople: conflictPeople
}) })
......
...@@ -7,9 +7,13 @@ create.Page({ ...@@ -7,9 +7,13 @@ create.Page({
useAll: true, useAll: true,
data: { data: {
place: '', place: '',
availableMeetingRoom: [] availableMeetingRoom: [],
scheduleItem: ''
}, },
onLoad(e) { onLoad(e) {
// this.setData({
// scheduleItem: JSON.parse(e.scheduleItem)
// })
dd.setNavigationBar({ dd.setNavigationBar({
title: '会议地点' title: '会议地点'
}) })
......
...@@ -2,13 +2,13 @@ class Store { ...@@ -2,13 +2,13 @@ class Store {
data = { data = {
participatorList: [ participatorList: [
{ {
status:true,username: 'Ceshi', userId: 1, headUrl: '', platform: 'dingtalk' status: true, username: 'Ceshi', userId: 1, headUrl: '', platform: 'dingtalk'
}, },
{ {
status:false,username: 'Ceshi2', userId: 2, headUrl: '', platform: 'dingtalk' status: false, username: 'Ceshi2', userId: 2, headUrl: '', platform: 'dingtalk'
}, },
{ {
status:false,username: 'Ceshi3', userId: 3, headUrl: '', platform: 'dingtalk' status: false, username: 'Ceshi3', userId: 3, headUrl: '', platform: 'dingtalk'
} }
], // 参会人列表 ], // 参会人列表
locationName: '', locationName: '',
......
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