1.优化测试权重表单样式

This commit is contained in:
2026-06-03 17:47:24 +08:00
parent 5eb0ac24cd
commit 1980ff4af0
3 changed files with 150 additions and 118 deletions

View File

@@ -65,12 +65,12 @@
"poolProfitRef": "Reference: default pool profit {profit}, pool config safety line {line}", "poolProfitRef": "Reference: default pool profit {profit}, pool config safety line {line}",
"killModeOffHint": "When off, all draws follow paid/free settings without kill switching.", "killModeOffHint": "When off, all draws follow paid/free settings without kill switching.",
"sectionPaid": "Paid draws", "sectionPaid": "Paid draws",
"sectionFreeAfterPlayAgain": "Free draw tier odds (after play-again)", "sectionFreeAfterPlayAgain": "Free draws (play again)",
"tierProbHintFreeChain": "When using custom tier odds: T1T5 below apply when a free draw runs (tier roll; combined with dice_reward row weights).", "tierProbHintFreeChain": "Custom tiers: T1T5 odds for free draws (combined with dice_reward row weights).",
"stepPaid": "Paid ticket", "stepPaid": "Paid ticket",
"stepFree": "Free ticket", "stepFree": "Free ticket",
"labelLotteryTypePaid": "Test pool type", "labelLotteryTypePaid": "Paid tier pool",
"labelLotteryTypeFree": "Test pool type", "labelLotteryTypeFree": "Free tier pool",
"labelAnte": "Ante", "labelAnte": "Ante",
"placeholderAnte": "Select ante config", "placeholderAnte": "Select ante config",
"placeholderPaidPool": "Leave empty for custom tier odds below (default: default)", "placeholderPaidPool": "Leave empty for custom tier odds below (default: default)",

View File

@@ -65,12 +65,12 @@
"poolProfitRef": "参考:当前 default 池盈利 {profit},彩金池配置安全线 {line}", "poolProfitRef": "参考:当前 default 池盈利 {profit},彩金池配置安全线 {line}",
"killModeOffHint": "关闭时全程按付费/免费配置抽档,不模拟杀分切换。", "killModeOffHint": "关闭时全程按付费/免费配置抽档,不模拟杀分切换。",
"sectionPaid": "付费抽奖", "sectionPaid": "付费抽奖",
"sectionFreeAfterPlayAgain": "免费抽奖(再来一次后的档位概率", "sectionFreeAfterPlayAgain": "免费抽奖(再来一次)",
"tierProbHintFreeChain": "当使用自定义档位时:以下为「免费抽奖」时 T1T5 档位概率(仅在有免费局时参与摇档,与 dice_reward 格子权重共同决定结果)。", "tierProbHintFreeChain": "自定义档位时:免费局 T1T5 档位概率(与 dice_reward 格子权重共同决定结果)。",
"stepPaid": "付费抽奖券", "stepPaid": "付费抽奖券",
"stepFree": "免费抽奖券", "stepFree": "免费抽奖券",
"labelLotteryTypePaid": "测试数据档位类型", "labelLotteryTypePaid": "付费档位奖池",
"labelLotteryTypeFree": "测试数据档位类型", "labelLotteryTypeFree": "免费档位奖池",
"labelAnte": "底注", "labelAnte": "底注",
"placeholderAnte": "请选择底注配置", "placeholderAnte": "请选择底注配置",
"placeholderPaidPool": "不选则下方自定义档位概率(默认 default", "placeholderPaidPool": "不选则下方自定义档位概率(默认 default",

View File

@@ -2,7 +2,7 @@
<ElDialog <ElDialog
v-model="visible" v-model="visible"
:title="$t('page.weightTest.title')" :title="$t('page.weightTest.title')"
width="920px" width="960px"
top="4vh" top="4vh"
class="weight-test-dialog" class="weight-test-dialog"
:close-on-click-modal="false" :close-on-click-modal="false"
@@ -51,20 +51,16 @@
/> />
</div> </div>
<div v-if="form.kill_mode_enabled" class="kill-mode-body"> <div v-if="form.kill_mode_enabled" class="kill-mode-body">
<ElFormItem <div class="kill-mode-field">
:label="$t('page.weightTest.labelTestSafetyLine')" <div class="kill-mode-field-label">{{ $t('page.weightTest.labelTestSafetyLine') }}</div>
prop="test_safety_line"
class="kill-safety-item"
label-width="96px"
>
<ElInputNumber <ElInputNumber
v-model="form.test_safety_line" v-model="form.test_safety_line"
:min="0" :min="0"
:step="100" :step="100"
controls-position="right" controls-position="right"
style="width: 100%" class="kill-mode-field-input"
/> />
</ElFormItem> </div>
<div class="kill-mode-hint">{{ $t('page.weightTest.testSafetyLineHint') }}</div> <div class="kill-mode-hint">{{ $t('page.weightTest.testSafetyLineHint') }}</div>
<div v-if="defaultPoolInfo" class="kill-mode-ref"> <div v-if="defaultPoolInfo" class="kill-mode-ref">
{{ $t('page.weightTest.poolProfitRef', { {{ $t('page.weightTest.poolProfitRef', {
@@ -79,108 +75,118 @@
<ElRow :gutter="20" class="section-row"> <ElRow :gutter="20" class="section-row">
<ElCol :span="12"> <ElCol :span="12">
<div class="section-title">{{ $t('page.weightTest.sectionPaid') }}</div> <div class="section-title">{{ $t('page.weightTest.sectionPaid') }}</div>
<ElFormItem :label="$t('page.weightTest.labelLotteryTypePaid')" prop="paid_lottery_config_id"> <ElForm :model="form" label-position="top" class="section-form">
<ElSelect <ElFormItem :label="$t('page.weightTest.labelLotteryTypePaid')" prop="paid_lottery_config_id">
v-model="form.paid_lottery_config_id" <ElSelect
:placeholder="$t('page.weightTest.placeholderPaidPool')" v-model="form.paid_lottery_config_id"
clearable :placeholder="$t('page.weightTest.placeholderPaidPool')"
filterable clearable
style="width: 100%" filterable
> style="width: 100%"
<ElOption >
v-for="item in paidLotteryOptions" <ElOption
:key="item.id" v-for="item in paidLotteryOptions"
:label="item.name" :key="item.id"
:value="item.id" :label="item.name"
/> :value="item.id"
</ElSelect> />
</ElFormItem> </ElSelect>
<template v-if="form.paid_lottery_config_id == null"> </ElFormItem>
<div class="tier-label">{{ $t('page.weightTest.tierProbHint') }}</div> <template v-if="form.paid_lottery_config_id == null">
<ElRow :gutter="8" class="tier-row"> <div class="tier-label">{{ $t('page.weightTest.tierProbHint') }}</div>
<ElCol v-for="t in tierKeys" :key="'paid-' + t" :span="8"> <ElRow :gutter="8" class="tier-row">
<div class="tier-field"> <ElCol v-for="t in tierKeys" :key="'paid-' + t" :span="8">
<label class="tier-field-label">{{ <div class="tier-field">
$t('page.weightTest.tierFieldLabel', { tier: t }) <label class="tier-field-label">{{
}}</label> $t('page.weightTest.tierFieldLabel', { tier: t })
<input }}</label>
type="number" <input
:value="getPaidTier(t)" type="number"
min="0" :value="getPaidTier(t)"
max="100" min="0"
placeholder="0" max="100"
class="tier-input" placeholder="0"
@input="setPaidTier(t, $event)" class="tier-input"
/> @input="setPaidTier(t, $event)"
</div> />
</div>
</ElCol>
</ElRow>
<div v-if="paidTierSum > 100" class="tier-error">{{
$t('page.weightTest.tierSumError', { sum: paidTierSum })
}}</div>
</template>
<ElRow :gutter="12">
<ElCol :span="12">
<ElFormItem :label="$t('page.weightTest.labelCwCount')" prop="paid_s_count" required>
<ElSelect
v-model="form.paid_s_count"
:placeholder="$t('page.weightTest.placeholderSelect')"
style="width: 100%"
>
<ElOption v-for="c in countOptions" :key="c" :label="String(c)" :value="c" />
</ElSelect>
</ElFormItem>
</ElCol>
<ElCol :span="12">
<ElFormItem :label="$t('page.weightTest.labelCcwCount')" prop="paid_n_count" required>
<ElSelect
v-model="form.paid_n_count"
:placeholder="$t('page.weightTest.placeholderSelect')"
style="width: 100%"
>
<ElOption v-for="c in countOptions" :key="'n-' + c" :label="String(c)" :value="c" />
</ElSelect>
</ElFormItem>
</ElCol> </ElCol>
</ElRow> </ElRow>
<div v-if="paidTierSum > 100" class="tier-error">{{ </ElForm>
$t('page.weightTest.tierSumError', { sum: paidTierSum })
}}</div>
</template>
<ElFormItem :label="$t('page.weightTest.labelCwCount')" prop="paid_s_count" required>
<ElSelect
v-model="form.paid_s_count"
:placeholder="$t('page.weightTest.placeholderSelect')"
style="width: 100%"
>
<ElOption v-for="c in countOptions" :key="c" :label="String(c)" :value="c" />
</ElSelect>
</ElFormItem>
<ElFormItem :label="$t('page.weightTest.labelCcwCount')" prop="paid_n_count" required>
<ElSelect
v-model="form.paid_n_count"
:placeholder="$t('page.weightTest.placeholderSelect')"
style="width: 100%"
>
<ElOption v-for="c in countOptions" :key="'n-' + c" :label="String(c)" :value="c" />
</ElSelect>
</ElFormItem>
</ElCol> </ElCol>
<ElCol :span="12"> <ElCol :span="12">
<div class="section-title">{{ $t('page.weightTest.sectionFreeAfterPlayAgain') }}</div> <div class="section-title">{{ $t('page.weightTest.sectionFreeAfterPlayAgain') }}</div>
<ElFormItem :label="$t('page.weightTest.labelLotteryTypeFree')" prop="free_lottery_config_id"> <ElForm :model="form" label-position="top" class="section-form">
<ElSelect <ElFormItem :label="$t('page.weightTest.labelLotteryTypeFree')" prop="free_lottery_config_id">
v-model="form.free_lottery_config_id" <ElSelect
:placeholder="$t('page.weightTest.placeholderFreePool')" v-model="form.free_lottery_config_id"
clearable :placeholder="$t('page.weightTest.placeholderFreePool')"
filterable clearable
style="width: 100%" filterable
> style="width: 100%"
<ElOption >
v-for="item in freeLotteryOptions" <ElOption
:key="item.id" v-for="item in freeLotteryOptions"
:label="item.name" :key="item.id"
:value="item.id" :label="item.name"
/> :value="item.id"
</ElSelect> />
</ElFormItem> </ElSelect>
<template v-if="form.free_lottery_config_id == null"> </ElFormItem>
<div class="tier-label">{{ $t('page.weightTest.tierProbHintFreeChain') }}</div> <template v-if="form.free_lottery_config_id == null">
<ElRow :gutter="8" class="tier-row"> <div class="tier-label">{{ $t('page.weightTest.tierProbHintFreeChain') }}</div>
<ElCol v-for="t in tierKeys" :key="'free-' + t" :span="8"> <ElRow :gutter="8" class="tier-row">
<div class="tier-field"> <ElCol v-for="t in tierKeys" :key="'free-' + t" :span="8">
<label class="tier-field-label">{{ <div class="tier-field">
$t('page.weightTest.tierFieldLabel', { tier: t }) <label class="tier-field-label">{{
}}</label> $t('page.weightTest.tierFieldLabel', { tier: t })
<input }}</label>
type="number" <input
:value="getFreeTier(t)" type="number"
min="0" :value="getFreeTier(t)"
max="100" min="0"
placeholder="0" max="100"
class="tier-input" placeholder="0"
@input="setFreeTier(t, $event)" class="tier-input"
/> @input="setFreeTier(t, $event)"
</div> />
</ElCol> </div>
</ElRow> </ElCol>
<div v-if="freeTierSum > 100" class="tier-error">{{ </ElRow>
$t('page.weightTest.tierSumError', { sum: freeTierSum }) <div v-if="freeTierSum > 100" class="tier-error">{{
}}</div> $t('page.weightTest.tierSumError', { sum: freeTierSum })
</template> }}</div>
</template>
</ElForm>
</ElCol> </ElCol>
</ElRow> </ElRow>
</ElForm> </ElForm>
@@ -513,6 +519,20 @@
:deep(.el-form-item) { :deep(.el-form-item) {
margin-bottom: 12px; margin-bottom: 12px;
} }
:deep(.el-form-item__label) {
white-space: nowrap;
}
}
.section-form {
:deep(.el-form-item) {
margin-bottom: 12px;
}
:deep(.el-form-item__label) {
white-space: nowrap;
line-height: 1.4;
padding-bottom: 4px;
}
} }
.kill-mode-panel { .kill-mode-panel {
@@ -543,11 +563,20 @@
border-top: 1px dashed var(--el-border-color); border-top: 1px dashed var(--el-border-color);
} }
.kill-safety-item { .kill-mode-field {
margin-bottom: 8px; max-width: 280px;
:deep(.el-form-item__label) { }
white-space: nowrap;
} .kill-mode-field-label {
font-size: 13px;
color: var(--el-text-color-regular);
line-height: 1.4;
margin-bottom: 6px;
white-space: nowrap;
}
.kill-mode-field-input {
width: 100%;
} }
.kill-mode-hint, .kill-mode-hint,
@@ -574,6 +603,9 @@
margin: 0 0 10px; margin: 0 0 10px;
padding-bottom: 4px; padding-bottom: 4px;
border-bottom: 1px solid var(--el-border-color-lighter); border-bottom: 1px solid var(--el-border-color-lighter);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.tier-label { .tier-label {