Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
feb5263e
提交
feb5263e
authored
7月 08, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
f79361a3
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
69 行增加
和
22 行删除
+69
-22
AddLive.vue
...es/course/create/components/stepOneComponents/AddLive.vue
+4
-5
AddVideoDialog.vue
...se/create/components/stepTwoComponents/AddVideoDialog.vue
+2
-1
StepOne.vue
src/modules/course/create/views/StepOne.vue
+10
-2
CardListItem.vue
src/modules/course/my/components/CardListItem.vue
+27
-2
Operation.vue
src/modules/course/my/components/Operation.vue
+1
-1
ViewCourseInfo.vue
src/modules/course/my/components/ViewCourseInfo.vue
+2
-2
ViewDetailsVideo.vue
src/modules/course/my/components/ViewDetailsVideo.vue
+15
-3
ViewDetails.vue
src/modules/course/my/views/ViewDetails.vue
+8
-6
没有找到文件。
src/modules/course/create/components/stepOneComponents/AddLive.vue
浏览文件 @
feb5263e
...
@@ -33,11 +33,10 @@ const listOptions = computed(() => {
...
@@ -33,11 +33,10 @@ const listOptions = computed(() => {
prop
:
'start_time'
,
prop
:
'start_time'
,
align
:
'center'
,
align
:
'center'
,
computed
({
row
}:
any
)
{
computed
({
row
}:
any
)
{
console
.
log
(
row
.
start_time
,
row
.
end_time
,
Date
.
parse
(
Date
()),
'000row.start_time'
)
if
(
row
.
start_time
===
undefined
)
{
if
(
row
.
start_time
===
undefined
||
Date
.
parse
(
Date
())
>
row
.
start_time
)
{
return
'-'
return
'-'
}
else
{
}
else
{
return
format
(
parseInt
(
row
.
start_time
))
return
format
(
parseInt
(
row
.
start_time
)
*
1000
)
}
}
}
}
},
},
...
@@ -46,10 +45,10 @@ const listOptions = computed(() => {
...
@@ -46,10 +45,10 @@ const listOptions = computed(() => {
prop
:
'end_time'
,
prop
:
'end_time'
,
align
:
'center'
,
align
:
'center'
,
computed
({
row
}:
any
)
{
computed
({
row
}:
any
)
{
if
(
row
.
end_time
===
undefined
||
Date
.
parse
(
Date
())
>
row
.
end_time
)
{
if
(
row
.
end_time
===
undefined
)
{
return
'-'
return
'-'
}
else
{
}
else
{
return
format
(
parseInt
(
row
.
end_time
))
return
format
(
parseInt
(
row
.
end_time
)
*
1000
)
}
}
}
}
},
},
...
...
src/modules/course/create/components/stepTwoComponents/AddVideoDialog.vue
浏览文件 @
feb5263e
...
@@ -69,7 +69,8 @@ const listOptions = computed(() => {
...
@@ -69,7 +69,8 @@ const listOptions = computed(() => {
httpRequest
:
getHttpRequest
,
httpRequest
:
getHttpRequest
,
callback
(
data
:
any
)
{
callback
(
data
:
any
)
{
tableData
=
data
tableData
=
data
tableData
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
status
=
'1'
))
tableData
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
check_status
=
false
))?.
filter
((
it
:
any
)
=>
it
.
status
===
'1'
)
console
.
log
(
tableData
,
'0000'
)
return
data
return
data
},
},
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
,
course_id
:
props
.
course_id
}
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
,
course_id
:
props
.
course_id
}
...
...
src/modules/course/create/views/StepOne.vue
浏览文件 @
feb5263e
...
@@ -12,6 +12,7 @@ import AddLecturer from '../components/stepOneComponents/AddLecturer.vue'
...
@@ -12,6 +12,7 @@ import AddLecturer from '../components/stepOneComponents/AddLecturer.vue'
import
AddExam
from
'../components/stepOneComponents/AddExam.vue'
import
AddExam
from
'../components/stepOneComponents/AddExam.vue'
// 添加直播
// 添加直播
import
AddLive
from
'../components/stepOneComponents/AddLive.vue'
import
AddLive
from
'../components/stepOneComponents/AddLive.vue'
import
{
ElMessage
}
from
'element-plus'
const
store
=
useMapStore
()
const
store
=
useMapStore
()
...
@@ -127,6 +128,10 @@ const stepOneId = ref()
...
@@ -127,6 +128,10 @@ const stepOneId = ref()
// 新建课件
// 新建课件
const
createCourseForm
=
()
=>
{
const
createCourseForm
=
()
=>
{
if
(
isUpdate
)
{
if
(
isUpdate
)
{
if
(
form
.
lecturer_id
===
''
)
{
ElMessage
.
warning
(
'请添加讲师'
)
return
}
updateCourse
(
form
).
then
((
res
:
any
)
=>
{
updateCourse
(
form
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
// 操作第二部
// 操作第二部
...
@@ -141,7 +146,10 @@ const createCourseForm = () => {
...
@@ -141,7 +146,10 @@ const createCourseForm = () => {
}
}
})
})
}
else
{
}
else
{
console
.
log
(
form
,
'form'
)
if
(
form
.
lecturer_id
===
''
)
{
ElMessage
.
warning
(
'请添加讲师'
)
return
}
createCourse
(
form
).
then
((
res
:
any
)
=>
{
createCourse
(
form
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
// 操作第二部
// 操作第二部
...
@@ -191,7 +199,7 @@ const createCourseForm = () => {
...
@@ -191,7 +199,7 @@ const createCourseForm = () => {
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"课程学分:"
prop=
"credit"
>
<el-form-item
label=
"课程学分:"
prop=
"credit"
>
<el-input
v-model=
"form.credit"
maxlength=
"
40
"
/>
<el-input
v-model=
"form.credit"
maxlength=
"
2
"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
...
src/modules/course/my/components/CardListItem.vue
浏览文件 @
feb5263e
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
courseCopy
}
from
'../api'
import
{
ElMessage
}
from
'element-plus'
const
props
:
any
=
defineProps
<
{
data
:
object
;
tabIndex
:
string
}
>
()
const
props
:
any
=
defineProps
<
{
data
:
object
;
tabIndex
:
string
}
>
()
// 复制
const
copyCourse
=
()
=>
{
courseCopy
({
id
:
props
.
data
.
id
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
0
)
{
ElMessage
({
message
:
'复制成功'
,
type
:
'success'
})
}
})
}
</
script
>
</
script
>
<
template
>
<
template
>
<!--
<div>
{{
props
.
data
}}
</div>
-->
<!--
<div>
{{
props
.
data
}}
</div>
-->
...
@@ -18,6 +29,9 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
...
@@ -18,6 +29,9 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
<router-link
v-if=
"props.data.auth_view"
:to=
"`/course/my/view?id=$
{props.data.id}`">
<router-link
v-if=
"props.data.auth_view"
:to=
"`/course/my/view?id=$
{props.data.id}`">
<div
class=
"view-btn"
>
查看
</div>
<div
class=
"view-btn"
>
查看
</div>
</router-link>
</router-link>
<div
style=
"min-width: 100%"
v-if=
"props.data.auth_copy"
>
<div
class=
"copy-btn"
plain
@
click=
"copyCourse"
>
复制
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -78,7 +92,7 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
...
@@ -78,7 +92,7 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
height
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
opacity
:
0
;
opacity
:
0
;
padding-top
:
5
2px
;
padding-top
:
2
2px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.edit-btn
{
.edit-btn
{
width
:
113px
;
width
:
113px
;
...
@@ -88,7 +102,7 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
...
@@ -88,7 +102,7 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
text-align
:
center
;
text-align
:
center
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#ffffff
;
color
:
#ffffff
;
margin
:
0
auto
12
px
;
margin
:
0
auto
5
px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.view-btn
{
.view-btn
{
...
@@ -102,6 +116,17 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
...
@@ -102,6 +116,17 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
margin
:
0
auto
;
margin
:
0
auto
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.copy-btn
{
width
:
113px
;
line-height
:
32px
;
border-radius
:
18px
;
text-align
:
center
;
font-size
:
14px
;
color
:
#ffffff
;
margin
:
5px
auto
;
cursor
:
pointer
;
border
:
1px
solid
#d3d3d3
;
}
}
}
}
}
}
}
...
...
src/modules/course/my/components/Operation.vue
浏览文件 @
feb5263e
...
@@ -76,7 +76,7 @@ const handleStatus = () => {
...
@@ -76,7 +76,7 @@ const handleStatus = () => {
`
`
${
${
parseInt
(
props
.
data
.
status
)
===
1
parseInt
(
props
.
data
.
status
)
===
1
?
'已下线的课程将不能被
关联到课程
使用,确认下线该课程吗?'
?
'已下线的课程将不能被
共享和
使用,确认下线该课程吗?'
:
'确认再次上线该课程吗?'
:
'确认再次上线该课程吗?'
}
}
`
,
`
,
...
...
src/modules/course/my/components/ViewCourseInfo.vue
浏览文件 @
feb5263e
...
@@ -62,7 +62,7 @@ const basicInfo = computed((): IBasicInfo[] => {
...
@@ -62,7 +62,7 @@ const basicInfo = computed((): IBasicInfo[] => {
},
},
{
{
icon
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/course-view-icon7.png'
,
icon
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/course-view-icon7.png'
,
label
:
'是否
可用
'
,
label
:
'是否
有效
'
,
value
:
''
,
value
:
''
,
key
:
'status_name'
key
:
'status_name'
},
},
...
@@ -122,7 +122,7 @@ const basicInfo = computed((): IBasicInfo[] => {
...
@@ -122,7 +122,7 @@ const basicInfo = computed((): IBasicInfo[] => {
<div
class=
"item"
>
<div
class=
"item"
>
<img
src=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/course-view-icon12.png"
/>
<img
src=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/course-view-icon12.png"
/>
<div
class=
"label"
>
课程授权信息
</div>
<div
class=
"label"
>
课程授权信息
</div>
<div
class=
"value"
>
Marrywood
</div>
<div
class=
"value"
v-for=
"(item, index) in props.data"
:key=
"index"
>
{{
item
.
department_name
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/modules/course/my/components/ViewDetailsVideo.vue
浏览文件 @
feb5263e
...
@@ -24,7 +24,9 @@ const videoOptions = computed(() => {
...
@@ -24,7 +24,9 @@ const videoOptions = computed(() => {
return
{
return
{
sources
:
[
sources
:
[
{
{
src
:
resourceData
.
play_auth
?.
play_info_list
.
find
((
item
:
any
)
=>
{
return
item
.
Definition
===
'SD'
}).
PlayURL
src
:
resourceData
.
play_auth
?.
play_info_list
.
find
((
item
:
any
)
=>
{
return
item
.
Definition
===
'SD'
}).
PlayURL
}
}
]
]
}
}
...
@@ -60,6 +62,7 @@ const changeVideo = (index: number) => {
...
@@ -60,6 +62,7 @@ const changeVideo = (index: number) => {
@click="changeVideo(index)"
@click="changeVideo(index)"
>
>
<div
:class=
"index === videoIndex ? 'border active' : 'border'"
></div>
<div
:class=
"index === videoIndex ? 'border active' : 'border'"
></div>
<div
class=
"cover-name"
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -67,7 +70,7 @@ const changeVideo = (index: number) => {
...
@@ -67,7 +70,7 @@ const changeVideo = (index: number) => {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.cover-box
{
.cover-box
{
display
:
flex
;
display
:
flex
;
margin-bottom
:
2
0px
;
margin-bottom
:
3
0px
;
}
}
.cover-img
{
.cover-img
{
width
:
200px
;
width
:
200px
;
...
@@ -81,8 +84,17 @@ const changeVideo = (index: number) => {
...
@@ -81,8 +84,17 @@ const changeVideo = (index: number) => {
height
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
&
.active
{
&
.active
{
border
:
10px
solid
#aa1941
;
border-top
:
5px
solid
#aa1941
;
border-left
:
5px
solid
#aa1941
;
border-right
:
5px
solid
#aa1941
;
}
}
}
}
}
}
.cover-name
{
width
:
100%
;
height
:
30px
;
background
:
#aa1941
;
text-align
:
center
;
line-height
:
30px
;
}
</
style
>
</
style
>
src/modules/course/my/views/ViewDetails.vue
浏览文件 @
feb5263e
...
@@ -43,8 +43,8 @@ interface IResourceAll {
...
@@ -43,8 +43,8 @@ interface IResourceAll {
videoData
:
{
cover
:
string
;
id
:
string
}[]
videoData
:
{
cover
:
string
;
id
:
string
}[]
courseware
:
{
id
:
string
;
url
:
string
}[]
courseware
:
{
id
:
string
;
url
:
string
}[]
lessonPlan
:
{
id
:
string
;
url
:
string
}[]
lessonPlan
:
{
id
:
string
;
url
:
string
}[]
data
:
{
id
:
string
;
url
:
string
}[]
,
data
:
{
id
:
string
;
url
:
string
}[]
exam
:
any
[]
,
exam
:
any
[]
live
:
any
[]
live
:
any
[]
}
}
...
@@ -184,23 +184,25 @@ watch(
...
@@ -184,23 +184,25 @@ watch(
<div
class=
"title"
>
{{
chapterDetails
?.
name
}}
</div>
<div
class=
"title"
>
{{
chapterDetails
?.
name
}}
</div>
<div
class=
"chapter-content"
>
<div
class=
"chapter-content"
>
<div
class=
"content-left"
>
<div
class=
"content-left"
>
{{
resourceData
.
videoData
}}
<ViewDetailsVideo
<ViewDetailsVideo
v-if=
"Object.keys(resourceData.videoData).length"
v-if=
"Object.keys(resourceData.videoData).length"
:data=
"resourceData.videoData"
:data=
"resourceData.videoData"
></ViewDetailsVideo>
></ViewDetailsVideo>
<el-empty
description=
"暂无数据"
v-else
/>
<el-empty
description=
"暂无数据"
v-else
/>
<el-tabs
:lazy=
"true"
v-model=
"activeName"
class=
"demo-tabs"
>
<el-tabs
:lazy=
"true"
v-model=
"activeName"
class=
"demo-tabs"
>
<el-tab-pane
label=
"课件"
name=
"1"
>
<el-tab-pane
label=
"课件"
name=
"1"
>
<PreviewFiles
v-for=
"item in resourceData.courseware"
:key=
"item.id"
:url=
"item.url"
></PreviewFiles>
<PreviewFiles
v-for=
"item in resourceData.courseware"
:key=
"item.id"
:url=
"item.url"
></PreviewFiles>
<el-empty
description=
"暂无数据"
v-if=
"!resourceData.courseware.length"
/>
<el-empty
description=
"暂无数据"
v-if=
"!resourceData.courseware.length"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"教案"
name=
"2"
>
<el-tab-pane
label=
"教案"
name=
"2"
>
<PreviewFiles
:url=
"item.url"
v-for=
"item in resourceData.courseware"
:key=
"item.id"
></PreviewFiles>
<PreviewFiles
:url=
"item.url"
v-for=
"item in resourceData.courseware"
:key=
"item.id"
></PreviewFiles>
<el-empty
description=
"暂无数据"
v-if=
"!resourceData.courseware.length"
/>
<el-empty
description=
"暂无数据"
v-if=
"!resourceData.courseware.length"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"资料"
name=
"3"
>
<el-tab-pane
label=
"资料"
name=
"3"
>
<PreviewFiles
:url=
"item.url"
v-for=
"item in resourceData.courseware"
:key=
"item.id"
></PreviewFiles>
<PreviewFiles
:url=
"item.url"
v-for=
"item in resourceData.courseware"
:key=
"item.id"
></PreviewFiles>
<el-empty
description=
"暂无数据"
v-if=
"!resourceData.courseware.length"
/>
<el-empty
description=
"暂无数据"
v-if=
"!resourceData.courseware.length"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"考试 / 测验"
name=
"4"
>
<el-tab-pane
label=
"考试 / 测验"
name=
"4"
>
<AppList
v-bind=
"listOptions"
></AppList>
<AppList
v-bind=
"listOptions"
></AppList>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论