feat(资源组配置): 新增“荣誉活动”选项

This commit is contained in:
hzj 2025-11-21 20:45:56 +08:00
parent 38ceb50b93
commit 48eeefa8c1

View File

@ -100,7 +100,10 @@
"
>数量{{ item.content }}</span
>
<span v-else-if="item.type === 'BADGE'"
<span
v-else-if="
item.type === 'BADGE' || item.type === 'HONOR_ACTIVITY'
"
>{{ item.badgeName }} 天数{{ item.quantity }}
</span>
<span v-else-if="item.type === 'CUSTOMIZE'"
@ -357,6 +360,84 @@
/>
</el-col>
</el-row>
<el-row
v-else-if="isHONORACTIVITY(item.clickType)"
:gutter="10"
>
<el-col :span="13">
<el-form-item
:prop="'tmpConfigList.' + index + '.content'"
:rules="{
required: true,
message: '必填字段不可为空',
trigger: 'blur'
}"
>
<el-select
v-model="item.content"
placeholder="请选择"
style="width:100%"
filterable
@change="val => changeContent(item, val)"
>
<el-option
v-for="(pItem, pIndex) in propsTypeData[
item.clickType
].list"
:key="pIndex"
:label="pItem.name"
:value="pItem.id"
>
<div style="float: left;">
<img
:src="pItem.cover"
width="40px"
height="40px"
/>
</div>
<div style="float: left;margin-left:10px">
{{ pItem.name }}
</div>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
:prop="'tmpConfigList.' + index + '.quantity'"
:rules="{
required: true,
message: '不可为空',
trigger: 'blur'
}"
>
<!-- <span><el-input v-model="item.quantity" v-number style="width: 100%;" placeholder="天数" /></span> -->
<el-autocomplete
v-model="item.quantity"
v-number
popper-class="my-autocomplete"
:fetch-suggestions="querySearchBadgeRestaurants"
placeholder="天数"
>
<template slot-scope="{ item }">
<div class="name">{{ item.value }}</div>
<span class="addr">{{ item.label }}</span>
</template>
</el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="5">
<i
class="del el-icon-delete-solid"
@click="form.tmpConfigList = []"
/>
<i
class="save el-icon-success"
@click="submitItem(index)"
/>
</el-col>
</el-row>
<el-row v-else-if="isCustomize(item.clickType)" :gutter="10">
<el-col :span="3">
<div
@ -664,6 +745,13 @@
@click="addContent('PROP_COUPON')"
><i class="el-icon-circle-plus" />道具券</el-button
>
<el-button
type="text"
:disabled="disableAddContent"
:loading="propsTypeData['HONOR_ACTIVITY'].loading"
@click="addContent('HONOR_ACTIVITY')"
><i class="el-icon-circle-plus" />荣誉活动</el-button
>
</div>
</el-form-item>
</el-form>
@ -785,6 +873,11 @@ export default {
loading: false,
loadData: false,
list: []
},
HONOR_ACTIVITY: {
loading: false,
loadData: false,
list: []
}
},
propsTypeMap: {
@ -865,6 +958,11 @@ export default {
DATA_CARD: {
value: "PROPS",
name: "资料卡"
},
HONOR_ACTIVITY: {
value: "HONOR_ACTIVITY",
name: "荣誉-活动"
}
},
isChangeSource: false,
@ -1056,6 +1154,10 @@ export default {
that.addContentData(type);
return;
}
// if (that.isHONORACTIVITY(type)) {
// that.addContentData(type);
// return;
// }
if (that.propsTypeData[type].loadData === true) {
that.addContentData(type);
return;
@ -1207,6 +1309,10 @@ export default {
if (this.isRoomBadge(type)) {
return "ROOM_ACHIEVEMENT";
}
if (this.isHONORACTIVITY(type)) {
return "HONOR_ACTIVITY";
}
return null;
},
isCurrency(type) {
@ -1220,6 +1326,10 @@ export default {
isPROPCOUPON(type) {
return type === "PROP_COUPON";
},
//
isHONORACTIVITY(type) {
return type === "HONOR_ACTIVITY";
},
isBadge(type) {
return this.isRoomBadge(type) || this.isUserBadge(type);
},