Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
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
向伟
educationStu
Commits
95a05a59
Commit
95a05a59
authored
Feb 21, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
cb346208
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
5 deletions
+37
-5
index.vue
src/pages/appointment/index.vue
+37
-5
No files found.
src/pages/appointment/index.vue
View file @
95a05a59
...
...
@@ -332,14 +332,45 @@
data
.
basics
=
res
.
Data
;
const
date
=
new
Date
()
const
y
=
date
.
getFullYear
()
const
m
=
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
const
m
=
date
.
getMonth
()
+
1
const
d
=
date
.
getDate
()
const
maxStr
=
y
+
'-'
+
m
+
'-'
+
(
d
+
res
.
Data
.
AppointDay
-
1
)
const
curMonthMaxDay
=
new
Date
(
y
,
m
,
0
).
getDate
()
const
day
=
d
+
res
.
Data
.
AppointDay
-
1
// 跨月
//日历最大值 start
let
maxYear
=
y
let
maxMonth
=
m
let
maxDay
=
day
if
(
maxDay
>
curMonthMaxDay
&&
m
!==
12
)
{
maxDay
=
day
-
curMonthMaxDay
maxMonth
=
m
+
1
}
else
if
(
maxDay
>
curMonthMaxDay
&&
m
===
12
)
{
// 跨年
maxYear
=
y
+
1
maxMonth
=
1
maxDay
=
day
-
curMonthMaxDay
}
const
maxStr
=
maxYear
+
'-'
+
(
maxMonth
<
10
?
'0'
+
maxMonth
:
maxMonth
)
+
'-'
+
(
maxDay
<
10
?
'0'
+
maxDay
:
maxDay
)
data
.
maxDateStr
=
new
Date
(
maxStr
).
getTime
()
//日历最大值 end
//日历最小值 start
if
(
res
.
Data
.
AdvanceDay
)
{
const
minStr
=
y
+
'-'
+
m
+
'-'
+
((
d
+
res
.
Data
.
AdvanceDay
)
<
10
?
'0'
+
(
d
+
res
.
Data
.
AdvanceDay
)
:
(
d
+
res
.
Data
.
AdvanceDay
))
let
minYear
=
y
let
minMonth
=
m
let
minDay
=
d
+
res
.
Data
.
AdvanceDay
if
(
minDay
>
curMonthMaxDay
&&
m
!==
12
)
{
minDay
=
day
-
curMonthMaxDay
minMonth
=
m
+
1
}
else
if
(
minDay
>
curMonthMaxDay
&&
m
===
12
)
{
// 跨年
minYear
=
y
+
1
minMonth
=
1
minDay
=
day
-
curMonthMaxDay
}
const
minStr
=
minYear
+
'-'
+
(
minMonth
<
10
?
'0'
+
minMonth
:
minMonth
)
+
'-'
+
(
minDay
<
10
?
'0'
+
minDay
:
minDay
)
data
.
minDateStr
=
new
Date
(
minStr
).
getTime
()
this
.
getDateData
(
minStr
)
data
.
msg
.
Date
=
minStr
...
...
@@ -349,6 +380,7 @@
data
.
msg
.
School_Id
=
schoolId
}
this
.
getTeacherList
()
}
})
},
...
...
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