修复流程表单:表单保存后返回列表页面且重新加载列表数据

pull/130/head
puhui999 2023-04-19 11:35:37 +08:00
parent 3d579b3a99
commit 604b8867ce
2 changed files with 21 additions and 3 deletions

View File

@ -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 () => {

View File

@ -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()