feat: 项目模块添加进展功能
This commit is contained in:
@@ -5,7 +5,7 @@ import type {
|
||||
} from '#/adapter/vxe-table';
|
||||
import type { ProjectApi } from '#/api/license/project';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { Page, useVbenDrawer, useVbenModal } from '@vben/common-ui';
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { message } from 'ant-design-vue';
|
||||
@@ -20,12 +20,18 @@ import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
import Form from './modules/form.vue';
|
||||
import Progress from './modules/progress.vue';
|
||||
|
||||
const [FormModal, formModalApi] = useVbenModal({
|
||||
connectedComponent: Form,
|
||||
destroyOnClose: true,
|
||||
});
|
||||
|
||||
const [ProgressDrawer, progressDrawerApi] = useVbenDrawer({
|
||||
connectedComponent: Progress,
|
||||
destroyOnClose: true,
|
||||
});
|
||||
|
||||
/** 刷新表格 */
|
||||
function onRefresh() {
|
||||
gridApi.query();
|
||||
@@ -41,6 +47,11 @@ function onEdit(row: ProjectApi.Project) {
|
||||
formModalApi.setData(row).open();
|
||||
}
|
||||
|
||||
/** 项目进展 */
|
||||
function onProgress(row: ProjectApi.Project) {
|
||||
progressDrawerApi.setData(row).open();
|
||||
}
|
||||
|
||||
/** 删除项目 */
|
||||
async function onDelete(row: ProjectApi.Project) {
|
||||
const hideLoading = message.loading({
|
||||
@@ -78,6 +89,10 @@ function onActionClick({ code, row }: OnActionClickParams<ProjectApi.Project>) {
|
||||
onEdit(row);
|
||||
break;
|
||||
}
|
||||
case 'progress': {
|
||||
onProgress(row);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +138,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
<template>
|
||||
<Page auto-content-height>
|
||||
<FormModal @success="onRefresh" />
|
||||
<ProgressDrawer @success="onRefresh" />
|
||||
|
||||
<Grid :table-title="$t('project.list')">
|
||||
<template #toolbar-tools>
|
||||
|
||||
Reference in New Issue
Block a user