Files
orion-visor/orion-ops-ui/src/views/asset/host-identity/index.vue

46 lines
1.3 KiB
Vue
Raw Normal View History

2023-09-20 12:13:02 +08:00
<template>
<div class="layout-container">
<!-- 表格 -->
<host-identity-table ref="table"
2023-09-21 13:50:42 +08:00
@openAdd="() => modal.openAdd()"
2023-09-21 16:06:09 +08:00
@openUpdate="(e) => modal.openUpdate(e)"
@openKeyView="(e) => keyDrawer.openView(e) " />
2023-09-20 12:13:02 +08:00
<!-- 添加修改模态框 -->
2023-09-21 13:50:42 +08:00
<host-identity-form-modal ref="modal"
@added="() => table.addedCallback()"
@updated="() => table.updatedCallback()" />
2023-09-21 16:06:09 +08:00
<!-- 添加修改模态框 -->
<host-key-form-drawer ref="keyDrawer" />
2023-09-20 12:13:02 +08:00
</div>
</template>
<script lang="ts">
export default {
2023-09-21 13:50:42 +08:00
name: 'assetHostIdentity'
2023-09-20 12:13:02 +08:00
};
</script>
<script lang="ts" setup>
import HostIdentityTable from './components/host-identity-table.vue';
2023-09-21 13:50:42 +08:00
import HostIdentityFormModal from './components/host-identity-form-modal.vue';
2023-09-21 16:06:09 +08:00
import HostKeyFormDrawer from '../host-key/components/host-key-form-drawer.vue';
2023-09-20 17:13:38 +08:00
2023-09-21 13:50:42 +08:00
import { onUnmounted, ref } from 'vue';
import { useCacheStore } from '@/store';
2023-09-20 12:13:02 +08:00
const table = ref();
2023-09-21 13:50:42 +08:00
const modal = ref();
2023-09-21 16:06:09 +08:00
const keyDrawer = ref();
2023-09-21 13:50:42 +08:00
// 卸载时清除 tags cache
onUnmounted(() => {
const cacheStore = useCacheStore();
cacheStore.set('hostKeys', []);
});
2023-09-20 12:13:02 +08:00
</script>
<style lang="less" scoped>
</style>