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
32f66037
Commit
32f66037
authored
Oct 20, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
333c48aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
746 additions
and
534 deletions
+746
-534
index.js
src/api/course/index.js
+14
-0
index.js
src/api/school/index.js
+208
-56
class-form.vue
src/components/school/classmanage/class-form.vue
+149
-0
classmanage.vue
src/pages/school/classmanage.vue
+109
-226
manager.vue
src/pages/school/manager.vue
+266
-252
No files found.
src/api/course/index.js
View file @
32f66037
...
...
@@ -71,6 +71,20 @@ export function queryCoursePage(data) {
})
}
/**
* 获取课程下拉列表
* @param {JSON对象} data
*/
export
function
queryCourseDropdownList
(
data
)
{
return
request
({
url
:
'/Course/GetCourseList'
,
method
:
'post'
,
data
})
}
/**
* 获取课程详情
* @param {JSON参数} data
...
...
src/api/school/index.js
View file @
32f66037
...
...
@@ -5,11 +5,11 @@ import request from '../../utils/request'
*
*/
export
function
getSchoolPage
(
data
)
{
return
request
({
url
:
'/user/GetSchoolPageList'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/GetSchoolPageList'
,
method
:
'post'
,
data
})
}
/**
...
...
@@ -17,11 +17,11 @@ export function getSchoolPage(data) {
*
*/
export
function
getSchoolDropdown
(
data
)
{
return
request
({
url
:
'/user/GetSchoolList'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/GetSchoolList'
,
method
:
'post'
,
data
})
}
/**
...
...
@@ -29,43 +29,54 @@ export function getSchoolDropdown(data) {
*
*/
export
function
saveSchool
(
data
)
{
return
request
({
url
:
'/user/SetSchool'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/SetSchool'
,
method
:
'post'
,
data
})
}
/**
* 获取教师分页数据
*/
export
function
getTeacherPage
(
data
)
{
return
request
({
url
:
'/user/GetTeacherPageList'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/GetTeacherPageList'
,
method
:
'post'
,
data
})
}
/**
* 获取讲师列表
*/
export
function
getTeacherDropDownList
(
data
)
{
return
request
({
url
:
'/user/GetTeacherList'
,
method
:
'post'
,
data
})
}
/**
* 保存教师信息
*/
export
function
saveTeacher
(
data
)
{
return
request
({
url
:
'/user/SetTeacher'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/SetTeacher'
,
method
:
'post'
,
data
})
}
/**
* 教师审核
*/
export
function
auditTeacher
(
data
)
{
return
request
({
url
:
'/user/AuditTeacher'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/AuditTeacher'
,
method
:
'post'
,
data
})
}
/**
...
...
@@ -73,44 +84,56 @@ export function auditTeacher(data) {
* @param {TId} data
*/
export
function
deleteTeacher
(
data
)
{
return
request
({
url
:
'/user/RemoveTeacher'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/RemoveTeacher'
,
method
:
'post'
,
data
})
}
/**
* 获取助教分页数据
*/
export
function
getAssistPage
(
data
)
{
return
request
({
url
:
'/user/GetAssistPageList'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/GetAssistPageList'
,
method
:
'post'
,
data
})
}
/**
* 获取助教下拉列表
* @param {JSON对象} data
*/
export
function
getAssistDropDownList
(
data
)
{
return
request
({
url
:
'/user/GetAssistList'
,
method
:
'post'
,
data
})
}
/**
* 保存教师信息
*/
export
function
saveAssist
(
data
)
{
return
request
({
url
:
'/user/SetAssist'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/SetAssist'
,
method
:
'post'
,
data
})
}
/**
* 教师审核
*/
export
function
auditAssist
(
data
)
{
return
request
({
url
:
'/user/AuditAssist'
,
method
:
'post'
,
data
})
return
request
({
url
:
'/user/AuditAssist'
,
method
:
'post'
,
data
})
}
/**
...
...
@@ -118,9 +141,138 @@ export function auditAssist(data) {
* @param {AId} data
*/
export
function
deleteAssist
(
data
)
{
return
request
({
url
:
'/user/RemoveAssist'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
return
request
({
url
:
'/user/RemoveAssist'
,
method
:
'post'
,
data
})
}
/**
* 获取班级分页列表
* @param {JSON数据} data
*/
export
function
getClassPage
(
data
)
{
return
request
({
url
:
'/Class/GetClassPageList'
,
method
:
'post'
,
data
})
}
/**
* 获取班级列表【下拉使用】
* @param {JSON数据} data
*/
export
function
getClassDropDownList
(
data
)
{
return
request
({
url
:
'/Class/GetClassList'
,
method
:
'post'
,
data
})
}
/**
* 新增修改班级
* @param {JSON数据} data
*/
export
function
saveClass
(
data
)
{
return
request
({
url
:
'/Class/SetClass'
,
method
:
'post'
,
data
})
}
/**
* 新增修改班级
* @param {JSON数据} data
*/
export
function
getClassInfo
(
data
)
{
return
request
({
url
:
'/Class/GetClass'
,
method
:
'post'
,
data
})
}
/**
* 删除班级
* @param {JSON数据} data
*/
export
function
deleteClass
(
data
)
{
return
request
({
url
:
'/Class/RemoveClass'
,
method
:
'post'
,
data
})
}
/**
* 获取学员分页列表
* @param {JSON数据} data
*/
export
function
getStudentPage
(
data
)
{
return
request
({
url
:
'/User/GetStudentPageList'
,
method
:
'post'
,
data
})
}
/**
* 获取学员下拉类表
*/
export
function
getStudentDorpDownList
(
data
)
{
return
request
({
url
:
'/User/GetStudentList'
,
method
:
'post'
,
data
})
}
/**
* 添加修改学员
*/
export
function
saveStudent
(
data
)
{
return
request
({
url
:
'/User/SetStudent'
,
method
:
'post'
,
data
})
}
/**
* 获取学员信息
*/
export
function
getStudentInfo
(
data
)
{
return
request
({
url
:
'/User/GetStudent'
,
method
:
'post'
,
data
})
}
/**
* 删除学员信息
*/
export
function
deleteStudent
(
data
)
{
return
request
({
url
:
'/User/RemoveStudent'
,
method
:
'post'
,
data
})
}
/**
* 更新学生禁用或启用
*/
export
function
UpdateStudentIsDisable
(
data
)
{
return
request
({
url
:
'/User/UpdateStudentIsDisable'
,
method
:
'post'
,
data
})
}
src/components/school/classmanage/class-form.vue
0 → 100644
View file @
32f66037
<
template
>
<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
.
ClassId
==
0
?
'新增班级信息'
:
'修改班级信息'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-md q-px-xs text-grey-6"
>
基本资料
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.ClassName"
ref=
"ClassName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"班级名称"
:rules=
"[val => !!val || '请填写班级名称']"
/>
<q-select
filled
stack-label
option-value=
"CourseId"
option-label=
"CourseName"
v-model=
"objOption.CouseId"
ref=
"CouseId"
:options=
"courseList"
label=
"所属课程"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
:rules=
"[val => !!val || '请选择所属课程']"
/>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"objOption.Teacher_Id"
ref=
"Teacher_Id"
:options=
"teacherList"
label=
"讲师"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
:rules=
"[val => !!val || '请选择讲师']"
/>
<q-select
filled
stack-label
option-value=
"AId"
option-label=
"AssistName"
v-model=
"objOption.Assist_Id"
ref=
"Assist_Id"
:options=
"assistList"
label=
"助教"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
:rules=
"[val => !!val || '请选择助教']"
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
color=
"dark"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent"
class=
"q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"saveClassInfo"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
getTeacherDropDownList
,
getAssistDropDownList
,
saveClass
,
getClassInfo
}
from
'../../../api/school/index'
import
{
queryCourseDropdownList
}
from
'../../../api/course/index'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
ClassId
:
0
,
//班级编号
ClassName
:
''
,
//班级名称
CouseId
:
0
,
//所属课程
Teacher_Id
:
0
,
//讲师编号
Assist_Id
:
0
,
//助教编号
},
optionTitle
:
""
,
courseList
:
[],
teacherList
:
[],
assistList
:
[],
saveLoading
:
false
,
}
},
created
()
{
this
.
getCourseDropdown
();
this
.
getTeacherDropdown
();
this
.
getAssistantDropdown
();
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
initObj
()
{
if
(
this
.
saveObj
)
{
this
.
optionTitle
=
"修改班级信息"
if
(
this
.
saveObj
.
ClassId
>
0
)
{
getClassInfo
({
ClassId
:
this
.
saveObj
.
ClassId
}).
then
(
res
=>
{
this
.
objOption
.
ClassId
=
res
.
Data
.
ClassId
;
this
.
objOption
.
ClassName
=
res
.
Data
.
ClassName
;
this
.
objOption
.
CouseId
=
res
.
Data
.
CouseId
;
this
.
objOption
.
Teacher_Id
=
res
.
Data
.
Teacher_Id
;
this
.
objOption
.
Assist_Id
=
res
.
Data
.
Assist_Id
;
this
.
$forceUpdate
();
})
}
}
else
{
this
.
optionTitle
=
"新增班级"
this
.
objOption
.
ClassId
=
0
;
this
.
objOption
.
ClassName
=
""
;
this
.
objOption
.
CouseId
=
0
;
this
.
objOption
.
Teacher_Id
=
0
;
this
.
objOption
.
Assist_Id
=
0
;
}
},
//获取课程下拉列表
getCourseDropdown
()
{
queryCourseDropdownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
courseList
=
res
.
Data
;
}
});
},
//获取讲师下拉列表
getTeacherDropdown
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
teacherList
=
res
.
Data
;
}
})
},
//获取助教下拉列表
getAssistantDropdown
()
{
getAssistDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
assistList
=
res
.
Data
;
}
});
},
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
saveClassInfo
()
{
this
.
saveLoading
=
true
saveClass
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
},
},
}
</
script
>
src/pages/school/classmanage.vue
View file @
32f66037
This diff is collapsed.
Click to expand it.
src/pages/school/manager.vue
View file @
32f66037
This diff is collapsed.
Click to expand it.
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