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
c229a0fe
Commit
c229a0fe
authored
Sep 04, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9763c0ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
17 deletions
+62
-17
reserve-form.vue
src/components/schedul/reserve-form.vue
+52
-16
reservestudentlist.vue
src/components/schedul/reservestudentlist.vue
+10
-1
No files found.
src/components/schedul/reserve-form.vue
View file @
c229a0fe
...
...
@@ -7,7 +7,7 @@
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
ReserveClass
Id
==
0
?
'新增试听课程'
:
'修改试听课程'
}}
</div>
<div
class=
"text-h6"
>
{{
objOption
.
Id
==
0
?
'新增试听课程'
:
'修改试听课程'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
...
...
@@ -79,7 +79,9 @@
}
from
"../../api/school/index"
;
import
{
GetReserveClass
,
SetReserveClass
SetReserveClass
,
GetVisitorReserveById
,
SetVisitorReserveClass
}
from
'../../api/scheduling/schedu'
export
default
{
props
:
{
...
...
@@ -99,7 +101,9 @@
EndTime
:
""
,
ClassRoomId
:
""
,
ClassContent
:
''
,
TrialLessonId
:
''
TrialLessonId
:
''
,
Visitor_Id
:
0
,
Id
:
0
,
},
saveLoading
:
false
,
TeacherList
:
[],
...
...
@@ -153,20 +157,26 @@
//初始化表单
initObj
()
{
this
.
objOption
.
ClassDate
=
this
.
saveObj
.
ReservationDate
if
(
this
.
saveObj
&&
this
.
saveObj
.
ReserveClass
Id
>
0
)
{
Get
ReserveClass
({
ReserveClassId
:
this
.
saveObj
.
ReserveClass
Id
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
Get
VisitorReserveById
({
Id
:
this
.
saveObj
.
Id
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
objOption
.
ReserveClassId
=
res
.
Data
.
ReserveClassId
;
this
.
objOption
.
TeacherId
=
res
.
Data
.
TeacherId
;
this
.
objOption
.
ClassDate
=
res
.
Data
.
ClassDateStr
;
this
.
objOption
.
ClassTime
=
res
.
Data
.
ClassTime
;
this
.
objOption
.
EndTime
=
res
.
Data
.
EndTime
;
this
.
objOption
.
ClassRoomId
=
res
.
Data
.
ClassRoomId
;
this
.
objOption
.
TrialLessonId
=
res
.
Data
.
TrialLessonId
;
this
.
objOption
.
ClassContent
=
res
.
Data
.
ClassContent
;
if
(
res
.
Data
&&
res
.
Data
.
length
>
0
){
this
.
objOption
.
ReserveClassId
=
res
.
Data
[
0
].
ReserveClassId
;
this
.
objOption
.
TeacherId
=
res
.
Data
[
0
].
TeacherId
;
this
.
objOption
.
ClassDate
=
res
.
Data
[
0
].
ClassDateStr
;
this
.
objOption
.
ClassTime
=
res
.
Data
[
0
].
ClassTime
;
this
.
objOption
.
EndTime
=
res
.
Data
[
0
].
EndTime
;
this
.
objOption
.
ClassRoomId
=
res
.
Data
[
0
].
ClassRoomId
;
this
.
objOption
.
TrialLessonId
=
res
.
Data
[
0
].
TrialLessonId
;
this
.
objOption
.
Visitor_Id
=
res
.
Data
[
0
].
Visitor_Id
;
if
(
this
.
objOption
.
TrialLessonId
==
0
){
this
.
objOption
.
ClassDate
=
this
.
timeFormatSeconds
(
res
.
Data
[
0
].
ReservationDate
);
}
this
.
objOption
.
ClassContent
=
res
.
Data
[
0
].
ClassContent
;
this
.
objOption
.
Id
=
res
.
Data
[
0
].
Id
;
}
}
else
{
let
nowDay
=
new
Date
();
var
year
=
nowDay
.
getFullYear
();
//年
...
...
@@ -183,6 +193,32 @@
})
}
},
//获得年月日时分秒
//传入日期//例:2020-10-27T14:36:23
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
;
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
...
...
@@ -239,7 +275,7 @@
return
}
this
.
saveLoading
=
true
;
SetReserveClass
(
this
.
objOption
).
then
(
res
=>
{
Set
Visitor
ReserveClass
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
...
...
src/components/schedul/reservestudentlist.vue
View file @
c229a0fe
...
...
@@ -17,6 +17,13 @@
</
template
>
</q-td>
</template>
<
template
v-slot:body-cell-Demand=
"props"
>
<q-td>
<template>
<div
v-html=
"props.row.Demand"
></div>
</
template
>
</q-td>
</template>
<
template
v-slot:body-cell-ClassDateStr=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"min-width: 150px;word-break: break-word;white-space: normal;"
>
...
...
@@ -80,7 +87,8 @@
<
script
>
import
{
RemoveReserveClass
RemoveReserveClass
,
RemoveVisitorReserve
}
from
'../../api/scheduling/schedu'
import
reserveForm
from
'../schedul/reserve-form'
export
default
{
...
...
@@ -208,6 +216,7 @@ return timeStr;
},
//编辑试听
editVisitor
(
obj
)
{
console
.
log
(
"reserveObj"
,
obj
);
this
.
reserveObj
=
obj
this
.
isShowReserve
=
true
;
},
...
...
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