Commit 2678d0f2 authored by zhengke's avatar zhengke

修改

parent 8bfcd023
......@@ -959,7 +959,6 @@
this.apipost("/api/Tenant/GetUserCenterConfig", {}, res => {
if (res.data.resultCode == 1) {
var jsonData = res.data.data;
console.log(res,'数据');
if (jsonData.DefaultBgImg) {
this.postMsg.DefaultBgImg = jsonData.DefaultBgImg;
} else {
......@@ -1043,6 +1042,9 @@
} else {
this.restoreSelfMenu(false);
}
if (jsonData.IsShowSDNav) {
this.postMsg.IsShowSDNav = jsonData.IsShowSDNav;
}
} else {
this.Info(res.data.message);
}
......
......@@ -207,17 +207,28 @@
<el-form-item label="关联讲师">
<template v-if="addMsg.TeacherList.length>0">
<el-tag v-for="(item,index) in addMsg.TeacherList" closable size="small"
@close="yichuTeacher(index)" style="margin-right:5px;" :key="index">
@close="yichuTeacher(index)" style="margin-right:5px;" :key="index">
{{item.Name}}
</el-tag>
</template>
<el-button @click="choosejsDig=true" size="mini">选择教师</el-button>
</el-form-item>
<el-form-item label="标签" size="small">
<el-tag :key="tag" size="small" v-for="tag in dynamicTags" closable :disable-transitions="false"
@close="handleClose(tag)">
{{tag}}
</el-tag>
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput"
size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 标签</el-button>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never">
<div slot="header" class="clearfix" style="display:flex;justify-content:space-between;align-items:center;">
<div slot="header" class="clearfix"
style="display:flex;justify-content:space-between;align-items:center;">
<span>课程信息</span>
<el-button @click="courseDialog=true,isShowEditBtn=true" size="small">添加课程</el-button>
</div>
......@@ -267,10 +278,18 @@
<img v-if="getFileType(subItem.FilePath)==4" @click="showUpLoadFileT(subItem.FilePath)"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png" alt="">
</div>
<div class="courseView">
<template v-if="subItem.Type!=1&&subItem.IsImageOK==1">
<el-tooltip class="item" effect="dark" content="预览图片" placement="top">
<img @click="getImgView(subItem)"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/viewClass.png">
</el-tooltip>
</template>
</div>
</div>
<div>
<img @click="updateCourse(subItem,index),isReplace=index,isShowEditBtn=false" style="width:32px;height:32px"
src="../../assets/img/userman/edit.png" alt="">
<img @click="updateCourse(subItem,index),isReplace=index,isShowEditBtn=false"
style="width:32px;height:32px" src="../../assets/img/userman/edit.png" alt="">
<img @click="deleteCourse(index)" style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/del.png" alt="">
</div>
......@@ -636,7 +655,11 @@
<el-dialog title="选择教师" top="2%" :visible.sync="choosejsDig" width="30%">
<div>
<el-checkbox-group v-model="ckedTeacher">
<el-checkbox v-for="(item,index) in teacherList" :label="item.ID" :key="index">{{item.Name}}</el-checkbox>
<el-checkbox v-for="(item,index) in teacherList" :label="item.ID" :key="index">
<div class="teacherHead">
<img :src="item.TeacherLogo" alt=""/>
</div>{{item.Name}}
</el-checkbox>
</el-checkbox-group>
</div>
<span slot="footer" class="dialog-footer">
......@@ -651,7 +674,8 @@
<el-input v-model="courseMsg.Name" size="small"></el-input>
</el-form-item>
<el-form-item label="类型">
<el-select style="margin-right: 10px;" v-model="courseMsg.Type" @change="resetPath" size="small" placeholder="请选择">
<el-select style="margin-right: 10px;" v-model="courseMsg.Type" @change="resetPath" size="small"
placeholder="请选择">
<el-option v-for="item in fileList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
......@@ -696,12 +720,12 @@
<div style="text-align:right;padding-right:15px;cursor:pointer">
<span @click="Setvideo" style="font-size:30px;color:#fff" class="iconfont icon-weibiaoti4"></span>
</div>
<video ref="myVideo" autoplay="autoplay" width="100%" height="90%" :src="thisVideoAddress" controls="controls">
<video ref="myVideo" autoplay="autoplay" width="100%" height="90%" :src="thisVideoAddress" controls="controls">
<source :src="thisVideoAddress" type="video/mp4">
<source :src="thisVideoAddress" type="video/ogg">
</video>
</div>
<el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="images" />
</div>
</template>
<script>
......@@ -711,6 +735,8 @@
import region_Choice from "@/components/setup/view/regionChoice";
import UE from "@/components/global/UE.vue";
import draggable from "vuedraggable"
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
export default {
components: {
ChooseImg,
......@@ -718,7 +744,8 @@
ChooseFile,
region_Choice,
UE,
draggable
draggable,
ElImageViewer
},
data() {
return {
......@@ -745,7 +772,7 @@
flDig: false,
addMsg: {
Id: 0,
GoodsPageType:1,//上架版面
GoodsPageType: 1, //上架版面
CategoryList: [], //分类列表
Name: "", //商品名称
CarouselImageList: [], //轮播图
......@@ -788,7 +815,8 @@
MemberPriceTreeList: [],
TeacherList: [], //教师
CourseList: [], //课程
SalesNum:0 //已售数量
SalesNum: 0, //已售数量
CourseLableList:[] //标签
},
predefineColors: [
'#000000',
......@@ -928,9 +956,15 @@
videoType: 1,
fileDialog: false, //选择文件弹窗
isReplace: 0, //是否替换
videoDivState:false, //视频预览
thisVideoAddress:"",
isShowEditBtn:true,
videoDivState: false, //视频预览
thisVideoAddress: "",
isShowEditBtn: true,
showViewer: false,
images: [],
dynamicTags: [],
inputVisible: false,
inputValue: '',
};
},
created() {
......@@ -959,6 +993,42 @@
}
},
methods: {
//关闭标签
handleClose(tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
},
handleInputConfirm() {
let inputValue = this.inputValue;
if (inputValue) {
this.dynamicTags.push(inputValue);
}
this.inputVisible = false;
this.inputValue = '';
},
showInput() {
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
//预览
getImgView(item) {
this.images = [];
item.ImageList.forEach(x => {
if (x.Path.indexOf('http') > -1) {
x.Path = x.Path.replace('http:/', 'http://')
this.images.push(x.Path);
}
if (x.Path.indexOf('https') > -1) {
x.Path = x.Path.replace('https:/', 'https://')
this.images.push(x.Path);
}
})
this.showViewer = true;
},
closeViewer() {
this.showViewer = false;
},
initShareSettings() {
let arr = [];
this.addMsg.CategoryList.forEach(item => {
......@@ -1108,6 +1178,8 @@
if (this.addMsg.PresentFXGrade == '') { //没选择的时候默认为0
this.addMsg.PresentFXGrade = 0
}
this.addMsg.CourseLableList = this.dynamicTags
//标签的判断和处理
if (this.addMsg.MarketingLogo.iswords == 0) {
this.addMsg.MarketingLogo = {
......@@ -1261,11 +1333,11 @@
let that = this;
if (msg) {
if (this.imgType == 1) {
let obj = {
Id: msg.selectId,
Path: that.getIconLink(msg.url),
};
this.addMsg.CarouselImageList.push(obj);
let obj = {
Id: msg.selectId,
Path: that.getIconLink(msg.url),
};
this.addMsg.CarouselImageList.push(obj);
}
if (this.imgType == 2) {
this.addMsg.CustomShareImage = that.getIconLink(msg.url);
......@@ -1407,6 +1479,14 @@
if (this.addMsg.PresentFXGrade == 0) {
this.addMsg.PresentFXGrade = ''
}
if( this.addMsg.CourseLableList&&this.addMsg.CourseLableList.length>0){
this.dynamicTags = this.addMsg.CourseLableList
}
if (this.addMsg.TeacherList.length > 0) {
this.addMsg.TeacherList.forEach(x => {
this.ckedTeacher.push(x.TeacherId);
})
}
if (!this.addMsg.MarketingLogo || this.addMsg.MarketingLogo == null) {
this.addMsg.MarketingLogo = {
......@@ -1423,7 +1503,7 @@
// var bb = eval("("+cc+")");
// var kk = JSON.parse(bb);
// this.addMsg.MarketingLogo=kk;
this.addMsg.MarketingLogo=JSON.parse(this.addMsg.MarketingLogo);
this.addMsg.MarketingLogo = JSON.parse(this.addMsg.MarketingLogo);
}
this.getSuggestPrice();
this.getFXDGradeList2();
......@@ -1767,27 +1847,27 @@
if (Url.substring(Url.lastIndexOf('.') + 1, Url.length).toUpperCase() == 'PDF') {
this.previewPDF(Url)
} else {
let dom = document.querySelector("#groupTourOrder_DownLoad");
dom.href = Url;
dom.click();
// window.open("https://view.officeapps.live.com/op/view.aspx?src="+Url)
// let dom = document.querySelector("#groupTourOrder_DownLoad");
// dom.href = Url;
// dom.click();
window.open("https://view.officeapps.live.com/op/view.aspx?src=" + Url)
}
},
//预览视频
goUrlVideo(path){
let that=this;
that.videoDivState=true;
that.thisVideoAddress=path;
let myVideo=this.$refs.myVideo;
goUrlVideo(path) {
let that = this;
that.videoDivState = true;
that.thisVideoAddress = path;
let myVideo = this.$refs.myVideo;
myVideo.play();
},
Setvideo(){
this.videoDivState=false;
let myVideo=this.$refs.myVideo;
Setvideo() {
this.videoDivState = false;
let myVideo = this.$refs.myVideo;
myVideo.pause();
},
//重置
resetPath(){
resetPath() {
this.courseMsg.FilePath = '';
}
}
......@@ -2084,7 +2164,7 @@
width: 100%;
height: 60px;
display: flex;
padding-right:4px;
padding-right: 4px;
}
.courseHeader>div {
......@@ -2103,7 +2183,7 @@
.courseContent {
width: 100%;
height: 500px;
overflow-y:scroll;
overflow-y: scroll;
}
.courseList {
......@@ -2138,6 +2218,7 @@
justify-content: center;
align-items: center;
cursor: default;
display: flex;
}
.eduFileDiv {
......@@ -2149,14 +2230,50 @@
width: 100%;
height: 100%;
}
.videoDiv{
.videoDiv {
position: fixed;
top: 0;
left:0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999999;
background: #000;
}
.courseView {
width: 25px;
height: 25px;
margin-left: 10px;
}
.courseView img {
width: 100%;
height: 100%;
}
.directorGoodsEdit .input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.directorGoodsEdit .el-tag + .el-tag {
margin-left: 10px;
}
.teacherHead{
width:30px;
height:30px;
display: inline-block;
border-radius: 50%;
overflow: hidden;
position: relative;
top:10px;
margin-right:3px;
}
.directorGoodsEdit .teacherHead img{
width:100%;
height:100%;
}
.directorGoodsEdit .el-checkbox{
margin-bottom:10px;
}
</style>
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