Commit 79285f0b by fengzhaoyu

选人还没好

parent 6d85036c
......@@ -35,7 +35,7 @@
</view>
</view>
<!-- 地点 -->
<view class="place" a:if="{{!!scheduleItem?(!!locationName?true:false):true}}">
<view class="place" a:if="{{!!locationName}}">
<view class="icon iconfont icondingwei">
</view>
<view class="text" data-nextPage="place" onTap="nextPage">
......@@ -131,8 +131,8 @@
</view>
</view>
<!-- 编辑列表 -->
<view class="editList" a:if="{{!!scheduleItem}}">
<view a:if="{{!!scheduleItem?(!!locationName?false:true):true}}" class="listGroup" onTap="editSchedule" data-icon="icondingwei">
<view class="editList" a:if="{{!!scheduleItem?true:(!locationName|| !aheadTimes.length?true:false)}}">
<view a:if="{{!locationName}}" class="listGroup" onTap="editSchedule" data-icon="icondingwei">
<view class="listIcon iconfont icondingwei">
</view>
<view class="listText">
......@@ -146,28 +146,28 @@
提醒
</view>
</view>
<view a:if="{{!repeatable}}" class="listGroup" onTap="editSchedule" data-icon="iconchongfu">
<view a:if="{{!repeatable&&!!scheduleItem}}" class="listGroup" onTap="editSchedule" data-icon="iconchongfu">
<view class="listIcon iconfont iconchongfu">
</view>
<view class="listText">
重复
</view>
</view>
<view a:if="{{!remark}}" class="listGroup" onTap="editSchedule" data-icon="icondidianmiaoshu">
<view a:if="{{!remark&&!!scheduleItem}}" class="listGroup" onTap="editSchedule" data-icon="icondidianmiaoshu">
<view class="listIcon iconfont icondidianmiaoshu">
</view>
<view class="listText">
描述
</view>
</view>
<view a:if="{{scheduleItem.virtual=='N'}}" class="listGroup" onTap="editSchedule" data-icon="iconshanchu">
<view a:if="{{repeatable==0&&!!scheduleItem}}" class="listGroup" onTap="editSchedule" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu">
</view>
<view class="listText">
删除
删除
</view>
</view>
<picker a:else value="{{0}}" range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule">
<picker a:if="{{!!scheduleItem&&repeatable==1}}" value="{{0}}" range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule">
<view class="listGroup" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu">
</view>
......@@ -178,7 +178,7 @@
</picker>
</view>
<!-- 编辑重复的时候的保存 -->
<picker a:if="{{scheduleItem.virtual=='Y'}}" value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat">
<picker a:if="{{repeatable=='1'}}" value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat">
<view>
<view class="save">
<view>
......
......@@ -23,15 +23,19 @@ create.Page({
// 人员增量信息 减量信息 只有在编辑的时候使用
addUserList: undefined,
deleteUserList: undefined,
originUserList: [],
originUserList: []
},
onLoad(event) {
console.log(this.selectedelRequired([1, 2, 4, 5], [1, 2, 4, 6]))
let index = new Date().getDay()
this.data.repeatWeek = this.data.repeatWeek[index - 1]
this.store.data.remark = ''
this.store.data.recurrenceModel = {
model: "no_repeat"
}
this.store.data.repeatable = 0
this.store.data.locationName = ''
this.store.data.conflictPeople = []
this.store.data.participatorList = [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar }]
this.store.data.locationName = ''
......@@ -69,7 +73,6 @@ create.Page({
this.update()
} else {
this.store.data.aheadTimes = [15]
this.store.data.requireUserList = [getApp().globalData.userid]
this.update()
}
this.conflict()
......@@ -151,18 +154,19 @@ create.Page({
title: event.detail.value
})
},
// 添加参会人
// 创建添加参会人
addParticipants() {
const _that = this
dd.complexChoose({
limitTips: "超出了", //超过限定人数返回提示
maxUsers: 100, //最大可选人数
title: "选择参会人", //标题
multiple: true, //是否多选
pickedUsers: _that.store.data.participatorUserId, //已选用户
requiredUsers: _that.store.data.requireUserList, //必选用户(不可取消选中状态)
requiredUsers: [], //必选用户(不可取消选中状态)
responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) {
_that.store.data.participatorList = []
_that.store.data.participatrUserId = []
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.headUrl })
_that.store.data.participatorUserId.push(item.userId)
......@@ -171,10 +175,33 @@ create.Page({
_that.store.data.participatorUserId = [...new Set(_that.store.data.participatorUserId)]
_that.update()
_that.conflict()
_that.arrayPoor(_that.data.originUserList, _that.store.data.participatorList)
// _that.arrayPoor(_that.data.originUserList, _that.store.data.participatorList)
},
fail: function (err) {
}
})
},
// 编辑添加参会人
editPParticipants() {
const _that = this
dd.complexChoose({
title: "选择参会人", //标题
multiple: true, //是否多选
pickedUsers: [], //已选用户
requiredUsers: [], //必选用户(不可取消选中状态)
responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) {
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.headUrl })
_that.store.data.participatorUserId.push(item.userId)
})
_that.store.data.participatorList = _that.setArrary(_that.store.data.participatorList)
_that.store.data.participatorUserId = [...new Set(_that.store.data.participatorUserId)]
_that.update()
_that.conflict()
// _that.arrayPoor(_that.data.originUserList, _that.store.data.participatorList)
},
fail: function (err) {
}
})
},
......@@ -358,6 +385,9 @@ create.Page({
week1: this.data.weekList[new Date(res.data.data.startTime).getDay()],
week2: this.data.weekList[new Date(res.data.data.endTime).getDay()]
})
console.log(2222222)
// this.store(JSON.stringify())
console.log(2222222)
this.update()
this.conflict()
})
......@@ -494,6 +524,19 @@ create.Page({
})
},
// 去重
// 已选用户去中去掉必选用户
selectedelRequired(requiredUsers, pickedUsers) {
for (let i = 0; i < requiredUsers.length; i++) {
for (let m = 0; m < pickedUsers.length; m++) {
if (requiredUsers[i] == pickedUsers[m]) {
pickedUsers.splice(m, 1)
m--;
}
}
}
return {
requiredUsers: requiredUsers,
pickedUsers: pickedUsers
}
}
});
......@@ -55,7 +55,7 @@
</view>
<view class="text blank">
<text a:if="{{aheadTimes.includes(0)}}">立即提醒</text>
<text a:if="{{aheadTimes.includes(1)}}">5分钟前</text>
<text a:if="{{aheadTimes.includes(5)}}">5分钟前</text>
<text a:if="{{aheadTimes.includes(15)}}">15分钟前</text>
<text a:if="{{aheadTimes.includes(30)}}">30分钟前</text>
<text a:if="{{aheadTimes.includes(60)}}">1小时前</text>
......
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