index.vue
1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<script lang="ts" setup>
import { Tabs } from 'ant-design-vue';
import { ref } from 'vue';
import { EdgeMonitoring } from '../EdgeMonitoring';
import { EdgeEvents } from '../EdgeEvents';
import { EdgeDevice } from '../EdgeDevice';
import { EdgeInstanceItemType } from '/@/api/edgeManage/model/edgeInstance';
import type { PropType } from 'vue';
defineProps({
recordData: {
type: Object as PropType<EdgeInstanceItemType>,
default: () => {},
},
});
enum ActiveKey {
EDGE_DEVICE = 'EdgeDevice',
EDGEMONITORING = 'EdgeMonitoring',
EDGEEVENTS = 'EdgeEvents',
}
const activeKey = ref(ActiveKey.EDGE_DEVICE);
</script>
<template>
<section class="w-full h-full p-1">
<main>
<Tabs
v-model:activeKey="activeKey"
type="card"
class="w-full h-full bg-light-50 !p-4 dark:bg-dark-900"
>
<Tabs.TabPane tab="边缘设备" :key="ActiveKey.EDGE_DEVICE">
<EdgeDevice
v-if="recordData"
:recordData="recordData"
class="p-4 bg-neutral-100 dark:bg-dark-700"
/>
</Tabs.TabPane>
<Tabs.TabPane tab="边缘监控" :key="ActiveKey.EDGEMONITORING">
<EdgeMonitoring
v-if="recordData"
:recordData="recordData"
class="p-4 bg-neutral-100 dark:bg-dark-700"
/>
</Tabs.TabPane>
<Tabs.TabPane tab="边缘事件" :key="ActiveKey.EDGEEVENTS">
<EdgeEvents :recordData="recordData" class="p-4 bg-neutral-100 dark:bg-dark-700" />
</Tabs.TabPane>
</Tabs>
</main>
</section>
</template>
<style lang="less" scoped></style>