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
79285f0b
Commit
79285f0b
authored
Feb 19, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选人还没好
parent
6d85036c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
18 deletions
+61
-18
createOrEditSchedule.axml
pages/createOrEditSchedule/createOrEditSchedule.axml
+8
-8
createOrEditSchedule.js
pages/createOrEditSchedule/createOrEditSchedule.js
+52
-9
scheduleDetail.axml
pages/scheduleDetail/scheduleDetail.axml
+1
-1
No files found.
pages/createOrEditSchedule/createOrEditSchedule.axml
View file @
79285f0b
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</view>
</view>
</view>
</view>
<!-- 地点 -->
<!-- 地点 -->
<view class="place" a:if="{{!!
scheduleItem?(!!locationName?true:false):tru
e}}">
<view class="place" a:if="{{!!
locationNam
e}}">
<view class="icon iconfont icondingwei">
<view class="icon iconfont icondingwei">
</view>
</view>
<view class="text" data-nextPage="place" onTap="nextPage">
<view class="text" data-nextPage="place" onTap="nextPage">
...
@@ -131,8 +131,8 @@
...
@@ -131,8 +131,8 @@
</view>
</view>
</view>
</view>
<!-- 编辑列表 -->
<!-- 编辑列表 -->
<view class="editList" a:if="{{!!scheduleItem}}">
<view class="editList" a:if="{{!!scheduleItem
?true:(!locationName|| !aheadTimes.length?true:false)
}}">
<view a:if="{{!
!scheduleItem?(!!locationName?false:true):tru
e}}" class="listGroup" onTap="editSchedule" data-icon="icondingwei">
<view a:if="{{!
locationNam
e}}" class="listGroup" onTap="editSchedule" data-icon="icondingwei">
<view class="listIcon iconfont icondingwei">
<view class="listIcon iconfont icondingwei">
</view>
</view>
<view class="listText">
<view class="listText">
...
@@ -146,28 +146,28 @@
...
@@ -146,28 +146,28 @@
提醒
提醒
</view>
</view>
</view>
</view>
<view a:if="{{!repeatable}}" class="listGroup" onTap="editSchedule" data-icon="iconchongfu">
<view a:if="{{!repeatable
&&!!scheduleItem
}}" class="listGroup" onTap="editSchedule" data-icon="iconchongfu">
<view class="listIcon iconfont iconchongfu">
<view class="listIcon iconfont iconchongfu">
</view>
</view>
<view class="listText">
<view class="listText">
重复
重复
</view>
</view>
</view>
</view>
<view a:if="{{!remark}}" class="listGroup" onTap="editSchedule" data-icon="icondidianmiaoshu">
<view a:if="{{!remark
&&!!scheduleItem
}}" class="listGroup" onTap="editSchedule" data-icon="icondidianmiaoshu">
<view class="listIcon iconfont icondidianmiaoshu">
<view class="listIcon iconfont icondidianmiaoshu">
</view>
</view>
<view class="listText">
<view class="listText">
描述
描述
</view>
</view>
</view>
</view>
<view a:if="{{
scheduleItem.virtual=='N'
}}" class="listGroup" onTap="editSchedule" data-icon="iconshanchu">
<view a:if="{{
repeatable==0&&!!scheduleItem
}}" class="listGroup" onTap="editSchedule" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu">
<view class="listIcon iconfont iconshanchu">
</view>
</view>
<view class="listText">
<view class="listText">
删除
删除
</view>
</view>
</view>
</view>
<picker
a:else
value="{{0}}" range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule">
<picker
a:if="{{!!scheduleItem&&repeatable==1}}"
value="{{0}}" range="{{['仅删除此次会议', '删除以后会议', '删除所有会议']}}" onChange="deleteRepeatSchedule">
<view class="listGroup" data-icon="iconshanchu">
<view class="listGroup" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu">
<view class="listIcon iconfont iconshanchu">
</view>
</view>
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
</picker>
</picker>
</view>
</view>
<!-- 编辑重复的时候的保存 -->
<!-- 编辑重复的时候的保存 -->
<picker a:if="{{
scheduleItem.virtual=='Y
'}}" value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat">
<picker a:if="{{
repeatable=='1
'}}" value="{{0}}" range="{{['仅更新此会议', '更新以后会议', '更新所有会议']}}" onChange="saveRepeat">
<view>
<view>
<view class="save">
<view class="save">
<view>
<view>
...
...
pages/createOrEditSchedule/createOrEditSchedule.js
View file @
79285f0b
...
@@ -23,15 +23,19 @@ create.Page({
...
@@ -23,15 +23,19 @@ create.Page({
// 人员增量信息 减量信息 只有在编辑的时候使用
// 人员增量信息 减量信息 只有在编辑的时候使用
addUserList
:
undefined
,
addUserList
:
undefined
,
deleteUserList
:
undefined
,
deleteUserList
:
undefined
,
originUserList
:
[]
,
originUserList
:
[]
},
},
onLoad
(
event
)
{
onLoad
(
event
)
{
console
.
log
(
this
.
selectedelRequired
([
1
,
2
,
4
,
5
],
[
1
,
2
,
4
,
6
]))
let
index
=
new
Date
().
getDay
()
let
index
=
new
Date
().
getDay
()
this
.
data
.
repeatWeek
=
this
.
data
.
repeatWeek
[
index
-
1
]
this
.
data
.
repeatWeek
=
this
.
data
.
repeatWeek
[
index
-
1
]
this
.
store
.
data
.
remark
=
''
this
.
store
.
data
.
remark
=
''
this
.
store
.
data
.
recurrenceModel
=
{
this
.
store
.
data
.
recurrenceModel
=
{
model
:
"no_repeat"
model
:
"no_repeat"
}
}
this
.
store
.
data
.
repeatable
=
0
this
.
store
.
data
.
locationName
=
''
this
.
store
.
data
.
conflictPeople
=
[]
this
.
store
.
data
.
conflictPeople
=
[]
this
.
store
.
data
.
participatorList
=
[{
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
}]
this
.
store
.
data
.
participatorList
=
[{
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
}]
this
.
store
.
data
.
locationName
=
''
this
.
store
.
data
.
locationName
=
''
...
@@ -69,7 +73,6 @@ create.Page({
...
@@ -69,7 +73,6 @@ create.Page({
this
.
update
()
this
.
update
()
}
else
{
}
else
{
this
.
store
.
data
.
aheadTimes
=
[
15
]
this
.
store
.
data
.
aheadTimes
=
[
15
]
this
.
store
.
data
.
requireUserList
=
[
getApp
().
globalData
.
userid
]
this
.
update
()
this
.
update
()
}
}
this
.
conflict
()
this
.
conflict
()
...
@@ -151,18 +154,19 @@ create.Page({
...
@@ -151,18 +154,19 @@ create.Page({
title
:
event
.
detail
.
value
title
:
event
.
detail
.
value
})
})
},
},
// 添加参会人
//
创建
添加参会人
addParticipants
()
{
addParticipants
()
{
const
_that
=
this
const
_that
=
this
dd
.
complexChoose
({
dd
.
complexChoose
({
limitTips
:
"超出了"
,
//超过限定人数返回提示
limitTips
:
"超出了"
,
//超过限定人数返回提示
maxUsers
:
100
,
//最大可选人数
title
:
"选择参会人"
,
//标题
title
:
"选择参会人"
,
//标题
multiple
:
true
,
//是否多选
multiple
:
true
,
//是否多选
pickedUsers
:
_that
.
store
.
data
.
participatorUserId
,
//已选用户
pickedUsers
:
_that
.
store
.
data
.
participatorUserId
,
//已选用户
requiredUsers
:
_that
.
store
.
data
.
requireUserList
,
//必选用户(不可取消选中状态)
requiredUsers
:
[]
,
//必选用户(不可取消选中状态)
responseUserOnly
:
true
,
//返回人,或者返回人和部门
responseUserOnly
:
true
,
//返回人,或者返回人和部门
success
:
function
(
res
)
{
success
:
function
(
res
)
{
_that
.
store
.
data
.
participatorList
=
[]
_that
.
store
.
data
.
participatrUserId
=
[]
res
.
users
.
forEach
((
item
,
index
)
=>
{
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
.
headUrl
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
...
@@ -171,10 +175,33 @@ create.Page({
...
@@ -171,10 +175,33 @@ create.Page({
_that
.
store
.
data
.
participatorUserId
=
[...
new
Set
(
_that
.
store
.
data
.
participatorUserId
)]
_that
.
store
.
data
.
participatorUserId
=
[...
new
Set
(
_that
.
store
.
data
.
participatorUserId
)]
_that
.
update
()
_that
.
update
()
_that
.
conflict
()
_that
.
conflict
()
_that
.
arrayPoor
(
_that
.
data
.
originUserList
,
_that
.
store
.
data
.
participatorList
)
// _that.arrayPoor(_that.data.originUserList, _that.store.data.participatorList)
},
fail
:
function
(
err
)
{
}
})
},
// 编辑添加参会人
editPParticipants
()
{
const
_that
=
this
dd
.
complexChoose
({
title
:
"选择参会人"
,
//标题
multiple
:
true
,
//是否多选
pickedUsers
:
[],
//已选用户
requiredUsers
:
[],
//必选用户(不可取消选中状态)
responseUserOnly
:
true
,
//返回人,或者返回人和部门
success
:
function
(
res
)
{
res
.
users
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
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
.
update
()
_that
.
conflict
()
// _that.arrayPoor(_that.data.originUserList, _that.store.data.participatorList)
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
}
}
})
})
},
},
...
@@ -358,6 +385,9 @@ create.Page({
...
@@ -358,6 +385,9 @@ create.Page({
week1
:
this
.
data
.
weekList
[
new
Date
(
res
.
data
.
data
.
startTime
).
getDay
()],
week1
:
this
.
data
.
weekList
[
new
Date
(
res
.
data
.
data
.
startTime
).
getDay
()],
week2
:
this
.
data
.
weekList
[
new
Date
(
res
.
data
.
data
.
endTime
).
getDay
()]
week2
:
this
.
data
.
weekList
[
new
Date
(
res
.
data
.
data
.
endTime
).
getDay
()]
})
})
console
.
log
(
2222222
)
// this.store(JSON.stringify())
console
.
log
(
2222222
)
this
.
update
()
this
.
update
()
this
.
conflict
()
this
.
conflict
()
})
})
...
@@ -494,6 +524,19 @@ create.Page({
...
@@ -494,6 +524,19 @@ create.Page({
})
})
},
},
// 去重
// 已选用户去中去掉必选用户
selectedelRequired
(
requiredUsers
,
pickedUsers
)
{
for
(
let
i
=
0
;
i
<
requiredUsers
.
length
;
i
++
)
{
for
(
let
m
=
0
;
m
<
pickedUsers
.
length
;
m
++
)
{
if
(
requiredUsers
[
i
]
==
pickedUsers
[
m
])
{
pickedUsers
.
splice
(
m
,
1
)
m
--
;
}
}
}
return
{
requiredUsers
:
requiredUsers
,
pickedUsers
:
pickedUsers
}
}
});
});
pages/scheduleDetail/scheduleDetail.axml
View file @
79285f0b
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</view>
</view>
<view class="text blank">
<view class="text blank">
<text a:if="{{aheadTimes.includes(0)}}">立即提醒</text>
<text a:if="{{aheadTimes.includes(0)}}">立即提醒</text>
<text a:if="{{aheadTimes.includes(
1
)}}">5分钟前</text>
<text a:if="{{aheadTimes.includes(
5
)}}">5分钟前</text>
<text a:if="{{aheadTimes.includes(15)}}">15分钟前</text>
<text a:if="{{aheadTimes.includes(15)}}">15分钟前</text>
<text a:if="{{aheadTimes.includes(30)}}">30分钟前</text>
<text a:if="{{aheadTimes.includes(30)}}">30分钟前</text>
<text a:if="{{aheadTimes.includes(60)}}">1小时前</text>
<text a:if="{{aheadTimes.includes(60)}}">1小时前</text>
...
...
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