optimize(projects): 优化代码

This commit is contained in:
AN
2025-07-15 22:49:55 +08:00
parent 01d42722f5
commit 59a69dd9f0
7 changed files with 19 additions and 23 deletions

View File

@ -25,6 +25,6 @@ const iframeUrl = `${baseURL}/warm-flow-ui/index.html?${stringify(urlParams)}`;
<template>
<div>
<iframe :src="iframeUrl" class="h-[600px] w-full" />
<iframe :src="iframeUrl" class="h-[450px] w-full" />
</div>
</template>

View File

@ -281,7 +281,7 @@ watch(visible, initializeData, { immediate: true });
</NForm>
</div>
<div v-else>
<NDescriptions bordered :column="2" label-placement="left">
<NDescriptions size="small" bordered :column="2" label-placement="left">
<NDescriptionsItem label="流程类型">
{{ flowCodeTypeRecord[modelDetail.flowCode] }}
</NDescriptionsItem>

View File

@ -323,10 +323,9 @@ const businessId = ref<CommonType.IdType>();
async function handlePreview(row: Api.Workflow.Instance) {
businessId.value = row.businessId;
const formPath = row.formPath;
if (formPath) {
dynamicComponent.value = await loadDynamicComponent(modules, formPath);
showPreviewDrawer();
}
if (!formPath) return;
dynamicComponent.value = await loadDynamicComponent(modules, formPath);
showPreviewDrawer();
}
</script>

View File

@ -169,7 +169,7 @@ const {
}
return (
<div class="flex-center gap-8px">
<div class="flex-center gap-1px">
{buttons.map((btn, index) => (index > 0 ? [<NDivider vertical />, btn] : btn))}
</div>
);
@ -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) {

View File

@ -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();
}
</script>
@ -240,6 +239,7 @@ async function handleView(row: Api.Workflow.Task) {
/>
<component
:is="dynamicComponent"
v-if="dynamicComponent"
:visible="viewVisible"
operate-type="detail"
:business-id="businessId"

View File

@ -184,10 +184,9 @@ async function handleView(row: Api.Workflow.HisTask) {
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();
}
</script>

View File

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