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
7a0232ca
Commit
7a0232ca
authored
Jul 05, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
01018a2c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
791 additions
and
99 deletions
+791
-99
classList.vue
src/components/bookAclass/classList.vue
+32
-3
addPlan.vue
src/pages/bookAclass/addPlan.vue
+7
-7
index.vue
src/pages/bookAclass/index.vue
+44
-89
lx-calendar.md
src/pages/bookAclass/lx-calendar/lx-calendar.md
+0
-0
lx-calendar.vue
src/pages/bookAclass/lx-calendar/lx-calendar.vue
+708
-0
No files found.
src/components/bookAclass/classList.vue
View file @
7a0232ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<view>
{{
i
.
DateStr
.
slice
(
8
,
10
)
}}
日
</view>
<view>
{{
i
.
DateStr
.
slice
(
8
,
10
)
}}
日
</view>
</view>
</view>
<view
class=
"time-text"
>
<view
class=
"time-text"
>
{{
i
.
Week
}}
{{
getDateData
(
i
.
DateStr
)
}}
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
:disabled="true">
:disabled="true">
<view
class=
"content-text-box"
>
<view
class=
"content-text-box"
>
<view
class=
"right-box"
>
<view
class=
"right-box"
>
<view
v-for=
"(item,index) in i.SubList"
<view
v-for=
"(item,index) in i.SubList
.sort((a,b)=>
{a-b})
"
:key="index"
:key="index"
class="Festival-box activeOne"
class="Festival-box activeOne"
:class="{'activeOne':item.StartTime=='09:30','activeTwo':item.StartTime=='11:10',
:class="{'activeOne':item.StartTime=='09:30','activeTwo':item.StartTime=='11:10',
...
@@ -77,7 +77,36 @@
...
@@ -77,7 +77,36 @@
})
})
const
methods
=
{
const
methods
=
{
// 获取日期
getDateData
(
d
)
{
let
date
=
new
Date
(
d
)
let
week
=
date
.
getDay
()
let
weekStr
=
""
switch
(
week
)
{
case
0
:
weekStr
=
'星期日'
;
break
;
case
1
:
weekStr
=
'星期一'
;
break
;
case
2
:
weekStr
=
'星期二'
;
break
;
case
3
:
weekStr
=
'星期三'
;
break
;
case
4
:
weekStr
=
'星期四'
;
break
;
case
5
:
weekStr
=
'星期五'
;
break
;
case
6
:
weekStr
=
'星期六'
;
break
;
}
return
weekStr
},
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
...
...
src/pages/bookAclass/addPlan.vue
View file @
7a0232ca
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<view>
节
</view>
<view>
节
</view>
</view>
</view>
</view>
</view>
<view
v-for=
"(item,index) in titleList"
<view
v-for=
"(item,index) in titleList"
:key=
"index"
class=
"header-week"
>
class=
"header-week"
>
<view>
{{
item
.
num
}}
</view>
<view>
{{
item
.
num
}}
</view>
<view>
{{
item
.
name
}}
</view>
<view>
{{
item
.
name
}}
</view>
...
@@ -28,14 +28,14 @@
...
@@ -28,14 +28,14 @@
</view>
</view>
<view
class=
"text-right"
>
<view
class=
"text-right"
>
<view
class=
"status-box border0"
>
<view
class=
"status-box border0"
>
<view
v-for=
"
i in 7
"
<view
v-for=
"
(i,index) in 7"
:key=
"index
"
class=
"text-img"
>
class=
"text-img"
>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"content-text"
v-for=
"
item in classList
"
>
<view
class=
"content-text"
v-for=
"
(item,index) in classList"
:key=
"index
"
>
<view
class=
"text-left"
>
<view
class=
"text-left"
>
<view
class=
"left-num"
>
<view
class=
"left-num"
>
<view>
{{
item
.
name
}}
</view>
<view>
{{
item
.
name
}}
</view>
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<view
class=
"text-right"
<view
class=
"text-right"
:class=
"
{'border0':item.id==6}">
:class=
"
{'border0':item.id==6}">
<view
class=
"status-box"
>
<view
class=
"status-box"
>
<view
v-for=
"(i,indexs) in item.list"
<view
v-for=
"(i,indexs) in item.list"
:key=
"indexs"
class=
"text-img"
class=
"text-img"
:class=
"
{'activeOne':item.id==1
&&
i.DetailsId,
:class=
"
{'activeOne':item.id==1
&&
i.DetailsId,
'activeTwo':item.id==2
&&
i.DetailsId,
'activeTwo':item.id==2
&&
i.DetailsId,
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<view
v-if=
"item.id!=6"
class=
"height30"
>
</view>
<view
v-if=
"item.id!=6"
class=
"height30"
>
</view>
</view>
</view>
</view>
</view>
<view
class=
"content-text"
v-for=
"(i,index) in 2"
>
<view
class=
"content-text"
v-for=
"(i,index) in 2"
:key=
"index"
>
<view
class=
"text-left"
>
<view
class=
"text-left"
>
<view
class=
"left-num"
>
<view
class=
"left-num"
>
<view></view>
<view></view>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</view>
</view>
<view
class=
"text-right"
>
<view
class=
"text-right"
>
<view
class=
"status-box border0"
>
<view
class=
"status-box border0"
>
<view
v-for=
"
i in 7
"
<view
v-for=
"
(i,keys) in 7"
:key=
"keys
"
class=
"text-img"
>
class=
"text-img"
>
</view>
</view>
...
@@ -371,7 +371,7 @@
...
@@ -371,7 +371,7 @@
margin-left
:
2
rpx
;
margin-left
:
2
rpx
;
}
}
.header-week
{
.header-week
{
width
:
90
rpx
;
width
:
89
rpx
;
flex-shrink
:
0
;
flex-shrink
:
0
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
src/pages/bookAclass/index.vue
View file @
7a0232ca
...
@@ -3,60 +3,12 @@
...
@@ -3,60 +3,12 @@
<view
class=
"titleHeader"
>
<view
class=
"titleHeader"
>
<view
class=
"titleHeader-year"
>
<view
class=
"titleHeader-year"
>
<view>
{{
year
}}
年
{{
month
}}
月
</view>
<view>
{{
year
}}
年
{{
month
}}
月
</view>
<!--
<view>
本周
</view>
-->
<view>
计划
{{
total
}}
节课
</view>
<view>
计划
{{
total
}}
节课
</view>
</view>
</view>
<!-- 滑动查看上周本周 -->
<lxCalendar
@
chang=
"getData"
:titleList=
"titleList"
></lxCalendar>
<!--
<swiper
:style=
"
{height:!isShowAllDay?'220rpx':'620rpx'}" circular :current="1"
@change="changeSwiper($event,preSwiperId)">
<swiper-item
:key=
"Sindex"
v-for=
"i in 2"
>
<view
class=
"titleHeader-dateStr"
>
<view
v-for=
"item in titleList"
class=
"titleHeader-content"
>
<view
class=
"titleHeader-name"
>
{{
item
.
name
}}
</view>
<view
class=
"titleHeader-num"
>
{{
item
.
num
}}
</view>
<view
class=
"titleHeader-mark"
v-if=
"dataList.length>0"
>
<view
v-for=
"(items,index) in item.listNum"
:key=
"index"
:class=
"
{'activeOne':items.StartTime=='09:30','activeTwo':items.StartTime=='11:10',
'activeThree':items.StartTime=='13:30','activeFour':items.StartTime=='15:10',
'activeFive':items.StartTime=='16:50','activeSix':item.StartTime=='19:00'}">
</view>
</view>
</view>
</view>
<view
class=
"content-box"
v-if=
"dataList.length>0&&total>0"
>
</view>
</swiper-item>
</swiper>
-->
<!-- 按钮切换上周下周本周 -->
<view
class=
"titleHeader-dateStr"
>
<view
v-if=
"weekShow"
class=
"week"
@
click=
"getMonday(0)"
>
本周
</view>
<view
class=
"position clickLeft"
@
click=
"getMonday(-1)"
>
<van-icon
name=
"arrow-left"
size=
"28rpx"
color=
"#333333"
></van-icon>
</view>
<view
v-for=
"item in titleList"
class=
"titleHeader-content"
>
<view
class=
"titleHeader-name"
>
{{
item
.
name
}}
</view>
<view
class=
"titleHeader-num"
>
{{
item
.
num
.
slice
(
8
,
10
)
}}
</view>
<view
class=
"titleHeader-mark"
v-if=
"item.listNum.length>0"
>
<view
v-for=
"(items,index) in item.listNum"
:key=
"index"
:class=
"
{'activeOne':items.StartTime=='09:30','activeTwo':items.StartTime=='11:10',
'activeThree':items.StartTime=='13:30','activeFour':items.StartTime=='15:10',
'activeFive':items.StartTime=='16:50','activeSix':items.StartTime=='19:00'}">
</view>
</view>
</view>
<view
class=
"position clickRight"
@
click=
"getMonday(1)"
>
<van-icon
name=
"arrow"
size=
"28rpx"
color=
"#333333"
></van-icon>
</view>
</view>
</view>
<view
class=
"content-box"
v-if=
"dataList.length>0"
>
<scroll-view
scroll-y=
"true"
style=
"width:100%;height: 100%;"
>
<scroll-view
scroll-y=
"true"
style=
"width:100%;height: 100%;"
>
<classList
:classList=
"dataList"
></classList>
<classList
:classList=
"dataList"
></classList>
</scroll-view>
</scroll-view>
...
@@ -93,10 +45,12 @@
...
@@ -93,10 +45,12 @@
}
from
'../../utils/date.js'
}
from
'../../utils/date.js'
import
Navbar
from
'../../components/navbar.vue'
import
Navbar
from
'../../components/navbar.vue'
import
classList
from
'../../components/bookAclass/classList.vue'
import
classList
from
'../../components/bookAclass/classList.vue'
import
lxCalendar
from
'./lx-calendar/lx-calendar.vue'
export
default
{
export
default
{
components
:
{
components
:
{
Navbar
,
Navbar
,
classList
classList
,
lxCalendar
},
},
props
:
[
'day'
],
props
:
[
'day'
],
setup
(
props
)
{
setup
(
props
)
{
...
@@ -119,32 +73,19 @@
...
@@ -119,32 +73,19 @@
total
:
0
,
total
:
0
,
dataList
:[],
dataList
:[],
titleList
:[
titleList
:[
{
name
:
'星期一'
,
num
:
''
,
listNum
:[]},
{
date
:
''
,
list
:[]},
{
name
:
'星期二'
,
num
:
''
,
listNum
:[]},
{
date
:
''
,
list
:[]},
{
name
:
'星期三'
,
num
:
''
,
listNum
:[]},
{
date
:
''
,
list
:[]},
{
name
:
'星期四'
,
num
:
''
,
listNum
:[]},
{
date
:
''
,
list
:[]},
{
name
:
'星期五'
,
num
:
''
,
listNum
:[]},
{
date
:
''
,
list
:[]},
{
name
:
'星期六'
,
num
:
''
,
listNum
:[]},
{
date
:
''
,
list
:[]},
{
name
:
'星期日'
,
num
:
''
,
listNum
:[]},
{
date
:
''
,
list
:[]},
],
],
currentSwiper
:
1
,
preSwiperId
:
1
,
weekType
:
0
,
weekType
:
0
,
weekShow
:
false
,
weekShow
:
false
,
weekList
:[]
weekList
:[]
})
})
const
methods
=
{
const
methods
=
{
changeSwiper
(
val
,
PreId
)
{
let
CurId
=
val
.
detail
.
current
// 上周
if
(
CurId
==
0
){
methods
.
getMonday
(
-
1
)
}
// 本周
if
(
CurId
==
1
){
methods
.
getMonday
(
0
)
}
},
addPlan
(){
addPlan
(){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/bookAclass/addPlan'
,
url
:
'/pages/bookAclass/addPlan'
,
...
@@ -192,6 +133,7 @@
...
@@ -192,6 +133,7 @@
},
},
// 实现方法
// 实现方法
getMonday
(
dates
)
{
getMonday
(
dates
)
{
return
data
.
weekType
=
dates
data
.
weekType
=
dates
let
arr
=
[],
weekOne
=
''
;
let
arr
=
[],
weekOne
=
''
;
let
todayTimeStr
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
let
todayTimeStr
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
...
@@ -244,7 +186,15 @@
...
@@ -244,7 +186,15 @@
methods
.
getList
()
methods
.
getList
()
return
arr
;
return
arr
;
},
},
getData
(
arr
){
data
.
year
=
arr
[
0
].
date
.
slice
(
0
,
4
)
data
.
month
=
arr
[
0
].
date
.
slice
(
5
,
6
)
<
10
?
arr
[
0
].
date
.
slice
(
5
,
6
):
arr
[
0
].
date
.
slice
(
5
,
7
)
data
.
msg
.
StartDate
=
arr
[
0
].
date
data
.
msg
.
EndDate
=
arr
[
6
].
date
methods
.
getList
()
},
getList
(){
getList
(){
data
.
dataList
=
[]
if
(
data
.
msg
.
StartDate
){
if
(
data
.
msg
.
StartDate
){
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中...'
title
:
'加载中...'
...
@@ -252,35 +202,40 @@
...
@@ -252,35 +202,40 @@
proxy
.
$request
(
"/LeaveStudent/GetStuPlanAppointment"
,
data
.
msg
).
then
(
res
=>
{
proxy
.
$request
(
"/LeaveStudent/GetStuPlanAppointment"
,
data
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
if
(
res
.
Code
==
1
){
data
.
titleList
.
forEach
((
i
,
indexs
)
=>
{
data
.
titleList
.
forEach
((
i
,
indexs
)
=>
{
i
.
list
Num
=
[]
i
.
list
=
[]
})
})
let
arr
=
[]
let
arr
=
[]
data
.
dataList
=
res
.
Data
data
.
dataList
=
res
.
Data
if
(
res
.
Data
.
length
>
0
){
data
.
dataList
.
forEach
((
item
,
index
)
=>
{
data
.
dataList
.
forEach
((
item
,
index
)
=>
{
item
.
SubList
.
sort
((
a
,
b
)
=>
a
.
Sort
-
b
.
Sort
)
item
.
SubList
.
sort
((
a
,
b
)
=>
a
.
Sort
-
b
.
Sort
)
item
.
SubList
.
forEach
(
i
=>
{
item
.
SubList
.
forEach
(
i
=>
{
arr
.
push
(
i
)
arr
.
push
(
i
)
})
})
data
.
titleList
.
forEach
((
i
,
indexs
)
=>
{
data
.
titleList
.
forEach
((
i
,
indexs
)
=>
{
if
(
item
.
DateStr
===
i
.
num
){
if
(
index
==
indexs
){
item
.
Week
=
i
.
name
i
.
date
=
item
.
DateStr
.
slice
(
8
,
10
)
i
.
listNum
=
item
.
SubList
if
(
item
.
SubList
.
length
>
0
){
i
.
list
=
item
.
SubList
}
else
{
i
.
list
=
[]
}
}
}
})
})
})
})
}
data
.
total
=
arr
.
length
data
.
total
=
arr
.
length
uni
.
hideLoading
()
uni
.
hideLoading
()
}
}
})
})
}
}
}
},
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
methods
.
getMonday
(
0
);
methods
.
getMonday
(
0
);
methods
.
getDateData
()
methods
.
getDateData
()
methods
.
getList
()
})
})
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
@@ -335,7 +290,7 @@
...
@@ -335,7 +290,7 @@
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
padding
:
0
36
rpx
;
/* padding: 0 36rpx; */
}
}
.titleHeader-year
{
.titleHeader-year
{
display
:
flex
;
display
:
flex
;
...
...
src/pages/bookAclass/lx-calendar/lx-calendar.md
0 → 100644
View file @
7a0232ca
src/pages/bookAclass/lx-calendar/lx-calendar.vue
0 → 100644
View file @
7a0232ca
This diff is collapsed.
Click to expand it.
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