Commit ec8c52ed by xiexiaoqin

Merge branch 'release/2.0.0' of…

Merge branch 'release/2.0.0' of ssh://gitlab.roboming.com:2018/fengzhaoyu/schedule into release/2.0.0
parents dbbf2d60 77a4eea8
......@@ -49,7 +49,7 @@
<view class="iconicon_attender iconfont icon {{$data.showParticipatorList.length>1 ? '' : 'noValueIcon'}}">
</view>
<view class="participatorContaint">
<view class="participatorText" a:if="{{$data.showParticipatorList.length < 2}}" catchTap="handleAddParticipator" data-type='participator'>
<view class="participatorText" a:if="{{$data.showParticipatorList.length < 2}}" catchTap="handleAddParticipator">
添加参会人
</view>
<view class="participatorList" a:else>
......@@ -71,7 +71,7 @@
</view>
<view class="name">{{item.name}}</view>
</view>
<view class="addPeople iconfont iconicon_add1" catchTap="showPopup" data-type='participator'></view>
<view class="addPeople iconfont iconicon_add1" catchTap="handleAddParticipator"></view>
</view>
</view>
</view>
......
......@@ -70,38 +70,10 @@ create.Page({
this.update();
// 修改动态列表
this.store.data.affairList.unshift({
"readFlag": 1,
"commentType": "task",
"creator": {
"identify": "xiexiaoqin@mingwork.club",
"name": "xiaoqin xie",
"avatar": "https://lh4.googleusercontent.com/-dTkgbJpeQjc/AAAAAAAAAAI/AAAAAAAAAAA/AMZuuckZAY9cef_56Gw_ZglfiXjMmP8pQw/photo.jpg",
"email": "xiexiaoqin@mingwork.club",
"platform": "google",
"userId": "1296022611180703745",
"orgId": null
},
"fileDetailList": null,
"meetingTaskSimpleViewModel": {
"title": "测试不要当真",
"processState": "undetermined",
"executor": [],
"taskId": "e9ec94ea7b7665551f295188fbf01409",
"createTime": "2020-09-27 16:40:09",
"startTime": null,
"endTime": null
},
"commentCategory": "task_create",
"remark": null,
"notes": null,
"replyCommentList": null,
"actionLog": null,
"commentId": "1c41d0c3ca611a79e82a124e04f31928",
"createTime": "2020-09-27 15:40:09",
"updateTime": "2020-09-27 15:40:09",
"parentId": "-1"
})
for (let i = 0; i < res.data.data.length; i++) {
this.store.data.affairList.unshift(res.data.data[i].commentListDataModelList[i])
}
dd.navigateBack();
}
this.setData({ limitClick: false });
......
/*
comShareData {
isShow: false, 是否展示 默认不展示
shareDataList: [{}] 展示的数据
}
临时只做demo展示 并没有实际功能
*/
export const comShareData = {
shareTitle: '分享到',
isShow: false,
shareDataList: [
{ id: 0, text: '钉钉', imageUrl: '../../assests/dingContact.png' },
{ id: 1, text: '微信', imageUrl: '../../assests/weiXin.png' }
]
}
\ No newline at end of file
// export const comShareData = {
// shareTitle: '分享到',
// isShow: false,
// shareDataList: [
// { id: 0, text: '钉钉', imageUrl: '../../assests/dingContact.png' },
// { id: 1, text: '微信', imageUrl: '../../assests/weiXin.png' }
// ]
// }
export const fileSelectPopup = {
show: false,
list: [
{ text: "本地", type: 'oss' },
{ text: "钉盘", type: 'dd' },
]
}
\ No newline at end of file
export const aheadTimeList = [
{ 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: '' }
]
export const participateStatusList = [{ text: '仅参加此次会议', id: 'only', value: 1 }, { text: '参加所有会议', id: 'all', value: 1 }]
export const noParticipateStatusList = [{ text: '不参加此次会议', id: 'only', value: 0 }, { text: '不参加所有会议', id: 'all', value: 0 }]
export const centerPopupList = [
{ id: "N", text: '不发送通知' },
{ id: "Y", text: '发送通知' }
]
export const editSaveList = [{ text: '仅保存此会议', id: 'only' }, { text: '保存此次及以后会议', id: 'future' }]
......@@ -103,33 +103,33 @@
</view>
<!--<view onTap="goTasksPage">{{tasks.length}} 个任务</view><view onTap="goFilesPage">{{files.length}} 个附件</view> -->
<!-- 删除该会议 -->
<template is="deleteBtn" onhandleDelete="" data="{{title: '删除该会议' }}"/>
<template is="deleteBtn" onhandleDelete="handleDelete" data="{{title: '删除该会议' }}"/>
</view>
<!-- 底部导航栏 -->
<view class="footNav">
<view class="footNavTop" a:if="{{!isExpand&&$data.participatorList.length>1}}">
<view class="footNavTop" a:if="{{!isExpand && $data.showParticipatorList.length > 1}}">
<!-- 待定状态 -->
<view class="originStaus" a:if="{{confirmAttendance === -9}}">
<view catchTap="participate">
<view catchTap="handleParticipate">
<text class="iconfont iconicon_Agreed1"></text>
<text class="participateText">参加</text>
</view>
<text class="devider"></text>
<view catchTap="noParticipate">
<view catchTap="handleNoParticipate">
<text class="iconfont iconicon_noAgreed1"></text>
<text class="participateText">不参加</text>
</view>
</view>
<!--参加状态-->
<view class="participateStatus" a:if="{{confirmAttendance === 1}}">
<view class="remind" catchTap="showPopup" data-type="aheadTime">
<view class="remind" catchTap="handleAheadTime" data-type="aheadTime">
<text class="iconfont iconicon_time1"></text>
<text class="remindTimeContaint" a:if="{{aheadTimes.length}}">
<block class="remindTime" decode="{{true}}" a:for="{{comListData.aheadTimesList}}" a:if="{{aheadTimes.includes(item.id)}}">
<text class="remindTimeContaint" a:if="{{aheadTime.aheadTimes.length}}">
<block class="remindTime" decode="{{true}}" a:for="{{aheadTime.aheadTimeList}}" a:if="{{aheadTime.aheadTimes.includes(item.id)}}">
{{item.text}}{{' '}}
</block>
</text>
<text class="noRemind" a:if="{{!aheadTimes.length}}">不提醒</text>
<text class="noRemind" a:if="{{!aheadTime.aheadTimes.length}}">不提醒</text>
<text class="iconfont iconicon_share"></text>
</view>
<text class="devider"></text>
......@@ -163,10 +163,11 @@
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</view>
<selectpopup showSelectPopup="{{fileSelectPopup.show}}" selectPopupList="{{fileSelectPopup.list}}" onSelectPopup="fileSelectPopup" onSelectPopupCancel="closeFileSelectPopup"></selectpopup>
<centerpopup centerPopup="{{centerPopup.showCenterPopup}}" centerPopupList="{{centerPopup.centerPopupList}}" onSelectSend="onSelectSend"></centerpopup>
<selectpopup showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectParticipateStatus" onSelectPopupCancel="handleSelectPopupCancel"></selectpopup>
<selectpopup a:if="{{selectPopup.type === 'participateState'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectParticipateStatus" onSelectPopupCancel="handleSelectPopupCancel"></selectpopup>
<selectpopup a:if="{{selectPopup.type === 'modify_location'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectSavePlaceStatus" onSelectPopupCancel="handleSelectPopupCancel"></selectpopup>
<centerpopup a:if="{{centerPopup.type === 'modify_location'}}" centerPopup="{{centerPopup.show}}" centerPopupList="{{centerPopup.list}}" onSelectSend="selectPlaceNeedNotice"></centerpopup>
<toast showToast="{{conToastData.showToast}}" title="{{conToastData.title}}" 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>
<!-- 动态列表 -->
<import src="../../template/avater/index.axml"/>
<import src="../../template/affairBlank/index.axml"/>
......@@ -203,14 +204,15 @@
<view class="loading-more" onTap="loadAffairMore" a:if="{{current < pages}}">点击加载更多动态...</view>
</block>
<view a:else></view>
<popup title="{{popup.title}}" show="{{popup.show}}" mask="true" onClose="closePopup1">
<popup title="{{popup.title}}" show="{{popup.show}}" mask="true" onClose="closePopup">
<remark a:if="{{popup.type == 'remarkModal'}}" onGetRemark="getRemark"/>
<list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}" onComSelectList="selectRepeatListItem"></list>
<meeting-time-picker a:if="{{'time' === popup.type}}" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker></popup>
<notes a:if="{{popup.type == 'notesModal'}}" isEdit="{{true}}" onGetNotes="getNotes"/>
<meeting-time-picker a:if="{{'time' === popup.type}}" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker>
<list a:if="{{popup.type=='aheadTime'}}" onClose="closePopup" multiple="{{true}}" onCompelete="handleAheadTimeSave" complete="{{true}}" dataComList="{{aheadTime.aheadTimeList}}" onComSelectList="selectComList" comSelectList="{{aheadTime.aheadTimesListId}}" iconType="{{aheadTime.iconType}}"></list>
</popup>
<popup a:show="{{popupShow}}" title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<list multiple="{{comListData.multiple}}" onCompelete="selectAheadtimes" comSelectList="{{comListData.aheadTimesListId}}" complete="{{comType=='aheadTime' ? true : false}}" a:if="{{comType=='repeat' || comType=='aheadTime'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : comListData.aheadTimesList}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : comListData.aheadTimesListId}}" iconType="{{comListData.iconType}}"></list>
<notes a:if="{{comType == 'notesModal'}}" isEdit="{{true}}" onGetNotes="getNotes"/>
<comment a:if="{{comType == 'commentModal'}}" isEdit="{{true}}" onGetComment="getComment"/>
<remark a:if="{{comType == 'remarkModal'}}" onGetRemark="getRemark"/>
</popup>
<!-- 分享的弹窗 -->
<!--<popup a:if="{{comShareData.isShow}}" show="{{comShareData.isShow}}" title="{{comShareData.shareTitle}}" mask="{{true}}" onClose="closeShare"><sharelist dataComList="{{comShareData.shareDataList}}" onSelectComHList="closeShare"></sharelist></popup> -->
......
......@@ -18,11 +18,24 @@ export function getInitialPsarticipants(participants) {
return people
}
// 比较增减的人
export function handleChangePeople(originUsers, nowUsers) {
const add = nowUsers.filter(it => !originUsers.includes(it))
const del = originUsers.filter(it => !nowUsers.includes(it))
console.log(originUsers)
console.log(nowUsers)
let originMap = new Map()
let nowMap = new Map()
for (let x of originUsers) {
originMap.set(x.userId, x)
}
for (let x of nowUsers) {
nowMap.set(x.userId, x)
}
const add = nowUsers.filter(it => !originMap.get(it.userId))
const del = originUsers.filter(it => !nowMap.get(it.userId))
return {
add: add,
del: del
}
}
\ No newline at end of file
}
// 重置地点
<view class="participantsDetail">
<view class="peopleContaint">
<view class="peopleList" a:for="{{!!scheduleItem ? contactPeople : $data.showParticipatorList}}" a:for-item="item">
<view class="peopleList" a:for="{{!!scheduleItem ? showContactPeople : $data.showParticipatorList}}" a:for-item="item">
<view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text>
......@@ -8,7 +8,7 @@
</view>
<view class="info">
<text class="name">{{item.username}}</text>
<text a:if="{{(!scheduleItem || currentPeople === $data.originalData.organizer) ? !(item.userId == currentPeople) : !($data.originUsersId.includes(item.userId)) }}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
<text a:if="{{(!scheduleItem || currentPeople === organizer) ? !(item.userId == currentPeople) : !(originUsersId.includes(item.userId)) }}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
</view>
</view>
</view>
......
......@@ -10,32 +10,27 @@ create.Page({
useAll: true,
data: {
$data: null,
scheduleItem: '',
// 登陆当前账户的人 权限
currentPeople: '',
isIPX: false
organizer: '',
isIPX: false,
contactPeople: {},
showContactPeople: [],
originUsersId: [],
},
onLoad(event) {
// // this.reset()
// if (event.scheduleItem) {
// this.setData({
// scheduleItem: event.scheduleItem
// })
// 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({
isIPX: checkFullScren(),
currentPeople: getApp().globalData.userid
scheduleItem: event.scheduleItem,
organizer: event.organizer,
currentPeople: getApp().globalData.userid,
contactPeople: { ...this.$store.data.participatorList },
showContactPeople: [...this.$store.data.showParticipatorList],
originUsersId: Object.keys(this.$store.data.participatorList)
})
},
onShow() {
this.getParticipatorLength()
......@@ -50,78 +45,121 @@ create.Page({
require = [getApp().globalData.userid]
select = selectedelRequired(Object.keys(this.$store.data.participatorList), require)
}
// 编辑 发起人的可选必选
else if (this.$store.data.originalData.organizer === getApp().globalData.userid) {
select = this.store.data.contactPeopleId
require = [getApp().globalData.userid]
// 发起人 可选 必选
else if (this.data.currentPeople === this.data.organizer) {
require = [this.data.currentPeople]
select = selectedelRequired(Object.keys(this.data.contactPeople), require)
}
// 编辑 参会人可选必选
else {
select = this.store.data.contactPeopleId
require = [...this.$store.data.originUsersId]
require = [Object.keys(this.$store.data.participatorList)]
select = selectedelRequired(Object.keys(this.data.contactPeople), require)
}
selectPeople(select, require).then(res => {
const participatorList = {}
// 创建的 可选 必选
if (!this.data.scheduleItem) {
participatorList[getApp().globalData.userid] = {
userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk'
}
for (let i = 0; i < res.users.length; i++) {
participatorList[res.users[i].userId] = { userId: res.users[i].userId, username: res.users[i].name, headUrl: res.users[i].avatar, platform: 'dingtalk' }
}
// 发起人 可选 必选
else if (this.data.currentPeople === this.data.organizer) {
participatorList[getApp().globalData.userid] = {
userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk'
}
}
// 编辑 参会人可选必选
else {
const showContactPeople = this.data.showContactPeople.length
for (let i = 0; i < this.data.showContactPeople.length; i++) {
participatorList[showContactPeople[i].userId] = { userId: showContactPeople[i].userId, username: howContactPeople[i].username, headUrl: howContactPeople[i].headUrl, platform: 'dingtalk' }
}
}
for (let i = 0; i < res.users.length; i++) {
participatorList[res.users[i].userId] = { userId: res.users[i].userId, username: res.users[i].name, headUrl: res.users[i].avatar, platform: 'dingtalk' }
}
if (this.data.scheduleItem) {
this.setData({
contactPeople: participatorList,
showContactPeople: Object.values(participatorList)
})
} else {
this.$store.data.participatorList = participatorList
this.$store.data.showParticipatorList = Object.values(participatorList)
this.update()
}
this.getParticipatorLength()
})
},
// 删除参会人
delParticipants(event) {
let userId = event.target.dataset.userId
const participatorList = { ...this.$store.data.participatorList }
const showParticipatorList = [...this.$store.data.showParticipatorList]
let participatorList = {}
let showParticipatorList = []
if (this.data.scheduleItem) {
participatorList = { ...this.data.contactPeople }
showParticipatorList = [...this.data.showContactPeople]
} else {
participatorList = { ...this.$store.data.participatorList }
showParticipatorList = [...this.$store.data.showParticipatorList]
}
delete participatorList[userId]
for (let i = 0; i < showParticipatorList.length; i++) {
if (showParticipatorList[i].userId === userId) {
showParticipatorList.splice(i, 1)
}
}
this.$store.data.participatorList = participatorList
this.$store.data.showParticipatorList = showParticipatorList
this.update()
if (this.data.scheduleItem) {
this.setData({
contactPeople: participatorList,
showContactPeople: showParticipatorList
})
this.$store.data.updateInfo = {
updateType: 'operate_user',
isUpate: true
}
} else {
this.$store.data.participatorList = participatorList
this.$store.data.showParticipatorList = showParticipatorList
this.update()
}
this.getParticipatorLength()
},
// // 编辑时候的保存
// editSave() {
// if (JSON.stringify(this.$store.data.originUsers) != JSON.stringify(this.store.data.contactPeople)) {
// this.$store.data.updateInfo.isUpate = true
// 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()
// }
// dd.navigateBack({
// delta: 1
// })
// },
// // 保存信息
// saveInfo() {
// this.editSave()
// },
// 保存信息
saveInfo() {
this.$store.data.participatorList = this.data.contactPeople
this.$store.data.showParticipatorList = this.data.showContactPeople
this.update()
this.$store.data.updateInfo = {
updateType: 'operate_user',
isUpate: true
}
this.update()
dd.navigateBack({
delta: 1
})
},
// 获取参会人长度
getParticipatorLength() {
const length = this.$store.data.showParticipatorList.length
let length = 0
if (this.data.scheduleItem) {
length = this.data.showContactPeople.length
} else {
length = this.$store.data.showParticipatorList.length
}
dd.setNavigationBar({
title: `参会人(${length}人)`
})
},
// 重置参会人
// reset() {
// this.store.data.contactPeople = []
// this.store.data.contactPeopleId = []
// this.update()
// },
});
});
\ No newline at end of file
class Store {
data = {
contactPeople: [],
contactPeopleId: []
// contactPeople: [],
// contactPeopleId: []
}
}
export default new Store()
\ No newline at end of file
......@@ -33,7 +33,6 @@ create.Page({
},
},
onLoad(e) {
debugger
if (e.scheduleItem) {
e.scheduleItem = decodeURIComponent(e.scheduleItem)
this.setData({
......
......@@ -78,7 +78,7 @@
</view>
<view>{{item.hasDateLabel}}</view>
</view>
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" onTap="nextDetail">
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance == 0 ? 'cancel' : ''}}" data-item="{{item.value}}" onTap="nextDetail">
<view class="scheduleTitle">
<text>{{item.value.title}}{{item.value.isDaySpan ? `(第${item.value.isFewDays}天,共${item.value.duration}天)` : '' }}</text>
</view>
......
......@@ -293,7 +293,7 @@ export function selectPeople(select, require) {
// 可选中去掉必选人
export function selectedelRequired(select, require) {
return select.filter(it => {
return !require.includes(it.userId)
return !require.includes(it)
})
}
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