This commit is contained in:
@@ -20,6 +20,7 @@ import type { GroupForm } from '#/api/property/attendanceManagement/attendanceGr
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import groupModal from './group-modal.vue';
|
||||
import attendanceGroupDetail from './attendance-group-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import {TableSwitch} from "#/components/table";
|
||||
import {useAccess} from "@vben/access";
|
||||
@@ -77,6 +78,10 @@ const [GroupModal, modalApi] = useVbenModal({
|
||||
connectedComponent: groupModal,
|
||||
});
|
||||
|
||||
const [AttendanceGroupDetail, detailApi] = useVbenModal({
|
||||
connectedComponent: attendanceGroupDetail,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@@ -87,6 +92,11 @@ async function handleEdit(row: Required<GroupForm>) {
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
async function handleInfo(row: Required<GroupForm>) {
|
||||
detailApi.setData({ id: row.id });
|
||||
detailApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<GroupForm>) {
|
||||
await groupRemove(row.id);
|
||||
await tableApi.query();
|
||||
@@ -143,6 +153,12 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['Property:group:info']"
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['Property:group:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@@ -177,5 +193,6 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
</BasicTable>
|
||||
<GroupModal @reload="tableApi.query()" />
|
||||
<AttendanceGroupDetail></AttendanceGroupDetail>
|
||||
</Page>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user