Commit 91dd8c3a by xiexiaoqin

fix:conflit

parents 153cf0a3 a788256f
......@@ -21,6 +21,7 @@
"pages/participantsDetail/participantsDetail",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/applicationDetails/applicationDetails",
"pages/attendeeList/attendeeList"
"pages/attendeeList/attendeeList",
"pages/scheduleList/scheduleList"
]
}
\ 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 @@
.com-list .com-list-item-select {
color: #3070F2;
}
.com-list-item-image>image {
width: 46rpx;
height: 46rpx;
vertical-align: top;
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="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="iconfont {{item.icon}}" a:if="{{iconType === 'icon'}}">
</view>
......@@ -8,7 +10,9 @@
<view class="com-list-item-text">
{{item.text}}
</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>
\ No newline at end of file
Component({
mixins: [],
data: {
comSelectListId: ''
comSelectListId: 0,
comSelectList: []
},
props: {
iconType: 'icon'
iconType: 'icon',
complete: false,
multiple: false,
},
didMount() {
console.log(this.props.comSelectListId)
this.setData({
comSelectListId: this.props.comSelectListId
comSelectListId: this.props.comSelectListId,
comSelectList: this.props.comSelectList
})
},
didUpdate() {
......@@ -20,10 +24,40 @@ Component({
didUnmount() { },
methods: {
comSelectList(event) {
this.setData({
comSelectListId: event.currentTarget.dataset.item.id
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({
comSelectListId: event.currentTarget.dataset.item.id
})
this.props.onComSelectList(event)
}
console.log(this.data.comSelectList)
},
complete(event) {
let comSelectList = this.data.comSelectList.sort((a, b) => {
return a - b
})
this.props.onComSelectList(event)
this.props.onCompelete(comSelectList)
}
},
});
......@@ -87,4 +87,14 @@
font-size: 32rpx;
right: 32rpx;
top: 32rpx;
}
\ No newline at end of file
}
/* =======
.popupComplet {
display: inline-block;
float: right;
height: 100%;
line-height: 64rpx;
margin-right: 32rpx;
>>>>>>> Stashed changes
} */
\ No newline at end of file
<view
class="dm-popup {{show ? 'dm-popup-show' : ''}} {{ animation ? 'animation': '' }}"
disable-scroll="{{disableScroll}}"
>
<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">
<text onTap="onMaskTap" class="iconfont iconicon_slide"></text>
</view>
<view class="popup-title" a:if="{{title}}">{{title}}</view>
<slot/>
<view class="dm-popup {{show ? 'dm-popup-show' : ''}} {{ animation ? 'animation': '' }}" disable-scroll="{{disableScroll}}">
<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">
<text onTap="onMaskTap" class="iconfont iconicon_slide"></text>
<!--<text class="popupComplet">完成</text> -->
</view>
<view class="popup-title" a:if="{{title}}">{{title}}</view>
<slot/>
</view>
</view>
\ No newline at end of file
......@@ -10,13 +10,19 @@ Component({
},
didMount() {
setTimeout(res => {
}, this.props.duration)
},
didUpdate(preProps, prevData) {
if (this.props.showToast) {
setTimeout(res => {
this.hide()
}, this.props.duration)
}
},
didUnmount() { },
methods: {
hide() {
this.props.onToastHidden()
}
},
});
......@@ -7,7 +7,7 @@
</view>
</view>
<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>
<!-- roomId locationName 地点 -->
......@@ -68,7 +68,7 @@
{{conflictPeople.length}}人会议安排冲突
</view>
</view>
<view class="iconicon_open iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
<view class="iconicon_open iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
</view>
<view class="participatorListBottom">
<view class="people" a:for="{{participatorList.length > 10 ? [...participatorList].splice(0, 11) : participatorList}}">
......
......@@ -48,7 +48,7 @@ create.Page({
conflictPeople: []
},
showPop() {
showPop(event) {
this.setData({
show: true
})
......@@ -79,11 +79,6 @@ create.Page({
// 添加描述
addRemark() {
let isShowRemark = !this.data.isShowRemark
if (!isShowRemark) {
this.setData({
remark: ''
})
}
this.setData({
isShowRemark: isShowRemark
})
......@@ -152,19 +147,25 @@ create.Page({
// 选择循环机制 选择会议方式 选择时间 出现popup弹窗
showPopup(event) {
let iconType = ''
let popupTitle = ''
switch (event.currentTarget.dataset.type) {
case 'meetingWayModel':
iconType = 'image'
popupTitle = '选择会议方式'
break
case 'repeat':
iconType = 'icon'
popupTitle = '会议重复'
break
case 'participator':
popupTitle = '选择参会人'
break
case 'time':
popupTitle = '选择会议时间'
break
}
this.setData({
popupTitle: popupTitle,
popupShow: true,
comType: event.currentTarget.dataset.type,
'comListData.iconType': iconType
......@@ -215,7 +216,6 @@ create.Page({
},
// 选择完水平 HList 的回调
selectComHList(event) {
console.log(event)
switch (event.currentTarget.dataset.item.id) {
case 0:
this.addParticipator()
......@@ -319,7 +319,7 @@ create.Page({
endTime: this.store.data.endTime.replace(/\//g, "-"),
meetingRoomId: this.store.data.roomId,
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,
remark: this.data.remark,
recurrenceModel: this.data.recurrenceModel,
......
......@@ -296,10 +296,32 @@ input {
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;
}
.remindTime {
margin-right: 4rpx;
}
.participate>text {
margin-right: 10rpx;
color: #15BC83;
......
......@@ -12,12 +12,12 @@
<!-- title remark 标题 描述 -->
<view class="createTitle">
<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>
</view>
<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>
<!-- roomId locationName 地点 -->
......@@ -114,7 +114,7 @@
</view>
</view>
<!-- 删除该会议 -->
<view class="delMetting">
<view class="delMetting" onTap="delSheudle">
<view class=" iconfont iconicon_close">
</view>
<view>
......@@ -124,26 +124,48 @@
<popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete"></meeting-time-picker>
<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>
</popup>
</view>
<!-- 底部导航栏 -->
<view class="footNav">
<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="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 class="noParticipateStatus">
<view class="originStaus" a:if="{{confirmAttendance === null}}">
<view catchTap="participate">
<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>不参加</text>
</view> -->
</view>
</view>
<view class="footNavBottom">
<view class="iconfont iconicon_share" onTap="uploadFile">
<view class="iconfont iconicon_data" onTap="uploadFile">
</view>
<view class="iconfont iconicon_task">
<view class="iconfont iconicon_task1">
</view>
</view>
</view>
<toast showToast="{{showToast}}" onToastHidden=" onToastHidden"></toast>
<selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.editSaveList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
<toast showToast="{{conToastData.showToast}}" onToastHidden="onToastHidden"></toast>
<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
......@@ -47,6 +47,7 @@ input {
}
.contactImage {
position: relative;
color: #fff;
font-size: 28rpx;
height: 80rpx;
......@@ -91,4 +92,19 @@ input {
color: #FFFFFF;
text-align: center;
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 @@
</view>
</view>
<!-- 邮箱联系人列表 -->
<view class="contactList" >
<view class="contactList">
<view class="contactListItem" a:for="{{outlookContact}}">
<view class="contactImage">
{{item.username.substring(0,2)}}
<view a:if="{{conflictPeople.includes(item.userId)}}" class="conflict iconicon_conflict iconfont">
</view>
</view>
<view class="contactText">
{{item.username}}
......
import { getHomeUserSchedule } from '../../api/request.js'
import { getUserScheduleInTime } from '../../api/request.js'
import { throttle } from './../../utils/utils.js'
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
......@@ -7,9 +7,12 @@ create.Page({
useAll: true,
data: {
outlookContact: [],
value: ''
value: '',
conflictPeople: [],
scheduleItem: ''
},
onLoad() {
onLoad(event) {
let scheduleItem = event.scheduleItem
let outlookContact = this.data.outlookContact
for (let value of this.store.data.participatorList) {
if (value.platform === 'outlook') {
......@@ -17,8 +20,10 @@ create.Page({
}
}
this.setData({
outlookContact: outlookContact
outlookContact: outlookContact,
scheduleItem: scheduleItem
})
this.conflictPeople()
},
onShow() {
},
......@@ -44,6 +49,7 @@ create.Page({
value: '',
outlookContact: outlookContact
})
this.conflictPeople()
} else {
dd.alert({
content: '请输入正确的邮箱格式',
......@@ -78,11 +84,42 @@ create.Page({
save() {
// concat 拼接后生成新的数组 push 返回的是长度
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.update()
dd.navigateBack({
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({
conflictPeople: []
},
onLoad(event) {
let scheduleItem = JSON.parse(event.scheduleItem)
dd.setNavigationBar({
title: `参会人(${this.store.data.participatorList.length}人)`
})
this.setData({
scheduleItem: scheduleItem
})
this.conflictPeople()
},
// 保存信息
......@@ -98,9 +102,16 @@ create.Page({
getUserScheduleInTime(data).then(res => {
let conflictPeople = []
for (let value in res.data.data) {
if (res.data.data[value].length > 0) {
conflictPeople.push(value)
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
......
......@@ -7,9 +7,13 @@ create.Page({
useAll: true,
data: {
place: '',
availableMeetingRoom: []
availableMeetingRoom: [],
scheduleItem: ''
},
onLoad(e) {
// this.setData({
// scheduleItem: JSON.parse(e.scheduleItem)
// })
dd.setNavigationBar({
title: '会议地点'
})
......
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