This commit is contained in:
@@ -130,11 +130,11 @@
|
|||||||
}}</ElDescriptionsItem>
|
}}</ElDescriptionsItem>
|
||||||
<ElDescriptionsItem label="在线状态">
|
<ElDescriptionsItem label="在线状态">
|
||||||
<ElTag
|
<ElTag
|
||||||
v-if="selectedDeviceStatusCard?.network_status !== undefined"
|
v-if="cardInfo?.online_status !== undefined"
|
||||||
:type="selectedDeviceStatusCard.network_status === 1 ? 'success' : 'danger'"
|
:type="getOnlineStatusType(cardInfo?.online_status)"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
{{ selectedDeviceStatusCard.network_status === 1 ? '正常' : '停机' }}
|
{{ getOnlineStatusName(cardInfo?.online_status) }}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</ElDescriptionsItem>
|
</ElDescriptionsItem>
|
||||||
@@ -651,7 +651,7 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// 设备详情状态字段统一从选中的绑定卡取值:
|
// 设备详情里的实名状态和实名时间从选中的绑定卡取值:
|
||||||
// 只有一张卡时直接取该卡,多张卡时仅取 is_current=true 的卡。
|
// 只有一张卡时直接取该卡,多张卡时仅取 is_current=true 的卡。
|
||||||
const selectedDeviceStatusCard = computed(() => {
|
const selectedDeviceStatusCard = computed(() => {
|
||||||
if (!props.cardInfo?.cards || props.cardInfo.cards.length === 0) {
|
if (!props.cardInfo?.cards || props.cardInfo.cards.length === 0) {
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ export function useAssetInfo() {
|
|||||||
}
|
}
|
||||||
if (data.cards && data.cards.length > 0) {
|
if (data.cards && data.cards.length > 0) {
|
||||||
// 合并实时卡数据与原始卡数据,保留 real_name_at 等静态字段。
|
// 合并实时卡数据与原始卡数据,保留 real_name_at 等静态字段。
|
||||||
// 设备详情的实名状态、在线状态、实名时间统一依赖选中的绑定卡,因此不能在实时刷新时丢掉这些字段。
|
// 设备详情里的实名状态、实名时间依赖选中的绑定卡,因此不能在实时刷新时丢掉这些字段。
|
||||||
cardInfo.value.cards = mergeAssetBoundCards(cardInfo.value.cards || [], data.cards)
|
cardInfo.value.cards = mergeAssetBoundCards(cardInfo.value.cards || [], data.cards)
|
||||||
}
|
}
|
||||||
if (data.last_data_check_at !== undefined) {
|
if (data.last_data_check_at !== undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user