Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
a3c488f0
提交
a3c488f0
authored
7月 08, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
5ec334f0
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
109 行增加
和
18 行删除
+109
-18
AddCourseCover.vue
...se/create/components/stepOneComponents/AddCourseCover.vue
+1
-1
AddExam.vue
...es/course/create/components/stepOneComponents/AddExam.vue
+1
-0
AddExamDialog.vue
...rse/create/components/stepTwoComponents/AddExamDialog.vue
+5
-2
AddVideoDialog.vue
...se/create/components/stepTwoComponents/AddVideoDialog.vue
+4
-4
StepOne.vue
src/modules/course/create/views/StepOne.vue
+1
-5
StepTwo.vue
src/modules/course/create/views/StepTwo.vue
+47
-2
CardListItem.vue
src/modules/course/my/components/CardListItem.vue
+4
-0
ViewDetailsVideo.vue
src/modules/course/my/components/ViewDetailsVideo.vue
+5
-0
List.vue
src/modules/course/my/views/List.vue
+0
-1
ViewDetails.vue
src/modules/course/my/views/ViewDetails.vue
+41
-3
没有找到文件。
src/modules/course/create/components/stepOneComponents/AddCourseCover.vue
浏览文件 @
a3c488f0
...
...
@@ -81,7 +81,7 @@ const swiperItemHandle = (url: string) => {
src=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/upload-video-icon.png"
class=
"icon"
/>
<div
class=
"text"
>
该图片作为课程的封面图,用于
视频
封面显示
</div>
<div
class=
"text"
>
该图片作为课程的封面图,用于
课程
封面显示
</div>
</div>
<div
class=
"item"
>
<img
...
...
src/modules/course/create/components/stepOneComponents/AddExam.vue
浏览文件 @
a3c488f0
...
...
@@ -65,6 +65,7 @@ const listOptions = computed(() => {
const
removeLectuter
=
(
id
:
string
)
=>
{
const
index
=
examList
.
value
.
findIndex
((
ids
:
string
)
=>
ids
===
id
)
examList
.
value
.
splice
(
index
,
1
)
emit
(
'change'
,
examList
.
value
)
}
const
handleAddExam
=
(
val
:
any
)
=>
{
console
.
log
(
props
.
data
,
'pppp'
)
...
...
src/modules/course/create/components/stepTwoComponents/AddExamDialog.vue
浏览文件 @
a3c488f0
...
...
@@ -42,7 +42,7 @@ const listOptions = {
return
params
},
callback
(
data
:
any
)
{
return
{
list
:
data
.
data
}
return
{
list
:
data
.
data
,
total
:
data
.
total
}
},
params
:
{
project_tag
:
'resourse_ci'
,
...
...
@@ -124,7 +124,7 @@ const handleSelectionChange = (val: any) => {
:model-value=
"isShowExamDialog"
draggable
:before-close=
"handleCancel"
size=
"
6
0%"
size=
"
7
0%"
:title=
"`添加$
{props.btnInfo.btn_name}`"
>
<div
class=
"video-head"
>
...
...
@@ -141,6 +141,9 @@ const handleSelectionChange = (val: any) => {
:props=
"defaultProps"
v-model=
"params.paper_categories"
:data=
"selectTree"
check-strictly
:render-after-expand=
"false"
multiple
/>
</
template
>
</AppList>
...
...
src/modules/course/create/components/stepTwoComponents/AddVideoDialog.vue
浏览文件 @
a3c488f0
...
...
@@ -68,10 +68,10 @@ const listOptions = computed(() => {
remote
:
{
httpRequest
:
getHttpRequest
,
callback
(
data
:
any
)
{
data
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
check_status
=
false
))
data
.
list
.
filter
((
item
:
any
)
=>
item
.
status_name
===
'失效'
)
tableData
=
data
tableData
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
check_status
=
false
))?.
filter
((
it
:
any
)
=>
it
.
status
===
'1'
)
console
.
log
(
tableData
,
'0000'
)
return
data
return
{
list
:
data
.
list
.
filter
((
item
:
any
)
=>
item
.
status_name
===
'有效'
),
total
:
data
.
total
}
},
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
,
course_id
:
props
.
course_id
}
},
...
...
@@ -80,7 +80,7 @@ const listOptions = computed(() => {
{
type
:
'input'
,
prop
:
'name'
,
label
:
'标题:'
}
],
columns
:
[],
data
:
tableData
data
:
tableData
.
list
}
})
// tab切换
...
...
src/modules/course/create/views/StepOne.vue
浏览文件 @
a3c488f0
...
...
@@ -127,11 +127,11 @@ const setDefaultData = (data: object[]) => {
const
stepOneId
=
ref
()
// 新建课件
const
createCourseForm
=
()
=>
{
if
(
isUpdate
)
{
if
(
form
.
lecturer_id
===
''
)
{
ElMessage
.
warning
(
'请添加讲师'
)
return
}
if
(
isUpdate
)
{
updateCourse
(
form
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
0
)
{
// 操作第二部
...
...
@@ -146,10 +146,6 @@ const createCourseForm = () => {
}
})
}
else
{
if
(
form
.
lecturer_id
===
''
)
{
ElMessage
.
warning
(
'请添加讲师'
)
return
}
createCourse
(
form
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
0
)
{
// 操作第二部
...
...
src/modules/course/create/views/StepTwo.vue
浏览文件 @
a3c488f0
...
...
@@ -88,6 +88,7 @@ const handleAddSection = (node: any) => {
}
//编辑章节
const
handleEdit
=
(
node
:
any
)
=>
{
console
.
log
(
node
,
'0000node'
)
chapterID
.
value
=
node
.
key
isEdit
.
value
=
true
chapterName
.
value
=
node
.
label
...
...
@@ -100,6 +101,8 @@ const handleEdit = (node: any) => {
}
// 删除章节
const
handleDel
=
(
node
:
any
)
=>
{
console
.
log
(
node
,
'node1222'
)
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
const
params
=
{
id
:
node
.
key
,
course_id
:
id
}
delCharacter
(
params
).
then
(()
=>
{
...
...
@@ -213,6 +216,29 @@ const imgUrl = (node: any) => {
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/test_img.png'
}
}
const
nodeType
=
(
node
:
any
)
=>
{
if
(
node
.
data
.
resource_type
===
'2'
)
{
// 视频
return
'视频'
}
else
if
(
node
.
data
.
resource_type
===
'3'
)
{
// 作业
return
'作业'
}
else
if
(
node
.
data
.
resource_type
===
'4'
)
{
return
'其他资源'
}
else
if
(
node
.
data
.
resource_type
===
'6'
)
{
// 直播
return
'直播'
}
else
if
(
node
.
data
.
resource_type
===
'9'
)
{
// 考试
return
'考试'
}
else
if
(
node
.
data
.
resource_type
===
'10'
)
{
// 考试
return
'课件'
}
else
if
(
node
.
data
.
resource_type
===
'11'
)
{
// 考试
return
'教案'
}
}
</
script
>
<
template
>
<AppCard
:title=
"isEditCourse === '1' ? '编辑课程' : '新建课程'"
>
...
...
@@ -236,7 +262,9 @@ const imgUrl = (node: any) => {
<template
#
default=
"
{ node, data }">
<span
class=
"custom-tree-node"
>
<span>
<img
:src=
"imgUrl(node)"
alt=
""
style=
"margin-right: 9px; width: 13px; height: 100%"
/>
{{
node
.
label
}}
<img
:src=
"imgUrl(node)"
alt=
""
style=
"width: 13px; height: 100%; margin-right: 13px"
/>
<span
class=
"node_type"
v-if=
"node.data.resource_type !== '1'"
>
{{
nodeType
(
node
)
}}
</span>
<span
class=
"node_title"
>
{{
node
.
label
.
length
>
20
?
node
.
label
.
slice
(
0
,
20
)
+
'...'
:
node
.
label
}}
</span>
<el-link
class=
"btn_edit"
v-if=
"data.depth === '3' && node.data.resource_type === '2'"
...
...
@@ -258,7 +286,6 @@ const imgUrl = (node: any) => {
>
<el-link
type=
"info"
@
click=
"handleDel(node)"
style=
"margin-left: 25px"
>
删除
</el-link></span
>
<span>
<el-button
class=
"btn_operate"
v-if=
"data.depth === '1'"
@
click=
"handleAddSection(node)"
>
<el-icon><Plus
/></el-icon>
...
...
@@ -379,4 +406,22 @@ const imgUrl = (node: any) => {
color
:
#b2833d
;
margin-right
:
10px
;
}
.node_type
{
background
:
#bf9d6b
;
border-radius
:
20px
;
line-height
:
1
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#ffffff
;
text-align
:
center
;
padding
:
4px
8px
;
margin-right
:
14px
;
}
.node_title
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
1
;
text-align
:
center
;
}
</
style
>
src/modules/course/my/components/CardListItem.vue
浏览文件 @
a3c488f0
...
...
@@ -61,6 +61,10 @@ const copyCourse = () => {
&
:hover
{
.tool-pop-btn
{
opacity
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
}
}
.cover-img
{
...
...
src/modules/course/my/components/ViewDetailsVideo.vue
浏览文件 @
a3c488f0
...
...
@@ -53,6 +53,8 @@ const changeVideo = (index: number) => {
<AppVideoPlayer
:options=
"videoOptions"
></AppVideoPlayer>
</div>
</div>
<div
style=
"margin-top: 10px"
>
本小节视频资源:
</div>
<div
class=
"cover-box"
>
<div
class=
"cover-img"
...
...
@@ -96,5 +98,8 @@ const changeVideo = (index: number) => {
background
:
#aa1941
;
text-align
:
center
;
line-height
:
30px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
</
style
>
src/modules/course/my/views/List.vue
浏览文件 @
a3c488f0
...
...
@@ -37,7 +37,6 @@ const listOptions = computed(() => {
}
},
{
label
:
'课程分类'
,
prop
:
'classification_name'
,
align
:
'center'
},
{
label
:
'知识点'
,
prop
:
'knowledge_points'
,
align
:
'center'
},
{
label
:
'封面'
,
slots
:
'table-cover'
,
width
:
150
,
align
:
'center'
},
{
label
:
'资源状态'
,
prop
:
'status_name'
,
align
:
'center'
},
{
label
:
'审核状态'
,
prop
:
'audit_status_name'
,
align
:
'center'
},
...
...
src/modules/course/my/views/ViewDetails.vue
浏览文件 @
a3c488f0
...
...
@@ -46,6 +46,7 @@ interface IResourceAll {
data
:
{
id
:
string
;
url
:
string
}[]
exam
:
any
[]
live
:
any
[]
homework
:
any
[]
}
// 所有要渲染的资源
...
...
@@ -55,7 +56,8 @@ const resourceData = reactive<IResourceAll>({
lessonPlan
:
[],
data
:
[],
exam
:
[],
live
:
[]
live
:
[],
homework
:
[]
})
// 分配资源
...
...
@@ -88,6 +90,9 @@ const getChapterResource = () => {
case
'6'
:
resourceData
.
live
.
push
(
item
.
resource
)
break
case
'3'
:
resourceData
.
homework
.
push
(
item
.
resource
)
break
}
})
}
...
...
@@ -124,6 +129,35 @@ const listOptions = computed(() => {
data
:
resourceData
.
exam
}
})
// 作业参数
const
homeworkOptions
=
computed
(()
=>
{
return
{
columns
:
[
{
type
:
'index'
,
label
:
'序号'
,
fixed
:
'left'
},
{
label
:
'组卷模式'
,
prop
:
'paper_type'
,
computed
:
(
row
:
any
)
=>
{
return
row
.
row
.
paper_type
===
1
?
'选题组卷'
:
'自动组卷'
}
},
{
label
:
'试卷用途'
,
prop
:
'paper_uses'
,
computed
:
(
row
:
any
)
=>
{
const
map
=
{
1
:
'考试'
,
2
:
'课后作业'
,
3
:
'课程测试'
}
return
map
[
row
.
row
.
paper_uses
]
||
row
.
row
.
paper_uses
}
},
{
label
:
'试卷分类'
,
prop
:
'paper_category.name'
},
{
label
:
'试卷名称'
,
prop
:
'paper_title'
},
{
label
:
'总分'
,
prop
:
'paper_total_score'
},
{
label
:
'及格分数'
,
prop
:
'pass_score'
},
{
label
:
'更新时间'
,
prop
:
'updated_at'
}
],
data
:
resourceData
.
homework
}
})
// 直播
const
add0
=
(
m
:
number
)
=>
{
...
...
@@ -180,6 +214,7 @@ watch(
</
script
>
<
template
>
<AppCard
title=
"查阅课程"
>
{{
resourceData
}}
<div
class=
"chapter-box"
>
<div
class=
"title"
>
{{
chapterDetails
?.
name
}}
</div>
<div
class=
"chapter-content"
>
...
...
@@ -202,10 +237,13 @@ watch(
<PreviewFiles
:url=
"item.url"
v-for=
"item in resourceData.data"
:key=
"item.id"
></PreviewFiles>
<el-empty
description=
"暂无数据"
v-if=
"!resourceData.data.length"
/>
</el-tab-pane>
<el-tab-pane
label=
"考试 / 测验"
name=
"4"
>
<el-tab-pane
label=
"作业"
name=
"4"
>
<AppList
v-bind=
"homeworkOptions"
></AppList>
</el-tab-pane>
<el-tab-pane
label=
"考试 / 测验"
name=
"5"
>
<AppList
v-bind=
"listOptions"
></AppList>
</el-tab-pane>
<el-tab-pane
label=
"直播"
name=
"
5
"
>
<el-tab-pane
label=
"直播"
name=
"
6
"
>
<AppList
v-bind=
"liveOptions"
>
<template
#
table-operate=
"
{ row }">
<el-button
plain
@
click=
"goLive(row.join_url)"
>
查看
</el-button>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论