Commit bbbb77aa by xiexiaoqin

fix:conflit

parents aa7bf2a9 6623a631
...@@ -16,7 +16,6 @@ export default function http(data) { ...@@ -16,7 +16,6 @@ export default function http(data) {
if (res.data.code == 0) { if (res.data.code == 0) {
resolve(res); resolve(res);
} }
}, },
fail: function (res) { fail: function (res) {
rejects(res) rejects(res)
......
...@@ -217,7 +217,7 @@ export function saveFileInfo(data) { ...@@ -217,7 +217,7 @@ export function saveFileInfo(data) {
return $http({ return $http({
method: 'post', method: 'post',
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule-accessory/save` url: `/meet/meeting-log-resource/save`
}) })
} }
// 删除文件 // 删除文件
......
...@@ -22,8 +22,9 @@ App({ ...@@ -22,8 +22,9 @@ App({
userInfo: '', userInfo: '',
// globalUrl:'https://gateway2.mingwork.com', // 线上地址 // globalUrl:'https://gateway2.mingwork.com', // 线上地址
globalUrl: 'https://gateway-beta.mingwork.com' //beta地址 globalUrl: 'https://gateway-beta.mingwork.com' //beta地址
// globalUrl: 'http://192.168.1.111' //beta地址
// globalUrl:'http://139.196.213.18:9999' //beta地址 // globalUrl:'http://139.196.213.18:9999' //beta地址
// globalUrl:'http://192.168.1.101:9999', //beta地址 // globalUrl: 'http://192.168.1.101:9999', //beta地址
// globalUrl:'http://192.168.1.102:9999' //beta地址 // globalUrl:'http://192.168.1.102:9999' //beta地址
// 106,112,102 // 106,112,102
} }
......
...@@ -88,13 +88,3 @@ ...@@ -88,13 +88,3 @@
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
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
}, },
"luxon": { "luxon": {
"version": "1.22.2", "version": "1.22.2",
"resolved": "https://registry.npm.taobao.org/luxon/download/luxon-1.22.2.tgz?cache=0&sync_timestamp=1585156513463&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fluxon%2Fdownload%2Fluxon-1.22.2.tgz", "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.22.2.tgz",
"integrity": "sha1-eZ1lzB7QuoW0yz9904/Aio0aZ1A=", "integrity": "sha512-vq6eSaOOw1fKob+JXwfu0e3/UFUT4G4HTFRJab7dch8J1OdOGW/vXqCiJsY7rm2In+5gKNYx0EtnYT0Tc5V4Qw==",
"optional": true "optional": true
}, },
"rrule": { "rrule": {
"version": "2.6.4", "version": "2.6.4",
"resolved": "https://registry.npm.taobao.org/rrule/download/rrule-2.6.4.tgz", "resolved": "https://registry.npmjs.org/rrule/-/rrule-2.6.4.tgz",
"integrity": "sha1-f08x/aErxySbsXbIkRCam8RI4DU=", "integrity": "sha512-sLdnh4lmjUqq8liFiOUXD5kWp/FcnbDLPwq5YAc/RrN6120XOPb86Ae5zxF7ttBVq8O3LxjjORMEit1baluahA==",
"requires": { "requires": {
"luxon": "^1.21.3", "luxon": "^1.21.3",
"tslib": "^1.10.0" "tslib": "^1.10.0"
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
}, },
"tslib": { "tslib": {
"version": "1.11.1", "version": "1.11.1",
"resolved": "https://registry.npm.taobao.org/tslib/download/tslib-1.11.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
"integrity": "sha1-6xXRKIJ/vuKEFUnhcfRe0zisfjU=" "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA=="
} }
} }
} }
...@@ -3,12 +3,12 @@ page { ...@@ -3,12 +3,12 @@ page {
background: #fff; background: #fff;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
color: #030303; color: #0a0a0a;
} }
.icon { .icon {
vertical-align: middle; vertical-align: middle;
color: #1B263D; color: #0a0a0a;
font-size: 34rpx; font-size: 34rpx;
} }
...@@ -18,7 +18,7 @@ input { ...@@ -18,7 +18,7 @@ input {
} }
.createTitle { .createTitle {
padding: 14rpx 36rpx 16rpx; padding: 28rpx 36rpx 16rpx;
} }
.title { .title {
...@@ -36,8 +36,6 @@ input { ...@@ -36,8 +36,6 @@ input {
} }
.title>.icon { .title>.icon {
color: #3070F2;
/* vertical-align: middle; */
line-height: 58rpx; line-height: 58rpx;
} }
...@@ -45,7 +43,8 @@ input { ...@@ -45,7 +43,8 @@ input {
padding-left: 0; padding-left: 0;
width: 100%; width: 100%;
opacity: 0.72; opacity: 0.72;
font-size: 14px; font-size: 28rpx;
color: rgba(3, 3, 3, 1)
} }
.placeholder { .placeholder {
...@@ -133,7 +132,7 @@ input { ...@@ -133,7 +132,7 @@ input {
} }
.participatorListBottom { .participatorListBottom {
margin-top: 11rpx; margin-top: 14rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
...@@ -209,7 +208,7 @@ input { ...@@ -209,7 +208,7 @@ input {
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
padding: 16rpx 32rpx; padding: 32rpx;
background: #fff; background: #fff;
box-shadow: 0 -2px 4px 0 rgba(0, 0, 0, 0.04); box-shadow: 0 -2px 4px 0 rgba(0, 0, 0, 0.04);
position: fixed; position: fixed;
...@@ -219,18 +218,15 @@ input { ...@@ -219,18 +218,15 @@ input {
.button { .button {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
width: 686rpx; width: 686rpx;
height: 96rpx; height: 72rpx;
background: #4D88FF; background: #EA0C28;
border-radius: 48rpx; border-radius: 48rpx;
font-size: 34rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
line-height: 96rpx; line-height: 72rpx;
} }
/* .iconicon_add { .noValueIcon {
margin-left: -2rpx; color: rgba(216, 216, 216, 1)!important;
text-align: left; }
vertical-align: middle; \ No newline at end of file
font-size: 92rpx;
} */
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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" focus="{{true}}" onInput="onInput" data-type="title" value="{{title}}" />
<view class="icon iconfont iconicon_description" onTap="addRemark"> <view class="icon iconfont iconicon_description1 {{remark ? '' : 'noValueIcon'}}" onTap="addRemark">
</view> </view>
</view> </view>
<view class="remark" a:if="{{isShowRemark}}"> <view class="remark" a:if="{{isShowRemark}}">
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
</view> </view>
<!-- roomId locationName 地点 --> <!-- roomId locationName 地点 -->
<view class="place"> <view class="place">
<view class="iconicon_room iconfont icon" a:if="{{roomId}}"> <view class="iconicon_room1 iconfont icon " a:if="{{roomId}}">
</view> </view>
<view class="iconicon_location iconfont icon" a:else> <view class="iconicon_location1 iconfont icon {{locationName ? '' : 'noValueIcon'}}" a:else>
</view> </view>
<view class="placeContaint"> <view class="placeContaint">
<view class="noPlace" a:if="{{!locationName}}" onTap="nextPage" data-nextPage="location"> <view class="noPlace" a:if="{{!locationName}}" onTap="nextPage" data-nextPage="location">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</view> </view>
<!-- startTime endTime repeatable recurrenceModel 时间 重复 --> <!-- startTime endTime repeatable recurrenceModel 时间 重复 -->
<view class="time"> <view class="time">
<view class="iconicon_time iconfont icon"> <view class="iconicon_conflict iconfont icon">
</view> </view>
<view class="timeContaint"> <view class="timeContaint">
<view> <view>
...@@ -46,13 +46,13 @@ ...@@ -46,13 +46,13 @@
{{comListData.repeatList[comListData.comSelectListId].text}}重复 {{comListData.repeatList[comListData.comSelectListId].text}}重复
</view> </view>
</view> </view>
<view class="icon iconfont iconicon_cycle " catchTap="showPopup" data-type='repeat' a:if="{{comListData.comSelectListId == 0}}"> <view class="icon iconfont iconicon_open " catchTap="showPopup" data-type='repeat' a:if="{{comListData.comSelectListId == 0}}">
</view> </view>
</view> </view>
</view> </view>
<!-- participatorList participatorUserId 参会人 --> <!-- participatorList participatorUserId 参会人 -->
<view class="participator"> <view class="participator">
<view class="iconicon_attender1 iconfont icon"> <view class="iconicon_attender iconfont icon {{participatorList.length>1 ? '' : 'noValueIcon'}}"">
</view> </view>
<view class="participatorContaint"> <view class="participatorContaint">
<view class="participatorText" a:if="{{participatorList.length < 2}}" catchTap="showPopup" data-type='participator'> <view class="participatorText" a:if="{{participatorList.length < 2}}" catchTap="showPopup" data-type='participator'>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</view> </view>
<!-- meetingWay 会议方式 --> <!-- meetingWay 会议方式 -->
<view class="meetingWay"> <view class="meetingWay">
<view class="iconicon_meet1 iconfont icon"> <view class="iconicon_meet iconfont icon {{comListData.meetingWayModelId ? '' : 'noValueIcon'}}">
</view> </view>
<view class="meetingWayContent"> <view class="meetingWayContent">
<view class="noWay" a:if="{{comListData.meetingWayModelId == null}}" catchTap="showPopup" data-type='meetingWayModel'> <view class="noWay" a:if="{{comListData.meetingWayModelId == null}}" catchTap="showPopup" data-type='meetingWayModel'>
......
...@@ -59,7 +59,6 @@ create.Page({ ...@@ -59,7 +59,6 @@ create.Page({
}) })
}, },
Complete(data) { Complete(data) {
console.log(data)
this.closePop(); this.closePop();
}, },
onLoad() { onLoad() {
...@@ -245,26 +244,34 @@ create.Page({ ...@@ -245,26 +244,34 @@ create.Page({
const _that = this const _that = this
let require = [] let require = []
let select = [] let select = []
let outLookConcat = []
for (let participator of _that.store.data.participatorList) {
if (participator.platform === 'outlook') {
outLookConcat.push(participator)
}
}
select = this.store.data.participatorUserId select = this.store.data.participatorUserId
require = [getApp().globalData.userid] require = [getApp().globalData.userid]
select = _that.selectedelRequired(require, select).pickedUsers select = _that.selectedelRequired(require, select).pickedUsers
dd.complexChoose({ dd.complexChoose({
title: "选择参会人", //标题 title: "选择参会人", //标题
multiple: true, //是否多选 multiple: true, //是否多选
pickedUsers: select, //已选用户 pickedUsers: select, //已选用户 s
requiredUsers: require, //必选用户(不可取消选中状态) requiredUsers: require, //必选用户(不可取消选中状态)
responseUserOnly: true, //返回人,或者返回人和部门 responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) { success: function (res) {
_that.store.data.participatorList = [] let participatorList = []
_that.store.data.participatorUserId = [] let participatorUserId = []
_that.store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }) participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
_that.store.data.participatorUserId.push(getApp().globalData.userid) 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, platform: 'dingtalk' }) participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar, platform: 'dingtalk' })
_that.store.data.participatorUserId.push(item.userId) participatorUserId.push(item.userId)
}) })
_that.store.data.participatorList = _that.setArrary(_that.store.data.participatorList) participatorList = _that.setArrary(participatorList.concat(outLookConcat))
_that.store.data.participatorUserId = [...new Set(_that.store.data.participatorUserId)] participatorUserId = [...new Set(participatorUserId)]
_that.store.data.participatorList = participatorList
_that.store.data.participatorUserId = participatorUserId
_that.update() _that.update()
_that.conflictPeople() _that.conflictPeople()
......
...@@ -3,7 +3,7 @@ page { ...@@ -3,7 +3,7 @@ page {
background: #fff; background: #fff;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
color: #030303; color: #0a0a0a;
} }
.hideDetail { .hideDetail {
...@@ -36,7 +36,7 @@ page { ...@@ -36,7 +36,7 @@ page {
.icon { .icon {
vertical-align: middle; vertical-align: middle;
color: #1B263D; color: #0a0a0a;
font-size: 34rpx; font-size: 34rpx;
} }
...@@ -64,8 +64,7 @@ input { ...@@ -64,8 +64,7 @@ input {
} }
.title>.icon { .title>.icon {
color: #3070F2; color: #0a0a0a;
/* vertical-align: middle; */
line-height: 58rpx; line-height: 58rpx;
} }
...@@ -355,3 +354,7 @@ input { ...@@ -355,3 +354,7 @@ input {
margin-right: 70rpx; margin-right: 70rpx;
font-size: 40rpx; font-size: 40rpx;
} }
.noValueIcon {
color: rgba(216, 216, 216, 1)!important;
}
\ No newline at end of file
...@@ -12,19 +12,19 @@ ...@@ -12,19 +12,19 @@
<!-- title remark 标题 描述 --> <!-- title remark 标题 描述 -->
<view class="createTitle"> <view class="createTitle">
<view class="title"> <view class="title">
<input placeholder-class="placeholder" placeholder="请输入主题" class="text" onInput="onInput" data-type="title" data-selectType="common" value="{{title}}" onBlur="onBlur" /> <input placeholder-class="placeholder" placeholder="请输入主题" class="text" onInput="onInput" data-type="title" data-selectType="common" value="{{title}}" onConfirm="onBlur" />
<view class="icon iconfont iconicon_description" onTap="addRemark"> <view class="icon iconfont iconicon_description1 {{remark ? '' : 'noValueIcon'}}" 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}}" onBlur="onBlur" /> <input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" onConfirm="onBlur" />
</view> </view>
</view> </view>
<!-- roomId locationName 地点 --> <!-- roomId locationName 地点 -->
<view class="place"> <view class="place">
<view class="iconicon_room iconfont icon" a:if="{{roomId}}"> <view class="iconicon_room iconfont icon" a:if="{{roomId}}">
</view> </view>
<view class="iconicon_location iconfont icon" a:else> <view class="iconicon_location1 iconfont icon {{locationName ? '' : 'noValueIcon'}}" a:else>
</view> </view>
<view class="placeContaint"> <view class="placeContaint">
<view class="noPlace" a:if="{{!locationName}}" onTap="nextPage" data-nextPage="location"> <view class="noPlace" a:if="{{!locationName}}" onTap="nextPage" data-nextPage="location">
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</view> </view>
<!-- startTime endTime repeatable recurrenceModel 时间 重复 --> <!-- startTime endTime repeatable recurrenceModel 时间 重复 -->
<view class="time"> <view class="time">
<view class="iconicon_time iconfont icon"> <view class="iconicon_conflict iconfont icon">
</view> </view>
<view class="timeContaint"> <view class="timeContaint">
<view> <view>
...@@ -57,13 +57,13 @@ ...@@ -57,13 +57,13 @@
{{comListData.repeatList[comListData.comSelectListId].text}}重复 {{comListData.repeatList[comListData.comSelectListId].text}}重复
</view> </view>
</view> </view>
<view class="icon iconfont iconicon_cycle " catchTap="showPopup" data-type='repeat' a:if="{{comListData.comSelectListId == 0}}"> <view class="icon iconfont iconicon_open" catchTap="showPopup" data-type='repeat' a:if="{{comListData.comSelectListId == 0}}">
</view> </view>
</view> </view>
</view> </view>
<!-- participatorList participatorUserId 参会人 --> <!-- participatorList participatorUserId 参会人 -->
<view class="participator"> <view class="participator">
<view class="iconicon_attender1 iconfont icon"> <view class="iconicon_attender iconfont icon {{participatorList.length>1 ? '' : 'noValueIcon'}}">
</view> </view>
<view class="participatorContaint"> <view class="participatorContaint">
<view class="participatorText" a:if="{{participatorList.length < 2}}" catchTap="showPopup" data-type='participator'> <view class="participatorText" a:if="{{participatorList.length < 2}}" catchTap="showPopup" data-type='participator'>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</view> </view>
<!-- meetingWay 会议方式 --> <!-- meetingWay 会议方式 -->
<view class="meetingWay"> <view class="meetingWay">
<view class="iconicon_meet1 iconfont icon"> <view class="iconicon_meet iconfont icon {{comListData.meetingWayModelId ? '' : 'noValueIcon'}}">
</view> </view>
<view class="meetingWayContent"> <view class="meetingWayContent">
<view class="noWay" a:if="{{comListData.meetingWayModelId == null}}" catchTap="showPopup" data-type='meetingWayModel'> <view class="noWay" a:if="{{comListData.meetingWayModelId == null}}" catchTap="showPopup" data-type='meetingWayModel'>
......
<!--<mw-select></mw-select> --> <!--<mw-select></mw-select> -->
版本号:151 版本 版本号:151 版本
<view class="index"> <view class="index">
<view a:if="{{startPageOnLoad&&startPageOnShow}}"> <view >
<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}}">
<block a:for="{{scheduleList}}" a:for-item="scheduleYearList"> <block a:for="{{scheduleList}}" a:for-item="scheduleYearList">
<block a:for="{{scheduleYearList}}"> <block a:for="{{scheduleYearList}}">
...@@ -92,11 +92,5 @@ ...@@ -92,11 +92,5 @@
<view class="createSchedule iconfont iconjiahao " onTap="nextPage"> <view class="createSchedule iconfont iconjiahao " onTap="nextPage">
</view> </view>
</view> </view>
<view class="startPage" a:else> <!--<view class="startPage"><image mode="scaleToFill" src="../../assests/startPage.png"/><view class="startText"><text class="text1">开会有益</text><text>快乐工作</text></view></view> -->
<image mode="scaleToFill" src="../../assests/startPage.png"/>
<view class="startText">
<text class="text1">开会有益</text>
<text>快乐工作</text>
</view>
</view>
</view> </view>
\ No newline at end of file
...@@ -12,16 +12,20 @@ create.Page({ ...@@ -12,16 +12,20 @@ create.Page({
scheduleItem: '' scheduleItem: ''
}, },
onLoad(event) { onLoad(event) {
if (event.scheduleItem) {
let scheduleItem = event.scheduleItem let scheduleItem = event.scheduleItem
let outlookContact = this.data.outlookContact this.setData({
scheduleItem: scheduleItem
})
}
let 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') {
outlookContact.push(value) outlookContact.push(value)
} }
} }
this.setData({ this.setData({
outlookContact: outlookContact, outlookContact: outlookContact
scheduleItem: scheduleItem
}) })
this.conflictPeople() this.conflictPeople()
}, },
...@@ -83,14 +87,61 @@ create.Page({ ...@@ -83,14 +87,61 @@ create.Page({
// 保存 // 保存
save() { save() {
// concat 拼接后生成新的数组 push 返回的是长度 // concat 拼接后生成新的数组 push 返回的是长度
this.store.data.participatorList.push(...this.data.outlookContact) let participatorList = []
let participatorList = [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }].concat(this.store.data.participatorList) for (let value of this.store.data.participatorList) {
this.store.data.participatorList = this.setArrary(participatorList) if (value.platform !== 'outlook') {
participatorList.push(value)
}
}
participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
participatorList.push(...this.data.outlookContact)
participatorList = this.setArrary(participatorList)
// 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)
// this.store.data.participatorList = this.setArrary(participatorList)
if (!!this.data.scheduleItem) {
if (true) {
this.arrayPoor(this.store.data.originUsers, participatorList)
this.store.data.originUsers = participatorList
this.store.data.participatorList = participatorList
} else {
}
} else {
this.store.data.participatorList = participatorList
}
this.update() this.update()
dd.navigateBack({ dd.navigateBack({
delta: 1 delta: 1
}) })
}, },
// 数组取差值 原先的数组与现在的比较 增加与减少
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
}
},
// 会议冲突 // 会议冲突
conflictPeople() { conflictPeople() {
let userIds = [] let userIds = []
......
...@@ -44,9 +44,9 @@ page { ...@@ -44,9 +44,9 @@ page {
} }
.headImg image { .headImg image {
width: 100%;
vertical-align: top; vertical-align: top;
width: 64rpx; height: 100%;
height: 64rpx;
border-radius: 50%; border-radius: 50%;
} }
...@@ -57,10 +57,6 @@ page { ...@@ -57,10 +57,6 @@ page {
border-bottom: 1rpx solid #E3E4E4; border-bottom: 1rpx solid #E3E4E4;
} }
.list:last-child .info {
border: none;
}
.close { .close {
position: absolute; position: absolute;
right: 32rpx; right: 32rpx;
......
...@@ -10,8 +10,11 @@ ...@@ -10,8 +10,11 @@
<text class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text> <text class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
</view> </view>
</view> </view>
<view class="addParticipants" onTap="addParticipants"> <view class="addParticipants" catchTap="showPopup">
<text class="iconfont iconicon_add " ></text> <text class="iconfont iconicon_add "></text>
<text>添加参会人</text> <text>添加参会人</text>
</view> </view>
<popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<hlist dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
</popup>
</view> </view>
\ No newline at end of file
...@@ -6,17 +6,57 @@ create.Page({ ...@@ -6,17 +6,57 @@ create.Page({
useAll: true, useAll: true,
data: { data: {
scheduleItem: '', scheduleItem: '',
conflictPeople: [] conflictPeople: [],
// 传给组件 hList 水平排列 所有数据 comHListData
comHListData: {
contactData: [
{ id: 0, text: '钉钉联系人', imageUrl: '../../assests/dingContact.png' },
{ id: 1, text: '手动添加邮箱', imageUrl: '../../assests/emailContact.png' }
]
},
popupShow: false
}, },
onLoad(event) { onLoad(event) {
if (event.scheduleItem) {
let scheduleItem = JSON.parse(event.scheduleItem) let scheduleItem = JSON.parse(event.scheduleItem)
this.setData({
scheduleItem: scheduleItem
})
}
dd.setNavigationBar({ dd.setNavigationBar({
title: `参会人(${this.store.data.participatorList.length}人)` title: `参会人(${this.store.data.participatorList.length}人)`
}) })
this.conflictPeople()
},
// 关闭popup 点击mark
closePopup() {
this.setData({ this.setData({
scheduleItem: scheduleItem popupShow: false
}) })
this.conflictPeople() },
// 出现popup
showPopup() {
this.setData({
popupShow: true
})
},
// 选择完水平 HList 的回调
selectComHList(event) {
switch (event.currentTarget.dataset.item.id) {
case 0:
this.addParticipator()
this.setData({
popupShow: false
})
break;
case 1:
this.setData({
popupShow: false
})
dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
break;
}
}, },
// 保存信息 // 保存信息
saveInfo() { saveInfo() {
...@@ -25,12 +65,23 @@ create.Page({ ...@@ -25,12 +65,23 @@ create.Page({
}) })
}, },
// 添加参会人 // 添加参会人
addParticipants() { addParticipator() {
const _that = this const _that = this
let require = [] let require = []
let select = [] let select = []
let outLookConcat = []
for (let participator of _that.store.data.participatorList) {
if (participator.platform === 'outlook') {
outLookConcat.push(participator)
}
}
if (!_that.data.scheduleItem || this.data.organizer === getApp().globalData.userid) {
select = this.store.data.participatorUserId select = this.store.data.participatorUserId
require = [getApp().globalData.userid] require = [getApp().globalData.userid]
} else {
select = []
require = [...this.store.data.originUsersId]
}
select = _that.selectedelRequired(require, select).pickedUsers select = _that.selectedelRequired(require, select).pickedUsers
dd.complexChoose({ dd.complexChoose({
title: "选择参会人", //标题 title: "选择参会人", //标题
...@@ -39,24 +90,74 @@ create.Page({ ...@@ -39,24 +90,74 @@ create.Page({
requiredUsers: require, //必选用户(不可取消选中状态) requiredUsers: require, //必选用户(不可取消选中状态)
responseUserOnly: true, //返回人,或者返回人和部门 responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) { success: function (res) {
_that.store.data.participatorList = [] let participatorList = []
_that.store.data.participatorUserId = [] let participatorUserId = []
_that.store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }) if (!_that.data.scheduleItem || _that.data.organizer === getApp().globalData.userid) {
_that.store.data.participatorUserId.push(getApp().globalData.userid) participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
participatorUserId.push(getApp().globalData.userid)
res.users.forEach((item, index) => {
participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar, platform: 'dingtalk' })
participatorUserId.push(item.userId)
})
} else {
_that.store.data.originUsers.forEach((item, index) => {
participatorList.push(item)
if (item.platform === 'dingtalk') {
participatorUserId.push(item.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, platform: 'dingtalk' }) participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar, platform: 'dingtalk' })
_that.store.data.participatorUserId.push(item.userId) participatorUserId.push(item.userId)
}) })
_that.store.data.participatorList = _that.setArrary(_that.store.data.participatorList) }
_that.store.data.participatorUserId = [...new Set(_that.store.data.participatorUserId)] participatorList = _that.setArrary(participatorList.concat(outLookConcat))
participatorUserId = [...new Set(participatorUserId)]
_that.store.data.participatorList = participatorList
_that.store.data.participatorUserId = participatorUserId
_that.update() _that.update()
_that.arrayPoor(_that.store.data.originUsers, _that.store.data.participatorList)
_that.conflictPeople() _that.conflictPeople()
if (true) {
_that.store.data.originUsers = _that.store.data.participatorList
_that.store.data.originUsersId = _that.store.data.participatorUserId
_that.update()
} else {
_that.store.data.participatorList = _that.store.data.originUsers
_that.store.data.participatorUserId = _that.store.data.originUsersId
}
}, },
fail: function (err) { fail: function (err) {
} }
}) })
}, },
// 数组取差值 原先的数组与现在的比较 增加与减少
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)
}
}
this.setData({
addUserList: add,
deleteUserList: del
})
},
// 删除参会人 // 删除参会人
delParticipants(event) { delParticipants(event) {
let userId = event.target.dataset.userId let userId = event.target.dataset.userId
......
{} {
\ No newline at end of file "usingComponents": {
"popup": "../../components/popup/index",
"list": "../../components/list/list",
"hlist": "../../components/hList/hList",
"meeting-time-picker": "../../components/meetingTimePicker/meetingTimePicker"
}
}
\ No newline at end of file
...@@ -44,5 +44,6 @@ ...@@ -44,5 +44,6 @@
<view class="allMettingRoom" a:if="{{true}}" onTap="toRoomList"> <view class="allMettingRoom" a:if="{{true}}" onTap="toRoomList">
查看所有会议室 查看所有会议室
</view> </view>
<selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.editSaveList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
</view> </view>
</view> </view>
\ No newline at end of file
import create from 'dd-store' import create from 'dd-store'
import exampleStore from '/stores/exampleStore' import exampleStore from '/stores/exampleStore'
import { queryAvailableMeetingRoomByTime } from './../../api/request' import { queryAvailableMeetingRoomByTime, modifySchedule } from './../../api/request'
import { throttle } from './../../utils/utils.js' import { throttle } from './../../utils/utils.js'
create.Page({ create.Page({
store: exampleStore, store: exampleStore,
...@@ -8,12 +8,22 @@ create.Page({ ...@@ -8,12 +8,22 @@ create.Page({
data: { data: {
place: '', place: '',
availableMeetingRoom: [], availableMeetingRoom: [],
scheduleItem: '' scheduleItem: '',
repeatable: 0,
// 传递给组件selectPopup 的数据
conSelectPopupData: {
showSelectPopup: false,
selectType: 'common',
editSaveList: [{ text: '仅保存此会议', id: 'only' }, { text: '保存此次及以后会议', id: 'future' }]
},
}, },
onLoad(e) { onLoad(e) {
// this.setData({ if (e.scheduleItem) {
// scheduleItem: JSON.parse(e.scheduleItem) this.setData({
// }) repeatable: e.repeatable,
scheduleItem: JSON.parse(e.scheduleItem)
})
}
dd.setNavigationBar({ dd.setNavigationBar({
title: '会议地点' title: '会议地点'
}) })
...@@ -32,9 +42,57 @@ create.Page({ ...@@ -32,9 +42,57 @@ create.Page({
this.store.data.locationName = event.target.dataset.locationName this.store.data.locationName = event.target.dataset.locationName
this.store.data.roomId = '' this.store.data.roomId = ''
this.update() this.update()
if (!!this.data.scheduleItem) {
if (this.data.repeatable) {
this.setData({
'conSelectPopupData.showSelectPopup': true
})
} else {
let data = {
location: {
longitude: -999,
latitude: -999,
locationName: this.store.data.locationName
},
meetingRoomId: this.store.data.roomId,
modifyModel: 'only',
modifyContent: 'modify_location'
}
}
} else {
dd.navigateBack({
delta: 1
})
}
},
onSelectPopup(event) {
let data = {
location: {
longitude: -999,
latitude: -999,
locationName: this.store.data.locationName
},
meetingRoomId: this.store.data.roomId,
modifyModel: event.currentTarget.dataset.item.id,
modifyContent: 'modify_location'
}
this.modifySchedule(data)
},
// 保存编辑
modifySchedule(data) {
let obj = {
scheduleId: this.data.scheduleItem.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate
}
modifySchedule(Object.assign(data, obj)).then(res => {
if (res.data.code === 0) {
dd.navigateBack({ dd.navigateBack({
delta: 1 delta: 1
}) })
}
})
}, },
selectMeetingRoom(e) { selectMeetingRoom(e) {
this.store.data.locationName = e.target.dataset.locationName this.store.data.locationName = e.target.dataset.locationName
......
{} {
\ No newline at end of file "usingComponents": {
"popup": "../../components/popup/index",
"list": "../../components/list/list",
"hlist": "../../components/hList/hList",
"toast": "../../components/toast/toast",
"selectpopup": "../../components/selectPopup/selectPopup",
"meeting-time-picker": "../../components/meetingTimePicker/meetingTimePicker"
}
}
\ No newline at end of file
...@@ -91,16 +91,21 @@ create.Page({ ...@@ -91,16 +91,21 @@ create.Page({
// 保存的接口 // 保存的接口
saveUpload: throttle(function () { saveUpload: throttle(function () {
let data = { let data = {
resourceType: 'accessory',
creatorId: '2',
scheduleId: this.data.scheduleItem.id, scheduleId: this.data.scheduleItem.id,
uploader: getApp().globalData.userid, uploader: getApp().globalData.userid,
uploaderInfo: JSON.stringify({ groupId: this.data.scheduleItem.groupId,
creatorInfo: JSON.stringify({
userId: getApp().globalData.userid, userId: getApp().globalData.userid,
username: getApp().globalData.name, username: getApp().globalData.name,
headUrl: getApp().globalData.avatar headUrl: getApp().globalData.avatar,
platform: 'dingtalk'
}), }),
thirdStoreTenant: 'dingTalk', thirdStoreTenant: 'dingTalk',
fileInfos: JSON.stringify(this.data.upLoadInfo.data), fileInfos: JSON.stringify(this.data.upLoadInfo.data),
descript: this.data.descript description: this.data.descript,
logType: 'schedule_accessory_add'
} }
saveFileInfo(data).then(res => { saveFileInfo(data).then(res => {
dd.alert({ dd.alert({
......
...@@ -23,10 +23,11 @@ class Store { ...@@ -23,10 +23,11 @@ class Store {
participatorUserId: [], // 参会人的userId participatorUserId: [], // 参会人的userId
userList: [], userList: [],
aheadTimes: [], aheadTimes: [],
requireUserList: [],
roomId: '', roomId: '',
startTime: '', startTime: '',
endTime: '' endTime: '',
originUsers: [],
originUsersId: []
} }
} }
export default new Store() export default new Store()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment