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
9229c6e7
Commit
9229c6e7
authored
Feb 09, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
9a558d23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
349 additions
and
694 deletions
+349
-694
pages.json
src/pages.json
+1
-10
index.vue
src/pages/appointment/index.vue
+269
-70
list.vue
src/pages/appointment/list.vue
+0
-275
mySubscribe.vue
src/pages/appointment/mySubscribe.vue
+61
-24
record.vue
src/pages/appointment/record.vue
+0
-113
timeSlot.vue
src/pages/appointment/timeSlot.vue
+0
-183
person.vue
src/pages/person/person.vue
+8
-4
timeTable.vue
src/pages/timetable/timeTable.vue
+10
-15
No files found.
src/pages.json
View file @
9229c6e7
...
...
@@ -138,16 +138,7 @@
}
},
{
"path"
:
"list"
},
{
"path"
:
"mySubscribe"
},
{
"path"
:
"timeSlot"
},
{
"path"
:
"record"
"path"
:
"mySubscribe"
//约课记录
}
]
}
...
...
src/pages/appointment/index.vue
View file @
9229c6e7
This diff is collapsed.
Click to expand it.
src/pages/appointment/list.vue
deleted
100644 → 0
View file @
9a558d23
<
style
scoped
>
.Appointmentlist
{
width
:
100%
;
height
:
100vh
;
}
.row
{
display
:
flex
;
align-items
:
center
;
}
.basics-block
{
width
:
50%
;
box-sizing
:
border-box
;
padding-left
:
10
rpx
;
text-align
:
left
;
font-size
:
26
rpx
;
}
.box-top
{
display
:
flex
;
box-shadow
:
0
4
rpx
24
rpx
rgba
(
100
,
101
,
102
,
.12
);
height
:
100
rpx
;
background
:
#FFF
;
}
.box-top-item
{
width
:
50%
;
justify-content
:
center
;
font-size
:
13px
;
}
.ellipsis
{
max-width
:
80%
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.center
{
width
:
100%
;
margin-top
:
15px
;
padding
:
0
15px
;
box-sizing
:
border-box
;
}
.center-box
{
border-radius
:
6px
;
padding
:
15px
;
box-shadow
:
0px
3px
6px
0px
rgba
(
139
,
115
,
64
,
0.16
);
}
.center-top
{
border-bottom
:
1px
solid
#E2E2E2
;
align-items
:
flex-start
;
}
.basics
{
width
:
100%
;
height
:
200
rpx
;
background
:
#F5F6F7
;
padding
:
10px
15px
;
box-sizing
:
border-box
;
}
.basics-box
{
box-sizing
:
border-box
;
border-radius
:
6px
;
background
:
#FFF
;
padding
:
10px
;
font-size
:
13px
;
color
:
#111
;
height
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
align-content
:
space-around
;
}
</
style
>
<
template
>
<div
class=
"Appointmentlist"
>
<view
class=
"basics"
>
<view
class=
"basics-box"
>
<view
class=
"row basics-block"
>
提前几天预约:
{{
basics
.
AdvanceDay
||
0
}}
天
</view>
<view
class=
"row basics-block"
>
可预约时间:
{{
basics
.
ScrollETime
||
'无'
}}
</view>
<view
class=
"row basics-block"
>
可预约的天数:
{{
basics
.
AppointDay
||
0
}}
天
</view>
<view
class=
"row basics-block"
>
是否可以继续预约:
{{
basics
.
IsNextAppoint
?
'是'
:
'否'
}}
</view>
</view>
</view>
<view
class=
"box-top"
>
<view
class=
"box-top-item row"
@
click=
"getscreen(1)"
>
<view
class=
"ellipsis"
>
{{
msg
.
Date
}}
</view>
<van-icon
name=
"arrow-down"
size=
'12'
style=
'margin-left: 5px;'
/>
</view>
<picker
mode=
"selector"
range-key=
"SName"
style=
"width: 50%;"
:range=
"schoolList"
@
change=
"getCutomTypeCheck"
>
<view
class=
"box-top-item row"
style=
"width: 100%;height: 100rpx;"
>
<view
class=
"ellipsis"
>
{{
SchoolName
}}
</view>
<van-icon
name=
"arrow-down"
size=
'12'
style=
'margin-left: 5px;'
/>
</view>
</picker>
</view>
<view
v-if=
"dataList && dataList.length>0"
>
<scroll-view
:scroll-y=
"true"
style=
"height: calc(100vh - 100rpx - 200rpx);width: calc(100vw);"
>
<view
class=
"center"
v-for=
'(x,y) in dataList'
:key =
'y'
@
click=
"gotimelist(x)"
>
<view
class=
"center-box"
>
<view
class=
"center-top row"
>
<image
:src=
'x.TeacherHead'
mode=
"aspectFill"
style=
"width:38px ;height: 38px;border-radius: 50%;"
></image>
<view
style=
"margin-left: 15px;padding-bottom:10px ;"
>
<div
style=
"font-size: 13px;color: #111;font-weight: bold"
>
{{
x
.
TeacherName
}}
</div>
<div
style=
"font-size: 11px;color: #666;margin-top: 4px;"
>
{{
x
.
SchoolName
}}
</div>
<div
style=
"font-size: 11px;color: #666;margin-top: 4px;"
>
{{
x
.
RoomName
}}
</div>
</view>
</view>
<view
style=
"padding: 10px 0;font-size: 12px;color: #111;"
>
<view
style=
"font-weight: bold;"
>
个人简介
</view>
<view
style=
"margin-top: 5px;"
>
暂时没的其他的
</view>
</view>
</view>
</view>
<view
style=
"width: 100%;height: 20px;"
></view>
</scroll-view>
</view>
<view
v-else
>
<van-empty
description=
"暂无约课老师"
/>
</view>
<van-calendar
:show=
"dateshow"
color=
"#2961fe"
@
confirm=
"onConfirm"
:default-date=
'defaultDate'
@
close=
'dateshow=false'
/>
</div>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
provide
,
}
from
"vue"
;
export
default
{
components
:
{
},
props
:[
'day'
],
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
dateshow
:
false
,
msg
:{
Date
:
props
.
day
,
School_Id
:
'-1'
,
},
SchoolName
:
'不限校区'
,
schoolList
:[],
dataList
:[],
//数据list
basics
:{},
//基础信息
defaultDate
:
new
Date
(
props
.
day
).
getTime
()
})
let
methods
=
{
getscreen
(
type
){
data
.
dateshow
=
true
},
onConfirm
(
e
){
let
date
=
new
Date
(
e
.
detail
)
let
year
=
date
.
getFullYear
()
let
month
=
date
.
getMonth
()
+
1
;
month
=
month
<
10
?
'0'
+
month
:
month
let
day
=
date
.
getDate
();
day
=
day
<
10
?
'0'
+
day
:
day
data
.
msg
.
Date
=
year
+
'-'
+
month
+
'-'
+
day
;
this
.
dateshow
=
false
;
that
.
judge
()
},
getschoolList
(){
proxy
.
$request
(
"/user/GetDropSchoolList"
,
{}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
schoolList
=
res
.
Data
;
let
obj
=
{
SId
:
'-1'
,
SName
:
'不限校区'
}
data
.
schoolList
.
unshift
(
obj
)
}
})
},
getCutomTypeCheck
(
e
){
let
i
=
e
.
detail
.
value
;
data
.
msg
.
School_Id
=
data
.
schoolList
[
i
].
SId
data
.
SchoolName
=
data
.
schoolList
[
i
].
SName
;
that
.
judge
()
},
getList
(){
uni
.
showLoading
({
title
:
'加载中...'
})
proxy
.
$request
(
"/AppletCenter/GetScrollAppointmentTeacherList"
,
data
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
dataList
=
res
.
Data
;
uni
.
hideLoading
()
}
})
},
getBaseInfo
(){
proxy
.
$request
(
"/AppletCenter/GetScrollAppointmentBaseInfo"
,{}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
basics
=
res
.
Data
;
that
.
judge
()
}
})
},
judge
(){
//判断
if
(
data
.
basics
.
IsNextAppoint
==
true
){
//是否可以预约
let
differ
=
that
.
differday
(
data
.
msg
.
Date
)
if
(
differ
>=
data
.
basics
.
AdvanceDay
&&
data
.
basics
.
AppointDay
>=
differ
){
//提前几天预约 和可预约的天数
//TODO 还有一个时间判断 不知道咋个处理 ScrollETime
that
.
getList
()
}
else
{
}
}
},
differday
(
startDate
){
//获取2个时间相隔多少天
var
sdate
=
new
Date
(
startDate
.
replace
(
/-/g
,
"/"
));
var
now
=
new
Date
();
var
days
=
sdate
.
getTime
()
-
now
.
getTime
()
;
var
day
=
parseInt
(
days
/
(
1000
*
60
*
60
*
24
))
+
1
;
return
day
;
},
gotimelist
(
item
){
//跳转到时段页面
let
obj
=
{
item
:
item
,
basics
:
data
.
basics
,
Date
:
data
.
msg
.
Date
}
console
.
log
(
obj
)
// JSON.parse(decodeURIComponent(option.formData))
uni
.
navigateTo
({
//编码
url
:
'/pages/appointment/timeSlot?data='
+
encodeURIComponent
(
JSON
.
stringify
(
obj
))
})
}
}
onMounted
(()
=>
{
})
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onShow
()
{
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"约课老师"
,
});
this
.
getschoolList
()
//获取学校下拉
this
.
getBaseInfo
()
//获取学员基础信息
},
}
</
script
>
src/pages/appointment/mySubscribe.vue
View file @
9229c6e7
...
...
@@ -11,10 +11,11 @@
box-sizing
:
border-box
;
}
.box-item
{
border-radius
:
6px
;
padding
:
15px
;
border-radius
:
12
rpx
;
box-sizing
:
border-box
;
padding
:
30
rpx
;
background
:
#FFF
;
font-size
:
14
px
;
font-size
:
24
r
px
;
}
.row
{
display
:
flex
;
...
...
@@ -30,24 +31,39 @@
background
:
#FFF
;
height
:
100vh
;
box-sizing
:
border-box
;
position
:
relative
;
}
.popupBtnBox
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
30
rpx
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
}
.popupBtn
{
font-size
:
30
rpx
;
color
:
#111
;
}
.popupbox-c
{
padding
:
20
rpx
;
box-sizing
:
border-box
;
}
.popupbox-list
{
height
:
45px
;
height
:
90
rpx
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.05
);
font-size
:
13
px
;
font-size
:
26
r
px
;
color
:
#555555
;
box-sizing
:
border-box
;
}
.popupbox-item
{
justify-content
:
space-between
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.05
);
height
:
50
px
;
height
:
100
r
px
;
}
</
style
>
<
template
>
...
...
@@ -63,35 +79,35 @@
>
<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: 1
40rpx;background: #FFF;height: 44px;line-height: 44px;text-align
: center;"
@
click=
"popupshow2=true"
>
老师
<view
class=
"onetext"
style=
"width: 1
00rpx;background: #FFF;height: 88rpx;display: flex;align-items: center;justify-content
: center;"
@
click=
"popupshow2=true"
>
<van-icon
name=
"bars"
size=
"44rpx"
/>
</view>
</view>
<view
v-if=
"List.length>0"
>
<scroll-view
:scroll-y=
"true"
style=
"height: calc(100vh - 150rpx );width:
calc(100vw)
;"
>
<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=
"box-item"
>
<view
class=
"row"
style=
"justify-content: space-between;
line-height: 30
px;"
>
<view
class=
"row"
style=
"justify-content: space-between;
font-size: 30rpx;line-height: 60rpx;margin-bottom: 20r
px;"
>
<span>
{{
x
.
Date
}}
</span>
<span>
{{
x
.
StateName
}}
</span>
</view>
<view
class=
"row"
style=
"align-items: flex-start;"
>
<image
:src=
'x.TeacherHead'
mode=
"aspectFill"
style=
"width:
38px ;height: 38
px;border-radius: 50%;"
></image>
<view
style=
"margin-left:
15px;padding-bottom:10
px ;"
>
<div
style=
"font-size:
13
px;color: #111;font-weight: bold"
>
{{
x
.
CourseName
}}
</div>
<div
style=
"font-size:
11px;color: #666;margin-top: 4
px;"
>
{{
x
.
TeacherName
}}
</div>
<div
style=
"font-size:
11px;color: #666;margin-top: 4
px;"
>
学生:
{{
x
.
StuName
}}
</div>
<div
style=
"font-size:
11px;color: #666;margin-top: 4
px;"
>
第
{{
x
.
ChapterNo
}}
次课
</div>
<image
:src=
'x.TeacherHead'
mode=
"aspectFill"
style=
"width:
76rpx ;height: 76r
px;border-radius: 50%;"
></image>
<view
style=
"margin-left:
30rpx;padding-bottom:20r
px ;"
>
<div
style=
"font-size:
26r
px;color: #111;font-weight: bold"
>
{{
x
.
CourseName
}}
</div>
<div
style=
"font-size:
22rpx;color: #666;margin-top: 8r
px;"
>
{{
x
.
TeacherName
}}
</div>
<div
style=
"font-size:
22rpx;color: #666;margin-top: 8r
px;"
>
学生:
{{
x
.
StuName
}}
</div>
<div
style=
"font-size:
22rpx;color: #666;margin-top: 8r
px;"
>
第
{{
x
.
ChapterNo
}}
次课
</div>
</view>
</view>
<view
>
时间列表
</view>
<view
v-for=
"(item,index) in x.CourseTimeList"
>
<view
v-for=
"(item,index) in x.CourseTimeList"
:key=
"index"
>
<view
class=
"row"
>
{{
item
.
StartTime
}}
<span
style=
"margin: 0
5
px;"
>
-
</span>
<span
style=
"margin: 0
10r
px;"
>
-
</span>
{{
item
.
EndTime
}}
<span
style=
'margin-left:
10
px;'
>
{{
item
.
Minutes
}}
分钟
</span>
<span
style=
'margin-left:
20r
px;'
>
{{
item
.
Minutes
}}
分钟
</span>
</view>
</view>
<view
style=
"display: flex;justify-content: flex-end;"
v-if=
"x.State == 1"
>
...
...
@@ -99,7 +115,7 @@
</view>
</view>
</view>
<view
style=
"width: 100%;height:
20
px;"
></view>
<view
style=
"width: 100%;height:
40r
px;"
></view>
</scroll-view>
</view>
<view
v-else
>
...
...
@@ -128,10 +144,20 @@
<view
class=
"popupbox-item row"
>
<span>
老师
</span>
<view
class=
"row"
@
click=
"popupshow=true"
>
<span
v-if=
"msg.
EntTime==''
"
style=
"color: #999999;"
>
请选择
</span>
<span
v-else
>
{{
msg
.
EntTi
me
}}
</span>
<span
v-if=
"msg.
TeacherId==0
"
style=
"color: #999999;"
>
请选择
</span>
<span
v-else
>
{{
TeacherNa
me
}}
</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"
size=
"small"
@
click=
"search"
>
确定
</van-button>
<!--
<view
class=
"popupBtn"
>
确定
</view>
-->
</view>
</view>
</van-popup>
<van-popup
:show=
"popupshow"
@
close=
"popupshow=false"
position=
'right'
>
...
...
@@ -192,6 +218,7 @@
State
:
0
,
TeacherId
:
0
,
},
TeacherName
:
""
,
pageState
:
"more"
,
PageCount
:
0
,
timer
:
null
,
//防抖
...
...
@@ -256,6 +283,10 @@
proxy
.
$request
(
"/AppletCenter/GetTeacherList"
,{}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
TeacherList
=
res
.
Data
data
.
TeacherList
.
push
({
TeacherName
:
'不限'
,
TeacherId
:
0
})
data
.
allTeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
))
}
})
...
...
@@ -265,6 +296,7 @@
data
.
popupshow
=
false
;
data
.
value
=
''
;
data
.
TeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
allTeacherList
))
data
.
TeacherName
=
x
.
TeacherName
},
onSearch
(
val
){
if
(
!
val
.
detail
)
{
...
...
@@ -314,6 +346,11 @@
let
day
=
curdate
.
getDate
()
<
9
?
"0"
+
(
curdate
.
getDate
()
)
:
curdate
.
getDate
()
data
.
msg
.
EntTime
=
year
+
"-"
+
month
+
'-'
+
day
;
data
.
showdatePopup2
=
false
},
search
(){
data
.
msg
.
pageIndex
=
1
this
.
getList
()
data
.
popupshow2
=
false
}
}
...
...
@@ -331,7 +368,7 @@
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"
我的预约
"
,
title
:
"
约课记录
"
,
});
this
.
getState
()
...
...
src/pages/appointment/record.vue
deleted
100644 → 0
View file @
9a558d23
<
template
>
<view
class=
""
>
<view
class=
"box-top"
>
<view
class=
"box-top-item flex"
@
click=
"showCalendar"
>
<view
class=
"ellipsis"
>
<text
v-if=
"date.length==2"
>
{{
date
[
0
]
}}
-
{{
date
[
1
]
}}
</text>
<text
v-else
>
选择日期
</text>
</view>
<van-icon
name=
"arrow-down"
size=
'12'
style=
'margin-left: 5px;'
/>
</view>
<picker
mode=
"selector"
range-key=
"Name"
style=
"width: 50%;"
:range=
"stateList"
@
change=
"getState"
>
<view
class=
"box-top-item flex"
style=
"width: 100%;height: 100rpx;"
>
<view
class=
"ellipsis"
>
{{
stateName
}}
</view>
<van-icon
name=
"arrow-down"
size=
'12'
style=
'margin-left: 5px;'
/>
</view>
</picker>
</view>
<van-calendar
:show=
"isShowcalendar"
type=
"range"
@
close=
"isShowcalendar=false"
@
confirm=
"onConfirmCalendar"
/>
</view>
</
template
>
<
script
>
import
{
toRefs
,
reactive
,
getCurrentInstance
}
from
'vue'
import
{
DateFormat
}
from
'../../utils/date.js'
export
default
{
setup
(){
const
data
=
reactive
({
msg
:{
State
:
1
,
},
isShowcalendar
:
false
,
date
:[],
stateName
:
"不限"
,
stateList
:[
{
Name
:
"待确认"
,
Id
:
1
,
},
{
Name
:
"待上课"
,
Id
:
2
},{
Name
:
"已上课"
,
Id
:
3
},{
Name
:
"缺席"
,
Id
:
4
}
]
})
const
methods
=
{
showCalendar
(){
data
.
isShowcalendar
=
true
},
getState
(
e
){
let
i
=
e
.
detail
.
value
;
data
.
stateName
=
data
.
stateList
[
i
].
Name
;
let
id
=
data
.
stateList
[
i
].
Id
},
onConfirmCalendar
(
e
){
data
.
isShowcalendar
=
false
let
dateS
=
DateFormat
(
e
.
detail
[
0
],
'/'
)
let
dateE
=
DateFormat
(
e
.
detail
[
1
],
'/'
)
data
.
date
=
[
dateS
,
dateE
]
console
.
log
(
68
,
data
.
date
)
}
}
return
{
...
toRefs
(
data
),
...
methods
}
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"约课记录"
})
}
}
</
script
>
<
style
scoped
>
.flex
{
display
:
flex
;
align-items
:
center
;
}
.box-top
{
display
:
flex
;
box-shadow
:
0
4
rpx
24
rpx
rgba
(
100
,
101
,
102
,
.12
);
height
:
100
rpx
;
background
:
#FFF
;
}
.box-top-item
{
width
:
50%
;
justify-content
:
center
;
font-size
:
13px
;
}
.ellipsis
{
font-size
:
24
rpx
;
max-width
:
80%
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
</
style
>
src/pages/appointment/timeSlot.vue
deleted
100644 → 0
View file @
9a558d23
<
style
scoped
>
.timeSlot
{
width
:
100%
;
height
:
100vh
;
}
.listbox
{
width
:
100%
;
margin-top
:
15px
;
padding
:
0
15px
;
box-sizing
:
border-box
;
}
.box-item
{
border-radius
:
6px
;
padding
:
15px
;
box-shadow
:
0px
3px
6px
0px
rgba
(
139
,
115
,
64
,
0.16
);
font-size
:
14px
;
}
.row
{
display
:
flex
;
align-items
:
center
;
}
.box-top
{
width
:
100%
;
height
:
26px
;
font-size
:
12px
;
}
.btnbox
{
width
:
100%
;
height
:
150
rpx
;
background
:
#FFF
;
box-sizing
:
border-box
;
box-shadow
:
3px
3px
6px
0px
rgba
(
139
,
115
,
64
,
0.16
);
padding
:
0
15px
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
}
.btn
{
width
:
110px
;
height
:
40px
;
border-radius
:
6px
;
background-color
:
#0000ff
;
font-size
:
14px
;
color
:
#FFF
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
</
style
>
<
template
>
<view
class=
"timeSlot"
>
<view
v-if=
"list.CourseTimeList.length>0"
>
<scroll-view
:scroll-y=
"true"
style=
"height: calc(100vh - 150rpx );width: calc(100vw);"
>
<view
class=
"listbox"
v-for=
'(x,y) in list.CourseTimeList'
:key =
'y'
>
<view
class=
"box-item"
>
<view
class=
"row box-top"
style=
"justify-content: space-between;"
>
<view>
<van-checkbox
:value=
"x.checked"
@
change=
"onChange(y)"
></van-checkbox>
</view>
<view>
<span
v-if=
'x.State==0'
>
可预约
</span>
<span
v-if=
'x.State==2'
>
不可预约
</span>
<span
v-if=
'x.State==3'
>
他人预约
</span>
<span
v-if=
'x.State==4'
>
我的预约
</span>
</view>
</view>
<view
class=
"row"
style=
"line-height: 35px;justify-content: flex-end;"
>
{{
x
.
StartTime
}}
<span
style=
"margin: 0 10px;"
>
-
</span>
{{
x
.
EndTime
}}
</view>
</view>
</view>
<view
style=
"width: 100%;height: 20px;"
></view>
</scroll-view>
</view>
<view
v-else
>
<van-empty
description=
"暂无数据"
/>
</view>
<view
class=
"btnbox row"
style=
"justify-content: space-between;"
>
<view>
2
</view>
<view
class=
"btn"
@
click=
"subscribe"
>
立即预约
</view>
</view>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
provide
,
}
from
"vue"
;
export
default
{
components
:
{
},
props
:[
'data'
],
setup
(
props
)
{
console
.
log
(
JSON
.
parse
(
decodeURIComponent
(
props
.
data
)))
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
basics
:
JSON
.
parse
(
decodeURIComponent
(
props
.
data
)).
basics
,
list
:
JSON
.
parse
(
decodeURIComponent
(
props
.
data
)).
item
,
Date
:
JSON
.
parse
(
decodeURIComponent
(
props
.
data
)).
Date
})
let
methods
=
{
datahandle
(){
//进来的时候数据处理
console
.
log
(
data
.
list
)
if
(
data
.
list
.
CourseTimeList
&&
data
.
list
.
CourseTimeList
.
length
>
0
){
data
.
list
.
CourseTimeList
.
forEach
(
x
=>
{
x
.
checked
=
false
})
}
},
onChange
(
index
){
data
.
list
.
CourseTimeList
[
index
].
checked
=
!
data
.
list
.
CourseTimeList
[
index
].
checked
;
},
subscribe
(){
//立即预约
let
ShiftSort
=
[];
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
list
.
CourseTimeList
))
list
.
forEach
(
x
=>
{
if
(
x
.
checked
==
true
){
ShiftSort
.
push
(
x
.
Sort
)
}
})
ShiftSort
=
ShiftSort
.
join
(
','
)
let
obj
=
{
Date
:
data
.
Date
,
AccountId
:
data
.
list
.
AccountId
,
TeacherId
:
data
.
list
.
TeacherId
,
ShiftSort
:
ShiftSort
,
CourseId
:
data
.
basics
.
CourseId
,
ChapterNo
:
data
.
basics
.
NextAppointChapterNo
,
}
proxy
.
$request
(
"/AppletCenter/SetScrollAppointment"
,
obj
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
});
uni
.
redirectTo
({
url
:
'/pages/appointment/mySubscribe'
})
}
})
}
}
onMounted
(()
=>
{
})
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onShow
()
{
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"时段选择"
,
});
this
.
datahandle
()
},
}
</
script
>
src/pages/person/person.vue
View file @
9229c6e7
...
...
@@ -43,11 +43,15 @@
</view>
</view>
</view>
<view
class=
""
@
click=
"jumpPage(`/pages/appointment/record`)"
>
约课记录
</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>
</view>
<view
class=
"statistic"
>
<view
class=
"statisticItem"
>
<view
class=
"time"
>
{{
pageData
.
CourseInfo
.
TotalHours
||
0
}}
...
...
src/pages/timetable/timeTable.vue
View file @
9229c6e7
...
...
@@ -63,7 +63,7 @@
</swiper>
<view
class=
"Timetable-box"
>
<view
class=
"flex flex_center_center
loading
"
v-if=
"loading"
>
<view
class=
"flex flex_center_center"
v-if=
"loading"
>
<van-loading
size=
"48rpx"
type=
"spinner"
>
加载中...
</van-loading>
</view>
<van-empty
description=
"暂无课程"
v-if=
"dataList.length === 0"
/>
...
...
@@ -74,8 +74,11 @@
<van-toast
id=
"van-toast"
/>
<view
class=
"btnfixed"
>
<image
@
click=
"goappointment"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/
jiaheb2b/checkDuplicate_btn
.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/
educationStu/book
.png"
mode=
"widthFix"
></image>
<view
style=
"font-size: 22rpx;color: #4C50E7;text-align: center;"
>
约课
</view>
</view>
</view>
</
template
>
...
...
@@ -234,7 +237,7 @@
let
methods
=
{
// 获取当天数据
async
getData
()
{
//
if(data.msg.ClassId
<=
0
)
return
if
(
data
.
msg
.
ClassId
<=
0
)
return
data
.
loading
=
true
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
data
.
loading
=
false
...
...
@@ -244,7 +247,7 @@
},
//获取当月数据
async
getAllData
()
{
//
if(data.msg.ClassId
<=
0
)
return
if
(
data
.
msg
.
ClassId
<=
0
)
return
loadingS
()
try
{
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
...
...
@@ -582,21 +585,13 @@
.btnfixed
{
position
:
fixed
;
right
:
0
px
;
bottom
:
92px
;
right
:
20
r
px
;
bottom
:
92
r
px
;
z-index
:
9999
;
}
.btnfixed
image
{
width
:
8
0px
;
width
:
3
0px
;
height
:
auto
;
}
.loading
{
/* position: fixed;
top: 200rpx;
left: 50%;
z-index: 999;
transform: translateX(-50%); */
}
</
style
>
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