Commit 485bdefa authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/huangyuanyuan/electricitysheep into master

# Conflicts:
#	src/components/tradePavilion/listRegistration.vue
parents 0b12e6f4 faaae947
......@@ -147,15 +147,20 @@
</el-form-item>
<el-form-item label="热区链接" v-if="isLink">
<template v-if="chooseType=='rubik'">
<el-input size="small" style="width: 100%;" :disabled="true"
v-model="hotspotList[index].link[0].PageName">
<template slot="append">
<el-button @click="isShowLink=true">选择链接</el-button>
</template>
</el-input>
<div style="border:1px solid #dcdfe6;padding:5px;">
<el-input size="small" style="width: 100%;margin-bottom:5px;" placeholder="名称"
v-model="hotspotList[index].link[0].PageName">
</el-input>
<el-input size="small" style="width: 100%;" placeholder="点击选择链接"
v-model="hotspotList[index].link[0].PageUrl">
<template slot="append">
<el-button @click="isShowLink=true">选择链接</el-button>
</template>
</el-input>
</div>
</template>
<template v-else>
<el-input size="small" style="width: 100%;" :disabled="true" v-model="hotspotList[index].link.PageName">
<el-input size="small" style="width: 100%;" v-model="hotspotList[index].link.PageUrl">
<template slot="append">
<el-button @click="isShowLink=true">选择链接</el-button>
</template>
......
......@@ -36,7 +36,8 @@
</div>
</el-form-item>
<el-form-item class="chooseLink" label="版权链接">
<el-input v-model="data.link" placeholder="点击选择链接" :disabled="true" size="small">
<!--:disabled="true"-->
<el-input v-model="data.link" placeholder="点击选择链接" size="small">
<el-button slot="append" size="small" @click="isShowLink=true">选择链接</el-button>
</el-input>
</el-form-item>
......
......@@ -113,7 +113,8 @@
</div>
<div class="chooseLink">
<div style="margin: 5px 0;">广告链接</div>
<el-input v-model="item.link.url" placeholder="点击选择链接" :disabled="true" size="small">
<!--:disabled="true"-->
<el-input v-model="item.link.url" placeholder="点击选择链接" size="small">
<el-button slot="append" size="small" @click="isShowLink=true,comImgIndex=index">选择链接
</el-button>
</el-input>
......
......@@ -195,13 +195,17 @@
</div>
</el-form-item>
<el-form-item label="选择链接">
<el-input size="small" v-if="rubData.data.list&&rubData.data.list.length>0
&& rubData.data.list[rubik].link && rubData.data.list[rubik].link.length>0" v-model="
rubData.data.list[rubik].link[0].PageName" :disabled="true">
<template slot="append">
<el-button @click="isShowLink=true">选择链接</el-button>
</template>
</el-input>
<div style="border:1px solid #dcdfe6;padding:5px;" v-if="rubData.data.list&&rubData.data.list.length>0
&& rubData.data.list[rubik].link && rubData.data.list[rubik].link.length>0">
<el-input size="small" style="width: 100%;margin-bottom:5px;" placeholder="名称"
v-model="rubData.data.list[rubik].link[0].PageName">
</el-input>
<el-input size="small" v-model="rubData.data.list[rubik].link[0].PageUrl" placeholder="点击选择链接">
<template slot="append">
<el-button @click="isShowLink=true">选择链接</el-button>
</template>
</el-input>
</div>
</el-form-item>
</el-card>
</template>
......
......@@ -1633,6 +1633,8 @@
catList: [], //分类列表
},
};
this.dataList.push(PPPlusObj);
break;
//首店活动
case "tradeActivity":
let tradeActivityObj = {
......
......@@ -54,7 +54,7 @@
@keyup.native="checkInteger(searchData.CompData,'FileCount')" size="small"></el-input>
</el-form-item>
<el-form-item label="选择文件" v-if="searchData.CompData.FileCount>0">
<div style="display:flex;">
<div style="display:flex;flex-wrap:wrap;">
<div class="goods-add" style="width:50px;height:50px;" v-for="(item,index) in searchData.CompData.FileList"
:key="index" :style="{ backgroundImage: 'url(' + item + ')' }">
<el-button size="small" icon="el-icon-plus" @click="ckedIndex=index,choicImg=true"></el-button>
......
<style>
.diy-component-edit .goods-add {
width: 50px;
height: 50px;
position: relative;
margin-right: 15px;
margin-bottom: 15px;
}
.diy-component-edit .goods-add .el-button {
width: 100%;
height: 100%;
border-radius: 0;
padding: 0;
}
</style>
<template>
<div :class="{'active':searchData.isCked}">
<div class="diy-component-options" v-if="searchData.isCked">
<el-button type="primary" icon="el-icon-delete" style="left: -25px; top: 0px;" @click="delPlugin()"></el-button>
<el-button type="primary" icon="el-icon-document-copy" style="left: -25px; top: 30px;"></el-button>
<el-button type="primary" icon="el-icon-arrow-up" v-if="index>0" @click="resetSord(0)"
style="right: -25px; top: 0;"></el-button>
<el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)"
style="right: -25px; top: 30px;"></el-button>
</div>
<div class="diy-component-preview">
<div class="diy-search" style="min-height:91px;">
<el-form label-width="90px">
<el-form-item :label="searchData.CompData.Name" style="margin-bottom:0">
<div>
<template v-for="(item,index) in searchData.CompData.FileList">
<template v-if="item">
<img :key="index" :src="item" style="width:80px;margin-right:20px;" alt="">
</template>
<template v-else>
<img :key="index" src="../../../assets/img/default.png" style="width:80px;margin-right:20px;" alt="">
</template>
</template>
<div class="tradeRemark" style="margin-top:0;">{{searchData.CompData.Remark}}</div>
</div>
</el-form-item>
</el-form>
</div>
</div>
<div class="diy-component-edit" v-if="searchData.isCked">
<el-form label-width="100px">
<el-form-item label="名称" required>
<el-input v-model="searchData.CompData.Name" size="small"></el-input>
</el-form-item>
<el-form-item label="上传文件数量">
<el-input v-model="searchData.CompData.FileCount"
@keyup.native="checkInteger(searchData.CompData,'FileCount')" size="small"></el-input>
</el-form-item>
<el-form-item label="选择文件" v-if="searchData.CompData.FileCount>0">
<div style="display:flex;flex-wrap:wrap;">
<div class="goods-add" style="width:50px;height:50px;" v-for="(item,index) in searchData.CompData.FileList"
:key="index" :style="{ backgroundImage: 'url(' + item + ')' }">
<el-button size="small" icon="el-icon-plus" @click="ckedIndex=index,choicImg=true"></el-button>
</div>
</div>
</el-form-item>
<el-form-item label="文件类型">
<el-select v-model="searchData.CompData.FileType" size="small" placeholder="请选择">
<el-option v-for="item in FileTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="上传文件大小">
<el-input v-model="searchData.CompData.FileSizeLimit"
@keyup.native="checkInteger(searchData.CompData,'FileSizeLimit')" size="small"></el-input>
</el-form-item>
<el-form-item label="提示文字">
<el-input type="textarea" v-model="searchData.CompData.Remark" size="small"></el-input>
</el-form-item>
</el-form>
</div>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
export default {
props: ["searchData", "index", "dataLeng"],
components: {
ChooseImg
},
data() {
return {
choicImg: false,
ckedIndex: -1,
FileTypeList: [
// {
// label: 'Excel',
// value: '.xls,.xlsx'
// },{
// label: 'ppt',
// value: '.ppt,pptx'
// },{
// label: 'word',
// value: '.doc,.docx'
// },
{
label:'pdf',
value: '.pdf'
}]
};
},
created() {},
watch: {
'searchData.CompData.FileCount'(val, oldVal) {
var newSize = 0;
if (val != "") {
newSize = parseInt(val);
}
var oldSize = 0;
if (oldVal != "") {
oldSize = parseInt(oldVal);
}
if (newSize > 0 && oldSize == 0) {
for (var i = 0; i < newSize; i++) {
this.searchData.CompData.FileList.push("");
}
}
//清空
else if (oldSize > 0 && newSize == 0) {
this.searchData.CompData.FileList = [];
} else if (oldSize > 0 && newSize > 0 && newSize > oldSize) {
for (var i = oldSize; i < newSize; i++) {
this.searchData.CompData.FileList.push("");
}
} else if (oldSize > 0 && newSize > 0 && newSize < oldSize) {
var tempArray = JSON.parse(JSON.stringify(this.searchData.CompData.FileList));
this.searchData.CompData.FileList = [];
for (var i = 0; i < newSize; i++) {
this.searchData.CompData.FileList.push(tempArray[i]);
}
}
}
},
methods: {
//选择图片
SelectId(msg) {
this.searchData.CompData.FileList[this.ckedIndex] = msg.url;
this.choicImg = false;
},
//向父组件传值 并调用排序
resetSord(IsUp) {
this.$emit('getSord', this.index, IsUp);
},
//点击触发父组件删除
delPlugin() {
this.$emit('comDelPlugin', this.index);
}
},
mounted() {}
};
</script>
......@@ -37,7 +37,7 @@
@keyup.native="checkInteger(searchData.CompData,'FileCount')" size="small"></el-input>
</el-form-item>
<el-form-item label="选择文件" v-if="searchData.CompData.FileCount>0">
<div style="display:flex;">
<div style="display:flex;flex-wrap:wrap;">
<div class="goods-add" style="width:50px;height:50px;" v-for="(item,index) in searchData.CompData.FileList"
:key="index" :style="{ backgroundImage: 'url(' + item + ')' }">
<el-button size="small" icon="el-icon-plus" @click="ckedIndex=index,choicImg=true"></el-button>
......
......@@ -88,10 +88,6 @@
width: 375px;
}
.registraType .el-radio:last-child {
margin-left: 28px;
}
.tpEdit_header {
padding: 18px;
background: #fff;
......@@ -332,6 +328,8 @@
:index="index" :dataLeng="addMsg.FormData.length"></imgupform>
<videoform v-if="item.CompKey=='VideoUploadComp'" :searchData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="addMsg.FormData.length"></videoform>
<uploadform v-if="item.CompKey=='CommonUploadComp'" :searchData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="addMsg.FormData.length"></uploadform>
</div>
</div>
</div>
......@@ -349,6 +347,7 @@
import dropdown from '../tradePavilion/plugin/dropdown'
import imgupform from '../tradePavilion/plugin/imgupform'
import videoform from '../tradePavilion/plugin/videoform'
import uploadform from '../tradePavilion/plugin/uploadform'
export default {
data() {
return {
......@@ -377,7 +376,8 @@
multilinetext,
dropdown,
imgupform,
videoform
videoform,
uploadform
},
mounted() {
......@@ -472,6 +472,7 @@
CompData: {
Name: "", //名字
FileCount: '', //上传文件数量
FileType: '',
FileSizeLimit: '', //上传文件大小
Remark:'',//提示信息
FileList:[],//文件列表
......@@ -487,6 +488,7 @@
CompData: {
Name: "", //名字
FileCount: '', //上传文件数量
FileType: '',
FileSizeLimit: '', //上传文件大小
Remark:'',//提示信息
FileList:[],//文件列表
......@@ -494,6 +496,22 @@
};
this.addMsg.FormData.push(videoObj);
break;
//文件上传组件
case "CommonUploadComp":
let uploadObj = {
CompKey: "CommonUploadComp",
isCked: false,
CompData: {
Name: "", //名字
FileType:'', //文件类型
FileCount: '', //上传文件数量
FileSizeLimit: '', //上传文件大小
Remark:'',//提示信息
FileList:[],//文件列表
},
};
this.addMsg.FormData.push(uploadObj);
break;
}
},
//获取对应类型
......
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