Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
144a3b74
提交
144a3b74
authored
7月 04, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates:章节内容下载按钮状态判断
上级
8f51e42e
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
32 行删除
+9
-32
CardListItem.vue
...urse/create/components/stepTwoComponents/CardListItem.vue
+4
-4
StepTwo.vue
src/modules/course/create/views/StepTwo.vue
+5
-28
没有找到文件。
src/modules/course/create/components/stepTwoComponents/CardListItem.vue
浏览文件 @
144a3b74
...
...
@@ -9,16 +9,16 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
<!--
<img
:src=
"props.data.cover"
/>
-->
<div
class=
"cover-img"
:style=
"`background-image:url($
{props.data.cover})`">
</div>
<div
class=
"tool-pop-btn"
>
<
!--
<
div
style=
"min-width: 100%"
>
<router-link
v-if=
"props.data.auth_edit"
:to=
"`/resource/video/update?id=$
{props.data.id}`">
<div
style=
"min-width: 100%"
>
<
!--
<
router-link
v-if=
"props.data.auth_edit"
:to=
"`/resource/video/update?id=$
{props.data.id}`">
<div
class=
"edit-btn"
>
编辑
</div>
</router-link>
</router-link>
-->
</div>
<div
style=
"min-width: 100%"
>
<router-link
v-if=
"props.data.auth_view"
:to=
"`/resource/video/view?id=$
{props.data.id}`">
<div
class=
"view-btn"
>
查看
</div>
</router-link>
</div>
-->
</div>
</div>
</div>
<div
class=
"card-item-bottom"
>
...
...
src/modules/course/create/views/StepTwo.vue
浏览文件 @
144a3b74
<
script
lang=
"ts"
setup
>
import
{
Plus
}
from
'@element-plus/icons-vue'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
getCharacter
,
delCharacter
,
getVideoDetails
,
getCourseWareDetails
,
getLessonDetails
,
dragChapterList
,
getOtherDetails
}
from
'../api'
import
{
getCharacter
,
delCharacter
,
getVideoDetails
,
dragChapterList
}
from
'../api'
import
AddSectionDialog
from
'../components/stepTwoComponents/AddSectionDialog.vue'
import
AddLiveDialog
from
'../components/stepTwoComponents/AddLiveDialog.vue'
import
AddVideoDialog
from
'../components/stepTwoComponents/AddVideoDialog.vue'
...
...
@@ -32,7 +24,6 @@ const chapterID = ref('')
const
btnInfo
=
ref
({})
// 按钮信息
const
isEdit
=
ref
(
false
)
const
videoUrl
=
ref
(
''
)
const
otherUrl
=
ref
(
''
)
const
btnList
=
[
{
btn_name
:
'视频'
,
...
...
@@ -146,24 +137,8 @@ const handleConsult = (node: any) => {
}
// 下载
const
handleDownload
=
(
node
:
any
)
=>
{
if
(
node
.
data
.
resource_type
===
'10'
)
{
// 课件
getCourseWareDetails
({
id
:
node
.
data
.
resource_id
}).
then
((
res
:
any
)
=>
{
otherUrl
.
value
=
res
.
data
.
url
window
.
open
(
otherUrl
.
value
)
})
}
else
if
(
node
.
data
.
resource_type
===
'11'
)
{
//教案
getLessonDetails
({
id
:
node
.
data
.
resource_id
}).
then
(
res
=>
{
otherUrl
.
value
=
res
.
data
.
url
window
.
open
(
otherUrl
.
value
)
})
}
else
if
(
node
.
data
.
resource_type
===
'4'
)
{
getOtherDetails
({
id
:
node
.
data
.
resource_id
}).
then
(
res
=>
{
otherUrl
.
value
=
res
.
data
.
url
window
.
open
(
otherUrl
.
value
)
})
}
console
.
log
(
node
.
data
.
resource
.
can_view
)
window
.
open
(
node
.
data
.
resource
.
url
)
}
//拖拽
const
allowDrop
=
(
draggingNode
:
any
,
dropNode
:
any
,
type
:
any
)
=>
{
...
...
@@ -220,12 +195,14 @@ const handleDrop = (startNode: any, endNode: any, position: any, event: any) =>
class=
"btn_edit"
v-if=
"data.depth === '3' && node.data.resource_type === '2'"
@
click=
"handleConsult(node)"
:disabled=
"node.data.resource.can_view !== true"
>
查阅
</el-link
>
<el-link
class=
"btn_edit"
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"
>
下载
</el-link
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论