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-08 17:16:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21bd2710869d69c2347e1892126d784124d47bcd
21bd2710
1 parent
5a8d7dba
fix(router): 修复周期选择判断逻辑,增加page_type参数检查
只有当page_type为add或未设置时才进行周期判断,避免在非新增场景下误触发周期选择
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
src/router.js
src/router.js
View file @
21bd271
...
...
@@ -48,22 +48,27 @@ const checkCycleSelection = async (to) => {
if
(
to
.
path
===
'/cycle-selection'
)
{
return
false
;
}
// 只有在page_type=add或者没有page_type参数时才进行周期判断
if
(
to
.
query
.
page_type
&&
to
.
query
.
page_type
!==
'add'
)
{
return
false
;
}
// 如果没有表单代码,不需要周期选择
if
(
!
to
.
query
.
code
)
{
return
false
;
}
// 如果用户已经选择过周期,不需要再选择
if
(
to
.
query
.
cycle_selected
===
'1'
)
{
return
false
;
}
// 如果是预览模式,不需要周期选择
if
(
to
.
query
.
model
===
'preview'
)
{
return
false
;
}
try
{
const
{
data
}
=
await
getCycleListAPI
({
form_code
:
to
.
query
.
code
});
// 如果需要周期选择且有周期列表
...
...
Please
register
or
login
to post a comment