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
489e2659
Commit
489e2659
authored
Dec 28, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
bfdf1e08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
233 additions
and
180 deletions
+233
-180
reservelist.vue
src/components/schedul/reservelist.vue
+226
-0
reserveClass.vue
src/pages/sale/reserveClass.vue
+7
-180
No files found.
src/components/schedul/reservelist.vue
0 → 100644
View file @
489e2659
<
template
>
<div
class=
"page-content"
>
<q-table
:pagination=
"pageMsg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table sticky-right-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
试听班级管理
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"添加试听"
@
click=
"editVisitor(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-TeacherName=
"props"
>
<q-td>
<template
v-if=
"props.row.TeacherId==0"
>
<span
style=
"color:red"
>
未指定
</span>
</
template
>
<
template
>
{{
props
.
row
.
TeacherName
}}
</
template
>
</q-td>
</template>
<
template
v-slot:body-cell-ClassContent=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"min-width: 150px;word-break: break-word;white-space: normal;"
>
{{
props
.
row
.
ClassContent
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-ClassTime=
"props"
>
<q-td
:props=
"props"
>
{{
props
.
row
.
ClassTime
}}
-
{{
props
.
row
.
EndTime
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-CreateByName=
"props"
>
<q-td
:props=
"props"
>
{{
props
.
row
.
CreateByName
}}
<br
/>
{{
props
.
row
.
CreateTimeStr
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-JoinNum=
"props"
>
<q-td
auto-width
:props=
"props"
style=
"width:25%"
>
<span
style=
"color:red;cursor:pointer"
:class=
"
{'underLine':(props.row.VisitorList
&&
props.row.VisitorList.length>0)}">
{{
props
.
row
.
JoinNum
}}
<q-tooltip
:offset=
"[10, 10]"
>
点击查看名单
</q-tooltip>
<q-popup-proxy
v-if=
"props.row.VisitorList&&props.row.VisitorList.length>0"
>
<div
style=
"min-width:360px;max-width:360px;"
>
<q-banner>
<q-chip
dense
v-for=
"(subItem,subindex) in props.row.VisitorList"
:key=
"subindex"
>
{{
subItem
.
VisitorName
}}
</q-chip>
</q-banner>
</div>
</q-popup-proxy>
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-TeacherId=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
color=
"accent"
@
click=
"goUrl(props.row)"
style=
"font-weight:400"
label=
"学员名单"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
@
click=
"editVisitor(props.row)"
style=
"font-weight:400"
label=
"修改"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
@
click=
"deleteReserve(props.row)"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
</
template
>
</q-table>
<reserveForm
v-if=
"isShowReserve"
:save-obj=
"reserveObj"
@
close=
"closeReserveForm"
@
success=
"refreshPage"
>
</reserveForm>
</div>
</template>
<
script
>
import
{
RemoveReserveClass
}
from
'../../api/scheduling/schedu'
import
reserveForm
from
'../schedul/reserve-form'
export
default
{
meta
:
{
title
:
"班级列表"
},
props
:
{
data
:
{
type
:
Array
,
default
:
null
},
loading
:
{
type
:
Boolean
,
default
:
null
}
},
components
:
{
reserveForm
},
data
()
{
return
{
columns
:
[{
name
:
'TeacherName'
,
label
:
'老师'
,
field
:
'TeacherName'
,
align
:
'left'
},
{
name
:
'ClassDateStr'
,
label
:
'日期'
,
align
:
'left'
,
field
:
'ClassDateStr'
,
},
{
name
:
'ClassTime'
,
label
:
'试听时间'
,
align
:
'left'
,
field
:
'ClassTime'
,
},
{
name
:
'RoomName'
,
label
:
'教室'
,
align
:
'left'
,
field
:
'RoomName'
,
},
{
name
:
'LessonName'
,
label
:
'试听课程'
,
align
:
'left'
,
field
:
'LessonName'
,
},
{
name
:
'JoinNum'
,
label
:
'试听人数'
,
align
:
'left'
,
field
:
'JoinNum'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'CreateByName'
,
},
{
name
:
'TeacherId'
,
label
:
'操作'
,
field
:
'TeacherId'
}
],
reserveObj
:
{},
isShowReserve
:
false
,
pageMsg
:
{
rowsPerPage
:
10
},
}
},
created
()
{
},
mounted
()
{
},
methods
:
{
//编辑试听
editVisitor
(
obj
)
{
if
(
obj
)
{
this
.
reserveObj
=
obj
}
else
{
this
.
reserveObj
=
null
}
this
.
isShowReserve
=
true
;
},
//关闭弹窗
closeReserveForm
()
{
this
.
isShowReserve
=
false
},
refreshPage
(){
this
.
$emit
(
'success'
);
},
goUrl
(
i
)
{
let
path
=
"/sale/reserveStudentList"
let
queryObj
=
{
classId
:
i
.
ReserveClassId
,
name
:
i
.
TeacherName
,
date
:
i
.
ClassDateStr
}
this
.
OpenNewUrl
(
path
,
queryObj
)
},
//删除试听课
deleteReserve
(
item
)
{
let
delMsg
=
{
ReserveClassId
:
item
.
ReserveClassId
,
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除该试听课?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
RemoveReserveClass
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getList
();
}
})
}).
onCancel
(()
=>
{
});
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/sale/reserveClass.vue
View file @
489e2659
...
...
@@ -33,100 +33,29 @@
</div>
</div>
</div>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table sticky-right-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
试听班级管理
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"添加试听"
@
click=
"editVisitor(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-TeacherName=
"props"
>
<q-td>
<template
v-if=
"props.row.TeacherId==0"
>
<span
style=
"color:red"
>
未指定
</span>
</
template
>
<
template
>
{{
props
.
row
.
TeacherName
}}
</
template
>
</q-td>
</template>
<
template
v-slot:body-cell-ClassContent=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"min-width: 150px;word-break: break-word;white-space: normal;"
>
{{
props
.
row
.
ClassContent
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-ClassTime=
"props"
>
<q-td
:props=
"props"
>
{{
props
.
row
.
ClassTime
}}
-
{{
props
.
row
.
EndTime
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-CreateByName=
"props"
>
<q-td
:props=
"props"
>
{{
props
.
row
.
CreateByName
}}
<br
/>
{{
props
.
row
.
CreateTimeStr
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-JoinNum=
"props"
>
<q-td
auto-width
:props=
"props"
style=
"width:25%"
>
<span
style=
"color:red;cursor:pointer"
:class=
"
{'underLine':(props.row.VisitorList
&&
props.row.VisitorList.length>0)}">
{{
props
.
row
.
JoinNum
}}
<q-tooltip
:offset=
"[10, 10]"
>
点击查看名单
</q-tooltip>
<q-popup-proxy
v-if=
"props.row.VisitorList&&props.row.VisitorList.length>0"
>
<div
style=
"min-width:360px;max-width:360px;"
>
<q-banner>
<q-chip
dense
v-for=
"(subItem,subindex) in props.row.VisitorList"
:key=
"subindex"
>
{{
subItem
.
VisitorName
}}
</q-chip>
</q-banner>
</div>
</q-popup-proxy>
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-TeacherId=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
color=
"accent"
@
click=
"goUrl(props.row)"
style=
"font-weight:400"
label=
"学员名单"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
@
click=
"editVisitor(props.row)"
style=
"font-weight:400"
label=
"修改"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
@
click=
"deleteReserve(props.row)"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"PageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
<reserveForm
v-if=
"isShowReserve"
:save-obj=
"reserveObj"
@
close=
"closeReserveForm"
@
success=
"refreshPage"
>
</reserveForm>
<reservelist
:data=
"dataList"
:loading=
"loading"
@
success=
"refreshPage"
></reservelist>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"PageCount"
:input=
"true"
@
input=
"changePage"
/>
</div>
</template>
<
script
>
import
{
GetReserveClassPage
,
RemoveReserveClass
GetReserveClassPage
}
from
'../../api/scheduling/schedu'
import
{
getTeacherDropDownList
,
queryClassRoomList
}
from
"../../api/school/index"
;
import
reserve
Form
from
'../../components/schedul/reserve-form
'
import
reserve
list
from
'../../components/schedul/reservelist
'
export
default
{
meta
:
{
title
:
"试听课管理"
},
components
:
{
reserve
Form
reserve
list
},
data
()
{
return
{
...
...
@@ -142,59 +71,9 @@
dataList
:
[],
loading
:
false
,
PageCount
:
0
,
columns
:
[{
name
:
'TeacherName'
,
label
:
'老师'
,
field
:
'TeacherName'
,
align
:
'left'
},
{
name
:
'ClassDateStr'
,
label
:
'日期'
,
align
:
'left'
,
field
:
'ClassDateStr'
,
},
{
name
:
'ClassTime'
,
label
:
'试听时间'
,
align
:
'left'
,
field
:
'ClassTime'
,
},
{
name
:
'RoomName'
,
label
:
'教室'
,
align
:
'left'
,
field
:
'RoomName'
,
},
{
name
:
'LessonName'
,
label
:
'试听课程'
,
align
:
'left'
,
field
:
'LessonName'
,
},
{
name
:
'JoinNum'
,
label
:
'试听人数'
,
align
:
'left'
,
field
:
'JoinNum'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'CreateByName'
,
},
{
name
:
'TeacherId'
,
label
:
'操作'
,
field
:
'TeacherId'
}
],
TeacherList
:
[],
ClassRoomList
:
[],
isShowReserve
:
false
,
reserveObj
:
{},
}
},
mounted
()
{
...
...
@@ -245,62 +124,10 @@
}
})
},
//编辑试听
editVisitor
(
obj
)
{
if
(
obj
)
{
this
.
reserveObj
=
obj
}
else
{
this
.
reserveObj
=
null
}
this
.
isShowReserve
=
true
;
},
//删除试听课
deleteReserve
(
item
)
{
let
delMsg
=
{
ReserveClassId
:
item
.
ReserveClassId
,
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除该试听课?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
RemoveReserveClass
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getList
();
}
})
}).
onCancel
(()
=>
{
});
},
//关闭弹窗
closeReserveForm
()
{
this
.
isShowReserve
=
false
},
//刷新页面
refreshPage
()
{
this
.
getList
();
},
goUrl
(
i
)
{
let
path
=
"/sale/reserveStudentList"
let
queryObj
=
{
classId
:
i
.
ReserveClassId
,
name
:
i
.
TeacherName
,
date
:
i
.
ClassDateStr
}
this
.
OpenNewUrl
(
path
,
queryObj
)
}
}
}
</
script
>
...
...
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