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
224a17bf
Commit
224a17bf
authored
5 years ago
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Plain Diff
编辑选人模块
parents
59dddfc0
112bd921
master
…
dev
release/1.0.0
release/2.0.0
release/2.1.0
release/dev/2.0.0
release/dev/2.1.0
release_beta/1.0.0
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
133 additions
and
47 deletions
+133
-47
createOrEditSchedule.axml
pages/createOrEditSchedule/createOrEditSchedule.axml
+7
-3
createOrEditSchedule.js
pages/createOrEditSchedule/createOrEditSchedule.js
+30
-21
participantsDetail.acss
pages/participantsDetail/participantsDetail.acss
+11
-3
participantsDetail.axml
pages/participantsDetail/participantsDetail.axml
+1
-0
participantsDetail.js
pages/participantsDetail/participantsDetail.js
+81
-17
repeatMechanism.js
pages/repeatMechanism/repeatMechanism.js
+1
-1
scheduleDetail.axml
pages/scheduleDetail/scheduleDetail.axml
+2
-2
No files found.
pages/createOrEditSchedule/createOrEditSchedule.axml
View file @
224a17bf
{{permissions}}
<view class="createOrEditSchedule">
<!-- 主题 -->
<view class="theme">
...
...
@@ -160,14 +161,17 @@
描述
</view>
</view>
<view a:if="{{repeatable==0&&!!scheduleItem}}" class="listGroup" onTap="editSchedule" data-icon="iconshanchu">
{{organize}}
<!-- {{permissions}} -->
{{organize}}
<view a:if="{{isRepeat==0&&!!scheduleItem}}" class="listGroup" onTap="editSchedule" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu">
</view>
<view class="listText">
删除
</view>
</view>
<picker a:if="{{!!scheduleItem&&
repeatable==1}}" value="{{0
}}" range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule">
<picker a:if="{{!!scheduleItem&&
isRepeat==1
}}" range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule">
<view class="listGroup" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu">
</view>
...
...
@@ -178,7 +182,7 @@
</picker>
</view>
<!-- 编辑重复的时候的保存 -->
<picker a:if="{{
repeatable
=='1'}}" value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat">
<picker a:if="{{
isRepeat
=='1'}}" value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat">
<view>
<view class="save">
<view>
...
...
This diff is collapsed.
Click to expand it.
pages/createOrEditSchedule/createOrEditSchedule.js
View file @
224a17bf
...
...
@@ -21,12 +21,14 @@ create.Page({
scheduleItem
:
''
,
// 日程ID 从详情页面传过来
buttonText
:
'立即创建'
,
// 人员增量信息 减量信息 只有在编辑的时候使用
addUserList
:
undefined
,
deleteUserList
:
undefined
,
addUserList
:
[]
,
deleteUserList
:
[]
,
originUserList
:
[],
requireUsers
:
[],
requireUsersInfo
:
[],
organizer
:
''
organizer
:
''
,
isRepeat
:
''
,
permissions
:
''
},
onLoad
(
event
)
{
let
index
=
new
Date
().
getDay
()
...
...
@@ -59,6 +61,7 @@ create.Page({
week1
:
w
,
week2
:
w
,
type
:
event
.
type
,
permissions
:
getApp
().
globalData
.
userid
,
repeatWeek
:
this
.
data
.
repeatWeek
})
if
(
!!
event
.
scheduleItem
)
{
...
...
@@ -76,10 +79,11 @@ create.Page({
this
.
store
.
data
.
aheadTimes
=
[
15
]
this
.
update
()
}
this
.
conflict
()
},
onShow
()
{
const
_that
=
this
_that
.
conflict
()
_that
.
arrayPoor
(
_that
.
data
.
originUserList
,
_that
.
store
.
data
.
participatorList
)
setTimeout
(
function
()
{
_that
.
update
()
},
100
)
...
...
@@ -184,7 +188,7 @@ create.Page({
_that
.
store
.
data
.
participatorList
=
[]
_that
.
store
.
data
.
participatorUserId
=
[]
res
.
users
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
headUrl
})
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
avatar
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
})
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
})
...
...
@@ -193,7 +197,7 @@ create.Page({
_that
.
store
.
data
.
participatorList
=
[]
_that
.
store
.
data
.
participatorUserId
=
[]
res
.
users
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
headUrl
})
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
avatar
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
})
_that
.
data
.
requireUsersInfo
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -219,7 +223,7 @@ create.Page({
}
switch
(
event
.
target
.
dataset
.
nextPage
)
{
case
'participantsDetail'
:
dd
.
navigateTo
({
url
:
`./../participantsDetail/participantsDetail?
time=
${
JSON
.
stringify
(
time
)}
`
})
dd
.
navigateTo
({
url
:
`./../participantsDetail/participantsDetail?
scheduleItem=
${
JSON
.
stringify
(
this
.
data
.
scheduleItem
)}
&organizer=
${
this
.
data
.
organizer
}
&requireUsers=
${
JSON
.
stringify
(
this
.
data
.
requireUsers
)}
&requireUsersInfo=
${
JSON
.
stringify
(
this
.
data
.
requireUsersInfo
)}
`
})
break
;
case
'place'
:
dd
.
navigateTo
({
url
:
'./../place/place'
})
...
...
@@ -348,13 +352,17 @@ create.Page({
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
for
(
let
value
in
res
.
data
.
data
)
{
if
(
!!
res
.
data
.
data
[
value
].
length
)
{
if
(
res
.
data
.
data
[
value
])
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
res
.
data
.
data
[
value
]
.
length
>
1
)
{
this
.
store
.
data
.
conflictPeople
.
push
(
value
)
}
}
else
{
if
(
res
.
data
.
data
[
value
].
length
>
0
)
{
this
.
store
.
data
.
conflictPeople
.
push
(
value
)
}
}
}
this
.
update
()
})
},
...
...
@@ -381,10 +389,11 @@ create.Page({
this
.
store
.
data
.
remark
=
res
.
data
.
data
.
remark
||
''
this
.
store
.
data
.
recurrenceModel
=
res
.
data
.
data
.
recurrenceModel
||
{
model
:
'no-repeat'
}
this
.
setData
({
isRepeat
:
res
.
data
.
data
.
repeatable
,
organizer
:
res
.
data
.
data
.
organizer
,
requireUsersInfo
:
participatorList
,
requireUsers
:
participatorUserId
,
originUserList
:
participatorList
,
originUserList
:
[...
participatorList
]
,
title
:
res
.
data
.
data
.
title
,
time1
:
res
.
data
.
data
.
startTime
.
replace
(
/-/g
,
'/'
),
time2
:
res
.
data
.
data
.
endTime
.
replace
(
/-/g
,
'/'
),
...
...
@@ -423,18 +432,15 @@ create.Page({
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
success
:
(
success
)
=>
{
console
.
log
(
JSON
.
stringify
(
success
))
if
(
!!
success
.
confirm
)
{
deleteSchedule
(
data
).
then
(
res
=>
{
dd
.
navigateBack
({
delta
:
2
})
})
},
error
:
(
err
)
=>
{
console
.
log
(
JSON
.
stringify
(
err
))
}
}
})
break
;
}
...
...
@@ -479,8 +485,6 @@ create.Page({
del
.
push
(
x
)
}
}
console
.
log
(
1111
)
console
.
log
(
JSON
.
stringify
(
add
))
this
.
setData
({
addUserList
:
add
,
deleteUserList
:
del
...
...
@@ -509,16 +513,21 @@ create.Page({
deleteRepeatSchedule
(
event
)
{
let
deleteModel
=
''
switch
(
event
.
detail
.
value
)
{
case
0
:
case
0
||
'0'
:
deleteModel
=
'only'
break
;
case
1
:
case
1
||
'1'
:
deleteModel
=
'future'
break
;
case
2
:
case
2
||
'2'
:
deleteModel
=
'all'
break
;
}
this
.
setData
({
deleteModel
:
deleteModel
})
console
.
log
(
11111
)
console
.
log
(
JSON
.
stringify
(
this
.
data
.
scheduleItem
.
planDate
))
let
data
=
{
planDate
:
this
.
data
.
scheduleItem
.
planDate
,
templateId
:
this
.
data
.
scheduleItem
.
scheduleTemplateId
,
...
...
This diff is collapsed.
Click to expand it.
pages/participantsDetail/participantsDetail.acss
View file @
224a17bf
...
...
@@ -22,10 +22,19 @@ page {
height: 64rpx;
background: #3296FA;
border-radius: 50%;
overflow: hidden;
color: white;
line-height: 64rpx;
text-align: center;
position: relative;
}
.conflict {
position: absolute;
width: 18rpx;
height: 18rpx;
background: red;
bottom: 3rpx;
right: -2rpx;
border-radius: 50%;
}
.headImg image {
vertical-align: middle;
...
...
@@ -49,11 +58,10 @@ page {
}
.button {
padding: 24rpx 32rpx;
position: fixed;
bottom: 0;
display: flex;
margin-left: 32rpx;
padding-bottom: 32rpx;
background: white;
}
...
...
This diff is collapsed.
Click to expand it.
pages/participantsDetail/participantsDetail.axml
View file @
224a17bf
...
...
@@ -3,6 +3,7 @@
<view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text>
<text a:if="{{conflictPeople.includes(item.userId)}}"class="conflict"></text>
</view>
<view class="info">
<text class="name">{{item.username}}</text>
...
...
This diff is collapsed.
Click to expand it.
pages/participantsDetail/participantsDetail.js
View file @
224a17bf
...
...
@@ -7,44 +7,88 @@ create.Page({
time1
:
''
,
time2
:
''
,
data
:
{
scheduleItem
:
''
,
requireUsers
:
[],
organizer
:
''
,
myself
:
''
,
requireUsersInfo
:
[]
},
onLoad
(
event
)
{
let
myself
=
getApp
().
globalData
.
userid
let
scheduleItem
=
JSON
.
parse
(
event
.
scheduleItem
)
let
organizer
=
event
.
organizer
let
requireUsers
=
JSON
.
parse
(
event
.
requireUsers
)
let
requireUsersInfo
=
JSON
.
parse
(
event
.
requireUsersInfo
)
this
.
setData
({
time1
:
event
.
time1
,
time2
:
event
.
time1
requireUsers
:
requireUsers
,
organizer
:
organizer
,
scheduleItem
:
scheduleItem
,
time1
:
scheduleItem
.
startTime
,
time2
:
scheduleItem
.
endTime
,
myself
:
myself
,
requireUsersInfo
:
requireUsersInfo
})
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
})
this
.
conflict
()
},
// 保存信息
saveInfo
()
{
this
.
conflict
()
dd
.
navigateBack
({
delta
:
1
})
},
// 添加参会人
addParticipants
()
{
const
_that
=
this
let
require
=
[]
let
select
=
[]
if
(
!
this
.
data
.
scheduleItem
||
this
.
data
.
organizer
===
getApp
().
globalData
.
userid
)
{
select
=
this
.
store
.
data
.
participatorUserId
require
=
[
getApp
().
globalData
.
userid
]
select
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
userId
==
getApp
().
globalData
.
userid
)
{
select
.
splice
(
index
,
1
)
}
})
}
else
{
select
=
[...
this
.
store
.
data
.
participatorUserId
]
require
=
[...
this
.
data
.
requireUsers
]
}
select
=
_that
.
selectedelRequired
(
require
,
select
).
pickedUsers
dd
.
complexChoose
({
title
:
"选择参会人"
,
//标题
multiple
:
true
,
//是否多选
limitTips
:
"超出了"
,
//超过限定人数返回提示
maxUsers
:
100
,
//最大可选人数
pickedUsers
:
_that
.
store
.
data
.
participatorUserId
,
//已选用户
requiredUsers
:
[],
//必选用户(不可取消选中状态
pickedUsers
:
select
,
//已选用户
requiredUsers
:
require
,
//必选用户(不可取消选中状态)
responseUserOnly
:
true
,
//返回人,或者返回人和部门
success
:
function
(
res
)
{
if
(
!
_that
.
data
.
scheduleItem
||
_that
.
data
.
organizer
===
getApp
().
globalData
.
userid
)
{
_that
.
store
.
data
.
participatorList
=
[]
_that
.
store
.
data
.
participatorUserId
=
[]
res
.
users
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
headUrl
})
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
avatar
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
})
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
})
_that
.
store
.
data
.
participatorUserId
.
push
(
getApp
().
globalData
.
userid
)
}
else
{
_that
.
store
.
data
.
participatorList
=
[]
_that
.
store
.
data
.
participatorUserId
=
[]
res
.
users
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
avatar
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
})
_that
.
data
.
requireUsersInfo
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
username
,
headUrl
:
item
.
headUrl
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
})
}
_that
.
store
.
data
.
participatorList
=
_that
.
setArrary
(
_that
.
store
.
data
.
participatorList
)
_that
.
store
.
data
.
participatorUserId
=
[...
new
Set
(
_that
.
store
.
data
.
participatorUserId
)]
_that
.
conflict
()
_that
.
update
()
dd
.
setNavigationBar
({
title
:
`参会人(
${
_that
.
store
.
data
.
participatorList
.
length
}
人)`
})
},
fail
:
function
(
err
)
{
}
...
...
@@ -70,6 +114,7 @@ create.Page({
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
})
this
.
conflict
()
},
// 数组去重
setArrary
(
arr
,
userId
)
{
...
...
@@ -90,14 +135,33 @@ create.Page({
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
for
(
let
value
in
res
.
data
.
data
)
{
if
(
!!
res
.
data
.
data
[
value
].
length
)
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
res
.
data
.
data
[
value
].
length
>
1
)
{
this
.
store
.
data
.
conflictPeople
.
push
(
value
)
}
}
else
{
if
(
res
.
data
.
data
[
value
].
length
>
0
)
{
this
.
store
.
data
.
conflictPeople
.
push
(
value
)
}
}
}
this
.
update
()
dd
.
navigateBack
({
delta
:
1
})
})
},
// 已选用户去中去掉必选用户
selectedelRequired
(
req
,
pic
)
{
for
(
let
i
=
0
;
i
<
req
.
length
;
i
++
)
{
for
(
let
m
=
0
;
m
<
pic
.
length
;
m
++
)
{
if
(
req
[
i
]
==
pic
[
m
])
{
pic
.
splice
(
m
,
1
)
m
--
;
}
}
}
return
{
requiredUsers
:
req
,
pickedUsers
:
pic
}
}
});
This diff is collapsed.
Click to expand it.
pages/repeatMechanism/repeatMechanism.js
View file @
224a17bf
...
...
@@ -18,7 +18,7 @@ create.Page({
title
:
'选择重复'
})
let
week
=
new
Date
().
getDay
()
this
.
data
.
repeatList
[
2
].
weekDayList
=
[
this
.
data
.
week1
[
week
]]
this
.
data
.
repeatList
[
2
].
weekDayList
=
[
this
.
data
.
week1
[
week
-
1
]]
this
.
data
.
repeatList
[
2
].
text
=
this
.
data
.
week2
[
week
-
1
]
this
.
setData
({
repeatList
:
this
.
data
.
repeatList
...
...
This diff is collapsed.
Click to expand it.
pages/scheduleDetail/scheduleDetail.axml
View file @
224a17bf
...
...
@@ -32,10 +32,10 @@
</view>
</view>
<!-- 参会人 -->
<view class="participants">
<view class="participants"
onTap="nextPage" data-nextPage="participants"
>
<view class="icon iconcanhuiren1 iconfont">
</view>
<view class="scroll" v-if="{{!!userList.length}}"
onTap="nextPage" data-nextPage="participants"
>
<view class="scroll" v-if="{{!!userList.length}}" >
<text class="imageGroup" a:for="{{userList}}" a:for-item="item">
<text>
<image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/>
...
...
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