幸运24-后台-额外数组配置-根据三天内投产比较
This commit is contained in:
@@ -423,38 +423,52 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>单次投入金币门槛</span>
|
<span>当天获得次数限制</span>
|
||||||
<el-input v-model="inquire.extraPoolConfig.inputThreshold"
|
<el-input v-model="inquire.extraPoolConfig.dayCountLimit"
|
||||||
class="input"
|
class="input"
|
||||||
disabled></el-input>
|
disabled></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>用户充值等级</span>
|
<span>当天进入判断点位(最后一位循环判断)</span>
|
||||||
<el-input v-model="inquire.extraPoolConfig.userRechargeLevels"
|
<el-input v-model="inquire.extraPoolConfig.timesJudgeArray"
|
||||||
class="input"
|
class="input"
|
||||||
disabled></el-input>
|
disabled></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>当天退出率</span>
|
<span>配置</span>
|
||||||
<el-input v-model="inquire.extraPoolConfig.todayProductionRatio"
|
<!-- 使用卡片展示judgeConfig -->
|
||||||
class="input"
|
<el-card v-for="(level2Obj, level1Key) in inquire.extraPoolConfig.judgeConfig"
|
||||||
disabled></el-input>
|
:key="level1Key"
|
||||||
</div>
|
class="judge-config-card">
|
||||||
|
<template #header>
|
||||||
<div class="inquire">
|
<span>当天内平均进入大于等于 {{ level1Key }}</span>
|
||||||
<span>当天差额</span>
|
</template>
|
||||||
<el-input v-model="inquire.extraPoolConfig.todayDiff"
|
<el-table :data="getLevel2TableData(level2Obj)" style="width: 100%" border stripe>
|
||||||
class="input"
|
<el-table-column prop="level2Key" label="三天内总进入/三天内投产比" />
|
||||||
disabled></el-input>
|
<el-table-column label="1000">
|
||||||
</div>
|
<template #default="scope">
|
||||||
|
{{ getKeyByValue(scope.row.level3Obj, 1000) }}
|
||||||
<div class="inquire">
|
</template>
|
||||||
<span>近两天获得次数限制</span>
|
</el-table-column>
|
||||||
<el-input v-model="inquire.extraPoolConfig.twoDayCountLimit"
|
<el-table-column label="500">
|
||||||
class="input"
|
<template #default="scope">
|
||||||
disabled></el-input>
|
{{ getKeyByValue(scope.row.level3Obj, 500) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="250">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ getKeyByValue(scope.row.level3Obj, 250) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="100">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ getKeyByValue(scope.row.level3Obj, 100) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button class="primary"
|
<el-button class="primary"
|
||||||
@@ -607,25 +621,14 @@
|
|||||||
class="input" />
|
class="input" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单次投入金币门槛">
|
<el-form-item label="当天获得次数限制">
|
||||||
<el-input v-model="inquire.extraPoolConfig.inputThreshold" />
|
<el-input v-model="inquire.extraPoolConfig.dayCountLimit"
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户充值等级">
|
|
||||||
<el-input v-model="inquire.extraPoolConfig.userRechargeLevels" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="当天退出率">
|
|
||||||
<el-input v-model="inquire.extraPoolConfig.todayProductionRatio"
|
|
||||||
class="input"></el-input>
|
class="input"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="当天差额">
|
<el-form-item label="当天进入判断点位(最后一位循环判断)">
|
||||||
<el-input v-model="inquire.extraPoolConfig.todayDiff"
|
<el-input v-model="inquire.extraPoolConfig.timesJudgeArray"
|
||||||
class="input"></el-input>
|
class="input"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="近两天获得次数限制">
|
|
||||||
<el-input v-model="inquire.extraPoolConfig.twoDayCountLimit"
|
|
||||||
class="input"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="extraPoolDialog = false">取消</el-button>
|
<el-button @click="extraPoolDialog = false">取消</el-button>
|
||||||
@@ -696,6 +699,9 @@ export default {
|
|||||||
multiEditDialogTitle: "",
|
multiEditDialogTitle: "",
|
||||||
detailsDialog: false,
|
detailsDialog: false,
|
||||||
extraPoolDialog: false,
|
extraPoolDialog: false,
|
||||||
|
judgeConfigDialogVisible: false,
|
||||||
|
activeJudgeTab: '0',
|
||||||
|
tempJudgeConfig: {}, // 用于临时存储编辑的judgeConfig
|
||||||
extraDialogButClick: true,
|
extraDialogButClick: true,
|
||||||
value: "",
|
value: "",
|
||||||
type: null,
|
type: null,
|
||||||
@@ -741,9 +747,29 @@ export default {
|
|||||||
|
|
||||||
this.inquire.extraStock = res.data.extraStock;
|
this.inquire.extraStock = res.data.extraStock;
|
||||||
this.inquire.extraPoolConfig = res.data.extraPoolConfig;
|
this.inquire.extraPoolConfig = res.data.extraPoolConfig;
|
||||||
this.inquire.extraPoolConfig.userRechargeLevels = res.data.extraPoolConfig.userRechargeLevels.join(',');
|
this.inquire.extraPoolConfig.timesJudgeArray = res.data.extraPoolConfig.timesJudgeArray.join(',');
|
||||||
|
this.inquire.extraPoolConfig.judgeConfigTree = this.convertToTree(res.data.extraPoolConfig.judgeConfig)
|
||||||
|
console.info(this.inquire.extraPoolConfig.judgeConfigTree)
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 获取第二层表格数据
|
||||||
|
getLevel2TableData(level2Obj) {
|
||||||
|
return Object.keys(level2Obj).map(level2Key => ({
|
||||||
|
level2Key,
|
||||||
|
level3Obj: level2Obj[level2Key]
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
// 根据值获取键
|
||||||
|
getKeyByValue(obj, value) {
|
||||||
|
for (const key in obj) {
|
||||||
|
if (obj[key] === value) {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ''; // 如果没有找到对应的值,返回空字符串
|
||||||
|
},
|
||||||
// 排序
|
// 排序
|
||||||
sortK12 (kObj) {
|
sortK12 (kObj) {
|
||||||
// 创建一个新对象以保持排序后的键值对
|
// 创建一个新对象以保持排序后的键值对
|
||||||
@@ -927,7 +953,7 @@ export default {
|
|||||||
obj.partitionId = this.inquire.value;
|
obj.partitionId = this.inquire.value;
|
||||||
obj.extraPoolConfig = this.inquire.extraPoolConfig;
|
obj.extraPoolConfig = this.inquire.extraPoolConfig;
|
||||||
console.info(this.inquire.extraPoolConfig.userRechargeLevels)
|
console.info(this.inquire.extraPoolConfig.userRechargeLevels)
|
||||||
obj.extraPoolConfig.userRechargeLevels = this.inquire.extraPoolConfig.userRechargeLevels.split(",");
|
obj.extraPoolConfig.timesJudgeArray = this.inquire.extraPoolConfig.timesJudgeArray.split(",");
|
||||||
updateSet(obj).then((res) => {
|
updateSet(obj).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@@ -976,4 +1002,23 @@ export default {
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 卡片样式适配表单项
|
||||||
|
.judge-config-card {
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.el-card__header {
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #303133;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
.el-card__body {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Reference in New Issue
Block a user