fix: 设备分配代理,虚比例,sim顺序
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m15s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m15s
This commit is contained in:
@@ -534,7 +534,7 @@
|
||||
getSwitchModeName
|
||||
} = useAssetFormatters(deviceRealtimeRef)
|
||||
|
||||
// 排序后的设备卡列表(当前卡排在最前面)
|
||||
// 排序后的设备卡列表(按卡槽位置排序,当前卡排在最前面)
|
||||
const sortedDeviceCards = computed(() => {
|
||||
if (!props.cardInfo?.cards || props.cardInfo.cards.length === 0) {
|
||||
return []
|
||||
@@ -543,7 +543,7 @@
|
||||
return cards.sort((a, b) => {
|
||||
if (a.is_current && !b.is_current) return -1
|
||||
if (!a.is_current && b.is_current) return 1
|
||||
return 0
|
||||
return (a.slot_position ?? 0) - (b.slot_position ?? 0)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<ElDescriptionsItem label="套餐类型">
|
||||
{{ getPackageTypeName(currentPackage.package_type) }}
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem v-if="currentPackage.enable_virtual_data" label="虚流量比例">
|
||||
<ElDescriptionsItem v-if="currentPackage.enable_virtual_data && isSuperAdmin" label="虚流量比例">
|
||||
{{ currentPackage.virtual_ratio || '-' }}
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem v-if="currentPackage.duration_days" label="套餐时长" :span="3">
|
||||
@@ -134,6 +134,8 @@
|
||||
ElAlert
|
||||
} from 'element-plus'
|
||||
import { useAssetFormatters } from '../composables/useAssetFormatters'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import type { PackageInfo } from '../types'
|
||||
|
||||
@@ -146,6 +148,10 @@
|
||||
getProgressColorByPercentage
|
||||
} = useAssetFormatters()
|
||||
|
||||
const userStore = useUserStore()
|
||||
const { info: userInfo } = storeToRefs(userStore)
|
||||
const isSuperAdmin = computed(() => userInfo.value.user_type === 1)
|
||||
|
||||
// Props
|
||||
interface Props {
|
||||
currentPackage: PackageInfo | null
|
||||
|
||||
Reference in New Issue
Block a user