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
844a620e
Commit
844a620e
authored
Feb 09, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
86f477e1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
447 additions
and
174 deletions
+447
-174
index.vue
src/pages/appointment/index.vue
+49
-3
mySubscribe.vue
src/pages/appointment/mySubscribe.vue
+363
-160
person.vue
src/pages/person/person.vue
+32
-5
timeTable.vue
src/pages/timetable/timeTable.vue
+2
-5
date.js
src/utils/date.js
+1
-1
No files found.
src/pages/appointment/index.vue
View file @
844a620e
...
...
@@ -97,8 +97,7 @@
@
click=
"checkCourseType2(item)"
>
预约
</view>
<view
class=
"yuyueBtn"
style=
"opacity: 0.5;"
v-if=
"item[0].State==4"
@
click=
"checkCourseType2(item)"
>
<view
class=
"yuyueBtn"
style=
"opacity: 0.5;"
v-if=
"item[0].State==4"
>
已预约
</view>
</view>
...
...
@@ -173,7 +172,8 @@
onMounted
}
from
'vue'
import
{
DateFormat
DateFormat
,
getToday
}
from
'../../utils/date.js'
import
Navbar
from
'../../components/navbar.vue'
export
default
{
...
...
@@ -209,6 +209,7 @@
data
.
isShowCalendar
=
false
this
.
getDateData
(
val
.
detail
)
data
.
msg
.
Date
=
DateFormat
(
val
.
detail
)
data
.
current
=
0
this
.
getTeacherList
()
console
.
log
(
86
,
data
.
msg
.
Date
)
},
...
...
@@ -324,6 +325,29 @@
})
},
checkCourse
(
index
)
{
if
(
data
.
basics
.
AdvanceDay
==
1
){
const
lateTime
=
new
Date
(
getToday
()
+
' '
+
data
.
basics
.
ScrollETime
).
getTime
()
const
nowTime
=
new
Date
().
getTime
()
if
(
nowTime
>
lateTime
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`
${
data
.
basics
.
ScrollETime
}
点后不可预约明天课程`
})
return
}
}
if
(
data
.
basics
.
AppointDate
){
const
lateDate
=
new
Date
(
data
.
basics
.
AppointDate
).
getTime
()
const
curSubDate
=
new
Date
(
data
.
msg
.
Date
).
getTime
()
console
.
log
(
curSubDate
<
lateDate
)
if
(
curSubDate
<
lateDate
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`需预约
${
data
.
basics
.
AppointDate
}
之后的日期`
})
return
}
}
let
curCourse
=
data
.
courselist
[
index
]
let
RemainTime
=
data
.
basics
.
NextAppointMinutes
-
curCourse
.
Minutes
//剩余课时
const
ShiftSortArr
=
[
curCourse
]
...
...
@@ -371,6 +395,28 @@
}
},
checkCourseType2
(
item
)
{
if
(
data
.
basics
.
AdvanceDay
==
1
){
const
lateTime
=
new
Date
(
getToday
()
+
' '
+
data
.
basics
.
ScrollETime
).
getTime
()
const
nowTime
=
new
Date
().
getTime
()
if
(
nowTime
>
lateTime
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`
${
data
.
basics
.
ScrollETime
}
点后不可预约明天课程`
})
return
}
}
if
(
data
.
basics
.
AppointDate
){
const
lateDate
=
new
Date
(
data
.
basics
.
AppointDate
).
getTime
()
const
curSubDate
=
new
Date
(
data
.
msg
.
Date
).
getTime
()
if
(
curSubDate
<
lateDate
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`需预约
${
data
.
basics
.
AppointDate
}
之后的日期`
})
return
}
}
let
total
=
item
.
reduce
((
pre
,
cur
)
=>
{
return
cur
.
Minutes
+
pre
},
0
)
...
...
src/pages/appointment/mySubscribe.vue
View file @
844a620e
<
style
>
.mySubscribe
{
<
style
scoped
>
.mySubscribe
{
width
:
100%
;
height
:
100vh
;
background
:
#F5F5F5
;
background
-color
:
#F5F5F5
;
}
.listbox
{
.headrow
{
overflow
:
hidden
;
border-radius
:
0px
0px
50
rpx
50
rpx
;
}
.listbox
{
width
:
100%
;
margin-top
:
15px
;
padding
:
0
15px
;
box-sizing
:
border-box
;
}
.box-item
{
border-radius
:
12
rpx
;
.box-item
{
border-radius
:
24
rpx
;
box-sizing
:
border-box
;
padding
:
30
rpx
;
background
:
#FFF
;
background
-color
:
#FFF
;
font-size
:
24
rpx
;
box-shadow
:
2
rpx
4
rpx
40
rpx
0px
rgba
(
212
,
212
,
212
,
0.6
);
position
:
relative
;
}
.row
{
.row
{
display
:
flex
;
align-items
:
center
;
}
.onetext
{
.onetext
{
width
:
100%
;
text-align
:
center
;
overflow
:
hidden
;
display
:
inline-block
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
overflow
:
hidden
;
display
:
inline-block
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
}
.popupbox
{
.popupbox
{
width
:
60vw
;
background
:
#FFF
;
height
:
100vh
;
box-sizing
:
border-box
;
position
:
relative
;
}
.popupBtnBox
{
.popupBtnBox
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
30
rpx
;
...
...
@@ -45,73 +61,212 @@
justify-content
:
space-around
;
align-items
:
center
;
}
.popupBtn
{
.popupBtn
{
font-size
:
30
rpx
;
color
:
#111
;
}
.popupbox-c
{
.popupbox-c
{
padding
:
20
rpx
;
box-sizing
:
border-box
;
}
.popupbox-list
{
.popupbox-list
{
height
:
90
rpx
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.05
);
font-size
:
26
rpx
;
color
:
#555555
;
box-sizing
:
border-box
;
}
.popupbox-item
{
.popupbox-item
{
justify-content
:
space-between
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.05
);
height
:
100
rpx
;
}
.listItemBox1
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
margin-bottom
:
10
rpx
;
}
.listItemBox1
.listItemDate
{
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
margin-right
:
10
rpx
;
}
.listItemBox1
.listItemWeek
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
color
:
#A5A5A5
;
}
.listItemBox2
{
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
center
;
background-color
:
#E4E5FB
;
border-radius
:
16
rpx
;
margin
:
20
rpx
0
;
box-sizing
:
border-box
;
padding
:
16
rpx
20
rpx
;
}
.listItemBox2
.classTime
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.listItemBox2
.gap
{
margin
:
0
20
rpx
;
text-align
:
center
;
}
.listItemBox2
.classMinutes
{
font-size
:
18
rpx
;
font-family
:
PingFang
SC
;
color
:
#9699E6
;
}
.CourseTimeListItem
{
margin
:
5
rpx
0
;
}
.listItemBox3
{
display
:
flex
;
margin
:
10
rpx
0
;
}
.listItemBox3
.label
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
#A5A5A5
;
margin-right
:
20
rpx
;
}
.listItemBox3
.con
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
#111111
;
display
:
flex
;
white-space
:
nowrap
;
}
.stateBox
{
position
:
absolute
;
right
:
44
rpx
;
bottom
:
44
rpx
;
}
.stateBox
.StateName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
.quxiaoBtn
{
box-sizing
:
border-box
;
padding
:
6
rpx
12
rpx
;
border-radius
:
10
rpx
;
margin-left
:
300
rpx
;
border
:
1px
solid
#9699e6
;
color
:
#4c50e7
;
font-size
:
20
rpx
}
</
style
>
<
template
>
<view
class=
"mySubscribe"
>
<view
class=
"row"
>
<van-tabs
style=
"flex:1"
:active=
"data.msg.State"
title-inactive-color=
"#444444"
title-active-color=
"#00ACF9"
line-height=
"0"
@
change=
"changeTab"
>
<van-tab
:title=
"x.Name"
:name=
"x.Id"
v-for=
"(x,y) in stateList"
:key=
'y'
></van-tab>
<view
class=
"row headrow"
>
<van-tabs
style=
"flex:1"
:active=
"data.msg.State"
title-inactive-color=
"#444444"
title-active-color=
"#4C50E7"
line-height=
"0"
@
change=
"changeTab"
>
<van-tab
:title=
"x.Name"
:name=
"x.Id"
v-for=
"(x,y) in stateList"
:key=
'y'
></van-tab>
</van-tabs>
<view
class=
"onetext"
style=
"width: 100rpx;background: #FFF;height: 88rpx;display: flex;align-items: center;justify-content: center;"
@
click=
"popupshow2=true"
>
<van-icon
name=
"bars"
size=
"44rpx"
/>
<view
class=
"onetext"
style=
"width: 100rpx;background: #FFF;height: 88rpx;display: flex;align-items: center;justify-content: center;"
@
click=
"popupshow2=true"
>
<van-icon
name=
"bars"
color=
"#4C50E7"
size=
"44rpx"
/>
</view>
</view>
<view
v-if=
"List.length>0"
>
<scroll-view
:scroll-y=
"true"
style=
"height: calc(100vh - 150rpx );width: 100vw;"
>
<view
class=
"listbox"
v-for=
'(x,y) in List'
:key
=
'y'
>
<view
class=
"listbox"
v-for=
'(x,y) in List'
:key
=
'y'
>
<view
class=
"box-item"
>
<view
class=
"row"
style=
"justify-content: space-between;font-size: 30rpx;line-height: 60rpx;margin-bottom: 20rpx;"
>
<span>
{{
x
.
Date
}}
</span>
<span>
{{
x
.
StateName
}}
</span>
<view
class=
"listItemBox1"
>
<view
class=
"listItemDate"
>
{{
x
.
Date
}}
</view>
<view
class=
"listItemWeek"
>
{{
getWeek
(
x
.
Date
)
}}
</view>
<view
class=
"quxiaoBtn"
v-if=
"x.State == 1"
@
click=
"goquxiao(x)"
>
取消
</view>
</view>
<view
class=
"listItemBox2"
:style=
"
{display:x.CourseTimeList.length==1?'inline-block':'flex','background-color':x.State == 5?'#D4D4D4':'#E4E5FB'}">
<view
v-for=
"(item,index) in x.CourseTimeList"
:key=
"index"
class=
"row CourseTimeListItem"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee.png"
mode=
""
style=
"width: 38rpx;height: 38rpx;margin: 0 20rpx ;"
v-if=
"index%2===1"
>
</image>
<text
class=
"classTime"
>
{{
item
.
StartTime
}}
</text>
<view
class=
"gap"
>
<view
class=
"classMinutes"
>
{{
item
.
Minutes
}}
分钟
</view>
<van-icon
name=
"ellipsis"
color=
"#9699E6"
size=
"26rpx"
/>
</view>
<text
class=
"classTime"
>
{{
item
.
EndTime
}}
</text>
</view>
</view>
<view
class=
"listItemBox3"
>
<view
class=
"label"
>
课程
</view>
<view
class=
"con"
>
{{
x
.
CourseName
}}
</view>
</view>
<view
class=
"listItemBox3"
>
<view
class=
"label"
>
学生
</view>
<view
class=
"con"
>
{{
x
.
StuName
}}
</view>
</view>
<view
class=
"row"
style=
"align-items: flex-start;"
>
<image
:src=
'x.TeacherHead'
mode=
"aspectFill"
style=
"width:76rpx ;height: 76rpx;border-radius: 50%;"
></image>
<view
style=
"margin-left: 30rpx;padding-bottom:20rpx ;"
>
<div
style=
"font-size: 26rpx;color: #111;font-weight: bold"
>
{{
x
.
CourseName
}}
</div>
<div
style=
"font-size: 22rpx;color: #666;margin-top: 8rpx;"
>
{{
x
.
TeacherName
}}
</div>
<div
style=
"font-size: 22rpx;color: #666;margin-top: 8rpx;"
>
学生:
{{
x
.
StuName
}}
</div>
<div
style=
"font-size: 22rpx;color: #666;margin-top: 8rpx;"
>
第
{{
x
.
ChapterNo
}}
次课
</div>
<view
class=
"listItemBox3"
>
<view
class=
"label"
>
课次
</view>
<view
class=
"con"
>
第
{{
x
.
ChapterNo
||
0
}}
次课
</view>
</view>
<view
>
时间列表
</view>
<view
v-for=
"(item,index) in x.CourseTimeList"
:key=
"index"
>
<view
class=
"row"
>
{{
item
.
StartTime
}}
<span
style=
"margin: 0 10rpx;"
>
-
</span>
{{
item
.
EndTime
}}
<span
style=
'margin-left: 20rpx;'
>
{{
item
.
Minutes
}}
分钟
</span>
<view
class=
"listItemBox3"
>
<view
class=
"label"
>
教师
</view>
<view
class=
"con"
>
<image
:src=
'x.TeacherHead'
mode=
"aspectFill"
style=
"width:36rpx ;height: 36rpx;border-radius: 50%; margin-right: 12rpx;"
></image>
<text>
{{
x
.
TeacherName
}}
</text>
</view>
</view>
<view
style=
"display: flex;justify-content: flex-end;"
v-if=
"x.State == 1"
>
<van-button
size=
"small"
@
click=
"goquxiao(x)"
>
取消
</van-button>
<view
class=
"stateBox"
>
<view
class=
"StateName"
:style=
"
{color: x.State == 2?'#4C50E7':x.State == 4?'#EF5361':x.State == 5?'#d4d4d4':'#111111'}">
{{
x
.
StateName
}}
</view>
</view>
</view>
</view>
...
...
@@ -119,7 +274,7 @@
</scroll-view>
</view>
<view
v-else
>
<van-empty
description=
"暂无数据"
/>
<van-empty
description=
"暂无数据"
/>
</view>
<van-dialog
:show=
'show'
title=
"提示"
message=
'正在确认中,您确定取消预约?'
show-cancel-button
@
cancel=
'show = false'
@
confirm=
'quedquxiao'
>
...
...
@@ -130,61 +285,60 @@
<span>
开始时间
</span>
<view
class=
"row"
@
click=
"showdatePopup=true"
>
<span
v-if=
"msg.StartTime==''"
style=
"color: #999999;"
>
请选择
</span>
<span
v-else
>
{{
msg
.
StartTime
}}
</span>
<span
v-else
>
{{
msg
.
StartTime
}}
</span>
</view>
</view>
<view
class=
"popupbox-item row"
>
<span>
结束时间
</span>
<view
class=
"row"
@
click=
"showdatePopup2=true"
>
<span
v-if=
"msg.EntTime==''"
style=
"color: #999999;"
>
请选择
</span>
<span
v-else
>
{{
msg
.
EntTime
}}
</span>
<span
v-else
>
{{
msg
.
EntTime
}}
</span>
</view>
</view>
<view
class=
"popupbox-item row"
>
<span>
老师
</span>
<view
class=
"row"
@
click=
"popupshow=true"
>
<span
v-if=
"msg.TeacherId==0"
style=
"color: #999999;"
>
请选择
</span>
<span
v-else
>
{{
TeacherName
}}
</span>
<span
v-else
>
{{
TeacherName
}}
</span>
</view>
</view>
<view
class=
"popupBtnBox"
>
<!--
<view
class=
"popupBtn"
>
取消
</view>
-->
<van-button
type=
"info"
plain
size=
"small"
@
click=
"popupshow2=false"
>
取消
</van-button>
<van-button
type=
"info"
plain
size=
"small"
@
click=
"popupshow2=false"
>
取消
</van-button>
<van-button
type=
"info"
size=
"small"
@
click=
"search"
>
确定
</van-button>
<!--
<view
class=
"popupBtn"
>
确定
</view>
-->
</view>
</view>
</van-popup>
<van-popup
:show=
"popupshow"
@
close=
"popupshow=false"
position=
'right'
>
<view
class=
"popupbox"
>
<view
class=
"popupbox-top"
>
<van-search
:value=
"value"
placeholder=
"请输入搜索关键词"
@
change=
"onSearch"
@
cancel=
"onSearch"
/>
<van-search
:value=
"value"
placeholder=
"请输入搜索关键词"
@
change=
"onSearch"
@
cancel=
"onSearch"
/>
</view>
<view
class=
"popupbox-c"
v-if=
'TeacherList.length>0'
>
<scroll-view
:scroll-y=
"true"
style=
"height: calc(100vh - 110rpx - 150rpx);width: 100%;"
>
<view
class=
"popupbox-list row"
style=
"justify-content: space-between;"
v-for=
'(x,y) in TeacherList'
:key =
'y'
@
click=
"choice(x)"
>
<span
>
{{
x
.
TeacherName
}}
</span>
<van-icon
name=
"success"
color=
'#0000ff'
v-if=
'msg.TeacherId == x.TId'
/>
<view
class=
"popupbox-list row"
style=
"justify-content: space-between;"
v-for=
'(x,y) in TeacherList'
:key=
'y'
@
click=
"choice(x)"
>
<span>
{{
x
.
TeacherName
}}
</span>
<van-icon
name=
"success"
color=
'#0000ff'
v-if=
'msg.TeacherId == x.TId'
/>
</view>
<view
style=
"width: 100%;height: 20px;"
></view>
</scroll-view>
</view>
<view
v-else
>
<van-empty
description=
"暂无数据"
/>
<van-empty
description=
"暂无数据"
/>
</view>
</view>
</van-popup>
<van-popup
:show=
"showdatePopup"
round
position=
"bottom"
custom-style=
"height: 50%"
@
close=
"showdatePopup=false"
>
<van-datetime-picker
type=
"date"
:value=
"getCurrentDate"
@
cancel=
"showdatePopup=false"
@
confirm=
"onConfirm()"
/>
<van-popup
:show=
"showdatePopup"
round
position=
"bottom"
custom-style=
"height: 50%"
@
close=
"showdatePopup=false"
>
<van-datetime-picker
type=
"date"
:value=
"getCurrentDate"
@
cancel=
"showdatePopup=false"
@
confirm=
"onConfirm()"
/>
</van-popup>
<van-popup
:show=
"showdatePopup2"
round
position=
"bottom"
custom-style=
"height: 50%"
@
close=
"showdatePopup2=false"
>
<van-datetime-picker
type=
"date"
:value=
"getCurrentDate2"
@
cancel=
"showdatePopup2=false"
@
confirm=
"onConfirm2()"
/>
<van-popup
:show=
"showdatePopup2"
round
position=
"bottom"
custom-style=
"height: 50%"
@
close=
"showdatePopup2=false"
>
<van-datetime-picker
type=
"date"
:value=
"getCurrentDate2"
@
cancel=
"showdatePopup2=false"
@
confirm=
"onConfirm2()"
/>
</van-popup>
</view>
</
template
>
...
...
@@ -204,101 +358,121 @@
import
Dialog
from
'../../wxcomponents/vant/dialog/dialog'
export
default
{
components
:
{
},
props
:[],
props
:
[],
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
StartTime
:
''
,
EntTime
:
''
,
State
:
0
,
TeacherId
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
StartTime
:
''
,
EntTime
:
''
,
State
:
0
,
TeacherId
:
0
,
},
TeacherName
:
""
,
TeacherName
:
""
,
pageState
:
"more"
,
PageCount
:
0
,
timer
:
null
,
//防抖
List
:[],
stateList
:[],
show
:
false
,
AppointId
:
0
,
popupshow
:
false
,
popupshow2
:
false
,
value
:
''
,
TeacherList
:[],
allTeacherList
:[],
showdatePopup
:
false
,
showdatePopup2
:
false
,
getCurrentDate
:
new
Date
().
getTime
(),
getCurrentDate2
:
new
Date
().
getTime
(),
List
:
[{
Date
:
"2020-01-01"
,
CourseTimeList
:
[{
StartTime
:
'09:00'
,
Minutes
:
90
,
EndTime
:
"12:00"
},
{
StartTime
:
'09:00'
,
Minutes
:
90
,
EndTime
:
"12:00"
}],
CourseName
:
"内部斑"
,
StuName
:
"张三"
,
ChapterNo
:
1
,
TeacherName
:
"张三"
,
StateName
:
'待确认'
,
State
:
1
,
},
],
stateList
:
[],
show
:
false
,
AppointId
:
0
,
popupshow
:
false
,
popupshow2
:
false
,
value
:
''
,
TeacherList
:
[],
allTeacherList
:
[],
showdatePopup
:
false
,
showdatePopup2
:
false
,
getCurrentDate
:
new
Date
().
getTime
(),
getCurrentDate2
:
new
Date
().
getTime
(),
})
let
methods
=
{
getList
()
{
data
.
pageState
=
"loading"
;
proxy
.
$request
(
"/AppletCenter/GetMyAppointPageList"
,
data
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
data
.
timer
)
data
.
timer
=
null
;
data
.
PageCount
=
res
.
Data
.
PageCount
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
List
=
res
.
Data
.
PageData
;
}
else
{
data
.
List
=
[...
data
.
List
,
...
res
.
Data
.
PageData
];
}
if
(
data
.
msg
.
pageIndex
>=
res
.
Data
.
PageCount
)
{
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
}
})
data
.
pageState
=
"loading"
;
proxy
.
$request
(
"/AppletCenter/GetMyAppointPageList"
,
data
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
data
.
timer
)
data
.
timer
=
null
;
data
.
PageCount
=
res
.
Data
.
PageCount
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
List
=
res
.
Data
.
PageData
;
}
else
{
data
.
List
=
[...
data
.
List
,
...
res
.
Data
.
PageData
];
}
if
(
data
.
msg
.
pageIndex
>=
res
.
Data
.
PageCount
)
{
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
}
})
},
lower
(
e
)
{
if
(
data
.
msg
.
pageIndex
<
data
.
PageCount
)
{
data
.
pageState
=
"loading"
;
if
(
data
.
timer
)
clearTimeout
(
data
.
timer
);
data
.
timer
=
setTimeout
(()
=>
{
if
(
data
.
msg
.
pageIndex
<
data
.
PageCount
)
{
data
.
pageState
=
"loading"
;
if
(
data
.
timer
)
clearTimeout
(
data
.
timer
);
data
.
timer
=
setTimeout
(()
=>
{
data
.
msg
.
pageIndex
++
;
that
.
getList
();
},
1000
);
}
else
{
data
.
pageState
=
"none"
;
}
that
.
getList
();
},
1000
);
}
else
{
data
.
pageState
=
"none"
;
}
},
getState
(){
proxy
.
$request
(
"/AppletCenter/GetCourseAppointStateEnumList"
,{}).
then
(
res
=>
{
getState
()
{
proxy
.
$request
(
"/AppletCenter/GetCourseAppointStateEnumList"
,
{}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
stateList
=
res
.
Data
data
.
stateList
.
unshift
({
Id
:
0
,
Name
:
'全部'
Id
:
0
,
Name
:
'全部'
})
}
})
},
getTeacherList
(){
proxy
.
$request
(
"/AppletCenter/GetTeacherList"
,{}).
then
(
res
=>
{
getTeacherList
()
{
proxy
.
$request
(
"/AppletCenter/GetTeacherList"
,
{}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
TeacherList
=
res
.
Data
data
.
TeacherList
.
unshift
({
TeacherName
:
'不限'
,
TId
:
0
TeacherName
:
'不限'
,
TId
:
0
})
data
.
allTeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
))
}
})
},
choice
(
x
)
{
//老师选择
choice
(
x
)
{
//老师选择
data
.
msg
.
TeacherId
=
x
.
TId
;
data
.
popupshow
=
false
;
data
.
value
=
''
;
data
.
TeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
allTeacherList
))
data
.
TeacherName
=
x
.
TeacherName
data
.
TeacherName
=
x
.
TeacherName
},
onSearch
(
val
){
onSearch
(
val
)
{
if
(
!
val
.
detail
)
{
data
.
TeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
allTeacherList
))
}
else
{
...
...
@@ -307,20 +481,22 @@
})
}
},
changeTab
(
e
){
changeTab
(
e
)
{
data
.
msg
.
State
=
e
.
detail
.
name
;
data
.
msg
.
pageIndex
=
1
;
that
.
getList
();
},
goquxiao
(
x
){
goquxiao
(
x
)
{
data
.
show
=
true
;
data
.
AppointId
=
x
.
Id
},
quedquxiao
(){
quedquxiao
()
{
uni
.
showLoading
({
title
:
'取消中...'
title
:
'取消中...'
})
proxy
.
$request
(
"/AppletCenter/CancelAppointment"
,{
AppointId
:
data
.
AppointId
}).
then
(
res
=>
{
proxy
.
$request
(
"/AppletCenter/CancelAppointment"
,
{
AppointId
:
data
.
AppointId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
uni
.
hideLoading
()
data
.
show
=
false
;
...
...
@@ -329,33 +505,62 @@
}
})
},
onConfirm
(
val
){
onConfirm
(
val
)
{
data
.
getCurrentDate
=
val
.
detail
;
let
curdate
=
new
Date
(
val
.
detail
);
let
year
=
curdate
.
getFullYear
();
let
month
=
curdate
.
getMonth
()
<
9
?
"0"
+
(
curdate
.
getMonth
()
+
1
)
:
curdate
.
getMonth
()
+
1
let
day
=
curdate
.
getDate
()
<
9
?
"0"
+
(
curdate
.
getDate
()
)
:
curdate
.
getDate
()
data
.
msg
.
StartTime
=
year
+
"-"
+
month
+
'-'
+
day
;
let
day
=
curdate
.
getDate
()
<
9
?
"0"
+
(
curdate
.
getDate
()
)
:
curdate
.
getDate
()
data
.
msg
.
StartTime
=
year
+
"-"
+
month
+
'-'
+
day
;
data
.
showdatePopup
=
false
},
onConfirm2
(
val
){
onConfirm2
(
val
)
{
data
.
getCurrentDate2
=
val
.
detail
;
let
curdate
=
new
Date
(
val
.
detail
);
let
year
=
curdate
.
getFullYear
();
let
month
=
curdate
.
getMonth
()
<
9
?
"0"
+
(
curdate
.
getMonth
()
+
1
)
:
curdate
.
getMonth
()
+
1
let
day
=
curdate
.
getDate
()
<
9
?
"0"
+
(
curdate
.
getDate
()
)
:
curdate
.
getDate
()
data
.
msg
.
EntTime
=
year
+
"-"
+
month
+
'-'
+
day
;
let
day
=
curdate
.
getDate
()
<
9
?
"0"
+
(
curdate
.
getDate
()
)
:
curdate
.
getDate
()
data
.
msg
.
EntTime
=
year
+
"-"
+
month
+
'-'
+
day
;
data
.
showdatePopup2
=
false
},
search
(){
data
.
msg
.
pageIndex
=
1
search
()
{
data
.
msg
.
pageIndex
=
1
this
.
getList
()
data
.
popupshow2
=
false
data
.
popupshow2
=
false
},
getWeek
(
d
){
const
date
=
new
Date
(
d
)
const
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
(()
=>
{
})
let
that
=
methods
;
return
{
...
...
@@ -364,19 +569,17 @@
};
},
onShow
()
{
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"约课记录"
,
});
this
.
getState
()
this
.
getTeacherList
()
this
.
getList
()
uni
.
setNavigationBarTitle
({
title
:
"约课记录"
,
});
this
.
getState
()
this
.
getTeacherList
()
this
.
getList
()
},
}
</
script
>
src/pages/person/person.vue
View file @
844a620e
...
...
@@ -45,11 +45,12 @@
</view>
<view
class=
"courseInfo"
>
<view
class=
"title"
>
课程信息
</view>
<view
style=
"display: flex;justify-content: space-between;"
>
<view
class=
"title"
>
课程信息
</view>
<view
class=
"title"
@
click=
"jumpPage(`/pages/appointment/mySubscribe`)"
>
<
!--
<
view
class=
"title"
@
click=
"jumpPage(`/pages/appointment/mySubscribe`)"
>
约课记录
</view>
</view>
-->
</view>
<view
class=
"statistic"
>
...
...
@@ -77,6 +78,11 @@
</view>
<view
class=
"statisticName"
>
请假课时
</view>
</view>
<view
class=
"statisticItem"
@
click=
"jumpPage(`/pages/appointment/mySubscribe`)"
>
<view
class=
"time"
>
{{
yuyueNum
}}
</view>
<view
class=
"statisticName"
>
约课记录
</view>
</view>
</view>
<view
class=
"courseBox"
>
<view
class=
"left"
>
...
...
@@ -176,6 +182,7 @@
pageData
:
{
AssistList
:
[]
},
yuyueNum
:
0
});
const
methods
=
{
jumpPage
(
url
)
{
...
...
@@ -193,6 +200,22 @@
phoneNumber
:
num
,
});
},
getyuyue
()
{
const
msg
=
{
pageIndex
:
1
,
pageSize
:
1
,
StartTime
:
''
,
EntTime
:
''
,
State
:
0
,
TeacherId
:
0
,
}
proxy
.
$request
(
"/AppletCenter/GetMyAppointPageList"
,
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
yuyueNum
=
res
.
Data
.
Count
}
})
},
};
let
that
=
methods
;
return
{
...
...
@@ -203,6 +226,7 @@
onShow
()
{
if
(
this
.
$isLogin
())
{
this
.
getData
();
this
.
getyuyue
()
}
}
};
...
...
@@ -300,16 +324,18 @@
.statistic
{
/* height: 70rpx; */
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
70
rpx
;
}
.statisticItem
{
min-width
:
80
rpx
;
width
:
1
80
rpx
;
/* height: 70rpx; */
display
:
flex
;
flex-wrap
:
wrap
;
align-content
:
space-between
;
margin-right
:
100
rpx
;
/* margin-right: 100rpx; */
flex-shrink
:
1
;
}
.statisticItem
.time
{
...
...
@@ -334,6 +360,7 @@
font-weight
:
500
;
color
:
#666666
;
white-space
:
nowrap
;
text-align
:
center
;
}
.courseBox
{
...
...
src/pages/timetable/timeTable.vue
View file @
844a620e
...
...
@@ -74,11 +74,8 @@
<van-toast
id=
"van-toast"
/>
<view
class=
"btnfixed"
>
<image
@
click=
"goappointment"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/
book
.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/
yuyuebtn
.png"
mode=
"widthFix"
></image>
<view
style=
"font-size: 22rpx;color: #4C50E7;text-align: center;"
>
约课
</view>
</view>
</view>
</
template
>
...
...
@@ -591,7 +588,7 @@
}
.btnfixed
image
{
width
:
3
0px
;
width
:
5
0px
;
height
:
auto
;
}
</
style
>
src/utils/date.js
View file @
844a620e
...
...
@@ -72,7 +72,7 @@ export let getdate = (time, tomorrow) => {
let
d
=
year
+
"-"
+
month
+
'-'
+
day
return
d
}
export
let
DateFormat
=
(
time
,
separator
=
'-'
)
=>
{
export
let
DateFormat
=
(
time
=
null
,
separator
=
'-'
)
=>
{
let
date
=
new
Date
(
time
)
let
year
=
date
.
getFullYear
()
let
month
=
date
.
getMonth
()
<
9
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
...
...
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