--添加测试模块
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-bg-wrap">
|
||||
<a-spin :spinning="loading" tip="加载中...">
|
||||
<a-spin :spinning="loading" tip="加载中...">
|
||||
<div class="page-bg-wrap">
|
||||
<div class="geg-flow-page">
|
||||
<div class="top-toolbar">
|
||||
<a-space :size="10" wrap>
|
||||
@ -22,11 +22,8 @@
|
||||
</slot>
|
||||
暂存
|
||||
</a-button>
|
||||
<a-button>
|
||||
<slot name="icon">
|
||||
<printer-outlined />
|
||||
</slot>
|
||||
打印
|
||||
<a-button @click="handleDelete" danger v-if="rDraftsId!='0'">
|
||||
删除
|
||||
</a-button>
|
||||
<a-button @click="openFlowChart">
|
||||
<slot name="icon">
|
||||
@ -47,8 +44,8 @@
|
||||
</template>
|
||||
</a-modal>
|
||||
<opinion-dialog ref="opinionDlg" />
|
||||
</a-spin>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -63,7 +60,7 @@
|
||||
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';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import OpinionDialog from '/@/components/SecondDev/OpinionDialog.vue';
|
||||
import { ApproveCode, ApproveType } from '/@/enums/workflowEnum';
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
@ -80,7 +77,7 @@
|
||||
const fullPath = currentRoute.fullPath;
|
||||
const rQuery = currentRoute.query;
|
||||
const rSchemaId = rParams.arg1;
|
||||
const rDraftsId = rParams.arg2;
|
||||
let rDraftsId = ref(rParams.arg2);
|
||||
const taskId = ref();
|
||||
const loading = ref(false);
|
||||
const draftsJsonStr = localStorage.getItem('draftsJsonStr');
|
||||
@ -183,11 +180,12 @@
|
||||
try {
|
||||
disableSubmit.value = true;
|
||||
let formModels = await formInformation.value.saveDraftData();
|
||||
if (rDraftsId !== '0') {
|
||||
let res = await putDraft(rSchemaId, formModels, rDraftsId, props.rowKeyData);
|
||||
if (rDraftsId.value !== '0') {
|
||||
let res = await putDraft(rSchemaId, formModels, rDraftsId.value, props.rowKeyData);
|
||||
showResult(res, '保存草稿');
|
||||
} else {
|
||||
let res = await postDraft(rSchemaId, formModels, props.rowKeyData);
|
||||
rDraftsId.value = res
|
||||
showResult(res, '保存草稿');
|
||||
}
|
||||
} catch (error) {
|
||||
@ -291,11 +289,27 @@
|
||||
stampPassword: values.password,*/
|
||||
isOldSystem: system,
|
||||
nextTaskUser: approvalData.nextTaskUser,
|
||||
draftId: rDraftsId,
|
||||
draftId: rDraftsId.value,
|
||||
};
|
||||
}
|
||||
|
||||
async function saveLaunch() {
|
||||
if (!taskId.value && rDraftsId.value!='0') {
|
||||
try {
|
||||
await new Promise((resolve, reject) => {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '请确认是否提交流程,提交后流程不能删除',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: () => resolve(),
|
||||
onCancel: () => reject()
|
||||
});
|
||||
});
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
}
|
||||
data.submitLoading = true;
|
||||
loading.value = true;
|
||||
try {
|
||||
@ -306,6 +320,7 @@
|
||||
let successValidate = validateForms.filter((ele) => {
|
||||
return ele.validate;
|
||||
});
|
||||
console.info("validateForms:"+JSON.stringify(validateForms));
|
||||
if (successValidate.length == validateForms.length) {
|
||||
mainFormModels.value = await formInformation.value.getFormModels(true);
|
||||
/*for (let i in mainFormModels.value) {
|
||||
@ -388,6 +403,29 @@
|
||||
});
|
||||
return fileFolderIds;
|
||||
}
|
||||
async function handleDelete() {
|
||||
Modal.confirm({
|
||||
title: '提示信息',
|
||||
content: '是否确认删除?删除后无法恢复数据!',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
async onOk() {
|
||||
try {
|
||||
let res = await deleteDraft([rDraftsId.value]);
|
||||
if (res) {
|
||||
message.success('删除成功');
|
||||
setTimeout(() => {
|
||||
bus.emit(CREATE_FLOW, {});
|
||||
close();
|
||||
}, 500);
|
||||
} else {
|
||||
message.error('删除失败');
|
||||
}
|
||||
} catch (error) {}
|
||||
},
|
||||
onCancel() {},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less"></style>
|
||||
|
||||
Reference in New Issue
Block a user