...
|
...
|
@@ -25,7 +25,8 @@ |
|
|
<Input v-model="prize.total" placeholder="奖品总数"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="中奖概率" prop="chance">
|
|
|
<Input v-model="prize.chance" placeholder="中奖概率"></Input>
|
|
|
<Col span="18">
|
|
|
<Input v-model="prize.chance" placeholder="中奖概率请输入小数或者整数"></Input></Col>%
|
|
|
</FormItem>
|
|
|
<FormItem label="奖品图片" prop="prize_bg">
|
|
|
<img class="win-prize-bg" v-show="prize.img" :src="prize.img">
|
...
|
...
|
@@ -57,7 +58,7 @@ |
|
|
|
|
|
export default {
|
|
|
name: 'AddPrize',
|
|
|
data() {
|
|
|
data: function() {
|
|
|
return {
|
|
|
actId: 0,
|
|
|
split: 0.3,
|
...
|
...
|
@@ -87,7 +88,70 @@ |
|
|
},
|
|
|
{
|
|
|
title: '中奖概率',
|
|
|
key: 'chance'
|
|
|
render: (h, {row}) => {
|
|
|
return h('span', {}, row.chance + '%');
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '奖品图片',
|
|
|
key: 'img',
|
|
|
render: (h, {row}) => {
|
|
|
return h('img', {
|
|
|
attrs: {
|
|
|
src: row.img
|
|
|
},
|
|
|
style: {
|
|
|
width: '100%',
|
|
|
height: 'auto'
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '奖品操作',
|
|
|
render: (h, {row}) => {
|
|
|
return h('Button', {
|
|
|
props: {
|
|
|
type: 'error',
|
|
|
size: 'small'
|
|
|
},
|
|
|
on: {
|
|
|
click: () => {
|
|
|
this.deletePrize(row.id, row._index);
|
|
|
}
|
|
|
}
|
|
|
}, '删除');
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
prizeAddColumns: [
|
|
|
{
|
|
|
title: '位置序号',
|
|
|
key: 'prize_idx'
|
|
|
},
|
|
|
{
|
|
|
title: '奖品名称',
|
|
|
key: 'name'
|
|
|
},
|
|
|
{
|
|
|
title: '奖品类型',
|
|
|
render: (h, {row}) => {
|
|
|
return h('span', {}, pirzeType[row.type]);
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '奖品值',
|
|
|
key: 'value'
|
|
|
},
|
|
|
{
|
|
|
title: '奖品总数',
|
|
|
key: 'total'
|
|
|
},
|
|
|
{
|
|
|
title: '中奖概率',
|
|
|
render: (h, {row}) => {
|
|
|
return h('span', {}, row.chance + '%');
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '奖品图片',
|
...
|
...
|
@@ -121,7 +185,6 @@ |
|
|
}
|
|
|
}
|
|
|
],
|
|
|
prizeAddColumns: null,
|
|
|
prize: {
|
|
|
act_id: '',
|
|
|
name: '',
|
...
|
...
|
@@ -316,11 +379,6 @@ |
|
|
this.prize.act_id = this.actId;
|
|
|
this.prizeList();
|
|
|
this.bindUpload();
|
|
|
},
|
|
|
created() {
|
|
|
let arr = this.prizeColumns;
|
|
|
|
|
|
this.prizeAddColumns = arr.splice(arr.length - 1, 1);
|
|
|
}
|
|
|
};
|
|
|
</script>
|
...
|
...
|
|