+
{buttons.map((btn, index) => (index > 0 ? [, btn] : btn))}
);
@@ -222,10 +222,9 @@ async function handleOpen(row: Api.Workflow.Instance, type: 'edit' | 'detail') {
operateType.value = type;
businessId.value = row.businessId;
const formPath = row.formPath;
- if (formPath) {
- dynamicComponent.value = await loadDynamicComponent(modules, formPath);
- showViewDrawer();
- }
+ if (!formPath) return;
+ dynamicComponent.value = await loadDynamicComponent(modules, formPath);
+ showViewDrawer();
}
async function handleDelete(row: Api.Workflow.Instance) {
diff --git a/src/views/workflow/task/task-copy/index.vue b/src/views/workflow/task/task-copy/index.vue
index cf5be5b0..531c0b29 100644
--- a/src/views/workflow/task/task-copy/index.vue
+++ b/src/views/workflow/task/task-copy/index.vue
@@ -171,10 +171,9 @@ async function handleView(row: Api.Workflow.Task) {
businessId.value = row.businessId;
taskId.value = row.id;
const formPath = row.formPath;
- if (formPath) {
- dynamicComponent.value = await loadDynamicComponent(modules, formPath);
- showViewDrawer();
- }
+ if (!formPath) return;
+ dynamicComponent.value = await loadDynamicComponent(modules, formPath);
+ showViewDrawer();
}
@@ -240,6 +239,7 @@ async function handleView(row: Api.Workflow.Task) {
/>
diff --git a/src/views/workflow/task/task-waiting/index.vue b/src/views/workflow/task/task-waiting/index.vue
index 748cc724..98e56dbb 100644
--- a/src/views/workflow/task/task-waiting/index.vue
+++ b/src/views/workflow/task/task-waiting/index.vue
@@ -165,10 +165,9 @@ async function handleApproval(row: Api.Workflow.Task) {
businessId.value = row.businessId;
taskId.value = row.id;
const formPath = row.formPath;
- if (formPath) {
- dynamicComponent.value = await loadDynamicComponent(modules, formPath);
- showViewDrawer();
- }
+ if (!formPath) return;
+ dynamicComponent.value = await loadDynamicComponent(modules, formPath);
+ showViewDrawer();
}