feat:仪表盘无套餐时显示修改
This commit is contained in:
@@ -87,7 +87,8 @@ const baseData = ref<GaugeDisplayData[]>([
|
|||||||
max: 100,
|
max: 100,
|
||||||
unit: t('page.headerbanner.money'),
|
unit: t('page.headerbanner.money'),
|
||||||
description: t('page.headerbanner.monthphonebill'),
|
description: t('page.headerbanner.monthphonebill'),
|
||||||
subTitle: t('page.headerbanner.deviceCount') + `: 0${t('page.headerbanner.device')}`
|
subTitle: t('page.headerbanner.deviceCount') + `: 0${t('page.headerbanner.device')}`,
|
||||||
|
displayValue: '-'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -294,7 +295,7 @@ async function mockDataUpdate() {
|
|||||||
// 更新套餐信息
|
// 更新套餐信息
|
||||||
packageInfo.value = {
|
packageInfo.value = {
|
||||||
packageName: response.packageName || t('page.headerbanner.nopackage'),
|
packageName: response.packageName || t('page.headerbanner.nopackage'),
|
||||||
price: response.price ? formatBalance(response.price) : '-'
|
price: response.packageName ? formatBalance(response.price) : '-' // 有套餐时才格式化价格
|
||||||
};
|
};
|
||||||
|
|
||||||
// 更新余额和设备数据
|
// 更新余额和设备数据
|
||||||
@@ -303,7 +304,7 @@ async function mockDataUpdate() {
|
|||||||
...baseData.value[0],
|
...baseData.value[0],
|
||||||
value: numBalance,
|
value: numBalance,
|
||||||
max: Math.max(numBalance, 100),
|
max: Math.max(numBalance, 100),
|
||||||
displayValue: formatBalance(response.balance),
|
displayValue: response.packageName ? formatBalance(response.balance) : '-',
|
||||||
unit: t('page.headerbanner.money'),
|
unit: t('page.headerbanner.money'),
|
||||||
subTitle: t('page.headerbanner.deviceCount') + `: ${
|
subTitle: t('page.headerbanner.deviceCount') + `: ${
|
||||||
response.packageName ? (
|
response.packageName ? (
|
||||||
@@ -497,7 +498,7 @@ const getDeviceCount = (subTitle?: string, clientNumEnable?: boolean): string =>
|
|||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">{{ t('page.headerbanner.price') }}</span>
|
<span class="info-label">{{ t('page.headerbanner.price') }}</span>
|
||||||
<span class="info-value">¥{{ packageInfo.price || '-' }}</span>
|
<span class="info-value">{{ packageInfo.price === '-' ? '-' : '¥' + packageInfo.price }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">{{ t('page.headerbanner.monthflowr') }}</span>
|
<span class="info-label">{{ t('page.headerbanner.monthflowr') }}</span>
|
||||||
@@ -524,7 +525,7 @@ const getDeviceCount = (subTitle?: string, clientNumEnable?: boolean): string =>
|
|||||||
<div class="info-group">
|
<div class="info-group">
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">{{ t('page.headerbanner.Remainingcredit') }}</span>
|
<span class="info-label">{{ t('page.headerbanner.Remainingcredit') }}</span>
|
||||||
<span class="info-value">¥{{ baseData[0].displayValue }}</span>
|
<span class="info-value">{{ baseData[0].displayValue === '-' ? '-' : '¥' + baseData[0].displayValue }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">{{ t('page.headerbanner.client') }}</span>
|
<span class="info-label">{{ t('page.headerbanner.client') }}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user