Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
822ecf9a
提交
822ecf9a
authored
4月 23, 2026
作者:
朱政
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:跳转加密解密智库合作限制
上级
c775eca6
流水线
#628
已取消 于阶段
变更
6
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
172 行增加
和
60 行删除
+172
-60
writtingAsstaintStore.js
src/stores/writtingAsstaintStore.js
+25
-4
index.vue
src/views/thinkTank/CongressHearingView/index.vue
+51
-19
index.vue
src/views/thinkTank/MultiThinkTankViewAnalysis/index.vue
+69
-1
index.vue
src/views/thinkTank/ReportDetail/index.vue
+9
-4
index.vue
src/views/thinkTank/ReportDetail/reportAnalysis/index.vue
+16
-18
index.vue
src/views/thinkTank/ThinkTankDetail/thinkInfo/index.vue
+2
-14
没有找到文件。
src/stores/writtingAsstaintStore.js
浏览文件 @
822ecf9a
...
...
@@ -223,12 +223,33 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
},
// ========== 路由参数处理 ==========
/**
* 与 goToPage 中法案/政令等一致:query.data = btoa(encodeURIComponent(JSON.stringify({ topic, fileId, ... })))
*/
_decodeWrittingRouteDataParam
(
dataParam
)
{
if
(
dataParam
==
null
||
dataParam
===
''
)
return
null
try
{
const
s
=
String
(
dataParam
).
trim
()
if
(
!
s
)
return
null
const
normalized
=
s
.
replace
(
/-/g
,
'+'
).
replace
(
/_/g
,
'/'
)
const
padded
=
normalized
+
'==='
.
slice
((
normalized
.
length
+
3
)
%
4
)
const
decoded
=
atob
(
padded
)
const
jsonStr
=
decodeURIComponent
(
decoded
)
const
obj
=
JSON
.
parse
(
jsonStr
)
return
obj
&&
typeof
obj
===
'object'
&&
!
Array
.
isArray
(
obj
)
?
obj
:
null
}
catch
(
e
)
{
console
.
error
(
'写作助手路由 query.data 解密失败'
,
e
)
return
null
}
},
async
setRouteParams
(
query
)
{
this
.
routeQuery
=
{
...
query
};
this
.
_isDisableTemplate
=
Object
.
keys
(
query
).
length
>
0
;
const
decoded
=
query
?.
data
!=
null
?
this
.
_decodeWrittingRouteDataParam
(
query
.
data
)
:
null
const
effective
=
decoded
?
{
...
query
,
...
decoded
}
:
{
...
query
}
this
.
routeQuery
=
{
...
effective
}
this
.
_isDisableTemplate
=
Object
.
keys
(
effective
).
length
>
0
if
(
Object
.
keys
(
query
).
length
>
0
)
{
const
{
topic
,
fileId
}
=
query
;
if
(
Object
.
keys
(
effective
).
length
>
0
)
{
const
{
topic
,
fileId
}
=
effective
if
(
topic
)
{
this
.
curTempTitle
=
topic
;
this
.
tempActiveIndex
=
this
.
tempList
.
findIndex
(
item
=>
item
.
title
===
topic
);
...
...
src/views/thinkTank/CongressHearingView/index.vue
浏览文件 @
822ecf9a
...
...
@@ -320,11 +320,20 @@ const decodeRouteId = (raw) => {
const
hearingId
=
computed
(()
=>
decodeRouteId
(
router
.
currentRoute
.
value
?.
params
?.
id
));
const
goToAllThinkTank
=
()
=>
{
const
thinkTankId
=
props
?.
thinkInfo
?.
thinkTankId
||
props
?.
thinkInfo
?.
id
;
const
route
=
router
.
resolve
({
const
s
=
thinkTankId
!=
null
&&
thinkTankId
!==
""
?
String
(
thinkTankId
).
trim
()
:
""
;
if
(
!
s
)
return
;
let
encodedId
;
try
{
encodedId
=
btoa
(
encodeURIComponent
(
s
));
}
catch
(
_
)
{
encodedId
=
s
;
}
if
(
!
encodedId
)
return
;
const
r
=
router
.
resolve
({
name
:
"MultiThinkTankViewAnalysis"
,
params
:
{
id
:
thinkTank
Id
}
params
:
{
id
:
encoded
Id
}
});
window
.
open
(
r
oute
.
href
,
"_blank"
);
window
.
open
(
r
.
href
,
"_blank"
);
};
...
...
@@ -466,29 +475,52 @@ const reportAuthors = computed(() => {
}
return
[];
});
const
encodeBase64Param
=
(
val
)
=>
{
const
s
=
String
(
val
??
""
).
trim
();
if
(
!
s
)
return
""
;
try
{
return
btoa
(
encodeURIComponent
(
s
));
}
catch
(
_
)
{
return
s
;
}
};
// 点击报告作者头像,跳转到人物主页
// 与核心研究人员逻辑一致:核心依赖 personId,本页面依赖作者的 id(作为 personId 传入)
const
handleClickReportAuthor
=
async
(
author
)
=>
{
const
personId
=
author
?.
personId
;
const
personId
=
author
?.
personId
??
author
?.
id
;
if
(
!
personId
)
return
;
const
personTypeList
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
"personTypeList"
));
let
type
=
0
;
const
params
=
{
personId
};
const
res
=
await
getPersonSummaryInfo
(
params
);
if
(
res
.
code
!==
200
||
!
res
.
data
)
return
;
window
.
sessionStorage
.
setItem
(
"curTabName"
,
author
?.
name
||
""
);
const
route
=
router
.
resolve
({
path
:
"/characterPage"
,
query
:
{
personId
try
{
const
res
=
await
getPersonSummaryInfo
(
params
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
const
arr
=
Array
.
isArray
(
personTypeList
)
?
personTypeList
.
filter
((
t
)
=>
{
const
typeIdNum
=
Number
(
t
.
typeId
);
const
personTypeNum
=
Number
(
res
.
data
.
personType
);
return
!
Number
.
isNaN
(
typeIdNum
)
&&
!
Number
.
isNaN
(
personTypeNum
)
&&
typeIdNum
===
personTypeNum
;
})
:
[];
window
.
sessionStorage
.
setItem
(
"curTabName"
,
author
?.
name
||
"人物主页"
);
const
encodedPersonId
=
encodeBase64Param
(
personId
);
if
(
!
encodedPersonId
)
return
;
const
route
=
router
.
resolve
({
path
:
"/characterPage"
,
query
:
{
type
,
personId
:
encodedPersonId
}
});
window
.
open
(
route
.
href
,
"_blank"
);
}
else
{
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
}
});
window
.
open
(
route
.
href
,
"_blank"
);
}
catch
(
error
)
{
}
};
const
riskSignal
=
computed
(()
=>
{
const
info
=
props
.
thinkInfo
||
{};
...
...
src/views/thinkTank/MultiThinkTankViewAnalysis/index.vue
浏览文件 @
822ecf9a
...
...
@@ -314,6 +314,7 @@
<
/template
>
<
script
setup
>
import
router
from
'@/router'
;
import
{
useRoute
}
from
"vue-router"
;
import
{
onMounted
,
ref
,
computed
,
reactive
,
nextTick
,
watch
}
from
"vue"
;
import
AnalysisBox
from
"@/components/base/boxBackground/analysisBox.vue"
import
AnalysisResultBox
from
"./boxBackground/analysisBox.vue"
...
...
@@ -323,6 +324,73 @@ import {
getThinkTankReportViewpoint
,
postReportDomainViewAnalysisStream
}
from
"@/api/thinkTank/overview"
;
const
route
=
useRoute
();
const
decodeRouteId
=
(
raw
)
=>
{
if
(
raw
==
null
)
return
null
;
let
s0
=
String
(
raw
);
if
(
!
s0
)
return
null
;
if
(
s0
.
includes
(
"%"
))
{
try
{
const
decodedOnce
=
decodeURIComponent
(
s0
);
if
(
decodedOnce
)
{
s0
=
decodedOnce
;
}
}
catch
(
_
)
{
}
}
if
(
/^
\d
+$/
.
test
(
s0
)
||
/^Rand_/i
.
test
(
s0
))
{
return
s0
;
}
const
tryParseJson
=
(
str
)
=>
{
if
(
typeof
str
!==
"string"
)
return
null
;
const
s
=
str
.
trim
();
if
(
!
s
)
return
null
;
try
{
return
JSON
.
parse
(
s
);
}
catch
(
_
)
{
return
null
;
}
}
;
const
tryAtob
=
(
val
)
=>
{
if
(
val
==
null
)
return
null
;
const
s
=
String
(
val
).
trim
();
if
(
!
s
)
return
null
;
const
normalized
=
s
.
replace
(
/-/g
,
"+"
).
replace
(
/_/g
,
"/"
);
const
padded
=
normalized
+
"==="
.
slice
((
normalized
.
length
+
3
)
%
4
);
try
{
return
atob
(
padded
);
}
catch
(
_
)
{
return
null
;
}
}
;
const
atobStr
=
tryAtob
(
s0
);
if
(
atobStr
!=
null
)
{
try
{
const
decoded
=
decodeURIComponent
(
atobStr
);
return
tryParseJson
(
decoded
)
??
decoded
;
}
catch
(
_
)
{
return
tryParseJson
(
atobStr
)
??
atobStr
;
}
}
try
{
const
utf8
=
decodeURIComponent
(
escape
(
s0
));
if
(
utf8
&&
utf8
!==
s0
)
{
if
(
/^
\d
+$/
.
test
(
utf8
)
||
/^Rand_/i
.
test
(
utf8
))
return
utf8
;
return
tryParseJson
(
utf8
)
??
utf8
;
}
}
catch
(
_
)
{
}
return
s0
;
}
;
/** 与智库详情等一致:路由 id 为 base64(encodeURIComponent(明文)),请求接口前解密 */
const
thinkTankIdFromRoute
=
computed
(()
=>
{
const
id
=
decodeRouteId
(
route
.
params
?.
id
);
return
id
!=
null
&&
id
!==
""
?
String
(
id
)
:
""
;
}
);
const
sort
=
ref
(
""
);
const
searchPolicy
=
ref
(
""
);
const
isBox2
=
ref
(
true
)
...
...
@@ -951,7 +1019,7 @@ const handleGetHylyList = async () => {
}
;
//获取智库报告
const
handleGetetThinkTankReport
=
async
(
page
=
currentPage
.
value
)
=>
{
const
thinkTankId
=
router
.
currentRoute
?.
value
?.
params
?.
id
||
""
;
const
thinkTankId
=
thinkTankIdFromRoute
.
value
;
const
getDateYearsAgo
=
(
years
)
=>
{
const
d
=
new
Date
();
...
...
src/views/thinkTank/ReportDetail/index.vue
浏览文件 @
822ecf9a
...
...
@@ -229,12 +229,17 @@ const switchTab = name => {
const
handleAnalysisClick
=
()
=>
{
const
id
=
reportId
.
value
;
if
(
!
id
)
return
;
const
param
=
{
topic
:
"智库"
,
fileId
:
id
};
const
jsonStr
=
JSON
.
stringify
(
param
);
let
data
;
try
{
data
=
btoa
(
encodeURIComponent
(
jsonStr
));
}
catch
(
_
)
{
return
;
}
router
.
push
({
path
:
"/writtingAsstaint"
,
query
:
{
topic
:
"智库"
,
fileId
:
id
}
query
:
{
data
}
});
};
onMounted
(
async
()
=>
{
...
...
src/views/thinkTank/ReportDetail/reportAnalysis/index.vue
浏览文件 @
822ecf9a
...
...
@@ -302,11 +302,20 @@ const decodeRouteId = (raw) => {
const
reportId
=
computed
(()
=>
decodeRouteId
(
route
.
params
?.
id
));
const
goToAllThinkTank
=
()
=>
{
const
thinkTankId
=
props
?.
thinkInfo
?.
thinkTankId
||
props
?.
thinkInfo
?.
id
;
const
route
=
router
.
resolve
({
const
s
=
thinkTankId
!=
null
&&
thinkTankId
!==
""
?
String
(
thinkTankId
).
trim
()
:
""
;
if
(
!
s
)
return
;
let
encodedId
;
try
{
encodedId
=
btoa
(
encodeURIComponent
(
s
));
}
catch
(
_
)
{
encodedId
=
s
;
}
if
(
!
encodedId
)
return
;
const
r
=
router
.
resolve
({
name
:
"MultiThinkTankViewAnalysis"
,
params
:
{
id
:
thinkTank
Id
}
params
:
{
id
:
encoded
Id
}
});
window
.
open
(
r
oute
.
href
,
"_blank"
);
window
.
open
(
r
.
href
,
"_blank"
);
};
...
...
@@ -448,21 +457,9 @@ const handleClickReportAuthor = async (author) => {
return
!
Number
.
isNaN
(
typeIdNum
)
&&
!
Number
.
isNaN
(
personTypeNum
)
&&
typeIdNum
===
personTypeNum
;
})
:
[];
if
(
!
arr
.
length
)
{
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
return
;
}
const
personTypeName
=
arr
[
0
]?.
typeName
||
""
;
if
(
personTypeName
===
"科技企业领袖"
)
{
type
=
1
;
}
else
if
(
personTypeName
===
"国会议员"
)
{
type
=
2
;
}
else
if
(
personTypeName
===
"智库研究人员"
)
{
type
=
3
;
}
else
{
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
return
;
}
window
.
sessionStorage
.
setItem
(
"curTabName"
,
author
?.
name
||
"人物主页"
);
const
encodedPersonId
=
encodeBase64Param
(
personId
);
if
(
!
encodedPersonId
)
return
;
...
...
@@ -1198,6 +1195,7 @@ onMounted(() => {
background-color
:
rgb
(
5
,
95
,
194
);
border-radius
:
6px
;
display
:
flex
;
cursor
:
pointer
;
.btn-text
{
color
:
rgb
(
255
,
255
,
255
);
...
...
src/views/thinkTank/ThinkTankDetail/thinkInfo/index.vue
浏览文件 @
822ecf9a
...
...
@@ -741,21 +741,9 @@ const handleClickPerson = async item => {
})
:
[];
console
.
log
(
"arr"
,
arr
);
if
(
!
arr
.
length
)
{
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
return
;
}
personTypeName
=
arr
[
0
]?.
typeName
||
""
;
if
(
personTypeName
===
"科技企业领袖"
)
{
type
=
1
;
}
else
if
(
personTypeName
===
"国会议员"
)
{
type
=
2
;
}
else
if
(
personTypeName
===
"智库研究人员"
)
{
type
=
3
;
}
else
{
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
return
;
}
window
.
sessionStorage
.
setItem
(
"curTabName"
,
item
.
name
||
"人物主页"
);
const
encodedPersonId
=
encodeBase64Param
(
item
?.
personId
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论