Commit 2678d0f2 authored by zhengke's avatar zhengke

修改

parent 8bfcd023
...@@ -959,7 +959,6 @@ ...@@ -959,7 +959,6 @@
this.apipost("/api/Tenant/GetUserCenterConfig", {}, res => { this.apipost("/api/Tenant/GetUserCenterConfig", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
var jsonData = res.data.data; var jsonData = res.data.data;
console.log(res,'数据');
if (jsonData.DefaultBgImg) { if (jsonData.DefaultBgImg) {
this.postMsg.DefaultBgImg = jsonData.DefaultBgImg; this.postMsg.DefaultBgImg = jsonData.DefaultBgImg;
} else { } else {
...@@ -1043,6 +1042,9 @@ ...@@ -1043,6 +1042,9 @@
} else { } else {
this.restoreSelfMenu(false); this.restoreSelfMenu(false);
} }
if (jsonData.IsShowSDNav) {
this.postMsg.IsShowSDNav = jsonData.IsShowSDNav;
}
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
......
...@@ -213,11 +213,22 @@ ...@@ -213,11 +213,22 @@
</template> </template>
<el-button @click="choosejsDig=true" size="mini">选择教师</el-button> <el-button @click="choosejsDig=true" size="mini">选择教师</el-button>
</el-form-item> </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-col>
</el-row> </el-row>
</el-card> </el-card>
<el-card style="margin-top:20px" shadow="never"> <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> <span>课程信息</span>
<el-button @click="courseDialog=true,isShowEditBtn=true" size="small">添加课程</el-button> <el-button @click="courseDialog=true,isShowEditBtn=true" size="small">添加课程</el-button>
</div> </div>
...@@ -267,10 +278,18 @@ ...@@ -267,10 +278,18 @@
<img v-if="getFileType(subItem.FilePath)==4" @click="showUpLoadFileT(subItem.FilePath)" <img v-if="getFileType(subItem.FilePath)==4" @click="showUpLoadFileT(subItem.FilePath)"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png" alt=""> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/PPT.png" alt="">
</div> </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>
<div> <div>
<img @click="updateCourse(subItem,index),isReplace=index,isShowEditBtn=false" style="width:32px;height:32px" <img @click="updateCourse(subItem,index),isReplace=index,isShowEditBtn=false"
src="../../assets/img/userman/edit.png" alt=""> style="width:32px;height:32px" src="../../assets/img/userman/edit.png" alt="">
<img @click="deleteCourse(index)" style="width:32px;height:32px;margin:0 10px" <img @click="deleteCourse(index)" style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/del.png" alt=""> src="../../assets/img/userman/del.png" alt="">
</div> </div>
...@@ -636,7 +655,11 @@ ...@@ -636,7 +655,11 @@
<el-dialog title="选择教师" top="2%" :visible.sync="choosejsDig" width="30%"> <el-dialog title="选择教师" top="2%" :visible.sync="choosejsDig" width="30%">
<div> <div>
<el-checkbox-group v-model="ckedTeacher"> <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> </el-checkbox-group>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -651,7 +674,8 @@ ...@@ -651,7 +674,8 @@
<el-input v-model="courseMsg.Name" size="small"></el-input> <el-input v-model="courseMsg.Name" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="类型"> <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 v-for="item in fileList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option> </el-option>
</el-select> </el-select>
...@@ -701,7 +725,7 @@ ...@@ -701,7 +725,7 @@
<source :src="thisVideoAddress" type="video/ogg"> <source :src="thisVideoAddress" type="video/ogg">
</video> </video>
</div> </div>
<el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="images" />
</div> </div>
</template> </template>
<script> <script>
...@@ -711,6 +735,8 @@ ...@@ -711,6 +735,8 @@
import region_Choice from "@/components/setup/view/regionChoice"; import region_Choice from "@/components/setup/view/regionChoice";
import UE from "@/components/global/UE.vue"; import UE from "@/components/global/UE.vue";
import draggable from "vuedraggable" import draggable from "vuedraggable"
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
export default { export default {
components: { components: {
ChooseImg, ChooseImg,
...@@ -718,7 +744,8 @@ ...@@ -718,7 +744,8 @@
ChooseFile, ChooseFile,
region_Choice, region_Choice,
UE, UE,
draggable draggable,
ElImageViewer
}, },
data() { data() {
return { return {
...@@ -745,7 +772,7 @@ ...@@ -745,7 +772,7 @@
flDig: false, flDig: false,
addMsg: { addMsg: {
Id: 0, Id: 0,
GoodsPageType:1,//上架版面 GoodsPageType: 1, //上架版面
CategoryList: [], //分类列表 CategoryList: [], //分类列表
Name: "", //商品名称 Name: "", //商品名称
CarouselImageList: [], //轮播图 CarouselImageList: [], //轮播图
...@@ -788,7 +815,8 @@ ...@@ -788,7 +815,8 @@
MemberPriceTreeList: [], MemberPriceTreeList: [],
TeacherList: [], //教师 TeacherList: [], //教师
CourseList: [], //课程 CourseList: [], //课程
SalesNum:0 //已售数量 SalesNum: 0, //已售数量
CourseLableList:[] //标签
}, },
predefineColors: [ predefineColors: [
'#000000', '#000000',
...@@ -928,9 +956,15 @@ ...@@ -928,9 +956,15 @@
videoType: 1, videoType: 1,
fileDialog: false, //选择文件弹窗 fileDialog: false, //选择文件弹窗
isReplace: 0, //是否替换 isReplace: 0, //是否替换
videoDivState:false, //视频预览 videoDivState: false, //视频预览
thisVideoAddress:"", thisVideoAddress: "",
isShowEditBtn:true, isShowEditBtn: true,
showViewer: false,
images: [],
dynamicTags: [],
inputVisible: false,
inputValue: '',
}; };
}, },
created() { created() {
...@@ -959,6 +993,42 @@ ...@@ -959,6 +993,42 @@
} }
}, },
methods: { 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() { initShareSettings() {
let arr = []; let arr = [];
this.addMsg.CategoryList.forEach(item => { this.addMsg.CategoryList.forEach(item => {
...@@ -1108,6 +1178,8 @@ ...@@ -1108,6 +1178,8 @@
if (this.addMsg.PresentFXGrade == '') { //没选择的时候默认为0 if (this.addMsg.PresentFXGrade == '') { //没选择的时候默认为0
this.addMsg.PresentFXGrade = 0 this.addMsg.PresentFXGrade = 0
} }
this.addMsg.CourseLableList = this.dynamicTags
//标签的判断和处理 //标签的判断和处理
if (this.addMsg.MarketingLogo.iswords == 0) { if (this.addMsg.MarketingLogo.iswords == 0) {
this.addMsg.MarketingLogo = { this.addMsg.MarketingLogo = {
...@@ -1407,6 +1479,14 @@ ...@@ -1407,6 +1479,14 @@
if (this.addMsg.PresentFXGrade == 0) { if (this.addMsg.PresentFXGrade == 0) {
this.addMsg.PresentFXGrade = '' 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) { if (!this.addMsg.MarketingLogo || this.addMsg.MarketingLogo == null) {
this.addMsg.MarketingLogo = { this.addMsg.MarketingLogo = {
...@@ -1423,7 +1503,7 @@ ...@@ -1423,7 +1503,7 @@
// var bb = eval("("+cc+")"); // var bb = eval("("+cc+")");
// var kk = JSON.parse(bb); // var kk = JSON.parse(bb);
// this.addMsg.MarketingLogo=kk; // this.addMsg.MarketingLogo=kk;
this.addMsg.MarketingLogo=JSON.parse(this.addMsg.MarketingLogo); this.addMsg.MarketingLogo = JSON.parse(this.addMsg.MarketingLogo);
} }
this.getSuggestPrice(); this.getSuggestPrice();
this.getFXDGradeList2(); this.getFXDGradeList2();
...@@ -1767,27 +1847,27 @@ ...@@ -1767,27 +1847,27 @@
if (Url.substring(Url.lastIndexOf('.') + 1, Url.length).toUpperCase() == 'PDF') { if (Url.substring(Url.lastIndexOf('.') + 1, Url.length).toUpperCase() == 'PDF') {
this.previewPDF(Url) this.previewPDF(Url)
} else { } else {
let dom = document.querySelector("#groupTourOrder_DownLoad"); // let dom = document.querySelector("#groupTourOrder_DownLoad");
dom.href = Url; // dom.href = Url;
dom.click(); // dom.click();
// window.open("https://view.officeapps.live.com/op/view.aspx?src="+Url) window.open("https://view.officeapps.live.com/op/view.aspx?src=" + Url)
} }
}, },
//预览视频 //预览视频
goUrlVideo(path){ goUrlVideo(path) {
let that=this; let that = this;
that.videoDivState=true; that.videoDivState = true;
that.thisVideoAddress=path; that.thisVideoAddress = path;
let myVideo=this.$refs.myVideo; let myVideo = this.$refs.myVideo;
myVideo.play(); myVideo.play();
}, },
Setvideo(){ Setvideo() {
this.videoDivState=false; this.videoDivState = false;
let myVideo=this.$refs.myVideo; let myVideo = this.$refs.myVideo;
myVideo.pause(); myVideo.pause();
}, },
//重置 //重置
resetPath(){ resetPath() {
this.courseMsg.FilePath = ''; this.courseMsg.FilePath = '';
} }
} }
...@@ -2084,7 +2164,7 @@ ...@@ -2084,7 +2164,7 @@
width: 100%; width: 100%;
height: 60px; height: 60px;
display: flex; display: flex;
padding-right:4px; padding-right: 4px;
} }
.courseHeader>div { .courseHeader>div {
...@@ -2103,7 +2183,7 @@ ...@@ -2103,7 +2183,7 @@
.courseContent { .courseContent {
width: 100%; width: 100%;
height: 500px; height: 500px;
overflow-y:scroll; overflow-y: scroll;
} }
.courseList { .courseList {
...@@ -2138,6 +2218,7 @@ ...@@ -2138,6 +2218,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: default; cursor: default;
display: flex;
} }
.eduFileDiv { .eduFileDiv {
...@@ -2149,14 +2230,50 @@ ...@@ -2149,14 +2230,50 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.videoDiv{
.videoDiv {
position: fixed; position: fixed;
top: 0; top: 0;
left:0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 999999999; z-index: 999999999;
background: #000; 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> </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