Commit 095eb566 by fengzhaoyu

fix: 选人

parent 53ee4609
...@@ -4,7 +4,7 @@ Component({ ...@@ -4,7 +4,7 @@ Component({
}, },
props: { props: {
showToast: false, showToast: false,
duration: 1000, duration: 2000,
title: '保存成功', title: '保存成功',
toastIcon: 'iconcanjia3' toastIcon: 'iconcanjia3'
......
...@@ -139,6 +139,8 @@ page { ...@@ -139,6 +139,8 @@ page {
} }
.icon { .icon {
width: 36rpx;
height: 100%;
vertical-align: middle; vertical-align: middle;
color: #0a0a0a; color: #0a0a0a;
font-size: 36rpx; font-size: 36rpx;
...@@ -150,7 +152,7 @@ input { ...@@ -150,7 +152,7 @@ input {
caret-color: #3070F2; caret-color: #3070F2;
padding-left: 0; padding-left: 0;
height: 52rpx; height: 52rpx;
line-height: 52rpx; /* line-height: 52rpx; */
} }
.createTitle { .createTitle {
...@@ -239,7 +241,7 @@ input { ...@@ -239,7 +241,7 @@ input {
.close { .close {
font-size: 32rpx; font-size: 32rpx;
color: rgba(10, 10, 10, 0.3) color: rgba(10, 10, 10, 0.3)!important;
} }
.repeatModal { .repeatModal {
...@@ -592,4 +594,17 @@ input { ...@@ -592,4 +594,17 @@ input {
height: 68rpx; height: 68rpx;
width: 100%; width: 100%;
background: #fff; background: #fff;
}
.iconicon_description1 {
color: rgba(10, 10, 10, 0.4)!important;
}
.iconright {
font-size: 30rpx;
color: rgba(10, 10, 10, 0.3)!important;
}
.addPadding {
padding-bottom: 270rpx;
} }
\ No newline at end of file
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
{{$data.participatorList.length}}位参会人 {{$data.participatorList.length}}位参会人
</view> </view>
<view class="conflictStatus" a:if="{{conflictPeople.length}}"> <view class="conflictStatus" a:if="{{conflictPeople.length}}">
{{conflictPeople.length}}人会议安排冲突 {{conflictPeople.length}}人日程安排冲突
</view> </view>
</view> </view>
<view class="iconright iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view> <view class="iconright iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
<!-- 动态列表 --> <!-- 动态列表 -->
<import src="../../template/avater/index.axml"/> <import src="../../template/avater/index.axml"/>
<import src="../../template/affairBlank/index.axml"/> <import src="../../template/affairBlank/index.axml"/>
<view class="affair-list {{isExpand? '' : 'affair-list-margin-top'}}" onTap="hideFileOperate"> <view class="affair-list {{isExpand? '' : 'affair-list-margin-top'}} {{!isExpand&&$data.participatorList.length>1 ? 'addPadding' : ''}}" onTap="hideFileOperate">
<view a:if="{{!isExpand}}" class="affair-list-title">会议动态</view> <view a:if="{{!isExpand}}" class="affair-list-title">会议动态</view>
<block a:if="{{!affairLoading}}"> <block a:if="{{!affairLoading}}">
<block a:for="{{affairList}}"> <block a:for="{{affairList}}">
......
...@@ -28,7 +28,7 @@ create.Page({ ...@@ -28,7 +28,7 @@ create.Page({
{ id: 1, text: '每天', icon: '', repeatable: 1, recurrenceModel: { model: 'daily', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } }, { id: 1, text: '每天', icon: '', repeatable: 1, recurrenceModel: { model: 'daily', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } },
{ id: 2, text: '每周', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO'] } }, { id: 2, text: '每周', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO'] } },
{ id: 3, text: '每周的工作日', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO', 'TU', 'WE', 'TH', 'FR'] } }, { id: 3, text: '每周的工作日', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO', 'TU', 'WE', 'TH', 'FR'] } },
{ id: 4, text: '每月', icon: '', repeatable: 1, recurrenceModel: { model: 'absoluteMonthly', daysOfMonth: ['23'], interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } } { id: 4, text: '每月', icon: '', repeatable: 1, recurrenceModel: { model: 'absolute_Monthly', daysOfMonth: ['23'], interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } }
], ],
meetingWayList: [ meetingWayList: [
{ id: 0, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } }, { id: 0, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } },
...@@ -850,8 +850,8 @@ create.Page({ ...@@ -850,8 +850,8 @@ create.Page({
}, },
// 重置时间 // 重置时间
reSetTime() { reSetTime() {
this.$store.data.startTime = this.$store.data.originalData.startTime.replace(/'-'/g, '/') this.$store.data.startTime = this.$store.data.originalData.startTime.replace(/-/g, "/")
this.$store.data.endTime = this.$store.data.originalData.endTime.replace(/'-'/g, '/') this.$store.data.endTime = this.$store.data.originalData.endTime.replace(/-/g, "/")
this.update() this.update()
this.setData({ this.setData({
week: this.data.weekList[new Date(this.$store.data.originalData.startTime).getDay()], week: this.data.weekList[new Date(this.$store.data.originalData.startTime).getDay()],
...@@ -860,7 +860,7 @@ create.Page({ ...@@ -860,7 +860,7 @@ create.Page({
// 重置地点 // 重置地点
reSetLocation() { reSetLocation() {
this.$store.data.locationName = this.$store.data.originalData.location.locationName this.$store.data.locationName = this.$store.data.originalData.location.locationName
this.$store.data.roomId = this.$store.data.originalData.meetingRoomId this.$store.data.roomId = this.$store.data.originalData.meetingRoomId === -1 ? '' : this.$store.data.originalData.meetingRoomId
this.update() this.update()
}, },
// 重置人物 // 重置人物
...@@ -989,6 +989,7 @@ create.Page({ ...@@ -989,6 +989,7 @@ create.Page({
recurrenceModel: this.$store.data.originalData.repeatable ? { model: this.storer.data.originalData.recurrenceModel.model, daysOfMonth: this.$store.data.originalData.recurrenceModel.daysOfMonth, interval: 1, initialTime: this.$store.data.originalData.recurrenceModel.initialTime, terminateTime: this.$store.data.originalData.recurrenceModel.terminateTime, weekDayList: this.$store.data.originalData.recurrenceModel.weekDayList } : { model: 'no_repeat' } recurrenceModel: this.$store.data.originalData.repeatable ? { model: this.storer.data.originalData.recurrenceModel.model, daysOfMonth: this.$store.data.originalData.recurrenceModel.daysOfMonth, interval: 1, initialTime: this.$store.data.originalData.recurrenceModel.initialTime, terminateTime: this.$store.data.originalData.recurrenceModel.terminateTime, weekDayList: this.$store.data.originalData.recurrenceModel.weekDayList } : { model: 'no_repeat' }
}) })
}).then(res => { }).then(res => {
observer.notice(res.data.data)
this.$store.data.originalData.recurrenceModel = this.data.recurrenceModel this.$store.data.originalData.recurrenceModel = this.data.recurrenceModel
this.$store.data.originalData.repeatable = this.data.repeatable this.$store.data.originalData.repeatable = this.data.repeatable
this.update() this.update()
...@@ -1045,7 +1046,7 @@ create.Page({ ...@@ -1045,7 +1046,7 @@ create.Page({
latitude: '-999', latitude: '-999',
locationName: this.$store.data.locationName locationName: this.$store.data.locationName
}, },
meetingRoomId: this.$store.data.roomId meetingRoomId: !!this.$store.data.roomId ? this.$store.data.roomId : -1
} }
this.modifySchedule(dataLocation, needNotice).catch(err => { this.modifySchedule(dataLocation, needNotice).catch(err => {
this.$store.data.locationName = this.$store.data.originalData.location.locationName this.$store.data.locationName = this.$store.data.originalData.location.locationName
...@@ -1105,7 +1106,7 @@ create.Page({ ...@@ -1105,7 +1106,7 @@ create.Page({
recurrenceModel: this.data.comListData.repeatList[2].recurrenceModel recurrenceModel: this.data.comListData.repeatList[2].recurrenceModel
}) })
}) })
} else if (this.data.recurrenceModel.model === 'absoluteMonthly') { } else if (this.data.recurrenceModel.model === 'absolute_Monthly') {
let dataRepeat5 = { let dataRepeat5 = {
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, "-"),
......
import { getUserScheduleInTime } from '../../api/request.js' import { getUserScheduleInTime } from '../../api/request.js'
import { throttle } from './../../utils/utils.js' import { throttle } from './../../utils/utils.js'
import pageStore from '../participantsDetail/store';
import create from 'dd-store' import create from 'dd-store'
// 传递给组件toast的所有数据 // 传递给组件toast的所有数据
const conToastData = { const conToastData = {
showToast: false, showToast: false,
title: '保存成功' title: '邮箱格式错误'
} }
create.Page({ create.Page({
store: pageStore,
useAll: true,
data: { data: {
$data: null, $data: null,
outlookContact: [], outlookContact: [],
...@@ -17,6 +19,7 @@ create.Page({ ...@@ -17,6 +19,7 @@ create.Page({
conToastData: conToastData, conToastData: conToastData,
currentPeople: '', currentPeople: '',
value: '', value: '',
toPage: ''
}, },
onLoad(event) { onLoad(event) {
const _that = this const _that = this
...@@ -27,9 +30,21 @@ create.Page({ ...@@ -27,9 +30,21 @@ create.Page({
scheduleItem: scheduleItem scheduleItem: scheduleItem
}) })
} }
if (event.toPage) {
this.setData({
toPage: event.toPage
})
}
let outlookContact = [] let outlookContact = []
for (let value of this.$store.data.participatorList) { let userList = []
if (!this.data.scheduleItem || !this.data.toPage) {
userList = this.$store.data.participatorList
} else {
userList = this.store.data.contactPeople
}
for (let value of userList) {
if (value.platform === 'outlook') { if (value.platform === 'outlook') {
outlookContact.push(value) outlookContact.push(value)
} }
...@@ -51,7 +66,7 @@ create.Page({ ...@@ -51,7 +66,7 @@ create.Page({
}, },
// 添加email // 添加email
addEmail() { addEmail() {
let reg = /^\w+((.\w+)|(-\w+))@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+).[A-Za-z0-9]+$/ let reg = /^(?!.* )[a-zA-Z0-9_-]+/
if (!!this.data.value) { if (!!this.data.value) {
if (reg.test(this.data.value)) { if (reg.test(this.data.value)) {
let outlookContact = this.data.outlookContact let outlookContact = this.data.outlookContact
...@@ -69,9 +84,8 @@ create.Page({ ...@@ -69,9 +84,8 @@ create.Page({
this.conflictPeople() this.conflictPeople()
} }
else { else {
dd.alert({ this.setData({
content: '请输入正确的邮箱格式', 'conToastData.showToast': true
buttonText: '确定'
}) })
} }
} }
...@@ -99,38 +113,38 @@ create.Page({ ...@@ -99,38 +113,38 @@ create.Page({
} }
return Object.values(containt) return Object.values(containt)
}, },
// 创建的时候保存
createSave() {
dd.navigateBack({
delta: 1
})
},
// 编辑的时候保存
editSave() {
this.$store.data.updateInfo.isUpate = true
this.$store.data.updateInfo.updateType = 'operate_user'
this.update()
dd.navigateBack({
delta: 1
})
},
// 保存 // 保存
save() { save() {
this.$store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }) let userList = []
this.$store.data.participatorUserId.push(getApp().globalData.userid) let userId = []
userList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
userId.push(getApp().globalData.userid)
for (let value of this.data.outlookContact) { for (let value of this.data.outlookContact) {
this.$store.data.participatorList.push(value) userList.push(value)
this.$store.data.participatorUserId.push(value.userId) userId.push(value.userId)
} }
this.$store.data.participatorList = this.setArrary(this.$store.data.participatorList) userList = this.setArrary(userList)
this.$store.data.participatorUserId = [...new Set(this.$store.data.participatorUserId)] userId = [...new Set(userId)]
this.update()
if (!!this.data.scheduleItem) { if (!this.data.scheduleItem || !this.data.toPage) {
this.editSave() this.$store.data.participatorList.push(...userList)
this.$store.data.participatorUserId.push(...userId)
this.$store.data.participatorList = this.setArrary(this.$store.data.participatorList)
this.$store.data.participatorUserId = [...new Set(this.$store.data.participatorUserId)]
} else { } else {
this.createSave() this.store.data.contactPeople.push(...userList)
this.store.data.contactPeopleId.push(...userId)
this.store.data.contactPeople = this.setArrary(this.store.data.contactPeople)
this.store.data.contactPeopleId = [...new Set(this.store.data.userId)]
if (this.store.data.contactPeople != this.$store.data.originalData.userList) {
this.$store.data.updateInfo.isUpate = true
this.$store.data.updateInfo.updateType = 'operate_user'
}
} }
this.update()
dd.navigateBack({
delta: 1
})
}, },
// 选择弹窗 // 选择弹窗
onSelectPopup(event) { onSelectPopup(event) {
......
...@@ -59,7 +59,7 @@ page { ...@@ -59,7 +59,7 @@ page {
.close { .close {
position: absolute; position: absolute;
right: 32rpx; right: 32rpx;
color: #8E939D; color: rgba(10, 10, 10, 0.3);
font-size: 0.3rem; font-size: 0.3rem;
} }
......
<view class="participantsDetail"> <view class="participantsDetail">
<view class="peopleContaint"> <view class="peopleContaint">
<view class="peopleList" a:for="{{$data.participatorList}}" a:for-item="item"> <view class="peopleList" a:for="{{!!scheduleItem ? contactPeople : $data.participatorList}}" a:for-item="item">
<view class="headImg"> <view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/> <image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text> <text a:else>{{item.username.substring(0, 1)}}</text>
......
import create from 'dd-store' import create from 'dd-store'
import pageStore from './store'; import pageStore from './store';
import { checkFullScren } from "../../utils/checkFullScren"; import { checkFullScren } from "../../utils/checkFullScren";
import { modifySchedule, addSchedule, getUserScheduleInTime, getHomeUserSchedule } from '../../api/request.js' import { modifySchedule, addSchedule, getUserScheduleInTime, getHomeUserSchedule } from '../../api/request.js'
// 传给组件 hList 水平排列 所有数据 comHListData // 传给组件 hList 水平排列 所有数据 comHListData
...@@ -18,8 +17,9 @@ const comPopupData = { ...@@ -18,8 +17,9 @@ const comPopupData = {
popupShow: false popupShow: false
} }
create.Page({ create.Page({
store: pageStore,
useAll: true,
data: { data: {
store: pageStore,
$data: null, $data: null,
scheduleItem: '', scheduleItem: '',
conflictPeople: [], conflictPeople: [],
...@@ -27,22 +27,27 @@ create.Page({ ...@@ -27,22 +27,27 @@ create.Page({
currentPeople: '', currentPeople: '',
comHListData: comHListData, comHListData: comHListData,
comPopupData: comPopupData, comPopupData: comPopupData,
isClick: false,
isIPX: false isIPX: false
}, },
onLoad(event) { onLoad(event) {
this.reset()
if (event.scheduleItem) { if (event.scheduleItem) {
let scheduleItem = JSON.parse(event.scheduleItem) let scheduleItem = JSON.parse(event.scheduleItem)
this.setData({ this.setData({
scheduleItem: scheduleItem scheduleItem: scheduleItem
}) })
// for (let value of this.$store.data.participatorList) {
// this.store.data.contactPeople.push(value)
// this.store.data.contactPeopleId.push(value.userId)
// this.update()
// }
}
let contactPeople = []
let contactPeopleId = []
for (let value of this.$store.data.participatorList) {
contactPeople.push(value)
contactPeopleId.push(value.userId)
}
this.store.data.contactPeople = contactPeople
this.store.data.contactPeopleId = contactPeopleId
this.update()
}
this.setData({ this.setData({
isIPX: checkFullScren(), isIPX: checkFullScren(),
currentPeople: getApp().globalData.userid currentPeople: getApp().globalData.userid
...@@ -51,16 +56,10 @@ create.Page({ ...@@ -51,16 +56,10 @@ create.Page({
}, },
onShow() { onShow() {
this.getParticipatorLength()
dd.setNavigationBar({
title: `参会人(${this.$store.data.participatorList.length}人)`
})
this.conflictPeople() this.conflictPeople()
}, },
// 添加参会人 钉钉选人
// 添加参会人 钉钉选人
addParticipator() { addParticipator() {
const _that = this const _that = this
let require = [] let require = []
...@@ -71,12 +70,19 @@ create.Page({ ...@@ -71,12 +70,19 @@ create.Page({
outLookConcat.push(participator) outLookConcat.push(participator)
} }
} }
if (!_that.data.scheduleItem || this.$store.data.originalData.organizer === getApp().globalData.userid) { // 创建的 可选 必选
console.log(_that.$store.data.participatorUserId) if (!_that.data.scheduleItem) {
select = _that.$store.data.participatorUserId select = _that.$store.data.participatorUserId
require = [getApp().globalData.userid] require = [getApp().globalData.userid]
} else { }
select = _that.$store.data.participatorUserId // 编辑 发起人的可选必选
else if (this.$store.data.originalData.organizer === getApp().globalData.userid) {
select = _that.store.data.contactPeopleId
require = [getApp().globalData.userid]
}
// 编辑 参会人可选必选
else {
select = _that.store.data.contactPeopleId
require = [...this.$store.data.originUsersId] require = [...this.$store.data.originUsersId]
} }
select = _that.selectedelRequired([...require], [...select]).pickedUsers select = _that.selectedelRequired([...require], [...select]).pickedUsers
...@@ -108,10 +114,17 @@ create.Page({ ...@@ -108,10 +114,17 @@ create.Page({
peopleId.push(value.userId) peopleId.push(value.userId)
} }
people = _that.setArrary(people.concat(outLookConcat)) people = _that.setArrary(people.concat(outLookConcat))
_that.$store.data.participatorList = people
_that.$store.data.participatorUserId = peopleId
_that.update()
// 创建
if (!_that.data.scheduleItem) {
_that.$store.data.participatorList = people
_that.$store.data.participatorUserId = peopleId
_that.update()
} else {
_that.store.data.contactPeople = people
_that.store.data.contactPeopleId = peopleId
_that.update()
}
}, },
fail: function (err) { fail: function (err) {
} }
...@@ -120,35 +133,52 @@ create.Page({ ...@@ -120,35 +133,52 @@ create.Page({
// 删除参会人 // 删除参会人
delParticipants(event) { delParticipants(event) {
let userId = event.target.dataset.userId let userId = event.target.dataset.userId
this.$store.data.participatorList.forEach((item, index) => { let userIdList = []
let userList = []
if (!!this.data.scheduleItem) {
userList = this.store.data.contactPeople
userIdList = this.store.data.contactPeopleId
} else {
userList = this.$store.data.participatorList
userIdList = this.$store.data.participatorUserId
}
userList.forEach((item, index) => {
if (userId === item.userId) { if (userId === item.userId) {
let people = [...this.$store.data.participatorList] let people = [...userList]
people.splice(index, 1) people.splice(index, 1)
this.$store.data.participatorList = people if (!!this.data.scheduleItem) {
this.store.data.contactPeople = people
} else {
this.$store.data.participatorList = people
}
this.update() this.update()
return return
} }
}) })
this.$store.data.participatorUserId.forEach((item, index) => { userIdList.forEach((item, index) => {
if (userId === item) { if (userId === item) {
let peopleId = [...this.$store.data.participatorUserId] let peopleId = [...userIdList]
peopleId.splice(index, 1) peopleId.splice(index, 1)
console.log(peopleId) if (!!this.data.scheduleItem) {
this.$store.data.participatorUserId = peopleId this.store.data.contactPeopleId = peopleId
} else {
this.$store.data.participatorUserId = peopleId
}
this.update() this.update()
return return
} }
}) })
this.getParticipatorLength()
this.conflictPeople() this.conflictPeople()
}, },
// 编辑时候的保存 // 编辑时候的保存
editSave() { editSave() {
this.setData({ if (this.$store.data.originUsers != this.store.data.contactPeople) {
isClick: true
})
if (this.$store.data.originUsers != this.$store.data.participatorList) {
this.$store.data.updateInfo.isUpate = true this.$store.data.updateInfo.isUpate = true
this.$store.data.updateInfo.updateType = 'operate_user' this.$store.data.updateInfo.updateType = 'operate_user'
this.$store.data.participatorList = this.store.data.contactPeople
this.$store.data.participatorUserId = this.store.data.contactPeopleId
this.update() this.update()
} }
dd.navigateBack({ dd.navigateBack({
...@@ -160,7 +190,21 @@ create.Page({ ...@@ -160,7 +190,21 @@ create.Page({
saveInfo() { saveInfo() {
this.editSave() this.editSave()
}, },
// 获取参会人长度
getParticipatorLength() {
const length = !!this.data.scheduleItem ? this.store.data.contactPeople.length : this.$store.data.participatorList.length
dd.setNavigationBar({
title: `参会人(${length}人)`
})
},
// 重置参会人
reset() {
this.store.data.contactPeople = []
this.store.data.contactPeopleId = []
this.update()
},
// 展示弹窗 // 展示弹窗
showPopup() { showPopup() {
this.setData({ this.setData({
...@@ -189,7 +233,7 @@ create.Page({ ...@@ -189,7 +233,7 @@ create.Page({
this.setData({ this.setData({
'comPopupData.popupShow': false 'comPopupData.popupShow': false
}) })
dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` }) dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${JSON.stringify(this.data.scheduleItem)}&toPage=participantsDetail` })
break; break;
} }
}, },
...@@ -202,34 +246,6 @@ create.Page({ ...@@ -202,34 +246,6 @@ create.Page({
'centerPopup.showCenterPopup': true 'centerPopup.showCenterPopup': true
}) })
}, },
// 数组取差值 原先的数组与现在的比较 增加与减少
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
}
},
// 数组去重 // 数组去重
setArrary(arr, userId) { setArrary(arr, userId) {
console.log(arr) console.log(arr)
...@@ -241,8 +257,14 @@ create.Page({ ...@@ -241,8 +257,14 @@ create.Page({
}, },
// 会议冲突 // 会议冲突
conflictPeople() { conflictPeople() {
let users = []
let userIds = [] let userIds = []
for (let item of this.$store.data.participatorList) { if (!!this.data.scheduleItem) {
users = this.store.data.contactPeople
} else {
users = this.$store.data.participatorList
}
for (let item of users) {
userIds.push(item.userId) userIds.push(item.userId)
} }
...@@ -289,20 +311,6 @@ create.Page({ ...@@ -289,20 +311,6 @@ create.Page({
requiredUsers: req, requiredUsers: req,
pickedUsers: pic pickedUsers: pic
} }
},
// 页面卸载
onUnload() {
if (this.data.isClick === false && !!this.data.scheduleItem) {
this.reSetPeople()
}
},
// 重置人
reSetPeople() {
this.$store.data.updateInfo.isUpate = false
this.$store.data.updateInfo.updateType = ''
this.$store.data.participatorList = this.$store.data.originUsers
this.$store.data.participatorUserId = this.$store.data.originUsersId
this.update()
} }
}); });
...@@ -15,6 +15,7 @@ class Store { ...@@ -15,6 +15,7 @@ class Store {
updateType: '', updateType: '',
isUpate: false isUpate: false
}, },
onceMeetingContent: null
} }
} }
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