fix(nvr-history-diag-card): distinguish nvr cluster
This commit is contained in:
@@ -65,12 +65,17 @@ onMounted(() => {
|
|||||||
refreshData();
|
refreshData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const diagCards = ref<SelectOption[]>([
|
const diagCards = computed<SelectOption[]>(() => {
|
||||||
{ label: '设备状态', value: 'status' },
|
const isCluster = (maybeNvrCluster: NdmNvrResultVO) => !!maybeNvrCluster.clusterList?.trim() && maybeNvrCluster.clusterList !== maybeNvrCluster.ipAddress;
|
||||||
{ label: '设备告警', value: 'alarm' },
|
const baseOptions: SelectOption[] = [
|
||||||
{ label: '硬件使用率', value: 'usage' },
|
{ label: '设备状态', value: 'status' },
|
||||||
{ label: '硬盘健康', value: 'health' },
|
{ label: '设备告警', value: 'alarm' },
|
||||||
]);
|
];
|
||||||
|
if (!isCluster(ndmNvr.value)) {
|
||||||
|
baseOptions.push({ label: '硬件使用率', value: 'usage' }, { label: '硬盘健康', value: 'health' });
|
||||||
|
}
|
||||||
|
return baseOptions;
|
||||||
|
});
|
||||||
|
|
||||||
const selectedCards = ref<string[]>([...diagCards.value.map((option) => `${option.value ?? ''}`)]);
|
const selectedCards = ref<string[]>([...diagCards.value.map((option) => `${option.value ?? ''}`)]);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user