Commit 199867c8 by crushh

update: dist

parent 9d2cdf73
......@@ -92,7 +92,8 @@ export default {
echoData: {},
shareImgData: {},
loading: false,
ruleData: {}
ruleData: {},
bullet: {}
};
},
computed: {
......@@ -174,6 +175,10 @@ export default {
item.conditionJson = JSON.parse(item.conditionJson);
});
}
this.bullet = {
bulletFlag,
bulletImageUrl: gameExt.bulletImageUrl
};
let cardIdArr = [];
gamePrizeList.forEach(item => {
if (item.prizeType == 2) {
......
......@@ -281,7 +281,7 @@ export default {
const prizeNumTotal = this.form.gamePrizeList.map(item => (item.prizeType != 0 ? item.prizeStock : 0)).reduce((pre, current) => pre + current);
this.form.gamePrizeList.forEach(item => {
if (item.prizeType != 0) {
const prizeRate = this.form.gameRuleInfo.winChance * (item.prizeStock / prizeNumTotal);
const prizeRate = prizeNumTotal ? this.form.gameRuleInfo.winChance * (item.prizeStock / prizeNumTotal) : 0;
item.prizeRate = prizeRate.toFixed(2);
}
});
......
......@@ -293,6 +293,7 @@ export default {
console.log(val[1] - val[0]);
console.log((val[1] - val[0]) / (24 * 60 * 60 * 1000) + 1);
this.gameDays = (val[1] - val[0]) / (24 * 60 * 60 * 1000) + 1;
this.gameDays = this.gameDays.toFixed();
}
}
},
......
......@@ -47,6 +47,15 @@
</el-radio-group>
<el-table :data="prizeList" style="width:100%" :span-method="objectSpanMethod" v-if="dimension == '1'" class="mt20">
<el-table-column v-for="v in tableHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="v.prop" :prop="v.prop" :label="v.label" :formatter="v.formatter" :sortable="v.sortable" :fixed="v.fixed">
<template slot="header" v-if="v.tipsContent">
{{ v.label }}
<el-tooltip placement="top">
<div slot="content">
{{ v.tipsContent }}
</div>
<i class="iconfont icon-QuestionCircleOutlined"></i>
</el-tooltip>
</template>
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] }}</span>
......@@ -55,6 +64,15 @@
</el-table>
<el-table :data="prizeList" style="width:100%" v-else class="mt20">
<el-table-column v-for="v in tableHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="v.prop" :prop="v.prop" :label="v.label" :formatter="v.formatter" :sortable="v.sortable" :fixed="v.fixed">
<template slot="header" v-if="v.tipsContent">
{{ v.label }}
<el-tooltip placement="top">
<div slot="content">
{{ v.tipsContent }}
</div>
<i class="iconfont icon-QuestionCircleOutlined"></i>
</el-tooltip>
</template>
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] }}</span>
......@@ -98,6 +116,7 @@ const tableHead = [
label: '中奖率',
prop: 'prizeWinningRate',
minWidth: '120',
tipsContent: '奖项中奖人数/中奖人数',
formatter: function(row) {
return `<span>${!isNaN(row.prizeWinningRate) ? row.prizeWinningRate + '%' : '- -'}</span>`;
}
......@@ -180,6 +199,7 @@ const pointHead = [
label: '中奖率',
prop: 'prizeWinningRate',
minWidth: '120',
tipsContent: '奖项中奖人数/中奖人数',
formatter: function(row) {
return `<span>${row.prizeWinningRate ? row.prizeWinningRate + '%' : '- -'}</span>`;
}
......
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