Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
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
张伯涛
tea-resources-web
Commits
56c8c0c1
Commit
56c8c0c1
authored
Apr 08, 2024
by
王飞龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程管理 课程编辑修改
parent
fbd0e415
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
26 deletions
+106
-26
indexApi.js
src/api/courseManagement/indexApi.js
+16
-0
index.vue
src/views/courseInformation/courseManagement/index.vue
+20
-8
index.vue
src/views/courseInformation/courseManagement/info/index.vue
+70
-18
No files found.
src/api/courseManagement/indexApi.js
View file @
56c8c0c1
...
...
@@ -9,6 +9,22 @@ export function queryBLessonsByPagination(query) {
params
:
query
})
}
// 课程管理查询详细信息
export
function
detailBLesson
(
businessId
)
{
return
request
({
url
:
'/blesson/detail/'
+
businessId
,
method
:
'get'
})
}
// 修改课程管理
export
function
updateBLesson
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/blesson/update/'
+
data
.
businessId
,
method
:
'put'
,
data
})
}
// 课程管理目录查询
export
function
queryBChaptersWithoutAuth
(
query
)
{
return
request
({
...
...
src/views/courseInformation/courseManagement/index.vue
View file @
56c8c0c1
...
...
@@ -48,8 +48,8 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"课程讲师"
prop=
"
teacher
Name"
>
<el-select
v-model=
"queryParams.
teacher
Name"
placeholder=
"课程讲师"
clearable
>
<el-form-item
label=
"课程讲师"
prop=
"
lessonTea
Name"
>
<el-select
v-model=
"queryParams.
lessonTea
Name"
placeholder=
"课程讲师"
clearable
>
<el-option
v-for=
"(item,index) in teacherOptions"
:key=
"index"
...
...
@@ -374,8 +374,8 @@
:class=
"commonField.updateClass"
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"
picturecover(scope.$index,
scope.row)"
>
修改封面
</el-button>
@
click=
"
updateInfo(
scope.row)"
>
编辑
</el-button>
<el-button
:class=
"commonField.updateClass"
:type=
"commonField.typeParent"
...
...
@@ -710,7 +710,7 @@ export default {
tecClassify
:
''
,
difficultyClassify
:
''
,
lessonBrief
:
''
,
teacher
Name
:
''
,
lessonTea
Name
:
''
,
lessonPrice
:
''
,
homeDisplay
:
''
,
flag
:
''
,
...
...
@@ -798,6 +798,19 @@ export default {
}
})
},
/**
* 编辑
*
*/
updateInfo
(
row
)
{
this
.
$router
.
push
({
path
:
'/courseInformation/courseManagement/info/update'
,
query
:
{
status
:
'2'
,
businessId
:
row
.
businessId
}
})
},
step
(
index
)
{
return
'step'
+
index
},
...
...
@@ -832,7 +845,7 @@ export default {
tecClassify
:
''
,
difficultyClassify
:
''
,
lessonBrief
:
''
,
teacher
Name
:
''
,
lessonTea
Name
:
''
,
lessonPrice
:
''
,
homeDisplay
:
''
,
flag
:
''
,
...
...
@@ -954,10 +967,9 @@ export default {
tecClassify
:
_this
.
queryParams
.
tecClassify
,
difficultyClassify
:
_this
.
queryParams
.
difficultyClassify
,
lessonBrief
:
_this
.
queryParams
.
lessonBrief
,
teacherName
:
_this
.
queryParams
.
teacher
Name
,
lessonTeaName
:
_this
.
queryParams
.
lessonTea
Name
,
lessonPrice
:
_this
.
queryParams
.
lessonPrice
,
homeDisplay
:
_this
.
queryParams
.
homeDisplay
,
lessonTeaName
:
_this
.
queryParams
.
lessonTeaName
,
flag
:
_this
.
queryParams
.
flag
,
schoolQualityLesson
:
_this
.
queryParams
.
schoolQualityLesson
,
entQualityLesson
:
_this
.
queryParams
.
entQualityLesson
,
...
...
src/views/courseInformation/courseManagement/info/index.vue
View file @
56c8c0c1
<
template
>
<div
class=
"addCourse"
>
<div
class=
"CourseTitle"
>
<div
v-if=
"status=== '1'"
class=
"title"
>
{{
title
}}
</div>
<div
class=
"title"
>
{{
title
}}
</div>
</div>
<div
class=
"CourseContent"
>
<el-form
ref=
"courseRef"
:model=
"form"
:rules=
"rules"
label-position=
"right"
label-width=
"auto"
>
...
...
@@ -87,9 +87,9 @@
<el-row
:gutter=
"100"
>
<!-- "-->
<el-col
:span=
"12"
>
<el-form-item
label=
"课程讲师:"
prop=
"
teacher
Name"
:rules=
"[
{ required: status !== '3', message: '请输入课程讲师', trigger: 'blur' }]">
<el-form-item
label=
"课程讲师:"
prop=
"
lessonTea
Name"
:rules=
"[
{ required: status !== '3', message: '请输入课程讲师', trigger: 'blur' }]">
<el-select
v-model=
"form.
teacher
Name"
v-model=
"form.
lessonTea
Name"
filterable
class=
"normalSelct"
>
...
...
@@ -206,7 +206,13 @@
<
script
>
import
{
uploadPublic
}
from
'@/api/contentManagement/sysContest'
import
{
blessonAdd
,
queryTeaLessonJobs
,
queryTeaLessonTecs
}
from
'@/api/courseManagement/indexApi'
import
{
blessonAdd
,
detailBLesson
,
queryTeaLessonJobs
,
queryTeaLessonTecs
,
updateBLesson
}
from
'@/api/courseManagement/indexApi'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
listCmsLecturer
}
from
'@/api/courseManagement/cmsLecturer'
...
...
@@ -287,7 +293,8 @@ export default {
pictureId
:
''
,
// 课程介绍
lessonDescription
:
''
,
flag
:
'1'
flag
:
'1'
,
lessonTeaName
:
''
},
teacherOptions
:
[],
rules
:
{
...
...
@@ -296,8 +303,14 @@ export default {
},
created
()
{
this
.
getAllDict
()
// this.getTeaLessonJobs()
// this.getTitle()
// 接收路由参数
this
.
status
=
this
.
$route
.
query
.
status
this
.
businessId
=
this
.
$route
.
query
.
businessId
if
(
this
.
status
===
'2'
)
{
this
.
getLessonDetail
()
}
this
.
getTeaLessonJobs
()
this
.
getTitle
()
},
methods
:
{
getAllDict
()
{
...
...
@@ -340,10 +353,14 @@ export default {
// 保存
submit
()
{
this
.
$refs
.
courseRef
.
validate
(
valid
=>
{
console
.
log
(
'this.businessid'
,
this
.
businessId
)
console
.
log
(
this
.
businessid
!==
null
)
console
.
log
(
this
.
businessid
!==
undefined
)
console
.
log
(
this
.
businessid
!==
''
)
if
(
valid
)
{
if
(
this
.
businessid
!==
null
)
{
if
(
this
.
businessid
!==
null
&&
this
.
businessid
!==
''
)
{
console
.
log
(
'更新'
)
this
.
cre
ateClass
()
this
.
upd
ateClass
()
}
else
{
console
.
log
(
'添加'
)
this
.
createClass
()
...
...
@@ -351,7 +368,13 @@ export default {
}
})
},
// 查询课程详情
getLessonDetail
()
{
detailBLesson
(
this
.
businessId
).
then
(
res
=>
{
this
.
form
=
res
.
data
// this.imageUrl = res.data.pictureUrl
})
},
// 新增课程
createClass
()
{
blessonAdd
(
this
.
form
).
then
(
res
=>
{
...
...
@@ -368,6 +391,43 @@ export default {
path
:
'/courseInformation/courseManagement/index'
})
},
// 修改课程
updateClass
()
{
const
form
=
{
businessId
:
this
.
businessId
,
lessonName
:
this
.
form
.
lessonName
,
lessonBrief
:
this
.
form
.
lessonBrief
,
classHour
:
this
.
form
.
classHour
,
classPlan
:
this
.
form
.
classPlan
,
jobClassify
:
this
.
form
.
jobClassify
,
tecClassify
:
this
.
form
.
tecClassify
,
teacherName
:
this
.
form
.
teacherName
,
lessonPrice
:
this
.
form
.
lessonPrice
,
difficultyClassify
:
this
.
form
.
difficultyClassify
,
homeDisplay
:
this
.
form
.
homeDisplay
,
entQualityLesson
:
this
.
form
.
entQualityLesson
,
schoolQualityLesson
:
this
.
form
.
schoolQualityLesson
,
pictureId
:
this
.
form
.
pictureId
,
lessonDescription
:
this
.
form
.
lessonDescription
,
flag
:
this
.
form
.
flag
,
lessonTeaName
:
this
.
form
.
lessonTeaName
}
// 调用了编辑方法
blessonAdd
(
form
).
then
(
res
=>
{
let
type
=
res
.
code
const
message
=
res
.
message
type
=
(
type
===
200
)
?
'success'
:
'warning'
this
.
$notify
({
title
:
type
===
'success'
?
'成功'
:
'提示'
,
message
:
message
,
type
:
type
})
})
this
.
$router
.
push
({
path
:
'/courseInformation/courseManagement/index'
})
},
// 查询讲师
getTeacher
()
{
const
params
=
{
...
...
@@ -379,14 +439,6 @@ export default {
console
.
log
(
'讲师'
,
this
.
lecturerList
)
})
},
getTeaLessonJobs
()
{
queryTeaLessonJobs
().
then
(
res
=>
{
console
.
log
(
'岗位信息'
,
res
)
})
queryTeaLessonTecs
().
then
(
res
=>
{
console
.
log
(
'计算信息'
,
res
)
})
},
beforeAvatarUpload
(
file
)
{
// 判断文件是否为图片类型
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
...
...
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