pull/134/head
xingyu4j 2025-06-08 17:26:43 +08:00
commit fb9ce28276
39 changed files with 56 additions and 18 deletions

View File

@ -326,6 +326,7 @@ setupVbenVxeTable({
}, },
}); });
// TODO @xingyu这个要不叫 formatAmount2 这种?虽然不直观,但是容易看出来是金额;
vxeUI.formats.add('formatFraction', { vxeUI.formats.add('formatFraction', {
tableCellFormatMethod({ cellValue }) { tableCellFormatMethod({ cellValue }) {
if (cellValue === null || cellValue === undefined) { if (cellValue === null || cellValue === undefined) {

View File

@ -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;

View File

@ -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;

View File

@ -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}`);
} }

View File

@ -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;

View File

@ -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;

View File

@ -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; // 表达式名字

View File

@ -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;

View File

@ -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; // 编号

View File

@ -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; // 编号

View File

@ -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;

View File

@ -1,5 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
// TODO @ // TODO @
// TODO @xingyu systeminfra 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';

View File

@ -1,4 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
// TODO @
import type { Ref } from 'vue'; import type { Ref } from 'vue';
import type { SimpleFlowNode } from '../../consts'; import type { SimpleFlowNode } from '../../consts';

View File

@ -100,7 +100,6 @@ async function handleRemove(file: UploadFile) {
} }
async function beforeUpload(file: File) { async function beforeUpload(file: File) {
// 使Blob.text()FileReader
const fileContent = await file.text(); const fileContent = await file.text();
emit('returnText', fileContent); emit('returnText', fileContent);

View File

@ -1,4 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
// TODO @xingyu pay file-upload image-upload pay
import type { InputProps, TextAreaProps } from 'ant-design-vue'; import type { InputProps, TextAreaProps } from 'ant-design-vue';
import type { FileUploadProps } from './typing'; import type { FileUploadProps } from './typing';

View File

@ -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
/** /**
* *

View File

@ -1,3 +1,4 @@
// TODO @xingyu感觉 formatToFraction 可以整合起来;【优先级:低】
/** /**
* *
* @param num * @param num

View File

@ -106,6 +106,7 @@ async function initializeDesigner() {
} }
} }
// TODO @ziye使 /** */
// //
function handleSave() { function handleSave() {
formModalApi formModalApi

View File

@ -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>

View File

@ -164,10 +164,10 @@ async function handleCategorySortSubmit() {
@press-enter="getList" @press-enter="getList"
class="!w-60" class="!w-60"
/> />
<Button type="primary" @click="createModel"> <Button class="ml-2" type="primary" @click="createModel">
<IconifyIcon icon="lucide:plus" /> 新建模型 <IconifyIcon icon="lucide:plus" /> 新建模型
</Button> </Button>
<Dropdown placement="bottomRight" arrow> <Dropdown class="ml-2" placement="bottomRight" arrow>
<Button> <Button>
<template #icon> <template #icon>
<IconifyIcon icon="lucide:settings" /> <IconifyIcon icon="lucide:settings" />
@ -207,7 +207,7 @@ async function handleCategorySortSubmit() {
</div> </div>
<!-- 按照分类展示其所属的模型列表 --> <!-- 按照分类展示其所属的模型列表 -->
<div class="px-5" ref="categoryGroupRef"> <div class="px-3" ref="categoryGroupRef">
<CategoryDraggableModel <CategoryDraggableModel
v-for="element in categoryGroup" v-for="element in categoryGroup"
:class="isCategorySorting ? 'cursor-move' : ''" :class="isCategorySorting ? 'cursor-move' : ''"

View File

@ -344,9 +344,9 @@ const handleRenameSuccess = () => {
v-if="!record.icon" v-if="!record.icon"
class="mr-2.5 flex h-9 w-9 items-center justify-center rounded bg-blue-500 text-white" class="mr-2.5 flex h-9 w-9 items-center justify-center rounded bg-blue-500 text-white"
> >
<span style="font-size: 12px">{{ <span style="font-size: 12px">
record.name.substring(0, 2) {{ record.name.substring(0, 2) }}
}}</span> </span>
</div> </div>
<img <img
v-else v-else

View File

@ -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>

View File

@ -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 @ziyeiconname 会告警~~ -->
<img <img
v-if="definition.icon" v-if="definition.icon"
:src="definition.icon" :src="definition.icon"

View File

@ -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' });

View File

@ -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();
}); });

View File

@ -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>

View File

@ -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 @ziyeps ide
modalApi.close(); modalApi.close();
}, },
}); });

View File

@ -25,7 +25,7 @@ const props = defineProps<{
loading: boolean; loading: boolean;
}>(); }>();
// 使shallowRef // 使 shallowRef
const columns = shallowRef([ const columns = shallowRef([
{ {
field: 'name', field: 'name',

View File

@ -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';

View File

@ -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>

View File

@ -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';

View File

@ -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

View File

@ -162,6 +162,7 @@ export function useGridColumns<T = PayAppApi.App>(
}, },
]; ];
} }
/** 新增/修改的表单 */ /** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] { export function useFormSchema(): VbenFormSchema[] {
return [ return [

View File

@ -1,4 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
// TODO @xingyu @form-create/ant-design-vue vben ~
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { PayAppApi } from '#/api/pay/app'; import type { PayAppApi } from '#/api/pay/app';
@ -139,6 +140,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
<DocAlert title="支付功能开启" url="https://doc.iocoder.cn/pay/build/" /> <DocAlert title="支付功能开启" url="https://doc.iocoder.cn/pay/build/" />
</template> </template>
<!-- TODO @xingyu建议和别的一致Modal => FormModal -->
<AppModal @success="onRefresh" /> <AppModal @success="onRefresh" />
<ChannelModal @success="onRefresh" /> <ChannelModal @success="onRefresh" />
@ -281,6 +283,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
/> />
</template> </template>
<template #alipayBarConfig="{ row }"> <template #alipayBarConfig="{ row }">
<!-- TODO @xingyu建议用小图标 -->
<TableAction <TableAction
:actions="[ :actions="[
{ {

View File

@ -159,6 +159,7 @@ const [Modal, modalApi] = useVbenModal({
}, },
}); });
</script> </script>
<!-- TODO @xingyu支付宝的证书也是支持上传的哈 -->
<template> <template>
<Modal :close-on-click-modal="false" :title="title" class="w-[40%]"> <Modal :close-on-click-modal="false" :title="title" class="w-[40%]">
<Form :schema="channelSchema(formType)" /> <Form :schema="channelSchema(formType)" />

View File

@ -2,6 +2,7 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { Page, useVbenModal } from '@vben/common-ui'; import { Page, useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getNotifyTaskPage } from '#/api/pay/notify'; import { getNotifyTaskPage } from '#/api/pay/notify';
@ -59,6 +60,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
<template #doc> <template #doc>
<DocAlert title="支付功能开启" url="https://doc.iocoder.cn/pay/build/" /> <DocAlert title="支付功能开启" url="https://doc.iocoder.cn/pay/build/" />
</template> </template>
<DetailModal @success="onRefresh" /> <DetailModal @success="onRefresh" />
<Grid table-title=""> <Grid table-title="">
<template #actions="{ row }"> <template #actions="{ row }">

View File

@ -265,6 +265,7 @@ setupVbenVxeTable({
}); });
// 添加数量格式化,例如金额 // 添加数量格式化,例如金额
// TODO @xingyu建议金额和数量分开哈原因是有些团队希望金额单独控制
vxeUI.formats.add('formatNumber', { vxeUI.formats.add('formatNumber', {
cellFormatMethod({ cellValue }, digits = 2) { cellFormatMethod({ cellValue }, digits = 2) {
if (cellValue === null || cellValue === undefined) { if (cellValue === null || cellValue === undefined) {

View File

@ -277,6 +277,7 @@ setupVbenVxeTable({
// 这里可以自行扩展 vxe-table 的全局配置,比如自定义格式化 // 这里可以自行扩展 vxe-table 的全局配置,比如自定义格式化
// vxeUI.formats.add // vxeUI.formats.add
// add by 星语:数量格式化,例如说:金额 // add by 星语:数量格式化,例如说:金额
// TODO @xingyu建议金额和数量分开哈原因是有些团队希望金额单独控制
vxeUI.formats.add('formatNumber', { vxeUI.formats.add('formatNumber', {
cellFormatMethod({ cellValue }, digits = 2) { cellFormatMethod({ cellValue }, digits = 2) {
if (cellValue === null || cellValue === undefined) { if (cellValue === null || cellValue === undefined) {

View File

@ -9,6 +9,7 @@ export function getPopupContainer(node?: HTMLElement): HTMLElement {
); );
} }
// TODO @xingyu这个需要 pr 给 vben 官方么?体感上,这个是全局性的哈;
/** /**
* VxeTable * VxeTable
* : https://gitee.com/dapppp/ruoyi-plus-vben5/issues/IB1DM3 * : https://gitee.com/dapppp/ruoyi-plus-vben5/issues/IB1DM3