Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
tea-resources-web
Commits
be376af9
Commit
be376af9
authored
Aug 22, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
69105779
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
4 deletions
+61
-4
courseCatalogues.vue
...s/courseInformation/courseManagement/courseCatalogues.vue
+61
-4
No files found.
src/views/courseInformation/courseManagement/courseCatalogues.vue
View file @
be376af9
...
...
@@ -679,9 +679,11 @@ export default {
return
commonField
}
},
moun
ted
()
{
crea
ted
()
{
// 尝试查询数据
this
.
loadCatalog
()
},
mounted
()
{
this
.
getUploadType
()
// 查询上传类型
},
methods
:
{
...
...
@@ -1043,6 +1045,59 @@ export default {
})
},
// 查询课程目录
elseLoadCatalog
(
lessonId
)
{
// 清空原课时信息
this
.
classCurrent
=
''
// 清空原章节列表
this
.
chapterList
=
''
// 点击目录的时候会传课程id与课时,如果组件中没有课程id则不加载
if
(
lessonId
!==
undefined
||
this
.
lessonId
!==
''
)
{
// console.log('查询课程目录!');
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'正在加载课程目录...'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.5)'
,
customClass
:
'myLoading'
})
const
_this
=
this
const
params
=
{
lessonId
:
lessonId
,
lessonOrSl
:
1
}
queryBChaptersWithoutAuth
(
params
).
then
(
res
=>
{
loading
.
close
()
_this
.
chapterList
=
res
.
data
.
chapterList
console
.
log
(
'章节列表:'
,
_this
.
chapterList
)
// 赋文件上传路径
_this
.
resForm
.
resUrl
=
_this
.
HTTPApi
+
'bfile/uploadVideo'
// 统计当前课时
const
classCurrent
=
0
for
(
let
i
=
0
;
i
<
_this
.
chapterList
.
length
;
i
++
)
{
this
.
$set
(
_this
.
chapterList
[
i
],
'inputDisabled'
,
true
)
for
(
let
j
=
0
;
j
<
_this
.
chapterList
[
i
].
childList
.
length
;
j
++
)
{
this
.
$set
(
_this
.
chapterList
[
i
].
childList
[
j
],
'inputDisabled'
,
true
)
// classCurrent += parseInt(_this.chapterList[i].childList[j].classHour)
for
(
let
k
=
0
;
k
<
_this
.
chapterList
[
i
].
childList
[
j
].
childList
.
length
;
k
++
)
{
this
.
$set
(
_this
.
chapterList
[
i
].
childList
[
j
].
childList
[
k
],
'inputDisabled'
,
true
)
// classCurrent += parseInt(_this.chapterList[i].childList[j].childList[k].classHour)
}
}
}
_this
.
classCurrent
=
classCurrent
// 关闭loading
loading
.
close
()
}).
catch
((
err
)
=>
{
_this
.
$notify
({
title
:
'失败'
,
message
:
'网络错误3'
,
type
:
'error'
})
loading
.
close
()
})
}
},
// 查询课程目录
loadCatalog
(
lessonId
,
classHours
,
lessonName
,
code
,
dirId
,
stuMeansFile
,
cpage
)
{
this
.
lessonId
=
lessonId
this
.
currentPage
=
cpage
...
...
@@ -2132,7 +2187,8 @@ export default {
console
.
log
(
'yesLoadingyesLoadingyesLoadingyesLoading'
,
this
.
uploadList
.
some
(
item
=>
item
.
yesLoading
===
true
))
if
(
this
.
uploadList
.
length
<
1
||
(
this
.
uploadList
.
some
(
item
=>
item
.
uploadStatus
===
'上传中'
)
===
false
&&
this
.
uploadList
.
some
(
item
=>
item
.
yesLoading
===
true
)
===
false
))
{
this
.
batchDialog
=
false
this
.
loadCatalog
()
// this.loadCatalog()
this
.
elseLoadCatalog
(
this
.
lessonId
)
}
else
{
this
.
$confirm
(
'当前还有文件在上传中是否确认关闭?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -2140,7 +2196,8 @@ export default {
type
:
'warning'
}).
then
(()
=>
{
this
.
batchDialog
=
false
this
.
loadCatalog
()
// this.loadCatalog()
this
.
elseLoadCatalog
(
this
.
lessonId
)
}).
catch
(()
=>
{
})
}
...
...
@@ -2566,7 +2623,7 @@ export default {
message
:
'删除成功'
,
type
:
'success'
})
this
.
loadCatalog
(
)
this
.
elseLoadCatalog
(
this
.
lessonId
)
if
(
type
===
0
)
{
this
.
openUploadDialog
(
'视频维护'
,
this
.
saveItem
,
type
,
'只能上传以.mp4格式结尾的文件'
,
res
.
data
.
videoUrl
)
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment