修改
This commit is contained in:
1 parent
9ac9c0634c
commit
f0bb087f31
4 files changed
+95
-94
No files matched your search
@@ -1,65 +1,63 @@
|
||||
<script setup lang="ts">
|
||||
import {defineExpose} from 'vue';
|
||||
import {completeTask} from '/@/api/flow/task';
|
||||
import { defineExpose } from "vue"
|
||||
import { completeTask } from "/@/api/flow/task"
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
const submitDesc = ref('');
|
||||
const submitDesc = ref("")
|
||||
|
||||
const currentData = ref();
|
||||
const currentProcessInstanceId = ref('')
|
||||
const currentOpenFlowForm = ref();
|
||||
const currentData = ref()
|
||||
const currentOpenFlowForm = ref()
|
||||
|
||||
const handle = (row, formData) => {
|
||||
submitDesc.value = '';
|
||||
currentProcessInstanceId.value = row.processInstanceId;
|
||||
currentData.value = row;
|
||||
currentOpenFlowForm.value = formData;
|
||||
submitDesc.value = ""
|
||||
currentData.value = row
|
||||
currentOpenFlowForm.value = formData
|
||||
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
defineExpose({ handle });
|
||||
const emit = defineEmits(['taskSubmitEvent']);
|
||||
defineExpose({ handle })
|
||||
const emit = defineEmits(["taskSubmitEvent"])
|
||||
|
||||
const submit = () => {
|
||||
let value = currentOpenFlowForm.value;
|
||||
let value = currentOpenFlowForm.value
|
||||
|
||||
var formData = {};
|
||||
var formData = {}
|
||||
for (var item of value) {
|
||||
formData[item.id] = item.props.value;
|
||||
formData[item.id] = item.props.value
|
||||
|
||||
if (item.type === 'Layout') {
|
||||
let subList = item.props.value;
|
||||
if (item.type === "Layout") {
|
||||
let subList = item.props.value
|
||||
|
||||
var d = [];
|
||||
var d = []
|
||||
for (var array of subList) {
|
||||
var v = {};
|
||||
var v = {}
|
||||
|
||||
for (var subItem of array) {
|
||||
v[subItem.id] = subItem.props.value;
|
||||
v[subItem.id] = subItem.props.value
|
||||
}
|
||||
d.push(v);
|
||||
d.push(v)
|
||||
}
|
||||
formData[item.id] = d;
|
||||
formData[item.id] = d
|
||||
}
|
||||
}
|
||||
|
||||
formData[currentData.value.nodeId + '_approve_condition'] = false;
|
||||
formData[currentData.value.nodeId + "_approve_condition"] = false
|
||||
|
||||
const param = {
|
||||
paramMap: formData,
|
||||
taskId: currentData.value.taskId,
|
||||
taskLocalParamMap: {
|
||||
approveDesc: '拒绝原因:' + submitDesc.value,
|
||||
},
|
||||
};
|
||||
const param = {
|
||||
paramMap: formData,
|
||||
taskId: currentData.value.taskId,
|
||||
taskLocalParamMap: {
|
||||
approveDesc: "拒绝原因:" + submitDesc.value,
|
||||
},
|
||||
}
|
||||
|
||||
completeTask(param).then((res) => {
|
||||
dialogVisible.value = false;
|
||||
emit('taskSubmitEvent');
|
||||
});
|
||||
};
|
||||
completeTask(param).then((res) => {
|
||||
dialogVisible.value = false
|
||||
emit("taskSubmitEvent")
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in new issue
Block a user