Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
b8b217e1
提交
b8b217e1
authored
7月 07, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
9bec5a21
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
87 行增加
和
42 行删除
+87
-42
useQuestionList.ts
src/composables/useQuestionList.ts
+2
-2
AddVideoDialog.vue
...se/create/components/stepTwoComponents/AddVideoDialog.vue
+1
-1
CardListItem.vue
...urse/create/components/stepTwoComponents/CardListItem.vue
+3
-1
VideoPlayDialog.vue
...e/create/components/stepTwoComponents/VideoPlayDialog.vue
+2
-1
StepOne.vue
src/modules/course/create/views/StepOne.vue
+1
-11
StepTwo.vue
src/modules/course/create/views/StepTwo.vue
+55
-3
Operation.vue
src/modules/course/my/components/Operation.vue
+7
-7
ViewCourseChapter.vue
src/modules/course/my/components/ViewCourseChapter.vue
+16
-16
没有找到文件。
src/composables/useQuestionList.ts
浏览文件 @
b8b217e1
...
...
@@ -3,7 +3,7 @@ import { getQuestionCategory } from '@/api/base'
export
function
useQuestionList
()
{
const
list
=
ref
([])
getQuestionCategory
({
project_tag
:
'resourse_ci'
}).
then
((
res
:
any
)
=>
{
list
.
value
=
res
.
data
.
filter
((
item
:
any
)
=>
{
list
.
value
=
res
.
data
?
.
filter
((
item
:
any
)
=>
{
item
.
children
=
detailChild
(
item
.
children
)
return
item
.
children
})
...
...
@@ -11,7 +11,7 @@ export function useQuestionList() {
const
detailChild
=
(
child
:
any
)
=>
{
if
(
!
child
)
return
[]
return
child
.
filter
((
item
:
any
)
=>
{
return
child
?
.
filter
((
item
:
any
)
=>
{
item
.
children
=
detailChild
(
item
.
children
)
return
item
.
children
})
...
...
src/modules/course/create/components/stepTwoComponents/AddVideoDialog.vue
浏览文件 @
b8b217e1
...
...
@@ -69,7 +69,7 @@ const listOptions = computed(() => {
httpRequest
:
getHttpRequest
,
callback
(
data
:
any
)
{
tableData
=
data
tableData
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
check_status
=
false
))
tableData
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
status
=
'1'
))
return
data
},
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
,
course_id
:
props
.
course_id
}
...
...
src/modules/course/create/components/stepTwoComponents/CardListItem.vue
浏览文件 @
b8b217e1
...
...
@@ -24,7 +24,9 @@ const props: any = defineProps<{ data: object; tabIndex: string; path: string }>
<div
class=
"card-item-bottom"
>
<div
class=
"item-t"
>
<div
class=
"text"
>
{{
props
.
data
.
created_operator_name
}}
/
{{
props
.
data
.
organ_id_name
}}
</div>
<div
:class=
"props.data.status == 1 ? 'tag green' : 'tag'"
>
{{
props
.
data
.
status_name
}}
</div>
<div
:class=
"props.data.status == 1 ? 'tag green' : 'tag'"
>
{{
props
.
data
.
status_name
}}
</div>
</div>
<div
class=
"item-b"
>
<div
class=
"time"
>
{{
props
.
data
.
updated_time
}}
</div>
...
...
src/modules/course/create/components/stepTwoComponents/VideoPlayDialog.vue
浏览文件 @
b8b217e1
...
...
@@ -23,6 +23,7 @@ const handleCancel = () => {
</
script
>
<
template
>
<el-dialog
:model-value=
"isShowVideoPlayDialog"
draggable
:before-close=
"handleCancel"
width=
"35%"
>
<AppVideoPlayer
:options=
"
{sources:[{src:props.videoOptions}]}">
</AppVideoPlayer>
{{
props
.
videoOptions
}}
<AppVideoPlayer
:options=
"
{ sources: [{ src: props.videoOptions }] }">
</AppVideoPlayer>
</el-dialog>
</
template
>
src/modules/course/create/views/StepOne.vue
浏览文件 @
b8b217e1
...
...
@@ -51,7 +51,6 @@ const defaultProps = {
// form
let
form
=
$ref
<
Record
<
string
,
any
>>
({
status
:
1
,
source
:
'2'
,
cover
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/course-cover.png'
})
...
...
@@ -65,8 +64,7 @@ const rules = {
credit
:
[{
required
:
true
,
message
:
'请输入学分'
}],
lecturer_id
:
[{
required
:
true
,
message
:
''
}],
exam_id
:
[{
required
:
true
,
message
:
''
}],
live_id
:
[{
required
:
true
,
message
:
''
}],
status
:
[{
required
:
true
,
message
:
''
}]
live_id
:
[{
required
:
true
,
message
:
''
}]
}
// 课程封面dialog
...
...
@@ -114,7 +112,6 @@ if (isUpdate) {
form
.
lecturer_id
=
setDefaultData
(
lecturerList
.
value
)
form
.
exam_id
=
setDefaultData
(
examList
.
value
)
form
.
live_id
=
setDefaultData
(
liveList
.
value
)
switchFlag
.
value
=
!!
parseInt
(
res
.
data
.
status
)
})
}
const
setDefaultData
=
(
data
:
object
[])
=>
{
...
...
@@ -129,7 +126,6 @@ const setDefaultData = (data: object[]) => {
const
stepOneId
=
ref
()
// 新建课件
const
createCourseForm
=
()
=>
{
form
.
status
=
switchFlag
.
value
?
'1'
:
'0'
if
(
isUpdate
)
{
updateCourse
(
form
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -161,9 +157,6 @@ const createCourseForm = () => {
})
}
}
// 开关
const
switchFlag
=
ref
(
true
)
</
script
>
<
template
>
...
...
@@ -200,9 +193,6 @@ const switchFlag = ref(true)
<el-form-item
label=
"课程学分:"
prop=
"credit"
>
<el-input
v-model=
"form.credit"
maxlength=
"40"
/>
</el-form-item>
<el-form-item
label=
"是否可用:"
prop=
"status"
>
<el-switch
v-model=
"switchFlag"
/>
</el-form-item>
</el-form>
</div>
<el-form
...
...
src/modules/course/create/views/StepTwo.vue
浏览文件 @
b8b217e1
...
...
@@ -54,6 +54,8 @@ const btnList = [
resource_type
:
'6'
}
]
// const fileType = ['doc', 'docx', 'xls', 'xlsx', 'pdf', 'ppt', 'pptx', 'mp3', 'mp4', 'png', 'jpeg', 'jpg']
const
defaultProps
=
{
children
:
'children'
,
label
:
'name'
...
...
@@ -132,6 +134,7 @@ const handleConsult = (node: any) => {
if
(
node
.
data
.
resource_type
===
'2'
)
{
getVideoDetails
({
id
:
node
.
data
.
resource_id
}).
then
(
res
=>
{
videoUrl
.
value
=
res
.
data
.
play_auth
.
play_info_list
.
filter
((
item
:
any
)
=>
item
.
Definition
===
'SD'
)[
0
].
PlayURL
console
.
log
(
videoUrl
.
value
,
'videoUrl.value'
)
isShowVideoPlayDialog
.
value
=
true
})
}
...
...
@@ -168,6 +171,49 @@ const handleDrop = (startNode: any, endNode: any, position: any, event: any) =>
handleChapterList
()
})
}
const
imgUrl
=
(
node
:
any
)
=>
{
if
(
node
.
data
.
resource_type
===
'1'
)
{
// 章节
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/chapter_img.png'
}
else
if
(
node
.
data
.
resource_type
===
'2'
)
{
// 视频
console
.
log
(
node
.
data
.
resource
,
'000'
)
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/mp4_img.png'
}
else
if
(
node
.
data
.
resource_type
===
'3'
)
{
// 作业
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/homework.png'
}
else
if
(
node
.
data
.
resource_type
===
'4'
)
{
if
(
node
.
data
.
resource
?.
url
.
includes
(
'pptx'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'ppt'
))
{
// 其他资源
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/pptx_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'rar'
))
{
// 其他资源
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/rar_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'mp3'
))
{
// 其他资源
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/mp3_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'mp4'
))
{
// 其他资源
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/mp4_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'docx'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'doc'
))
{
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/docx_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'xls'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'xlsx'
))
{
return
''
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'png'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'jpeg'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'jpg'
)
)
{
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/jpg_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'pdf'
))
{
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/pdf_img.png'
}
}
else
if
(
node
.
data
.
resource_type
===
'9'
)
{
// 考试
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/test_img.png'
}
}
</
script
>
<
template
>
<AppCard
:title=
"isEditCourse === '1' ? '编辑课程' : '新建课程'"
>
...
...
@@ -190,14 +236,14 @@ const handleDrop = (startNode: any, endNode: any, position: any, event: any) =>
>
<template
#
default=
"
{ node, data }">
<span
class=
"custom-tree-node"
>
<span>
{{
node
.
label
}}
</span>
<span>
<
el-link
class=
"btn_edit"
v-if=
"data.depth !== '3'"
@
click=
"handleEdit(node)"
>
编辑
</el-link>
<
img
:src=
"imgUrl(node)"
alt=
""
style=
"margin-right: 9px; width: 13px; height: 100%"
/>
{{
node
.
label
}}
<el-link
class=
"btn_edit"
v-if=
"data.depth === '3' && node.data.resource_type === '2'"
@
click=
"handleConsult(node)"
:disabled=
"node.data.resource.can_view !== true"
style=
"margin-left: 35px"
>
查阅
</el-link
>
<el-link
...
...
@@ -205,10 +251,16 @@ const handleDrop = (startNode: any, endNode: any, position: any, event: any) =>
v-if=
"data.depth === '3' && node.data.resource_type !== '2' && node.data.resource_type !== '6'"
@
click=
"handleDownload(node)"
:disabled=
"node.data.resource.can_view !== true"
style=
"margin-left: 35px"
>
下载
</el-link
>
<el-link
class=
"btn_edit"
v-if=
"data.depth !== '3'"
@
click=
"handleEdit(node)"
style=
"margin-left: 35px"
>
编辑
</el-link
>
<el-link
type=
"info"
@
click=
"handleDel(node)"
style=
"margin-left: 25px"
>
删除
</el-link></span
>
<el-link
type=
"info"
@
click=
"handleDel(node)"
>
删除
</el-link
>
<span
>
<el-button
class=
"btn_operate"
v-if=
"data.depth === '1'"
@
click=
"handleAddSection(node)"
>
<el-icon><Plus
/></el-icon>
添加小节
...
...
src/modules/course/my/components/Operation.vue
浏览文件 @
b8b217e1
...
...
@@ -20,8 +20,8 @@ const handleDepartment = () => {
`
${
parseInt
(
props
.
data
.
department_public
)
===
0
?
`该操作将会使本课
件资源在您所在的部门“
${
props
.
data
.
organ_id_name
}
”内部共享,管理者不变,其余人员只能共享使用该资源
,确认部门共享吗?`
:
`该操作将会取消本课
件资源在您所在的部门“
${
props
.
data
.
organ_id_name
}
”内部共享,部门其余人员将不能再看到该共享资源
,确认取消部门共享吗?`
?
`该操作将会使本课
程在您所在的部门“
${
props
.
data
.
organ_id_name
}
”内部共享,管理者不变,其余人员只能共享使用该课程
,确认部门共享吗?`
:
`该操作将会取消本课
程在您所在的部门“
${
props
.
data
.
organ_id_name
}
”内部共享,部门其余人员将不能再看到该共享课程
,确认取消部门共享吗?`
}
`
,
'提示'
,
...
...
@@ -48,8 +48,8 @@ const handlePlatform = () => {
`
${
parseInt
(
props
.
data
.
platform_public
)
===
0
?
'该操作将会使本课
件资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源
吗?'
:
'该操作将会取消本课
件资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源
,确认取消平台共享吗?'
?
'该操作将会使本课
程在e-SaaS平台中公开共享供所有老师使用,课程的管理者不变,其余人员只能共享使用该课程,确认公开该课程
吗?'
:
'该操作将会取消本课
程在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享课程
,确认取消平台共享吗?'
}
`
,
'提示'
,
...
...
@@ -76,8 +76,8 @@ const handleStatus = () => {
`
${
parseInt
(
props
.
data
.
status
)
===
1
?
'已下线的
资源将不能被关联到课程使用,确认下线该资源
吗?'
:
'确认再次上线该
资源
吗?'
?
'已下线的
课程将不能被关联到课程使用,确认下线该课程
吗?'
:
'确认再次上线该
课程
吗?'
}
`
,
'提示'
,
...
...
@@ -169,7 +169,7 @@ const copyCourse = () => {
{{
props
.
data
.
platform_public
==
0
?
'平台共享'
:
'取消平台共享'
}}
</div>
<div
v-if=
"props.data.auth_status"
class=
"btn-item"
@
click=
"handleStatus"
>
{{
props
.
data
.
status
==
0
?
'
资源上线'
:
'资源
下线'
}}
{{
props
.
data
.
status
==
0
?
'
课程上线'
:
'课程
下线'
}}
</div>
<div
v-if=
"props.data.auth_belong"
class=
"btn-item"
@
click=
"handleMembers"
>
更改负责人
</div>
</div>
...
...
src/modules/course/my/components/ViewCourseChapter.vue
浏览文件 @
b8b217e1
...
...
@@ -2,7 +2,7 @@
defineProps
<
{
data
:
any
[];
isBlack
?:
boolean
}
>
()
const
route
=
useRoute
()
const
id
=
route
.
query
.
id
?
route
.
query
.
id
:
route
.
params
.
courseId
as
string
const
id
=
route
.
query
.
id
?
route
.
query
.
id
:
(
route
.
params
.
courseId
as
string
)
</
script
>
<
template
>
<div
:class=
"isBlack ? 'chapter-box active-black' : 'chapter-box'"
>
...
...
@@ -12,9 +12,9 @@ const id = route.query.id ? route.query.id : route.params.courseId as string
<div
class=
"order"
>
{{
index
+
1
}}
</div>
<div
class=
"chapter-text"
>
<div
class=
"chapter"
>
{{
item
.
name
}}
</div>
<div
class=
"sections"
v-for=
"
(child, childIndex)
in item.children"
:key=
"child.id"
>
<div
class=
"sections"
v-for=
"
child
in item.children"
:key=
"child.id"
>
<router-link
:to=
"`/course/my/view/$
{child.id}/${id}`">
{{
index
+
1
}}
.
{{
childIndex
+
1
}}
{{
child
.
name
}}
{{
child
.
name
}}
</router-link>
</div>
</div>
...
...
@@ -26,23 +26,24 @@ const id = route.query.id ? route.query.id : route.params.courseId as string
.chapter-box
{
width
:
300px
;
background
:
#aa1941
;
border-radius
:
1
0px
;
border-radius
:
2
0px
;
margin-left
:
20px
;
height
:
fit-content
;
&
.active-black
{
background
:
#1f1e24
;
border-radius
:
0
;
background
:
#aa1941
;
border-radius
:
20px
;
.chapter-list
{
.item
{
border-bottom
:
1px
dotted
#fff
;
//
border-bottom: 1px dotted #fff;
}
}
}
.title
{
width
:
271px
;
margin
:
0
auto
;
border-bottom
:
1px
solid
#fff
;
font-size
:
16
px
;
//
border-bottom: 1px solid #fff;
font-size
:
24
px
;
font-weight
:
500
;
line-height
:
52px
;
color
:
#ffffff
;
...
...
@@ -53,12 +54,12 @@ const id = route.query.id ? route.query.id : route.params.courseId as string
padding
:
0
23px
70px
;
.item
{
display
:
flex
;
border-bottom
:
1px
dotted
#e06386
;
//
border-bottom: 1px dotted #e06386;
margin-top
:
30px
;
.order
{
width
:
26px
;
height
:
26px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
//
width: 26px;
//
height: 26px;
//
background: rgba(255, 255, 255, 1);
border-radius
:
50%
;
font-size
:
16px
;
line-height
:
26px
;
...
...
@@ -68,8 +69,7 @@ const id = route.query.id ? route.query.id : route.params.courseId as string
}
.chapter-text
{
.chapter
{
font-size
:
16px
;
font-weight
:
500
;
font-size
:
20px
;
line-height
:
100%
;
color
:
#ffffff
;
margin-bottom
:
20px
;
...
...
@@ -77,7 +77,7 @@ const id = route.query.id ? route.query.id : route.params.courseId as string
cursor
:
pointer
;
}
.sections
{
font-size
:
1
4
px
;
font-size
:
1
6
px
;
line-height
:
100%
;
color
:
#ffffff
;
margin-bottom
:
20px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论