This commit is contained in:
@@ -68,6 +68,19 @@ export function useAssetFormatters() {
|
||||
return map[status] || 'info'
|
||||
}
|
||||
|
||||
// 获取网络状态名称和标签类型,缺失状态不能误报为停机。
|
||||
const getNetworkStatusName = (status?: number) => {
|
||||
if (status === 1) return '正常'
|
||||
if (status === 0) return '停机'
|
||||
return '未知'
|
||||
}
|
||||
|
||||
const getNetworkStatusType = (status?: number): TagType => {
|
||||
if (status === 1) return 'success'
|
||||
if (status === 0) return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
// 获取实名认证策略名称
|
||||
const getRealnamePolicyName = (policy?: string) => {
|
||||
if (!policy || policy === '') return '未知'
|
||||
@@ -261,6 +274,8 @@ export function useAssetFormatters() {
|
||||
formatIccidWithDashes,
|
||||
getRealNameStatusName,
|
||||
getRealNameStatusType,
|
||||
getNetworkStatusName,
|
||||
getNetworkStatusType,
|
||||
getRealnamePolicyName,
|
||||
getCarrierTypeName,
|
||||
getAssetStatusName,
|
||||
|
||||
Reference in New Issue
Block a user