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