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
5f4edd54
Commit
5f4edd54
authored
Dec 03, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增页面
parent
9e41c0c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
79 deletions
+94
-79
class.js
src/api/course/class.js
+27
-0
classManage.vue
src/pages/course/classManage.vue
+64
-76
classroom.vue
src/pages/school/classroom.vue
+3
-3
No files found.
src/api/course/class.js
0 → 100644
View file @
5f4edd54
import
request
from
'../../utils/request'
/**
* 获取课程分页列表
* @param {JSON参数} data
*/
export
function
queryClassPage
(
data
)
{
return
request
({
url
:
'/Class/GetClassPageList'
,
method
:
'post'
,
data
})
}
/**
* 获取课程状态列表
* @param {JSON参数} data
*/
export
function
queryClassStatusList
()
{
return
request
({
url
:
'/Class/GetClassStatusList'
,
method
:
'post'
,
data
:
""
})
}
\ No newline at end of file
src/pages/course/classManage.vue
View file @
5f4edd54
...
...
@@ -3,26 +3,22 @@
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
change=
"getList"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.className"
label=
"班级名称"
/>
<q-input
@
change=
"getList"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.ClassName"
label=
"班级名称"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"getList"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.classStatus"
:options=
"classStatusList"
emit-value
map-options
label=
"课程状态"
/>
<q-select
@
input=
"getList"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.classStatus"
:options=
"classStatusList"
emit-value
map-options
label=
"课程状态"
/>
</div>
<div
class=
"col-3"
>
<q-input
@
change=
"getList"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.
teacher
"
<q-input
@
change=
"getList"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.
TeacherName
"
label=
"带班老师"
/>
</div>
<div
class=
"col-3"
>
<q-input
@
change=
"getList"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.LearningCourses"
label=
"学习课程"
/>
<q-input
@
change=
"getList"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.CourseName"
label=
"学习课程"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"getList"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.guanlianxiaoqu"
:options=
"schoolList"
emit-value
map-options
label=
"关联校区"
/>
<q-select
@
input=
"getList"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.guanlianxiaoqu"
:options=
"schoolList"
emit-value
map-options
label=
"关联校区"
/>
</div>
</div>
<div
class=
"page-option"
>
...
...
@@ -32,47 +28,29 @@
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
title=
"班级信息"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<!--
<template
v-slot:body-cell-CoverImg=
"props"
>
<q-td
:props=
"props"
>
<q-avatar
square
size=
"100px"
>
<img
:src=
"props.value"
/>
</q-avatar>
</q-td>
</
template
>
<
template
v-slot:body-cell-CourseIntro=
"props"
>
<q-td
:props=
"props"
>
<span
v-html=
"props.value"
></span>
</q-td>
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-badge
:color=
"props.value==1?'negative':'primary'"
:label=
"props.value==0?'正常':'禁用'"
/>
<template
v-slot:body-cell-ClassPersion=
"props"
>
<q-td
auto-width
:props=
"props"
>
预招
{{
props
.
row
.
ClassPersion
}}
当前
{{
props
.
row
.
OrderStudentCount
}}
</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
>
-->
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"订单中心"
></q-btn>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"收支明细"
></q-btn>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCourse()"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCourse()"
/>
</q-td>
</
template
>
</q-table>
<class-form
v-if=
"isShowClassForm"
:save-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
<class-form
v-if=
"isShowClassForm"
:save-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</class-form>
</div>
</div>
</template>
<
script
>
//
import {
// queryCourse
Page,
// queryCourseCategoryTree
,
// } from '../../api/course/index
'
import
{
queryClass
Page
,
queryClassStatusList
,
}
from
'../../api/course/class
'
import
classForm
from
'../../components/course/class-form'
export
default
{
meta
:
{
...
...
@@ -84,52 +62,52 @@
data
()
{
return
{
columns
:
[{
name
:
'C
ourseId
'
,
name
:
'C
lassName
'
,
label
:
'班级名称'
,
field
:
'C
ourseId
'
,
field
:
'C
lassName
'
,
align
:
'left'
},
{
name
:
'CourseName'
,
required
:
true
,
name
:
'SchoolName'
,
label
:
'校区'
,
field
:
'SchoolName'
,
align
:
'left'
,
},
{
name
:
'C
at
eName'
,
name
:
'C
ours
eName'
,
label
:
'课程'
,
field
:
'C
at
eName'
,
field
:
'C
ours
eName'
,
align
:
'left'
},
{
name
:
'
CoverImg
'
,
name
:
'
TeacherName
'
,
label
:
'带班老师'
,
field
:
'
CoverImg
'
,
field
:
'
TeacherName
'
,
align
:
'left'
},
{
name
:
'C
ourseIntro
'
,
name
:
'C
lassPersion
'
,
label
:
'招生/报名'
,
field
:
'C
ourseIntro
'
,
field
:
'C
lassPersion
'
,
align
:
'left'
},
{
name
:
'
CreateByNa
me'
,
name
:
'
OpenTi
me'
,
label
:
'开班时间'
,
field
:
'
CreateByNa
me'
,
field
:
'
OpenTi
me'
,
align
:
'left'
},
{
name
:
'C
reateTimeStr
'
,
name
:
'C
ompleteProgress
'
,
label
:
'课程进度'
,
field
:
'C
reateTimeStr
'
,
field
:
'C
ompleteProgress
'
,
align
:
'left'
},
{
name
:
'
Status
'
,
name
:
'
ClassStatusStr
'
,
label
:
'状态'
,
align
:
'left'
,
field
:
'
Status
'
field
:
'
ClassStatusStr
'
},
{
name
:
'optioned'
,
...
...
@@ -139,34 +117,44 @@
],
data
:
[],
loading
:
false
,
isShowClassForm
:
false
,
isShowClassForm
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
className
:
''
,
//班级名称
classStatus
:
''
,
//班级状态
teacher
:
''
,
//带班老师
LearningCourses
:
''
,
//学习课程
guanlianxiaoqu
:
0
,
//关联校区
ClassName
:
''
,
//班级名称
classStatus
:
''
,
//班级状态
TeacherName
:
''
,
//带班老师
CourseName
:
''
,
//学习课程
guanlianxiaoqu
:
0
,
//关联校区
},
//班级状态
classStatusList
:[{
Id
:
1
,
Name
:
'状态1'
classStatusList
:
[{
Id
:
1
,
Name
:
'状态1'
}],
//关联校区
schoolList
:[{
Id
:
1
,
Name
:
'清华大学'
schoolList
:
[{
Id
:
1
,
Name
:
'清华大学'
}],
pageCount
:
0
,
classObjOption
:
null
,
classObjOption
:
null
,
}
},
created
()
{
this
.
getClassStatus
();
},
mounted
()
{
this
.
getList
();
},
methods
:
{
getClassStatus
()
{
queryClassStatusList
({}).
then
(
res
=>
{
this
.
classStatusList
=
res
.
Data
;
}).
catch
(()
=>
{
})
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
...
...
@@ -174,14 +162,14 @@
},
//获取菜单分页列表
getList
()
{
//
this.loading = true;
// queryCourse
Page(this.msg).then(res => {
//
this.loading = false
//
this.data = res.Data.PageData
//
this.pageCount = res.Data.PageCount
//
}).catch(() => {
//
this.loading = false
//
})
this
.
loading
=
true
;
queryClass
Page
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
//刷新页面
refreshPage
()
{
...
...
@@ -195,7 +183,7 @@
// } else {
// this.classObjOption = null
// }
this
.
isShowClassForm
=
true
this
.
isShowClassForm
=
true
},
//关闭弹窗
closeClassSaveForm
()
{
...
...
src/pages/school/classroom.vue
View file @
5f4edd54
...
...
@@ -20,12 +20,12 @@
</div>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增
班级
"
@
click=
"EditClass(null)"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增
教室
"
@
click=
"EditClass(null)"
/>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-right-column-table sticky-tow-column-table"
separator=
"none"
title=
"
班级
信息"
:data=
"data"
class=
"sticky-right-column-table sticky-tow-column-table"
separator=
"none"
title=
"
教室
信息"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-TeacherHead=
"props"
>
<q-td
auto-width
:props=
"props"
>
...
...
@@ -83,7 +83,7 @@
import
classForm
from
'../../components/school/classmanage/class-form'
export
default
{
meta
:
{
title
:
"
班级
管理"
title
:
"
教室
管理"
},
components
:
{
classForm
...
...
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