review:【BPM 工作流】流程、任务相关的逻辑

This commit is contained in:
YunaiV
2025-05-14 23:08:31 +08:00
parent 99c848a39d
commit 769cb87035
15 changed files with 18 additions and 52 deletions

View File

@@ -91,20 +91,17 @@ export function useGridColumns<T = BpmFormApi.FormVO>(
props: { type: DICT_TYPE.COMMON_STATUS },
},
},
{
field: 'remark',
title: '备注',
minWidth: 200,
},
{
field: 'createTime',
title: '创建时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{
field: 'operation',
title: '操作',

View File

@@ -1,4 +1,5 @@
<script lang="ts" setup>
// TODO @siyeeditor 要不要放到独立的目录form/designer
import { computed, onMounted, ref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';
@@ -16,6 +17,7 @@ import Form from './modules/form.vue';
defineOptions({ name: 'BpmFormEditor' });
// TODO @siye这里有 lint 告警
const props = defineProps<Props>();
interface Props {
@@ -119,6 +121,7 @@ function handleSave() {
.open();
}
// TODO @siye一些必要的注释稍微写写哈。保持风格的一致性
function onBack() {
router.push({
path: '/bpm/manager/form',

View File

@@ -179,6 +179,7 @@ watch(
</template>
<!-- 摘要 -->
<!-- TODO @siye这个是不是不应该有呀 -->
<template #slot-summary="{ row }">
<div
class="flex flex-col py-2"

View File

@@ -39,6 +39,7 @@ const [Form, formApi] = useVbenForm({
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
// TODO @siye建议和别的模块也稍微加点类似的注释哈。= = 阅读总是会有点层次感;
const { valid } = await formApi.validate();
if (!valid) return;
@@ -49,6 +50,7 @@ const [Modal, modalApi] = useVbenModal({
data.conf = encodeConf(designerComponent);
data.fields = encodeFields(designerComponent);
// TODO @siye这个是不是不用抽方法呀直接写逻辑就完事啦。
const saveForm = async () => {
if (!formData.value?.id) {
return createForm(data);
@@ -74,6 +76,7 @@ const [Modal, modalApi] = useVbenModal({
return;
}
// TODO @siye建议和别的模块也稍微加点类似的注释哈。= = 阅读总是会有点层次感;
const data = modalApi.getData<any>();
if (!data) return;