Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
f7bad1ac
Commit
f7bad1ac
authored
Sep 02, 2024
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
约课
parent
d89019ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
496 additions
and
908 deletions
+496
-908
schedu.js
src/api/scheduling/schedu.js
+31
-19
student-shiting.vue
src/components/school/student/student-shiting.vue
+19
-106
TrialClass.vue
src/pages/h5page/TrialClass.vue
+35
-783
audition.vue
src/pages/h5page/audition.vue
+355
-0
statusPrompt.vue
src/pages/h5page/statusPrompt.vue
+56
-0
No files found.
src/api/scheduling/schedu.js
View file @
f7bad1ac
...
@@ -178,7 +178,7 @@ export function DutyCheck(data) {
...
@@ -178,7 +178,7 @@ export function DutyCheck(data) {
/**
/**
* 值班打卡/值班交接
* 值班打卡/值班交接
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
saveDutyCheck
(
data
)
{
export
function
saveDutyCheck
(
data
)
{
return
request
({
return
request
({
...
@@ -190,7 +190,7 @@ export function saveDutyCheck(data) {
...
@@ -190,7 +190,7 @@ export function saveDutyCheck(data) {
/**
/**
* 约课管理
* 约课管理
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
GetReserveClassPage
(
data
)
{
export
function
GetReserveClassPage
(
data
)
{
return
request
({
return
request
({
...
@@ -202,7 +202,7 @@ export function GetReserveClassPage(data) {
...
@@ -202,7 +202,7 @@ export function GetReserveClassPage(data) {
/**
/**
* 设置约课信息
* 设置约课信息
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
SetVisitorReserve
(
data
)
{
export
function
SetVisitorReserve
(
data
)
{
return
request
({
return
request
({
...
@@ -213,9 +213,21 @@ export function SetVisitorReserve(data) {
...
@@ -213,9 +213,21 @@ export function SetVisitorReserve(data) {
}
}
/**
* 预约课程详情
* @param {JSON参数} data
*/
export
function
GetVisitorReserveById
(
data
)
{
return
request
({
url
:
'/VisitorReserve/GetVisitorReserveById'
,
method
:
'post'
,
data
});
}
/**
/**
* 设置约课开课信息
* 设置约课开课信息
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
SetVisitorReserveClass
(
data
)
{
export
function
SetVisitorReserveClass
(
data
)
{
return
request
({
return
request
({
...
@@ -226,7 +238,7 @@ export function SetVisitorReserveClass(data) {
...
@@ -226,7 +238,7 @@ export function SetVisitorReserveClass(data) {
}
}
/**
/**
* 新增留学需求
* 新增留学需求
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
SetStudyAbroad
(
data
)
{
export
function
SetStudyAbroad
(
data
)
{
return
request
({
return
request
({
...
@@ -238,7 +250,7 @@ export function SetStudyAbroad(data) {
...
@@ -238,7 +250,7 @@ export function SetStudyAbroad(data) {
/**
/**
* 新增学员反馈信息
* 新增学员反馈信息
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
SetVisitorReserveFeedback
(
data
)
{
export
function
SetVisitorReserveFeedback
(
data
)
{
return
request
({
return
request
({
...
@@ -249,7 +261,7 @@ export function SetVisitorReserveFeedback(data) {
...
@@ -249,7 +261,7 @@ export function SetVisitorReserveFeedback(data) {
}
}
/**
/**
* 约课管理
* 约课管理
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
queryVisitorReservePage
(
data
)
{
export
function
queryVisitorReservePage
(
data
)
{
return
request
({
return
request
({
...
@@ -262,7 +274,7 @@ export function queryVisitorReservePage(data) {
...
@@ -262,7 +274,7 @@ export function queryVisitorReservePage(data) {
/**
/**
* 删除试听课程
* 删除试听课程
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
RemoveReserveClass
(
data
)
{
export
function
RemoveReserveClass
(
data
)
{
return
request
({
return
request
({
...
@@ -274,7 +286,7 @@ export function RemoveReserveClass(data) {
...
@@ -274,7 +286,7 @@ export function RemoveReserveClass(data) {
/**
/**
* 保存修改听课程
* 保存修改听课程
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
SetReserveClass
(
data
)
{
export
function
SetReserveClass
(
data
)
{
return
request
({
return
request
({
...
@@ -287,7 +299,7 @@ export function SetReserveClass(data) {
...
@@ -287,7 +299,7 @@ export function SetReserveClass(data) {
/**
/**
* 获取约课班级详情
* 获取约课班级详情
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
GetReserveClass
(
data
)
{
export
function
GetReserveClass
(
data
)
{
return
request
({
return
request
({
...
@@ -299,7 +311,7 @@ export function GetReserveClass(data) {
...
@@ -299,7 +311,7 @@ export function GetReserveClass(data) {
/**
/**
* 修改预约状态
* 修改预约状态
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
setVisitorReserveStatus
(
data
)
{
export
function
setVisitorReserveStatus
(
data
)
{
return
request
({
return
request
({
...
@@ -311,7 +323,7 @@ export function setVisitorReserveStatus(data) {
...
@@ -311,7 +323,7 @@ export function setVisitorReserveStatus(data) {
/**
/**
* 删除约课数据
* 删除约课数据
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
RemoveVisitorReserve
(
data
)
{
export
function
RemoveVisitorReserve
(
data
)
{
return
request
({
return
request
({
...
@@ -323,7 +335,7 @@ export function RemoveVisitorReserve(data) {
...
@@ -323,7 +335,7 @@ export function RemoveVisitorReserve(data) {
/**
/**
* 获取交接班次
* 获取交接班次
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
GetHandoverShiftList
()
{
export
function
GetHandoverShiftList
()
{
return
request
({
return
request
({
...
@@ -335,7 +347,7 @@ export function GetHandoverShiftList() {
...
@@ -335,7 +347,7 @@ export function GetHandoverShiftList() {
/**
/**
* 获取节假日计划分页列表
* 获取节假日计划分页列表
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
getHolidayPlanList
(
data
)
{
export
function
getHolidayPlanList
(
data
)
{
return
request
({
return
request
({
...
@@ -347,7 +359,7 @@ export function getHolidayPlanList(data) {
...
@@ -347,7 +359,7 @@ export function getHolidayPlanList(data) {
/**
/**
* 获取节假日计划详情
* 获取节假日计划详情
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
getHolidayInfo
(
data
)
{
export
function
getHolidayInfo
(
data
)
{
return
request
({
return
request
({
...
@@ -359,7 +371,7 @@ export function getHolidayInfo(data) {
...
@@ -359,7 +371,7 @@ export function getHolidayInfo(data) {
/**
/**
* 新增节假日计划
* 新增节假日计划
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
setHolidayPlan
(
data
)
{
export
function
setHolidayPlan
(
data
)
{
return
request
({
return
request
({
...
@@ -371,7 +383,7 @@ export function setHolidayPlan(data) {
...
@@ -371,7 +383,7 @@ export function setHolidayPlan(data) {
/**
/**
* 删除节假日计划
* 删除节假日计划
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
delHolidayPlan
(
data
)
{
export
function
delHolidayPlan
(
data
)
{
return
request
({
return
request
({
...
@@ -382,7 +394,7 @@ export function delHolidayPlan(data) {
...
@@ -382,7 +394,7 @@ export function delHolidayPlan(data) {
}
}
/**
/**
* 获取日期范围 所有排课计划列表
* 获取日期范围 所有排课计划列表
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
getToDayCoursePlanList
(
data
)
{
export
function
getToDayCoursePlanList
(
data
)
{
return
request
({
return
request
({
...
@@ -390,4 +402,4 @@ export function getToDayCoursePlanList(data) {
...
@@ -390,4 +402,4 @@ export function getToDayCoursePlanList(data) {
method
:
'post'
,
method
:
'post'
,
data
:
data
data
:
data
})
})
}
}
\ No newline at end of file
src/components/school/student/student-shiting.vue
View file @
f7bad1ac
...
@@ -32,10 +32,10 @@
...
@@ -32,10 +32,10 @@
跟班
跟班
</q-chip>
</q-chip>
<div
v-if=
"tItem.ReservationDate&&tItem.ReservationDate.length>0&&tItem.ReservationDate!='0001-01-01T00:00:00'"
>
<div
v-if=
"tItem.ReservationDate&&tItem.ReservationDate.length>0&&tItem.ReservationDate!='0001-01-01T00:00:00'"
>
试听日期:
{{
timeFormatSeconds
(
tItem
.
ReservationDate
)
}}
试听日期:
{{
timeFormatSeconds
(
tItem
.
ReservationDate
)
}}
</div>
</div>
<div
v-if=
"tItem.Demand&&tItem.Demand.length>0"
>
<div
v-if=
"tItem.Demand&&tItem.Demand.length>0"
>
试听需求:
{{
tItem
.
Demand
}}
试听需求:
{{
tItem
.
Demand
}}
</div>
</div>
<div>
<div>
预约时间:
{{
tItem
.
ClassDateStr
}}
{{
tItem
.
ClassTime
}}
预约时间:
{{
tItem
.
ClassDateStr
}}
{{
tItem
.
ClassTime
}}
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</div>
</div>
<div
style=
"margin-top:10px;width:150px;"
<div
style=
"margin-top:10px;width:150px;"
class=
"visit_delete text-negative"
>
class=
"visit_delete text-negative"
>
<span
@
click=
"DeleteVisitorReserve(tItem.Id)"
style=
"margin-right:10px;"
>
删除
</span>
<span
@
click=
"DeleteVisitorReserve(tItem.Id)"
style=
"margin-right:10px;"
>
删除
</span>
<span
v-if=
"tItem.ReserveClassId>0"
style=
"margin-right:10px;"
@
click=
"fabkuiMsg.IsShow=true,fabkuiMsg.Id=tItem.Id,fabkuiMsg.Feedback=tItem.Feedback"
>
反馈
</span>
<span
v-if=
"tItem.ReserveClassId>0"
style=
"margin-right:10px;"
@
click=
"fabkuiMsg.IsShow=true,fabkuiMsg.Id=tItem.Id,fabkuiMsg.Feedback=tItem.Feedback"
>
反馈
</span>
<span
v-if=
"tItem.ReserveClassId==0"
@
click=
"ShitingKaiKe(tItem)"
>
试听课开课
</span>
<span
v-if=
"tItem.ReserveClassId==0"
@
click=
"ShitingKaiKe(tItem)"
>
试听课开课
</span>
</div>
</div>
...
@@ -87,58 +87,11 @@
...
@@ -87,58 +87,11 @@
<el-button
type=
"primary"
@
click=
"saveFankuiForm()"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"saveFankuiForm()"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
title=
"试听开课"
:visible
.
sync=
"VisitorReserveClassMsg.IsShow"
width=
"30%"
@
close=
"closeShitingKaiKe()"
>
<el-dialog
title=
"试听开课"
:visible
.
sync=
"VisitorReserveClassMsg.IsShow"
width=
"30%"
>
<audition
:VisitorReserveClassMsg=
"VisitorReserveClassMsg"
<div
class=
"row wrap"
>
@
close=
"closeShitingKaiKe()"
<div
style=
"width:100%;margin-bottom:15px;"
>
试听时间:
<span
style=
"color:red;"
>
{{timeFormatSeconds(VisitorReserveClassMsg.ReservationDate)}}
</span></div>
@
success=
"SetVisitorReserveClass"
></audition>
<div
style=
"width:100%;margin-bottom:15px;"
>
试听需求:
<span
style=
"color:red;"
>
{{VisitorReserveClassMsg.Demand}}
</span></div>
</el-dialog>
</div>
<div
class=
"row studentDate"
>
<q-field
filled
class=
"col-6 q-pb-lg q-pr-lg"
dense
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"VisitorReserveClassMsg.ClassDate"
ref=
"ClassDate"
:rules=
"[val => !!val || '请选择预约日期']"
style=
"width:225px"
size=
"mini"
type=
"date"
placeholder=
"预约日期"
value-format=
"yyyy-MM-dd"
>
</el-date-picker>
</
template
>
</q-field>
<div
class=
"col-6 q-pr-lg Student_Date "
>
<q-field
filled
class=
"q-pb-lg"
dense
>
<
template
v-slot:control
>
<el-time-select
v-model=
"VisitorReserveClassMsg.ClassTime"
size=
"mini"
ref=
"ClassTime"
style=
"width:50%"
:picker-options=
"
{
start: '09:00',
step: '00:15',
end: '21:00',
maxTime: VisitorReserveClassMsg.EndTime
}" placeholder="预约开始时间">
</el-time-select>
<el-time-select
v-model=
"VisitorReserveClassMsg.EndTime"
size=
"mini"
dense
ref=
"EndTime"
style=
"width:50%"
:picker-options=
"
{
start: '09:00',
step: '00:15',
end: '21:00',
minTime: VisitorReserveClassMsg.ClassTime
}" placeholder="预约结束时间">
</el-time-select>
</
template
>
</q-field>
</div>
</div>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"VisitorReserveClassMsg.TeacherId"
ref=
"TeacherId"
:options=
"TeacherList"
label=
"选择教师"
dense
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"RoomId"
dense
option-label=
"RoomName"
v-model=
"VisitorReserveClassMsg.ClassRoomId"
ref=
"ClassRoomId"
:options=
"ClassRoomList"
label=
"关联教室"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
dense
option-label=
"LessonName"
v-model=
"VisitorReserveClassMsg.TrialLessonId"
:options=
"TrialList"
label=
"试听课程"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeShitingKaiKe()"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"SetVisitorReserveClass()"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -157,7 +110,8 @@
...
@@ -157,7 +110,8 @@
}
from
"../../../api/school/index"
;
}
from
"../../../api/school/index"
;
import
reserveclassForm
from
"./reserveclass-form"
;
import
reserveclassForm
from
"./reserveclass-form"
;
import
reserveclasskaikeform
from
"./reserveclasskaikeform"
;
import
reserveclasskaikeform
from
"./reserveclasskaikeform"
;
import
audition
from
"../../../pages/h5page/audition"
;
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
""
title
:
""
...
@@ -165,7 +119,8 @@
...
@@ -165,7 +119,8 @@
components
:
{
components
:
{
reserveclassForm
,
reserveclassForm
,
reserveclasskaikeform
,
reserveclasskaikeform
,
UeEditor
UeEditor
,
audition
},
},
props
:
{
props
:
{
saveObj
:
{
saveObj
:
{
...
@@ -250,60 +205,17 @@
...
@@ -250,60 +205,17 @@
if
(
seconds
<
10
)
seconds
=
'0'
+
seconds
;
if
(
seconds
<
10
)
seconds
=
'0'
+
seconds
;
timeStr
+=
' '
+
hours
+
':'
+
min
+
':'
+
seconds
;
timeStr
+=
' '
+
hours
+
':'
+
min
+
':'
+
seconds
;
}
}
timeStr
=
year
+
'-'
+
month
+
'-'
+
day
+
timeStr
;
timeStr
=
year
+
'-'
+
month
+
'-'
+
day
+
timeStr
;
return
timeStr
;
return
timeStr
;
},
},
//保存
//保存
SetVisitorReserveClass
()
{
SetVisitorReserveClass
()
{
if
(
this
.
VisitorReserveClassMsg
.
ClassDate
==
""
)
{
this
.
$q
.
notify
({
this
.
$emit
(
"success"
);
type
:
"negative"
,
this
.
closeShitingKaiKe
();
position
:
"top"
,
this
.
getList
();
timeout
:
2000
,
message
:
"请选择预约日期!"
});
return
;
}
if
(
this
.
VisitorReserveClassMsg
.
ClassTime
==
""
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择预约开始时间!"
});
return
;
}
if
(
this
.
VisitorReserveClassMsg
.
EndTime
==
""
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择预约结束时间!"
});
return
;
}
SetVisitorReserveClass
(
this
.
VisitorReserveClassMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
"top"
});
this
.
$emit
(
"success"
);
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
res
.
Message
});
}
this
.
closeShitingKaiKe
();
this
.
getList
();
});
},
},
closeShitingKaiKe
(){
closeShitingKaiKe
(){
this
.
VisitorReserveClassMsg
.
Id
=
0
;
this
.
VisitorReserveClassMsg
.
Id
=
0
;
...
@@ -322,6 +234,7 @@ return timeStr;
...
@@ -322,6 +234,7 @@ return timeStr;
this
.
VisitorReserveClassMsg
.
ClassPlanId
=
0
;
this
.
VisitorReserveClassMsg
.
ClassPlanId
=
0
;
this
.
VisitorReserveClassMsg
.
Demand
=
""
;
this
.
VisitorReserveClassMsg
.
Demand
=
""
;
this
.
VisitorReserveClassMsg
.
IsShow
=
false
;
this
.
VisitorReserveClassMsg
.
IsShow
=
false
;
this
.
$forceUpdate
()
},
},
//试听课开课
//试听课开课
ShitingKaiKe
(
item
){
ShitingKaiKe
(
item
){
...
...
src/pages/h5page/TrialClass.vue
View file @
f7bad1ac
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.login-box
{
position
:
fixed
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
background
:
#ffffff
;
padding
:
100rpx
40rpx
40rpx
40rpx
;
}
.login-content
{
margin-bottom
:
40rpx
;
}
.login-buttom
{
margin-top
:
120rpx
;
border-radius
:
40rpx
;
}
.u-input
{
border-radius
:
0
;
border
:
0
;
border-bottom
:
1rpx
solid
#F2F2F2
;
}
.classSetting-content
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
81rpx
;
padding
:
30rpx
20rpx
20rpx
20rpx
;
}
.classSetting-title
{
border-radius
:
20rpx
;
background
:
#ffffff
;
padding
:
25rpx
20rpx
;
}
.coontent-title
{
width
:
100%
;
}
.title-left
{
color
:
#666666
;
font-size
:
28rpx
;
flex-shrink
:
0
;
width
:
69px
;
text-align
:
right
;
margin-right
:
100rpx
;
}
.title-left
text
{
color
:
red
;
margin-left
:
5rpx
;
}
.title-right
{
color
:
#282828
;
flex-grow
:
1
;
flex-wrap
:
wrap
;
font-size
:
28rpx
;
text-align
:
right
;
}
.title-right.rightNum
{
margin-right
:
10rpx
;
}
.classSetting-module
{
border-radius
:
20rpx
;
background
:
#ffffff
;
padding
:
10rpx
20rpx
;
}
.module-title
{
padding
:
15rpx
0
;
border-bottom
:
1rpx
solid
#F9F9F9
;
}
.module-title
:last-child
{
border
:
0
;
}
.choose
{
flex-grow
:
1
;
text-align
:
right
;
margin-right
:
10rpx
;
}
.choose.active
{
color
:
#D2D2D2
;
}
.classSetting-footer
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
padding
:
20rpx
20rpx
;
background
:
#ffffff
;
border-top
:
#ffffff
;
box-shadow
:
0px
6px
29px
0px
rgba
(
76
,
76
,
76
,
0
.2
);
}
.text-right
{
text-align
:
right
;
}
.footer-title
{
display
:
inline-block
;
border
:
1rpx
solid
#138CFD
;
background
:
#138CFD
;
color
:
#ffffff
;
/* margin-left: 30rpx; */
padding
:
5rpx
50rpx
;
border-radius
:
30rpx
;
}
.footer-title.Cancel
{
background
:
#ffffff
;
color
:
#138CFD
;
}
.footer-text
{
flex
:
1
;
border
:
1rpx
solid
#E9E9E9
;
border-radius
:
15rpx
;
padding
:
15rpx
0
;
text-align
:
center
;
}
.footer-text.right
{
border
:
1rpx
solid
#138CFD
;
background
:
#138CFD
;
color
:
#ffffff
;
/* margin-left: 30rpx; */
}
.footer-text.right.active
{
border
:
1rpx
solid
rgba
(
19
,
140
,
253
,
.2
);
background
:
rgba
(
19
,
140
,
253
,
.5
);
}
.popup-title
{
font-size
:
30rpx
;
text-align
:
center
;
padding
:
30rpx
;
position
:
relative
;
}
.popup-title.active
{
color
:
#666666
;
}
.popup-content
{
flex-wrap
:
wrap
;
padding
:
0
20rpx
;
}
.popup-text
{
width
:
300rpx
;
padding
:
10rpx
0
;
border-radius
:
12rpx
;
background
:
#F8F8F8
;
margin-bottom
:
25rpx
;
margin-right
:
25rpx
;
text-align
:
center
;
}
.popup-text.active
{
background
:
#E5F3FE
;
color
:
#138CFD
;
}
.popup-OuterFrame
{
min-height
:
500rpx
;
}
.popup-add
{
text-align
:
right
;
padding
:
20rpx
;
position
:
absolute
;
right
:
0
;
top
:
10rpx
;
}
.popup-list
{
padding
:
0
20rpx
;
margin-bottom
:
20rpx
;
}
.popup-time
{
background
:
#F8F8F8
;
padding
:
10rpx
20rpx
;
border-radius
:
5rpx
;
flex
:
1
;
flex-shrink
:
0
;
}
.popup-time
view
:first-child
{
font-size
:
24rpx
;
}
.popup-time
:nth-child
(
2
)
{
margin-left
:
10rpx
;
margin-right
:
10rpx
;
}
.popup-time
view
{
flex-shrink
:
0
;
}
.popup-time
text
,
.popup-time
input
{
margin-left
:
10rpx
;
font-size
:
26rpx
;
}
.popup-time
input
{
width
:
100rpx
;
background
:
#ffffff
;
padding
:
0
10rpx
;
border-radius
:
5rpx
;
}
.popup-time
text
.active
{
color
:
#989898
;
}
.time-h
{
font-size
:
22rpx
;
color
:
#989898
;
}
.popup-time-box
{
padding
:
20rpx
;
border-top
:
1rpx
solid
#F4F4F4
;
color
:
#353535
;
font-size
:
28rpx
;
}
.popup-time-box.active
{
color
:
#989898
;
}
.time-right.active
{
color
:
#989898
;
}
.time-right
.num
{
margin-right
:
10rpx
;
}
.popup-classroom
{
padding
:
20rpx
;
border-top
:
1rpx
solid
#F4F4F4
;
}
.popup-classroom.active
{
color
:
#138CFD
;
}
.popup-footer
{
padding
:
20rpx
;
border-top
:
1rpx
solid
#F6F6F6
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<div>
<div>
</div>
<audition
:VisitorReserveClassMsg=
"VisitorReserveClassMsg"
<!--
:type=
"1"
></audition>
<view
class=
"classSetting-OuterFrame"
>
</div>
<view
class=
"classSetting-content"
>
<scroll-view
scroll-y=
"true"
style=
"width:100%;height: 100%;"
>
<view
class=
"classSetting-module"
style=
"margin: 20rpx 0;"
>
<view
class=
"coontent-title flex space-between"
>
<view
class=
"title-left"
>
试听成员
</view>
<view
class=
"title-right"
>
{{
addMsg
.
VisitorName
}}
</view>
</view>
<view
class=
"coontent-title flex space-between"
style=
"padding: 5px 0;"
>
<view
class=
"title-left"
>
试听需求
</view>
<view
class=
"title-right"
>
{{
addMsg
.
Demand
}}
</view>
</view>
<view
class=
"coontent-title flex space-between"
>
<view
class=
"title-left"
>
试听时间
</view>
<view
class=
"title-right"
>
{{
formatDate
(
addMsg
.
ReservationDate
)
}}
</view>
</view>
</view>
<view
class=
"classSetting-module"
style=
"margin: 20rpx 0;"
>
<view
class=
"module-title flex space-between"
>
<view
class=
"title-left"
>
任课老师
<text>
*
</text></view>
<view
class=
"title-right flex space-between align-center"
@
click=
"dateSelection('6')"
>
<view
class=
"choose"
:class=
"
{'active':!addMsg.TeacherName}">
{{
addMsg
.
TeacherName
?
addMsg
.
TeacherName
:
'请选择'
}}
</view>
<uni-icons
type=
"right"
color=
"#CDCDCD"
size=
"16"
/>
</view>
</view>
<view
class=
"module-title flex space-between"
>
<view
class=
"title-left"
>
课程
<text>
*
</text></view>
<view
class=
"title-right flex space-between align-center"
@
click=
"dateSelection('9')"
>
<view
class=
"choose"
:class=
"
{'active':!addMsg.LessonName}">
{{
addMsg
.
LessonName
?
addMsg
.
LessonName
:
'请选择'
}}
</view>
<uni-icons
type=
"right"
color=
"#CDCDCD"
size=
"16"
/>
</view>
</view>
<view
class=
"module-title flex space-between"
>
<view
class=
"title-left"
>
上课教室
<text>
*
</text></view>
<view
class=
"title-right flex space-between align-center"
@
click=
"dateSelection('5')"
>
<view
class=
"choose"
:class=
"
{'active':!addMsg.RoomName}">
{{
addMsg
.
RoomName
?
addMsg
.
RoomName
:
'请选择'
}}
</view>
<uni-icons
type=
"right"
color=
"#CDCDCD"
size=
"16"
/>
</view>
</view>
<view
class=
"module-title flex space-between"
>
<view
class=
"title-left"
>
上课日期
<text>
*
</text></view>
<view
class=
"title-right flex space-between align-center"
@
click
.
stop=
"dateSelection('1')"
>
<view
class=
"choose"
:class=
"
{'active':!addMsg.ClassDate}">
{{
addMsg
.
ClassDate
?
addMsg
.
ClassDate
:
'请选择'
}}
</view>
<uni-icons
type=
"right"
color=
"#CDCDCD"
size=
"16"
/>
</view>
</view>
<view
class=
"module-title flex space-between"
>
<view
class=
"title-left"
>
开始时间
<text>
*
</text></view>
<view
class=
"title-right flex space-between align-center"
@
click=
"dateSelection('7')"
>
<view
class=
"choose"
:class=
"
{'active':!addMsg.ClassTime}">
{{
addMsg
.
ClassTime
?
addMsg
.
ClassTime
:
'请选择开始时间'
}}
</view>
<uni-icons
type=
"right"
color=
"#CDCDCD"
size=
"16"
/>
</view>
</view>
<view
class=
"module-title flex space-between"
>
<view
class=
"title-left"
>
结束时间
<text>
*
</text></view>
<view
class=
"title-right flex space-between align-center"
@
click=
"dateSelection('8')"
>
<view
class=
"choose"
:class=
"
{'active':!addMsg.EndTime}">
{{
addMsg
.
EndTime
?
addMsg
.
EndTime
:
'请选择结束时间'
}}
</view>
<uni-icons
type=
"right"
color=
"#CDCDCD"
size=
"16"
/>
</view>
</view>
</view>
</scroll-view>
</view>
<view
class=
"classSetting-footer flex space-between"
>
<view></view>
<view
v-if=
"loading"
class=
"footer-text right"
@
click=
"save"
>
立即提交
</view>
<view
v-else
class=
"footer-text right active"
>
立即提交
</view>
</view>
<uni-datetime-picker
ref=
"datetimePicker"
type=
"date"
:clear-icon=
"false"
v-model=
"single"
@
maskClick=
"maskClick"
/>
<uni-popup
ref=
"popupBottom"
background-color=
"#fff"
@
change=
"changePopup"
>
<template
v-if=
"singleType==5"
>
<view
class=
"popup-title active"
>
选择上课教室
</view>
<view
class=
"popup-OuterFrame"
>
<scroll-view
scroll-y=
"true"
style=
"width:100%;height: 500rpx;"
>
<view
class=
"popup-classroom flex space-between"
:class=
"
{'active':item.checked}"
v-for="item in ClassRoomList" @click="clickClassroom(item,1)">
<text>
{{
item
.
RoomName
}}
</text>
<view
class=
"list-right flex"
>
<uni-icons
v-if=
"item.checked"
type=
"checkmarkempty"
color=
"#2889DD"
size=
"16"
/>
</view>
</view>
</scroll-view>
</view>
</
template
>
<
template
v-if=
"singleType==6"
>
<view
class=
"popup-title active"
>
选择任课老师
</view>
<view
class=
"popup-OuterFrame"
>
<scroll-view
scroll-y=
"true"
style=
"width:100%;height: 500rpx;"
>
<view
class=
"popup-classroom flex space-between"
:class=
"
{'active':item.checked}"
v-for="item in TeacherList" @click="clickClassroom(item,2)">
<text>
{{
item
.
TeacherName
}}
</text>
<view
class=
"list-right flex"
>
<uni-icons
v-if=
"item.checked"
type=
"checkmarkempty"
color=
"#2889DD"
size=
"16"
/>
</view>
</view>
</scroll-view>
</view>
</
template
>
<
template
v-if=
"singleType==9"
>
<view
class=
"popup-title active"
>
选择课程
</view>
<view
class=
"popup-OuterFrame"
>
<scroll-view
scroll-y=
"true"
style=
"width:100%;height: 500rpx;"
>
<view
class=
"popup-classroom flex space-between"
:class=
"
{'active':item.checked}" v-for="item in TrialList"
@click="clickClassroom(item,3)">
<text>
{{
item
.
LessonName
}}
</text>
<view
class=
"list-right flex"
>
<uni-icons
v-if=
"item.checked"
type=
"checkmarkempty"
color=
"#2889DD"
size=
"16"
/>
</view>
</view>
</scroll-view>
</view>
</
template
>
</uni-popup>
<view
class=
"login-box"
v-show=
"popupShow"
>
<statusPrompt
:isSuccessTitle=
"isSuccessTitle"
:isSuccess=
"isSuccess"
></statusPrompt>
</view>
<u-datetime-picker
v-if=
"singleType==7"
v-model=
"addMsg.ClassTime"
:show=
"timeshow"
@
confirm=
'gettime'
@
cancel=
'timeshow=false'
mode=
"time"
start=
"9:00"
end=
"21:00"
></u-datetime-picker>
<u-datetime-picker
v-if=
"singleType==8"
v-model=
"addMsg.EndTime"
:show=
"timeshow"
@
confirm=
'gettime'
@
cancel=
'timeshow=false'
mode=
"time"
start=
"9:00"
end=
"21:00"
></u-datetime-picker>
</view>
-->
</
template
>
</
template
>
<
script
>
<
script
>
import
{
// import {
SetVisitorReserve
,
// queryClassRoomList,
queryVisitorReservePage
,
// setClassPlan,
RemoveVisitorReserve
,
// SetVisitorReserveClass,
SetVisitorReserveFeedback
,
// GetVisitorReserveById,
SetVisitorReserveClass
// GetTrialLessonList
}
from
"../../api/scheduling/schedu"
;
// } from '@/api/classRollCall.js'
import
{
// import {
getTeacherDropDownList
,
// getSchoolDropdown, //校区下拉
queryClassRoomList
,
// queryCourseDropdownList, //课程下拉
GetTrialLessonList
// getClassDropDownList, //班级列表
}
from
"../../api/school/index"
;
import
audition
from
"./audition"
;
// } from '@/api/student.js'
// import {
// getTeacherDropDownList
// } from '@/api/peer.js'
// import statusPrompt from '@/components/statusPrompt/index'
export
default
{
export
default
{
components
:
{
components
:
{
audition
},
},
data
()
{
data
()
{
return
{
return
{
title
:
''
,
VisitorReserveClassMsg
:{
keywords
:
""
,
Id
:
0
,
status
:
"loadmore"
,
Visitor_Id
:
0
,
formData
:
{
Remark
:
""
,
age
:
''
ReserveClassId
:
0
,
ClassDate
:
""
,
ReservationDate
:
""
,
ClassTime
:
""
,
TeacherId
:
0
,
ClassRoomId
:
0
,
ClassContent
:
""
,
EndTime
:
""
,
TrialLessonId
:
0
,
ReserveType
:
0
,
ClassPlanId
:
0
,
Demand
:
""
,
IsShow
:
false
,
},
},
selectList
:
[{
name
:
'跳过节假日'
,
id
:
1
,
status
:
false
},
{
name
:
'检查上课冲突'
,
id
:
2
,
status
:
false
}
],
loading
:
true
,
single
:
""
,
//日期
singleA
:
""
,
//开始日期
singleB
:
""
,
//结束日期
singleType
:
''
,
//存储按钮
ruleweek
:
''
,
timeShow
:
false
,
durationShow
:
false
,
datetimesingle
:
""
,
time
:
''
,
duration
:
''
,
timeType
:
''
,
index
:
''
,
EndTime
:
''
,
classObj
:
null
,
ClassRoomList
:
[],
TeacherList
:
[],
addMsg
:
{
Id
:
0
,
//编号
Visitor_Id
:
0
,
//访客编号
ReserveClassId
:
0
,
//选中的班级编号
ClassDate
:
""
,
//预约日期
ClassTime
:
"9:00"
,
//预约开始时间
EndTime
:
"21:00"
,
//预约结束时间
TeacherId
:
0
,
//教师编号
ClassRoomId
:
0
,
//教室编号
ClassContent
:
""
,
//主讲内容
TrialLessonId
:
0
,
ReserveType
:
0
,
ClassPlanId
:
0
,
},
comChecked
:
{},
editUrl
:
false
,
courseList
:
[],
timeshow
:
true
,
Id
:
0
,
TrialList
:
[],
isSuccessTitle
:
''
,
isSuccess
:
false
,
popupShow
:
false
,
}
},
onReady
()
{
},
onLoad
(
options
)
{
if
(
options
.
Id
)
{
this
.
Id
=
options
.
Id
;
}
}
this
.
GetTeacherList
()
this
.
getClassRoomList
()
this
.
getCourseList
()
this
.
GetTrialLesson
()
},
onShow
()
{
if
(
this
.
Id
)
this
.
GetVisitorReserve
()
},
},
computed
:
{},
computed
:
{},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
formatDate
(
value
)
{
if
(
value
)
{
const
date
=
new
Date
(
value
);
return
date
.
toLocaleDateString
();
}
return
value
;
},
gettime
(
e
)
{
//时间处理
if
(
this
.
singleType
==
'7'
)
this
.
addMsg
.
ClassTime
=
e
.
value
if
(
this
.
singleType
==
'8'
)
this
.
addMsg
.
EndTime
=
e
.
value
this
.
timeshow
=
false
this
.
$refs
.
popupBottom
.
close
(
'bottom'
)
},
// 课程列表
getCourseList
()
{
queryCourseDropdownList
({
IsQPrice
:
1
,
}).
then
((
res
)
=>
{
if
(
res
.
Code
==
1
)
{
this
.
courseList
=
res
.
Data
;
var
obj
=
{
CourseName
:
"请选择"
,
CourseId
:
0
,
};
this
.
courseList
.
unshift
(
obj
);
}
});
},
// 选择老师 教室
clickClassroom
(
item
,
type
)
{
if
(
type
==
1
)
{
this
.
ClassRoomList
.
forEach
(
i
=>
{
return
i
.
checked
=
false
})
this
.
addMsg
.
ClassRoomId
=
item
.
RoomId
this
.
addMsg
.
RoomName
=
item
.
RoomName
item
.
checked
=
!
item
.
checked
}
if
(
type
==
2
)
{
this
.
TeacherList
.
forEach
(
i
=>
{
return
i
.
checked
=
false
})
this
.
addMsg
.
TeacherId
=
item
.
TId
this
.
addMsg
.
TeacherName
=
item
.
TeacherName
item
.
checked
=
!
item
.
checked
}
if
(
type
==
3
)
{
this
.
TrialList
.
forEach
(
i
=>
{
return
i
.
checked
=
false
})
this
.
addMsg
.
TrialLessonId
=
item
.
Id
this
.
addMsg
.
LessonName
=
item
.
LessonName
item
.
checked
=
!
item
.
checked
}
this
.
$refs
.
popupBottom
.
close
(
'bottom'
)
},
// 获取日期
maskClick
(
e
)
{
let
myDate
=
new
Date
();
let
month
let
data
if
((
myDate
.
getMonth
()
+
1
)
<
10
)
{
month
=
'0'
+
(
myDate
.
getMonth
()
+
1
)
}
else
{
month
=
(
myDate
.
getMonth
()
+
1
)
}
if
(
myDate
.
getDate
()
<
10
)
{
data
=
'0'
+
myDate
.
getDate
()
}
else
{
data
=
myDate
.
getDate
()
}
let
time
=
myDate
.
getFullYear
()
+
'-'
+
month
+
'-'
+
data
if
(
e
<
time
)
{
uni
.
showToast
({
title
:
'上课日期不能早于当前日期'
,
icon
:
'none'
})
return
}
this
.
addMsg
.
ClassDate
=
e
},
// 关闭弹窗
changePopup
()
{
},
// 选择开始结束日期
dateSelection
(
type
)
{
this
.
singleType
=
type
if
(
type
==
'1'
)
{
this
.
$refs
.
datetimePicker
.
show
()
}
else
{
if
(
type
==
'6'
)
{
this
.
TeacherList
.
forEach
(
item
=>
{
if
(
item
.
TId
===
this
.
addMsg
.
TeacherId
)
{
item
.
checked
=
true
}
})
}
if
(
type
==
'7'
||
type
==
'8'
)
{
this
.
timeshow
=
true
}
if
(
type
==
'9'
)
{
this
.
TrialList
.
forEach
(
item
=>
{
if
(
item
.
Id
===
this
.
addMsg
.
TrialLessonId
)
{
item
.
checked
=
true
}
})
}
if
(
type
!=
'7'
&&
type
!=
'8'
)
this
.
$refs
.
popupBottom
.
open
(
'bottom'
)
}
},
// 保存
save
()
{
if
(
!
this
.
addMsg
.
ClassDate
)
{
uni
.
showToast
({
title
:
'请选择预约日期'
,
duration
:
2000
,
icon
:
"none"
,
});
return
}
if
(
!
this
.
addMsg
.
ClassTime
)
{
uni
.
showToast
({
title
:
'请选择开始时间'
,
duration
:
2000
,
icon
:
"none"
,
});
return
}
if
(
!
this
.
addMsg
.
EndTime
)
{
uni
.
showToast
({
title
:
'请选择结束时间'
,
duration
:
2000
,
icon
:
"none"
,
});
return
}
if
(
!
this
.
addMsg
.
TeacherId
)
{
uni
.
showToast
({
title
:
'请选择任课老师'
,
duration
:
2000
,
icon
:
"none"
,
});
return
}
if
(
!
this
.
addMsg
.
TrialLessonId
)
{
uni
.
showToast
({
title
:
'请选择课程'
,
duration
:
2000
,
icon
:
"none"
,
});
return
}
if
(
!
this
.
addMsg
.
ClassRoomId
)
{
uni
.
showToast
({
title
:
'请选择上课教室'
,
duration
:
2000
,
icon
:
"none"
,
});
return
}
this
.
loading
=
false
uni
.
showLoading
()
SetVisitorReserveClass
(
this
.
addMsg
).
then
(
res
=>
{
this
.
loading
=
true
this
.
popupShow
=
true
this
.
isSuccessTitle
=
'提交成功'
this
.
isSuccess
=
true
uni
.
hideLoading
()
// uni.navigateTo({
// url:'/pages/classRollCall/rollCall?ClassId=' + this.addMsg.ClassId
// })
// uni.navigateBack({
// delta:this.editUrl?1:2
// })
}).
catch
(
err
=>
{
uni
.
showToast
({
title
:
'提交失败,请稍后再试'
,
duration
:
2000
,
icon
:
"none"
,
});
this
.
loading
=
true
})
},
//获取教室下拉
getClassRoomList
()
{
queryClassRoomList
({}).
then
(
res
=>
{
let
addList
=
function
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
.
checked
=
false
});
};
addList
(
res
.
Data
);
this
.
ClassRoomList
=
res
.
Data
;
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
let
addList
=
function
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
.
checked
=
false
});
};
addList
(
res
.
Data
);
this
.
TeacherList
=
res
.
Data
;
})
},
// 课程下拉
GetTrialLesson
()
{
uni
.
showLoading
()
GetTrialLessonList
({}).
then
(
res
=>
{
uni
.
hideLoading
()
let
addList
=
function
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
.
checked
=
false
});
};
addList
(
res
.
Data
);
this
.
TrialList
=
res
.
Data
;
})
},
GetVisitorReserve
()
{
uni
.
showLoading
()
GetVisitorReserveById
({
Id
:
this
.
Id
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
Data
.
length
>
0
)
{
let
Data
=
res
.
Data
[
0
]
this
.
addMsg
=
{
Id
:
Data
.
Id
,
//编号
Visitor_Id
:
Data
.
Visitor_Id
,
//访客编号
ReserveClassId
:
Data
.
ReserveClassId
,
//选中的班级编号
ClassDate
:
Data
.
ClassDateStr
,
//预约日期
ClassTime
:
Data
.
ClassTime
?
Data
.
ClassTime
:
'9:00'
,
//预约开始时间
EndTime
:
Data
.
EndTime
?
Data
.
EndTime
:
'12:00'
,
//预约结束时间
TeacherId
:
Data
.
TeacherId
,
//教师编号
TeacherName
:
Data
.
TeacherName
,
ClassRoomId
:
Data
.
ClassRoomId
,
//教室编号
RoomName
:
Data
.
RoomName
,
ClassContent
:
Data
.
ClassContent
,
//主讲内容
TrialLessonId
:
Data
.
TrialLessonId
,
LessonName
:
Data
.
LessonName
,
ReserveType
:
Data
.
ReserveType
,
ClassPlanId
:
Data
.
ClassPlanId
,
VisitorName
:
Data
.
VisitorName
,
Demand
:
Data
.
Demand
,
ReservationDate
:
Data
.
ReservationDate
,
}
this
.
ClassRoomList
.
forEach
(
i
=>
{
console
.
log
(
i
.
RoomId
,
this
.
addMsg
.
ClassRoomId
)
if
(
i
.
RoomId
==
this
.
addMsg
.
ClassRoomId
)
{
i
.
checked
=
true
}
})
this
.
TeacherList
.
forEach
(
i
=>
{
console
.
log
(
i
.
TId
,
this
.
addMsg
.
TeacherId
)
if
(
i
.
TId
==
this
.
addMsg
.
TeacherId
)
{
i
.
checked
=
true
}
})
this
.
TrialList
.
forEach
(
i
=>
{
console
.
log
(
i
.
Id
,
this
.
addMsg
.
TrialLessonId
)
if
(
i
.
Id
==
this
.
addMsg
.
TrialLessonId
)
{
i
.
checked
=
true
}
})
}
})
},
}
}
}
}
...
...
src/pages/h5page/audition.vue
0 → 100644
View file @
f7bad1ac
<
style
lang=
"scss"
scoped
>
.v
{
font-weight
:
bold
;
}
</
style
>
<
template
>
<div
:class=
"[type?'q-pa-md':'']"
>
<p
class=
"text-center small text-weight-bold"
v-if=
"type==1"
>
试听开课
</p>
<div
class=
"row wrap"
>
<div
style=
"width:100%;margin-bottom:15px;"
>
试听时间:
<span
style=
"color:red;"
>
{{
timeFormatSeconds
(
setClassMsg
.
ReservationDate
)
}}
</span></div>
<div
style=
"width:100%;margin-bottom:15px;"
>
试听需求:
<span
style=
"color:red;"
>
{{
setClassMsg
.
Demand
}}
</span></div>
</div>
<div
class=
"row studentDate"
>
<q-field
filled
dense
:class=
"[type?'col-12 q-pb-sm':'col-6 q-pr-lg q-pb-lg']"
>
<template
v-slot:control
>
<el-date-picker
v-model=
"setClassMsg.ClassDate"
ref=
"ClassDate"
:rules=
"[val => !!val || '请选择预约日期']"
style=
"width:100%"
size=
"mini"
type=
"date"
placeholder=
"预约日期"
value-format=
"yyyy-MM-dd"
>
</el-date-picker>
</
template
>
</q-field>
<div
class=
"Student_Date "
:class=
"[type?'col-12 q-pb-sm':'col-6 q-pr-lg q-pb-lg']"
>
<q-field
filled
class=
""
dense
>
<
template
v-slot:control
>
<el-time-select
v-model=
"setClassMsg.ClassTime"
size=
"mini"
ref=
"ClassTime"
style=
"width:50%"
:picker-options=
"
{
start: '09:00',
step: '00:15',
end: '21:00',
maxTime: setClassMsg.EndTime
}" placeholder="预约开始时间">
</el-time-select>
<el-time-select
v-model=
"setClassMsg.EndTime"
size=
"mini"
dense
ref=
"EndTime"
style=
"width:50%"
:picker-options=
"
{
start: '09:00',
step: '00:15',
end: '21:00',
minTime: setClassMsg.ClassTime
}" placeholder="预约结束时间">
</el-time-select>
</
template
>
</q-field>
</div>
</div>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"setClassMsg.TeacherId"
ref=
"TeacherId"
:options=
"TeacherList"
label=
"选择教师"
dense
class=
"col-6"
:class=
"[type?'q-pr-sm q-pb-sm':'q-pr-lg q-pb-lg']"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"RoomId"
dense
option-label=
"RoomName"
v-model=
"setClassMsg.ClassRoomId"
ref=
"ClassRoomId"
:options=
"ClassRoomList"
label=
"关联教室"
class=
"col-6"
:class=
"[type?'q-pl-sm q-pb-sm':'q-pr-lg q-pb-lg']"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
dense
option-label=
"LessonName"
v-model=
"setClassMsg.TrialLessonId"
:options=
"TrialList"
label=
"试听课程"
class=
"col-6"
:class=
"[type?'q-pr-sm':'q-pr-lg q-pb-lg']"
emit-value
map-options
/>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
:class=
"[type?'text-center q-pt-lg row':'text-right q-pb-lg']"
>
<el-button
v-if=
"!type"
@
click=
"closeShitingKaiKe()"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"SetVisitorReserveClass()"
:class=
"[type?'col-12':'']"
>
确 定
</el-button>
</div>
<statusPrompt
v-if=
"isSuccess"
:isSuccess=
"isSuccess"
:isSuccessTitle=
"isSuccessTitle"
></statusPrompt>
</div>
</template>
<
script
>
import
{
SetVisitorReserve
,
queryVisitorReservePage
,
RemoveVisitorReserve
,
SetVisitorReserveFeedback
,
SetVisitorReserveClass
,
GetVisitorReserveById
,
}
from
"../../api/scheduling/schedu"
;
import
{
getTeacherDropDownList
,
queryClassRoomList
,
GetTrialLessonList
}
from
"../../api/school/index"
;
import
statusPrompt
from
"./statusPrompt"
;
export
default
{
props
:
[
'VisitorReserveClassMsg'
,
'type'
],
components
:
{
statusPrompt
},
data
()
{
return
{
AllTeacherList
:
[],
TeacherList
:
[],
ClassRoomList
:
[],
TrialList
:
[],
setClassMsg
:{
Id
:
0
,
Visitor_Id
:
0
,
Remark
:
""
,
ReserveClassId
:
0
,
ClassDate
:
""
,
ReservationDate
:
""
,
ClassTime
:
""
,
TeacherId
:
0
,
ClassRoomId
:
0
,
ClassContent
:
""
,
EndTime
:
""
,
TrialLessonId
:
0
,
ReserveType
:
0
,
ClassPlanId
:
0
,
Demand
:
""
,
},
isSuccess
:
false
,
isSuccessTitle
:
''
,
Id
:
0
,
}
},
watch
:
{
VisitorReserveClassMsg
:
{
handler
(
newValue
)
{
this
.
setClassMsg
=
{
Id
:
newValue
.
Id
,
Visitor_Id
:
newValue
.
Visitor_Id
,
Remark
:
newValue
.
Remark
,
ReserveClassId
:
newValue
.
ReserveClassId
,
ClassDate
:
newValue
.
ClassDate
,
ReservationDate
:
newValue
.
ReservationDate
,
ClassTime
:
newValue
.
ClassTime
,
TeacherId
:
newValue
.
TeacherId
,
ClassRoomId
:
newValue
.
ClassRoomId
,
ClassContent
:
newValue
.
ClassContent
,
EndTime
:
newValue
.
EndTime
,
TrialLessonId
:
newValue
.
TrialLessonId
,
ReserveType
:
newValue
.
ReserveType
,
ClassPlanId
:
newValue
.
ClassPlanId
,
Demand
:
newValue
.
Demand
,
}
},
deep
:
true
,
immediate
:
false
},
type
:
{
handler
(
newValue
)
{
},
immediate
:
true
}
},
computed
:
{},
mounted
()
{
if
(
this
.
$route
.
query
.
Id
){
this
.
Id
=
this
.
$route
.
query
.
Id
this
.
GetVisitorReserve
()
}
this
.
GetTeacherList
()
this
.
GetTrialDrop
()
this
.
getClassRoomList
()
},
methods
:
{
//保存
SetVisitorReserveClass
()
{
if
(
this
.
setClassMsg
.
ClassDate
==
""
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择预约日期!"
});
return
;
}
if
(
!
this
.
setClassMsg
.
ClassTime
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择预约开始时间!"
});
return
;
}
if
(
!
this
.
setClassMsg
.
EndTime
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择预约结束时间!"
});
return
;
}
if
(
!
this
.
setClassMsg
.
TeacherId
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择老师!"
});
return
;
}
if
(
!
this
.
setClassMsg
.
ClassRoomId
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择教室!"
});
return
;
}
if
(
!
this
.
setClassMsg
.
TrialLessonId
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
"请选择课程!"
});
return
;
}
SetVisitorReserveClass
(
this
.
setClassMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
"top"
});
if
(
this
.
type
){
this
.
isSuccess
=
true
this
.
isSuccessTitle
=
'试听课开课成功!'
}
this
.
$emit
(
"success"
);
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
timeout
:
2000
,
message
:
res
.
Message
});
}
this
.
$emit
(
'close'
)
});
},
closeShitingKaiKe
(){
this
.
setClassMsg
=
{
Id
:
0
,
Visitor_Id
:
0
,
Remark
:
""
,
ReserveClassId
:
0
,
ClassDate
:
""
,
ReservationDate
:
""
,
ClassTime
:
""
,
TeacherId
:
0
,
ClassRoomId
:
0
,
ClassContent
:
""
,
EndTime
:
""
,
TrialLessonId
:
0
,
ReserveType
:
0
,
ClassPlanId
:
0
,
Demand
:
""
,
}
this
.
$emit
(
'close'
)
},
timeFormatSeconds
(
time
,
type
)
{
let
timeStr
=
""
;
if
(
time
===
'0001-01-01T00:00:00'
){
return
timeStr
;
}
var
d
=
time
?
new
Date
(
time
)
:
new
Date
();
var
year
=
d
.
getFullYear
();
var
month
=
d
.
getMonth
()
+
1
;
var
day
=
d
.
getDate
();
if
(
month
<
10
)
month
=
'0'
+
month
;
if
(
day
<
10
)
day
=
'0'
+
day
;
if
(
type
==
2
){
var
hours
=
d
.
getHours
();
var
min
=
d
.
getMinutes
();
var
seconds
=
d
.
getSeconds
();
if
(
hours
<
0
)
hours
=
'0'
+
hours
;
if
(
min
<
10
)
min
=
'0'
+
min
;
if
(
seconds
<
10
)
seconds
=
'0'
+
seconds
;
timeStr
+=
' '
+
hours
+
':'
+
min
+
':'
+
seconds
;
}
timeStr
=
year
+
'-'
+
month
+
'-'
+
day
+
timeStr
;
return
timeStr
;
},
//试听课程列表
GetTrialDrop
()
{
GetTrialLessonList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TrialList
=
res
.
Data
;
}
});
},
//获取教室下拉
getClassRoomList
()
{
queryClassRoomList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
ClassRoomList
=
res
.
Data
;
var
obj
=
{
RoomName
:
"请选择"
,
RoomId
:
0
};
this
.
ClassRoomList
.
unshift
(
obj
);
}
});
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
));
this
.
AllTeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
));
var
obj
=
{
TeacherName
:
"请选择"
,
TId
:
0
};
this
.
TeacherList
.
unshift
(
obj
);
this
.
AllTeacherList
.
unshift
(
obj
);
}
});
},
GetVisitorReserve
()
{
GetVisitorReserveById
({
Id
:
this
.
Id
}).
then
(
res
=>
{
if
(
res
.
Data
.
length
>
0
){
let
Data
=
res
.
Data
[
0
]
this
.
setClassMsg
=
{
Id
:
Data
.
Id
,
//编号
Visitor_Id
:
Data
.
Visitor_Id
,
//访客编号
ReserveClassId
:
Data
.
ReserveClassId
,
//选中的班级编号
ClassDate
:
Data
.
ClassDateStr
,
//预约日期
ClassTime
:
Data
.
ClassTime
,
//预约开始时间
EndTime
:
Data
.
EndTime
,
//预约结束时间
TeacherId
:
Data
.
TeacherId
,
//教师编号
TeacherName
:
Data
.
TeacherName
,
ClassRoomId
:
Data
.
ClassRoomId
,
//教室编号
RoomName
:
Data
.
RoomName
,
ClassContent
:
Data
.
ClassContent
,
//主讲内容
TrialLessonId
:
Data
.
TrialLessonId
,
LessonName
:
Data
.
LessonName
,
ReserveType
:
Data
.
ReserveType
,
ClassPlanId
:
Data
.
ClassPlanId
,
VisitorName
:
Data
.
VisitorName
,
Demand
:
Data
.
Demand
,
ReservationDate
:
Data
.
ReservationDate
,
}
}
})
},
}
}
</
script
>
src/pages/h5page/statusPrompt.vue
0 → 100644
View file @
f7bad1ac
<
template
>
<div
class=
"pay-OuterFrame"
>
<div
class=
"popup-box"
>
<div
class=
"popup-title"
>
<div
style=
"margin-top: 230px;"
>
<img
style=
"width:80px;height:80px;"
src=
"../../assets/images/da_gou.png"
/>
</div>
<div
style=
"font-size: 18px;margin-top: 15px;"
>
{{
isSuccessTitle
}}
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:[
"isSuccess"
,
"isSuccessTitle"
],
components
:
{
},
data
()
{
return
{
}
},
computed
:
{
},
mounted
(){
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.popup-box
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background
:
#ffffff
;
z-index
:
3
;
}
.popup-title
{
padding
:
400rpx
0
;
text-align
:
center
;
}
.popup-title
text
{
display
:
block
;
margin-top
:
30rpx
;
font-size
:
35rpx
;
}
</
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