Commit f288ac92 authored by zhengke's avatar zhengke

修改

parent f9fa4085
...@@ -164,13 +164,15 @@ ...@@ -164,13 +164,15 @@
.goodsDialog .el-dialog__body { .goodsDialog .el-dialog__body {
padding: 10px 20px; padding: 10px 20px;
} }
.education-edit-item { .education-edit-item {
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
padding: 5px; padding: 5px;
margin-bottom: 5px; margin-bottom: 5px;
position: relative; position: relative;
} }
.education_image_upload .pic-box {
.education_image_upload .pic-box {
width: 70px; width: 70px;
height: 70px; height: 70px;
border: 1px solid #ccc; border: 1px solid #ccc;
...@@ -180,8 +182,9 @@ ...@@ -180,8 +182,9 @@
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
position: relative; position: relative;
} }
.education-edit-options .el-button {
.education-edit-options .el-button {
height: 25px; height: 25px;
line-height: 25px; line-height: 25px;
width: 25px; width: 25px;
...@@ -191,8 +194,9 @@ ...@@ -191,8 +194,9 @@
border-radius: 0; border-radius: 0;
position: absolute; position: absolute;
margin-left: 0; margin-left: 0;
} }
.education_image_upload .pic-box .size-tip {
.education_image_upload .pic-box .size-tip {
line-height: 1.35; line-height: 1.35;
text-align: center; text-align: center;
position: absolute; position: absolute;
...@@ -206,18 +210,21 @@ ...@@ -206,18 +210,21 @@
color: #fff; color: #fff;
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
letter-spacing: -1px; letter-spacing: -1px;
} }
.education_image_upload .image-delete {
.education_image_upload .image-delete {
position: absolute; position: absolute;
top: -10px; top: -10px;
right: -10px; right: -10px;
padding: 5px; padding: 5px;
visibility: hidden; visibility: hidden;
z-index: 1; z-index: 1;
} }
.education_image_upload:hover .image-delete {
.education_image_upload:hover .image-delete {
visibility: visible; visibility: visible;
} }
</style> </style>
<template> <template>
<div :class="{'active':mcData.isCked}"> <div :class="{'active':mcData.isCked}">
...@@ -230,8 +237,7 @@ ...@@ -230,8 +237,7 @@
style="right: -25px; top: 30px;"></el-button> style="right: -25px; top: 30px;"></el-button>
</div> </div>
<div class="diy-goods"> <div class="diy-goods">
<div class="diy-component-preview" <div class="diy-component-preview" :style="{'backgroundColor':data.backgroundColor}">
:style="{'backgroundColor':data.backgroundColor}">
<div :flex="cMainFlex" :style="{marginLeft:data.PaddingLeft+'px', <div :flex="cMainFlex" :style="{marginLeft:data.PaddingLeft+'px',
marginRight:data.PaddingRight+'px',marginTop:data.PaddingTop+'px', marginRight:data.PaddingRight+'px',marginTop:data.PaddingTop+'px',
marginBottom:data.PaddingBottom+'px'}"> marginBottom:data.PaddingBottom+'px'}">
...@@ -241,7 +247,8 @@ ...@@ -241,7 +247,8 @@
<div v-for="(goods,goodsIndex) in cCatGoodsList(cat, catIndex)" class="goods-item" :key="goodsIndex" <div v-for="(goods,goodsIndex) in cCatGoodsList(cat, catIndex)" class="goods-item" :key="goodsIndex"
:class="data.catPosition==='left'?'goods-cat-list':''"> :class="data.catPosition==='left'?'goods-cat-list':''">
<div style="display: inline-block;" :style="cGoodsItemWidth"> <div style="display: inline-block;" :style="cGoodsItemWidth">
<div :style="{'borderRadius':data.SearchFilletPX+'px'}" :flex="cGoodsItemFlex" style="position: relative;border:1px solid rgb(226, 226, 226);overflow:hidden;"> <div :style="{'borderRadius':data.SearchFilletPX+'px'}" :flex="cGoodsItemFlex"
style="position: relative;border:1px solid rgb(226, 226, 226);overflow:hidden;">
<div class="goods-pic" <div class="goods-pic"
:class="'goods-pic-'+data.goodsCoverProportion+' goods-pic-fill-'+data.fill" :class="'goods-pic-'+data.goodsCoverProportion+' goods-pic-fill-'+data.fill"
:style="'background-image: url('+getIconLink(goods.picUrl)+')'"> :style="'background-image: url('+getIconLink(goods.picUrl)+')'">
...@@ -249,7 +256,9 @@ ...@@ -249,7 +256,9 @@
<div :style="cGoodsItemInfoStyle"> <div :style="cGoodsItemInfoStyle">
<div class="goods-name" :class="data.listStyle===-1?'goods-name-static':''"> <div class="goods-name" :class="data.listStyle===-1?'goods-name-static':''">
<div style="font-size:30px;">{{goods.name}}</div> <div style="font-size:30px;">{{goods.name}}</div>
<div style="font-size:25px;margin-top:10px;">{{goods.lableName}}</div> <el-tag :key="sindex" style="margin-right:5px;font-size:20px;" v-for="(sitem,sindex) in goods.lableNameList">
{{sitem}}
</el-tag>
</div> </div>
</div> </div>
</div> </div>
...@@ -288,8 +297,14 @@ ...@@ -288,8 +297,14 @@
</div> </div>
<div> <div>
<div> <div>
<el-input type="text" v-model="item.name" placeholder="标题" size="small" style="margin-bottom:5px;"></el-input> <el-input type="text" v-model="item.name" placeholder="标题" size="small"
<el-input type="text" v-model="item.lableName" placeholder="副标题" size="small" style="margin-bottom:5px;"></el-input> style="margin-bottom:5px;"></el-input>
<el-tag :key="tagIndex" v-for="(tag,tagIndex) in item.lableNameList" style="margin-right:3px;"
size="small" closable :disable-transitions="false" @close="deltags(tag,index,tagIndex)">
{{tag}}
</el-tag>
<el-input type="text" size="mini" style="width:80px;" v-model="commonLabels"
@blur="getLabel(index)" placeholder="输入标签"></el-input>
<el-input type="text" v-model="item.linkUrl" placeholder="点击选择链接" size="small"> <el-input type="text" v-model="item.linkUrl" placeholder="点击选择链接" size="small">
<el-button slot="append" @click="getMyChoice(index)">选择链接</el-button> <el-button slot="append" @click="getMyChoice(index)">选择链接</el-button>
</el-input> </el-input>
...@@ -355,11 +370,11 @@ ...@@ -355,11 +370,11 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="选择链接" :visible.sync="isShowLink" width="800px"> <el-dialog title="选择链接" :visible.sync="isShowLink" width="800px">
<chooseMenu ref="chooseMenu"></chooseMenu> <chooseMenu ref="chooseMenu"></chooseMenu>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowLink=false">取 消</el-button> <el-button size="small" @click="isShowLink=false">取 消</el-button>
<el-button size="small" type="danger" @click="getChoiceLink()">确 定</el-button> <el-button size="small" type="danger" @click="getChoiceLink()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -387,14 +402,26 @@ ...@@ -387,14 +402,26 @@
isShowGoods: false, isShowGoods: false,
//添加的下标 //添加的下标
comIndex: -1, comIndex: -1,
commonIndex:0, commonIndex: 0,
isShowLink:false, isShowLink: false,
commonLabels: ''
}; };
}, },
created() { created() {
}, },
methods: { methods: {
//添加标签
getLabel(index) {
if (this.commonLabels != '') {
this.data.list[index].lableNameList.push(this.commonLabels);
}
this.commonLabels = '';
},
//删除标签
deltags(tag, index, tagindex) {
this.data.list[index].lableNameList.splice(tagindex, 1);
},
//向父组件传值 并调用排序 //向父组件传值 并调用排序
resetSord(IsUp) { resetSord(IsUp) {
this.$emit('getSord', this.index, IsUp); this.$emit('getSord', this.index, IsUp);
...@@ -415,9 +442,9 @@ ...@@ -415,9 +442,9 @@
const defaultGoodsItem = { const defaultGoodsItem = {
id: 0, id: 0,
name: '商品名称', name: '商品名称',
lableName:'', lableName: '',
picUrl: '', picUrl: '',
linkUrl:'', linkUrl: '',
}; };
newList = new Array(cat.goodsNum).fill(defaultGoodsItem); newList = new Array(cat.goodsNum).fill(defaultGoodsItem);
} }
...@@ -426,8 +453,8 @@ ...@@ -426,8 +453,8 @@
}, },
//选择图片 //选择图片
SelectId(msg) { SelectId(msg) {
this.data.list[this.commonIndex].picUrl=this.getIconLink(msg.url); this.data.list[this.commonIndex].picUrl = this.getIconLink(msg.url);
this.choicImg=false; this.choicImg = false;
}, },
//选择商品 //选择商品
getGoodsChoice() { getGoodsChoice() {
...@@ -452,47 +479,47 @@ ...@@ -452,47 +479,47 @@
this.$refs.choiceGood.toggleSelection(); this.$refs.choiceGood.toggleSelection();
}, },
//删除banner //删除banner
delBanner(index){ delBanner(index) {
this.data.list.splice(index,1); this.data.list.splice(index, 1);
}, },
//选取图片 //选取图片
choiceMyImg(index){ choiceMyImg(index) {
this.choicImg = true; this.choicImg = true;
this.commonIndex=index; this.commonIndex = index;
}, },
//选择链接 //选择链接
getMyChoice(index){ getMyChoice(index) {
this.isShowLink=true; this.isShowLink = true;
this.commonIndex=index; this.commonIndex = index;
}, },
//添加商品 //添加商品
addBanner(){ addBanner() {
let obj={ let obj = {
id:0, id: 0,
name:'', //标题 name: '', //标题
lableName:'', //副标题 lableNameList: [], //副标题
picUrl:'', //商品图片 picUrl: '', //商品图片
linkUrl:'' //链接 linkUrl: '' //链接
} }
if(this.data.list.length<this.data.goodsLength){ if (this.data.list.length < this.data.goodsLength) {
// if(this.data.list.length>0){ // if(this.data.list.length>0){
for(var i=0;i<this.data.list.length;i++){ for (var i = 0; i < this.data.list.length; i++) {
if(this.data.list[i].linkUrl==''){ if (this.data.list[i].linkUrl == '') {
this.Error(`请选择第${i+1}个的链接`); this.Error(`请选择第${i+1}个的链接`);
return; return;
}
} }
this.data.list.push(obj); }
this.data.list.push(obj);
// } // }
}else{ } else {
this.Error('超出自定义数量'); this.Error('超出自定义数量');
} }
}, },
//获取选择链接 //获取选择链接
getChoiceLink(){ getChoiceLink() {
//调用子组件方法 //调用子组件方法
var obj = this.$refs.chooseMenu.getChooseMenu(); var obj = this.$refs.chooseMenu.getChooseMenu();
this.data.list[this.commonIndex].linkUrl=obj.PageUrl; this.data.list[this.commonIndex].linkUrl = obj.PageUrl;
this.isShowLink = false; this.isShowLink = false;
}, },
}, },
......
...@@ -302,8 +302,8 @@ ...@@ -302,8 +302,8 @@
:index="index" :dataLeng="dataList.length"></miaiuser> :index="index" :dataLeng="dataList.length"></miaiuser>
<miaiactivitytype v-if="item.Id=='miaiactivitytype'" :mData="item" @getSord="getSord" @comDelPlugin="comDelPlugin" <miaiactivitytype v-if="item.Id=='miaiactivitytype'" :mData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="dataList.length"></miaiactivitytype> :index="index" :dataLeng="dataList.length"></miaiactivitytype>
<miaiactiviCustom v-if="item.Id=='miaiactiviCustom'" :mcData="item" @getSord="getSord" @comDelPlugin="comDelPlugin" <miaiactivityCustom v-if="item.Id=='miaiactivityCustom'" :mcData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="dataList.length" ></miaiactiviCustom> :index="index" :dataLeng="dataList.length" ></miaiactivityCustom>
</div> </div>
</div> </div>
</div> </div>
...@@ -421,7 +421,7 @@ ...@@ -421,7 +421,7 @@
import navPage from "../sallCenter/plugin/nav-page" import navPage from "../sallCenter/plugin/nav-page"
import miaiuser from "../sallCenter/plugin/miaiuser" import miaiuser from "../sallCenter/plugin/miaiuser"
import miaiactivitytype from "../sallCenter/plugin/miaiactivitytype" import miaiactivitytype from "../sallCenter/plugin/miaiactivitytype"
import miaiactiviCustom from "../sallCenter/plugin/miaiactiviCustom" import miaiactivityCustom from "../sallCenter/plugin/miaiactivityCustom"
import ChooseImg from "@/components/global/ChooseImg.vue"; import ChooseImg from "@/components/global/ChooseImg.vue";
...@@ -502,7 +502,7 @@ ...@@ -502,7 +502,7 @@
navPage, navPage,
miaiuser, miaiuser,
miaiactivitytype, miaiactivitytype,
miaiactiviCustom miaiactivityCustom
}, },
methods: { methods: {
//选择图片 //选择图片
...@@ -1537,9 +1537,9 @@ ...@@ -1537,9 +1537,9 @@
this.dataList.push(miaiactivityData); this.dataList.push(miaiactivityData);
break; break;
//相亲自定义 //相亲自定义
case 'miaiactiviCustom': case 'miaiactivityCustom':
let miaiacObj = { let miaiacObj = {
Id: 'miaiactiviCustom', Id: 'miaiactivityCustom',
isCked: false, isCked: false,
data: { data: {
goodsLength: 10, //商品数量 goodsLength: 10, //商品数量
......
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