运维管理平台前端
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.

71 lines
1.8 KiB

4 months ago
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
3 months ago
<a-button type="primary" @click="handleAdd">生成计划</a-button>
<a-button type="primary" @click="goDetail">重置计划</a-button>
4 months ago
</template>
<template #bodyCell="{ column, record }">
3 months ago
<template v-if="column && record && column.key === 'action'"> </template>
4 months ago
</template>
</BasicTable>
3 months ago
<detailDrawer ref="detailDrawerRef" />
4 months ago
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
3 months ago
import { BasicTable, useTable } from '@/components/Table';
import { list } from './allPatrolapi';
import { formSchemas, columns } from './allPatroldata';
4 months ago
import { useGo } from '@/hooks/web/usePage';
import { PageEnum } from '@/enums/pageEnum';
3 months ago
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
4 months ago
3 months ago
defineOptions({ name: 'AllPatrol' });
4 months ago
3 months ago
const [registerTable, { reload }] = useTable({
4 months ago
rowSelection: {
type: 'checkbox',
},
3 months ago
title: '巡检进行',
4 months ago
api: list,
3 months ago
showIndexColumn: true,
4 months ago
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
3 months ago
name: 'allPatrol',
4 months ago
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
function handleAdd() {
go({ path: '/workflow/leaveEdit/index' as PageEnum, query: { type: 'add' } });
3 months ago
reload();
4 months ago
}
// 前往审批记录页面
const go = useGo();
3 months ago
//抽屉
const detailDrawerRef = ref();
const goDetail = () => {
detailDrawerRef.value.showDrawer();
};
4 months ago
</script>
<style scoped></style>