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
cbccd6de
Commit
cbccd6de
authored
Aug 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
918fcc2e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
10 deletions
+30
-10
pages.json
src/pages.json
+9
-0
timeTable-item.vue
src/pages/course/timeTable-item.vue
+1
-0
timeTable.vue
src/pages/course/timeTable.vue
+4
-1
date.js
src/utils/date.js
+16
-9
No files found.
src/pages.json
View file @
cbccd6de
...
...
@@ -29,6 +29,15 @@
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"askForLeave"
//请假
},
{
"path"
:
"askForLeaveDetail"
//请假详情
},
{
"path"
:
"askForLeaveList"
//请假列表
}
]
},
...
...
src/pages/course/timeTable-item.vue
View file @
cbccd6de
...
...
@@ -22,6 +22,7 @@
<view
class=
"btn-box"
>
<van-button
custom-class=
"leave-btn"
@
click=
"jumpPage('/pages/course/askForLeave')"
>
请假
</van-button
>
<van-button
custom-class=
"already-leave-btn one_line"
>
已请假
</van-button>
...
...
src/pages/course/timeTable.vue
View file @
cbccd6de
...
...
@@ -126,6 +126,7 @@ export default {
let
onClose
=
()
=>
{
showPopup
.
value
=
false
;
};
let
onConfirm
=
(
val
)
=>
{
showPopup
.
value
=
false
;
isShowAllDay
.
value
=
true
;
...
...
@@ -146,10 +147,11 @@ export default {
let
calendar
=
ref
([]);
//默认选中
let
activeDay
=
ref
(
1
);
//切换选中日期
let
calendarActive
=
(
item
)
=>
{
activeDay
.
value
=
item
.
day
;
};
let
emptyArr
=
[];
//补空
let
emptyArr
=
[];
//
日历
补空
let
getcalendar
=
(
y
,
m
)
=>
{
calendar
.
value
=
getWeek
(
y
,
m
);
if
(
calendar
.
value
[
0
].
week
>
0
)
{
...
...
@@ -170,6 +172,7 @@ export default {
sliceWeekArr
.
value
.
unshift
(...
emptyArr
);
}
};
//切换日历展示模式
let
changeCalendar
=
()
=>
{
isShowAllDay
.
value
=
!
isShowAllDay
.
value
;
};
...
...
src/utils/date.js
View file @
cbccd6de
...
...
@@ -8,18 +8,16 @@ export let getWeek = (year, month) => {
let
date
=
new
Date
(
year
+
'-'
+
month
+
'-'
+
i
)
let
week
=
date
.
getDay
()
let
weekStr
=
""
let
isToday
=
0
let
today
=
new
Date
(
getToday
()).
getTime
()
let
today2
=
new
Date
(
year
+
'-'
+
(
month
<
10
?
'0'
+
month
:
month
)
+
'-'
+
(
i
<
10
?
'0'
+
i
:
i
)).
getTime
()
if
(
today
===
today2
){
isToday
=
1
console
.
log
(
i
,
isToday
)
let
isToday
=
0
let
today
=
new
Date
(
getToday
()).
getTime
()
let
today2
=
new
Date
(
year
+
'-'
+
(
month
<
10
?
'0'
+
month
:
month
)
+
'-'
+
(
i
<
10
?
'0'
+
i
:
i
)).
getTime
()
if
(
today
===
today2
)
{
isToday
=
1
}
arr
.
push
({
week
:
week
,
day
:
i
,
isToday
:
isToday
isToday
:
isToday
})
}
return
arr
...
...
@@ -29,7 +27,7 @@ export let getToday = (y, m, d) => {
let
date
=
new
Date
()
let
year
=
date
.
getFullYear
()
let
month
=
date
.
getMonth
()
<
9
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
let
day
=
date
.
getDate
()
<
9
?
'0'
+
(
date
.
getDate
()
+
1
)
:
date
.
getDate
()
let
day
=
date
.
getDate
()
<
10
?
'0'
+
(
date
.
getDate
()
)
:
date
.
getDate
()
let
today
=
year
+
"-"
+
month
+
'-'
+
day
let
curMonth
=
year
+
"-"
+
month
if
(
y
&&
m
)
{
...
...
@@ -37,5 +35,14 @@ export let getToday = (y, m, d) => {
}
else
{
return
today
}
}
export
let
getdate
=
(
time
)
=>
{
let
date
=
new
Date
(
time
)
let
year
=
date
.
getFullYear
()
let
month
=
date
.
getMonth
()
<
9
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
let
day
=
date
.
getDate
()
<
10
?
'0'
+
(
date
.
getDate
())
:
date
.
getDate
()
let
d
=
year
+
"-"
+
month
+
'-'
+
day
// let curMonth = year + "-" + month
return
d
}
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