Commit e7166801 authored by zhengke's avatar zhengke

增加课程

parent 44388bb5
......@@ -11,7 +11,7 @@ export default {
</script>
<style>
@import "//at.alicdn.com/t/font_1769104_vde3fa04tor.css";
@import "//at.alicdn.com/t/font_1769104_8xxy5gj3qzr.css";
@import "./assets/css/common.css";
@import "./assets/css/zkcss.css";
html,
......
......@@ -10,6 +10,7 @@
<div class="TabDiv">
<span :class="commonType==1?'spanActive':''" @click="handleClick(1)">图片</span>
<span :class="commonType==2?'spanActive':''" @click="handleClick(2)">视频</span>
<span :class="commonType==3?'spanActive':''" @click="handleClick(3)">其他</span>
</div>
<div>
<div style="height: 718px;" flex="box:first">
......@@ -132,6 +133,42 @@
</div>
</el-tooltip>
</template>
<template v-if="PageMsg.Type==3">
<div class="material-item material-upload">
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<el-upload class="avatar-uploader" action=""
accept="video/mp4,video/ogg,video/webm" :show-file-list="false" :http-request="UploadpdfFile"
multiple>
<i class="el-icon-upload"></i>
</el-upload>
</div>
</div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark"
:content="item.Name" placement="top-start">
<div @click="PageSelect(item,index)" :class="item.Selected ? 'selected' :''"
class="el-tooltip item material-item ">
<div class="mater_FileType" v-if="getFileType(item.Name)==1">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/WORD.png" alt="">
</div>
<div class="mater_FileType" v-if="getFileType(item.Name)==2">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png" alt="">
</div>
<div class="mater_FileType" v-if="getFileType(item.Name)==3">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pdf.png" alt="">
</div>
<div flex="dir:left" style="margin-top: 5px;">
<div class="material-name">{{item.Name}}</div>
<div style="margin: 0px 5px;">|</div>
<div>
<button type="button" class="el-button el-button--text" style="padding: 0px;">
<span @click="EditPage(item)">编辑</span>
</button>
</div>
</div>
</div>
</el-tooltip>
</template>
</div>
<div style="padding-right:10px">
<el-pagination style="text-align:right" background :current-page="currentPage4"
......@@ -477,6 +514,24 @@
}
})
},
//上传附件doc docx pdf ppt pptx
UploadpdfFile(file){
var that = this;
var flieType=file.file.name.split('.')[1];
if(flieType!='doc'&&flieType!='docx'&&flieType!='pdf'&&flieType!='ppt'&&flieType!='pptx'){
this.Error('请上传word ppt pdf文件');
return;
}
this.UploadSelfFile(this.FileType().GoodsImg, file.file, res => {
if (res.resultCode == 1) {
that.addpageMsg.Image = res.VideoCoverImg;
that.addpageMsg.Path = res.FileUrl;
that.addpageMsg.Name = res.FileName;
that.addPageList();
that.$forceUpdate();
}
})
},
// 新增素材信息
addPageList() {
this.apipost("/api/product/SetMaterialInfo", this.addpageMsg, res => {
......@@ -579,6 +634,7 @@
}
},
GroupsubmitForm(formName) {
console.log(this.addGroupMsg,'this.addGroupMsg');
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost('/api/product/SetMaterialGroupInfo', this.addGroupMsg,
......@@ -634,6 +690,23 @@
this.PageMsg.pageIndex = val;
this.GetPageList();
},
//拆分后缀
getFileType(item){
var num=0;
if(item){
var name = item.split('.')[1]
}
if(name=='doc'||name=='docx'){
num=1
}
if(name=='ppt'||name=='pptx'){
num=2
}
if(name=='pdf'){
num=3
}
return num;
}
},
}
......@@ -743,5 +816,15 @@
border-left: none;
padding: 0 15px;
}
.mater_FileType{
width:140px;
height:140px;
display: flex;
align-items: center;
justify-content: center;
}
.mater_FileType img{
width:80%;
height:80%;
}
</style>
This diff is collapsed.
This diff is collapsed.
......@@ -169,6 +169,9 @@
<li class="menu_item" :class="{'Fchecked':isChecked=='/lecturermanage'}" @click="isChecked='/lecturermanage',CommonJump('lecturermanage')">
<i class="el-icon-menu"></i><span>讲师管理</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked=='/CourseManagement'}" @click="isChecked='/CourseManagement',CommonJump('CourseManagement')">
<i class="el-icon-menu"></i><span>课程管理</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked=='/courseCardManage'}" @click="isChecked='/courseCardManage',CommonJump('courseCardManage')">
<i class="el-icon-menu"></i><span>课程卡管理</span>
</li>
......
This diff is collapsed.
......@@ -240,7 +240,9 @@
PageSelect(item) {
this.emitmsg = {
Path:item.Path,
Id: item.Id
Id: item.Id,
Image:item.Image,
VideoTime:item.VideoTime
}
this.selectId = item.Id;
},
......
......@@ -57,7 +57,10 @@ export default {
let domainUrl = '';
let javaUrl = 'http://192.168.2.65:8018';
domainUrl = "http://192.168.1.27:8200";
// domainUrl = "http://192.168.1.27:8200";
domainUrl = "http://192.168.1.9:8088";
//domainUrl = "http://192.168.1.21";
//domainUrl = "https://localhost:5001";
let vtUploadUrl = "http://192.168.1.214:8120";
let vtViewUrl = "http://192.168.1.214:8130";
......@@ -171,6 +174,10 @@ export default {
console.log(reason)
});
},
//PDF预览
Vue.prototype.previewPDF = function (url) {
window.open(url);
},
//上传文件到云存储
Vue.prototype.UploadFileToTencent = function (path, fileObj, callback) {
// debugger;
......
......@@ -307,8 +307,18 @@ export default new Router({
          name: 'informationEvalution',
          component: resolve => require(['@/components/education/informationEvalution'], resolve),
       },
//网课 教育-课程管理
{
path:'/CourseManagement',
          name: 'CourseManagement',
          component: resolve => require(['@/components/education/CourseManagement'], resolve),
},
//网课 教育-新增修改
{
path: '/educationEdit',
          name: 'educationEdit',
          component: resolve => require(['@/components/education/educationEdit'], resolve),
}
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment