feat:修复流程图导入导出。
1.分为增量和覆盖导入两种,会根据导出的id,对覆盖导入的更新原有的流程表单,增量是保留原表单的新增一个允许同名同code的新流程(或者原来没有的新增也可)。两种导入都可以对新增导入进行处理。
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 + '/workflow/schema/import?cover='+props.coverType;
|
||||
data.headers.Authorization = `Bearer ${getToken()}`;
|
||||
}
|
||||
function close() {
|
||||
@ -68,7 +73,7 @@
|
||||
message.success(t(`{name}导入成功!`, { name: info.file.name }));
|
||||
close();
|
||||
} else {
|
||||
message.error(t('导入流程失败!'));
|
||||
message.error(t('导入流程失败!'+ info.file.response.msg));
|
||||
}
|
||||
} else if (info.file.status === 'error') {
|
||||
message.error(t(`{name}上传失败.`, { name: info.file.name }));
|
||||
|
||||
@ -27,8 +27,11 @@
|
||||
<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-button v-auth="'design:importFlow'">{{ t('增量导入流程') }}</a-button></ImportFlow
|
||||
>
|
||||
<ImportFlow :coverType="true"
|
||||
><a-button v-auth="'design:importFlow'">{{ t('覆盖导入流程') }}</a-button></ImportFlow
|
||||
>
|
||||
<a-button v-auth="'design:exportFlow'" @click.stop="handleDownByData">{{
|
||||
t('导出流程')
|
||||
|
||||
Reference in New Issue
Block a user