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
cb346208
Commit
cb346208
authored
Feb 21, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
e60c46d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
39 deletions
+50
-39
otherTeacherTime.vue
src/components/subscribe/otherTeacherTime.vue
+12
-3
index.vue
src/pages/appointment/index.vue
+38
-36
No files found.
src/components/subscribe/otherTeacherTime.vue
View file @
cb346208
...
...
@@ -28,7 +28,7 @@
}
.infoBox
{
height
:
calc
(
100%
-
1
50
rpx
);
height
:
calc
(
100%
-
2
50
rpx
);
box-sizing
:
border-box
;
padding
:
0
20
rpx
;
overflow-y
:
auto
;
...
...
@@ -57,7 +57,7 @@
flex-grow
:
1
;
}
.
infoRow
.
subBtn
{
.subBtn
{
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
...
...
@@ -76,7 +76,7 @@
提示
</view>
<view
class=
"subtitle"
>
当
前时段已有预约列表
,是否切换?
当
日有相同课程
,是否切换?
</view>
<view
class=
"infoBox"
>
<view
v-for=
"(info,index) in infoList"
:key=
"index"
class=
"infoItem"
>
...
...
@@ -122,6 +122,11 @@
</view>
</view>
<view
style=
"display: flex;justify-content:center"
>
<view
class=
"subBtn"
@
click=
"goOn"
style=
"display: inline-block;"
>
继续预约
</view>
</view>
</view>
</van-popup>
...
...
@@ -168,6 +173,10 @@
},
chooseTime
(
item
)
{
ctx
.
emit
(
"change"
,
item
)
},
goOn
()
{
data
.
showpop
=
false
ctx
.
emit
(
"goOn"
)
}
}
watch
(()
=>
props
.
show
,
(
val
)
=>
{
...
...
src/pages/appointment/index.vue
View file @
cb346208
...
...
@@ -170,7 +170,8 @@
</view>
</view>
</van-overlay>
<OtherTeacherTime
:show=
"showOtherTime"
:infoList=
"OtherTimeList"
@
close=
"closeOtherTeacherTime"
@
change=
"changeTime"
/>
<OtherTeacherTime
:show=
"showOtherTime"
:infoList=
"OtherTimeList"
@
close=
"closeOtherTeacherTime"
@
change=
"changeTime"
@
goOn=
"subscribe(ShiftSortArr)"
/>
</view>
</
template
>
...
...
@@ -216,9 +217,10 @@
courselist
:
[],
schoolName
:
""
,
roomName
:
""
,
latestTime
:
"00:00"
,
//最后预约的课时
showOtherTime
:
false
,
OtherTimeList
:[]
latestTime
:
"00:00"
,
//最后预约的课时
showOtherTime
:
false
,
OtherTimeList
:
[],
ShiftSortArr
:
[],
//暂存选中的时段
})
const
methods
=
{
onConfirmCalendar
(
val
)
{
...
...
@@ -272,9 +274,9 @@
data
.
schoolName
=
data
.
teacherList
[
val
.
detail
.
current
].
SchoolName
data
.
roomName
=
data
.
teacherList
[
val
.
detail
.
current
].
RoomName
methods
.
courseGroup
()
data
.
courselist
.
map
(
e
=>
{
if
(
e
.
State
==
4
)
{
data
.
latestTime
=
e
.
StartTime
data
.
courselist
.
map
(
e
=>
{
if
(
e
.
State
==
4
)
{
data
.
latestTime
=
e
.
StartTime
}
})
},
...
...
@@ -291,10 +293,10 @@
data
.
schoolName
=
data
.
teacherList
[
0
].
SchoolName
data
.
roomName
=
data
.
teacherList
[
0
].
RoomName
methods
.
courseGroup
()
data
.
courselist
.
map
(
e
=>
{
if
(
e
.
State
==
4
)
{
data
.
latestTime
=
e
.
StartTime
data
.
courselist
.
map
(
e
=>
{
if
(
e
.
State
==
4
)
{
data
.
latestTime
=
e
.
StartTime
}
})
}
else
{
...
...
@@ -331,7 +333,7 @@
const
date
=
new
Date
()
const
y
=
date
.
getFullYear
()
const
m
=
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
.
getMonth
()
+
1
const
d
=
date
.
getDate
()
const
maxStr
=
y
+
'-'
+
m
+
'-'
+
(
d
+
res
.
Data
.
AppointDay
-
1
)
data
.
maxDateStr
=
new
Date
(
maxStr
).
getTime
()
...
...
@@ -365,7 +367,7 @@
proxy
.
$request
(
"/AppletCenter/GetScrollAppointmentTeacherList"
,
data
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
teacherList
=
res
.
Data
;
console
.
log
(
355
,
data
.
latestTime
)
console
.
log
(
355
,
data
.
latestTime
)
if
(
data
.
teacherList
.
length
>
0
)
{
data
.
courselist
=
data
.
teacherList
[
data
.
current
].
CourseTimeList
data
.
schoolName
=
data
.
teacherList
[
data
.
current
].
SchoolName
...
...
@@ -390,12 +392,12 @@
},
//选课
checkCourse
(
index
)
{
if
(
data
.
basics
.
AdvanceDay
==
1
)
{
if
(
data
.
basics
.
AdvanceDay
==
1
&&
data
.
basics
.
ScrollETime
)
{
const
lateTime
=
new
Date
(
getToday
()
+
' '
+
data
.
basics
.
ScrollETime
).
getTime
()
const
nowTime
=
new
Date
().
getTime
()
const
targetDay
=
parseInt
(
data
.
msg
.
Date
.
slice
(
-
2
))
const
curDay
=
parseInt
(
getToday
().
slice
(
-
2
))
if
(
nowTime
>
lateTime
&&
(
targetDay
-
curDay
===
1
))
{
const
targetDay
=
parseInt
(
data
.
msg
.
Date
.
slice
(
-
2
))
const
curDay
=
parseInt
(
getToday
().
slice
(
-
2
))
if
(
nowTime
>
lateTime
&&
(
targetDay
-
curDay
===
1
))
{
uni
.
showToast
({
icon
:
'none'
,
title
:
`
${
data
.
basics
.
ScrollETime
}
点后不可预约明天课程`
...
...
@@ -425,11 +427,11 @@
})
return
}
else
{
console
.
log
(
428
,
ShiftSortArr
)
console
.
log
(
428
,
ShiftSortArr
)
this
.
mapNextCourse
(
index
,
ShiftSortArr
,
RemainTime
)
}
}
else
if
(
RemainTime
==
0
)
{
// this.subscribe(ShiftSortArr)
this
.
ShiftSortArr
=
ShiftSortArr
this
.
validateAppointment
(
ShiftSortArr
)
}
else
{
uni
.
showToast
({
...
...
@@ -447,7 +449,7 @@
let
RemainTime2
=
RemainTime
-
nexCourse
.
Minutes
//剩余课时
ShiftSortArr
.
push
(
nexCourse
)
if
(
RemainTime2
===
0
)
{
// this.subscribe(ShiftSortArr)
this
.
ShiftSortArr
=
ShiftSortArr
this
.
validateAppointment
(
ShiftSortArr
)
}
else
if
(
RemainTime2
>
0
)
{
this
.
mapNextCourse
(
nexIndex
,
ShiftSortArr
,
RemainTime2
)
...
...
@@ -492,7 +494,8 @@
return
cur
.
Minutes
+
pre
},
0
)
if
(
data
.
basics
.
NextAppointMinutes
==
total
)
{
this
.
subscribe
(
item
)
this
.
ShiftSortArr
=
item
this
.
validateAppointment
(
item
)
}
else
{
uni
.
showToast
({
icon
:
'none'
,
...
...
@@ -522,7 +525,7 @@
})
// console.log(486, res)
// if (res[data.basics.TempleteList[0]] == 'accept') {
// } else {
// uni.showToast({
// icon: 'none',
...
...
@@ -558,10 +561,10 @@
proxy
.
$request
(
"/AppletCenter/ValidateToDayAppointment"
,
msg
).
then
(
res
=>
{
if
(
res
.
Data
.
State
==
0
||
res
.
Data
.
State
==
1
)
{
this
.
subscribe
(
ShiftSortArr
)
}
else
if
(
res
.
Data
.
State
==
2
||
res
.
Data
.
State
==
3
)
{
}
else
if
(
res
.
Data
.
State
==
2
||
res
.
Data
.
State
==
3
)
{
console
.
log
(
'验证约课时段'
,
res
)
data
.
OtherTimeList
=
res
.
Data
.
TimeList
data
.
showOtherTime
=
true
data
.
OtherTimeList
=
res
.
Data
.
TimeList
data
.
showOtherTime
=
true
}
})
},
...
...
@@ -571,12 +574,11 @@
// let sArr=s.split(':')
// let sStr=sArr[0]*3600+sArr[1]*60
// },
closeOtherTeacherTime
(
val
){
closeOtherTeacherTime
(
val
)
{
data
.
showOtherTime
=
val
},
//切换-预约其他老师的课
changeTime
(
item
){
changeTime
(
item
)
{
const
obj
=
{
Date
:
data
.
msg
.
Date
,
AccountId
:
item
.
AccountId
,
...
...
@@ -590,13 +592,13 @@
success
(
res
)
{
proxy
.
$request
(
"/AppletCenter/SetScrollAppointment"
,
obj
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
showOtherTime
=
false
let
findIndex
=
data
.
teacherList
.
findIndex
(
e
=>
{
return
e
.
TeacherId
==
item
.
TeacherId
data
.
showOtherTime
=
false
let
findIndex
=
data
.
teacherList
.
findIndex
(
e
=>
{
return
e
.
TeacherId
==
item
.
TeacherId
})
console
.
log
(
findIndex
)
if
(
findIndex
)
{
data
.
current
=
findIndex
if
(
findIndex
)
{
data
.
current
=
findIndex
}
methods
.
updateBaseInfo
()
methods
.
updateTeacherList
()
...
...
@@ -604,14 +606,14 @@
}
})
// if (res[data.basics.TempleteList[0]] == 'accept') {
// } else {
// uni.showToast({
// icon: 'none',
// title: "订阅失败,请重新预约"
// })
// }
},
fail
()
{
uni
.
showToast
({
...
...
@@ -625,7 +627,7 @@
onMounted
(()
=>
{
methods
.
getDateData
()
methods
.
getBaseInfo
()
})
return
{
...
toRefs
(
data
),
...
...
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