Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
eadce0bf
提交
eadce0bf
authored
4月 16, 2026
作者:
朱政
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:首页风险信号与后端对接口
上级
b7c44603
流水线
#535
已通过 于阶段
in 1 分 46 秒
变更
2
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
126 行增加
和
37 行删除
+126
-37
index.js
src/api/zmOverview/risk/index.js
+8
-0
index.vue
src/views/ZMOverView/components/newRisk/index.vue
+118
-37
没有找到文件。
src/api/zmOverview/risk/index.js
浏览文件 @
eadce0bf
...
...
@@ -17,6 +17,14 @@ export function getLatestRisks() {
});
}
// 中美博弈概览V2:首页最新风险动态(10条 + 各类数量/总数)
export
function
getLatestRisk
()
{
return
request
({
method
:
"GET"
,
url
:
`/api/rivalryIndexV2/LatestRisk`
});
}
// 中美博弈概览V2:美对华制裁措施数量趋势
export
function
geDomainContainmentTrend
(
params
)
{
return
request
({
...
...
src/views/ZMOverView/components/newRisk/index.vue
浏览文件 @
eadce0bf
...
...
@@ -43,15 +43,10 @@
<div
style=
"display: flex"
>
<!-- 风险信号列表 -->
<div
class=
"risk-signals"
ref=
"riskSignalsRef"
>
<div
class=
"risk-signals-item"
v-for=
"(item, index) in warningList"
<div
class=
"risk-signals-item"
v-for=
"(item, index) in warningList"
:key=
"item.signalId != null ? String(item.signalId) : 'risk-' + index"
@
mouseenter=
"onMouseEnter(item, index)"
@
mouseleave=
"onMouseLeave"
@
click
.
stop
:class=
"['risk-signals-item',
{ 'risk-signals-item-hightLight': riskSignalActiveIndex === index }]"
>
@
mouseenter=
"onMouseEnter(item, index)"
@
mouseleave=
"onMouseLeave"
@
click
.
stop
:class=
"['risk-signals-item',
{ 'risk-signals-item-hightLight': riskSignalActiveIndex === index }]">
<div
class=
"item-left"
:class=
"
{
'item-status-1': item.signalLevel === '特别重大',
'item-status-2': item.signalLevel === '重大风险',
...
...
@@ -132,7 +127,8 @@
import
{
color
}
from
"echarts"
;
import
{
onMounted
,
ref
,
onUnmounted
,
computed
}
from
"vue"
;
import
WaveBall
from
"./WaveBall.vue"
;
import
{
getLatestRiskUpdates
,
getLatestRisks
}
from
"@/api/zmOverview/risk/index.js"
;
import
{
getLatestRisk
}
from
"@/api/zmOverview/risk/index.js"
;
import
{
getRiskSignalInfoById
}
from
"@/api/riskSignal/index.js"
;
import
router
from
"@/router/index"
;
import
{
navigateToViewRiskSignal
}
from
"@/utils/riskSignalOverviewNavigate"
;
import
icon1
from
"./icon/title-1.svg"
;
...
...
@@ -315,12 +311,14 @@ const cardShowIndex4 = ref(0);
// 最新风险动态统计
const
handleGetLatestRiskUpdates
=
async
()
=>
{
try
{
const
params
=
{
currentDate
:
"本周"
};
const
res
=
await
getLatestRiskUpdates
(
params
);
console
.
log
(
"最新风险动态统计1"
,
res
);
const
res
=
await
getLatestRisk
();
console
.
log
(
"最新风险动态"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
const
d
=
res
.
data
;
const
formatChange
=
(
n
)
=>
{
const
v
=
Number
(
n
)
||
0
;
return
v
===
0
?
"无新增"
:
String
(
v
);
};
sections
.
value
=
[
{
// title: res.data.policiesRegulations.hotspotTitle,
...
...
@@ -328,16 +326,16 @@ const handleGetLatestRiskUpdates = async () => {
waveBall
:
[
{
percent
:
30
,
// 估算的百分比
count
:
res
.
data
.
bill
.
total
,
change
:
res
.
data
.
bill
.
dailyIncrement
,
count
:
d
.
billRiskTotal
??
0
,
change
:
formatChange
(
d
.
billRiskNum
)
,
unit
:
"项"
,
title
:
"法案(提出)"
,
type
:
"法案"
},
{
percent
:
20
,
// 估算的百分比
count
:
res
.
data
.
administrativeOrder
.
total
,
change
:
res
.
data
.
administrativeOrder
.
dailyIncrement
,
count
:
d
.
orderRiskTotal
??
0
,
change
:
formatChange
(
d
.
orderRiskNum
)
,
unit
:
"个"
,
title
:
"政令"
,
type
:
"行政令"
...
...
@@ -350,8 +348,8 @@ const handleGetLatestRiskUpdates = async () => {
waveBall
:
[
{
percent
:
10
,
// 估算的百分比
count
:
res
.
data
.
Entities
.
total
,
change
:
res
.
data
.
Entities
.
dailyIncrement
,
count
:
d
.
entityRiskTotal
??
0
,
change
:
formatChange
(
d
.
entityRiskNum
)
,
unit
:
"次"
,
title
:
"实体清单"
,
...
...
@@ -359,8 +357,8 @@ const handleGetLatestRiskUpdates = async () => {
},
{
percent
:
20
,
// 估算的百分比
count
:
res
.
data
.
CCL
.
total
,
change
:
res
.
data
.
CCL
.
dailyIncrement
,
count
:
d
.
cclRiskTotal
??
0
,
change
:
formatChange
(
d
.
cclRiskNum
)
,
unit
:
"次"
,
title
:
"CCL"
,
type
:
"CCL"
...
...
@@ -373,16 +371,16 @@ const handleGetLatestRiskUpdates = async () => {
waveBall
:
[
{
percent
:
15
,
// 估算的百分比
count
:
res
.
data
.
SDN
.
total
,
change
:
res
.
data
.
SDN
.
dailyIncrement
,
count
:
d
.
sdnRiskTotal
??
0
,
change
:
formatChange
(
d
.
sdnRiskNum
)
,
unit
:
"次"
,
title
:
"SDN"
,
type
:
"SDN"
},
{
percent
:
5
,
// 估算的百分比
count
:
res
.
data
.
militaryInvolvement
.
total
,
change
:
res
.
data
.
militaryInvolvement
.
dailyIncrement
,
count
:
d
.
armyRiskTotal
??
0
,
change
:
formatChange
(
d
.
armyRiskNum
)
,
unit
:
"家"
,
title
:
"涉军企业"
,
type
:
"涉军企业"
...
...
@@ -395,24 +393,24 @@ const handleGetLatestRiskUpdates = async () => {
waveBall
:
[
{
percent
:
3
,
// 估算的百分比
count
:
res
.
data
[
"337Survey"
].
total
,
change
:
res
.
data
[
"337Survey"
].
dailyIncrement
,
count
:
d
.
m337RiskTotal
??
0
,
change
:
formatChange
(
d
.
m337RiskNum
)
,
unit
:
"次"
,
title
:
"337调查"
,
type
:
"337调查"
},
{
percent
:
3
,
// 估算的百分比
count
:
res
.
data
[
"232Survey"
].
total
,
change
:
res
.
data
[
"232Survey"
].
dailyIncrement
,
count
:
d
.
m232RiskTotal
??
0
,
change
:
formatChange
(
d
.
m232RiskNum
)
,
unit
:
"次"
,
title
:
"232调查"
,
type
:
"232调查"
},
{
percent
:
3
,
// 估算的百分比
count
:
res
.
data
[
"301Survey"
].
total
,
change
:
res
.
data
[
"301Survey"
].
dailyIncrement
,
count
:
d
.
m301RiskTotal
??
0
,
change
:
formatChange
(
d
.
m301RiskNum
)
,
unit
:
"次"
,
title
:
"301调查"
,
type
:
"301调查"
...
...
@@ -454,12 +452,60 @@ const hotNewsList = ref([
//最新风险信号
const
handleGetLatestRisks
=
async
()
=>
{
try
{
const
res
=
await
getLatestRisk
s
();
console
.
log
(
"最新风险
信号
"
,
res
);
const
res
=
await
getLatestRisk
();
console
.
log
(
"最新风险
动态(列表)
"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
warningList
.
value
=
res
.
data
.
riskVOS
;
hotNewsList
.
value
=
res
.
data
.
hotspotVOS
;
riskTotal
.
value
=
res
.
data
.
riskCount
;
const
d
=
res
.
data
;
const
list
=
Array
.
isArray
(
d
.
riskSignals
)
?
d
.
riskSignals
:
[];
const
getEventTypeFromModule
=
(
code
)
=>
{
const
c
=
String
(
code
??
""
).
trim
();
if
(
c
===
"0100"
)
return
"法案"
;
if
(
c
===
"0101"
)
return
"行政令"
;
if
(
c
===
"0102"
)
return
"智库报告"
;
if
(
c
===
"0103"
)
return
"出口管制"
;
if
(
c
===
"0104"
)
return
"市场准入"
;
if
(
c
===
"0105"
)
return
"创新主体"
;
if
(
c
===
"0106"
)
return
"合作限制"
;
if
(
c
===
"0107"
)
return
"科研资助体系"
;
if
(
c
===
"0108"
)
return
"规则限制"
;
if
(
c
===
"0109"
)
return
"投融资限制"
;
if
(
c
===
"01031"
)
return
"实体清单"
;
if
(
c
===
"01032"
)
return
"CCL"
;
if
(
c
===
"01091"
)
return
"SDN"
;
if
(
c
===
"01092"
)
return
"涉军企业"
;
if
(
c
===
"01041"
)
return
"337调查"
;
if
(
c
===
"01042"
)
return
"232调查"
;
if
(
c
===
"01043"
)
return
"301调查"
;
return
c
;
};
warningList
.
value
=
list
.
map
((
x
)
=>
({
signalId
:
x
.
id
,
signalTitle
:
x
.
title
,
signalTime
:
x
.
eventTime
,
signalLevel
:
x
.
riskLevel
,
signalCountryId
:
x
.
riskCountryId
,
dealStatus
:
x
.
dealStatus
,
eventType
:
getEventTypeFromModule
(
x
.
sanModuleCode
)
}));
riskTotal
.
value
=
warningList
.
value
.
length
;
// 右侧轮播:同样使用 LatestRisk 的 riskSignals(字段映射到现有模板使用的热点字段名)
hotNewsList
.
value
=
list
.
map
((
x
)
=>
({
signalId
:
x
.
id
,
hotspotID
:
x
.
id
,
hotspotType
:
getEventTypeFromModule
(
x
.
sanModuleCode
),
hotspotTitle
:
x
.
title
,
// 轮播题目右侧标签:切换轮播时用详情接口 domains 覆盖
hotspotTag
:
""
,
hotspotDesc
:
x
.
description
||
""
,
hotspotDate
:
x
.
eventTime
||
""
,
domainList
:
[],
eventTitle
:
x
.
issuingOrgId
||
""
}));
// 首次加载:主动拉取当前轮播项详情以展示题目右侧标签
await
fetchCarouselDetailForIndex
(
curHotNewsListIndex
.
value
||
0
);
cardList1
.
value
=
warningList
.
value
.
filter
(
item
=>
{
return
item
.
eventType
===
"法案"
||
item
.
eventType
===
"行政令"
;
...
...
@@ -520,11 +566,46 @@ const handleGetLatestRisks = async () => {
const
curNews
=
ref
({});
const
carouselRef
=
ref
(
null
);
const
curHotNewsListIndex
=
ref
(
0
);
const
carouselDetailCache
=
ref
({});
const
applyHotspotTagById
=
(
id
,
tagText
)
=>
{
const
sid
=
String
(
id
??
""
).
trim
();
if
(
!
sid
)
return
;
hotNewsList
.
value
=
(
hotNewsList
.
value
||
[]).
map
((
n
)
=>
{
if
(
String
(
n
.
hotspotID
??
""
).
trim
()
!==
sid
)
return
n
;
return
{
...
n
,
hotspotTag
:
tagText
};
});
};
const
fetchCarouselDetailForIndex
=
async
(
index
)
=>
{
const
item
=
hotNewsList
.
value
?.[
index
];
if
(
!
item
)
return
;
const
id
=
String
(
item
.
hotspotID
??
""
).
trim
();
if
(
!
id
)
return
;
if
(
carouselDetailCache
.
value
[
id
])
{
applyHotspotTagById
(
id
,
carouselDetailCache
.
value
[
id
]);
return
;
}
try
{
const
res
=
await
getRiskSignalInfoById
(
id
);
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
const
tagText
=
String
(
res
.
data
.
domains
??
""
).
trim
();
if
(
tagText
)
{
carouselDetailCache
.
value
=
{
...
carouselDetailCache
.
value
,
[
id
]:
tagText
};
applyHotspotTagById
(
id
,
tagText
);
}
}
}
catch
(
error
)
{
console
.
error
(
"轮播风险信号详情获取失败"
,
error
);
}
};
const
handleCarouselChange
=
index
=>
{
curHotNewsListIndex
.
value
=
index
;
if
(
hotNewsList
.
value
&&
hotNewsList
.
value
.
length
>
0
)
{
curNews
.
value
=
hotNewsList
.
value
[
index
];
}
fetchCarouselDetailForIndex
(
index
);
};
// 查看详情
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论