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-11 16:50:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df80ec42f7726a40794f6d5171657b12dbe8b9a2
df80ec42
1 parent
eb7df81f
fix(路由): 修复路由跳转时丢失原有查询参数的问题
确保在跳转首页时保留原有的路由查询参数,避免数据丢失
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
src/views/cycle-selection.vue
src/views/cycle-selection.vue
View file @
df80ec4
...
...
@@ -110,7 +110,12 @@ const getCycleList = async (form_code) => {
// 检查是否需要显示未完成表单弹框
checkUnfinishedForm(route);
} else {
$router.replace('/');
$router.replace({
path: '/',
query: {
...$route.query
}
});
}
}
} catch (error) {
...
...
@@ -149,6 +154,7 @@ const confirmCycleSelection = () => {
$router.replace({
path: '/',
query: {
...$route.query,
x_cycle: selectedCycle.value,
cycle_selected: '1'
}
...
...
@@ -175,7 +181,14 @@ const checkUnfinishedForm = (route) => {
() => {
// 用户选择删除,删除cookie并跳转到首页
Cookies.remove(route.query.code);
$router.replace({ path: '/', query: { x_cycle: selectedCycle.value, cycle_selected: '1' } });
$router.replace({
path: '/',
query: {
...route.query,
x_cycle: selectedCycle.value,
cycle_selected: '1'
}
});
}
);
} else {
...
...
Please
register
or
login
to post a comment