hookehuyr

fix(router): 在x_project功能下屏蔽未完成表单检查逻辑

/*
* @Date: 2022-05-26 13:57:28
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-11 17:13:53
* @LastEditTime: 2025-09-25 18:29:36
* @FilePath: /data-table/src/router.js
* @Description: 文件描述
*/
......@@ -145,7 +145,8 @@ router.beforeEach((to, from, next) => {
// 直接执行表单检查逻辑,跳过周期检查
if (to.query.page_type === 'add' || to.query.page_type === undefined) {
const existingCookie = Cookies.get(to.query.code);
if (existingCookie && to.query.force_back !== '1') {
// 在x_project功能下屏蔽未完成表单功能
if (existingCookie && to.query.force_back !== '1' && !to.query.x_project) {
showUnfinishedFormDialog(
() => {
// 用户选择继续,跳转到目标页面
......@@ -194,7 +195,8 @@ router.beforeEach((to, from, next) => {
// 只有在不需要周期选择时,才执行表单检查逻辑
if (to.query.page_type === 'add' || to.query.page_type === undefined) {
const existingCookie = Cookies.get(to.query.code);
if (existingCookie && to.query.force_back !== '1') {
// 在x_project功能下屏蔽未完成表单功能
if (existingCookie && to.query.force_back !== '1' && !to.query.x_project) {
showUnfinishedFormDialog(
() => {
// 用户选择继续,跳转到目标页面
......@@ -218,7 +220,8 @@ router.beforeEach((to, from, next) => {
// 检查失败时,继续执行表单检查逻辑
if (to.query.page_type === 'add' || to.query.page_type === undefined) {
const existingCookie = Cookies.get(to.query.code);
if (existingCookie && to.query.force_back !== '1') {
// 在x_project功能下屏蔽未完成表单功能
if (existingCookie && to.query.force_back !== '1' && !to.query.x_project) {
showConfirmDialog({
title: '温馨提示',
message: '您还未完成的表单,是否继续?',
......