style: lint格式化文件
This commit is contained in:
@ -1,78 +1,75 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="请稍后...">
|
||||
<div class="page-bg-wrap">
|
||||
<div class="geg-flow-page">
|
||||
<div class="top-toolbar">
|
||||
<a-space :size="10" wrap>
|
||||
<a-button style="margin-right: 10px" @click="close">
|
||||
<slot name="icon">
|
||||
<close-outlined />
|
||||
</slot>
|
||||
关闭
|
||||
</a-button>
|
||||
<template v-for="(btn, index) in buttonMap.normal">
|
||||
<a-button @click="onClickBtn(btn)" :type="btn.buttonCode === ApproveCode.AGREE ? 'primary' : ''">
|
||||
<slot name="icon" v-if="btn.buttonCode === ApproveCode.AGREE">
|
||||
<check-circle-outlined />
|
||||
<div class="page-bg-wrap">
|
||||
<div class="geg-flow-page">
|
||||
<div class="top-toolbar">
|
||||
<a-space :size="10" wrap>
|
||||
<a-button style="margin-right: 10px" @click="close">
|
||||
<slot name="icon">
|
||||
<close-outlined />
|
||||
</slot>
|
||||
<slot name="icon" v-if="btn.buttonCode === ApproveCode.REJECT">
|
||||
<stop-outlined />
|
||||
</slot>
|
||||
{{btn.buttonName}}
|
||||
关闭
|
||||
</a-button>
|
||||
</template>
|
||||
<template v-for="(btnGroup, btnGroupKey) in buttonMap">
|
||||
<a-dropdown v-if="btnGroupKey!=='normal' && btnGroup.length">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item v-for="(btn, index) in btnGroup" :key="btn.buttonCode" @click="onClickBtn(btn)">
|
||||
{{btn.buttonName}}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>
|
||||
{{btnGroupKey}}
|
||||
<down-outlined />
|
||||
<template v-for="(btn, index) in buttonMap.normal">
|
||||
<a-button @click="onClickBtn(btn)" :type="btn.buttonCode === ApproveCode.AGREE ? 'primary' : ''">
|
||||
<slot name="icon" v-if="btn.buttonCode === ApproveCode.AGREE">
|
||||
<check-circle-outlined />
|
||||
</slot>
|
||||
<slot name="icon" v-if="btn.buttonCode === ApproveCode.REJECT">
|
||||
<stop-outlined />
|
||||
</slot>
|
||||
{{ btn.buttonName }}
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</a-space>
|
||||
</div>
|
||||
<FormInformation
|
||||
:key="renderKey"
|
||||
ref="formInformation"
|
||||
:disabled="readonly"
|
||||
:formAssignmentData="data.formAssignmentData"
|
||||
:formInfos="data.formInfos"
|
||||
:opinions="data.opinions"
|
||||
:opinionsComponents="data.opinionsComponents"
|
||||
@get-form-configs="(config) => (formConfigs = config)"
|
||||
/>
|
||||
<Title :font-size="18" default-value="流转信息"></Title>
|
||||
<flow-history :items="getTaskRecords()"></flow-history>
|
||||
<opinion-dialog ref="opinionDlg" />
|
||||
<transfer-dialog ref="transferDlg" />
|
||||
<a-modal :closable="false" v-if="showFlowChart" visible="true" centered class="geg" title="流程图" width="1200px" @cancel="closeFlowChart">
|
||||
<process-information :process-id="processId" :xml="data.xml"
|
||||
:currentTaskInfo="data.currentTaskInfo"
|
||||
:currentTaskAssigneeNames="data.currentTaskAssigneeNames"
|
||||
:currentTaskAssignees="data.currentTaskAssignees"/>
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="closeFlowChart">关闭</a-button>
|
||||
</template>
|
||||
</a-modal>
|
||||
<a-modal :closable="false" v-if="showRecord" visible="true" centered class="geg" title="流程记录" width="1200px" @cancel="closeFlowRecord">
|
||||
<div class="flow-record-box">
|
||||
<FlowRecord :list="data.taskRecords" :processId="processId"/>
|
||||
</template>
|
||||
<template v-for="(btnGroup, btnGroupKey) in buttonMap">
|
||||
<a-dropdown v-if="btnGroupKey !== 'normal' && btnGroup.length">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item v-for="(btn, index) in btnGroup" :key="btn.buttonCode" @click="onClickBtn(btn)">
|
||||
{{ btn.buttonName }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>
|
||||
{{ btnGroupKey }}
|
||||
<down-outlined />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</a-space>
|
||||
</div>
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="closeFlowRecord">关闭</a-button>
|
||||
</template>
|
||||
</a-modal>
|
||||
<SelectUserV2 ref="selectUser" v-model:value="addStepUser" @change="changeAddStepUser" just-dialog title="加签减签"/>
|
||||
<FormInformation
|
||||
:key="renderKey"
|
||||
ref="formInformation"
|
||||
:disabled="readonly"
|
||||
:formAssignmentData="data.formAssignmentData"
|
||||
:formInfos="data.formInfos"
|
||||
:opinions="data.opinions"
|
||||
:opinionsComponents="data.opinionsComponents"
|
||||
@get-form-configs="(config) => (formConfigs = config)"
|
||||
/>
|
||||
<Title :font-size="18" default-value="流转信息"></Title>
|
||||
<flow-history :items="getTaskRecords()"></flow-history>
|
||||
<opinion-dialog ref="opinionDlg" />
|
||||
<transfer-dialog ref="transferDlg" />
|
||||
<a-modal :closable="false" v-if="showFlowChart" visible="true" centered class="geg" title="流程图" width="1200px" @cancel="closeFlowChart">
|
||||
<process-information :process-id="processId" :xml="data.xml" :currentTaskInfo="data.currentTaskInfo" :currentTaskAssigneeNames="data.currentTaskAssigneeNames" :currentTaskAssignees="data.currentTaskAssignees" />
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="closeFlowChart">关闭</a-button>
|
||||
</template>
|
||||
</a-modal>
|
||||
<a-modal :closable="false" v-if="showRecord" visible="true" centered class="geg" title="流程记录" width="1200px" @cancel="closeFlowRecord">
|
||||
<div class="flow-record-box">
|
||||
<FlowRecord :list="data.taskRecords" :processId="processId" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="closeFlowRecord">关闭</a-button>
|
||||
</template>
|
||||
</a-modal>
|
||||
<SelectUserV2 ref="selectUser" v-model:value="addStepUser" @change="changeAddStepUser" just-dialog title="加签减签" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -100,7 +97,6 @@
|
||||
import { TaskTypeUrl } from '/@/enums/workflowEnum';
|
||||
import { postSetSign, postSetSignV2 } from '/@/api/workflow/task';
|
||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
||||
|
||||
|
||||
const spinning = ref(false);
|
||||
const userStore = useUserStore();
|
||||
@ -120,37 +116,37 @@
|
||||
const taskId = ref(rQuery.taskId);
|
||||
const processId = ref(rParams.arg2);
|
||||
const readonly = ref(!!rQuery.readonly); // 查看流程会触发只读模式
|
||||
const rDraftsId = ref(rQuery.draftId || '')
|
||||
const rDraftsId = ref(rQuery.draftId || '');
|
||||
const renderKey = ref('');
|
||||
const formConfigs = ref();
|
||||
const opinionDlg = ref();
|
||||
const transferDlg = ref();
|
||||
const validateSuccess = ref(false);
|
||||
const formInformation = ref();
|
||||
const selectUser = ref()
|
||||
const addStepUser = ref('')
|
||||
const lastAddStepUser = ref('')
|
||||
const hasBtnAddStep = ref(false)
|
||||
const hasBtnTransfer = ref(false)
|
||||
const selectUser = ref();
|
||||
const addStepUser = ref('');
|
||||
const lastAddStepUser = ref('');
|
||||
const hasBtnAddStep = ref(false);
|
||||
const hasBtnTransfer = ref(false);
|
||||
const showFlowChart = ref(false);
|
||||
const showRecord = ref(false)
|
||||
const showRecord = ref(false);
|
||||
const hasBtnApprove = ref(false);
|
||||
const hasBtnDisagree = ref(false)
|
||||
const hasBtnDisagree = ref(false);
|
||||
const hasBtnReject = ref(false);
|
||||
const hasBtnFinish = ref(false);
|
||||
const hasBtnDraft = ref(false)
|
||||
const approveBtnName = ref('同意')
|
||||
const transferBtnName = ref('转办')
|
||||
const addStepBtnName = ref('会签')
|
||||
const finishBtnName = ref('终止')
|
||||
const rejectBtnName = ref('拒绝')
|
||||
const drawBackBtnName = ref('撤回')
|
||||
const draftBtnName = ref('暂存')
|
||||
const disagreeBtnName = ref('不同意')
|
||||
const hasBtnDraft = ref(false);
|
||||
const approveBtnName = ref('同意');
|
||||
const transferBtnName = ref('转办');
|
||||
const addStepBtnName = ref('会签');
|
||||
const finishBtnName = ref('终止');
|
||||
const rejectBtnName = ref('拒绝');
|
||||
const drawBackBtnName = ref('撤回');
|
||||
const draftBtnName = ref('暂存');
|
||||
const disagreeBtnName = ref('不同意');
|
||||
const buttonMap = ref({
|
||||
normal: []
|
||||
})
|
||||
let draftData = {}
|
||||
});
|
||||
let draftData = {};
|
||||
const drawNode = ref('');
|
||||
const props = defineProps({
|
||||
rowKeyData: {
|
||||
@ -158,7 +154,7 @@
|
||||
}
|
||||
});
|
||||
const processInfo = ref();
|
||||
provide("processInfo", processInfo);
|
||||
provide('processInfo', processInfo);
|
||||
|
||||
let approvalData = reactive({
|
||||
isCountersign: false,
|
||||
@ -181,46 +177,48 @@
|
||||
|
||||
function showButton(btn) {
|
||||
// 撤回有drawNode才显示,流程图任何情况下都显示
|
||||
let show = (btn.checked && ((!readonly.value && btn.buttonCode !== ApproveCode.DRAWBACK) || (readonly.value && btn.buttonCode === ApproveCode.DRAWBACK && drawNode.value))) || (btn.buttonCode === ApproveCode.FLOWBPMN || btn.buttonCode === ApproveCode.FLOWRECORD)
|
||||
return show
|
||||
let show =
|
||||
(btn.checked && ((!readonly.value && btn.buttonCode !== ApproveCode.DRAWBACK) || (readonly.value && btn.buttonCode === ApproveCode.DRAWBACK && drawNode.value))) ||
|
||||
btn.buttonCode === ApproveCode.FLOWBPMN ||
|
||||
btn.buttonCode === ApproveCode.FLOWRECORD;
|
||||
return show;
|
||||
}
|
||||
|
||||
|
||||
function onClickBtn(btn) {
|
||||
const key = btn.buttonCode;
|
||||
if(btn.buttonType === ButtonType.DEFAULT) {
|
||||
let funName = `handle${key}`
|
||||
methods[funName](btn)
|
||||
} else if(btn.buttonType === ButtonType.SCRIPT) {
|
||||
handleFunction(btn)
|
||||
if (btn.buttonType === ButtonType.DEFAULT) {
|
||||
let funName = `handle${key}`;
|
||||
methods[funName](btn);
|
||||
} else if (btn.buttonType === ButtonType.SCRIPT) {
|
||||
handleFunction(btn);
|
||||
}
|
||||
}
|
||||
function onMoreClick(e) {
|
||||
const key = e.key;
|
||||
if(btn.buttonType === ButtonType.DEFAULT) {
|
||||
let funName = `handle${key}`
|
||||
methods[funName](btn)
|
||||
} else if(btn.buttonType === ButtonType.SCRIPT) {
|
||||
handleFunction(btn)
|
||||
if (btn.buttonType === ButtonType.DEFAULT) {
|
||||
let funName = `handle${key}`;
|
||||
methods[funName](btn);
|
||||
} else if (btn.buttonType === ButtonType.SCRIPT) {
|
||||
handleFunction(btn);
|
||||
}
|
||||
}
|
||||
|
||||
function handleFunction(btn) {
|
||||
// eval(script)
|
||||
if (btn.handleFuncName) {
|
||||
formInformation.value?.handleInnerFun(btn.handleFuncName)
|
||||
formInformation.value?.handleInnerFun(btn.handleFuncName);
|
||||
}
|
||||
}
|
||||
|
||||
const methods = {
|
||||
handlesetDraft() {
|
||||
setDraft()
|
||||
setDraft();
|
||||
},
|
||||
handledraft() {
|
||||
saveDraft();
|
||||
},
|
||||
handleaddStep() {
|
||||
selectUser.value.show()
|
||||
selectUser.value.show();
|
||||
},
|
||||
handledrawBack() {
|
||||
Modal.confirm({
|
||||
@ -232,23 +230,25 @@
|
||||
cancelText: t('取消'),
|
||||
onOk() {
|
||||
openSpinning();
|
||||
withdraw(processId.value, drawNode.value).then((res) => {
|
||||
if (res) {
|
||||
notification.open({
|
||||
type: 'success',
|
||||
message: t('撤回'),
|
||||
description: t('撤回成功')
|
||||
});
|
||||
} else {
|
||||
notification.open({
|
||||
type: 'error',
|
||||
message: t('撤回'),
|
||||
description: t('撤回失败')
|
||||
});
|
||||
}
|
||||
}).finally(()=>{
|
||||
closeSpinning();
|
||||
});
|
||||
withdraw(processId.value, drawNode.value)
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
notification.open({
|
||||
type: 'success',
|
||||
message: t('撤回'),
|
||||
description: t('撤回成功')
|
||||
});
|
||||
} else {
|
||||
notification.open({
|
||||
type: 'error',
|
||||
message: t('撤回'),
|
||||
description: t('撤回失败')
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
closeSpinning();
|
||||
});
|
||||
},
|
||||
onCancel() {}
|
||||
});
|
||||
@ -269,30 +269,30 @@
|
||||
onTransferClick();
|
||||
},
|
||||
handleagree() {
|
||||
onApproveClick()
|
||||
onApproveClick();
|
||||
},
|
||||
handledisagree() {
|
||||
onDisagreeClick()
|
||||
onDisagreeClick();
|
||||
},
|
||||
handlereject() {
|
||||
onDenyClick()
|
||||
onDenyClick();
|
||||
},
|
||||
handleflowRecord() {
|
||||
showRecord.value = true;
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function closeFlowChart() {
|
||||
showFlowChart.value = false;
|
||||
}
|
||||
|
||||
function closeFlowRecord() {
|
||||
showRecord.value = false
|
||||
showRecord.value = false;
|
||||
}
|
||||
|
||||
function close() {
|
||||
tabStore.closeTab(currentRoute, router);
|
||||
if(window?.isOnlyShowContent=='Y') {
|
||||
if (window?.isOnlyShowContent == 'Y') {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
@ -300,13 +300,13 @@
|
||||
let formData = [];
|
||||
let params = {
|
||||
taskId: taskId.value,
|
||||
userId: userStore.getUserInfo.id,
|
||||
}
|
||||
let res = await getDraftInfo('', taskId.value, userStore.getUserInfo.id)
|
||||
if(res) {
|
||||
draftData = JSON.parse(res.formData)
|
||||
rDraftsId.value = res.id
|
||||
if(!needModal) return
|
||||
userId: userStore.getUserInfo.id
|
||||
};
|
||||
let res = await getDraftInfo('', taskId.value, userStore.getUserInfo.id);
|
||||
if (res) {
|
||||
draftData = JSON.parse(res.formData);
|
||||
rDraftsId.value = res.id;
|
||||
if (!needModal) return;
|
||||
Modal.confirm({
|
||||
title: () => '提示',
|
||||
content: () => '确认使用草稿覆盖当前数据?',
|
||||
@ -329,10 +329,10 @@
|
||||
let res = await putDraft(schemaId.value, formModels, rDraftsId.value, props.rowKeyData, processId.value, taskId.value);
|
||||
showResult(res, '保存草稿');
|
||||
} else {
|
||||
let res = await postDraft(schemaId.value, formModels, props.rowKeyData, processId.value, taskId.value );
|
||||
let res = await postDraft(schemaId.value, formModels, props.rowKeyData, processId.value, taskId.value);
|
||||
showResult(res, '保存草稿');
|
||||
}
|
||||
setDraft(false)
|
||||
setDraft(false);
|
||||
spinning.value = false;
|
||||
} catch (error) {
|
||||
spinning.value = false;
|
||||
@ -346,36 +346,35 @@
|
||||
notificationError(title);
|
||||
}
|
||||
}
|
||||
async function changeAddStepUser (ids, memberList) {
|
||||
async function changeAddStepUser(ids, memberList) {
|
||||
try {
|
||||
spinning.value = true;
|
||||
let idList = memberList.map(item => {
|
||||
return item.id
|
||||
})
|
||||
let lastIdList = lastAddStepUser.value.split(',')
|
||||
let addUserIds = idList.filter(item => {
|
||||
return lastIdList.indexOf(item) == -1
|
||||
})
|
||||
let subUserIds = lastIdList.filter(item => {
|
||||
return idList.indexOf(item) == -1
|
||||
})
|
||||
let idList = memberList.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
let lastIdList = lastAddStepUser.value.split(',');
|
||||
let addUserIds = idList.filter((item) => {
|
||||
return lastIdList.indexOf(item) == -1;
|
||||
});
|
||||
let subUserIds = lastIdList.filter((item) => {
|
||||
return idList.indexOf(item) == -1;
|
||||
});
|
||||
let data = {
|
||||
addUserIds,
|
||||
subUserIds,
|
||||
schemaId: schemaId.value,
|
||||
taskId: taskId.value
|
||||
}
|
||||
};
|
||||
await postSetSignV2(data);
|
||||
let res = await getApprovalProcess(unref(taskId), unref(processId));
|
||||
initProcessData(res);
|
||||
spinning.value = false;
|
||||
message.success('操作成功');
|
||||
} catch (e) {
|
||||
message.error(e)
|
||||
message.error(e);
|
||||
spinning.value = false;
|
||||
message.error('操作失败,请稍后再试');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function onApproveClick(isAutoAgreeBreak = false) {
|
||||
@ -394,7 +393,7 @@
|
||||
approvalData.approvedResult = ApproveCode.AGREE;
|
||||
//如果是自动同意触发的,关闭弹层的loading
|
||||
if (isAutoAgreeBreak) {
|
||||
opinionDlg.value.stopLoading()
|
||||
opinionDlg.value.stopLoading();
|
||||
}
|
||||
closeSpinning();
|
||||
opinionDlg.value.toggleDialog({
|
||||
@ -403,20 +402,18 @@
|
||||
callback: (args) => {
|
||||
approvalData.approvedContent = args.opinion;
|
||||
approvalData.nextTaskUser = args.nextTaskUser;
|
||||
approvalData.isEnd=args.isEnd;
|
||||
approvalData.isEnd = args.isEnd;
|
||||
onFinish('approve');
|
||||
}
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e);
|
||||
closeSpinning();
|
||||
throw new Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async function onDisagreeClick() {
|
||||
|
||||
try {
|
||||
openSpinning();
|
||||
await submit();
|
||||
@ -437,9 +434,8 @@
|
||||
onFinish('disagree');
|
||||
}
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e);
|
||||
closeSpinning();
|
||||
throw new Error(e);
|
||||
}
|
||||
@ -534,37 +530,37 @@
|
||||
|
||||
function setBtnStatus() {
|
||||
const btnConfigs = approvalData.buttonConfigs;
|
||||
let draftBtn = btnConfigs.find((item) => item.buttonCode === ApproveCode.DRAFT)
|
||||
if(draftBtn && rDraftsId.value) {
|
||||
btnConfigs.push({
|
||||
...draftBtn,
|
||||
buttonName: t('从草稿导入'),
|
||||
buttonCode: 'setDraft',
|
||||
approveType: ApproveType.DRAFT,
|
||||
index: 1
|
||||
})
|
||||
let draftBtn = btnConfigs.find((item) => item.buttonCode === ApproveCode.DRAFT);
|
||||
if (draftBtn && rDraftsId.value) {
|
||||
btnConfigs.push({
|
||||
...draftBtn,
|
||||
buttonName: t('从草稿导入'),
|
||||
buttonCode: 'setDraft',
|
||||
approveType: ApproveType.DRAFT,
|
||||
index: 1
|
||||
});
|
||||
}
|
||||
btnConfigs.forEach((btn) => {
|
||||
const index = btn.index
|
||||
const buttonGroup = btn?.buttonGroup
|
||||
if(buttonGroup) {
|
||||
if(!buttonMap.value[buttonGroup]) {
|
||||
buttonMap.value[buttonGroup] = []
|
||||
const index = btn.index;
|
||||
const buttonGroup = btn?.buttonGroup;
|
||||
if (buttonGroup) {
|
||||
if (!buttonMap.value[buttonGroup]) {
|
||||
buttonMap.value[buttonGroup] = [];
|
||||
}
|
||||
if(showButton(btn)) {
|
||||
buttonMap.value[buttonGroup].push(btn)
|
||||
if (showButton(btn)) {
|
||||
buttonMap.value[buttonGroup].push(btn);
|
||||
}
|
||||
} else {
|
||||
if(showButton(btn)) {
|
||||
buttonMap.value['normal'].push(btn)
|
||||
if (showButton(btn)) {
|
||||
buttonMap.value['normal'].push(btn);
|
||||
}
|
||||
}
|
||||
for(let key in buttonMap.value) {
|
||||
for (let key in buttonMap.value) {
|
||||
buttonMap.value[key].sort((a, b) => {
|
||||
let aIndex = a?.index || 0
|
||||
let bIndex = b?.index || 0
|
||||
return aIndex - bIndex
|
||||
})
|
||||
let aIndex = a?.index || 0;
|
||||
let bIndex = b?.index || 0;
|
||||
return aIndex - bIndex;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -586,13 +582,13 @@
|
||||
const tabPrefix = readonly.value ? '查看' : '审批';
|
||||
tabStore.changeTitle(fullPath, `${tabPrefix}:${title}`);
|
||||
}
|
||||
if(taskId.value) {
|
||||
let ids = ''
|
||||
if (taskId.value) {
|
||||
let ids = '';
|
||||
res.currentTaskAssignees[res.taskInfo.taskDefinitionKey].forEach((item, index) => {
|
||||
ids = `${ids}${index == 0 ? '' : ','}${item.assigneeIdStr}`
|
||||
})
|
||||
addStepUser.value = ids
|
||||
lastAddStepUser.value = ids
|
||||
ids = `${ids}${index == 0 ? '' : ','}${item.assigneeIdStr}`;
|
||||
});
|
||||
addStepUser.value = ids;
|
||||
lastAddStepUser.value = ids;
|
||||
}
|
||||
if (res.buttonConfigs) {
|
||||
approvalData.buttonConfigs = res.buttonConfigs;
|
||||
@ -614,7 +610,7 @@
|
||||
approvalData.circulateConfigs = [];
|
||||
}
|
||||
renderKey.value = Math.random() + '';
|
||||
setDraft()
|
||||
setDraft();
|
||||
} catch (error) {}
|
||||
});
|
||||
|
||||
@ -686,11 +682,11 @@
|
||||
/*stampId: values.stampId,
|
||||
stampPassword: values.password,*/
|
||||
isOldSystem: system,
|
||||
isEnd:approvalData.isEnd,
|
||||
isEnd: approvalData.isEnd,
|
||||
nextTaskUser: approvalData.nextTaskUser
|
||||
};
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -700,7 +696,7 @@
|
||||
let params = await getApproveParams();
|
||||
let response = await postApproval(params);
|
||||
// 判断返回值是否带有isAutoAgree 来判断中间是否有自动审批的业务,如有再执行判断待审人员是否包含自己,不包含就直接flowSuccess
|
||||
if (checkIsAutoAgree(response)) return
|
||||
if (checkIsAutoAgree(response)) return;
|
||||
flowSuccess();
|
||||
data.submitLoading = false;
|
||||
}
|
||||
@ -712,13 +708,15 @@
|
||||
|
||||
/**
|
||||
* 判断该次审核是否触发自动同意事务,并且检验返回得task 是否是自身作为被审需要弹框再次审核
|
||||
* @param response
|
||||
* @param response
|
||||
*/
|
||||
function checkIsAutoAgree(response) {
|
||||
if (response != null
|
||||
&& response.length != 0
|
||||
&& response[0].isAutoAgree == true //
|
||||
&& response[0].approveUserIds.includes(userStore.getUserInfo.id)) {
|
||||
function checkIsAutoAgree(response) {
|
||||
if (
|
||||
response != null &&
|
||||
response.length != 0 &&
|
||||
response[0].isAutoAgree == true && //
|
||||
response[0].approveUserIds.includes(userStore.getUserInfo.id)
|
||||
) {
|
||||
// 注入新得taskId
|
||||
taskId.value = response[0].taskId;
|
||||
data.submitLoading = false;
|
||||
@ -727,8 +725,7 @@
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function openSpinning() {
|
||||
spinning.value = true;
|
||||
@ -739,8 +736,8 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.flow-record-box {
|
||||
height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
.flow-record-box {
|
||||
height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user