diff --git a/src/components/SecondDev/OpinionDialog.vue b/src/components/SecondDev/OpinionDialog.vue index 101b58f..4df2bf8 100644 --- a/src/components/SecondDev/OpinionDialog.vue +++ b/src/components/SecondDev/OpinionDialog.vue @@ -2,9 +2,14 @@
- + {{ formState.nextNodeName }} + + + {{ item.activityName }} + + @@ -15,17 +20,17 @@ diff --git a/src/views/secondDev/createFlow.vue b/src/views/secondDev/createFlow.vue index 256413b..905b4bf 100644 --- a/src/views/secondDev/createFlow.vue +++ b/src/views/secondDev/createFlow.vue @@ -71,10 +71,11 @@ const { t } = useI18n(); const { data, approveUserData, initProcessData, notificationSuccess, notificationError } = userTaskItem(); - const currentRoute = router.currentRoute; - const rParams = currentRoute.value.query; - const rSchemaId = rParams.schemaId; - const rDraftsId = rParams.draftsId; + const currentRoute = router.currentRoute.value; + const rParams = currentRoute.params; + const fullPath = currentRoute.fullPath; + const rSchemaId = rParams.arg1; + const rDraftsId = rParams.arg2; const draftsJsonStr = localStorage.getItem('draftsJsonStr'); let formInformation = ref(); let pageMode = 'new'; @@ -147,9 +148,8 @@ let res = await getStartProcessInfo(rSchemaId); const title = res?.schemaInfo?.name; if (title) { - const tabKey = `${pageMode}_${pageMode === 'new' ? rSchemaId : rDraftsId}`; const tabPrefix = pageMode === 'new' ? '新建' : '草稿'; - tabStore.changeTitle(tabKey, `${tabPrefix}:${title}`); + tabStore.changeTitle(fullPath, `${tabPrefix}:${title}`); } initProcessData(res); } @@ -179,7 +179,7 @@ try { disableSubmit.value = true; let formModels = await formInformation.value.saveDraftData(); - if (rDraftsId) { + if (rDraftsId !== '0') { let res = await putDraft(rSchemaId, formModels, rDraftsId, props.rowKeyData); showResult(res, t('保存草稿')); } else { diff --git a/src/views/secondDev/processTasksPage.vue b/src/views/secondDev/processTasksPage.vue index cfba8fd..5e51bc6 100644 --- a/src/views/secondDev/processTasksPage.vue +++ b/src/views/secondDev/processTasksPage.vue @@ -94,17 +94,16 @@ ]; const selectedKeys = ref(['ToDoTasks']); const query = unref(currentRoute).query; - let id = query.name; - const tabKey = query.tabKey as string; + let id = 'ToDoTasks'; + const lHash = location.hash; + if (lHash.indexOf('/draft') > 0) { + id = 'Drafts'; + } let data = reactive({ componentName: shallowRef(ToDoTasks) }); if (id) { selectedKeys.value = [id.toString()]; - const tabName = treeData.find((item) => item.id === id)?.name; - if (tabName && tabKey) { - tabStore.changeTitle(tabKey, tabName); - } handleSelect([id]); } diff --git a/src/views/workflow/task/FlowLaunch.vue b/src/views/workflow/task/FlowLaunch.vue index 335e6aa..ccf7d6b 100644 --- a/src/views/workflow/task/FlowLaunch.vue +++ b/src/views/workflow/task/FlowLaunch.vue @@ -1,205 +1,169 @@ diff --git a/src/views/workflow/task/components/processTasks/DraftsV2.vue b/src/views/workflow/task/components/processTasks/DraftsV2.vue index 19e9d84..4c89dc5 100644 --- a/src/views/workflow/task/components/processTasks/DraftsV2.vue +++ b/src/views/workflow/task/components/processTasks/DraftsV2.vue @@ -96,12 +96,7 @@ processData.visible = true;*/ localStorage.setItem('draftsJsonStr', res.formData); router.push({ - path: '/flow/createFlow', - query: { - schemaId: res.schemaId, - draftsId: record.id, - tabKey: 'draft_' + record.id - } + path: `/flow/${res.schemaId}/${record.id}/createFlow` }); } catch (error) {} } diff --git a/src/views/workflow/task/components/processTasks/ToDoTasksV2.vue b/src/views/workflow/task/components/processTasks/ToDoTasksV2.vue index 66e7134..b9bd03b 100644 --- a/src/views/workflow/task/components/processTasks/ToDoTasksV2.vue +++ b/src/views/workflow/task/components/processTasks/ToDoTasksV2.vue @@ -136,12 +136,9 @@ const onRowDblClick = (record, index) => { const { processId, taskId, schemaId } = record; router.push({ - path: "/flow/approveFlow", + path: `/flow/${schemaId}/${processId}/approveFlow`, query: { - schemaId, - taskId, - processId, - tabKey: "approve_" + taskId + taskId } }); };