运维管理平台前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
1.5 KiB

<template>
<PageWrapper dense>
<BasicTable @register="registerTable" bordered>
<template #toolbar>
<a-button type="primary" @click="handleDetail">导出</a-button>
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
defineOptions({ name: 'Online' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '在线率',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'online',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//抽屉
const detailDrawerRef = ref();
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
</script>
<style scoped></style>