提交 929245b2 编写于 作者: guangjun.yang's avatar guangjun.yang

按钮不显示

上级 e6976425
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
ref="testDialogRef" ref="testDialogRef"
title="上传课程" title="上传课程"
:visible="dialogVisible" :visible="dialogVisible"
@close="close" @close="backToOrgCourse"
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: 480px; width: 520px;
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;
......
...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册