Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
a336ce39
提交
a336ce39
authored
7月 09, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
bf03f0ee
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
35 行增加
和
21 行删除
+35
-21
AddChapterDialog.vue
.../create/components/stepTwoComponents/AddChapterDialog.vue
+1
-1
AddSectionDialog.vue
.../create/components/stepTwoComponents/AddSectionDialog.vue
+2
-1
AddVideoDialog.vue
...se/create/components/stepTwoComponents/AddVideoDialog.vue
+17
-14
StepTwo.vue
src/modules/course/create/views/StepTwo.vue
+15
-5
没有找到文件。
src/modules/course/create/components/stepTwoComponents/AddChapterDialog.vue
浏览文件 @
a336ce39
...
@@ -83,7 +83,7 @@ onMounted(() => {
...
@@ -83,7 +83,7 @@ onMounted(() => {
>
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleFormRef"
label-width=
"80px"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleFormRef"
label-width=
"80px"
>
<el-form-item
label=
"章-名称:"
prop=
"name"
>
<el-form-item
label=
"章-名称:"
prop=
"name"
>
<el-input
v-model=
"form.name"
maxlength=
"25"
></el-input>
<el-input
v-model=
"form.name"
maxlength=
"25"
onkeydown=
"if (event.keyCode===13)
{return false;}"
>
</el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<template
#
footer
>
<template
#
footer
>
...
...
src/modules/course/create/components/stepTwoComponents/AddSectionDialog.vue
浏览文件 @
a336ce39
...
@@ -27,6 +27,7 @@ const props = defineProps({
...
@@ -27,6 +27,7 @@ const props = defineProps({
type
:
String
,
type
:
String
,
required
:
true
required
:
true
},
},
chapterID
:
{
chapterID
:
{
type
:
String
,
type
:
String
,
required
:
true
required
:
true
...
@@ -83,7 +84,7 @@ onMounted(() => {
...
@@ -83,7 +84,7 @@ onMounted(() => {
<p>
{{
chapterName
}}
</p>
<p>
{{
chapterName
}}
</p>
</el-form-item>
</el-form-item>
<el-form-item
label=
"节-名称:"
prop=
"name"
>
<el-form-item
label=
"节-名称:"
prop=
"name"
>
<el-input
v-model=
"form.name"
maxlength=
"25"
></el-input>
<el-input
v-model=
"form.name"
maxlength=
"25"
onkeydown=
"if (event.keyCode===13)
{return false;}"
>
</el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<template
#
footer
>
<template
#
footer
>
...
...
src/modules/course/create/components/stepTwoComponents/AddVideoDialog.vue
浏览文件 @
a336ce39
...
@@ -4,6 +4,7 @@ import CardListItem from './CardListItem.vue'
...
@@ -4,6 +4,7 @@ import CardListItem from './CardListItem.vue'
import
{
useGetCategoryList
}
from
'@/composables/useGetCategoryList'
import
{
useGetCategoryList
}
from
'@/composables/useGetCategoryList'
const
appList
=
ref
()
const
appList
=
ref
()
const
currentResource
:
any
=
$ref
({})
// 资源出处 tab触发
// 资源出处 tab触发
const
tabValue
=
ref
(
'1'
)
const
tabValue
=
ref
(
'1'
)
const
path
=
ref
(
''
)
const
path
=
ref
(
''
)
...
@@ -69,11 +70,10 @@ const listOptions = computed(() => {
...
@@ -69,11 +70,10 @@ const listOptions = computed(() => {
httpRequest
:
getHttpRequest
,
httpRequest
:
getHttpRequest
,
callback
(
data
:
any
)
{
callback
(
data
:
any
)
{
data
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
check_status
=
false
))
data
.
list
.
forEach
((
item
:
any
)
=>
(
item
.
check_status
=
false
))
data
.
list
.
filter
((
item
:
any
)
=>
item
.
status_name
===
'失效'
)
tableData
=
data
tableData
=
data
return
{
list
:
data
.
list
.
filter
((
item
:
any
)
=>
item
.
status_name
===
'有效'
)
,
total
:
data
.
total
}
return
{
list
:
data
.
list
,
total
:
data
.
total
}
},
},
params
:
{
tab
:
tabValue
,
status
:
''
,
authorized
:
''
,
name
:
''
,
course_id
:
props
.
course_id
}
params
:
{
tab
:
tabValue
,
status
:
'
1
'
,
authorized
:
''
,
name
:
''
,
course_id
:
props
.
course_id
}
},
},
filters
:
[
filters
:
[
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
{
prop
:
'classification'
,
label
:
'类别:'
,
slots
:
'filter-type'
},
...
@@ -93,14 +93,12 @@ const handleCancel = () => {
...
@@ -93,14 +93,12 @@ const handleCancel = () => {
}
}
// 保存 添加
// 保存 添加
const
handleSave
=
()
=>
{
const
handleSave
=
()
=>
{
const
name
=
tableData
.
list
.
filter
((
item
:
any
)
=>
item
.
check_status
===
true
)[
0
].
name
const
resource_id
=
tableData
.
list
.
filter
((
item
:
any
)
=>
item
.
check_status
===
true
)[
0
].
id
const
params
:
any
=
{
const
params
:
any
=
{
name
:
name
,
name
:
currentResource
.
name
,
course_id
:
props
.
course_id
,
course_id
:
props
.
course_id
,
resource_type
:
props
.
btnInfo
.
resource_type
,
resource_type
:
props
.
btnInfo
.
resource_type
,
parent_id
:
props
.
chapterID
,
parent_id
:
props
.
chapterID
,
resource_id
:
resource_
id
resource_id
:
currentResource
.
id
}
}
createCharacter
(
params
).
then
(()
=>
{
createCharacter
(
params
).
then
(()
=>
{
...
@@ -147,13 +145,18 @@ if (props.btnInfo.resource_type === '2') {
...
@@ -147,13 +145,18 @@ if (props.btnInfo.resource_type === '2') {
<
template
#
body=
"{ data }"
>
<
template
#
body=
"{ data }"
>
<div
class=
"card-list"
v-if=
"data.length"
>
<div
class=
"card-list"
v-if=
"data.length"
>
<div
class=
"card-list-con"
>
<div
class=
"card-list-con"
>
<div
style=
"position: relative"
v-for=
"(item, index) in data"
:key=
"index"
>
<el-radio-group
v-model=
"currentResource"
>
<el-checkbox
<div
style=
"position: relative"
v-for=
"(item, index) in data"
:key=
"index"
>
v-model=
"item.check_status"
<el-radio
style=
"position: absolute; right: 40px; bottom: 22px"
v-model=
"item.check_status"
></el-checkbox>
:label=
"item"
<CardListItem
:tabIndex=
"tabValue"
:data=
"item"
:path=
"path"
>
</CardListItem>
style=
"position: absolute; right: 40px; bottom: 22px"
</div>
>
{{
''
}}
</el-radio
>
<CardListItem
:tabIndex=
"tabValue"
:data=
"item"
:path=
"path"
>
</CardListItem>
</div>
</el-radio-group>
</div>
</div>
</div>
</div>
<el-empty
v-else
description=
"暂无数据"
/>
<el-empty
v-else
description=
"暂无数据"
/>
...
...
src/modules/course/create/views/StepTwo.vue
浏览文件 @
a336ce39
...
@@ -20,6 +20,7 @@ const isShowAddDialog = ref(false)
...
@@ -20,6 +20,7 @@ const isShowAddDialog = ref(false)
const
isShowExamDialog
=
ref
(
false
)
const
isShowExamDialog
=
ref
(
false
)
const
isShowVideoPlayDialog
=
ref
(
false
)
const
isShowVideoPlayDialog
=
ref
(
false
)
const
chapterName
=
ref
(
''
)
const
chapterName
=
ref
(
''
)
const
parentName
=
ref
(
''
)
const
chapterID
=
ref
(
''
)
const
chapterID
=
ref
(
''
)
const
btnInfo
=
ref
({})
// 按钮信息
const
btnInfo
=
ref
({})
// 按钮信息
const
isEdit
=
ref
(
false
)
const
isEdit
=
ref
(
false
)
...
@@ -54,7 +55,6 @@ const btnList = [
...
@@ -54,7 +55,6 @@ const btnList = [
resource_type
:
'6'
resource_type
:
'6'
}
}
]
]
// const fileType = ['doc', 'docx', 'xls', 'xlsx', 'pdf', 'ppt', 'pptx', 'mp3', 'mp4', 'png', 'jpeg', 'jpg']
const
defaultProps
=
{
const
defaultProps
=
{
children
:
'children'
,
children
:
'children'
,
...
@@ -67,6 +67,13 @@ onMounted(() => {
...
@@ -67,6 +67,13 @@ onMounted(() => {
const
handleChapterList
=
()
=>
{
const
handleChapterList
=
()
=>
{
getCharacter
({
course_id
:
id
,
type
:
'tree'
}).
then
((
res
:
any
)
=>
{
getCharacter
({
course_id
:
id
,
type
:
'tree'
}).
then
((
res
:
any
)
=>
{
dataSource
.
value
=
res
.
data
[
0
]?.
children
dataSource
.
value
=
res
.
data
[
0
]?.
children
dataSource
.
value
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
children
.
length
)
{
item
.
children
.
forEach
((
it
:
any
)
=>
{
it
.
parent_name
=
item
.
name
})
}
})
})
})
}
}
...
@@ -83,19 +90,20 @@ const handleFresh = () => {
...
@@ -83,19 +90,20 @@ const handleFresh = () => {
const
handleAddSection
=
(
node
:
any
)
=>
{
const
handleAddSection
=
(
node
:
any
)
=>
{
chapterName
.
value
=
node
.
label
chapterName
.
value
=
node
.
label
chapterID
.
value
=
node
.
key
chapterID
.
value
=
node
.
key
isShowSectionDialog
.
value
=
true
isShowSectionDialog
.
value
=
true
isEdit
.
value
=
false
isEdit
.
value
=
false
}
}
//编辑章节
//编辑章节
const
handleEdit
=
(
node
:
any
)
=>
{
const
handleEdit
=
(
node
:
any
)
=>
{
console
.
log
(
node
,
'0000node'
)
chapterID
.
value
=
node
.
key
chapterID
.
value
=
node
.
key
isEdit
.
value
=
true
isEdit
.
value
=
true
chapterName
.
value
=
node
.
label
chapterID
.
value
=
node
.
key
chapterID
.
value
=
node
.
key
if
(
node
.
level
===
1
)
{
if
(
node
.
level
===
1
)
{
isShowDialog
.
value
=
true
isShowDialog
.
value
=
true
chapterName
.
value
=
node
.
label
}
else
{
}
else
{
chapterName
.
value
=
node
.
data
.
parent_name
isShowSectionDialog
.
value
=
true
isShowSectionDialog
.
value
=
true
}
}
}
}
...
@@ -252,13 +260,14 @@ const nodeType = (node: any) => {
...
@@ -252,13 +260,14 @@ const nodeType = (node: any) => {
draggable
draggable
:data=
"dataSource"
:data=
"dataSource"
node-key=
"id"
node-key=
"id"
default-expand-all
:expand-on-click-node=
"false"
:props=
"defaultProps"
:props=
"defaultProps"
:allow-drop=
"allowDrop"
:allow-drop=
"allowDrop"
@
node-drop=
"handleDrop"
@
node-drop=
"handleDrop"
style=
"min-width: 100%"
style=
"min-width: 100%"
accordion
default-expand-all
>
>
<!-- -->
<template
#
default=
"
{ node, data }">
<template
#
default=
"
{ node, data }">
<span
class=
"custom-tree-node"
>
<span
class=
"custom-tree-node"
>
<span>
<span>
...
@@ -332,6 +341,7 @@ const nodeType = (node: any) => {
...
@@ -332,6 +341,7 @@ const nodeType = (node: any) => {
:chapterID=
"chapterID"
:chapterID=
"chapterID"
:course_id=
"id"
:course_id=
"id"
:isEdit=
"isEdit"
:isEdit=
"isEdit"
:parentName=
"parentName"
/>
/>
<!-- 添加直播 -->
<!-- 添加直播 -->
<AddLiveDialog
<AddLiveDialog
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论