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
a4a235c4
Commit
a4a235c4
authored
Feb 18, 2020
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改编辑会议时间选择
parent
8b3dee38
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
18 deletions
+75
-18
createOrEditSchedule.axml
pages/createOrEditSchedule/createOrEditSchedule.axml
+2
-2
createOrEditSchedule.js
pages/createOrEditSchedule/createOrEditSchedule.js
+27
-12
repeatMechanism.js
pages/repeatMechanism/repeatMechanism.js
+1
-0
repetitionTime.js
pages/repetitionTime/repetitionTime.js
+43
-3
exampleStore.js
stores/exampleStore.js
+2
-1
No files found.
pages/createOrEditSchedule/createOrEditSchedule.axml
View file @
a4a235c4
...
...
@@ -106,8 +106,8 @@
</view>
</view>
<view class="terminationTime" onTap="selectTerminal">
<text a:if="{{
!recurrenceModel.terminateTime
}}">永不截止</text>
<text a:else>截止至{{recurrenceModel.terminateTime
.substring(0,10)
}}</text>
<text a:if="{{
isMeetingNeverStop
}}">永不截止</text>
<text a:else>截止至{{recurrenceModel.terminateTime}}</text>
</view>
</view>.
<!--<view class="repeatTime"><view class="iconfont iconchongfu "></view><view class="repeatText">
...
...
pages/createOrEditSchedule/createOrEditSchedule.js
View file @
a4a235c4
...
...
@@ -213,9 +213,23 @@ create.Page({
}
return
Object
.
values
(
containt
)
},
// 获取两年后的今天
getTwoYearToday
(){
let
date
=
new
Date
()
date
.
setYear
(
date
.
getFullYear
()
+
2
)
let
year
=
date
.
getFullYear
();
let
month
=
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
()
<
10
?
'0'
+
date
.
getDate
()
:
date
.
getDate
()
return
year
+
'-'
+
month
+
'-'
+
day
},
// 保存
saveCreate
()
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
this
.
store
.
data
.
isMeetingNeverStop
)
{
this
.
store
.
data
.
recurrenceModel
.
terminateTime
=
this
.
getTwoYearToday
();
this
.
store
.
data
.
recurrenceModel
.
forever
=
'1'
;
this
.
update
()
}
let
data
=
{
shcheduleType
:
'common'
,
deleteUserList
:
this
.
data
.
deleteUserList
,
...
...
@@ -387,18 +401,19 @@ create.Page({
},
// 选择终止时间
selectTerminal
()
{
let
time2
=
this
.
data
.
time2
dd
.
datePicker
({
format
:
'yyyy-MM-dd'
,
currentDate
:
''
,
success
:
(
res
)
=>
{
this
.
store
.
data
.
recurrenceModel
.
terminateTime
=
`
${
res
.
date
}
`
this
.
update
()
},
error
:
(
err
)
=>
{
console
.
log
(
JSON
.
stringify
(
err
))
}
})
// let time2 = this.data.time2
// dd.datePicker({
// format: 'yyyy-MM-dd',
// currentDate: '',
// success: (res) => {
// this.store.data.recurrenceModel.terminateTime = `${res.date} `
// this.update()
// },
// error: (err) => {
// console.log(JSON.stringify(err))
// }
// })
dd
.
navigateTo
(({
url
:
`./../repetitionTime/repetitionTime`
}))
},
// 数组取差值 原先的数组与现在的比较 增加与减少
arrayPoor
(
origin
,
now
)
{
...
...
pages/repeatMechanism/repeatMechanism.js
View file @
a4a235c4
...
...
@@ -41,6 +41,7 @@ create.Page({
this
.
store
.
data
.
recurrenceModel
=
{
model
:
"day_in_week"
,
weekDayList
:
weekDayList
,
terminateTime
:
''
}
break
;
}
this
.
store
.
data
.
isMeetingNeverStop
=
true
this
.
update
()
dd
.
navigateBack
({
delta
:
1
...
...
pages/repetitionTime/repetitionTime.js
View file @
a4a235c4
Page
({
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
timeYear
:
[],
timeMonth
:
[
'01'
,
'02'
,
'03'
,
'04'
,
'05'
,
'06'
,
'07'
,
'08'
,
'09'
,
'10'
,
'11'
,
'12'
],
...
...
@@ -12,6 +16,7 @@ Page({
isBeOverdue
:
false
,
},
onLoad
()
{
if
(
!
this
.
store
.
data
.
recurrenceModel
.
terminateTime
||
this
.
store
.
data
.
recurrenceModel
.
forever
==
'1'
)
{
let
date
=
new
Date
();
let
year
=
date
.
getFullYear
();
let
timeYear
=
[
`
${
year
}
年`
,
`
${
year
+
1
}
年`
]
...
...
@@ -37,6 +42,34 @@ Page({
week
:
weekList
[
date
.
getDay
()],
pickerValue
:
[
timeYear
.
indexOf
(
`
${
date
.
getFullYear
()}
年`
),
timeMonth
.
indexOf
(
`
${
date
.
getMonth
()
+
1
}
月`
),
timeDay
.
indexOf
(
`
${
date
.
getDate
()}
日
${
weekList
[
date
.
getDay
()]}
`
)]
})
}
else
{
let
date
=
new
Date
();
let
date2
=
new
Date
(
this
.
store
.
data
.
recurrenceModel
.
terminateTime
.
replace
(
/-/g
,
'/'
))
let
year
=
date
.
getFullYear
();
let
timeYear
=
[
`
${
year
}
年`
,
`
${
year
+
1
}
年`
]
let
timeMonth
=
[]
let
timeDay
=
[]
let
thisDate
=
date2
.
getDate
()
let
weekList
=
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
]
for
(
let
i
=
1
;
i
<=
12
;
i
++
)
{
timeMonth
.
push
(
`
${
i
}
月`
)
}
let
day
=
this
.
getMonthLength
(
year
,
date2
.
getMonth
(),
1
)
for
(
let
i
=
1
;
i
<=
day
;
i
++
)
{
let
thisweek
=
weekList
[
new
Date
(
year
,
date2
.
getMonth
(),
i
).
getDay
()]
timeDay
.
push
(
`
${
i
}
日
${
thisweek
}
`
)
}
this
.
setData
({
timeYear
:
timeYear
,
timeMonth
:
timeMonth
,
timeDay
:
timeDay
,
year
:
year
,
month
:
date2
.
getMonth
()
+
1
,
day
:
thisDate
,
week
:
weekList
[
date2
.
getDay
()],
pickerValue
:
[
timeYear
.
indexOf
(
`
${
date2
.
getFullYear
()}
年`
),
timeMonth
.
indexOf
(
`
${
date2
.
getMonth
()
+
1
}
月`
),
timeDay
.
indexOf
(
`
${
date2
.
getDate
()}
日
${
weekList
[
date2
.
getDay
()]}
`
)]
})
}
},
getMonthLength
(
year
,
month
,
day
)
{
let
d
=
new
Date
(
year
,
month
,
day
)
...
...
@@ -57,10 +90,17 @@ Page({
return
false
;
}
else
{
if
(
this
.
data
.
isNeverStop
)
{
console
.
log
(
this
.
getTwoYearToday
())
let
data
=
this
.
getTwoYearToday
();
this
.
store
.
data
.
isMeetingNeverStop
=
true
;
this
.
store
.
data
.
recurrenceModel
.
terminateTime
=
data
}
else
{
this
.
store
.
data
.
isMeetingNeverStop
=
false
;
this
.
store
.
data
.
recurrenceModel
.
terminateTime
=
`
${
this
.
data
.
year
}
-
${
this
.
data
.
month
<
10
?
'0'
+
this
.
data
.
month
:
this
.
data
.
month
}
-
${
this
.
data
.
day
<
10
?
'0'
+
this
.
data
.
day
:
this
.
data
.
day
}
`
}
this
.
update
();
dd
.
navigateBack
({
delta
:
1
})
}
},
getTwoYearToday
(){
...
...
stores/exampleStore.js
View file @
a4a235c4
...
...
@@ -13,7 +13,8 @@ class Store {
editList
:
[{
icon
:
'icondingwei'
,
text
:
'地点'
},
{
icon
:
'iconhuiqiantixing'
,
text
:
'提醒'
},
{
icon
:
'iconchongfu'
,
text
:
'重复'
},
{
icon
:
'icondidianmiaoshu'
,
text
:
'描述'
},
{
icon
:
'iconshanchu'
,
text
:
'删除'
}],
remark
:
''
,
// 会议描述
aheadTimes
:
[],
requireUserList
:
[]
requireUserList
:
[],
isMeetingNeverStop
:
true
}
}
...
...
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