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
ef0faced
Commit
ef0faced
authored
Jul 27, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d3524daf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
473 additions
and
373 deletions
+473
-373
classlist.vue
src/components/course/classlist.vue
+464
-0
stuClassManage.vue
src/pages/stuMan/stuClassManage.vue
+9
-373
No files found.
src/components/course/classlist.vue
0 → 100644
View file @
ef0faced
<
style
>
.OtherCourseNum
{
display
:
inline-block
;
width
:
25px
;
height
:
25px
;
text-align
:
center
;
line-height
:
25px
;
border
:
1px
solid
#2961FE
;
border-radius
:
50%
;
cursor
:
pointer
;
color
:
#2961FE
;
}
.OCourseTable
{
width
:
400px
;
text-align
:
center
;
}
.OCourseTable
tr
td
{
height
:
40px
;
}
.OCourseTable
tr
th
{
height
:
40px
;
background-color
:
rgb
(
238
,
238
,
239
);
}
.redStuStyle
{
color
:
red
;
}
.blaStuStyle
{
color
:
#000
;
}
.classProgress
{
color
:
var
(
--q-color-primary
);
}
</
style
>
<
template
>
<div
class=
"page-content"
>
<q-table
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=
"EditCourse(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-CourseId=
"props"
>
<q-td
auto-width
:props=
"props"
>
<span
style=
"color:blue;cursor:pointer;"
@
click=
"goChapter(props.row.CouseId)"
>
详情
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-ClassName=
"props"
>
<q-td
auto-width
:props=
"props"
>
<div
style=
"display: flex;align-items: center;"
>
<q-avatar
size=
"md"
style=
"background:#d4dfff;color:#2961FE;font-weight:bold;"
v-if=
"props.row.ClassName"
>
{{
GetFirst
(
props
.
row
.
ClassName
)
}}
</q-avatar>
<div>
<span
style=
"color:#2961FE;margin-left:10px;cursor:pointer;"
@
click=
"getClassInfo(props.row)"
title=
"点击查看详情"
>
{{
props
.
row
.
ClassName
}}
</span>
<div
style=
"margin-left: 10px;"
>
{{
props
.
row
.
ClassNo
}}
</div>
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-OtherCourseName=
"props"
>
<q-td
auto-width
:props=
"props"
>
<template
v-if=
"props.row.OtherCourseList"
>
<template
v-if=
"props.row.OtherCourseList.length==1"
>
{{
props
.
row
.
OtherCourseList
[
0
].
CourseName
}}
【
{{
props
.
row
.
OtherCourseList
[
0
].
ClassHours
}}
课时】
</
template
>
<
template
v-if=
"props.row.OtherCourseList.length>1"
>
{{
props
.
row
.
OtherCourseList
[
0
].
CourseName
}}
:
<span
class=
"OtherCourseNum"
>
{{
props
.
row
.
OtherCourseList
.
length
}}
<q-popup-proxy>
<q-banner>
<table
class=
"OCourseTable"
style=
"border-collapse:collapse;"
>
<tr>
<th>
课程名称
</th>
<th>
课时数
</th>
</tr>
<tr
v-for=
"(sItem,sIndex) in props.row.OtherCourseList"
style=
"border-bottom:1px dashed #d1d1d1;"
>
<td>
{{
sItem
.
CourseName
}}
</td>
<td>
{{
sItem
.
ClassHours
}}
</td>
</tr>
</table>
</q-banner>
</q-popup-proxy>
</span>
</
template
>
<
template
v-if=
"props.row.OtherCourseList.length==0"
>
无
</
template
>
</template>
</q-td>
</template>
<
template
v-slot:body-cell-TeacherName=
"props"
>
<q-td
auto-width
:props=
"props"
>
<template
v-if=
"props.row.Teacher_Id==0"
>
<span
style=
"color:red"
>
未指定
</span>
</
template
>
<
template
v-else
>
<span
style=
"color:#3FC4FF;"
>
{{
props
.
row
.
TeacherName
}}
</span>
</
template
>
</q-td>
</template>
<
template
v-slot:body-cell-ClassPersion=
"props"
>
<q-td
auto-width
:props=
"props"
>
<span
:class=
"
{'redStuStyle':props.row.ClassPersion>props.row.OrderStudentCount,'blaStuStyle':props.row.ClassPersion==props.row.OrderStudentCount}">
{{
props
.
row
.
ClassPersion
}}
-
{{
props
.
row
.
OrderStudentCount
}}
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-CompleteProgress=
"props"
>
<q-td
auto-width
:props=
"props"
>
<span
:class=
"
{'classProgress':props.row.UsePlanNum
<props
.
row
.
TotalPlanNum
,'
blaStuStyle
'
:props
.
row
.
UsePlanNum=
=props.row.TotalPlanNum}"
>
{{
props
.
row
.
UsePlanNum
}}
/
{{
props
.
row
.
TotalPlanNum
}}
</span>
</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
v-if=
"props.row.ClassStatus==1"
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCourse(props.row)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"gotoOrder(props.row)"
>
<q-item-section>
<q-item-label>
订单中心
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"goPayment(props.row)"
>
<q-item-section>
<q-item-label>
收支明细
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeClass(props.row,1)"
v-if=
"props.row.Status==0"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeClass(props.row,0)"
v-if=
"props.row.Status==1"
>
<q-item-section>
<q-item-label>
恢复
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"showOtherCourse(props.row)"
>
<q-item-section>
<q-item-label>
关联其他课程
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"gomonthLessonCost(props.row)"
>
<q-item-section>
<q-item-label>
月度课耗
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
v-if=
"props.row.ClassStatus!=3"
@
click
.
stop=
"getClassItem(props.row)"
>
<q-item-section>
<q-item-label>
状态变更
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click
.
stop=
"goStudent(props.row)"
>
<q-item-section>
<q-item-label>
未完成学员名单
</q-item-label>
</q-item-section>
</q-item>
<q-item
v-if=
"props.row.ClassStatus!=3"
clickable
v-close-popup
@
click=
"classApply(props.row)"
>
<q-item-section>
<q-item-label>
调课申请
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</
template
>
</q-table>
<class-form
v-if=
"isShowClassForm"
:save-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</class-form>
<classinfo-form
v-if=
"isShowClassInfo"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</classinfo-form>
<othercourseForm
v-if=
"IsShowOtherCourse"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</othercourseForm>
<changestatusForm
v-if=
"isShowStatusChange"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
></changestatusForm>
<change-class-form
v-if=
"isShowTiaoke"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
></change-class-form>
</div>
</template>
<
script
>
//获取校区列表
import
{
deleteClass
,
}
from
'../../api/school/index'
;
import
classForm
from
'../../components/course/class-form'
;
import
classinfoForm
from
'../../components/course/classinfo-form'
;
import
othercourseForm
from
'../../components/course/othercourse-form'
;
import
changestatusForm
from
'../../components/course/changestatus-form'
import
changeClassForm
from
'../../components/teacher/changeClassForm.vue'
export
default
{
meta
:
{
title
:
"班级列表"
},
props
:
{
data
:
{
type
:
Array
,
default
:
null
},
},
components
:
{
classForm
,
classinfoForm
,
othercourseForm
,
changestatusForm
,
changeClassForm
},
data
()
{
return
{
columns
:
[{
name
:
'ClassName'
,
label
:
'班级名称'
,
field
:
'ClassName'
,
align
:
'left'
},
{
name
:
'SchoolName'
,
label
:
'校区'
,
field
:
'SchoolName'
,
align
:
'left'
,
},
{
name
:
'CourseName'
,
label
:
'课程'
,
field
:
'CourseName'
,
align
:
'left'
},
{
name
:
'OtherCourseName'
,
label
:
'关联其他课程'
,
field
:
'OtherCourseName'
,
align
:
'left'
},
{
name
:
'CourseId'
,
label
:
'课程大纲'
,
field
:
'CourseId'
,
align
:
'left'
},
{
name
:
'TeacherName'
,
label
:
'带班老师'
,
field
:
'TeacherName'
,
align
:
'left'
},
{
name
:
'ClassPersion'
,
label
:
'招生/报名'
,
field
:
'ClassPersion'
,
align
:
'left'
},
{
name
:
'OpenTime'
,
label
:
'开班时间'
,
field
:
'OpenTime'
,
align
:
'left'
},
{
name
:
'FinishTimeStr'
,
label
:
'预计结束时间'
,
field
:
'FinishTimeStr'
,
align
:
'left'
},
{
name
:
'CompleteProgress'
,
label
:
'课程进度'
,
field
:
'CompleteProgress'
,
align
:
'left'
},
{
name
:
'ClassStatusStr'
,
label
:
'状态'
,
align
:
'left'
,
field
:
'ClassStatusStr'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'CourseId'
}
],
//班级状态
classStatusList
:
[],
//关联校区列表
schoolList
:
[],
pageCount
:
0
,
classObjOption
:
null
,
isShowClassForm
:
false
,
//是否显示新增修改弹窗
isShowClassInfo
:
false
,
//是否显示课程信息
IsShowOtherCourse
:
false
,
//是否显示其他课程
TeacherList
:
[],
isShowStatusChange
:
false
,
//是否显示修改状态弹窗
isShowTiaoke
:
false
,
//是否显示调课申请
}
},
created
()
{
console
.
log
(
"this.data"
,
this
.
data
);
},
mounted
()
{
},
methods
:
{
//删除班级
removeClass
(
item
,
status
)
{
let
delMsg
=
{
ClassId
:
item
.
ClassId
,
Status
:
status
};
var
message
=
"是否要删除该班级?"
;
if
(
status
==
0
)
{
message
=
"是否要恢复该班级?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteClass
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
refreshPage
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}).
onCancel
(()
=>
{
});
},
//当前点击的班级
getClassItem
(
obj
)
{
if
(
obj
)
{
this
.
classObjOption
=
obj
}
else
{
this
.
classObjOption
=
null
}
this
.
isShowStatusChange
=
true
;
},
gotoOrder
(
item
)
{
this
.
OpenNewUrl
(
'/course/classorder'
,
{
ClassId
:
item
.
ClassId
,
});
},
//跳转到收支明细
goPayment
(
item
)
{
this
.
OpenNewUrl
(
'/course/paymentDetail'
,
{
ClassId
:
item
.
ClassId
,
School_Id
:
item
.
School_Id
,
ClassName
:
encodeURI
(
item
.
ClassName
),
});
},
//跳转到未完成学生名单
goStudent
(
item
)
{
this
.
OpenNewUrl
(
'/stuMan/unfinishedStudent'
,
{
ClassId
:
item
.
ClassId
,
});
},
//刷新页面
refreshPage
()
{
//调用父页面成功方法
this
.
$emit
(
'success'
);
},
//新增修改菜单
EditCourse
(
obj
)
{
if
(
obj
)
{
this
.
classObjOption
=
obj
}
else
{
this
.
classObjOption
=
null
}
this
.
isShowClassForm
=
true
},
//关闭弹窗
closeClassSaveForm
()
{
//关闭新增修改弹窗
this
.
isShowClassForm
=
false
;
//关闭班级信息弹窗
this
.
isShowClassInfo
=
false
;
//关闭关联其他课程弹窗
this
.
IsShowOtherCourse
=
false
;
this
.
isShowStatusChange
=
false
;
this
.
isShowTiaoke
=
false
;
},
GetFirst
(
val
)
{
if
(
val
)
{
return
val
.
substr
(
0
,
1
);
}
},
//显示关联课程
showOtherCourse
(
item
)
{
this
.
IsShowOtherCourse
=
true
;
this
.
classObjOption
=
item
;
},
//点击班级名称
getClassInfo
(
obj
)
{
this
.
classObjOption
=
null
;
this
.
isShowClassInfo
=
false
;
this
.
classObjOption
=
obj
;
this
.
isShowClassInfo
=
true
;
},
gomonthLessonCost
(
row
)
{
let
ClassName
=
encodeURI
(
row
.
ClassName
)
this
.
OpenNewUrl
(
'/course/monthLessonCost'
,
{
ClassId
:
row
.
ClassId
,
ClassName
:
ClassName
,
});
},
//跳转到课程大纲
goChapter
(
CouseId
)
{
this
.
OpenNewUrl
(
'/course/chapter'
,
{
CourseId
:
CouseId
});
},
//调课申请
classApply
(
item
)
{
this
.
classObjOption
=
item
;
this
.
isShowTiaoke
=
true
;
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/stuMan/stuClassManage.vue
View file @
ef0faced
...
...
@@ -69,162 +69,9 @@
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
: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=
"EditCourse(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-CourseId=
"props"
>
<q-td
auto-width
:props=
"props"
>
<span
style=
"color:blue;cursor:pointer;"
@
click=
"goChapter(props.row.CouseId)"
>
详情
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-ClassName=
"props"
>
<q-td
auto-width
:props=
"props"
>
<div
style=
"display: flex;align-items: center;"
>
<q-avatar
size=
"md"
style=
"background:#d4dfff;color:#2961FE;font-weight:bold;"
v-if=
"props.row.ClassName"
>
{{
GetFirst
(
props
.
row
.
ClassName
)
}}
</q-avatar>
<div>
<span
style=
"color:#2961FE;margin-left:10px;cursor:pointer;"
@
click=
"getClassInfo(props.row)"
title=
"点击查看详情"
>
{{
props
.
row
.
ClassName
}}
</span>
<div
style=
"margin-left: 10px;"
>
{{
props
.
row
.
ClassNo
}}
</div>
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-OtherCourseName=
"props"
>
<q-td
auto-width
:props=
"props"
>
<template
v-if=
"props.row.OtherCourseList"
>
<template
v-if=
"props.row.OtherCourseList.length==1"
>
{{
props
.
row
.
OtherCourseList
[
0
].
CourseName
}}
【
{{
props
.
row
.
OtherCourseList
[
0
].
ClassHours
}}
课时】
</
template
>
<
template
v-if=
"props.row.OtherCourseList.length>1"
>
{{
props
.
row
.
OtherCourseList
[
0
].
CourseName
}}
:
<span
class=
"OtherCourseNum"
>
{{
props
.
row
.
OtherCourseList
.
length
}}
<q-popup-proxy>
<q-banner>
<table
class=
"OCourseTable"
style=
"border-collapse:collapse;"
>
<tr>
<th>
课程名称
</th>
<th>
课时数
</th>
</tr>
<tr
v-for=
"(sItem,sIndex) in props.row.OtherCourseList"
style=
"border-bottom:1px dashed #d1d1d1;"
>
<td>
{{
sItem
.
CourseName
}}
</td>
<td>
{{
sItem
.
ClassHours
}}
</td>
</tr>
</table>
</q-banner>
</q-popup-proxy>
</span>
</
template
>
<
template
v-if=
"props.row.OtherCourseList.length==0"
>
无
</
template
>
</template>
</q-td>
</template>
<
template
v-slot:body-cell-TeacherName=
"props"
>
<q-td
auto-width
:props=
"props"
>
<template
v-if=
"props.row.Teacher_Id==0"
>
<span
style=
"color:red"
>
未指定
</span>
</
template
>
<
template
v-else
>
<span
style=
"color:#3FC4FF;"
>
{{
props
.
row
.
TeacherName
}}
</span>
</
template
>
</q-td>
</template>
<
template
v-slot:body-cell-ClassPersion=
"props"
>
<q-td
auto-width
:props=
"props"
>
<span
:class=
"
{'redStuStyle':props.row.ClassPersion>props.row.OrderStudentCount,'blaStuStyle':props.row.ClassPersion==props.row.OrderStudentCount}">
{{
props
.
row
.
ClassPersion
}}
-
{{
props
.
row
.
OrderStudentCount
}}
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-CompleteProgress=
"props"
>
<q-td
auto-width
:props=
"props"
>
<span
:class=
"
{'classProgress':props.row.UsePlanNum
<props
.
row
.
TotalPlanNum
,'
blaStuStyle
'
:props
.
row
.
UsePlanNum=
=props.row.TotalPlanNum}"
>
{{
props
.
row
.
UsePlanNum
}}
/
{{
props
.
row
.
TotalPlanNum
}}
</span>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<classlist
:data=
"data"
@
success=
"refreshPage"
></classlist>
<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
v-if=
"props.row.ClassStatus==1"
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCourse(props.row)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"gotoOrder(props.row)"
>
<q-item-section>
<q-item-label>
订单中心
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"goPayment(props.row)"
>
<q-item-section>
<q-item-label>
收支明细
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeClass(props.row,1)"
v-if=
"props.row.Status==0"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeClass(props.row,0)"
v-if=
"props.row.Status==1"
>
<q-item-section>
<q-item-label>
恢复
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"showOtherCourse(props.row)"
>
<q-item-section>
<q-item-label>
关联其他课程
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"gomonthLessonCost(props.row)"
>
<q-item-section>
<q-item-label>
月度课耗
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
v-if=
"props.row.ClassStatus!=3"
@
click
.
stop=
"getClassItem(props.row)"
>
<q-item-section>
<q-item-label>
状态变更
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click
.
stop=
"getStudent(props.row.ClassId)"
>
<q-item-section>
<q-item-label>
未完成学员名单
</q-item-label>
</q-item-section>
</q-item>
<q-item
v-if=
"props.row.ClassStatus!=3"
clickable
v-close-popup
@
click=
"classApply(props.row)"
>
<q-item-section>
<q-item-label>
调课申请
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</
template
>
</q-table>
<class-form
v-if=
"isShowClassForm"
:save-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</class-form>
<classinfo-form
v-if=
"isShowClassInfo"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</classinfo-form>
<othercourseForm
v-if=
"IsShowOtherCourse"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</othercourseForm>
<changestatusForm
v-if=
"isShowStatusChange"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
></changestatusForm>
<change-class-form
v-if=
"isShowTiaoke"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
></change-class-form>
</div>
</div>
</
template
>
...
...
@@ -236,100 +83,19 @@
//获取校区列表
import
{
getSchoolDropdown
,
deleteClass
,
getTeacherDropDownList
}
from
'../../api/school/index'
;
import
classForm
from
'../../components/course/class-form'
;
import
classinfoForm
from
'../../components/course/classinfo-form'
;
import
othercourseForm
from
'../../components/course/othercourse-form'
;
import
changestatusForm
from
'../../components/course/changestatus-form'
import
changeClassForm
from
'../../components/teacher/changeClassForm.vue'
import
classlist
from
'../../components/course/classlist'
;
export
default
{
meta
:
{
title
:
"班级管理"
},
components
:
{
classForm
,
classinfoForm
,
othercourseForm
,
changestatusForm
,
changeClassForm
classlist
},
data
()
{
return
{
columns
:
[{
name
:
'ClassName'
,
label
:
'班级名称'
,
field
:
'ClassName'
,
align
:
'left'
},
{
name
:
'SchoolName'
,
label
:
'校区'
,
field
:
'SchoolName'
,
align
:
'left'
,
},
{
name
:
'CourseName'
,
label
:
'课程'
,
field
:
'CourseName'
,
align
:
'left'
},
{
name
:
'OtherCourseName'
,
label
:
'关联其他课程'
,
field
:
'OtherCourseName'
,
align
:
'left'
},
{
name
:
'CourseId'
,
label
:
'课程大纲'
,
field
:
'CourseId'
,
align
:
'left'
},
{
name
:
'TeacherName'
,
label
:
'带班老师'
,
field
:
'TeacherName'
,
align
:
'left'
},
{
name
:
'ClassPersion'
,
label
:
'招生/报名'
,
field
:
'ClassPersion'
,
align
:
'left'
},
{
name
:
'OpenTime'
,
label
:
'开班时间'
,
field
:
'OpenTime'
,
align
:
'left'
},
{
name
:
'FinishTimeStr'
,
label
:
'预计结束时间'
,
field
:
'FinishTimeStr'
,
align
:
'left'
},
{
name
:
'CompleteProgress'
,
label
:
'课程进度'
,
field
:
'CompleteProgress'
,
align
:
'left'
},
{
name
:
'ClassStatusStr'
,
label
:
'状态'
,
align
:
'left'
,
field
:
'ClassStatusStr'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'CourseId'
}
],
data
:
[],
loading
:
false
,
msg
:
{
...
...
@@ -343,18 +109,9 @@
School_Id
:
-
1
,
//关联校区
ClassNo
:
''
,
//班号
},
//班级状态
classStatusList
:
[],
//关联校区列表
schoolList
:
[],
classStatusList
:
[],
//班级状态列表
schoolList
:
[],
//校区列表
pageCount
:
0
,
classObjOption
:
null
,
isShowClassForm
:
false
,
//是否显示新增修改弹窗
isShowClassInfo
:
false
,
//是否显示课程信息
IsShowOtherCourse
:
false
,
//是否显示其他课程
TeacherList
:
[],
isShowStatusChange
:
false
,
//是否显示修改状态弹窗
isShowTiaoke
:
false
,
//是否显示调课申请
}
},
created
()
{
...
...
@@ -369,70 +126,6 @@
this
.
getClassList
();
},
methods
:
{
//删除班级
removeClass
(
item
,
status
)
{
let
delMsg
=
{
ClassId
:
item
.
ClassId
,
Status
:
status
};
var
message
=
"是否要删除该班级?"
;
if
(
status
==
0
)
{
message
=
"是否要恢复该班级?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteClass
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getClassList
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}).
onCancel
(()
=>
{
});
},
//当前点击的班级
getClassItem
(
obj
)
{
if
(
obj
)
{
this
.
classObjOption
=
obj
}
else
{
this
.
classObjOption
=
null
}
this
.
isShowStatusChange
=
true
;
},
gotoOrder
(
item
)
{
this
.
OpenNewUrl
(
'/course/classorder'
,
{
ClassId
:
item
.
ClassId
,
});
},
//跳转到收支明细
goPayment
(
item
)
{
this
.
OpenNewUrl
(
'/course/paymentDetail'
,
{
ClassId
:
item
.
ClassId
,
School_Id
:
item
.
School_Id
,
ClassName
:
encodeURI
(
item
.
ClassName
),
});
},
//获取校区列表
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
...
...
@@ -455,7 +148,7 @@
if
(
res
.
Code
==
1
)
{
this
.
classStatusList
=
res
.
Data
;
}
})
.
catch
(()
=>
{})
})
},
//翻页
changePage
(
val
)
{
...
...
@@ -475,59 +168,8 @@
},
//刷新页面
refreshPage
()
{
this
.
isShowClassForm
=
false
;
this
.
getClassList
();
},
//新增修改菜单
EditCourse
(
obj
)
{
if
(
obj
)
{
this
.
classObjOption
=
obj
}
else
{
this
.
classObjOption
=
null
}
this
.
isShowClassForm
=
true
},
//关闭弹窗
closeClassSaveForm
()
{
//关闭新增修改弹窗
this
.
isShowClassForm
=
false
;
//关闭班级信息弹窗
this
.
isShowClassInfo
=
false
;
//关闭关联其他课程弹窗
this
.
IsShowOtherCourse
=
false
;
this
.
isShowStatusChange
=
false
;
this
.
isShowTiaoke
=
false
;
},
GetFirst
(
val
)
{
if
(
val
)
{
return
val
.
substr
(
0
,
1
);
}
},
//显示关联课程
showOtherCourse
(
item
)
{
this
.
IsShowOtherCourse
=
true
;
this
.
classObjOption
=
item
;
},
//点击班级名称
getClassInfo
(
obj
)
{
this
.
classObjOption
=
null
;
this
.
isShowClassInfo
=
false
;
this
.
classObjOption
=
obj
;
this
.
isShowClassInfo
=
true
;
},
gomonthLessonCost
(
row
)
{
let
ClassName
=
encodeURI
(
row
.
ClassName
)
this
.
OpenNewUrl
(
'/course/monthLessonCost'
,
{
ClassId
:
row
.
ClassId
,
ClassName
:
ClassName
,
});
},
//跳转到课程大纲
goChapter
(
CouseId
)
{
this
.
OpenNewUrl
(
'/course/chapter'
,
{
CourseId
:
CouseId
});
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
...
...
@@ -540,12 +182,6 @@
}
})
},
//调课申请
classApply
(
item
)
{
this
.
classObjOption
=
item
;
this
.
isShowTiaoke
=
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