feat: 流程审批添加查看流程图,放出必填检查;流程发起添加loading

This commit is contained in:
GAOANG
2024-04-07 08:32:57 +08:00
parent fc8e052a4a
commit 4f32569fae
3 changed files with 86 additions and 53 deletions

View File

@ -42,6 +42,12 @@
<Title :font-size="18" default-value="流转信息"></Title>
<flow-history :items="getTaskRecords()"></flow-history>
<opinion-dialog ref="opinionDlg" />
<a-modal :visible="showFlowChart" centered class="geg" title="流程图" width="1200px" :closable="false">
<process-information :process-id="processId" :xml="data.xml" />
<template #footer>
<a-button type="primary" @click="closeFlowChart">关闭</a-button>
</template>
</a-modal>
</div>
</div>
</template>
@ -61,6 +67,7 @@ import Title from '/@/components/Title/src/Title.vue';
import FlowHistory from '/@/components/SecondDev/FlowHistory.vue';
import { message } from 'ant-design-vue';
import useEventBus from '/@/hooks/event/useEventBus';
import ProcessInformation from '/@/views/workflow/task/components/flow/ProcessInformation.vue';
const { data, approveUserData, initProcessData, notificationError, notificationSuccess } = userTaskItem();
const { bus, FLOW_PROCESSED } = useEventBus();
@ -80,6 +87,7 @@ const formConfigs = ref();
const opinionDlg = ref();
const validateSuccess = ref(false);
const formInformation = ref();
const showFlowChart = ref(false);
let approvalData = reactive({
isCountersign: false,
@ -99,7 +107,19 @@ let approvalData = reactive({
});
let approvedType = ref(ApproveType.AGREE);
function onMoreClick() { }
function onMoreClick(e) {
if (e.key === "flowchart") {
openFlowChart()
}
}
function closeFlowChart() {
showFlowChart.value = false;
}
function openFlowChart() {
showFlowChart.value = true;
}
function close() {
tabStore.closeTab(currentRoute, router);
@ -267,7 +287,7 @@ async function getApproveParams() {
async function onFinish(values) {
try {
if (/*validateSuccess.value*/ true) {
if (validateSuccess.value) {
let params = await getApproveParams();
await postApproval(params);
flowSuccess();