修复:草稿发起审批后删除原草稿-补充漏提交文件

This commit is contained in:
Je
2025-01-26 16:01:44 +08:00
parent 5699236a31
commit ec6175753c
2 changed files with 31 additions and 2 deletions

View File

@ -60,7 +60,7 @@
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
import { CloseOutlined, SendOutlined, ClockCircleOutlined, PrinterOutlined, ApartmentOutlined } from '@ant-design/icons-vue';
import { nextTick, onMounted, ref, toRaw, reactive } from 'vue';
import { postDraft, putDraft } from '/@/api/workflow/process';
import { deleteDraft, postDraft, putDraft } from '/@/api/workflow/process';
import { useI18n } from '/@/hooks/web/useI18n';
import { separator } from '/@bpmn/config/info';
import { message } from 'ant-design-vue';
@ -250,12 +250,38 @@
isClose: true
});
message.success('操作成功');
if (rQuery?.createType === 'drafts') {
handleDelete();
}
setTimeout(() => {
bus.emit(CREATE_FLOW, {});
close();
}, 500);
}
async function handleDelete() {
try {
let res = await deleteDraft([rDraftsId]);
if (res) {
notification.open({
type: 'success',
message: t('草稿删除'),
description: t('删除成功')
});
setTimeout(() => {
bus.emit(CREATE_FLOW, {});
close();
}, 500);
} else {
notification.open({
type: 'error',
message: t('草稿删除'),
description: t('删除失败')
});
}
} catch (error) { }
}
function flowFail() {
opinionDlg.value.stopLoading();
}

View File

@ -104,7 +104,10 @@ async function handleEdit(record) {
processData.visible = true;*/
localStorage.setItem('draftsJsonStr', res.formData);
router.push({
path: `/flow/${res.schemaId}/${record.id}/createFlow`
path: `/flow/${res.schemaId}/${record.id}/createFlow`,
query: {
createType: 'drafts'
}
});
} catch (error) { }
}