fix: 新增套餐新增缩长比例,增长比例
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m28s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m28s
This commit is contained in:
@@ -238,8 +238,14 @@
|
||||
v-if="virtualRatioPercent !== null && realDataGb > 0"
|
||||
style="margin-top: 4px; font-size: 12px; color: var(--el-text-color-secondary)"
|
||||
>
|
||||
{{ realDataGb }}×(1-{{ virtualRatioPercent }}%) =
|
||||
{{ calculatedVirtualDataGb }}GB
|
||||
<div>
|
||||
缩长比例:{{ realDataGb }}×(1-{{ virtualRatioPercent }}%) =
|
||||
{{ calculatedVirtualDataGb }}GB
|
||||
</div>
|
||||
<div v-if="calculatedVirtualDataGb > 0">
|
||||
增长比例:{{ realDataGb }}GB/{{ calculatedVirtualDataGb }}GB =
|
||||
{{ calculatedGrowthRatio }}
|
||||
</div>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
@@ -729,6 +735,13 @@
|
||||
return Number(virtualGb.toFixed(2))
|
||||
})
|
||||
|
||||
const calculatedGrowthRatio = computed(() => {
|
||||
if (calculatedVirtualDataGb.value === 0) {
|
||||
return 0
|
||||
}
|
||||
return Number((realDataGb.value / calculatedVirtualDataGb.value).toFixed(2))
|
||||
})
|
||||
|
||||
// GB 转 MB 处理
|
||||
const handleRealDataChange = (value: number | null | undefined) => {
|
||||
if (value === null || value === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user