流程审核不通过,在我的待办中直接跳转

This commit is contained in:
2024-09-13 20:04:19 +08:00
parent 3b51be9fce
commit cb9a0fe5e4
29 changed files with 3142 additions and 2578 deletions

View File

@@ -43,8 +43,9 @@ import addForm from './addForm.vue'
import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { cancelMointorPointFormData } from '@/api/supervision-boot/monitorpoint/index'
import {cancelMointorPointFormData, getTempLineDetailsById} from '@/api/supervision-boot/monitorpoint/index'
import { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
import {getTerminalDetailsById} from "@/api/supervision-boot/terminal";
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
@@ -292,6 +293,23 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
}
})
}
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getTempLineDetailsById({id:fullId}).then(res => {
if (res && res.code == 'A0000') {
addForms.value.open({
title: '重新发起',
row: res.data
})
}
})
}, {immediate: true})
</script>
<style scoped lang="scss">