chore: 调整为部署json类型

This commit is contained in:
dap 2025-01-16 14:12:27 +08:00
parent 8816086b37
commit b1bc6f632d
2 changed files with 10 additions and 4 deletions

View File

@ -217,7 +217,7 @@ async function handleExportXml(row: any) {
const hideLoading = message.loading($t('pages.common.downloadLoading'), 0); const hideLoading = message.loading($t('pages.common.downloadLoading'), 0);
try { try {
const blob = await workflowDefinitionExport(row.id); const blob = await workflowDefinitionExport(row.id);
downloadByData(blob, `${row.flowName}-${Date.now()}.xml`); downloadByData(blob, `${row.flowName}-${Date.now()}.json`);
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} finally { } finally {
@ -245,6 +245,12 @@ function handleDeploy() {
deployModalApi.setData({ category: selectedCategory }); deployModalApi.setData({ category: selectedCategory });
deployModalApi.open(); deployModalApi.open();
} }
async function handleDeploySuccess() {
//
currentStatus.value = 0;
await tableApi.reload();
}
</script> </script>
<template> <template>
@ -353,6 +359,6 @@ function handleDeploy() {
</BasicTable> </BasicTable>
</div> </div>
<ProcessDefinitionModal @reload="() => tableApi.reload()" /> <ProcessDefinitionModal @reload="() => tableApi.reload()" />
<ProcessDefinitionDeployModal @reload="() => tableApi.reload()" /> <ProcessDefinitionDeployModal @reload="handleDeploySuccess" />
</Page> </Page>
</template> </template>

View File

@ -62,12 +62,12 @@ function handleCancel() {
:before-upload="() => false" :before-upload="() => false"
:max-count="1" :max-count="1"
:show-upload-list="true" :show-upload-list="true"
accept="text/xml" accept="text/json"
> >
<p class="ant-upload-drag-icon flex items-center justify-center"> <p class="ant-upload-drag-icon flex items-center justify-center">
<InBoxIcon class="text-primary size-[48px]" /> <InBoxIcon class="text-primary size-[48px]" />
</p> </p>
<p class="ant-upload-text">点击或者拖拽到此处上传文件</p> <p class="ant-upload-text">点击或者拖拽到此处上传[json]文件</p>
</UploadDragger> </UploadDragger>
</BasicModal> </BasicModal>
</template> </template>