feat: implement priority_weighted_plus_percent pricing algorithm
This commit is contained in:
@@ -287,6 +287,7 @@
|
||||
<el-form-item label="算法">
|
||||
<div class="custom-select-wrapper">
|
||||
<el-select v-model="bindingForm.algorithm" style="width:100%" class="custom-theme-select">
|
||||
<el-option label="优先级期望成本 + 百分比" value="priority_weighted_plus_percent" />
|
||||
<el-option label="最高倍率 + 百分比" value="max_plus_percent" />
|
||||
<el-option label="平均倍率 + 百分比" value="average_plus_percent" />
|
||||
<el-option label="最低倍率 + 百分比" value="min_plus_percent" />
|
||||
@@ -1091,7 +1092,7 @@ const syncingImportStatus = ref(false)
|
||||
const reorderingPriorities = ref(false)
|
||||
|
||||
const statusLabel = (s: string) => ({ healthy: '健康', unhealthy: '异常', unknown: '未知' }[s] || s)
|
||||
const algorithmLabel = (s: string) => ({ max_plus_percent: '最高倍率', average_plus_percent: '平均倍率', min_plus_percent: '最低倍率' }[s] || s)
|
||||
const algorithmLabel = (s: string) => ({ max_plus_percent: '最高倍率', average_plus_percent: '平均倍率', min_plus_percent: '最低倍率', priority_weighted_plus_percent: '优先级期望成本' }[s] || s)
|
||||
const toUTC = (t: string) => /[Z+\-]\d*$/.test(t.trim()) ? t : t + 'Z'
|
||||
const fmtTime = (t: string) => dayjs(toUTC(t)).format('MM-DD HH:mm:ss')
|
||||
const sourceGroupId = (group: any) => String(group?.group_id || group?.id || group?.name || '')
|
||||
@@ -1130,7 +1131,7 @@ function defaultBindingForm(): GroupBindingForm {
|
||||
target_group_name: '',
|
||||
source_groups: [],
|
||||
percent: 0,
|
||||
algorithm: 'max_plus_percent',
|
||||
algorithm: 'priority_weighted_plus_percent',
|
||||
enabled: true,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user