Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
schedule
Commits
8408b1db
Commit
8408b1db
authored
Mar 31, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: canhuiren
parent
6623a631
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
416 additions
and
109 deletions
+416
-109
http.js
api/http.js
+1
-1
centerPopup.axml
components/centerPopup/centerPopup.axml
+1
-1
centerPopup.js
components/centerPopup/centerPopup.js
+10
-4
list.axml
components/list/list.axml
+0
-1
list.js
components/list/list.js
+1
-1
createMeeting.acss
pages/createMeeting/createMeeting.acss
+5
-0
createMeeting.axml
pages/createMeeting/createMeeting.axml
+1
-1
createMeeting.js
pages/createMeeting/createMeeting.js
+11
-3
editMeeting.acss
pages/editMeeting/editMeeting.acss
+44
-30
editMeeting.axml
pages/editMeeting/editMeeting.axml
+28
-26
editMeeting.js
pages/editMeeting/editMeeting.js
+0
-0
editMeeting.json
pages/editMeeting/editMeeting.json
+2
-0
participantsDetail.acss
pages/participantsDetail/participantsDetail.acss
+1
-1
participantsDetail.axml
pages/participantsDetail/participantsDetail.axml
+5
-1
participantsDetail.js
pages/participantsDetail/participantsDetail.js
+133
-14
participantsDetail.json
pages/participantsDetail/participantsDetail.json
+4
-0
place.axml
pages/place/place.axml
+3
-0
place.js
pages/place/place.js
+138
-21
place.json
pages/place/place.json
+1
-0
exampleStore.js
stores/exampleStore.js
+3
-2
index.axml
template/deleteBtn/index.axml
+3
-2
observer.js
utils/observer.js
+21
-0
No files found.
api/http.js
View file @
8408b1db
...
...
@@ -41,7 +41,7 @@ export default function http(data) {
resolve
(
res
)
},
fail
:
function
(
res
)
{
console
.
log
(
res
)
rejects
(
res
)
}
})
})
...
...
components/centerPopup/centerPopup.axml
View file @
8408b1db
<view class="popupWindow" a:if="{{centerPopup}}">
<view class="popupWindowCenter">
<view class="list" a:for="{{
popupWindow
List}}" onTap="selectSend" data-item="{{item}}">
<view class="list" a:for="{{
centerPopup
List}}" onTap="selectSend" data-item="{{item}}">
{{item.text}}
</view>
</view>
...
...
components/centerPopup/centerPopup.js
View file @
8408b1db
...
...
@@ -2,8 +2,14 @@ Component({
mixins
:
[],
data
:
{},
props
:
{},
didMount
()
{},
didUpdate
()
{},
didUnmount
()
{},
methods
:
{},
didMount
()
{
console
.
log
(
this
.
props
.
centerPopupList
)
},
didUpdate
()
{
},
didUnmount
()
{
},
methods
:
{
selectSend
(
event
)
{
this
.
props
.
onSelectSend
(
event
)
}
},
});
components/list/list.axml
View file @
8408b1db
{{comSelectList}}
<view class="com-list">
<view class="picker-complete" onTap='complete' a:if="{{complete}}" onTap='complete'>完成</view>
<view class=" com-list-item" catchTap="comSelectList" data-item="{{item}}" a:for="{{dataComList}}">
...
...
components/list/list.js
View file @
8408b1db
...
...
@@ -44,6 +44,7 @@ Component({
this
.
setData
({
comSelectList
:
[]
})
this
.
props
.
onCompelete
([])
}
else
if
(
!
this
.
props
.
multiple
)
{
this
.
setData
({
...
...
@@ -51,7 +52,6 @@ Component({
})
this
.
props
.
onComSelectList
(
event
)
}
console
.
log
(
this
.
data
.
comSelectList
)
},
complete
(
event
)
{
let
comSelectList
=
this
.
data
.
comSelectList
.
sort
((
a
,
b
)
=>
{
...
...
pages/createMeeting/createMeeting.acss
View file @
8408b1db
...
...
@@ -229,4 +229,8 @@ input {
.noValueIcon {
color: rgba(216, 216, 216, 1)!important;
}
.footNavTop .devider {
margin: 0!important;
}
\ No newline at end of file
pages/createMeeting/createMeeting.axml
View file @
8408b1db
...
...
@@ -12,7 +12,7 @@
</view>
<!-- roomId locationName 地点 -->
<view class="place">
<view class="iconicon_
room
1 iconfont icon " a:if="{{roomId}}">
<view class="iconicon_
Agreed
1 iconfont icon " a:if="{{roomId}}">
</view>
<view class="iconicon_location1 iconfont icon {{locationName ? '' : 'noValueIcon'}}" a:else>
</view>
...
...
pages/createMeeting/createMeeting.js
View file @
8408b1db
...
...
@@ -41,7 +41,7 @@ create.Page({
comType
:
''
,
remark
:
''
,
comTimeType
:
''
,
meetingWayModel
:
null
,
meetingWayModel
:
{
model
:
null
}
,
weekList
:
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
],
week
:
''
,
isAcrossDay
:
false
,
...
...
@@ -74,6 +74,10 @@ create.Page({
if
(
this
.
store
.
data
.
participatorList
.
length
>
1
)
{
this
.
conflictPeople
()
}
setTimeout
(()
=>
{
this
.
update
()
},
100
)
},
// 添加描述
addRemark
()
{
...
...
@@ -210,6 +214,7 @@ create.Page({
repeatable
:
event
.
currentTarget
.
dataset
.
item
.
repeatable
,
recurrenceModel
:
event
.
currentTarget
.
dataset
.
item
.
recurrenceModel
})
this
.
conflictPeople
()
break
;
}
},
...
...
@@ -274,7 +279,6 @@ create.Page({
_that
.
store
.
data
.
participatorUserId
=
participatorUserId
_that
.
update
()
_that
.
conflictPeople
()
},
fail
:
function
(
err
)
{
}
...
...
@@ -364,6 +368,7 @@ create.Page({
isAcrossDay
:
isAcrossDay
})
},
// 会议冲突
conflictPeople
()
{
let
userIds
=
[]
for
(
let
value
of
this
.
store
.
data
.
participatorList
)
{
...
...
@@ -377,7 +382,10 @@ create.Page({
getUserScheduleInTime
(
data
).
then
(
res
=>
{
let
conflictPeople
=
[]
for
(
let
value
in
res
.
data
.
data
)
{
if
(
res
.
data
.
data
[
value
].
length
>
0
)
{
const
arr
=
res
.
data
.
data
[
value
].
filter
(
function
(
item
)
{
return
item
.
confirmAttendance
===
1
})
if
(
arr
.
length
>
0
)
{
conflictPeople
.
push
(
value
)
}
}
...
...
pages/editMeeting/editMeeting.acss
View file @
8408b1db
@import "../../assests/font/iconfont.acss";
@import "../../template/deleteBtn/index.acss";
page {
background: #fff;
font-family: PingFangSC-Regular;
...
...
@@ -43,6 +44,8 @@ page {
input {
caret-color: #3070F2;
padding-left: 0;
height: 52rpx;
line-height: 52rpx;
}
.createTitle {
...
...
@@ -72,7 +75,8 @@ input {
padding-left: 0;
width: 100%;
opacity: 0.72;
font-size: 14px;
font-size: 28rpx;
color: rgba(3, 3, 3, 1)
}
.placeholder {
...
...
@@ -231,21 +235,12 @@ input {
color: #BBBEC5;
}
.delMetting {
display: flex;
background: #FFFFFF;
border: 1rpx solid #DEDEDE;
border-radius: 48px;
height: 64rpx;
line-height: 64rpx;
color: #F25643;
justify-content: center;
width: 256rpx;
.editeMeeting .delete-task-wrap {
margin: 74rpx auto 32rpx;
}
.del
Metting>.iconfont
{
margin-right: 18rpx
;
.del
ete-task
{
color: #EA0C28!important
;
}
.footNav {
...
...
@@ -259,14 +254,15 @@ input {
.originStaus, .participateStatus, .noParticipateStatus {
display: flex;
line-height: 9
2
rpx;
line-height: 9
6
rpx;
font-family: PingFangSC-Medium;
font-size: 28rpx;
align-items: center;
}
.originStaus>view, .participateStatus>view {
height: 9
2
rpx;
line-height: 9
2
rpx;
height: 9
6
rpx;
line-height: 9
6
rpx;
width: 49%;
text-align: center;
}
...
...
@@ -277,10 +273,6 @@ input {
vertical-align: middle;
}
.line {
color: #E3E4E4;
}
.participateStatus .remind {
width: 580rpx;
}
...
...
@@ -340,21 +332,42 @@ input {
margin-right: 10rpx;
}
.footNavBottom {
border-top: 1rpx solid rgba(25, 31, 37, 0.12);
display: flex;
flex-direction: row-reverse;
height: 96rpx;
line-height: 96rpx;
.footerBottom {
background: #fff;
color: #1B263D;
border-top: 2rpx solid rgba(25, 31, 37, 0.12);
height: 94rpx;
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
}
.footNavBottom>.iconfont {
margin-right: 70rpx;
font-size: 40rpx;
.footerBottom>view {
width: 35rpx;
margin: 0 38rpx;
font-size: 16rpx;
text-align: center;
}
.footerBottom>view>.iconfont {
font-size: 36rpx;
}
.footerBottom>view:last-child {
margin: 0 24rpx 0 0;
}
.devider {
background: rgba(227, 228, 228, 1);
height: 48rpx;
width: 1rpx;
margin: 0 28rpx;
}
.noValueIcon {
color: rgba(216, 216, 216, 1)!important;
}
.footNavTop .devider {
margin: 0;
}
\ No newline at end of file
pages/editMeeting/editMeeting.axml
View file @
8408b1db
<import src="../../template/deleteBtn/index.axml"/>
<view class="hideDetail" a:if="{{false}}">
<view class="hideTitle">
设计分享会
...
...
@@ -12,12 +13,12 @@
<!-- title remark 标题 描述 -->
<view class="createTitle">
<view class="title">
<input placeholder-class="placeholder" placeholder="请输入主题" class="text" onInput="onInput" data-type="title" data-selectType="common" value="{{title}}" onConfirm="on
Blur"
/>
<input placeholder-class="placeholder" placeholder="请输入主题" class="text" onInput="onInput" data-type="title" data-selectType="common" value="{{title}}" onConfirm="on
Confirm"
/>
<view class="icon iconfont iconicon_description1 {{remark ? '' : 'noValueIcon'}}" onTap="addRemark">
</view>
</view>
<view class="remark" a:if="{{isShowRemark}}">
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" onConfirm="on
Blur"
/>
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" onConfirm="on
Confirm"
/>
</view>
</view>
<!-- roomId locationName 地点 -->
...
...
@@ -45,11 +46,10 @@
<view>
<view class="timeText" catchTap="showPopup" data-type='time'>
<text a:if="{{isAcrossDay}}">
{{`${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${startTime.substring(11, 16)}`}}
- {{`${endTime.substring(5, 7)}月${endTime.substring(8, 10)}日 ${endTime.substring(11, 16)}`}}
{{`${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${startTime.substring(11, 16)}`}}-{{`${endTime.substring(5, 7)}月${endTime.substring(8, 10)}日 ${endTime.substring(11, 16)}`}}
</text>
<text a:else>
{{`${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${week} ${startTime.substring(11, 16)}-
${endTime.substring(11, 16)}`}}
{{`${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${week} ${startTime.substring(11, 16)}-${endTime.substring(11, 16)}`}}
</text>
<!-- 3月1日 周日 14:00-16:00 -->
</view>
...
...
@@ -114,13 +114,9 @@
</view>
</view>
<!-- 删除该会议 -->
<view class="delMetting" onTap="delSheudle">
<view class=" iconfont iconicon_close">
</view>
<view>
删除该会议
</view>
</view>
<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>
...
...
@@ -133,39 +129,44 @@
<view class="footNavTop">
<view class="originStaus" a:if="{{confirmAttendance === null}}">
<view catchTap="participate">
<text class="iconfont iconicon_
share
"></text>
<text class="iconfont iconicon_
Agreed1
"></text>
<text>参加</text></view>
<text class="
line">|
</text>
<text class="
devider">
</text>
<view catchTap="noParticipate">
<text class="iconfont iconicon_
share
"></text>
<text class="iconfont iconicon_
noAgreed1
"></text>
<text>不参加</text>
</view>
</view>
<view class="participateStatus" a:if="{{confirmAttendance === 1}}">
<view class="remind" catchTap="showPopup" data-type="aheadTime">
<text class="iconfont iconicon_
share
"></text>
<text class="iconfont iconicon_
time1
"></text>
<text class="remindTimeContaint" a:if="{{aheadTimes.length}}">
<text class="remindTime" a:for="{{comListData.aheadTimesList}}" a:if="{{aheadTimes.includes(item.id)}}">
{{item.text}}
</text>
</text>
<text class="noRemind" a:if="{{!aheadTimes.length}}">不提醒</text>
<text class="iconfont iconicon_share"></text></view>
<text class="line">|</text>
<view class="participate" catchTap="noParticipate">
<text class="iconfont iconicon_share"></text>
</view>
<text class="devider"></text>
<view class="participate" catchTap="noParticipate">
<text class="iconfont iconicon_Agreed1"></text>
<text>参加</text></view></view>
<view class="noParticipateStatus" a:if="{{confirmAttendance === 0}}" catchTap="participate">
<text class="iconfont iconicon_
share
"></text>
<text class="iconfont iconicon_
noAgreed1
"></text>
<text>不参加</text>
</view>
</view>
<view class="footNavBottom">
<view class="iconfont iconicon_data" onTap="uploadFile">
</view>
<view class="iconfont iconicon_task1">
</view>
<view class="footerBottom">
<view onTap="showPop" data-pop="{{title: '创建任务', type: 'createTask'}}">
<text class="iconfont iconicon_task1"></text>任务</view>
<view>
<text class="iconfont iconicon_data" onTap="uploadFile"></text>文件</view>
<text class="devider"></text>
<view>
<text class="iconfont iconicon_share1"></text></view>
</view>
</view>
<toast showToast="{{conToastData.showToast}}" onToastHidden="onToastHidden"></toast>
<centerpopup centerPopup="{{centerPopup.showCenterPopup}}" centerPopupList="{{centerPopup.centerPopupList}}" onSelectSend="onSelectSend"></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>
\ No newline at end of file
pages/editMeeting/editMeeting.js
View file @
8408b1db
This diff is collapsed.
Click to expand it.
pages/editMeeting/editMeeting.json
View file @
8408b1db
...
...
@@ -5,6 +5,7 @@
"hlist"
:
"../../components/hList/hList"
,
"toast"
:
"../../components/toast/toast"
,
"selectpopup"
:
"../../components/selectPopup/selectPopup"
,
"centerpopup"
:
"../../components/centerPopup/centerPopup"
,
"meeting-time-picker"
:
"../../components/meetingTimePicker/meetingTimePicker"
}
}
\ No newline at end of file
pages/participantsDetail/participantsDetail.acss
View file @
8408b1db
...
...
@@ -7,7 +7,7 @@ page {
padding-bottom: 128rpx;
}
.
l
ist {
.
peopleL
ist {
background: #fff;
height: 112rpx;
line-height: 112rpx;
...
...
pages/participantsDetail/participantsDetail.axml
View file @
8408b1db
<view>
<view class="
l
ist" a:for="{{participatorList}}" a:for-item="item">
<view class="
peopleL
ist" a:for="{{participatorList}}" 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>
...
...
@@ -17,4 +17,7 @@
<popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<hlist dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
</popup>
<toast showToast="{{conToastData.showToast}}" title="{{conToastData.title}}" onToastHidden="onToastHidden"></toast>
<centerpopup centerPopup="{{centerPopup.showCenterPopup}}" centerPopupList="{{centerPopup.centerPopupList}}" onSelectSend="onSelectSend"></centerpopup>
<selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.editSaveList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
</view>
\ No newline at end of file
pages/participantsDetail/participantsDetail.js
View file @
8408b1db
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
addSchedule
,
getUserScheduleInTime
,
getHomeUserSchedule
}
from
'../../api/request.js'
import
{
modifySchedule
,
addSchedule
,
getUserScheduleInTime
,
getHomeUserSchedule
}
from
'../../api/request.js'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
...
...
@@ -14,7 +14,29 @@ create.Page({
{
id
:
1
,
text
:
'手动添加邮箱'
,
imageUrl
:
'../../assests/emailContact.png'
}
]
},
popupShow
:
false
popupShow
:
false
,
// 传递给组件selectPopup 的数据
conSelectPopupData
:
{
selectPopupId
:
''
,
showSelectPopup
:
false
,
selectType
:
'common'
,
editSaveList
:
[{
text
:
'仅保存此会议'
,
id
:
'only'
},
{
text
:
'保存此次及以后会议'
,
id
:
'future'
}]
},
// 传递给组件centerPopup 的数据
centerPopup
:
{
showCenterPopup
:
false
,
centerPopupList
:
[
{
id
:
0
,
text
:
'不发送通知'
},
{
id
:
1
,
text
:
'发送通知'
},
{
id
:
-
1
,
text
:
'取消编辑'
}
],
centerPopupId
:
''
},
// 传递给组件toast的所有数据
conToastData
:
{
showToast
:
false
,
title
:
'保存成功'
},
},
onLoad
(
event
)
{
if
(
event
.
scheduleItem
)
{
...
...
@@ -64,6 +86,12 @@ create.Page({
delta
:
1
})
},
// toast 消失之后的回调
onToastHidden
()
{
this
.
setData
({
'conToastData.showToast'
:
false
})
},
// 添加参会人
addParticipator
()
{
const
_that
=
this
...
...
@@ -116,21 +144,106 @@ create.Page({
_that
.
store
.
data
.
participatorList
=
participatorList
_that
.
store
.
data
.
participatorUserId
=
participatorUserId
_that
.
update
()
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
)
_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
if
(
!!
_that
.
data
.
scheduleItem
)
{
if
(
_that
.
store
.
data
.
originalData
.
repeatable
)
{
_that
.
setData
({
'conSelectPopupData.showSelectPopup'
:
true
})
}
else
{
let
addUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
addUserList
let
deleteUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
deleteUserList
let
dataUser
=
{
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
modifyModel
:
'only'
,
modifyContent
:
'operate_user'
}
_that
.
modifySchedule
(
dataUser
)
}
}
},
fail
:
function
(
err
)
{
}
})
},
// 选择弹窗
onSelectPopup
(
event
)
{
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
false
,
'conSelectPopupData.selectPopupId'
:
event
.
currentTarget
.
dataset
.
item
.
id
,
'centerPopup.showCenterPopup'
:
true
})
},
// 选择发不发通知
onSelectSend
(
event
)
{
this
.
setData
({
'centerPopup.showCenterPopup'
:
false
})
if
(
event
.
currentTarget
.
dataset
.
item
.
id
>
-
1
)
{
let
addUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
addUserList
let
deleteUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
deleteUserList
let
dataUser
=
{
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
modifyModel
:
'only'
,
modifyContent
:
'operate_user'
}
this
.
modifySchedule
(
dataUser
,
event
.
currentTarget
.
dataset
.
item
.
id
)
}
else
{
this
.
operateUserE
(
false
)
}
},
// 参会人修改成功
operateUserS
()
{
this
.
store
.
data
.
originUsers
=
this
.
store
.
data
.
participator
this
.
store
.
data
.
originUsersId
=
this
.
store
.
data
.
participatorUserId
this
.
update
()
},
// 参会人修改失败
operateUserE
()
{
this
.
store
.
data
.
participatorList
=
this
.
store
.
data
.
originUsers
this
.
store
.
data
.
participatorUserId
=
this
.
store
.
data
.
originUsersId
this
.
update
()
},
// onSelectPopupCancel 点击取消
onSelectPopupCancel
()
{
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
false
,
'centerPopup.showCenterPopup'
:
false
})
this
.
operateUserE
(
false
)
},
// 保存编辑
modifySchedule
(
data
,
needNotice
=
0
)
{
let
obj
=
{
needNotice
:
needNotice
,
scheduleId
:
this
.
data
.
scheduleItem
.
id
,
templateId
:
this
.
data
.
scheduleItem
.
scheduleTemplateId
,
planDate
:
this
.
data
.
scheduleItem
.
planDate
}
return
new
Promise
((
resolve
,
rejects
)
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'保存成功'
})
this
.
operateUserS
()
if
(
this
.
store
.
data
.
originalData
.
repeatable
===
1
)
{
observer
.
notice
(
res
.
data
.
data
)
}
return
resolve
(
res
)
}
else
{
this
.
operateUserE
()
return
rejects
(
res
)
}
}).
catch
(
err
=>
{
this
.
operateUserE
()
return
rejects
(
err
)
})
})
},
// 数组取差值 原先的数组与现在的比较 增加与减少
arrayPoor
(
origin
,
now
)
{
let
originMap
=
new
Map
()
...
...
@@ -153,10 +266,10 @@ create.Page({
del
.
push
(
x
)
}
}
this
.
setData
(
{
return
{
addUserList
:
add
,
deleteUserList
:
del
}
)
}
},
// 删除参会人
delParticipants
(
event
)
{
...
...
@@ -204,11 +317,17 @@ create.Page({
let
conflictPeople
=
[]
for
(
let
value
in
res
.
data
.
data
)
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
res
.
data
.
data
[
value
].
length
>
1
)
{
const
arr
=
res
.
data
.
data
[
value
].
filter
(
function
(
item
)
{
return
item
.
confirmAttendance
===
1
})
if
(
arr
.
length
>
1
)
{
conflictPeople
.
push
(
value
)
}
}
else
{
if
(
res
.
data
.
data
[
value
].
length
>
0
)
{
const
arr
=
res
.
data
.
data
[
value
].
filter
(
function
(
item
)
{
return
item
.
confirmAttendance
===
1
})
if
(
arr
.
length
>
0
)
{
conflictPeople
.
push
(
value
)
}
}
...
...
pages/participantsDetail/participantsDetail.json
View file @
8408b1db
...
...
@@ -3,6 +3,9 @@
"popup"
:
"../../components/popup/index"
,
"list"
:
"../../components/list/list"
,
"hlist"
:
"../../components/hList/hList"
,
"toast"
:
"../../components/toast/toast"
,
"selectpopup"
:
"../../components/selectPopup/selectPopup"
,
"centerpopup"
:
"../../components/centerPopup/centerPopup"
,
"meeting-time-picker"
:
"../../components/meetingTimePicker/meetingTimePicker"
}
}
\ No newline at end of file
pages/place/place.axml
View file @
8408b1db
...
...
@@ -44,6 +44,8 @@
<view class="allMettingRoom" a:if="{{true}}" onTap="toRoomList">
查看所有会议室
</view>
<toast showToast="{{conToastData.showToast}}" title="{{conToastData.title}}" onToastHidden="onToastHidden"></toast>
<centerpopup centerPopup="{{centerPopup.showCenterPopup}}" centerPopupList="{{centerPopup.centerPopupList}}" onSelectSend="onSelectSend"></centerpopup>
<selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.editSaveList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
</view>
</view>
\ No newline at end of file
pages/place/place.js
View file @
8408b1db
...
...
@@ -2,6 +2,7 @@ import create from 'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
queryAvailableMeetingRoomByTime
,
modifySchedule
}
from
'./../../api/request'
import
{
throttle
}
from
'./../../utils/utils.js'
import
{
observer
}
from
'/utils/observer.js'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
...
...
@@ -12,13 +13,38 @@ create.Page({
repeatable
:
0
,
// 传递给组件selectPopup 的数据
conSelectPopupData
:
{
selectPopupId
:
''
,
showSelectPopup
:
false
,
selectType
:
'common'
,
editSaveList
:
[{
text
:
'仅保存此会议'
,
id
:
'only'
},
{
text
:
'保存此次及以后会议'
,
id
:
'future'
}]
},
// 传递给组件centerPopup 的数据
centerPopup
:
{
showCenterPopup
:
false
,
centerPopupList
:
[
{
id
:
0
,
text
:
'不发送通知'
},
{
id
:
1
,
text
:
'发送通知'
},
{
id
:
-
1
,
text
:
'取消编辑'
}
],
centerPopupId
:
''
},
// 传递给组件toast的所有数据
conToastData
:
{
showToast
:
false
,
title
:
'保存成功'
},
},
onLoad
(
e
)
{
if
(
e
.
scheduleItem
)
{
const
_that
=
this
observer
.
register
({
notice
(
scheduleItem
)
{
_that
.
setData
({
'scheduleItem.scheduleTemplateId'
:
scheduleItem
})
console
.
log
(
scheduleItem
);
}
})
this
.
setData
({
repeatable
:
e
.
repeatable
,
scheduleItem
:
JSON
.
parse
(
e
.
scheduleItem
)
...
...
@@ -43,7 +69,7 @@ create.Page({
this
.
store
.
data
.
roomId
=
''
this
.
update
()
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
this
.
data
.
repeatable
)
{
if
(
this
.
data
.
repeatable
!=
0
)
{
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
true
})
...
...
@@ -58,6 +84,11 @@ create.Page({
modifyModel
:
'only'
,
modifyContent
:
'modify_location'
}
this
.
modifySchedule
(
data
,
0
).
then
(
res
=>
{
this
.
editLocationS
()
}).
catch
(
err
=>
{
this
.
editLocationE
()
})
}
}
else
{
dd
.
navigateBack
({
...
...
@@ -65,42 +96,128 @@ create.Page({
})
}
},
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
.
setData
({
'conSelectPopupData.showSelectPopup'
:
false
,
'conSelectPopupData.selectPopupId'
:
event
.
currentTarget
.
dataset
.
item
.
id
,
'centerPopup.showCenterPopup'
:
true
})
},
// 选择发不发通知
onSelectSend
(
event
)
{
this
.
setData
({
'centerPopup.showCenterPopup'
:
false
})
if
(
event
.
currentTarget
.
dataset
.
item
.
id
>
-
1
)
{
let
data
=
{
location
:
{
longitude
:
-
999
,
latitude
:
-
999
,
locationName
:
this
.
store
.
data
.
locationName
},
meetingRoomId
:
this
.
store
.
data
.
roomId
,
modifyModel
:
this
.
data
.
conSelectPopupData
.
selectPopupId
,
modifyContent
:
'modify_location'
}
this
.
modifySchedule
(
data
,
event
.
currentTarget
.
dataset
.
item
.
id
).
then
(
res
=>
{
this
.
editLocationS
()
}).
catch
(
err
=>
{
this
.
editLocationE
()
})
}
else
{
this
.
editLocationE
(
false
)
}
},
// 修改地点成功
editLocationS
()
{
this
.
store
.
data
.
originalData
.
location
.
locationName
=
this
.
store
.
data
.
locationName
this
.
store
.
data
.
originalData
.
meetingRoomId
=
this
.
store
.
data
.
roomId
this
.
update
()
dd
.
navigateBack
({
delta
:
1
})
},
// 修改地点失败
editLocationE
(
lock
=
true
)
{
this
.
store
.
data
.
locationName
=
this
.
store
.
data
.
originalData
.
location
.
locationName
this
.
store
.
data
.
roomId
=
this
.
store
.
data
.
originalData
.
meetingRoomId
this
.
update
()
if
(
lock
)
{
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'网络异常'
})
}
this
.
modifySchedule
(
data
)
},
// 保存编辑
modifySchedule
(
data
)
{
modifySchedule
(
data
,
needNotice
=
0
)
{
let
obj
=
{
needNotice
:
needNotice
,
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
({
delta
:
1
})
}
return
new
Promise
((
resolve
,
rejects
)
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'保存成功'
})
if
(
this
.
store
.
data
.
originalData
.
repeatable
===
1
)
{
observer
.
notice
(
res
.
data
.
data
)
}
return
resolve
(
res
)
}
else
{
return
rejects
(
res
)
}
}).
catch
(
err
=>
{
return
rejects
(
err
)
})
})
},
// onSelectPopupCancel 点击取消
onSelectPopupCancel
()
{
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
false
,
'centerPopup.showCenterPopup'
:
false
})
this
.
editLocationE
(
false
)
},
selectMeetingRoom
(
e
)
{
this
.
store
.
data
.
locationName
=
e
.
target
.
dataset
.
locationName
this
.
store
.
data
.
roomId
=
e
.
target
.
dataset
.
locationid
this
.
update
()
dd
.
navigateBack
({
delta
:
1
})
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
this
.
data
.
repeatable
!=
0
)
{
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'
}
this
.
modifySchedule
(
data
,
0
).
then
(
res
=>
{
this
.
editLocationS
()
}).
catch
(
err
=>
{
this
.
editLocationE
()
})
}
}
else
{
dd
.
navigateBack
({
delta
:
1
})
}
},
inputPlace
(
event
)
{
this
.
setData
({
...
...
pages/place/place.json
View file @
8408b1db
{
"usingComponents"
:
{
"popup"
:
"../../components/popup/index"
,
"centerpopup"
:
"../../components/centerPopup/centerPopup"
,
"list"
:
"../../components/list/list"
,
"hlist"
:
"../../components/hList/hList"
,
"toast"
:
"../../components/toast/toast"
,
...
...
stores/exampleStore.js
View file @
8408b1db
...
...
@@ -4,12 +4,12 @@ class Store {
locationName
:
''
,
participatorUserId
:
[],
// 参会人的userId
userList
:
[],
aheadTimes
:
[],
roomId
:
''
,
startTime
:
''
,
endTime
:
''
,
originUsers
:
[],
originUsersId
:
[]
originUsersId
:
[],
originalData
:
null
,
}
}
export
default
new
Store
()
\ No newline at end of file
template/deleteBtn/index.axml
View file @
8408b1db
<template name="deleteBtn">
<view class="delete-task-wrap">
<view class="delete-task" onTap="
handleDelet
e">
<view class="delete-task" onTap="
delSheudl
e">
<text class="iconfont iconicon_noAgreed1"></text>
{{title}}
{{title}}
</view>
</view>
</template>
\ No newline at end of file
utils/observer.js
0 → 100644
View file @
8408b1db
class
Observer
{
register
(
a
)
{
if
(
this
.
array
==
null
)
{
this
.
array
=
[];
}
this
.
array
.
push
(
a
);
}
unregister
()
{
this
.
array
=
[]
}
notice
(
b
)
{
for
(
let
x
of
this
.
array
)
{
x
.
notice
(
b
);
}
}
}
let
observer
=
new
Observer
()
export
default
{
observer
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment