Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
0f1bd742
提交
0f1bd742
authored
4月 23, 2026
作者:
朱政
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:跳转加密解密问题
上级
b7c76f73
流水线
#637
已通过 于阶段
in 1 分 50 秒
变更
15
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
75 行增加
和
84 行删除
+75
-84
goToPageRouteHelpers.js
src/utils/goToPageRouteHelpers.js
+49
-0
ResourceLibrarySection.vue
src/views/bill/billHome/ResourceLibrarySection.vue
+1
-1
index.vue
src/views/bill/billHome/index.vue
+1
-1
index.vue
src/views/comprehensiveSearch/searchResults/index.vue
+1
-1
index.vue
src/views/coopRestriction/components/dataNew/index.vue
+3
-24
index.vue
src/views/coopRestriction/components/resLib/index.vue
+3
-25
index.vue
src/views/coopRestriction/detail/index.vue
+2
-22
index.vue
src/views/dataLibrary/bill/countryBill/index.vue
+1
-1
index.vue
src/views/dataLibrary/decree/index.vue
+1
-1
index.vue
src/views/dataLibrary/thinkTank/index.vue
+1
-1
index.vue
src/views/thinkTank/ThinkTankDetail/PolicyTracking/index.vue
+1
-1
index.vue
src/views/thinkTank/ThinkTankDetail/index.vue
+6
-2
index.vue
src/views/thinkTank/ThinkTankDetail/thinkDynamics/index.vue
+1
-1
index.vue
src/views/thinkTank/ThinkTankDetail/thinkInfo/index.vue
+1
-1
index.vue
src/views/thinkTank/index.vue
+3
-2
没有找到文件。
src/utils/goToPageRouteHelpers.js
0 → 100644
浏览文件 @
0f1bd742
/**
* 与根目录 `goToPage.js` 中 getDecodedParams 及合作限制详情 query 解码行为一致,
* 供智库/合作限制从 `@/utils/goToPage` 迁出后使用(不修改 `goToPage` 目录与 `goToPage.js`)。
*/
import
router
from
"@/router/index"
;
/** 新窗口打开合作限制详情:id 为 base64(encodeURIComponent(明文)),与概览列表跳转一致 */
export
function
goToCooperationRestrictionsDetail
(
plainId
,
sessionTabTitle
)
{
const
s
=
String
(
plainId
??
""
).
trim
();
if
(
!
s
)
return
;
if
(
sessionTabTitle
!=
null
&&
sessionTabTitle
!==
""
)
{
window
.
sessionStorage
.
setItem
(
"cooperationRestrictionsTabName"
,
String
(
sessionTabTitle
));
}
let
encoded
;
try
{
encoded
=
btoa
(
encodeURIComponent
(
s
));
}
catch
(
_
)
{
return
;
}
if
(
!
encoded
)
return
;
const
r
=
router
.
resolve
({
name
:
"CooperationRestrictionsDetail"
,
query
:
{
id
:
encoded
}
});
window
.
open
(
r
.
href
,
"_blank"
);
}
/** 合作限制详情页 `route.query.id` 解码(兼容明文数字与 base64 包装) */
export
function
decodeCooperationRestrictionQueryId
(
raw
)
{
if
(
raw
==
null
)
return
null
;
const
s0
=
String
(
raw
).
trim
();
if
(
!
s0
)
return
null
;
if
(
/^
\d
+$/
.
test
(
s0
))
return
s0
;
if
(
/^
[
A-Za-z0-9+
/
_-
]
+=
{0,2}
$/
.
test
(
s0
))
{
try
{
const
normalized
=
s0
.
replace
(
/-/g
,
"+"
).
replace
(
/_/g
,
"/"
);
const
padded
=
normalized
+
"==="
.
slice
((
normalized
.
length
+
3
)
%
4
);
const
decoded
=
atob
(
padded
);
try
{
return
decodeURIComponent
(
decoded
);
}
catch
(
_
)
{
return
decoded
;
}
}
catch
(
_
)
{}
}
return
s0
;
}
src/views/bill/billHome/ResourceLibrarySection.vue
浏览文件 @
0f1bd742
...
...
@@ -283,7 +283,7 @@ import cyyIcon from "@/assets/icons/cyy.png";
import
ghdIcon
from
"@/assets/icons/ghd.png"
;
import
mzdIcon
from
"@/assets/icons/mzd.png"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
goToDataCountryBill
}
from
"@/utils/goToPage"
;
import
{
goToDataCountryBill
}
from
"@/utils/goToPage
/methods/dataLibrary
"
;
const
router
=
useRouter
();
...
...
src/views/bill/billHome/index.vue
浏览文件 @
0f1bd742
...
...
@@ -322,7 +322,7 @@ import iconILetter from "./assets/icons/icon-iLetter.png";
import
{
ElMessage
}
from
"element-plus"
;
import
{
useGotoNewsDetail
}
from
"@/router/modules/news"
;
import
{
goToBill
}
from
"@/utils/goToPage"
;
import
{
goToBill
}
from
"@/utils/goToPage
/methods/bill
"
;
// 跳转人物主页(MessageBubble 的 person-click 传入整条列表项,需取 personId)
const
handleClickToCharacter
=
async
item
=>
{
...
...
src/views/comprehensiveSearch/searchResults/index.vue
浏览文件 @
0f1bd742
...
...
@@ -132,7 +132,7 @@ import { getPersonSummaryInfo } from "@/api/common/index";
import
{
ElMessage
}
from
"element-plus"
;
import
TimeSortSelectBox
from
'@/components/base/TimeSortSelectBox/index.vue'
import
AreaTag
from
'@/components/base/AreaTag/index.vue'
import
{
getDecodedParams
}
from
"@/utils/goToPage"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage
/methods/getDecode
"
;
const
route
=
useRoute
();
const
container
=
ref
(
null
)
...
...
src/views/coopRestriction/components/dataNew/index.vue
浏览文件 @
0f1bd742
...
...
@@ -120,6 +120,7 @@ import RiskSignal from "@/components/base/riskSignal/index.vue";
import
RiskSignalOverviewDetailDialog
from
"@/components/base/RiskSignalOverviewDetailDialog/index.vue"
;
import
{
ref
,
onMounted
,
computed
}
from
"vue"
;
import
router
from
"@/router"
;
import
{
goToCooperationRestrictionsDetail
}
from
"@/utils/goToPageRouteHelpers.js"
;
import
{
navigateToViewRiskSignal
}
from
"@/utils/riskSignalOverviewNavigate"
;
import
{
getCoopRestrictionTrends
,
getCoopRestrictionSignals
}
from
"@/api/coopRestriction/coopRestriction.js"
;
import
defaultImg
from
"./assets/usImg.png"
;
...
...
@@ -206,36 +207,14 @@ const handleClickToDetail = item => {
const
activeItem
=
item
&&
item
.
ID
?
item
:
mainTrend
.
value
;
const
id
=
activeItem
?.
ID
||
activeItem
?.
id
||
activeItem
?.
limitId
;
if
(
!
id
)
return
;
window
.
sessionStorage
.
setItem
(
"cooperationRestrictionsTabName"
,
activeItem
?.
LIMITNAME
||
""
);
const
encodedId
=
(()
=>
{
const
s
=
String
(
id
).
trim
();
if
(
!
s
)
return
""
;
try
{
return
btoa
(
encodeURIComponent
(
s
));
}
catch
(
_
)
{
return
s
;
}
})();
if
(
!
encodedId
)
return
;
const
curRoute
=
router
.
resolve
({
name
:
"CooperationRestrictionsDetail"
,
query
:
{
id
:
encodedId
}
});
window
.
open
(
curRoute
.
href
,
"_blank"
);
goToCooperationRestrictionsDetail
(
id
,
activeItem
?.
LIMITNAME
||
""
);
};
// 点击风险信号详情
const
handleToRiskDetail
=
(
item
)
=>
{
const
id
=
item
?.
cooperationId
||
item
?.
ID
||
item
?.
id
||
item
?.
limitId
;
if
(
!
id
)
return
;
const
encodedId
=
(()
=>
{
const
s
=
String
(
id
).
trim
();
if
(
!
s
)
return
""
;
try
{
return
btoa
(
encodeURIComponent
(
s
));
}
catch
(
_
)
{
return
s
;
}
})();
if
(
!
encodedId
)
return
;
const
curRoute
=
router
.
resolve
({
name
:
"CooperationRestrictionsDetail"
,
query
:
{
id
:
encodedId
},
});
window
.
open
(
curRoute
.
href
,
"_blank"
);
goToCooperationRestrictionsDetail
(
id
,
undefined
);
};
const
isRiskOverviewDetailOpen
=
ref
(
false
);
...
...
src/views/coopRestriction/components/resLib/index.vue
浏览文件 @
0f1bd742
...
...
@@ -73,8 +73,8 @@
<
script
setup
>
import
{
ref
,
onMounted
,
watch
,
computed
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
getCoopRestrictionList
}
from
"@/api/coopRestriction/coopRestriction"
;
import
{
goToCooperationRestrictionsDetail
}
from
"@/utils/goToPageRouteHelpers.js"
;
import
TimeSortSelectBox
from
"@/components/base/TimeSortSelectBox/index.vue"
;
import
defaultImg
from
"../../assets/images/default-icon2.png"
;
...
...
@@ -136,33 +136,11 @@ const getMainDataList = async () => {
}
};
const
router
=
useRouter
();
const
encodeBase64Param
=
(
val
)
=>
{
const
s
=
String
(
val
??
""
).
trim
();
if
(
!
s
)
return
""
;
try
{
return
btoa
(
encodeURIComponent
(
s
));
}
catch
(
_
)
{
return
s
;
}
};
const
handleClick
=
item
=>
{
const
id
=
item
?.
id
||
item
?.
limitId
||
item
?.
ID
;
if
(
!
id
)
return
;
window
.
sessionStorage
.
setItem
(
"cooperationRestrictionsTabName"
,
item
?.
limitName
||
item
?.
title
||
item
?.
name
||
""
);
const
encodedId
=
encodeBase64Param
(
id
);
if
(
!
encodedId
)
return
;
const
routeData
=
router
.
resolve
({
name
:
"CooperationRestrictionsDetail"
,
query
:
{
id
:
encodedId
}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
const
tabTitle
=
item
?.
limitName
||
item
?.
title
||
item
?.
name
||
""
;
goToCooperationRestrictionsDetail
(
id
,
tabTitle
);
};
const
navList
=
ref
([
...
...
src/views/coopRestriction/detail/index.vue
浏览文件 @
0f1bd742
...
...
@@ -103,31 +103,11 @@
import
{
ref
,
watch
,
computed
}
from
"vue"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
import
{
getCoopRestrictionIntroduction
,
getCoopRestrictionRelated
,
getCoopRestrictionBackground
,
getCoopRestrictionClause
}
from
"@/api/coopRestriction/coopRestriction"
;
import
{
decodeCooperationRestrictionQueryId
}
from
"@/utils/goToPageRouteHelpers.js"
;
const
route
=
useRoute
();
const
router
=
useRouter
();
const
decodeQueryId
=
(
raw
)
=>
{
if
(
raw
==
null
)
return
null
;
const
s0
=
String
(
raw
).
trim
();
if
(
!
s0
)
return
null
;
// 明文数字直接返回
if
(
/^
\d
+$/
.
test
(
s0
))
return
s0
;
// base64(encodeURIComponent(id)) 解码(兼容短 base64:Mg==)
if
(
/^
[
A-Za-z0-9+
/
_-
]
+=
{0,2}
$/
.
test
(
s0
))
{
try
{
const
normalized
=
s0
.
replace
(
/-/g
,
"+"
).
replace
(
/_/g
,
"/"
);
const
padded
=
normalized
+
"==="
.
slice
((
normalized
.
length
+
3
)
%
4
);
const
decoded
=
atob
(
padded
);
try
{
return
decodeURIComponent
(
decoded
);
}
catch
(
_
)
{
return
decoded
;
}
}
catch
(
_
)
{
}
}
return
s0
;
};
const
limitId
=
computed
(()
=>
decodeQueryId
(
route
.
query
?.
id
));
const
limitId
=
computed
(()
=>
decodeCooperationRestrictionQueryId
(
route
.
query
?.
id
));
import
defaultImg
from
"./assets/image01.png"
import
defaultCom
from
"../assets/images/default-icon2.png"
import
Harvard
from
"./assets/哈佛.png"
;
...
...
src/views/dataLibrary/bill/countryBill/index.vue
浏览文件 @
0f1bd742
...
...
@@ -173,7 +173,7 @@ import { getPostOrgList, getPostMemberList } from '@/api/bill/billHome'
import
{
search
,
getStatusList
}
from
'@/api/comprehensiveSearch'
import
{
ElMessage
}
from
'element-plus'
import
getDateRange
from
'@/utils/getDateRange'
import
{
getDecodedParams
}
from
'@/utils/goToPage'
import
{
getDecodedParams
}
from
'@/utils/goToPage
/methods/getDecode
'
import
goToPage
from
'@/utils/goToPage/index'
const
route
=
useRoute
();
...
...
src/views/dataLibrary/decree/index.vue
浏览文件 @
0f1bd742
...
...
@@ -186,7 +186,7 @@ import { ElMessage } from 'element-plus'
import
getDateRange
from
'@/utils/getDateRange'
import
{
getDepartmentList
}
from
"@/api/decree/home"
;
import
{
getDecodedParams
}
from
'@/utils/goToPage'
import
{
getDecodedParams
}
from
'@/utils/goToPage
/methods/getDecode
'
import
goToPage
from
'@/utils/goToPage/index'
const
route
=
useRoute
();
...
...
src/views/dataLibrary/thinkTank/index.vue
浏览文件 @
0f1bd742
...
...
@@ -172,7 +172,7 @@ import InputBox from "../components/InputBox/index.vue";
import
DataChartSwitchBox
from
'../components/dataChartSwitchBox/index.vue'
import
{
useRoute
}
from
"vue-router"
;
import
router
from
"@/router"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage
/methods/getDecode
"
;
import
{
search
,
getThinkTankList
}
from
"@/api/comprehensiveSearch"
;
import
{
ElMessage
}
from
"element-plus"
;
...
...
src/views/thinkTank/ThinkTankDetail/PolicyTracking/index.vue
浏览文件 @
0f1bd742
...
...
@@ -293,7 +293,7 @@ import defaultNewsIcon from "@/assets/icons/default-icon-news.png";
import
AreaTag
from
"@/components/base/AreaTag/index.vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage
/methods/getDecode
"
;
const
router
=
useRouter
();
const
thinkTankId
=
computed
(()
=>
getDecodedParams
());
...
...
src/views/thinkTank/ThinkTankDetail/index.vue
浏览文件 @
0f1bd742
...
...
@@ -64,9 +64,11 @@ import PolicyTracking from "./PolicyTracking/index.vue";
import
ThinkInfo
from
"./thinkInfo/index.vue"
;
import
{
getThinkTankSummary
}
from
"@/api/thinkTank/overview"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage
/methods/getDecode
"
;
const
router
=
useRouter
();
// 兼容 getDecodedParams 内部直接使用全局 router 的写法
window
.
router
=
router
;
const
tabActiveName
=
ref
(
"智库动态"
);
const
switchTab
=
name
=>
{
tabActiveName
.
value
=
name
;
...
...
@@ -75,7 +77,9 @@ const switchTab = name => {
const
thinkTank
=
ref
({});
// 获取智库基本信息
const
handleGetThinkTankSummary
=
async
()
=>
{
const
id
=
getDecodedParams
()
const
decoded
=
getDecodedParams
();
// getDecodedParams: 有时返回对象(来自 ?data=),有时返回字符串(来自 params)
const
id
=
typeof
decoded
===
"object"
&&
decoded
!==
null
?
decoded
.
id
:
decoded
;
try
{
const
parmas
=
{
...
...
src/views/thinkTank/ThinkTankDetail/thinkDynamics/index.vue
浏览文件 @
0f1bd742
...
...
@@ -78,7 +78,7 @@ import {
getResourceLibraryReportDateRangeFromTimeSelection
}
from
"../../utils/resourceLibraryFilters"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage
/methods/getDecode
"
;
import
ThinkTankReport
from
"./ThinkTankReport/index.vue"
;
import
CongressHearing
from
"./CongressHearing/index.vue"
;
const
router
=
useRouter
();
...
...
src/views/thinkTank/ThinkTankDetail/thinkInfo/index.vue
浏览文件 @
0f1bd742
...
...
@@ -259,7 +259,7 @@ import { ref, onMounted, nextTick, computed } from "vue";
import
setChart
from
"@/utils/setChart"
;
import
getPieChart
from
"./utils/piechart"
;
import
getTreeMapChart
from
"./utils/treeMapChart"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage"
;
import
{
getDecodedParams
}
from
"@/utils/goToPage
/methods/getDecode
"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
getThinkTankInfoBasic
,
...
...
src/views/thinkTank/index.vue
浏览文件 @
0f1bd742
...
...
@@ -502,7 +502,8 @@ import { setCanvasCreator } from "echarts/core";
import
{
ElMessage
}
from
"element-plus"
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useGotoNewsDetail
}
from
'@/router/modules/news'
;
import
{
goToDataThinkTank
,
goToThinkTank
}
from
"@/utils/goToPage"
;
import
{
goToThinkTank
}
from
"@/utils/goToPage/methods/thinkTank.js"
;
import
{
goToDataThinkTank
}
from
"@/utils/goToPage/methods/dataLibrary.js"
;
const
gotoNewsDetail
=
useGotoNewsDetail
()
const
containerRef
=
ref
(
null
);
const
isRiskDetailVisible
=
ref
(
false
);
...
...
@@ -2451,7 +2452,7 @@ const handleToDataLibrary = (item) => {
const
selectParam
=
{
orgnizationName
:
item
.
name
}
// 使用 goToPage
.js 统一的 Base64(encodeURIComponent(JSON)) 加密传参方式
// 使用 goToPage
/methods/dataLibrary 与数据资源库一致的 Base64(encodeURIComponent(JSON)) 传参
goToDataThinkTank
(
selectParam
)
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论