Commit 119407a4 by fengzhaoyu

时间

parent 1b2b19c9
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
</view> </view>
<view a:if="{{!multiple}}" 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>
{{comSelectList}} {{id}}
<view a:if="{{multiple}}" class="iconfont iconicon_ok com-list-item-selectStaus {{comSelectList.includes(item.id) ? 'com-list-item-select' : ''}}"> <view a:if="{{multiple}}" class="iconfont iconicon_ok com-list-item-selectStaus {{comSelectList.includes(item.id) ? 'com-list-item-select' : ''}}">
</view> </view>
</view> </view>
......
...@@ -25,6 +25,11 @@ Component({ ...@@ -25,6 +25,11 @@ Component({
methods: { methods: {
comSelectList(event) { comSelectList(event) {
if (this.props.multiple && event.currentTarget.dataset.item.id != -1) { if (this.props.multiple && event.currentTarget.dataset.item.id != -1) {
if (this.data.comSelectList.includes(-1)) {
this.setData({
comSelectList: []
})
}
if (this.data.comSelectList.includes(event.target.dataset.item.id)) { if (this.data.comSelectList.includes(event.target.dataset.item.id)) {
this.data.comSelectList.forEach((item, index) => { this.data.comSelectList.forEach((item, index) => {
if (item == event.target.dataset.item.id) { if (item == event.target.dataset.item.id) {
......
<block a:if="{{getData}}"> <block a:if="{{getData}}">
<import src="../../template/deleteBtn/index.axml"/> <import src="../../template/deleteBtn/index.axml"/>
<view class="hideDetail" a:if="{{confirmAttendance === 1&&onload || organizer === currentPeople&&onload}}"> <view class="hideDetail" a:if="{{isExpand}}">
<view class="hideTitle"> <view class="hideTitle">
{{title}} {{title}}
</view> </view>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</view> </view>
</view> </view>
<!-- roomId locationName 地点 --> <!-- roomId locationName 地点 -->
<view class="permissionContant"> <view class="permissionContant" a:if="{{$data.locationName || currentPeople === organizer}}">
<view class="permission" a:if="{{currentPeople != organizer}}"> <view class="permission" a:if="{{currentPeople != organizer}}">
</view> </view>
<view class="place"> <view class="place">
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
</view> </view>
</view> </view>
<!-- meetingWay 会议方式 --> <!-- meetingWay 会议方式 -->
<view class="permissionContant"> <view class="permissionContant" a:if="{{comListData.meetingWayList[comListData.meetingWayModelId].text || currentPeople === organizer}}">
<!--<view class="iconicon_attender iconfont icon {{$data.participatorList.length>1 ? '' : 'noValueIcon'}}"></view> --> <!--<view class="iconicon_attender iconfont icon {{$data.participatorList.length>1 ? '' : 'noValueIcon'}}"></view> -->
<view class="meetingWay"> <view class="meetingWay">
<view class="iconicon_meet iconfont icon {{comListData.meetingWayModelId ? '' : 'noValueIcon'}}"> <view class="iconicon_meet iconfont icon {{comListData.meetingWayModelId ? '' : 'noValueIcon'}}">
...@@ -138,19 +138,11 @@ ...@@ -138,19 +138,11 @@
</view> </view>
<!-- 删除该会议 --> <!-- 删除该会议 -->
<template is="deleteBtn" onhandleDelete="" data="{{title: '删除该会议' }}"/> <template is="deleteBtn" onhandleDelete="" data="{{title: '删除该会议' }}"/>
<!--<view class="delMetting" onTap="delSheudle"><view class=" iconfont iconicon_close"></view><view>
删除该会议</view></view> -->
<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 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>
<!-- 底部导航栏 --> <!-- 底部导航栏 -->
<view class="footNav"> <view class="footNav">
<view class="footNavTop"> <view class="footNavTop">
<view class="originStaus" a:if="{{(currentPeople != organizer)&&confirmAttendance === null}}"> <view class="originStaus" a:if="{{confirmAttendance === null}}">
<view catchTap="participate"> <view catchTap="participate">
<text class="iconfont iconicon_Agreed1"></text> <text class="iconfont iconicon_Agreed1"></text>
<text>参加</text></view> <text>参加</text></view>
...@@ -227,6 +219,14 @@ ...@@ -227,6 +219,14 @@
<view onTap="addMeetingFile" class="affair-placeholder-button">添加会议文件</view> <view onTap="addMeetingFile" class="affair-placeholder-button">添加会议文件</view>
</view> </view>
</view> </view>
<!--<view class="delMetting" onTap="delSheudle"><view class=" iconfont iconicon_close"></view><view>
删除该会议</view></view> -->
<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 multiple="{{comListData.multiple}}" onCompelete="selectAheadtimes" comSelectList="{{comListData.aheadTimesListId}}" 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>
<popup show="{{show}}" onClose="closePop" title="{{pop.title}}"> <popup show="{{show}}" onClose="closePop" title="{{pop.title}}">
<!-- 任务创建弹出框 --> <!-- 任务创建弹出框 -->
<task-panel a:if="{{pop.type === 'createTask'}}" onComplete="complete" action='create'/> <task-panel a:if="{{pop.type === 'createTask'}}" onComplete="complete" action='create'/>
......
...@@ -45,7 +45,7 @@ create.Page({ ...@@ -45,7 +45,7 @@ create.Page({
], ],
multiple: false, multiple: false,
complete: false, complete: false,
aheadTimesListId: [-1], aheadTimesListId: [15],
comSelectListId: 0, comSelectListId: 0,
meetingWayModelId: null, meetingWayModelId: null,
iconType: 'icon' iconType: 'icon'
...@@ -104,7 +104,7 @@ create.Page({ ...@@ -104,7 +104,7 @@ create.Page({
currentPeople: '', currentPeople: '',
editType: '', editType: '',
confirmAttendance: null, confirmAttendance: null,
onload: false, isExpand: false,
c: false c: false
}, },
onShow() { onShow() {
...@@ -124,7 +124,6 @@ create.Page({ ...@@ -124,7 +124,6 @@ create.Page({
}) })
this.setData({ this.setData({
scheduleItem: JSON.parse(event.scheduleItem), scheduleItem: JSON.parse(event.scheduleItem),
onload: true,
currentPeople: getApp().globalData.userid currentPeople: getApp().globalData.userid
}) })
this.getDetail() this.getDetail()
...@@ -158,9 +157,9 @@ create.Page({ ...@@ -158,9 +157,9 @@ create.Page({
participatorUserId.push(value.participator.userId) participatorUserId.push(value.participator.userId)
originUsers.push(value.participator) originUsers.push(value.participator)
if (value.userId === getApp().globalData.userid) { if (value.userId === getApp().globalData.userid) {
debugger
this.setData({ this.setData({
aheadTimes: !!value.aheadList ? value.aheadList : [-1] aheadTimes: !!value.aheadList ? value.aheadList : [],
'comListData.aheadTimesListId': !!value.aheadList ? value.aheadList : [-1]
}) })
} }
} }
...@@ -180,6 +179,7 @@ create.Page({ ...@@ -180,6 +179,7 @@ create.Page({
recurrenceModel: res.data.data.repeatable ? { model: res.data.data.recurrenceModel.model, daysOfMonth: res.data.data.recurrenceModel.daysOfMonth, interval: 1, initialTime: res.data.data.recurrenceModel.initialTime, terminateTime: res.data.data.recurrenceModel.terminateTime, weekDayList: res.data.data.recurrenceModel.weekDayList } : { model: 'no_repeat' }, recurrenceModel: res.data.data.repeatable ? { model: res.data.data.recurrenceModel.model, daysOfMonth: res.data.data.recurrenceModel.daysOfMonth, interval: 1, initialTime: res.data.data.recurrenceModel.initialTime, terminateTime: res.data.data.recurrenceModel.terminateTime, weekDayList: res.data.data.recurrenceModel.weekDayList } : { model: 'no_repeat' },
title: res.data.data.title, title: res.data.data.title,
remark: res.data.data.remark, remark: res.data.data.remark,
isExpand: res.data.data.confirmAttendance === 1 ? true : false,
isShowRemark: res.data.data.remark ? true : false, isShowRemark: res.data.data.remark ? true : false,
week: this.data.weekList[new Date(res.data.data.startTime.replace(/'-'/g, "\/")).getDay()], week: this.data.weekList[new Date(res.data.data.startTime.replace(/'-'/g, "\/")).getDay()],
getData: true getData: true
...@@ -200,13 +200,10 @@ create.Page({ ...@@ -200,13 +200,10 @@ create.Page({
this.$store.data.originUsersId = participatorUserId this.$store.data.originUsersId = participatorUserId
this.update() this.update()
this.conflictPeople() this.conflictPeople()
this.store.data.scheduleId = res.data.data.id; this.store.data.scheduleId = res.data.data.id;
this.store.data.groupId = res.data.data.groupId; this.store.data.groupId = res.data.data.groupId;
this.update(); this.update();
this.reload(this.data.scheduleItem.id); this.reload(this.data.scheduleItem.id);
console.log(res.data.data)
} }
}) })
}, },
...@@ -324,28 +321,33 @@ create.Page({ ...@@ -324,28 +321,33 @@ create.Page({
popupShow: false popupShow: false
}) })
}, },
// 选择循环机制 选择会议方式 选择时间 出现popup弹窗 // 选择循环机制 选择会议方式 选择时间 会前提醒 出现popup弹窗
showPopup(event) { showPopup(event) {
let iconType = '' let iconType = ''
let complete = false let complete = false
let multiple = false let multiple = false
let popupTitle = ''
switch (event.currentTarget.dataset.type) { switch (event.currentTarget.dataset.type) {
case 'meetingWayModel': case 'meetingWayModel':
iconType = 'image', iconType = 'image',
complete = true complete = true,
popupTitle = '选择会议方式',
multiple = false multiple = false
break break
case 'repeat': case 'repeat':
iconType = 'icon', iconType = 'icon',
popupTitle = '会议重复',
complete = true, complete = true,
multiple = false multiple = false
break break
case 'participator': case 'participator':
popupTitle = '选择参会人'
break break
case 'time': case 'time':
popupTitle = '选择会议时间'
break break
case 'aheadTime': case 'aheadTime':
popupTitle = '选择会前提醒'
iconType = 'icon', iconType = 'icon',
complete = true, complete = true,
multiple = true multiple = true
...@@ -353,6 +355,7 @@ create.Page({ ...@@ -353,6 +355,7 @@ create.Page({
} }
this.setData({ this.setData({
popupShow: true, popupShow: true,
popupTitle: popupTitle,
comType: event.currentTarget.dataset.type, comType: event.currentTarget.dataset.type,
'comListData.complete': complete, 'comListData.complete': complete,
'comListData.iconType': iconType, 'comListData.iconType': iconType,
...@@ -520,7 +523,7 @@ create.Page({ ...@@ -520,7 +523,7 @@ create.Page({
} }
return Object.values(containt) return Object.values(containt)
}, },
// 点击完成 // 选择时间 点击完成
onComplete(event) { onComplete(event) {
this.$store.data.startTime = `${event.startTime}:00` this.$store.data.startTime = `${event.startTime}:00`
this.$store.data.endTime = `${event.endTime}:00` this.$store.data.endTime = `${event.endTime}:00`
...@@ -542,9 +545,12 @@ create.Page({ ...@@ -542,9 +545,12 @@ create.Page({
}, },
// 选择会前提醒时间 // 选择会前提醒时间
selectAheadtimes(event) { selectAheadtimes(event) {
console.log(event)
debugger
this.setData({ this.setData({
aheadTimes: event, aheadTimes: event,
popupShow: false popupShow: false,
'comListData.aheadTimesListId': event.length == 0 ? [-1] : event
}) })
if (this.data.repeatable) { if (this.data.repeatable) {
this.setData({ this.setData({
...@@ -573,7 +579,7 @@ create.Page({ ...@@ -573,7 +579,7 @@ create.Page({
'conToastData.showToast': true, 'conToastData.showToast': true,
'conToastData.title': '保存成功' 'conToastData.title': '保存成功'
}) })
if (this.$store.data.originalData.repeatable === 1) { if (this.$store.data.originalData.repeatable === 1 && !!res.data.data) {
observer.notice(res.data.data) observer.notice(res.data.data)
} }
return resolve(res) return resolve(res)
...@@ -1399,7 +1405,7 @@ create.Page({ ...@@ -1399,7 +1405,7 @@ create.Page({
// //
expand() { expand() {
this.setData({ this.setData({
onload: false isExpand: false
}) })
} }
}); });
......
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