Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sedu-mobile-v2
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
liuzhanxin
sedu-mobile-v2
Commits
66503f34
Commit
66503f34
authored
Jul 13, 2020
by
liuzhanxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改预约问题
parent
7e8a4c98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
dark-calendar.vue
cloudTrain/components/dark-calendar/dark-calendar.vue
+8
-5
calendar.vue
cloudTrain/pages/Appointment/calendar.vue
+14
-2
No files found.
cloudTrain/components/dark-calendar/dark-calendar.vue
View file @
66503f34
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<view
:class=
"
{ hide: !monthOpen }" class="content" :style="{ height: height }">
<view
:class=
"
{ hide: !monthOpen }" class="content" :style="{ height: height }">
<view
:style=
"
{ top: positionTop + 'upx' }" class="days">
<view
:style=
"
{ top: positionTop + 'upx' }" class="days">
<view
class=
"item"
v-for=
"(item, index) in dates"
:key=
"index"
>
<view
class=
"item"
v-for=
"(item, index) in dates"
:key=
"index"
>
<view
class=
"day"
@
click=
"selectOne(item, $event)"
:class=
"
{ choose: choose == handleDate(item.year,item.month+1,item.date), nolm: !item.lm }">
{{
item
.
date
}}
</view>
<view
class=
"day"
@
click=
"selectOne(item, $event)"
:class=
"
{ choose: choose == handleDate(item.year,item.month+1,item.date), nolm: !item.lm
|| isSigned(item.year, item.month + 1, item.date).isOvertime
}">
{{
item
.
date
}}
</view>
<view
:class=
"isSigned(item.year, item.month + 1, item.date).isOvertime? 'can-not-sign' : 'sign'
"
v-if=
"isSigned(item.year, item.month + 1, item.date).signState"
></view>
<view
class=
"sign
"
v-if=
"isSigned(item.year, item.month + 1, item.date).signState"
></view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -42,7 +42,11 @@ export default {
...
@@ -42,7 +42,11 @@ export default {
open
:
{
open
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
}
},
choose
:
{
type
:
String
,
default
:
""
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -57,7 +61,6 @@ export default {
...
@@ -57,7 +61,6 @@ export default {
dates
:
[],
// 当前月日期集合
dates
:
[],
// 当前月日期集合
positionTop
:
0
,
positionTop
:
0
,
monthOpen
:
true
,
monthOpen
:
true
,
choose
:
''
}
}
},
},
created
()
{
created
()
{
...
@@ -210,7 +213,7 @@ export default {
...
@@ -210,7 +213,7 @@ export default {
}
}
this
.
dates
=
this
.
monthDay
(
this
.
y
,
this
.
m
)
this
.
dates
=
this
.
monthDay
(
this
.
y
,
this
.
m
)
this
.
$emit
(
'monthChange'
,
this
.
dates
[
0
])
this
.
$emit
(
'monthChange'
,
this
.
dates
[
0
]
,
this
.
y
,
this
.
m
)
},
},
handleDate
(
y
,
m
,
d
){
handleDate
(
y
,
m
,
d
){
var
dateStr
=
""
;
var
dateStr
=
""
;
...
...
cloudTrain/pages/Appointment/calendar.vue
View file @
66503f34
<
template
>
<
template
>
<view
style=
"width: 100%;height: 100%;background-color: #F7F7F7;display:flex;flex-direction: column;padding:0"
>
<view
style=
"width: 100%;height: 100%;background-color: #F7F7F7;display:flex;flex-direction: column;padding:0"
>
<Calendar
@
on-click=
"onDateClick"
@
monthChange=
"onMonthChange"
:signeddates=
"signeddates"
/>
<Calendar
@
on-click=
"onDateClick"
@
monthChange=
"onMonthChange"
:signeddates=
"signeddates"
:choose=
"currentDate"
/>
<scroll-view
style=
"height:400px;padding:0;width:100%"
:scroll-top=
"scrollTop"
scroll-y=
"true"
class=
"scroll-Y"
@
scrolltoupper=
"upper"
<scroll-view
style=
"height:400px;padding:0;width:100%"
:scroll-top=
"scrollTop"
scroll-y=
"true"
class=
"scroll-Y"
@
scrolltoupper=
"upper"
@
scrolltolower=
"lower"
@
scroll=
"scroll"
>
@
scrolltolower=
"lower"
@
scroll=
"scroll"
>
<view
v-if=
"currentCalendarData.length>0"
class=
"infoContainer"
>
<view
v-if=
"currentCalendarData.length>0"
class=
"infoContainer"
>
...
@@ -74,6 +74,7 @@
...
@@ -74,6 +74,7 @@
],
],
settingData
:{},
settingData
:{},
submitShow
:
false
,
submitShow
:
false
,
currentDate
:
""
}
}
},
},
...
@@ -84,6 +85,7 @@
...
@@ -84,6 +85,7 @@
},
},
methods
:
{
methods
:
{
onLoad
()
{
onLoad
()
{
this
.
currentDate
=
this
.
GLOBALUTIL
.
moment
().
format
(
"YYYY-MM-DD"
)
var
that
=
this
;
var
that
=
this
;
uni
.
$on
(
'calendarData'
,
function
(
data
)
{
uni
.
$on
(
'calendarData'
,
function
(
data
)
{
var
detailData
=
data
[
0
]
var
detailData
=
data
[
0
]
...
@@ -351,10 +353,20 @@
...
@@ -351,10 +353,20 @@
},
},
onDateClick
(
date
){
onDateClick
(
date
){
this
.
curSelectedDate
=
date
;
this
.
curSelectedDate
=
date
;
this
.
currentDate
=
date
;
this
.
getByDay
(
this
.
settingData
.
id
,
date
);
this
.
getByDay
(
this
.
settingData
.
id
,
date
);
},
},
onMonthChange
(
date
){
onMonthChange
(
firstdate
,
year
,
month
){
var
m
=
(
month
+
1
)
>
9
?
month
+
1
:
"0"
+
(
month
+
1
)
var
date
=
""
+
year
+
"-"
+
m
+
"-01"
var
curmonth
=
this
.
GLOBALUTIL
.
moment
().
get
(
'month'
);
if
(
curmonth
==
month
){
date
=
this
.
GLOBALUTIL
.
moment
().
format
(
"YYYY-MM-DD"
)
}
this
.
curSelectedDate
=
date
;
this
.
currentDate
=
date
;
this
.
getByMonth
(
this
.
settingData
.
id
,
date
);
this
.
getByMonth
(
this
.
settingData
.
id
,
date
);
this
.
getByDay
(
this
.
settingData
.
id
,
date
);
},
},
refresh
(){
refresh
(){
this
.
getByDay
(
this
.
settingData
.
id
,
this
.
curSelectedDate
);
this
.
getByDay
(
this
.
settingData
.
id
,
this
.
curSelectedDate
);
...
...
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