Commit 0d596fed authored by zhengke's avatar zhengke

修改

parent 262e159c
<style>
.tradeActiviTy .el-form-item__label{
line-height: 23px;
.tradeAdd{
width: 40px;
height: 40px;
border: 1px solid #d1d1d1;
border-radius: 50%;
text-align: center;
line-height: 35px;
font-size: 30px;
color: #d1d1d1;
background-color: #409EFF;
cursor: pointer;
color:#fff;
}
</style>
<template>
......@@ -16,25 +26,39 @@
</div>
<div class="diy-component-preview">
<div class="diy-link" flex="cross:center;" style="background:#fff;">
<div flex="dir:left cross:center" style="margin:20px;">
<div flex="dir:left cross:center" style="margin:20px;justify-content:space-between;">
<div class="title" style="text-align: left">
活动编号:{{data.ActivityIds}}
活动名称:萨达
</div>
<div class="title" style="text-align: left;margin-left:20px;">
默认活动编号: {{data.DefaultActivityId}}
默认活动编号: 123
</div>
</div>
</div>
</div>
<div class="diy-component-edit tradeActiviTy" v-if="tradeActivityData.isCked">
<el-form label-width="100px" @submit.native.prevent>
<el-form-item label="活动编号(多个逗号分隔)">
<el-input size="small" style="width:200px;" v-model="data.ActivityIds"></el-input>
</el-form-item>
<el-form-item label="默认活动编号">
<el-input size="small" style="width:200px;" v-model="data.DefaultActivityId"></el-input>
</el-form-item>
</el-form>
<div v-for="(item,index) in tradeActivityData.data" :key="index" style="position:relative;border:1px solid #d1d1d1;width:345px;margin-bottom:20px;">
<el-form label-width="100px" @submit.native.prevent >
<el-form-item label="活动名称">
<el-input size="small" style="width:200px;" v-model="item.GroupName"></el-input>
</el-form-item>
<el-form-item label="日期">
<el-input size="small" style="width:200px;" v-model="item.DateStr"></el-input>
</el-form-item>
<el-form-item label="活动编号">
<el-input size="small" style="width:200px;" v-model="item.NewActivitys"></el-input>
</el-form-item>
<el-form-item label="是否默认活动">
<el-radio v-model="item.IsDefaultActivity" :label="0"></el-radio>
<el-radio v-model="item.IsDefaultActivity" :label="1"></el-radio>
</el-form-item>
</el-form>
<div style="position:absolute;right:0;top:0;width:20px;height:20px;
border-radius:50%;background-color:red;color:#fff;text-align:center;cursor:pointer;" @click="removeTrade(index)">
<i class="el-icon-close"></i>
</div>
</div>
<div class="tradeAdd" @click="addAtradeObj()">+</div>
</div>
</div>
</template>
......@@ -69,6 +93,20 @@
delPlugin() {
this.$emit('comDelPlugin', this.index);
},
//点击添加
addAtradeObj(){
let obj={
GroupName:'',
DateStr:'',
NewActivity:'',
IsDefaultActivity:0 //0不是 1是
}
this.tradeActivityData.data.push(obj);
},
//删除
removeTrade(index){
this.tradeActivityData.data.splice(index,1);
}
},
computed: {
......
......@@ -1640,10 +1640,7 @@
let tradeActivityObj = {
Id: "tradeActivity",
isCked: false,
data: {
ActivityIds: "", //活动编号[多个逗号分割]
DefaultActivityId: "", //默认选中活动
},
data: []
};
this.dataList.push(tradeActivityObj);
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