作者 RuoYi

修复选项卡点击右键刷新丢失参数问题

@@ -5,7 +5,6 @@ import org.apache.commons.lang3.concurrent.BasicThreadFactory; @@ -5,7 +5,6 @@ import org.apache.commons.lang3.concurrent.BasicThreadFactory;
5 import org.springframework.context.annotation.Bean; 5 import org.springframework.context.annotation.Bean;
6 import org.springframework.context.annotation.Configuration; 6 import org.springframework.context.annotation.Configuration;
7 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 7 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
8 -  
9 import java.util.concurrent.ScheduledExecutorService; 8 import java.util.concurrent.ScheduledExecutorService;
10 import java.util.concurrent.ScheduledThreadPoolExecutor; 9 import java.util.concurrent.ScheduledThreadPoolExecutor;
11 import java.util.concurrent.ThreadPoolExecutor; 10 import java.util.concurrent.ThreadPoolExecutor;
@@ -4,20 +4,21 @@ import router from '@/router'; @@ -4,20 +4,21 @@ import router from '@/router';
4 export default { 4 export default {
5 // 刷新当前tab页签 5 // 刷新当前tab页签
6 refreshPage(obj) { 6 refreshPage(obj) {
7 - const { path, matched } = router.currentRoute; 7 + const { path, query, matched } = router.currentRoute;
8 if (obj === undefined) { 8 if (obj === undefined) {
9 matched.forEach((m) => { 9 matched.forEach((m) => {
10 if (m.components && m.components.default && m.components.default.name) { 10 if (m.components && m.components.default && m.components.default.name) {
11 if (!['Layout', 'ParentView'].includes(m.components.default.name)) { 11 if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
12 - obj = { name: m.components.default.name, path: path }; 12 + obj = { name: m.components.default.name, path: path, query: query };
13 } 13 }
14 } 14 }
15 }); 15 });
16 } 16 }
17 return store.dispatch('tagsView/delCachedView', obj).then(() => { 17 return store.dispatch('tagsView/delCachedView', obj).then(() => {
18 - const { path } = obj 18 + const { path, query } = obj
19 router.replace({ 19 router.replace({
20 - path: '/redirect' + path 20 + path: '/redirect' + path,
  21 + query: query
21 }) 22 })
22 }) 23 })
23 }, 24 },