流程审批回到上一个标签页

This commit is contained in:
XaoLi717 2024-11-25 19:46:40 +08:00
parent 36014b7536
commit 20358ba86b
5 changed files with 22 additions and 10 deletions

View File

@ -59,7 +59,7 @@ const open = async (id: string) => {
defineExpose({ open }) // openModal defineExpose({ open }) // openModal
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success','backView']) // success
const submitForm = async () => { const submitForm = async () => {
// //
if (!formRef) return if (!formRef) return
@ -72,6 +72,7 @@ const submitForm = async () => {
dialogVisible.value = false dialogVisible.value = false
// //
emit('success') emit('success')
emit('backView')
} finally { } finally {
formLoading.value = false formLoading.value = false
} }

View File

@ -59,7 +59,7 @@ const open = async (id: string) => {
defineExpose({ open }) // openModal defineExpose({ open }) // openModal
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success','backView']) // success
const submitForm = async () => { const submitForm = async () => {
// //
if (!formRef) return if (!formRef) return
@ -73,6 +73,7 @@ const submitForm = async () => {
dialogVisible.value = false dialogVisible.value = false
// //
emit('success') emit('success')
emit('backView')
} finally { } finally {
formLoading.value = false formLoading.value = false
} }

View File

@ -66,7 +66,7 @@ const open = async (id: string) => {
defineExpose({ open }) // openModal defineExpose({ open }) // openModal
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success','backView']) // success
const submitForm = async (type: string) => { const submitForm = async (type: string) => {
// //
if (!formRef) return if (!formRef) return
@ -81,6 +81,7 @@ const submitForm = async (type: string) => {
dialogVisible.value = false dialogVisible.value = false
// //
emit('success') emit('success')
emit('backView')
} finally { } finally {
formLoading.value = false formLoading.value = false
} }

View File

@ -59,7 +59,7 @@ const open = async (id: string) => {
defineExpose({ open }) // openModal defineExpose({ open }) // openModal
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success','backView']) // success
const submitForm = async () => { const submitForm = async () => {
// //
if (!formRef) return if (!formRef) return
@ -72,6 +72,7 @@ const submitForm = async () => {
dialogVisible.value = false dialogVisible.value = false
// //
emit('success') emit('success')
emit('backView')
} finally { } finally {
formLoading.value = false formLoading.value = false
} }

View File

@ -131,13 +131,13 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- 弹窗转派审批人 --> <!-- 弹窗转派审批人 -->
<TaskTransferForm ref="taskTransferFormRef" @success="getDetail" /> <TaskTransferForm ref="taskTransferFormRef" @success="getDetail" @back-view="backView" />
<!-- 弹窗回退节点 --> <!-- 弹窗回退节点 -->
<TaskReturnForm ref="taskReturnFormRef" @success="getDetail" /> <TaskReturnForm ref="taskReturnFormRef" @success="getDetail" @back-view="backView" />
<!-- 弹窗委派将任务委派给别人处理处理完成后会重新回到原审批人手中--> <!-- 弹窗委派将任务委派给别人处理处理完成后会重新回到原审批人手中-->
<TaskDelegateForm ref="taskDelegateForm" @success="getDetail" /> <TaskDelegateForm ref="taskDelegateForm" @success="getDetail" @back-view="backView" />
<!-- 弹窗加签当前任务审批人为A向前加签选了一个C则需要C先审批然后再是A审批向后加签BA审批完需要B再审批完才算完成这个任务节点 --> <!-- 弹窗加签当前任务审批人为A向前加签选了一个C则需要C先审批然后再是A审批向后加签BA审批完需要B再审批完才算完成这个任务节点 -->
<TaskSignCreateForm ref="taskSignCreateFormRef" @success="getDetail" /> <TaskSignCreateForm ref="taskSignCreateFormRef" @success="getDetail" @back-view="backView" />
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -158,8 +158,7 @@ import { isEmpty } from '@/utils/is'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import {TabsPaneContext} from "element-plus"; import {TabsPaneContext} from "element-plus";
import { FormProcessMappingApi} from '@/api/bpm/formprocessmapping' import { FormProcessMappingApi} from '@/api/bpm/formprocessmapping'
// import {useRouter} from "vue-router"; import {useTagsViewStore} from "@/store/modules/tagsView";
// const {push} = useRouter()
defineOptions({ name: 'BpmProcessInstanceDetail' }) defineOptions({ name: 'BpmProcessInstanceDetail' })
@ -167,6 +166,8 @@ const { query } = useRoute() // 查询参数
const message = useMessage() // const message = useMessage() //
const { proxy } = getCurrentInstance() as any const { proxy } = getCurrentInstance() as any
const { delView } = useTagsViewStore()//
const { currentRoute, back } = useRouter()
const userId = useUserStore().getUser.id // const userId = useUserStore().getUser.id //
const id = query.id as unknown as string // const id = query.id as unknown as string //
const processInstanceLoading = ref(false) // const processInstanceLoading = ref(false) //
@ -244,6 +245,13 @@ const handleAudit = async (task, pass) => {
} }
// 2.2 // 2.2
getDetail() getDetail()
delView(unref(currentRoute))
back()
}
//
const backView = ()=>{
delView(unref(currentRoute))
back()
} }
/** 转派审批人 */ /** 转派审批人 */