mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
从系统选择封面
This commit is contained in:
@@ -73,7 +73,10 @@
|
||||
<!--不显示,因为标题已经代表了 <el-form-item label="授课方式">{{courseTypeMap(params.type)}}</el-form-item>-->
|
||||
<el-form-item label="封面图片" required >
|
||||
<el-col :span="8">
|
||||
<imageUpload :value="courseCoverurl" width="160px" height="90px" @success="uploadCoverImgSuccess" @remove="removeCoverImgSuccess"></imageUpload>
|
||||
<div @click.stop="chooseFile">
|
||||
<imageUpload :disabled="true" :value="courseCoverurl" width="160px" height="90px" @subimage="acceptimage" @success="uploadCoverImgSuccess" @remove="removeCoverImgSuccess"></imageUpload>
|
||||
|
||||
</div>
|
||||
<div>上传为16:9(如:800*450)的png或jpg图片</div>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
@@ -250,6 +253,8 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -277,6 +282,7 @@ import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
import hyperLink from '@/components/Course/hyperLink.vue';
|
||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||
import filecloud from '@/components/FileCloud/index.vue';
|
||||
export default {
|
||||
name:"auditCourse2",
|
||||
components: {
|
||||
@@ -284,6 +290,7 @@ export default {
|
||||
catalogCourseware,
|
||||
imageUpload,
|
||||
exam,
|
||||
filecloud,
|
||||
homework,
|
||||
assess,
|
||||
WxEditor,
|
||||
@@ -315,6 +322,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dlgFileChoose:{
|
||||
show:false
|
||||
},
|
||||
converStatus:4,
|
||||
curriculumData:{
|
||||
url:'',
|
||||
@@ -391,6 +401,26 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
chooseFile(){
|
||||
this.dlgFileChoose.show=true;
|
||||
},
|
||||
choseChoose(){
|
||||
this.dlgFileChoose.show=false;
|
||||
},
|
||||
changeCourseImage(img){
|
||||
if(!img.path){
|
||||
return;
|
||||
}
|
||||
//console.log(img);
|
||||
this.dlgFileChoose.show=false;
|
||||
this.courseInfo.coverImg = img.path;
|
||||
this.courseCoverurl = this.fileUrl+img.path;
|
||||
},
|
||||
acceptimage(value){
|
||||
this.courseInfo.coverImg = value.path;
|
||||
this.courseCoverurl = value.path;
|
||||
},
|
||||
...mapActions({
|
||||
getResOwnerTree:'resOwner/getResOwnerTree',
|
||||
loadResOwners:'resOwner/loadResOwners',
|
||||
|
||||
Reference in New Issue
Block a user