review:【ANTD】【BPM 工作流】ziye #https://gitee.com/yudaocode/yudao-ui-admin-vben/pulls/113
parent
013f3f3d2d
commit
f6f2f65656
|
@ -3,7 +3,8 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmCategoryApi {
|
export namespace BpmCategoryApi {
|
||||||
/** BPM 流程分类 VO */
|
/** 流程分类 VO */
|
||||||
|
// TODO @jason:不用 VO 后缀哈
|
||||||
export interface CategoryVO {
|
export interface CategoryVO {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -2,9 +2,9 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
/** 流程定义 */
|
|
||||||
export namespace BpmProcessDefinitionApi {
|
export namespace BpmProcessDefinitionApi {
|
||||||
// 流程定义
|
/** 流程定义 */
|
||||||
|
// TODO @ziye:不用 VO 后缀哈
|
||||||
export interface ProcessDefinitionVO {
|
export interface ProcessDefinitionVO {
|
||||||
id: string;
|
id: string;
|
||||||
version: number;
|
version: number;
|
||||||
|
|
|
@ -3,7 +3,8 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmFormApi {
|
export namespace BpmFormApi {
|
||||||
// 流程表单
|
/** 流程表单 */
|
||||||
|
// TODO @jason:不用 VO 后缀哈
|
||||||
export interface FormVO {
|
export interface FormVO {
|
||||||
id?: number | undefined;
|
id?: number | undefined;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -23,6 +24,7 @@ export async function getFormPage(params: PageParam) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取表单详情 */
|
/** 获取表单详情 */
|
||||||
|
// TODO @ziye:应该不会 string 的情况呢。
|
||||||
export async function getFormDetail(id: number | string) {
|
export async function getFormDetail(id: number | string) {
|
||||||
return requestClient.get<BpmFormApi.FormVO>(`/bpm/form/get?id=${id}`);
|
return requestClient.get<BpmFormApi.FormVO>(`/bpm/form/get?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ export namespace BpmModelApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 流程定义 VO */
|
/** 流程定义 VO */
|
||||||
|
// TODO @jason:不用 VO 后缀哈
|
||||||
export interface ProcessDefinitionVO {
|
export interface ProcessDefinitionVO {
|
||||||
id: string;
|
id: string;
|
||||||
key?: string;
|
key?: string;
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmOALeaveApi {
|
export namespace BpmOALeaveApi {
|
||||||
|
// TODO @ziye:不用 VO 后缀
|
||||||
export interface LeaveVO {
|
export interface LeaveVO {
|
||||||
id: number;
|
id: number;
|
||||||
status: number;
|
status: number;
|
||||||
|
|
|
@ -3,7 +3,8 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmProcessExpressionApi {
|
export namespace BpmProcessExpressionApi {
|
||||||
/** BPM 流程表达式 VO */
|
// TODO @ziye:不用 VO 后缀
|
||||||
|
/** 流程表达式 VO */
|
||||||
export interface ProcessExpressionVO {
|
export interface ProcessExpressionVO {
|
||||||
id: number; // 编号
|
id: number; // 编号
|
||||||
name: string; // 表达式名字
|
name: string; // 表达式名字
|
||||||
|
|
|
@ -8,6 +8,7 @@ import type { BpmCandidateStrategyEnum, BpmNodeTypeEnum } from '#/utils';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmProcessInstanceApi {
|
export namespace BpmProcessInstanceApi {
|
||||||
|
// TODO @芋艿:一些注释缺少或者不对;
|
||||||
export type Task = {
|
export type Task = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -42,7 +43,7 @@ export namespace BpmProcessInstanceApi {
|
||||||
tasks: ApprovalTaskInfo[];
|
tasks: ApprovalTaskInfo[];
|
||||||
};
|
};
|
||||||
|
|
||||||
// 流程实例
|
/** 流程实例 */
|
||||||
export type ProcessInstanceVO = {
|
export type ProcessInstanceVO = {
|
||||||
businessKey: string;
|
businessKey: string;
|
||||||
category: string;
|
category: string;
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmProcessListenerApi {
|
export namespace BpmProcessListenerApi {
|
||||||
|
// TODO @ziye:不用 VO 后缀
|
||||||
/** BPM 流程监听器 VO */
|
/** BPM 流程监听器 VO */
|
||||||
export interface ProcessListenerVO {
|
export interface ProcessListenerVO {
|
||||||
id: number; // 编号
|
id: number; // 编号
|
||||||
|
|
|
@ -5,6 +5,7 @@ import type { BpmProcessInstanceApi } from '../processInstance';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmTaskApi {
|
export namespace BpmTaskApi {
|
||||||
|
// TODO @ziye:不用 VO 后缀;注释使用 /** */ 风格;
|
||||||
/** BPM 流程监听器 VO */
|
/** BPM 流程监听器 VO */
|
||||||
export interface TaskVO {
|
export interface TaskVO {
|
||||||
id: number; // 编号
|
id: number; // 编号
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace BpmUserGroupApi {
|
export namespace BpmUserGroupApi {
|
||||||
|
// TODO @ziye:不用 VO 后缀
|
||||||
/** BPM 用户组 VO */
|
/** BPM 用户组 VO */
|
||||||
export interface UserGroupVO {
|
export interface UserGroupVO {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
// TODO @芋艿:是否有更好的组织形式?!
|
// TODO @芋艿:是否有更好的组织形式?!
|
||||||
|
// TODO @xingyu:你感觉,这个放到每个 system、infra 模块下,然后新建一个 components,表示每个模块,有一些共享的组件?然后,全局只放通用的(无业务含义的),可以哇?
|
||||||
import type { Key } from 'ant-design-vue/es/table/interface';
|
import type { Key } from 'ant-design-vue/es/table/interface';
|
||||||
|
|
||||||
import type { SystemDeptApi } from '#/api/system/dept';
|
import type { SystemDeptApi } from '#/api/system/dept';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* 下载工具模块
|
* 下载工具模块
|
||||||
* 提供多种文件格式的下载功能
|
* 提供多种文件格式的下载功能
|
||||||
*/
|
*/
|
||||||
// 请使用 @vben/utils/download 代替 packages/@core/base/shared/src/utils/download.ts
|
// TODO @ziye:请使用 @vben/utils/download 代替 packages/@core/base/shared/src/utils/download.ts
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片下载配置接口
|
* 图片下载配置接口
|
||||||
|
|
|
@ -106,6 +106,7 @@ async function initializeDesigner() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @ziye:注释使用 /** */ 风格,高亮更明显哈,方法注释;
|
||||||
// 保存表单
|
// 保存表单
|
||||||
function handleSave() {
|
function handleSave() {
|
||||||
formModalApi
|
formModalApi
|
||||||
|
|
|
@ -138,6 +138,7 @@ watch(
|
||||||
url="https://doc.iocoder.cn/bpm/use-bpm-form/"
|
url="https://doc.iocoder.cn/bpm/use-bpm-form/"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<DetailModal />
|
<DetailModal />
|
||||||
<Grid table-title="流程表单">
|
<Grid table-title="流程表单">
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
|
|
|
@ -93,6 +93,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
url="https://doc.iocoder.cn/bpm/expression/"
|
url="https://doc.iocoder.cn/bpm/expression/"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<FormModal @success="onRefresh" />
|
<FormModal @success="onRefresh" />
|
||||||
<Grid table-title="流程表达式">
|
<Grid table-title="流程表达式">
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
|
|
|
@ -222,6 +222,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
|
<!-- TODO @ziye:【优先级:低】这里交互,可以做成类似 vue3 + element-plus 那个一样,滚动切换分类哈?对标钉钉、飞书哈; -->
|
||||||
<!-- 第一步,通过流程定义的列表,选择对应的流程 -->
|
<!-- 第一步,通过流程定义的列表,选择对应的流程 -->
|
||||||
<template v-if="!selectProcessDefinition">
|
<template v-if="!selectProcessDefinition">
|
||||||
<Card
|
<Card
|
||||||
|
@ -274,6 +275,7 @@ onMounted(() => {
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
|
<!-- TODO @ziye:icon、name 会告警~~ -->
|
||||||
<img
|
<img
|
||||||
v-if="definition.icon"
|
v-if="definition.icon"
|
||||||
:src="definition.icon"
|
:src="definition.icon"
|
||||||
|
|
|
@ -28,7 +28,8 @@ import {
|
||||||
} from '#/utils';
|
} from '#/utils';
|
||||||
import ProcessInstanceSimpleViewer from '#/views/bpm/processInstance/detail/modules/simple-bpm-viewer.vue';
|
import ProcessInstanceSimpleViewer from '#/views/bpm/processInstance/detail/modules/simple-bpm-viewer.vue';
|
||||||
import ProcessInstanceTimeline from '#/views/bpm/processInstance/detail/modules/time-line.vue';
|
import ProcessInstanceTimeline from '#/views/bpm/processInstance/detail/modules/time-line.vue';
|
||||||
// 类型定义
|
|
||||||
|
/** 类型定义 */
|
||||||
interface ProcessFormData {
|
interface ProcessFormData {
|
||||||
rule: any[];
|
rule: any[];
|
||||||
option: Record<string, any>;
|
option: Record<string, any>;
|
||||||
|
@ -121,6 +122,7 @@ async function submitForm() {
|
||||||
|
|
||||||
message.success('发起流程成功');
|
message.success('发起流程成功');
|
||||||
|
|
||||||
|
// TODO @ziye:有告警哈;
|
||||||
closeCurrentTab();
|
closeCurrentTab();
|
||||||
|
|
||||||
await router.push({ path: '/bpm/task/my' });
|
await router.push({ path: '/bpm/task/my' });
|
||||||
|
|
|
@ -222,7 +222,7 @@ function setFieldPermission(field: string, permission: string) {
|
||||||
const activeTab = ref('form');
|
const activeTab = ref('form');
|
||||||
const taskListRef = ref();
|
const taskListRef = ref();
|
||||||
|
|
||||||
// 监听 Tab 切换,当切换到 "record" 标签时刷新任务列表
|
/** 监听 Tab 切换,当切换到 "record" 标签时刷新任务列表 */
|
||||||
watch(
|
watch(
|
||||||
() => activeTab.value,
|
() => activeTab.value,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
|
@ -238,7 +238,7 @@ watch(
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const userOptions = ref<SystemUserApi.User[]>([]); // 用户列表
|
const userOptions = ref<SystemUserApi.User[]>([]); // 用户列表
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getDetail();
|
await getDetail();
|
||||||
// 获得用户列表
|
// 获得用户列表
|
||||||
userOptions.value = await getSimpleUserList();
|
userOptions.value = await getSimpleUserList();
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,6 +3,7 @@ defineOptions({ name: 'ProcessInstanceBpmnViewer' });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<!-- TODO @ziye:可以后续,找下 antd 有没可以直接用的组件哈 -->
|
||||||
<div>
|
<div>
|
||||||
<h1>BPMN Viewer</h1>
|
<h1>BPMN Viewer</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useVbenModal } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Space, Tooltip } from 'ant-design-vue';
|
import { Button, message, Space, Tooltip } from 'ant-design-vue';
|
||||||
|
// TODO @ziye:这个可能,适合放到全局?!因为 element-plus 也用这个;
|
||||||
import Vue3Signature from 'vue3-signature';
|
import Vue3Signature from 'vue3-signature';
|
||||||
|
|
||||||
import { uploadFile } from '#/api/infra/file';
|
import { uploadFile } from '#/api/infra/file';
|
||||||
|
@ -36,6 +37,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
emits('success', signFileUrl);
|
emits('success', signFileUrl);
|
||||||
|
// TODO @ziye:下面有个告警哈;ps:所有告警,皆是错误,可以关注 ide 给的提示哈;
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,6 +14,7 @@ import {
|
||||||
getProcessInstanceManagerPage,
|
getProcessInstanceManagerPage,
|
||||||
} from '#/api/bpm/processInstance';
|
} from '#/api/bpm/processInstance';
|
||||||
import { DocAlert } from '#/components/doc-alert';
|
import { DocAlert } from '#/components/doc-alert';
|
||||||
|
import { $t } from '#/locales';
|
||||||
import { router } from '#/router';
|
import { router } from '#/router';
|
||||||
import { BpmProcessInstanceStatus } from '#/utils';
|
import { BpmProcessInstanceStatus } from '#/utils';
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
url="https://doc.iocoder.cn/bpm/listener/"
|
url="https://doc.iocoder.cn/bpm/listener/"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<FormModal @success="onRefresh" />
|
<FormModal @success="onRefresh" />
|
||||||
<Grid table-title="流程监听器">
|
<Grid table-title="流程监听器">
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { Page } from '@vben/common-ui';
|
||||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getProcessInstanceCopyPage } from '#/api/bpm/processInstance';
|
import { getProcessInstanceCopyPage } from '#/api/bpm/processInstance';
|
||||||
import { DocAlert } from '#/components/doc-alert';
|
import { DocAlert } from '#/components/doc-alert';
|
||||||
|
import { $t } from '#/locales';
|
||||||
import { router } from '#/router';
|
import { router } from '#/router';
|
||||||
|
|
||||||
import { useGridColumns, useGridFormSchema } from './data';
|
import { useGridColumns, useGridFormSchema } from './data';
|
||||||
|
|
|
@ -72,6 +72,7 @@ const [Grid] = useVbenVxeGrid({
|
||||||
/>
|
/>
|
||||||
<DocAlert title="审批加签、减签" url="https://doc.iocoder.cn/bpm/sign/" />
|
<DocAlert title="审批加签、减签" url="https://doc.iocoder.cn/bpm/sign/" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<Grid table-title="待办任务">
|
<Grid table-title="待办任务">
|
||||||
<template #actions="{ row }">
|
<template #actions="{ row }">
|
||||||
<TableAction
|
<TableAction
|
||||||
|
|
Loading…
Reference in New Issue