Merge branch 'dev-zhao' into 'dev'
feat:修复流程图导入导出。 See merge request itc-framework/ma/2024/front!26
This commit is contained in:
@ -49,10 +49,15 @@
|
||||
action: '',
|
||||
headers: { Authorization: '' },
|
||||
});
|
||||
const props = defineProps({
|
||||
coverType: {
|
||||
type: Boolean
|
||||
},
|
||||
});
|
||||
|
||||
async function open() {
|
||||
data.visible = true;
|
||||
data.action = getAppEnvConfig().VITE_GLOB_API_URL + '/workflow/schema/import';
|
||||
data.action = getAppEnvConfig().VITE_GLOB_API_URL + (getAppEnvConfig().VITE_GLOB_API_URL_PREFIX|| '') + '/workflow/schema/import?cover='+props.coverType;
|
||||
data.headers.Authorization = `Bearer ${getToken()}`;
|
||||
}
|
||||
function close() {
|
||||
@ -65,13 +70,13 @@
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
if (info.file && info.file.response && info.file.response.code == 0) {
|
||||
message.success(t(`{name}导入成功!`, { name: info.file.name }));
|
||||
message.success(`${info.file.name}导入成功!`);
|
||||
close();
|
||||
} else {
|
||||
message.error(t('导入流程失败!'));
|
||||
message.error('导入流程失败!'+ info.file.response.msg);
|
||||
}
|
||||
} else if (info.file.status === 'error') {
|
||||
message.error(t(`{name}上传失败.`, { name: info.file.name }));
|
||||
message.error(`${info.file.name}上传失败.`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -27,9 +27,22 @@
|
||||
<History :schemaId="schemaId"
|
||||
><a-button v-auth="'design:history'">{{ t('历史记录') }}</a-button></History
|
||||
>
|
||||
<ImportFlow
|
||||
><a-button v-auth="'design:importFlow'">{{ t('导入流程') }}</a-button></ImportFlow
|
||||
>
|
||||
<ImportFlow :coverType="false">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
<span>新增导入会保留原id流程新增新流程,并不会验证code和name是否相同(如果旧流程还绑定中,导入新流程也是绑定状态的话,会导致page查询注入workflow出错)</span>
|
||||
</template>
|
||||
<a-button v-auth="'design:importFlow'">{{ t('新增导入流程') }}</a-button>
|
||||
</a-tooltip>
|
||||
</ImportFlow>
|
||||
<ImportFlow :coverType="true">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
<span>覆盖导入同样支持新增流程导入,会有保存验证,保存出错请确认报错信息。</span>
|
||||
</template>
|
||||
<a-button v-auth="'design:importFlow'">{{ t('覆盖导入流程') }}</a-button>
|
||||
</a-tooltip>
|
||||
</ImportFlow>
|
||||
<a-button v-auth="'design:exportFlow'" @click.stop="handleDownByData">{{
|
||||
t('导出流程')
|
||||
}}</a-button>
|
||||
|
||||
Reference in New Issue
Block a user