Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mt-education-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
王旭
mt-education-web
Commits
7f9a8a5b
Commit
7f9a8a5b
authored
Nov 13, 2019
by
fanlin@91isoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
22172 新新建页面中,没有保存过的条件下,没有发布按钮,一旦保存成功,显示出【发布】【删除】按钮
parent
5254018d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
137 additions
and
132 deletions
+137
-132
global.less
src/components/global.less
+1
-1
ChapterCatalog.vue
src/views/courseTrain/onlineCourseNew/ChapterCatalog.vue
+62
-61
ChapterListTea.vue
src/views/courseTrain/onlineCourseNew/ChapterListTea.vue
+0
-12
EduPdf.vue
src/views/courseTrain/onlineCourseNew/components/EduPdf.vue
+73
-57
sortManage.vue
src/views/courseTrain/sortManage.vue
+1
-1
No files found.
src/components/global.less
View file @
7f9a8a5b
...
@@ -427,7 +427,7 @@ body {
...
@@ -427,7 +427,7 @@ body {
}
}
// 侧边栏高度度
// 侧边栏高度度
.ant-layout-sider.sider.light {
.ant-layout-sider.sider.light {
height:
770px
;
height:
102%
;
}
}
// 外置的样式控制
// 外置的样式控制
.user-dropdown-menu {
.user-dropdown-menu {
...
...
src/views/courseTrain/onlineCourseNew/ChapterCatalog.vue
View file @
7f9a8a5b
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
<div
style=
"margin-bottom:20px;margin-top: 45px"
>
<div
style=
"margin-bottom:20px;margin-top: 45px"
>
<span
class=
"addCourseContent"
><span
style=
"color: red"
>
*
</span>
所属章:
</span>
<span
class=
"addCourseContent"
><span
style=
"color: red"
>
*
</span>
所属章:
</span>
<div
style=
"display: inline-block;width: 347px;height:40px;box-sizing:border-box;position:relative;"
>
<div
style=
"display: inline-block;width: 347px;height:40px;box-sizing:border-box;position:relative;"
>
<el-select
v-model=
"cur_belongChapter"
style=
"width: 347px;"
id=
"editChpterBelong"
@
change
=
"viewEditRulerTeaBelong"
>
<el-select
v-model=
"cur_belongChapter"
style=
"width: 347px;"
id=
"editChpterBelong"
@
blur
=
"viewEditRulerTeaBelong"
>
<el-option
<el-option
v-for=
"item in getData"
v-for=
"item in getData"
:key=
"item.businessId"
:key=
"item.businessId"
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
<div>
<div>
<span
class=
"addCourseContent content-type"
><span
style=
"color: red"
>
*
</span>
内容:
</span>
<span
class=
"addCourseContent content-type"
><span
style=
"color: red"
>
*
</span>
内容:
</span>
<div
style=
"display: inline-block;width: 320px;margin-left: -2px;text-align: left"
>
<div
style=
"display: inline-block;width: 320px;margin-left: -2px;text-align: left"
>
<el-radio-group
v-model=
"curMethodBox"
>
<el-radio-group
@
change=
"viewRulersContent"
v-model=
"curMethodBox"
>
<el-radio
style=
"line-height: 1.8"
label=
"0"
>
视频
</el-radio>
<el-radio
style=
"line-height: 1.8"
label=
"0"
>
视频
</el-radio>
<el-radio
style=
"line-height: 1.8"
label=
"1"
>
音频
</el-radio>
<el-radio
style=
"line-height: 1.8"
label=
"1"
>
音频
</el-radio>
<el-radio
style=
"line-height: 1.8"
label=
"2"
>
PPT
</el-radio>
<el-radio
style=
"line-height: 1.8"
label=
"2"
>
PPT
</el-radio>
...
@@ -262,9 +262,9 @@
...
@@ -262,9 +262,9 @@
<el-button
<el-button
style=
"width: 80px; height: 34px;padding: 10px 20px;margin: 0px 20px"
style=
"width: 80px; height: 34px;padding: 10px 20px;margin: 0px 20px"
:loading=
"submitChapterWait"
:loading=
"submitChapterWait"
:disabled=
"submitChapterWait"
v-show=
"editorCourseSteps == 2"
v-show=
"editorCourseSteps == 2"
type=
"primary"
type=
"primary"
:disabled=
"submitChapterWait"
@
click=
"closePPTDialog"
>
确定
</el-button>
@
click=
"closePPTDialog"
>
确定
</el-button>
<el-button
style=
"width: 92px; height: 34px;padding: 10px 20px;margin: 0px 20px"
v-show=
"editorCourseSteps == 1"
type=
"primary"
@
click=
"confirmEditSect()"
>
下一步
</el-button>
<el-button
style=
"width: 92px; height: 34px;padding: 10px 20px;margin: 0px 20px"
v-show=
"editorCourseSteps == 1"
type=
"primary"
@
click=
"confirmEditSect()"
>
下一步
</el-button>
<el-button
style=
"width: 80px; height: 34px;padding: 10px 20px;margin-right: 20px"
@
click=
"cancleEditSect"
>
取消
</el-button>
<el-button
style=
"width: 80px; height: 34px;padding: 10px 20px;margin-right: 20px"
@
click=
"cancleEditSect"
>
取消
</el-button>
...
@@ -475,8 +475,8 @@
...
@@ -475,8 +475,8 @@
methods
:
{
methods
:
{
// 取消上传
// 取消上传
canceluploadFile
(
e
)
{
canceluploadFile
(
e
)
{
let
that
=
this
this
.
$refs
.
upload
.
abort
();
this
.
$refs
.
upload
.
abort
();
let
that
=
this
that
.
uploadFileName
=
that
.
saveFileNameEditor
that
.
uploadFileName
=
that
.
saveFileNameEditor
if
(
this
.
curMethodBox
!==
this
.
mediaType
)
{
if
(
this
.
curMethodBox
!==
this
.
mediaType
)
{
this
.
videoShow
=
false
this
.
videoShow
=
false
...
@@ -567,6 +567,7 @@
...
@@ -567,6 +567,7 @@
},
},
// ”编辑章“对话框的取消事件方法
// ”编辑章“对话框的取消事件方法
cancleEditChap
()
{
cancleEditChap
()
{
this
.
$refs
.
ChapDialog
.
showDialog
=
false
document
.
getElementById
(
'editChapterTea'
).
style
.
border
=
'1px solid #DCDFE6'
;
document
.
getElementById
(
'editChapterTea'
).
style
.
border
=
'1px solid #DCDFE6'
;
this
.
chapterNameLog
=
false
;
this
.
chapterNameLog
=
false
;
this
.
formClear
();
this
.
formClear
();
...
@@ -796,14 +797,22 @@
...
@@ -796,14 +797,22 @@
if
(
this
.
cur_belongChapter
===
''
){
if
(
this
.
cur_belongChapter
===
''
){
this
.
belongToChapterLog
=
true
this
.
belongToChapterLog
=
true
document
.
getElementById
(
'editChpterBelong'
).
style
.
border
=
'1px solid #F56C6C'
;
document
.
getElementById
(
'editChpterBelong'
).
style
.
border
=
'1px solid #F56C6C'
;
}
else
{
this
.
belongToChapterLog
=
false
}
}
else
{
this
.
belongToChapterLog
=
false
document
.
getElementById
(
'editChpterBelong'
).
style
.
border
=
'1px solid #DCDFE6'
;
}
if
(
this
.
val_curSection
===
''
){
if
(
this
.
val_curSection
===
''
){
this
.
chapterNameLv2Log
=
true
this
.
chapterNameLv2Log
=
true
document
.
getElementById
(
'editChptercontentClass'
).
style
.
border
=
'1px solid #F56C6C'
;
document
.
getElementById
(
'editChptercontentClass'
).
style
.
border
=
'1px solid #F56C6C'
;
}
else
{
this
.
chapterNameLv2Log
=
false
}
}
else
{
this
.
chapterNameLv2Log
=
false
document
.
getElementById
(
'editChptercontentClass'
).
style
.
border
=
'1px solid #DCDFE6'
;
}
if
(
this
.
curMethodBox
===
''
){
if
(
this
.
curMethodBox
===
''
){
this
.
chapterContentLog
=
true
this
.
chapterContentLog
=
true
}
else
{
this
.
chapterContentLog
=
false
}
}
else
{
this
.
chapterContentLog
=
false
}
return
false
return
false
}
else
if
(
this
.
val_curSection
!==
''
)
{
}
else
if
(
this
.
val_curSection
!==
''
)
{
if
(
this
.
curMethodBox
!==
this
.
mediaType
){
if
(
this
.
curMethodBox
!==
this
.
mediaType
){
...
@@ -822,11 +831,6 @@
...
@@ -822,11 +831,6 @@
case
'4'
:
this
.
uploadName
=
'word'
;
break
;
case
'4'
:
this
.
uploadName
=
'word'
;
break
;
// case '4':this.uploadName = '资料包';break;
// case '4':this.uploadName = '资料包';break;
}
}
console
.
log
(
this
.
videoShow
,
this
.
uploadName
,
'zheshivideo'
)
console
.
log
(
this
.
audioShow
,
this
.
uploadName
,
'zheshivideo'
)
console
.
log
(
this
.
pptShow
,
this
.
uploadName
,
'zheshivideo'
)
console
.
log
(
this
.
pdfShow
,
this
.
uploadName
,
'zheshivideo'
)
console
.
log
(
this
.
wordShow
,
this
.
uploadName
,
'zheshivideo'
)
}
else
{
}
else
{
switch
(
parseInt
(
this
.
curMethodBox
))
{
switch
(
parseInt
(
this
.
curMethodBox
))
{
case
0
:
case
0
:
...
@@ -1000,6 +1004,13 @@
...
@@ -1000,6 +1004,13 @@
document
.
getElementById
(
'editChptercontentClass'
).
style
.
border
=
'1px solid #DCDFE6'
;
document
.
getElementById
(
'editChptercontentClass'
).
style
.
border
=
'1px solid #DCDFE6'
;
}
}
},
},
viewRulersContent
(){
if
(
this
.
curMethodBox
===
''
){
this
.
chapterContentLog
=
true
}
else
{
this
.
chapterContentLog
=
false
}
},
// 清空
// 清空
formClear
()
{
formClear
()
{
this
.
val_curChapter
=
''
this
.
val_curChapter
=
''
...
@@ -1042,7 +1053,7 @@
...
@@ -1042,7 +1053,7 @@
_this
.
fullscreenLoading
=
false
_this
.
fullscreenLoading
=
false
if
(
res
.
code
===
400
)
{
if
(
res
.
code
===
400
)
{
_this
.
$message
({
_this
.
$message
({
message
:
'删除失败'
,
message
:
res
.
message
,
type
:
'warning'
,
type
:
'warning'
,
duration
:
0
,
duration
:
0
,
showClose
:
true
showClose
:
true
...
@@ -1068,6 +1079,7 @@
...
@@ -1068,6 +1079,7 @@
this
.
wordShow
=
false
this
.
wordShow
=
false
this
.
pdfShow
=
false
this
.
pdfShow
=
false
this
.
ifEditorCourseContent
=
true
this
.
ifEditorCourseContent
=
true
this
.
saveFileNameEditor
=
''
this
.
editorCourseSteps
=
2
;
this
.
editorCourseSteps
=
2
;
this
.
$refs
.
SectDialog
.
showDialog
=
true
;
this
.
$refs
.
SectDialog
.
showDialog
=
true
;
this
.
postData
.
type
=
this
.
uploadData
[
type
].
typeCode
this
.
postData
.
type
=
this
.
uploadData
[
type
].
typeCode
...
@@ -1184,14 +1196,15 @@
...
@@ -1184,14 +1196,15 @@
},
},
closePPTDialog
()
{
closePPTDialog
()
{
if
(
!
this
.
submitPrevent
)
{
if
(
!
this
.
submitPrevent
)
{
this
.
$message
({
this
.
$message
.
error
({
showClose
:
true
,
type
:
'error'
,
message
:
'文件未上传完成!'
,
message
:
'尚有文件未上传'
,
duration
:
0
,
duration
:
0
,
type
:
'error'
showClose
:
true
});
})
return
false
;
return
false
}
else
{
}
else
{
this
.
submitChapterWait
=
true
this
.
submitChapterWait
=
true
let
addform
=
{
let
addform
=
{
businessId
:
this
.
postData
.
chapterId
,
//编辑节时需传
businessId
:
this
.
postData
.
chapterId
,
//编辑节时需传
...
@@ -1213,16 +1226,11 @@
...
@@ -1213,16 +1226,11 @@
}
}
console
.
log
(
this
.
postData
)
console
.
log
(
this
.
postData
)
this
.
eduUtil
.
ajaxPostUtil
(
this
.
interfaceName
.
addCourseUnit
,
addform
,
res
=>
{
this
.
eduUtil
.
ajaxPostUtil
(
this
.
interfaceName
.
addCourseUnit
,
addform
,
res
=>
{
this
.
uploadLoading
=
true
;
this
.
uploadLoading
=
false
if
(
this
.
uploadProgress
!==
100
)
{
return
false
;
}
else
{
this
.
$message
({
this
.
$message
({
message
:
'保存成功'
,
message
:
'保存成功'
,
duration
:
0
,
type
:
'success'
type
:
'success'
});
});
}
this
.
$refs
.
SectDialog
.
showDialog
=
false
;
this
.
$refs
.
SectDialog
.
showDialog
=
false
;
this
.
submitChapterWait
=
false
this
.
submitChapterWait
=
false
// this.$refs.UploadPPTDialog.showDialog = false
// this.$refs.UploadPPTDialog.showDialog = false
...
@@ -1244,9 +1252,9 @@
...
@@ -1244,9 +1252,9 @@
this
.
uploadStatus
=
0
;
this
.
uploadStatus
=
0
;
this
.
uploadProgress
=
0
;
this
.
uploadProgress
=
0
;
let
fileSuf
=
file
.
name
.
split
(
'.'
).
splice
(
-
1
)[
0
]
let
fileSuf
=
file
.
name
.
split
(
'.'
).
splice
(
-
1
)[
0
]
if
(
this
.
postData
.
type
===
'0'
&&
fileSuf
!==
'mp4'
&&
fileSuf
!==
'rmvb'
&&
fileSuf
!==
'avi'
)
{
if
(
this
.
postData
.
type
===
'0'
&&
fileSuf
!==
'mp4'
)
{
this
.
$message
({
this
.
$message
({
message
:
'文件格式不正确!应为.mp4
/.avi/.rmvb
'
,
message
:
'文件格式不正确!应为.mp4'
,
type
:
'error'
,
type
:
'error'
,
duration
:
0
,
duration
:
0
,
showClose
:
true
showClose
:
true
...
@@ -1309,6 +1317,7 @@
...
@@ -1309,6 +1317,7 @@
})
})
return
false
return
false
}
else
{
}
else
{
this
.
uploadProgress
=
0
this
.
uploadFileName
=
''
this
.
uploadFileName
=
''
this
.
postData
.
file
=
file
this
.
postData
.
file
=
file
this
.
uploadProPrvent
=
true
this
.
uploadProPrvent
=
true
...
@@ -1476,7 +1485,7 @@
...
@@ -1476,7 +1485,7 @@
let
that
=
this
let
that
=
this
console
.
log
(
res
,
'上传成功结果'
)
console
.
log
(
res
,
'上传成功结果'
)
// that.uploadLoading = true
// that.uploadLoading = true
that
.
showProgress
=
true
;
that
.
showProgress
=
true
that
.
videoUrl
=
decodeURIComponent
(
res
.
data
.
url
)
that
.
videoUrl
=
decodeURIComponent
(
res
.
data
.
url
)
console
.
log
(
this
.
postData
.
type
)
console
.
log
(
this
.
postData
.
type
)
if
(
res
.
code
===
'M0000'
){
if
(
res
.
code
===
'M0000'
){
...
@@ -1484,16 +1493,17 @@
...
@@ -1484,16 +1493,17 @@
this
.
uploadFileName
=
res
.
data
.
originalName
this
.
uploadFileName
=
res
.
data
.
originalName
that
.
uploadFileSize
=
res
.
data
.
fileSize
;
that
.
uploadFileSize
=
res
.
data
.
fileSize
;
// this.$refs.UploadPPTDialog.showDialog = true;
// this.$refs.UploadPPTDialog.showDialog = true;
if
(
that
.
postData
.
type
===
'0'
||
that
.
postData
.
type
===
'1'
){
if
(
that
.
postData
.
type
===
'0'
||
that
.
postData
.
type
===
'1'
){
that
.
videoUrl
=
decodeURIComponent
(
res
.
data
.
url
);
that
.
videoUrl
=
decodeURIComponent
(
res
.
data
.
url
);
}
}
// if(res.data.type !=='4'){
// if(res.data.type !=='4'){
if
(
that
.
postData
.
type
!==
'0'
&&
that
.
postData
.
type
!==
'1'
)
{
if
(
that
.
postData
.
type
!==
'0'
&&
that
.
postData
.
type
!==
'1'
)
{
let
temp
=
{
let
temp
=
{
videoUrl
:
decodeURIComponent
(
res
.
data
.
url
),
videoUrl
:
decodeURIComponent
(
res
.
data
.
url
),
type
:
that
.
postData
.
type
,
type
:
that
.
postData
.
type
,
lessonId
:
that
.
slId
lessonId
:
that
.
slId
}
;
}
that
.
getReadyUrl
(
temp
).
then
(
res
=>
{
that
.
getReadyUrl
(
temp
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
that
.
urlCorss
=
res
.
data
;
that
.
urlCorss
=
res
.
data
;
...
@@ -1510,17 +1520,15 @@
...
@@ -1510,17 +1520,15 @@
that
.
submitPrevent
=
true
that
.
submitPrevent
=
true
that
.
isNotUploading
=
true
that
.
isNotUploading
=
true
},
800
)
},
800
)
}
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
that
.
isNotUploading
=
true
that
.
isNotUploading
=
true
that
.
editoruplaodLoading
=
false
that
.
editoruplaodLoading
=
false
})
})
}
}
// that.videoUrl = decodeURIComponent(res.data.url);
// }
// }
// that.uploadFileName = res.data.originalName;
// that.uploadFileSize = res.data.fileSize;
if
(
res
.
data
.
fileSize
===
'undefind'
){
if
(
res
.
data
.
fileSize
===
'undefind'
){
that
.
uploadFileSize
=
''
that
.
uploadFileSize
=
''
}
}
...
@@ -1560,32 +1568,19 @@
...
@@ -1560,32 +1568,19 @@
that
.
wordShow
=
true
;
that
.
wordShow
=
true
;
break
;
break
;
}
}
// this.resetUpload();
// this.postData = {
// type: '',
// // chapterId: '',
// // slId: '',
// file: ''
// }
$
(
'#upload-btn'
).
val
(
''
)
$
(
'#upload-btn'
).
val
(
''
)
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
'上传失败'
,
message
:
'上传失败'
,
type
:
'warning'
,
type
:
'warning'
,
duration
:
0
,
showClose
:
true
,
showClose
:
true
,
});
});
that
.
uploadStatus
=
2
;
that
.
uploadStatus
=
2
;
that
.
isNotUploading
=
true
that
.
isNotUploading
=
true
that
.
editoruplaodLoading
=
false
that
.
editoruplaodLoading
=
false
}
}
// }, err => {
// this.uploadLoading = false
// this.$notify({
// title: '失败',
// message: '网络错误',
// type: 'error'
// })
// })
},
},
// 回显函数
// 回显函数
getChapterCatalogList
(){
getChapterCatalogList
(){
...
@@ -1597,6 +1592,8 @@
...
@@ -1597,6 +1592,8 @@
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
$this
.
returnCatalogData
=
res
.
data
.
chapterList
;
$this
.
returnCatalogData
=
res
.
data
.
chapterList
;
$this
.
$emit
(
'refreshChapterList'
)
$this
.
$emit
(
'refreshChapterList'
)
console
.
log
(
$this
.
returnCatalogData
)
console
.
log
(
'88888888888888888888888'
)
$this
.
chapterLoading
=
false
;
$this
.
chapterLoading
=
false
;
}
}
},
function
(
err
){
},
function
(
err
){
...
@@ -1619,7 +1616,7 @@
...
@@ -1619,7 +1616,7 @@
console
.
log
(
event
.
percent
,
'上传进度调试'
)
console
.
log
(
event
.
percent
,
'上传进度调试'
)
let
that
=
this
let
that
=
this
// console.log(parseInt(event.percent),'进度')
// console.log(parseInt(event.percent),'进度')
if
(
parseInt
(
event
.
percent
)
>=
99
){
if
(
parseInt
(
event
.
percent
)
>=
99
){
this
.
uploadProgress
=
99
;
this
.
uploadProgress
=
99
;
}
else
{
}
else
{
this
.
uploadProgress
=
parseInt
(
event
.
percent
)
this
.
uploadProgress
=
parseInt
(
event
.
percent
)
...
@@ -1741,13 +1738,18 @@
...
@@ -1741,13 +1738,18 @@
}
}
}
}
},
},
editorUploadType
(){
editorUploadType
()
{
switch
(
this
.
postData
.
type
)
{
switch
(
this
.
curMethodBox
===
''
?
this
.
postData
.
type
:
this
.
curMethodBox
)
{
case
"0"
:
return
'.mp4'
;
case
"0"
:
case
"1"
:
return
'.mp3'
;
return
'.mp4'
;
case
"2"
:
return
'.ppt/pptx'
;
case
"1"
:
case
"3"
:
return
'.pdf'
;
return
'.mp3'
;
case
"4"
:
return
'.doc/docx'
;
case
"2"
:
return
'.ppt/pptx'
;
case
"3"
:
return
'.pdf'
;
case
"4"
:
return
'.doc/docx'
;
// case "4":return '.rar/.zip';break;
// case "4":return '.rar/.zip';break;
}
}
},
},
...
@@ -1782,7 +1784,7 @@
...
@@ -1782,7 +1784,7 @@
},
},
filters
:{
filters
:{
//
处理文件名的长度,防止文件名过长而自动换行
//处理文件名的长度,防止文件名过长而自动换行
dealWithByFileNameLen
(
value
,
length
){
dealWithByFileNameLen
(
value
,
length
){
if
(
typeof
value
!==
'string'
)
if
(
typeof
value
!==
'string'
)
value
+=
''
value
+=
''
...
@@ -1800,7 +1802,6 @@
...
@@ -1800,7 +1802,6 @@
for
(
let
i
=
0
,
n
=
value
.
length
;
i
<
n
;
i
++
)
{
for
(
let
i
=
0
,
n
=
value
.
length
;
i
<
n
;
i
++
)
{
let
single
=
value
.
charCodeAt
(
i
);
let
single
=
value
.
charCodeAt
(
i
);
bytesCount
+=
((
single
>=
0x0001
&&
single
<=
0x007e
)
||
(
0xff60
<=
single
&&
single
<=
0xff9f
))
?
1
:
2
;
bytesCount
+=
((
single
>=
0x0001
&&
single
<=
0x007e
)
||
(
0xff60
<=
single
&&
single
<=
0xff9f
))
?
1
:
2
;
debugger
}
}
if
(
bytesCount
<=
length
*
2
)
{
if
(
bytesCount
<=
length
*
2
)
{
return
value
return
value
...
...
src/views/courseTrain/onlineCourseNew/ChapterListTea.vue
View file @
7f9a8a5b
<
template
>
<
template
>
<div
v-loading
.
body=
"loading"
id=
"chapterListTea"
class=
"chapterListTea"
>
<div
v-loading
.
body=
"loading"
id=
"chapterListTea"
class=
"chapterListTea"
>
<div
style=
"text-align: left"
>
<div
style=
"text-align: left"
>
<!--
<span
class=
"chapterSwitchBtn"
>
-->
<!--
<label>
-->
<!--
<el-switch
v-model=
"chapterAllSwtich"
on-text=
""
off-text=
""
on-color=
"#13ce66"
off-color=
"#707070"
@
change=
"switchAllChapter"
></el-switch>
-->
<!-- 打开全部-->
<!--
</label>
-->
<!--
</span>
-->
<a
@
click=
"addCourseChapter"
class=
"tabs-addChapter"
@
mouseover=
"blueShow"
@
mouseout=
"blueHide"
>
<a
@
click=
"addCourseChapter"
class=
"tabs-addChapter"
@
mouseover=
"blueShow"
@
mouseout=
"blueHide"
>
<img
:src=
"isShow === true ? eleUrl.url : eleUrl.no_url"
style=
"position: relative;top: -1px;"
>
添加章
</a>
<img
:src=
"isShow === true ? eleUrl.url : eleUrl.no_url"
style=
"position: relative;top: -1px;"
>
添加章
</a>
<a
@
click=
"setSectionFlag"
class=
"tabs-addSection"
@
mouseover=
"blueJShow"
@
mouseout=
"blueJHide"
>
<a
@
click=
"setSectionFlag"
class=
"tabs-addSection"
@
mouseover=
"blueJShow"
@
mouseout=
"blueJHide"
>
<img
:src=
"isJShow === true ? eleUrl.url:eleUrl.no_url"
style=
"position: relative;top: -1px;"
>
添加节
</a>
<img
:src=
"isJShow === true ? eleUrl.url:eleUrl.no_url"
style=
"position: relative;top: -1px;"
>
添加节
</a>
<span
style=
"color:#999999;margin-left: 14px;margin-top: 10px"
><img
src=
"@/assets/image/icon-question.png"
style=
"margin-right: 9px;width: 20px;height: 20px;margin-top: -4px;"
/>
一小节对应一个课时
</span>
<span
style=
"color:#999999;margin-left: 14px;margin-top: 10px"
><img
src=
"@/assets/image/icon-question.png"
style=
"margin-right: 9px;width: 20px;height: 20px;margin-top: -4px;"
/>
一小节对应一个课时
</span>
<!--
<a
@
click=
"showExportDialog"
v-show=
"isSelected==2"
class=
"tabs-addSection"
><img
src=
"../../static/images/export.png"
style=
"position: relative;top: -1px;"
>
导出作业
</a>
-->
<!--
<edu-button
btnType=
"main-btn"
btnValue=
"导出作业"
@
clicked=
"showExportDialog"
v-show=
"isSelected==2"
class=
"export"
></edu-button>
-->
<!--
<edu-button
btnType=
"main-btn"
btnValue=
"刷新"
@
clicked=
"refreshScoreList"
v-show=
"isSelected==2"
style=
"width: 106px !important;"
class=
"refurbish"
></edu-button>
-->
<!--
<edu-button
btnType=
"main-btn"
btnValue=
"刷新"
@
click=
""
v-show=
"isSelected==2"
style=
"width: 106px !important;"
class=
"refurbish"
></edu-button>
-->
<!--
<a
class=
"classContrast"
style=
"cursor: default;color:#FF0000;"
>
还差
{{
needClassHours
}}
学时与预设总学时一致
</a>
-->
<!--
<a
class=
"classContrast"
style=
"cursor: default;color: green;"
>
当前课时已满足预设总学时
</a>
-->
</div>
</div>
<!-- 添加章节 弹出框-->
<!-- 添加章节 弹出框-->
<div
class=
"addCourseWrap"
>
<div
class=
"addCourseWrap"
>
...
...
src/views/courseTrain/onlineCourseNew/components/EduPdf.vue
View file @
7f9a8a5b
<
template
>
<
template
>
<div
class=
"pdf-container"
>
<div
class=
"pdf-container"
>
<div
class=
"tool-bar"
>
<a
class=
"resize"
@
click=
"changePage('after')"
>
下一页
</a>
<input
@
keyup
.
enter=
"toPage"
@
blur=
"toPage"
onkeypress=
"return event.keyCode>=48&&event.keyCode
<
=
57
"
ng-pattern=
"/[^a-zA-Z]/"
v-model=
"page"
>
/
{{
numPages
}}
<a
class=
"resize"
style=
"float:left"
@
click=
"changePage('before')"
>
上一页
</a>
<!--
<a
class=
"aRotate"
@
click=
"rotate += 90"
>
⟳
</a>
-->
<!--
<a
class=
"aRotate"
@
click=
"rotate -= 90"
>
⟲
</a>
-->
</div>
<div
class=
"pdf"
>
<div
class=
"pdf"
>
<div
class=
"pdfList"
>
<div
class=
"pdfList"
>
<pdf
<pdf
...
@@ -18,96 +11,116 @@
...
@@ -18,96 +11,116 @@
></pdf>
></pdf>
</div>
</div>
</div>
</div>
<div
class=
"tool-bar"
v-show=
"isPdfShow"
>
<a
class=
"resize"
style=
"float:left"
@
click=
"changePage('before')"
>
上一页
</a>
<input
@
keyup
.
enter=
"toPage"
@
blur=
"toPage"
onkeypress=
"return event.keyCode>=48&&event.keyCode
<
=
57
"
ng-pattern=
"/[^a-zA-Z]/"
v-model=
"page"
>
/
{{
numPages
}}
<a
class=
"resize"
@
click=
"changePage('after')"
>
下一页
</a>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
pdf
from
'vue-pdf'
;
import
pdf
from
'vue-pdf'
import
$
from
'jquery'
;
export
default
{
export
default
{
components
:
{
components
:
{
pdf
:
pdf
pdf
:
pdf
},
},
data
()
{
data
()
{
return
{
return
{
src
:
''
,
src
:
""
,
numPages
:
undefined
,
numPages
:
undefined
,
page
:
1
,
page
:
1
,
rotate
:
0
,
rotate
:
0
,
pageArr
:
[
1
]
pageArr
:[
1
],
isPdfShow
:
false
}
;
}
},
},
props
:
[
'pdfSrc'
],
props
:
[
'pdfSrc'
,
'isShowTools'
],
methods
:
{
methods
:
{
// handleInput(e){
// handleInput(e){
// this.page=parseInt(e.target.value.replace(/[^\d]/g,''));
// this.page=parseInt(e.target.value.replace(/[^\d]/g,''));
// },
// },
changePage
(
params
)
{
changePage
(
params
)
{
if
(
params
===
'before'
)
{
if
(
params
===
'before'
)
{
this
.
page
=
this
.
page
-
1
>
0
?
(
this
.
page
-
1
)
:
1
;
this
.
page
=
this
.
page
-
1
>
0
?(
this
.
page
-
1
):
1
}
else
{
}
else
{
this
.
page
=
this
.
page
+
1
>
this
.
numPages
?
this
.
numPages
:
(
this
.
page
+
1
);
this
.
page
=
this
.
page
+
1
>
this
.
numPages
?
this
.
numPages
:(
this
.
page
+
1
)
}
}
},
},
toPage
()
{
toPage
(){
cons
t
newPage
=
parseInt
(
this
.
page
);
le
t
newPage
=
parseInt
(
this
.
page
);
if
(
newPage
<
1
||
$
.
trim
(
this
.
page
)
==
''
)
{
if
(
newPage
<
1
||
$
.
trim
(
this
.
page
)
==
""
)
{
console
.
log
(
'toPage-----------<1'
);
console
.
log
(
"toPage-----------<1"
);
this
.
page
=
1
;
this
.
page
=
1
;
}
}
if
(
newPage
>
this
.
numPages
)
{
if
(
newPage
>
this
.
numPages
)
{
console
.
log
(
'toPage----------->total'
);
console
.
log
(
"toPage----------->total"
);
this
.
page
=
this
.
numPages
;
this
.
page
=
this
.
numPages
;
}
}
},
},
toLittle
()
{
toLittle
(){
cons
t
cW
=
$
(
'.pdf-container'
).
width
();
le
t
cW
=
$
(
'.pdf-container'
).
width
();
cons
t
cH
=
$
(
'.pdf-container'
).
height
();
le
t
cH
=
$
(
'.pdf-container'
).
height
();
cons
t
pW
=
$
(
'.pdfList'
).
width
();
le
t
pW
=
$
(
'.pdfList'
).
width
();
cons
t
pH
=
$
(
'.pdfList'
).
height
();
le
t
pH
=
$
(
'.pdfList'
).
height
();
if
(
pW
*
5
/
6
<
cW
*
0.01
||
(
pH
*
5
/
6
/
this
.
numPages
)
<
cH
*
0.01
)
{
if
(
pW
*
5
/
6
<
cW
*
0.01
||
(
pH
*
5
/
6
/
this
.
numPages
)
<
cH
*
0.01
)
{
return
;
return
;
}
}
// let newW = pW*5/6
<
cW
*
0.3
?
cW
*
0.3
:
pW
*
5
/
6
;
// let newW = pW*5/6
<
cW
*
0.3
?
cW
*
0.3
:
pW
*
5
/
6
;
// let newH = (pH*5/6/this.numPages)
<
cH
*
0.3
?
cH
*
0.3
*
this
.
numPages
:
pH
*
5
/
6
;
// let newH = (pH*5/6/this.numPages)
<
cH
*
0.3
?
cH
*
0.3
*
this
.
numPages
:
pH
*
5
/
6
;
const
newW
=
pW
*
5
/
6
;
let
newW
=
pW
*
5
/
6
;
const
newH
=
pH
*
5
/
6
;
let
newH
=
pH
*
5
/
6
;
$
(
'.pdfList'
).
width
(
newW
);
$
(
'.pdfList'
).
width
(
newW
);
$
(
'.pdfList'
).
height
(
newH
);
$
(
'.pdfList'
).
height
(
newH
);
},
},
toBig
()
{
toBig
(){
cons
t
cW
=
$
(
'.pdf-container'
).
width
();
le
t
cW
=
$
(
'.pdf-container'
).
width
();
cons
t
cH
=
$
(
'.pdf-container'
).
height
();
le
t
cH
=
$
(
'.pdf-container'
).
height
();
cons
t
pW
=
$
(
'.pdfList'
).
width
();
le
t
pW
=
$
(
'.pdfList'
).
width
();
cons
t
pH
=
$
(
'.pdfList'
).
height
();
le
t
pH
=
$
(
'.pdfList'
).
height
();
let
newW
,
newH
;
let
newW
,
newH
;
if
(
pW
*
6
/
5
>
cW
&&
(
pH
*
6
/
5
/
this
.
numPages
)
>
cH
)
{
if
(
pW
*
6
/
5
>
cW
&&
(
pH
*
6
/
5
/
this
.
numPages
)
>
cH
)
{
return
;
return
;
}
}
// newW = pW*6/5>cW?cW:pW*6/5;
// newW = pW*6/5>cW?cW:pW*6/5;
// newH = (pH*6/5/this.numPages)>cH?cH*this.numPages:pH*6/5;
// newH = (pH*6/5/this.numPages)>cH?cH*this.numPages:pH*6/5;
newW
=
pW
*
6
/
5
;
newW
=
pW
*
6
/
5
;
newH
=
pH
*
6
/
5
;
newH
=
pH
*
6
/
5
;
$
(
'.pdfList'
).
width
(
newW
);
$
(
'.pdfList'
).
width
(
newW
);
$
(
'.pdfList'
).
height
(
newH
);
$
(
'.pdfList'
).
height
(
newH
);
},
delHide
()
{
this
.
isPdfShow
=
false
},
delShow
()
{
this
.
isPdfShow
=
true
}
}
},
},
beforeMount
()
{
beforeMount
(){
this
.
src
=
pdf
.
createLoadingTask
(
this
.
pdfSrc
)
;
this
.
src
=
pdf
.
createLoadingTask
(
this
.
pdfSrc
)
// this.src = 'https://cdn.mozilla.net/pdfjs/tracemonkey.pdf'
// this.src = 'https://cdn.mozilla.net/pdfjs/tracemonkey.pdf'
},
},
mounted
()
{
mounted
()
{
cons
t
that
=
this
;
le
t
that
=
this
;
this
.
src
.
then
(
pdf
=>
{
this
.
src
.
then
(
pdf
=>
{
that
.
numPages
=
pdf
.
numPages
;
that
.
numPages
=
pdf
.
numPages
;
// $('.pdf').onscroll(this.onScroll);
// $('.pdf').onscroll(this.onScroll);
});
})
},
watch
:{
isShowTools
(){
if
(
this
.
isShowTools
){
this
.
delShow
()
}
else
{
this
.
delHide
()
}
}
}
}
}
;
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.pdf-container
{
.pdf-container
{
...
@@ -119,11 +132,13 @@
...
@@ -119,11 +132,13 @@
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.tool-bar
{
.tool-bar
{
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
width
:
100%
;
background
:
rgb
(
50
,
54
,
5
7
);
background
:
rgb
a
(
43
,
51
,
63
,
0.
7
);
height
:
48
px
;
height
:
30
px
;
line-height
:
48
px
;
line-height
:
30
px
;
box-shadow
:
0
2px
6px
0
rgb
(
50
,
54
,
57
);
/*box-shadow: 0 2px 6px 0 rgb(50, 54, 57);*/
color
:
rgb
(
241
,
241
,
241
);
color
:
rgb
(
241
,
241
,
241
);
text-align
:
center
;
text-align
:
center
;
font-size
:
13px
;
font-size
:
13px
;
...
@@ -150,14 +165,15 @@
...
@@ -150,14 +165,15 @@
.pdfList
{
.pdfList
{
display
:
inline-block
;
display
:
inline-block
;
margin-top
:
20px
;
margin-top
:
23px
;
margin-bottom
:
23px
;
width
:
60%
;
width
:
60%
;
}
}
.pdfList
div
{
.pdfList
div
{
background
:
#fff
;
background
:
#fff
;
border-radius
:
5px
;
border-radius
:
5px
;
margin-top
:
5
px
;
margin-top
:
3
px
;
margin-bottom
:
10px
;
/*margin-bottom: 10px;*/
box-shadow
:
1px
4px
10px
2px
rgb
(
50
,
54
,
57
);
box-shadow
:
1px
4px
10px
2px
rgb
(
50
,
54
,
57
);
}
}
.aRotate
{
.aRotate
{
...
@@ -168,7 +184,7 @@
...
@@ -168,7 +184,7 @@
.resize
{
.resize
{
font-size
:
25px
;
font-size
:
25px
;
float
:
right
;
float
:
right
;
margin
-right
:
15px
;
margin
:
0
15px
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.pdf
{
.pdf
{
...
...
src/views/courseTrain/sortManage.vue
View file @
7f9a8a5b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<a-alert
:message=
successInfor
v-if=
"showSuccess"
type=
"success"
showIcon
/>
<a-alert
:message=
successInfor
v-if=
"showSuccess"
type=
"success"
showIcon
/>
<a-alert
:message=
failInfor
v-if=
"showFail"
type=
"error"
showIcon
closable
/>
<a-alert
:message=
failInfor
v-if=
"showFail"
type=
"error"
showIcon
closable
/>
</div>
</div>
<div
style=
"height:
666px
"
>
<div
style=
"height:
88vh
"
>
<div
class=
"sortManageMenu"
>
<div
class=
"sortManageMenu"
>
<div
style=
"display: inline-block"
>
<div
style=
"display: inline-block"
>
<span
class=
"allCategory"
>
全部分类
</span>
<span
class=
"allCategory"
>
全部分类
</span>
...
...
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