update 调整流程办理
This commit is contained in:
parent
b197abef37
commit
b8a3ccb867
@ -30,8 +30,15 @@ import { ref } from 'vue';
|
||||
import { ComponentInternalInstance } from 'vue';
|
||||
import { ElForm } from 'element-plus';
|
||||
import { completeTask, backProcess, getBusinessStatus } from '@/api/workflow/task';
|
||||
import { any } from 'vue-types';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const props = defineProps({
|
||||
taskVariables: {
|
||||
type: Object as () => Record<string, any>,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
//遮罩层
|
||||
const loading = ref(true);
|
||||
//按钮
|
||||
@ -74,6 +81,7 @@ const emits = defineEmits(['submitCallback', 'cancelCallback']);
|
||||
/** 办理流程 */
|
||||
const handleCompleteTask = async () => {
|
||||
form.value.taskId = taskId.value;
|
||||
form.value.taskVariables = props.taskVariables;
|
||||
await proxy?.$modal.confirm('是否确认提交?');
|
||||
loading.value = true
|
||||
buttonLoading.value = true
|
||||
|
@ -92,7 +92,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 提交组件 -->
|
||||
<submitVerify ref="submitVerifyRef" @submitCallback="submitCallback" />
|
||||
<submitVerify ref="submitVerifyRef" @submitCallback="submitCallback" :taskVariables="taskVariables"/>
|
||||
<!-- 审批记录 -->
|
||||
<approvalRecord ref="approvalRecordRef" />
|
||||
</div>
|
||||
@ -129,6 +129,8 @@ const submitFormData = ref<Record<string, any>>({
|
||||
processKey: '',
|
||||
variables: {}
|
||||
});
|
||||
const taskVariables = ref<Record<string, any>>({});
|
||||
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
@ -265,13 +267,15 @@ const handleExport = () => {
|
||||
|
||||
//提交申请
|
||||
const handleStartWorkFlow = async (data: any) => {
|
||||
submitFormData.value.processKey = 'demo01';
|
||||
submitFormData.value.processKey = 'leave5';
|
||||
submitFormData.value.businessKey = data.id;
|
||||
//流程变量
|
||||
submitFormData.value.variables = {
|
||||
taskVariables.value = {
|
||||
entity: data,
|
||||
leaveDays: data.leaveDays,
|
||||
};
|
||||
userList:[1,2]
|
||||
}
|
||||
submitFormData.value.variables = taskVariables.value;
|
||||
startWorkFlow(submitFormData.value).then((response: any) => {
|
||||
if (submitVerifyRef.value) {
|
||||
buttonLoading.value = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user