mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-19 22:58:33 +08:00
- 新增 `flow-actions.vue` 审批操作按钮组件,支持撤销、编辑、删除、审批、驳回、终止、委托、转办、加签、减签等操作 - 新增 `approval-panel-drawer.vue` 审批详情抽屉组件,整合审批信息展示与操作按钮 - 新增 `task` 目录,包含任务列表页面及数据定义 - 修改 `copy-component.vue` 组件,支持自定义头像大小并优化样式 - 调整 `flow-preview.vue` 中 iframe 高度从 500px 增加到 600px - 优化 `processInstance/data.tsx` 查询条件,使用 `_nodeName` 替代 `nodeName` 避免冲突,并支持多选人员筛选 - 导出新增的审批面板抽屉组件 `ApprovalPanelDrawerComp` - 引入 `DefaultSlot` 组件用于自定义表单项渲染 - 定义 `ApprovalType` 类型用于区分不同审批场景(我的申请、审批、管理、只读)
93 lines
2.0 KiB
Vue
93 lines
2.0 KiB
Vue
<script setup lang="ts">
|
|
import type { VbenFormProps } from '@vben/common-ui';
|
|
|
|
import type { TaskPageProps } from './types';
|
|
|
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
|
|
import { Page, useVbenDrawer } from '@vben/common-ui';
|
|
|
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
|
|
import { ApprovalPanelDrawerComp } from '..';
|
|
import { columns, querySchema } from './data';
|
|
|
|
const props = defineProps<TaskPageProps>();
|
|
|
|
const formOptions: VbenFormProps = {
|
|
commonConfig: {
|
|
labelWidth: 80,
|
|
componentProps: {
|
|
allowClear: true,
|
|
},
|
|
},
|
|
schema: querySchema(),
|
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
|
// 日期选择格式化
|
|
fieldMappingTime: [
|
|
[
|
|
'createTime',
|
|
['params[beginTime]', 'params[endTime]'],
|
|
['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
|
|
],
|
|
],
|
|
};
|
|
|
|
const gridOptions: VxeGridProps = {
|
|
checkboxConfig: {
|
|
// 高亮
|
|
highlight: true,
|
|
// 翻页时保留选中状态
|
|
reserve: true,
|
|
},
|
|
columns,
|
|
height: 'auto',
|
|
keepSource: true,
|
|
pagerConfig: {},
|
|
proxyConfig: {
|
|
ajax: {
|
|
query: async ({ page }, formValues = {}) => {
|
|
return await props.listApi({
|
|
pageNum: page.currentPage,
|
|
pageSize: page.pageSize,
|
|
...formValues,
|
|
});
|
|
},
|
|
},
|
|
},
|
|
rowConfig: {
|
|
keyField: 'id',
|
|
},
|
|
/**
|
|
* TODO: id
|
|
*/
|
|
id: 'workflow-task',
|
|
rowClassName: 'cursor-pointer',
|
|
};
|
|
|
|
const [BasicTable, tableApi] = useVbenVxeGrid({
|
|
formOptions,
|
|
gridOptions,
|
|
gridEvents: {
|
|
cellClick: ({ row }) => {
|
|
handleOpen(row);
|
|
},
|
|
},
|
|
});
|
|
|
|
const [ApprovalPanelDrawer, drawerApi] = useVbenDrawer({
|
|
connectedComponent: ApprovalPanelDrawerComp,
|
|
});
|
|
|
|
function handleOpen(row: any) {
|
|
drawerApi.setData({ task: row, type: props.type }).open();
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<Page :auto-content-height="true">
|
|
<BasicTable :table-title="tableTitle" />
|
|
<ApprovalPanelDrawer @reload="() => tableApi.query()" />
|
|
</Page>
|
|
</template>
|