Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2025-09-25 20:19:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c7c282288cfc2534846cf7cd21b1d04d4a85fb91
c7c28228
1 parent
b02b778f
fix(router): 在x_project功能下屏蔽未完成表单检查逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
src/router.js
src/router.js
View file @
c7c2822
/*
* @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
:
'您还未完成的表单,是否继续?'
,
...
...
Please
register
or
login
to post a comment