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
e4f35b89
Commit
e4f35b89
authored
5 years ago
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改权限
parent
11695de0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
151 additions
and
162 deletions
+151
-162
createMeeting.axml
pages/createMeeting/createMeeting.axml
+12
-12
createMeeting.js
pages/createMeeting/createMeeting.js
+34
-36
meetingDetail.axml
pages/meetingDetail/meetingDetail.axml
+3
-3
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+5
-4
outLookContact.axml
pages/outLookContact/outLookContact.axml
+1
-1
outLookContact.js
pages/outLookContact/outLookContact.js
+22
-24
participantsDetail.axml
pages/participantsDetail/participantsDetail.axml
+2
-2
participantsDetail.js
pages/participantsDetail/participantsDetail.js
+54
-40
place.js
pages/place/place.js
+18
-20
exampleStore.js
stores/exampleStore.js
+0
-20
No files found.
pages/createMeeting/createMeeting.axml
View file @
e4f35b89
...
@@ -10,20 +10,20 @@
...
@@ -10,20 +10,20 @@
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" />
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" />
</view>
</view>
</view>
</view>
<!-- roomId locationName 地点 -->
<!--
$data.$data.
roomId locationName 地点 -->
<view class="place">
<view class="place">
<view class="iconicon_
Agreed1 iconfont icon " a:if="{{
roomId}}">
<view class="iconicon_
room1 iconfont icon " a:if="{{$data.
roomId}}">
</view>
</view>
<view class="iconicon_location1 iconfont icon {{locationName ? '' : 'noValueIcon'}}" a:else>
<view class="iconicon_location1 iconfont icon {{
$data.
locationName ? '' : 'noValueIcon'}}" a:else>
</view>
</view>
<view class="placeContaint">
<view class="placeContaint">
<view class="noPlace" a:if="{{!locationName}}" onTap="nextPage" data-nextPage="location">
<view class="noPlace" a:if="{{!
$data.
locationName}}" onTap="nextPage" data-nextPage="location">
添加地点
添加地点
</view>
</view>
<view class="hasplace" onTap="nextPage" data-nextPage="location" a:else>
<view class="hasplace" onTap="nextPage" data-nextPage="location" a:else>
{{locationName}}
{{
$data.
locationName}}
</view>
</view>
<view class=" icon iconfont iconicon_close close" a:if="{{!!locationName}}" data-close="location" catchTap="close">
<view class=" icon iconfont iconicon_close close" a:if="{{!!
$data.
locationName}}" data-close="location" catchTap="close">
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
<view>
<view>
<view class="timeText" catchTap="showPopup" data-type='time'>
<view class="timeText" catchTap="showPopup" data-type='time'>
<text a:if="{{isAcrossDay}}">
<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)}`}}
{{`${
$data.startTime.substring(5, 7)}月${$data.startTime.substring(8, 10)}日 ${$data.startTime.substring(11, 16)}`}} - {{`${$data.endTime.substring(5, 7)}月${$data.endTime.substring(8, 10)}日 ${$data.
endTime.substring(11, 16)}`}}
</text>
</text>
<text a:else>
<text a:else>
{{`${
startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${week} ${startTime.substring(11, 16)}- ${
endTime.substring(11, 16)}`}}
{{`${
$data.startTime.substring(5, 7)}月${$data.startTime.substring(8, 10)}日 ${week} ${$data.startTime.substring(11, 16)}- ${$data.
endTime.substring(11, 16)}`}}
</text>
</text>
<!-- 3月1日 周日 14:00-16:00 -->
<!-- 3月1日 周日 14:00-16:00 -->
</view>
</view>
...
@@ -52,17 +52,17 @@
...
@@ -52,17 +52,17 @@
</view>
</view>
<!-- participatorList participatorUserId 参会人 -->
<!-- participatorList participatorUserId 参会人 -->
<view class="participator">
<view class="participator">
<view class="iconicon_attender iconfont icon {{participatorList.length>1 ? '' : 'noValueIcon'}}">
<view class="iconicon_attender iconfont icon {{
$data.
participatorList.length>1 ? '' : 'noValueIcon'}}">
</view>
</view>
<view class="participatorContaint">
<view class="participatorContaint">
<view class="participatorText" a:if="{{participatorList.length < 2}}" catchTap="showPopup" data-type='participator'>
<view class="participatorText" a:if="{{
$data.
participatorList.length < 2}}" catchTap="showPopup" data-type='participator'>
添加参会人
添加参会人
</view>
</view>
<view class="participatorList" a:else>
<view class="participatorList" a:else>
<view class="participatorListTop">
<view class="participatorListTop">
<view class="participatorText">
<view class="participatorText">
<view>
<view>
{{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}}人会议安排冲突
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
<view class="iconicon_open iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
<view class="iconicon_open iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
</view>
</view>
<view class="participatorListBottom">
<view class="participatorListBottom">
<view class="people" a:for="{{
participatorList.length > 10 ? [...participatorList].splice(0, 11) :
participatorList}}">
<view class="people" a:for="{{
$data.participatorList.length > 10 ? [...$data.participatorList].splice(0, 11) : $data.
participatorList}}">
<view class="headUrl">
<view class="headUrl">
<image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" />
<image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" />
<text
<text
...
...
This diff is collapsed.
Click to expand it.
pages/createMeeting/createMeeting.js
View file @
e4f35b89
import
{
addSchedule
,
getUserScheduleInTime
}
from
'../../api/request.js'
import
{
addSchedule
,
getUserScheduleInTime
}
from
'../../api/request.js'
import
{
throttle
}
from
'./../../utils/utils.js'
import
{
throttle
}
from
'./../../utils/utils.js'
import
create
from
'dd-store'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
create
.
Page
({
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
data
:
{
$data
:
null
,
// 传给组件list 的所有数据 comListData
// 传给组件list 的所有数据 comListData
comListData
:
{
comListData
:
{
repeatList
:
[
repeatList
:
[
...
@@ -71,7 +69,7 @@ create.Page({
...
@@ -71,7 +69,7 @@ create.Page({
this
.
reset
()
this
.
reset
()
},
},
onShow
()
{
onShow
()
{
if
(
this
.
store
.
data
.
participatorList
.
length
>
1
)
{
if
(
this
.
$
store
.
data
.
participatorList
.
length
>
1
)
{
this
.
conflictPeople
()
this
.
conflictPeople
()
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -104,17 +102,17 @@ create.Page({
...
@@ -104,17 +102,17 @@ create.Page({
},
},
// 初始化
// 初始化
reset
()
{
reset
()
{
this
.
store
.
data
.
roomId
=
''
this
.
$
store
.
data
.
roomId
=
''
this
.
store
.
data
.
participatorList
=
[]
this
.
$
store
.
data
.
participatorList
=
[]
this
.
store
.
data
.
participatorUserId
=
[]
this
.
$
store
.
data
.
participatorUserId
=
[]
this
.
store
.
data
.
originUsers
=
[]
this
.
$
store
.
data
.
originUsers
=
[]
this
.
store
.
data
.
originUsersId
=
[]
this
.
$
store
.
data
.
originUsersId
=
[]
this
.
store
.
data
.
locationName
=
''
this
.
$
store
.
data
.
locationName
=
''
this
.
store
.
data
.
startTime
=
this
.
getTimes
()
this
.
$
store
.
data
.
startTime
=
this
.
getTimes
()
this
.
store
.
data
.
endTime
=
this
.
getTimes
(
new
Date
(
this
.
getTimes
()).
setMinutes
(
new
Date
(
this
.
store
.
data
.
startTime
).
getMinutes
()
+
30
))
this
.
$store
.
data
.
endTime
=
this
.
getTimes
(
new
Date
(
this
.
getTimes
()).
setMinutes
(
new
Date
(
this
.
$
store
.
data
.
startTime
).
getMinutes
()
+
30
))
this
.
update
()
this
.
update
()
this
.
resetRepeatList
()
this
.
resetRepeatList
()
this
.
acrossDay
(
this
.
store
.
data
.
startTime
,
this
.
store
.
data
.
endTime
)
this
.
acrossDay
(
this
.
$store
.
data
.
startTime
,
this
.
$
store
.
data
.
endTime
)
},
},
// 跳转下一页
// 跳转下一页
nextPage
(
event
)
{
nextPage
(
event
)
{
...
@@ -131,8 +129,8 @@ create.Page({
...
@@ -131,8 +129,8 @@ create.Page({
close
(
event
)
{
close
(
event
)
{
switch
(
event
.
target
.
dataset
.
close
)
{
switch
(
event
.
target
.
dataset
.
close
)
{
case
'location'
:
case
'location'
:
this
.
store
.
data
.
locationName
=
''
this
.
$
store
.
data
.
locationName
=
''
this
.
store
.
data
.
roomId
=
''
this
.
$
store
.
data
.
roomId
=
''
this
.
update
()
this
.
update
()
break
break
case
'meetingWayModel'
:
case
'meetingWayModel'
:
...
@@ -180,12 +178,12 @@ create.Page({
...
@@ -180,12 +178,12 @@ create.Page({
let
repeatList
=
[]
let
repeatList
=
[]
for
(
let
value
of
this
.
data
.
comListData
.
repeatList
)
{
for
(
let
value
of
this
.
data
.
comListData
.
repeatList
)
{
if
(
index
)
{
if
(
index
)
{
value
.
recurrenceModel
.
initialTime
=
this
.
store
.
data
.
startTime
.
replace
(
/
\/
/g
,
"-"
).
substring
(
0
,
10
)
value
.
recurrenceModel
.
initialTime
=
this
.
$
store
.
data
.
startTime
.
replace
(
/
\/
/g
,
"-"
).
substring
(
0
,
10
)
value
.
recurrenceModel
.
terminateTime
=
this
.
getTwoYearToday
(
this
.
store
.
data
.
startTime
)
value
.
recurrenceModel
.
terminateTime
=
this
.
getTwoYearToday
(
this
.
$
store
.
data
.
startTime
)
if
(
index
===
2
)
{
if
(
index
===
2
)
{
value
.
recurrenceModel
.
weekDayList
=
[
this
.
data
.
repeatWeek
[
new
Date
().
getDay
()]]
value
.
recurrenceModel
.
weekDayList
=
[
this
.
data
.
repeatWeek
[
new
Date
().
getDay
()]]
}
else
if
(
index
===
4
)
{
}
else
if
(
index
===
4
)
{
value
.
recurrenceModel
.
daysOfMonth
=
[
this
.
store
.
data
.
startTime
.
replace
(
/
\/
/g
,
"-"
).
substring
(
8
,
10
)]
value
.
recurrenceModel
.
daysOfMonth
=
[
this
.
$
store
.
data
.
startTime
.
replace
(
/
\/
/g
,
"-"
).
substring
(
8
,
10
)]
}
}
}
}
repeatList
.
push
(
value
)
repeatList
.
push
(
value
)
...
@@ -251,12 +249,12 @@ create.Page({
...
@@ -251,12 +249,12 @@ create.Page({
let
require
=
[]
let
require
=
[]
let
select
=
[]
let
select
=
[]
let
outLookConcat
=
[]
let
outLookConcat
=
[]
for
(
let
participator
of
_that
.
store
.
data
.
participatorList
)
{
for
(
let
participator
of
_that
.
$
store
.
data
.
participatorList
)
{
if
(
participator
.
platform
===
'outlook'
)
{
if
(
participator
.
platform
===
'outlook'
)
{
outLookConcat
.
push
(
participator
)
outLookConcat
.
push
(
participator
)
}
}
}
}
select
=
this
.
store
.
data
.
participatorUserId
select
=
this
.
$
store
.
data
.
participatorUserId
require
=
[
getApp
().
globalData
.
userid
]
require
=
[
getApp
().
globalData
.
userid
]
select
=
_that
.
selectedelRequired
(
require
,
select
).
pickedUsers
select
=
_that
.
selectedelRequired
(
require
,
select
).
pickedUsers
dd
.
complexChoose
({
dd
.
complexChoose
({
...
@@ -276,8 +274,8 @@ create.Page({
...
@@ -276,8 +274,8 @@ create.Page({
})
})
participatorList
=
_that
.
setArrary
(
participatorList
.
concat
(
outLookConcat
))
participatorList
=
_that
.
setArrary
(
participatorList
.
concat
(
outLookConcat
))
participatorUserId
=
[...
new
Set
(
participatorUserId
)]
participatorUserId
=
[...
new
Set
(
participatorUserId
)]
_that
.
store
.
data
.
participatorList
=
participatorList
_that
.
$
store
.
data
.
participatorList
=
participatorList
_that
.
store
.
data
.
participatorUserId
=
participatorUserId
_that
.
$
store
.
data
.
participatorUserId
=
participatorUserId
_that
.
update
()
_that
.
update
()
_that
.
conflictPeople
()
_that
.
conflictPeople
()
},
},
...
@@ -310,10 +308,10 @@ create.Page({
...
@@ -310,10 +308,10 @@ create.Page({
},
},
// 点击完成
// 点击完成
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`
this
.
update
()
this
.
update
()
this
.
acrossDay
(
this
.
store
.
data
.
startTime
,
this
.
store
.
data
.
endTime
)
this
.
acrossDay
(
this
.
$store
.
data
.
startTime
,
this
.
$
store
.
data
.
endTime
)
this
.
setData
({
this
.
setData
({
popupShow
:
false
popupShow
:
false
})
})
...
@@ -325,22 +323,22 @@ create.Page({
...
@@ -325,22 +323,22 @@ create.Page({
location
:
{
location
:
{
longitude
:
'10'
,
longitude
:
'10'
,
latitude
:
'10'
,
latitude
:
'10'
,
locationName
:
this
.
store
.
data
.
locationName
locationName
:
this
.
$
store
.
data
.
locationName
},
},
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
,
"-"
),
meetingRoomId
:
this
.
store
.
data
.
roomId
,
meetingRoomId
:
this
.
$
store
.
data
.
roomId
,
scheduleType
:
this
.
store
.
data
.
roomId
?
'meeting'
:
'common'
,
scheduleType
:
this
.
$
store
.
data
.
roomId
?
'meeting'
:
'common'
,
participatorList
:
!!
this
.
store
.
data
.
participatorList
.
length
?
this
.
store
.
data
.
participatorList
:
[{
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
,
platform
:
'dingtalk'
}],
participatorList
:
!!
this
.
$store
.
data
.
participatorList
.
length
?
this
.
$
store
.
data
.
participatorList
:
[{
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
,
platform
:
'dingtalk'
}],
repeatable
:
this
.
data
.
repeatable
,
repeatable
:
this
.
data
.
repeatable
,
remark
:
this
.
data
.
remark
,
remark
:
this
.
data
.
remark
,
recurrenceModel
:
this
.
data
.
recurrenceModel
,
recurrenceModel
:
this
.
data
.
recurrenceModel
,
meetingRoomId
:
this
.
store
.
data
.
roomId
,
meetingRoomId
:
this
.
$
store
.
data
.
roomId
,
meetingWayModel
:
this
.
data
.
meetingWayModel
meetingWayModel
:
this
.
data
.
meetingWayModel
}
}
addSchedule
(
data
).
then
(
res
=>
{
addSchedule
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
if
(
res
.
data
.
code
===
0
)
{
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
$
store
.
data
.
indexNeedUpdate
=
true
this
.
update
()
this
.
update
()
dd
.
navigateBack
({
dd
.
navigateBack
({
delta
:
1
delta
:
1
...
@@ -373,12 +371,12 @@ create.Page({
...
@@ -373,12 +371,12 @@ create.Page({
// 会议冲突
// 会议冲突
conflictPeople
()
{
conflictPeople
()
{
let
userIds
=
[]
let
userIds
=
[]
for
(
let
value
of
this
.
store
.
data
.
participatorList
)
{
for
(
let
value
of
this
.
$
store
.
data
.
participatorList
)
{
userIds
.
push
(
value
.
userId
)
userIds
.
push
(
value
.
userId
)
}
}
let
data
=
{
let
data
=
{
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
,
"-"
),
userIds
:
userIds
userIds
:
userIds
}
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
getUserScheduleInTime
(
data
).
then
(
res
=>
{
...
...
This diff is collapsed.
Click to expand it.
pages/meetingDetail/meetingDetail.axml
View file @
e4f35b89
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
</view>
</view>
<view class="name">{{item.name}}</view>
<view class="name">{{item.name}}</view>
</view>
</view>
<view class="addPeople" catchTap="showPopup" data-type='participator'></view>
<view class="addPeople
iconfont iconicon_add1
" catchTap="showPopup" data-type='participator'></view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -149,8 +149,8 @@
...
@@ -149,8 +149,8 @@
</view>
</view>
<!-- 底部导航栏 -->
<!-- 底部导航栏 -->
<view class="footNav">
<view class="footNav">
<view class="footNavTop"
a:if="{{currentPeople != organizer}}"
>
<view class="footNavTop">
<view class="originStaus" a:if="{{confirmAttendance === null}}">
<view class="originStaus" a:if="{{
(currentPeople != organizer)&&
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>
...
...
This diff is collapsed.
Click to expand it.
pages/meetingDetail/meetingDetail.js
View file @
e4f35b89
...
@@ -157,10 +157,11 @@ create.Page({
...
@@ -157,10 +157,11 @@ create.Page({
participatorList
.
push
(
value
.
participator
)
participatorList
.
push
(
value
.
participator
)
participatorUserId
.
push
(
value
.
participator
.
userId
)
participatorUserId
.
push
(
value
.
participator
.
userId
)
originUsers
.
push
(
value
.
participator
)
originUsers
.
push
(
value
.
participator
)
if
(
value
.
participator
.
userId
===
getApp
().
globalData
.
userid
)
{
if
(
value
.
userId
===
getApp
().
globalData
.
userid
)
{
// this.setData({
debugger
// aheadTimes: value.
this
.
setData
({
// })
aheadTimes
:
!!
value
.
aheadList
?
value
.
aheadList
:
[
-
1
]
})
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
pages/outLookContact/outLookContact.axml
View file @
e4f35b89
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<view class="contactText">
<view class="contactText">
{{item.username}}
{{item.username}}
</view>
</view>
<view a:if="{{!!scheduleItem ? !(item.userId ==
originalData || originUsersId.includes(item.userId)) : !(item.userId ==
originalData)}}" class="contactClose icon iconfont iconicon_close" onTap="close" data-item="{{item}}">
<view a:if="{{!!scheduleItem ? !(item.userId ==
$data.originalData || $data.originUsersId.includes(item.userId)) : !(item.userId == $data.
originalData)}}" class="contactClose icon iconfont iconicon_close" onTap="close" data-item="{{item}}">
</view>
</view>
</view>
</view>
</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
pages/outLookContact/outLookContact.js
View file @
e4f35b89
import
{
getUserScheduleInTime
,
modifySchedule
}
from
'../../api/request.js'
import
{
getUserScheduleInTime
,
modifySchedule
}
from
'../../api/request.js'
import
{
throttle
}
from
'./../../utils/utils.js'
import
{
throttle
}
from
'./../../utils/utils.js'
import
create
from
'dd-store'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
observer
}
from
'/utils/observer.js'
import
{
observer
}
from
'/utils/observer.js'
create
.
Page
({
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
data
:
{
$data
:
null
,
userList
:
[],
userList
:
[],
userListId
:
[],
userListId
:
[],
outlookContact
:
[],
outlookContact
:
[],
...
@@ -53,7 +51,7 @@ create.Page({
...
@@ -53,7 +51,7 @@ create.Page({
})
})
}
}
let
outlookContact
=
[]
let
outlookContact
=
[]
for
(
let
value
of
this
.
store
.
data
.
participatorList
)
{
for
(
let
value
of
this
.
$
store
.
data
.
participatorList
)
{
if
(
value
.
platform
===
'outlook'
)
{
if
(
value
.
platform
===
'outlook'
)
{
outlookContact
.
push
(
value
)
outlookContact
.
push
(
value
)
}
}
...
@@ -131,31 +129,31 @@ create.Page({
...
@@ -131,31 +129,31 @@ create.Page({
// concat 拼接后生成新的数组 push 返回的是长度
// concat 拼接后生成新的数组 push 返回的是长度
let
participatorList
=
[]
let
participatorList
=
[]
let
participatorListId
=
[]
let
participatorListId
=
[]
for
(
let
value
of
this
.
store
.
data
.
participatorList
)
{
for
(
let
value
of
this
.
$
store
.
data
.
participatorList
)
{
if
(
value
.
platform
!==
'outlook'
)
{
if
(
value
.
platform
!==
'outlook'
)
{
participatorList
.
push
(
value
)
participatorList
.
push
(
value
)
participatorListId
.
push
(
value
.
userId
)
participatorListId
.
push
(
value
.
userId
)
}
}
}
}
participatorListId
.
push
(
getApp
().
globalData
.
userid
)
participatorListId
.
push
(
getApp
().
globalData
.
userid
)
this
.
data
.
outlookContact
.
forEach
(
item
=>
{
participatorListId
.
push
(
item
.
userId
)
})
participatorList
.
push
({
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
,
platform
:
'dingtalk'
})
participatorList
.
push
({
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
,
platform
:
'dingtalk'
})
participatorList
.
push
(...
this
.
data
.
outlookContact
)
participatorList
.
push
(...
this
.
data
.
outlookContact
)
participatorList
=
this
.
setArrary
(
participatorList
)
participatorList
=
this
.
setArrary
(
participatorList
)
this
.
data
.
outlookContact
.
forEach
(
item
=>
{
participatorListId
.
push
(
item
.
userId
)
})
this
.
setData
({
this
.
setData
({
userList
:
participatorList
,
userList
:
participatorList
,
userId
:
[...
new
Set
(
participatorListId
)]
user
List
Id
:
[...
new
Set
(
participatorListId
)]
})
})
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
this
.
store
.
data
.
originalData
.
repeatable
===
1
)
{
if
(
this
.
$
store
.
data
.
originalData
.
repeatable
===
1
)
{
this
.
setData
({
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
true
'conSelectPopupData.showSelectPopup'
:
true
})
})
}
else
{
}
else
{
let
addUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userList
).
addUserList
let
addUserList
=
this
.
arrayPoor
(
this
.
$
store
.
data
.
originUsers
,
this
.
data
.
userList
).
addUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userList
).
deleteUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
$
store
.
data
.
originUsers
,
this
.
data
.
userList
).
deleteUserList
let
dataUser
=
{
let
dataUser
=
{
addUserList
:
addUserList
,
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
deleteUserList
:
deleteUserList
,
...
@@ -165,7 +163,7 @@ create.Page({
...
@@ -165,7 +163,7 @@ create.Page({
this
.
modifySchedule
(
dataUser
)
this
.
modifySchedule
(
dataUser
)
}
}
}
else
{
}
else
{
this
.
store
.
data
.
participatorList
=
participatorList
this
.
$
store
.
data
.
participatorList
=
participatorList
this
.
update
()
this
.
update
()
dd
.
navigateBack
({
dd
.
navigateBack
({
delta
:
1
delta
:
1
...
@@ -186,8 +184,8 @@ create.Page({
...
@@ -186,8 +184,8 @@ create.Page({
'centerPopup.showCenterPopup'
:
false
'centerPopup.showCenterPopup'
:
false
})
})
if
(
event
.
currentTarget
.
dataset
.
item
.
id
>
-
1
)
{
if
(
event
.
currentTarget
.
dataset
.
item
.
id
>
-
1
)
{
let
addUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userList
).
addUserList
let
addUserList
=
this
.
arrayPoor
(
this
.
$
store
.
data
.
originUsers
,
this
.
data
.
userList
).
addUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userListId
).
deleteUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
$
store
.
data
.
originUsers
,
this
.
data
.
userListId
).
deleteUserList
let
dataUser
=
{
let
dataUser
=
{
addUserList
:
addUserList
,
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
deleteUserList
:
deleteUserList
,
...
@@ -216,13 +214,13 @@ create.Page({
...
@@ -216,13 +214,13 @@ create.Page({
return
new
Promise
((
resolve
,
rejects
)
=>
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
if
(
res
.
data
.
code
===
0
)
{
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
$
store
.
data
.
indexNeedUpdate
=
true
this
.
update
()
this
.
update
()
this
.
setData
({
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'保存成功'
'conToastData.title'
:
'保存成功'
})
})
if
(
this
.
store
.
data
.
originalData
.
repeatable
===
1
)
{
if
(
this
.
$
store
.
data
.
originalData
.
repeatable
===
1
)
{
observer
.
notice
(
res
.
data
.
data
)
observer
.
notice
(
res
.
data
.
data
)
}
}
this
.
operateUserS
()
this
.
operateUserS
()
...
@@ -271,8 +269,8 @@ create.Page({
...
@@ -271,8 +269,8 @@ create.Page({
userIds
.
push
(
value
.
userId
)
userIds
.
push
(
value
.
userId
)
}
}
let
data
=
{
let
data
=
{
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
,
"-"
),
userIds
:
userIds
userIds
:
userIds
}
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
getUserScheduleInTime
(
data
).
then
(
res
=>
{
...
@@ -311,11 +309,11 @@ create.Page({
...
@@ -311,11 +309,11 @@ create.Page({
},
},
// 参会人修改成功
// 参会人修改成功
operateUserS
()
{
operateUserS
()
{
this
.
store
.
data
.
participatorList
=
this
.
data
.
userList
this
.
$
store
.
data
.
participatorList
=
this
.
data
.
userList
this
.
store
.
data
.
participatorUserId
=
this
.
data
.
userListId
this
.
$
store
.
data
.
participatorUserId
=
this
.
data
.
userListId
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
$
store
.
data
.
indexNeedUpdate
=
true
this
.
store
.
data
.
originUsers
=
this
.
store
.
data
.
participatorList
this
.
$store
.
data
.
originUsers
=
this
.
$
store
.
data
.
participatorList
this
.
store
.
data
.
originUsersId
=
this
.
store
.
data
.
participatorUserId
this
.
$store
.
data
.
originUsersId
=
this
.
$
store
.
data
.
participatorUserId
this
.
update
()
this
.
update
()
dd
.
navigateBack
({
dd
.
navigateBack
({
delta
:
1
delta
:
1
...
...
This diff is collapsed.
Click to expand it.
pages/participantsDetail/participantsDetail.axml
View file @
e4f35b89
<view class="participantsDetail">
<view class="participantsDetail">
<view class="peopleContaint">
<view class="peopleContaint">
<view class="peopleList" a:for="{{participatorList}}" a:for-item="item">
<view class="peopleList" a:for="{{
$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>
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</view>
</view>
<view class="info">
<view class="info">
<text class="name">{{item.username}}</text>
<text class="name">{{item.username}}</text>
<text a:if="{{!!scheduleItem ? !(item.userId ==
originalData || originUsersId.includes(item.userId)) : !(item.userId == originalData
)}}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
<text a:if="{{!!scheduleItem ? !(item.userId ==
$data.originalData || $data.originUsersId.includes(item.userId)) : !(item.userId == currentPeople
)}}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
pages/participantsDetail/participantsDetail.js
View file @
e4f35b89
import
create
from
'dd-store'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
modifySchedule
,
addSchedule
,
getUserScheduleInTime
,
getHomeUserSchedule
}
from
'../../api/request.js'
import
{
modifySchedule
,
addSchedule
,
getUserScheduleInTime
,
getHomeUserSchedule
}
from
'../../api/request.js'
import
{
observer
}
from
'/utils/observer.js'
import
{
observer
}
from
'/utils/observer.js'
create
.
Page
({
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
data
:
{
$data
:
null
,
scheduleItem
:
''
,
scheduleItem
:
''
,
conflictPeople
:
[],
conflictPeople
:
[],
// 传给组件 hList 水平排列 所有数据 comHListData
// 传给组件 hList 水平排列 所有数据 comHListData
...
@@ -38,17 +36,22 @@ create.Page({
...
@@ -38,17 +36,22 @@ create.Page({
showToast
:
false
,
showToast
:
false
,
title
:
'保存成功'
title
:
'保存成功'
},
},
currentPeople
:
''
},
},
onLoad
(
event
)
{
onLoad
(
event
)
{
const
_that
=
this
const
_that
=
this
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
,
})
})
}
}
this
.
setData
({
currentPeople
:
getApp
().
globalData
.
userid
})
dd
.
setNavigationBar
({
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
title
:
`参会人(
${
this
.
$
store
.
data
.
participatorList
.
length
}
人)`
})
})
observer
.
register
({
observer
.
register
({
notice
(
scheduleItem
)
{
notice
(
scheduleItem
)
{
...
@@ -60,10 +63,16 @@ create.Page({
...
@@ -60,10 +63,16 @@ create.Page({
})
})
this
.
conflictPeople
()
this
.
conflictPeople
()
},
},
onShow
()
{
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
$store
.
data
.
participatorList
.
length
}
人)`
})
},
// 关闭popup 点击mark
// 关闭popup 点击mark
closePopup
()
{
closePopup
()
{
this
.
setData
({
this
.
setData
({
popupShow
:
false
popupShow
:
false
,
})
})
},
},
// 出现popup
// 出现popup
...
@@ -107,17 +116,17 @@ create.Page({
...
@@ -107,17 +116,17 @@ create.Page({
let
require
=
[]
let
require
=
[]
let
select
=
[]
let
select
=
[]
let
outLookConcat
=
[]
let
outLookConcat
=
[]
for
(
let
participator
of
_that
.
store
.
data
.
participatorList
)
{
for
(
let
participator
of
_that
.
$
store
.
data
.
participatorList
)
{
if
(
participator
.
platform
===
'outlook'
)
{
if
(
participator
.
platform
===
'outlook'
)
{
outLookConcat
.
push
(
participator
)
outLookConcat
.
push
(
participator
)
}
}
}
}
if
(
!
_that
.
data
.
scheduleItem
||
this
.
data
.
organizer
===
getApp
().
globalData
.
userid
)
{
if
(
!
_that
.
data
.
scheduleItem
||
this
.
data
.
organizer
===
getApp
().
globalData
.
userid
)
{
select
=
this
.
store
.
data
.
participatorUserId
select
=
this
.
$
store
.
data
.
participatorUserId
require
=
[
getApp
().
globalData
.
userid
]
require
=
[
getApp
().
globalData
.
userid
]
}
else
{
}
else
{
select
=
[]
select
=
[]
require
=
[...
this
.
store
.
data
.
originUsersId
]
require
=
[...
this
.
$
store
.
data
.
originUsersId
]
}
}
select
=
_that
.
selectedelRequired
(
require
,
select
).
pickedUsers
select
=
_that
.
selectedelRequired
(
require
,
select
).
pickedUsers
dd
.
complexChoose
({
dd
.
complexChoose
({
...
@@ -137,7 +146,7 @@ create.Page({
...
@@ -137,7 +146,7 @@ create.Page({
participatorUserId
.
push
(
item
.
userId
)
participatorUserId
.
push
(
item
.
userId
)
})
})
}
else
{
}
else
{
_that
.
store
.
data
.
originUsers
.
forEach
((
item
,
index
)
=>
{
_that
.
$
store
.
data
.
originUsers
.
forEach
((
item
,
index
)
=>
{
participatorList
.
push
(
item
)
participatorList
.
push
(
item
)
if
(
item
.
platform
===
'dingtalk'
)
{
if
(
item
.
platform
===
'dingtalk'
)
{
participatorUserId
.
push
(
item
.
userId
)
participatorUserId
.
push
(
item
.
userId
)
...
@@ -150,18 +159,18 @@ create.Page({
...
@@ -150,18 +159,18 @@ create.Page({
}
}
participatorList
=
_that
.
setArrary
(
participatorList
.
concat
(
outLookConcat
))
participatorList
=
_that
.
setArrary
(
participatorList
.
concat
(
outLookConcat
))
participatorUserId
=
[...
new
Set
(
participatorUserId
)]
participatorUserId
=
[...
new
Set
(
participatorUserId
)]
_that
.
store
.
data
.
participatorList
=
participatorList
_that
.
$
store
.
data
.
participatorList
=
participatorList
_that
.
store
.
data
.
participatorUserId
=
participatorUserId
_that
.
$
store
.
data
.
participatorUserId
=
participatorUserId
_that
.
update
()
_that
.
update
()
_that
.
conflictPeople
()
_that
.
conflictPeople
()
if
(
!!
_that
.
data
.
scheduleItem
)
{
if
(
!!
_that
.
data
.
scheduleItem
)
{
if
(
_that
.
store
.
data
.
originalData
.
repeatable
)
{
if
(
_that
.
$
store
.
data
.
originalData
.
repeatable
)
{
_that
.
setData
({
_that
.
setData
({
'conSelectPopupData.showSelectPopup'
:
true
'conSelectPopupData.showSelectPopup'
:
true
})
})
}
else
{
}
else
{
let
addUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
addUserList
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
deleteUserList
=
_that
.
arrayPoor
(
_that
.
$store
.
data
.
originUsers
,
_that
.
$
store
.
data
.
participatorList
).
deleteUserList
let
dataUser
=
{
let
dataUser
=
{
addUserList
:
addUserList
,
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
deleteUserList
:
deleteUserList
,
...
@@ -190,8 +199,8 @@ create.Page({
...
@@ -190,8 +199,8 @@ create.Page({
'centerPopup.showCenterPopup'
:
false
'centerPopup.showCenterPopup'
:
false
})
})
if
(
event
.
currentTarget
.
dataset
.
item
.
id
>
-
1
)
{
if
(
event
.
currentTarget
.
dataset
.
item
.
id
>
-
1
)
{
let
addUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
store
.
data
.
participatorList
).
addUserList
let
addUserList
=
this
.
arrayPoor
(
this
.
$store
.
data
.
originUsers
,
this
.
$
store
.
data
.
participatorList
).
addUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
store
.
data
.
participatorList
).
deleteUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
$store
.
data
.
originUsers
,
this
.
$
store
.
data
.
participatorList
).
deleteUserList
let
dataUser
=
{
let
dataUser
=
{
addUserList
:
addUserList
,
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
deleteUserList
:
deleteUserList
,
...
@@ -205,16 +214,22 @@ create.Page({
...
@@ -205,16 +214,22 @@ create.Page({
},
},
// 参会人修改成功
// 参会人修改成功
operateUserS
()
{
operateUserS
()
{
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
$
store
.
data
.
indexNeedUpdate
=
true
this
.
store
.
data
.
originUsers
=
this
.
store
.
data
.
participatorList
this
.
$store
.
data
.
originUsers
=
this
.
$
store
.
data
.
participatorList
this
.
store
.
data
.
originUsersId
=
this
.
store
.
data
.
participatorUserId
this
.
$store
.
data
.
originUsersId
=
this
.
$
store
.
data
.
participatorUserId
this
.
update
()
this
.
update
()
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
$store
.
data
.
participatorList
.
length
}
人)`
})
},
},
// 参会人修改失败
// 参会人修改失败
operateUserE
()
{
operateUserE
()
{
this
.
store
.
data
.
participatorList
=
this
.
store
.
data
.
originUsers
this
.
$store
.
data
.
participatorList
=
this
.
$
store
.
data
.
originUsers
this
.
store
.
data
.
participatorUserId
=
this
.
store
.
data
.
originUsersId
this
.
$store
.
data
.
participatorUserId
=
this
.
$
store
.
data
.
originUsersId
this
.
update
()
this
.
update
()
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
$store
.
data
.
participatorList
.
length
}
人)`
})
},
},
// onSelectPopupCancel 点击取消
// onSelectPopupCancel 点击取消
onSelectPopupCancel
()
{
onSelectPopupCancel
()
{
...
@@ -235,14 +250,14 @@ create.Page({
...
@@ -235,14 +250,14 @@ create.Page({
return
new
Promise
((
resolve
,
rejects
)
=>
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
if
(
res
.
data
.
code
===
0
)
{
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
$
store
.
data
.
indexNeedUpdate
=
true
this
.
update
()
this
.
update
()
this
.
setData
({
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'保存成功'
'conToastData.title'
:
'保存成功'
})
})
this
.
operateUserS
()
this
.
operateUserS
()
if
(
this
.
store
.
data
.
originalData
.
repeatable
===
1
)
{
if
(
this
.
$
store
.
data
.
originalData
.
repeatable
===
1
)
{
observer
.
notice
(
res
.
data
.
data
)
observer
.
notice
(
res
.
data
.
data
)
}
}
return
resolve
(
res
)
return
resolve
(
res
)
...
@@ -294,15 +309,16 @@ create.Page({
...
@@ -294,15 +309,16 @@ create.Page({
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
success
:
(
success
)
=>
{
success
:
(
success
)
=>
{
if
(
!!
success
.
confirm
)
{
if
(
!!
success
.
confirm
)
{
if
(
!!
_that
.
store
.
data
.
originalData
.
repeatable
)
{
if
(
!!
_that
.
$
store
.
data
.
originalData
.
repeatable
)
{
_that
.
delete
(
event
)
_that
.
delete
(
event
)
_that
.
setData
({
_that
.
setData
({
'conSelectPopupData.showSelectPopup'
:
true
'conSelectPopupData.showSelectPopup'
:
true
})
})
}
else
{
}
else
{
_that
.
delete
(
event
)
_that
.
delete
(
event
)
let
addUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
addUserList
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
deleteUserList
=
_that
.
arrayPoor
(
_that
.
$store
.
data
.
originUsers
,
_that
.
$
store
.
data
.
participatorList
).
deleteUserList
let
dataUser
=
{
let
dataUser
=
{
addUserList
:
addUserList
,
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
deleteUserList
:
deleteUserList
,
...
@@ -316,33 +332,31 @@ create.Page({
...
@@ -316,33 +332,31 @@ create.Page({
})
})
}
else
{
}
else
{
this
.
delete
()
this
.
delete
(
event
)
}
}
},
},
// 删除操作
// 删除操作
delete
(
event
)
{
delete
(
event
)
{
let
userId
=
event
.
target
.
dataset
.
userId
let
userId
=
event
.
target
.
dataset
.
userId
this
.
store
.
data
.
participatorList
.
forEach
((
item
,
index
)
=>
{
this
.
$
store
.
data
.
participatorList
.
forEach
((
item
,
index
)
=>
{
if
(
userId
===
item
.
userId
)
{
if
(
userId
===
item
.
userId
)
{
let
participatorList
=
[...
this
.
store
.
data
.
participatorList
]
let
participatorList
=
[...
this
.
$
store
.
data
.
participatorList
]
participatorList
.
splice
(
index
,
1
)
participatorList
.
splice
(
index
,
1
)
this
.
store
.
data
.
participatorList
=
participatorList
this
.
$
store
.
data
.
participatorList
=
participatorList
this
.
update
()
this
.
update
()
return
return
}
}
})
})
this
.
store
.
data
.
participatorUserId
.
forEach
((
item
,
index
)
=>
{
this
.
$
store
.
data
.
participatorUserId
.
forEach
((
item
,
index
)
=>
{
if
(
userId
===
item
)
{
if
(
userId
===
item
)
{
let
participatorUserId
=
[...
this
.
store
.
data
.
participatorUserId
]
let
participatorUserId
=
[...
this
.
$
store
.
data
.
participatorUserId
]
participatorUserId
.
splice
(
index
,
1
)
participatorUserId
.
splice
(
index
,
1
)
this
.
store
.
data
.
participatorUserId
=
participatorUserId
this
.
$
store
.
data
.
participatorUserId
=
participatorUserId
this
.
update
()
this
.
update
()
return
return
}
}
})
})
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
})
this
.
conflictPeople
()
this
.
conflictPeople
()
},
},
// 数组去重
// 数组去重
...
@@ -357,12 +371,12 @@ create.Page({
...
@@ -357,12 +371,12 @@ create.Page({
// 会议冲突
// 会议冲突
conflictPeople
()
{
conflictPeople
()
{
let
userIds
=
[]
let
userIds
=
[]
for
(
let
value
of
this
.
store
.
data
.
participatorList
)
{
for
(
let
value
of
this
.
$
store
.
data
.
participatorList
)
{
userIds
.
push
(
value
.
userId
)
userIds
.
push
(
value
.
userId
)
}
}
let
data
=
{
let
data
=
{
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
,
"-"
),
userIds
:
userIds
userIds
:
userIds
}
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
getUserScheduleInTime
(
data
).
then
(
res
=>
{
...
...
This diff is collapsed.
Click to expand it.
pages/place/place.js
View file @
e4f35b89
import
create
from
'dd-store'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
queryAvailableMeetingRoomByTime
,
modifySchedule
}
from
'./../../api/request'
import
{
queryAvailableMeetingRoomByTime
,
modifySchedule
}
from
'./../../api/request'
import
{
throttle
}
from
'./../../utils/utils.js'
import
{
throttle
}
from
'./../../utils/utils.js'
import
{
observer
}
from
'/utils/observer.js'
import
{
observer
}
from
'/utils/observer.js'
create
.
Page
({
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
data
:
{
$data
:
null
,
place
:
''
,
place
:
''
,
availableMeetingRoom
:
[],
availableMeetingRoom
:
[],
scheduleItem
:
''
,
scheduleItem
:
''
,
...
@@ -55,8 +53,8 @@ create.Page({
...
@@ -55,8 +53,8 @@ create.Page({
})
})
let
that
=
this
let
that
=
this
let
data
=
{
let
data
=
{
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
,
"-"
)
}
}
queryAvailableMeetingRoomByTime
(
data
).
then
(
res
=>
{
queryAvailableMeetingRoomByTime
(
data
).
then
(
res
=>
{
that
.
setData
({
that
.
setData
({
...
@@ -65,8 +63,8 @@ create.Page({
...
@@ -65,8 +63,8 @@ create.Page({
})
})
},
},
selectPlace
(
event
)
{
selectPlace
(
event
)
{
this
.
store
.
data
.
locationName
=
event
.
target
.
dataset
.
locationName
this
.
$
store
.
data
.
locationName
=
event
.
target
.
dataset
.
locationName
this
.
store
.
data
.
roomId
=
''
this
.
$
store
.
data
.
roomId
=
''
this
.
update
()
this
.
update
()
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
this
.
data
.
repeatable
!=
0
)
{
if
(
this
.
data
.
repeatable
!=
0
)
{
...
@@ -78,9 +76,9 @@ create.Page({
...
@@ -78,9 +76,9 @@ create.Page({
location
:
{
location
:
{
longitude
:
-
999
,
longitude
:
-
999
,
latitude
:
-
999
,
latitude
:
-
999
,
locationName
:
this
.
store
.
data
.
locationName
locationName
:
this
.
$
store
.
data
.
locationName
},
},
meetingRoomId
:
this
.
store
.
data
.
roomId
,
meetingRoomId
:
this
.
$
store
.
data
.
roomId
,
modifyModel
:
'only'
,
modifyModel
:
'only'
,
modifyContent
:
'modify_location'
modifyContent
:
'modify_location'
}
}
...
@@ -114,9 +112,9 @@ create.Page({
...
@@ -114,9 +112,9 @@ create.Page({
location
:
{
location
:
{
longitude
:
-
999
,
longitude
:
-
999
,
latitude
:
-
999
,
latitude
:
-
999
,
locationName
:
this
.
store
.
data
.
locationName
locationName
:
this
.
$
store
.
data
.
locationName
},
},
meetingRoomId
:
this
.
store
.
data
.
roomId
,
meetingRoomId
:
this
.
$
store
.
data
.
roomId
,
modifyModel
:
this
.
data
.
conSelectPopupData
.
selectPopupId
,
modifyModel
:
this
.
data
.
conSelectPopupData
.
selectPopupId
,
modifyContent
:
'modify_location'
modifyContent
:
'modify_location'
}
}
...
@@ -131,8 +129,8 @@ create.Page({
...
@@ -131,8 +129,8 @@ create.Page({
},
},
// 修改地点成功
// 修改地点成功
editLocationS
()
{
editLocationS
()
{
this
.
store
.
data
.
originalData
.
location
.
locationName
=
this
.
store
.
data
.
locationName
this
.
$store
.
data
.
originalData
.
location
.
locationName
=
this
.
$
store
.
data
.
locationName
this
.
store
.
data
.
originalData
.
meetingRoomId
=
this
.
store
.
data
.
roomId
this
.
$store
.
data
.
originalData
.
meetingRoomId
=
this
.
$
store
.
data
.
roomId
this
.
update
()
this
.
update
()
dd
.
navigateBack
({
dd
.
navigateBack
({
delta
:
1
delta
:
1
...
@@ -141,8 +139,8 @@ create.Page({
...
@@ -141,8 +139,8 @@ create.Page({
},
},
// 修改地点失败
// 修改地点失败
editLocationE
(
lock
=
true
)
{
editLocationE
(
lock
=
true
)
{
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
this
.
update
()
this
.
update
()
if
(
lock
)
{
if
(
lock
)
{
this
.
setData
({
this
.
setData
({
...
@@ -167,7 +165,7 @@ create.Page({
...
@@ -167,7 +165,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
)
{
observer
.
notice
(
res
.
data
.
data
)
observer
.
notice
(
res
.
data
.
data
)
}
}
return
resolve
(
res
)
return
resolve
(
res
)
...
@@ -188,8 +186,8 @@ create.Page({
...
@@ -188,8 +186,8 @@ create.Page({
this
.
editLocationE
(
false
)
this
.
editLocationE
(
false
)
},
},
selectMeetingRoom
(
e
)
{
selectMeetingRoom
(
e
)
{
this
.
store
.
data
.
locationName
=
e
.
target
.
dataset
.
locationName
this
.
$
store
.
data
.
locationName
=
e
.
target
.
dataset
.
locationName
this
.
store
.
data
.
roomId
=
e
.
target
.
dataset
.
locationid
this
.
$
store
.
data
.
roomId
=
e
.
target
.
dataset
.
locationid
this
.
update
()
this
.
update
()
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
this
.
data
.
repeatable
!=
0
)
{
if
(
this
.
data
.
repeatable
!=
0
)
{
...
@@ -201,9 +199,9 @@ create.Page({
...
@@ -201,9 +199,9 @@ create.Page({
location
:
{
location
:
{
longitude
:
-
999
,
longitude
:
-
999
,
latitude
:
-
999
,
latitude
:
-
999
,
locationName
:
this
.
store
.
data
.
locationName
locationName
:
this
.
$
store
.
data
.
locationName
},
},
meetingRoomId
:
this
.
store
.
data
.
roomId
,
meetingRoomId
:
this
.
$
store
.
data
.
roomId
,
modifyModel
:
'only'
,
modifyModel
:
'only'
,
modifyContent
:
'modify_location'
modifyContent
:
'modify_location'
}
}
...
...
This diff is collapsed.
Click to expand it.
stores/exampleStore.js
View file @
e4f35b89
class
Store
{
class
Store
{
data
=
{
data
=
{
participatorList
:
[
{
headUrl
:
""
,
platform
:
"dingtalk"
,
userId
:
"134410161020791052"
,
username
:
"冯召玉"
},
{
headUrl
:
""
,
platform
:
"dingtalk"
,
userId
:
"30024743652146348302"
,
username
:
"王五117"
},
{
headUrl
:
"https://static.dingtalk.com/media/lADOCi4ohM0C7s0C7A_748_750.jpg"
,
platform
:
"dingtalk"
,
userId
:
"03282029482102674671"
,
username
:
"楚德朋(小鹏)"
},
{
headUrl
:
"https://static.dingtalk.com/media/lADPDgQ9rVfXAB7NC9XNC9A_3024_3029.jpg"
,
platform
:
"dingtalk"
,
userId
:
"2866151654752072"
,
username
:
"小号"
},
{
headUrl
:
""
,
platform
:
"dingtalk"
,
userId
:
"2168192627-2054385182"
,
username
:
"诙是诙谐的诙"
},
{
headUrl
:
"https://static.dingtalk.com/media/lADPGoGu60TX5w3NAdrNAdo_474_474.jpg"
,
platform
:
"dingtalk"
,
userId
:
"0906633440812257"
,
username
:
"指月"
},
{
headUrl
:
"https://static.dingtalk.com/media/lADPDgQ9rB3t4ozNBQDNBQA_1280_1280.jpg"
,
platform
:
"dingtalk"
,
userId
:
"0307652433971147"
,
username
:
"皮特"
},
{
headUrl
:
"https://static.dingtalk.com/media/lADPDgQ9qyCUTczNAeDNAeA_480_480.jpg"
,
platform
:
"dingtalk"
,
userId
:
"2269350140-286520467"
,
username
:
"陆宜(测试)"
},
{
headUrl
:
""
,
platform
:
"outlook"
,
userId
:
"2303907784@qq.com"
,
username
:
"2303907784@qq.com"
}
],
// 参会人列表
locationName
:
''
,
locationName
:
''
,
participatorUserId
:
[],
// 参会人的userId
participatorUserId
:
[],
// 参会人的userId
userList
:
[],
roomId
:
''
,
roomId
:
''
,
startTime
:
''
,
startTime
:
''
,
endTime
:
''
,
endTime
:
''
,
...
...
This diff is collapsed.
Click to expand it.
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