Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
929245b2
提交
929245b2
编写于
6月 24, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
按钮不显示
上级
e6976425
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
32 行增加
和
5 行删除
+32
-5
edit-course-dialog.vue
...mponents/education/custom-resource/edit-course-dialog.vue
+29
-5
qiniu-util.js
src/utils/qiniu-util.js
+3
-0
未找到文件。
src/components/education/custom-resource/edit-course-dialog.vue
浏览文件 @
929245b2
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
ref=
"testDialogRef"
ref=
"testDialogRef"
title=
"上传课程"
title=
"上传课程"
:visible=
"dialogVisible"
:visible=
"dialogVisible"
@
close=
"
clo
se"
@
close=
"
backToOrgCour
se"
center
center
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
:close-on-press-escape=
"false"
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
<el-form-item
label=
"课程视频:"
prop=
"range"
class=
"valid-msg"
>
<el-form-item
label=
"课程视频:"
prop=
"range"
class=
"valid-msg"
>
<el-upload
<el-upload
class=
"upload-video"
class=
"upload-video"
:class=
"
{'disabled': needShowUploadProcess || (formData.courseCustomChapterModels[0].courseCustomLectureModelList.length >= orgCourseInfo.limitModel.maxLimitVideoCount)}"
action="#"
action="#"
:before-upload="beforeUploadVideo"
:before-upload="beforeUploadVideo"
:limit="3"
:limit="3"
...
@@ -124,10 +125,14 @@
...
@@ -124,10 +125,14 @@
<span>
{{
formData
.
courseCustomChapterModels
[
0
].
courseCustomLectureModelList
[
index
].
nameCheck
}}
</span>
<span>
{{
formData
.
courseCustomChapterModels
[
0
].
courseCustomLectureModelList
[
index
].
nameCheck
}}
</span>
</div>
</div>
</li>
</li>
<
span
v-show=
"needShowUploadProcess"
class=
"upload-process"
:style=
"
{'width': (uploadProgress/100 * 340) + 'px'}">
</span
>
<
!--
<span
v-show=
"needShowUploadProcess"
class=
"upload-process"
:style=
"
{'width': (uploadProgress/100 * 340) + 'px'}">
</span>
--
>
</ul>
</ul>
<div
style=
"color:red;position:absolute;top:60px;"
v-if=
"noLecture && !formData.courseCustomChapterModels[0].courseCustomLectureModelList.length"
>
请上传课程视频
</div>
<div
style=
"color:red;position:absolute;top:60px;"
v-if=
"noLecture && !formData.courseCustomChapterModels[0].courseCustomLectureModelList.length"
>
请上传课程视频
</div>
<span
v-if=
"!formData.courseCustomChapterModels[0].courseCustomLectureModelList.length"
v-show=
"needShowUploadProcess"
class=
"upload-process"
:style=
"
{'width': (uploadProgress/100 * 340) + 'px'}">
</span>
<!--
<span
v-if=
"!formData.courseCustomChapterModels[0].courseCustomLectureModelList.length"
v-show=
"needShowUploadProcess"
class=
"upload-process"
:style=
"
{'width': (uploadProgress/100 * 340) + 'px'}">
</span>
-->
<div
v-show=
"needShowUploadProcess"
style=
"position:absolute;top:10px;left:90px;display:flex;width: 380px"
>
<div
style=
"width:360px"
><span
class=
"upload-process"
:style=
"
{'width': (uploadProgress/100 * 340) + 'px'}">
</span></div>
<img
@
click=
"cancleUpload"
style=
"widht:16px;height:16px;margin-top:3px;margin-left:8px;"
src=
"../../../assets/image/phrase3/close.png"
/>
</div>
</div>
</div>
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
...
@@ -493,6 +498,15 @@ export default {
...
@@ -493,6 +498,15 @@ export default {
methods
:
{
methods
:
{
...
mapActions
([
'setKind'
]),
...
mapActions
([
'setKind'
]),
cancleUpload
()
{
console
.
log
(
'1'
)
if
(
window
.
QNSubscription
)
{
console
.
log
(
'2'
)
window
.
QNSubscription
.
unsubscribe
();
window
.
QNSubscription
=
null
;
}
},
querySearch
(
queryString
,
cb
)
{
querySearch
(
queryString
,
cb
)
{
// this.doctorNameList;
// this.doctorNameList;
let
doctorNameList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
doctorNameList
));
let
doctorNameList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
doctorNameList
));
...
@@ -660,7 +674,7 @@ export default {
...
@@ -660,7 +674,7 @@ export default {
console
.
log
(
file
);
console
.
log
(
file
);
const
isMP4
=
file
.
type
===
"video/mp4"
;
const
isMP4
=
file
.
type
===
"video/mp4"
;
const
isGt
=
file
.
size
>
this
.
orgCourseInfo
.
limitModel
.
maxLimitOneVideoSize
;
const
isGt
=
file
.
size
>
this
.
orgCourseInfo
.
limitModel
.
maxLimitOneVideoSize
;
const
isGtMaxNum
=
this
.
formData
.
courseCustomChapterModels
[
0
].
courseCustomLectureModelList
.
length
>=
this
.
orgCourseInfo
.
limitModel
.
maxLimitVideoCount
;
const
isGtMaxNum
=
this
.
formData
.
courseCustomChapterModels
[
0
].
courseCustomLectureModelList
.
length
>=
100
;
const
usedGtMaxStore
=
this
.
orgCourseInfo
.
limitModel
.
usedStorageSpace
+
file
.
size
>
this
.
orgCourseInfo
.
limitModel
.
maxStorageSpace
;
const
usedGtMaxStore
=
this
.
orgCourseInfo
.
limitModel
.
usedStorageSpace
+
file
.
size
>
this
.
orgCourseInfo
.
limitModel
.
maxStorageSpace
;
if
(
isGtMaxNum
||
!
isMP4
)
{
if
(
isGtMaxNum
||
!
isMP4
)
{
this
.
$message
.
error
(
"视频不符合规范,请根据规范上传视频"
);
this
.
$message
.
error
(
"视频不符合规范,请根据规范上传视频"
);
...
@@ -769,6 +783,7 @@ export default {
...
@@ -769,6 +783,7 @@ export default {
// 返回到课程选择页面(kind = 3)
// 返回到课程选择页面(kind = 3)
backToOrgCourse
()
{
backToOrgCourse
()
{
console
.
log
(
'backToOrgCourse'
);
this
.
close
();
this
.
close
();
this
.
setKind
(
3
);
this
.
setKind
(
3
);
},
},
...
@@ -915,7 +930,7 @@ export default {
...
@@ -915,7 +930,7 @@ export default {
}
}
.custom-list
{
.custom-list
{
// width: 100%;
// width: 100%;
width
:
48
0px
;
width
:
52
0px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
border-radius
:
3px
;
border-radius
:
3px
;
...
@@ -1109,6 +1124,15 @@ export default {
...
@@ -1109,6 +1124,15 @@ export default {
background
:
#449284
;
background
:
#449284
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.upload-video.disabled
{
.el-button--primary
{
color
:
#bcbec2
!
important
;
background-color
:
#f4f4f5
!
important
;
border-color
:
#e9e9eb
!
important
;
cursor
:
not
-
allowed
!
important
;
}
// color: red;
}
}
}
.course-content-step2
{
.course-content-step2
{
display
:
flex
;
display
:
flex
;
...
...
src/utils/qiniu-util.js
浏览文件 @
929245b2
...
@@ -260,6 +260,8 @@ export const qiniuUpload = (self, file, filePath, previewId, progressId) => {
...
@@ -260,6 +260,8 @@ export const qiniuUpload = (self, file, filePath, previewId, progressId) => {
});
});
console
.
log
(
22222
);
window
.
QNSubscription
=
subscription
;
// return deferred.promise;
// return deferred.promise;
...
@@ -495,6 +497,7 @@ export const doUpload = (self, file, filePath, previewId, progressId, fileType)
...
@@ -495,6 +497,7 @@ export const doUpload = (self, file, filePath, previewId, progressId, fileType)
});
});
console
.
log
(
33333
);
window
.
QNSubscription
=
subscription
;
window
.
QNSubscription
=
subscription
;
// return deferred.promise;
// return deferred.promise;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录