From 604b8867ce1e12dcc82807f23ba7c27a97e9e943 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 19 Apr 2023 11:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E7=A8=8B=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=EF=BC=9A=E8=A1=A8=E5=8D=95=E4=BF=9D=E5=AD=98=E5=90=8E?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E4=B8=94?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BD=E5=88=97=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/form/editor/index.vue | 11 ++++++++++- src/views/bpm/form/index.vue | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/views/bpm/form/editor/index.vue b/src/views/bpm/form/editor/index.vue index c56a7747..f11c1228 100644 --- a/src/views/bpm/form/editor/index.vue +++ b/src/views/bpm/form/editor/index.vue @@ -44,10 +44,13 @@ import { CommonStatusEnum } from '@/utils/constants' import * as FormApi from '@/api/bpm/form' import FcDesigner from '@form-create/designer' import { encodeConf, encodeFields, setConfAndFields } from '@/utils/formCreate' +import { useTagsViewStore } from '@/store/modules/tagsView' const { t } = useI18n() // 国际化 const message = useMessage() // 消息 -const { query } = useRoute() // 路由 +const { push, currentRoute } = useRouter() // 路由 +const { query } = useRoute() // 路由信息 +const { delView } = useTagsViewStore() // 视图操作 const designer = ref() // 表单设计器 const dialogVisible = ref(false) // 弹窗是否展示 @@ -88,10 +91,16 @@ const submitForm = async () => { message.success(t('common.updateSuccess')) } dialogVisible.value = false + close() } finally { formLoading.value = false } } +/** 关闭按钮 */ +const close = () => { + delView(unref(currentRoute)) + push('/bpm/manager/form') +} /** 初始化 **/ onMounted(async () => { diff --git a/src/views/bpm/form/index.vue b/src/views/bpm/form/index.vue index f3b51d32..48bb3698 100644 --- a/src/views/bpm/form/index.vue +++ b/src/views/bpm/form/index.vue @@ -98,7 +98,7 @@ import { setConfAndFields2 } from '@/utils/formCreate' const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 -const { push } = useRouter() // 路由 +const { currentRoute, push } = useRouter() // 路由 const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 @@ -174,7 +174,16 @@ const openDetail = async (rowId: number) => { // 弹窗打开 detailVisible.value = true } - +/**表单保存返回后重新加载列表 */ +watch( + () => currentRoute.value, + () => { + getList() + }, + { + immediate: true + } +) /** 初始化 **/ onMounted(() => { getList()