Commit d2fe405d by crushh

update: dist

parent 71884b56
......@@ -278,7 +278,7 @@ export default {
this.submitData = JSON.parse(JSON.stringify(this.submitData));
console.log(this.submitData);
const { ruleId, winChance, filterJson, filterJsonView, memberDesc, memberType, playConditionFlag, playTimes, shareFlag, shareImageUrl, gameRuleConditionList, gameName, gamePrizeList, prizeNoticeStock, prizeNoticeFlag, adsFlag, bulletFlag, backMusicFlag, templateId, gameRule, gameTime, gameExt } = this.submitData;
const gameRuleInfo = { ruleId, winChance, filterJson, filterJsonView, memberDesc, memberType, playConditionFlag, playTimes, shareFlag, shareImageUrl, shareRuleDesc: gameName };
const gameRuleInfo = { ruleId, winChance, filterJson, filterJsonView, memberDesc, memberType, playConditionFlag, playTimes, shareFlag, shareImageUrl };
let cardIdArr = [];
let zeroStock = [];
gamePrizeList.forEach(item => {
......@@ -312,13 +312,18 @@ export default {
return;
}
}
gameRuleConditionList.forEach(item => {
if (item.conditionType == 1) {
gameExt.shareCard.materialValue = item.conditionJson.shareCard;
gameExt.shareReport.materialValue = item.conditionJson.shareReport;
gameRuleInfo.shareRuleDesc = item.conditionJson.shareTitle;
}
item.conditionJson = JSON.stringify(item.conditionJson);
});
if (!gameRuleConditionList.filter(item => item.conditionType == 1).length && shareFlag) {
gameRuleInfo.shareRuleDesc = gameName;
}
if (this.isCopy) {
Object.values(gameExt).forEach(item => {
delete item.gameExtId;
......
......@@ -41,26 +41,26 @@
<table>
<thead>
<tr>
<th class="tableHead">奖品类型</th>
<th class="tableHead" style="min-width: 75px;">奖品类型</th>
<th class="tableHead">奖项设置</th>
<th class="tableHead">奖品名称</th>
<th class="tableHead">奖品图片</th>
<th class="tableHead">奖品数量</th>
<th class="tableHead" style="min-width: 75px;">奖品数量</th>
<th class="tableHead">奖品说明</th>
<th class="tableHead">中奖率</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in form.gamePrizeList" :key="index" :class="item.status != 0 ? 'invalid' : ''">
<td class="cell" style="minWidth:80px">
<td class="cell">
{{ prizeType[item.prizeType] }}
</td>
<td class="cell" style="minWidth:200px">
<td class="cell">
<div v-if="item.prizeType == 2" class="flex">
<el-tag v-if="item.status == 1" size="mini" type="danger" class="tagIcon">删除</el-tag>
<el-tag v-if="item.status == 2" size="mini" type="danger" class="tagIcon">失效</el-tag>
<el-tooltip :content="item.cardName" placement="top">
<div class="ellips maxW">{{ item.cardName }}</div>
<div class="ellips" :style="desW ? `width:${desW / 2}px` : ''">{{ item.cardName }}</div>
</el-tooltip>
</div>
<div v-if="item.prizeType == 1">
......@@ -70,23 +70,23 @@
- -
</div>
</td>
<td class="cell" style="minWidth:200px">
<div class="ellips maxW" style="max-width: 200px;">{{ item.prizeName }}</div>
<td class="cell">
<div>{{ item.prizeName }}</div>
</td>
<td class="cell" style="minWidth:100px">
<td class="cell">
<img :src="item.prizeImageUrl" v-if="item.prizeType != 0" />
<span v-else>- -</span>
</td>
<td class="cell" style="minWidth:100px">
<td class="cell">
<span v-if="item.prizeType != 0"> {{ item.prizeStock }}</span>
<span v-else>- -</span>
</td>
<td class="cell" style="minWidth:200px">
<td class="cell">
<el-tooltip :content="item.prizeDesc" placement="top">
<div class="ellips maxW">{{ item.prizeDesc }}</div>
<div class="ellips" :style="desW ? `width:${desW / 2}px` : ''">{{ item.prizeDesc }}</div>
</el-tooltip>
</td>
<td class="cell" style="minWidth:80px">{{ item.prizeRate }}%</td>
<td class="cell">{{ item.prizeRate }}%</td>
</tr>
</tbody>
</table>
......@@ -96,8 +96,12 @@
<div class="section">
<el-descriptions column="3">
<el-descriptions-item label="参与人群">{{ form.gameRuleInfo.memberType == 0 && !form.gameRuleInfo.filterJson ? '全部人群' : '' }} </el-descriptions-item>
<el-descriptions-item label="适用人群说明" :labelStyle="labelStyle">
{{ form.gameRuleInfo && form.gameRuleInfo.memberDesc }}
<el-descriptions-item label="适用人群说明" :labelStyle="labelStyle" v-if="form.gameRuleInfo">
<el-tooltip :content="form.gameRuleInfo.memberDesc" placement="top">
<div class="ellips" :style="desW ? `width:${desW}px` : ''">
{{ form.gameRuleInfo.memberDesc }}
</div>
</el-tooltip>
</el-descriptions-item>
</el-descriptions>
<div v-show="form.gameRuleInfo.memberType == 0 && form.gameRuleInfo.filterJson">
......@@ -194,7 +198,7 @@ export default {
gameRuleInfo: {},
memberWeightView: {}
},
desW: 0,
isPlay: false,
prizeType: {
0: '谢谢参与',
......@@ -214,6 +218,10 @@ export default {
music.currentTime = 0;
this.isPlay = false;
});
const width = document.documentElement.clientWidth;
if (width < 1750) {
this.desW = 300;
}
},
components: {
gicNewMemberGroup
......@@ -295,25 +303,6 @@ export default {
</script>
<style lang="scss" scoped>
/*媒体查询*/
/*当页面大于1200px 时,大屏幕,主要是PC 端*/
@media (min-width: 1200px) {
.maxW {
width: 300px;
}
}
/*在992 和1199 像素之间的屏幕里,中等屏幕,分辨率低的PC*/
@media (min-width: 992px) and (max-width: 1199px) {
.maxW {
width: 150px;
}
}
/*在768 和991 像素之间的屏幕里,小屏幕,主要是PAD*/
@media (min-width: 768px) and (max-width: 991px) {
.maxW {
width: 100px;
}
}
.rightForm {
padding: 30px 20px 0 30px;
box-sizing: border-box;
......@@ -329,11 +318,10 @@ export default {
margin-right: 4px;
}
.ellips {
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
display: inline-block;
}
.section {
padding: 20px 0 18px 0;
......@@ -345,6 +333,7 @@ export default {
margin-top: 10px;
box-sizing: border-box;
padding: 16px 16px;
overflow-x: auto;
table {
width: 100%;
}
......@@ -357,7 +346,7 @@ export default {
line-height: 20px;
}
.cell {
padding: 10px 0 0 0;
padding: 10px 10px 0 0;
line-height: 20px;
vertical-align: middle;
img {
......@@ -366,6 +355,12 @@ export default {
border-radius: 2px;
border: 1px solid #dcdfe6;
}
&:last-child {
padding: 10px 0 0 0;
}
&:first-child {
padding: 10px 0 0 0;
}
}
}
.gameRuleBox {
......
......@@ -278,8 +278,9 @@ export default {
},
methods: {
async cardView() {
let cardIdArr = this.prizeForm.gamePrizeList.filter(item => item.prizeType == 2).map(item => item.prizeRelationId);
let cardIdArr = this.prizeForm.gamePrizeList.filter(item => item.prizeRelationId && item.prizeType == 2);
if (cardIdArr.length) {
cardIdArr = cardIdArr.map(item => item.prizeRelationId);
const { result } = await cardView({ ids: cardIdArr.join(',') });
this.handleInvalidCard(result);
}
......@@ -360,7 +361,6 @@ export default {
data.status = 0;
data.max = selectedData.couponStock;
this.prizeForm.gamePrizeList = this.prizeForm.gamePrizeList.splice(0);
this.$refs.prizeForm.validateField(`gamePrizeList.${this.index}.prizeNameStr`);
},
addPrize() {
......
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