修复:草稿发起审批后删除原草稿-补充漏提交文件
This commit is contained in:
@ -60,7 +60,7 @@
|
|||||||
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
||||||
import { CloseOutlined, SendOutlined, ClockCircleOutlined, PrinterOutlined, ApartmentOutlined } from '@ant-design/icons-vue';
|
import { CloseOutlined, SendOutlined, ClockCircleOutlined, PrinterOutlined, ApartmentOutlined } from '@ant-design/icons-vue';
|
||||||
import { nextTick, onMounted, ref, toRaw, reactive } from '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 { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { separator } from '/@bpmn/config/info';
|
import { separator } from '/@bpmn/config/info';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
@ -250,12 +250,38 @@
|
|||||||
isClose: true
|
isClose: true
|
||||||
});
|
});
|
||||||
message.success('操作成功');
|
message.success('操作成功');
|
||||||
|
if (rQuery?.createType === 'drafts') {
|
||||||
|
handleDelete();
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
bus.emit(CREATE_FLOW, {});
|
bus.emit(CREATE_FLOW, {});
|
||||||
close();
|
close();
|
||||||
}, 500);
|
}, 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() {
|
function flowFail() {
|
||||||
opinionDlg.value.stopLoading();
|
opinionDlg.value.stopLoading();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,7 +104,10 @@ async function handleEdit(record) {
|
|||||||
processData.visible = true;*/
|
processData.visible = true;*/
|
||||||
localStorage.setItem('draftsJsonStr', res.formData);
|
localStorage.setItem('draftsJsonStr', res.formData);
|
||||||
router.push({
|
router.push({
|
||||||
path: `/flow/${res.schemaId}/${record.id}/createFlow`
|
path: `/flow/${res.schemaId}/${record.id}/createFlow`,
|
||||||
|
query: {
|
||||||
|
createType: 'drafts'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user