| | |
| | | import SubmitVerify from '@/components/Process/submitVerify.vue'; |
| | | import ApprovalRecord from '@/components/Process/approvalRecord.vue'; |
| | | import { AxiosResponse } from 'axios'; |
| | | |
| | | import { StartProcessBo } from '@/api/workflow/workflowCommon/types'; |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | | |
| | | const buttonLoading = ref(false); |
| | |
| | | |
| | | const leaveFormRef = ref<ElFormInstance>(); |
| | | |
| | | const submitFormData = ref<Record<string, any>>({ |
| | | const submitFormData = ref<StartProcessBo>({ |
| | | businessKey: '', |
| | | processKey: '', |
| | | tableName: '', |
| | | variables: {} |
| | | }); |
| | | const taskVariables = ref<Record<string, any>>({}); |
| | |
| | | proxy?.$modal.msgError('请假时间不能为空'); |
| | | return; |
| | | } |
| | | try { |
| | | leaveFormRef.value?.validate(async (valid: boolean) => { |
| | | form.value.startDate = leaveTime.value[0]; |
| | | form.value.endDate = leaveTime.value[1]; |
| | |
| | | } |
| | | } |
| | | }); |
| | | } finally { |
| | | buttonLoading.value = false; |
| | | } |
| | | }; |
| | | |
| | | //提交申请 |
| | | const handleStartWorkFlow = async (data: LeaveVO) => { |
| | | submitFormData.value.processKey = 'leave1'; |
| | | try { |
| | | submitFormData.value.tableName = 'test_leave'; |
| | | submitFormData.value.businessKey = data.id; |
| | | //流程变量 |
| | | taskVariables.value = { |
| | |
| | | buttonLoading.value = false; |
| | | submitVerifyRef.value.openDialog(resp.data.taskId); |
| | | } |
| | | } finally { |
| | | buttonLoading.value = false; |
| | | } |
| | | }; |
| | | //审批记录 |
| | | const handleApprovalRecord = () => { |