Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
a2e96242
提交
a2e96242
authored
7月 11, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
10b8cc8d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
29 行增加
和
14 行删除
+29
-14
AddSectionDialog.vue
.../create/components/stepTwoComponents/AddSectionDialog.vue
+5
-2
StepTwo.vue
src/modules/course/create/views/StepTwo.vue
+20
-10
Update.vue
src/modules/resource/other/views/Update.vue
+4
-2
没有找到文件。
src/modules/course/create/components/stepTwoComponents/AddSectionDialog.vue
浏览文件 @
a2e96242
...
...
@@ -27,7 +27,10 @@ const props = defineProps({
type
:
String
,
required
:
true
},
sectionName
:
{
type
:
String
,
required
:
true
},
chapterID
:
{
type
:
String
,
required
:
true
...
...
@@ -67,7 +70,7 @@ const handleConfirm = () => {
}
onMounted
(()
=>
{
if
(
props
.
isEdit
)
{
form
.
name
=
props
.
chapter
Name
form
.
name
=
props
.
section
Name
}
})
</
script
>
...
...
src/modules/course/create/views/StepTwo.vue
浏览文件 @
a2e96242
...
...
@@ -20,11 +20,13 @@ const isShowAddDialog = ref(false)
const
isShowExamDialog
=
ref
(
false
)
const
isShowVideoPlayDialog
=
ref
(
false
)
const
chapterName
=
ref
(
''
)
const
parentName
=
ref
(
''
)
const
chapterID
=
ref
(
''
)
const
btnInfo
=
ref
({})
// 按钮信息
const
isEdit
=
ref
(
false
)
const
videoUrl
=
ref
(
''
)
const
sectionName
=
ref
(
''
)
const
defaultExpandedKeys
:
any
=
ref
([])
const
btnList
=
[
{
btn_name
:
'视频'
,
...
...
@@ -55,7 +57,6 @@ const btnList = [
resource_type
:
'6'
}
]
const
defaultProps
=
{
children
:
'children'
,
label
:
'name'
...
...
@@ -70,7 +71,7 @@ const handleChapterList = () => {
dataSource
.
value
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
children
.
length
)
{
item
.
children
.
forEach
((
it
:
any
)
=>
{
it
.
parent_
name
=
item
.
name
it
.
parent_
id
=
item
.
id
})
}
})
...
...
@@ -90,7 +91,6 @@ const handleFresh = () => {
const
handleAddSection
=
(
node
:
any
)
=>
{
chapterName
.
value
=
node
.
label
chapterID
.
value
=
node
.
key
isShowSectionDialog
.
value
=
true
isEdit
.
value
=
false
}
...
...
@@ -103,14 +103,15 @@ const handleEdit = (node: any) => {
isShowDialog
.
value
=
true
chapterName
.
value
=
node
.
label
}
else
{
console
.
log
(
node
.
data
.
label
)
chapterName
.
value
=
node
.
data
.
parent_name
sectionName
.
value
=
node
.
label
isShowSectionDialog
.
value
=
true
}
}
// 删除章节
const
handleDel
=
(
node
:
any
)
=>
{
console
.
log
(
node
,
'node1222'
)
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
const
params
=
{
id
:
node
.
key
,
course_id
:
id
}
delCharacter
(
params
).
then
(()
=>
{
...
...
@@ -168,8 +169,7 @@ const allowDrop = (draggingNode: any, dropNode: any, type: any) => {
}
}
//拖拽列表
const
handleDrop
=
(
startNode
:
any
,
endNode
:
any
,
position
:
any
,
event
:
any
)
=>
{
console
.
log
(
startNode
,
'-----'
,
endNode
,
'-----'
,
position
,
'-----'
,
event
)
const
handleDrop
=
(
startNode
:
any
,
endNode
:
any
,
position
:
any
)
=>
{
const
params
=
{
course_id
:
id
,
id
:
startNode
.
data
.
id
,
...
...
@@ -247,6 +247,12 @@ const nodeType = (node: any) => {
return
'教案'
}
}
const
handleNodeExpand
=
(
data
:
any
)
=>
{
defaultExpandedKeys
.
value
=
[
data
.
id
]
}
const
handleNodeCollapse
=
()
=>
{
defaultExpandedKeys
.
value
=
[]
}
</
script
>
<
template
>
<AppCard
:title=
"isEditCourse === '1' ? '编辑课程' : '新建课程'"
>
...
...
@@ -257,16 +263,20 @@ const nodeType = (node: any) => {
</div>
</el-row>
<el-tree
ref=
"treeRef"
draggable
:data=
"dataSource"
node-key=
"id"
:accordion=
"true"
:props=
"defaultProps"
:allow-drop=
"allowDrop"
:default-expanded-keys=
"defaultExpandedKeys"
:expand-on-click-node=
"false"
@
node-drop=
"handleDrop"
@
node-expand=
"handleNodeExpand"
@
node-collapse=
"handleNodeCollapse"
style=
"min-width: 100%"
:expand-on-click-node=
"false"
>
<!-- -->
<template
#
default=
"
{ node, data }">
<span
class=
"custom-tree-node"
>
<span>
...
...
@@ -346,7 +356,7 @@ const nodeType = (node: any) => {
:chapterID=
"chapterID"
:course_id=
"id"
:isEdit=
"isEdit"
:
parentName=
"parent
Name"
:
sectionName=
"section
Name"
/>
<!-- 添加直播 -->
<AddLiveDialog
...
...
src/modules/resource/other/views/Update.vue
浏览文件 @
a2e96242
...
...
@@ -142,7 +142,7 @@ const createResources = (params: any) => {
// 协议
const
protocol
=
ref
(
false
)
const
changeProtocol
=
(
data
:
any
)
=>
{
const
changeProtocol
=
(
data
:
any
)
=>
{
protocol
.
value
=
data
.
value
}
</
script
>
...
...
@@ -162,7 +162,9 @@ const changeProtocol = (data:any) => {
<div
class=
"upload-btn"
>
本地文件
</div>
</div>
</div>
<div
class=
"tips"
>
文件支持格式包含:doc docx xls xlsx pdf ppt pptx mp3 mp4 png jpeg jpg,大小不超过200M
</div>
<div
class=
"tips"
>
文件支持格式包含:doc docx xls xlsx pdf ppt pptx mp3 mp4 png jpeg jpg rar,大小不超过200M
</div>
</div>
</el-form-item>
<el-form-item
label=
"资料名称:"
prop=
"name"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论