提交 c9e5476b authored 作者: kxjia's avatar kxjia

修改工作流多实例问题

上级 c90615cf
...@@ -63,7 +63,8 @@ const editableColumns = [ ...@@ -63,7 +63,8 @@ const editableColumns = [
] ]
const defaultProperties = [ const defaultProperties = [
{ name: 'isApprove', value: 'false' } { name: 'isApprove', value: 'false' },
{ name: 'isEdit', value: 'false' },
] ]
onMounted(() => { onMounted(() => {
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
@sendWorkFlow="handleDefinitionSend" @sendWorkFlow="handleDefinitionSend"
@endWorkFlow="handleDefinitionEnd" @endWorkFlow="handleDefinitionEnd"
@open-multi-form="handleOpenMultiForm" @open-multi-form="handleOpenMultiForm"
@open-flow-form="handleOpenFlowForm"
:todo-list="todoList" :todo-list="todoList"
/> />
<WorkFlowFormDrawer <WorkFlowFormDrawer
...@@ -152,7 +151,8 @@ ...@@ -152,7 +151,8 @@
if (!data.procInsId) { if (!data.procInsId) {
await handleDefinitionStart(data) await handleDefinitionStart(data)
} }
await setCurrentNodeById(data);
dataId.value = data.id; dataId.value = data.id;
deployId.value = currentNode.value.deployId || ''; deployId.value = currentNode.value.deployId || '';
...@@ -210,7 +210,9 @@ ...@@ -210,7 +210,9 @@
} }
}; };
const handleDrawerClose = () => { drawerVisible.value = false; }; const handleDrawerClose = () => {
drawerVisible.value = false;
};
const handleMultiFormDataUpdate = (_data: any) => { const handleMultiFormDataUpdate = (_data: any) => {
const currentFormComponent = getCurrentFormComponent(); const currentFormComponent = getCurrentFormComponent();
if (currentFormComponent?.handleRefresh) { if (currentFormComponent?.handleRefresh) {
...@@ -245,6 +247,7 @@ ...@@ -245,6 +247,7 @@
} }
async function handleOpenMultiForm(data: any) { async function handleOpenMultiForm(data: any) {
deployId.value = currentNode.value.deployId || ''; deployId.value = currentNode.value.deployId || '';
procInsId.value = data.procInsId || ''; procInsId.value = data.procInsId || '';
drawerVisible.value = true; drawerVisible.value = true;
...@@ -267,9 +270,7 @@ ...@@ -267,9 +270,7 @@
nextTick(() => { nextTick(() => {
if(resData.formUrl) { if(resData.formUrl) {
mainFormUrl.value = resData.formUrl mainFormUrl.value = resData.formUrl
alert(mainFormUrl.value)
mainFormListUrl.value = resData.formListurl || '' mainFormListUrl.value = resData.formListurl || ''
alert(mainFormListUrl.value)
} else { } else {
mainFormUrl.value = "" mainFormUrl.value = ""
refInnerForm.value.iniData(resData) refInnerForm.value.iniData(resData)
...@@ -288,13 +289,22 @@ ...@@ -288,13 +289,22 @@
startTime: undefined, startTime: undefined,
}); });
const setCurrentNodeById = async (nodeId: string) =>{
const nodes = workflowNodes.value;
const index = nodes.findIndex(node => node.id === nodeId);
if (index !== -1) {
currentMultiFormIndex.value = index;
currentNode.value = nodes[index];
}
}
onMounted(async () => { onMounted(async () => {
await nextTick(); await nextTick();
try { try {
const nodes = await getNodesByTableName(formTableName); const nodes = await getNodesByTableName(formTableName);
todoaLLList.value = await todoList(queryParams); todoaLLList.value = await todoList(queryParams);
workflowNodes.value = nodes; workflowNodes.value = nodes;
if (workflowNodes.value?.length > 0) { if (workflowNodes.value?.length > 0) {
workflowNodes.value.forEach(node => { workflowNodes.value.forEach(node => {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
import BaosongAllocDrawer from '../form/BaosongAllocDrawer.vue'; import BaosongAllocDrawer from '../form/BaosongAllocDrawer.vue';
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const refAllocDrawer = ref<InstanceType<typeof BaosongAllocDrawer>>(); const refAllocDrawer = ref();
const { tableContext } = useListPage({ const { tableContext } = useListPage({
tableProps: { tableProps: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论