Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
a28f1990
提交
a28f1990
authored
3月 10, 2026
作者:
张伊明
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix 法案深度挖掘政治献金流向暂且使用部分静态数据
fix 政令新闻资讯样式间隔修改
上级
0cb9b9aa
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
46 行增加
和
11 行删除
+46
-11
index.vue
src/views/bill/deepDig/poliContribution/index.vue
+45
-11
index.vue
src/views/decree/decreeHome/index.vue
+1
-0
没有找到文件。
src/views/bill/deepDig/poliContribution/index.vue
浏览文件 @
a28f1990
...
@@ -488,6 +488,27 @@ const chart2Data = ref([]);
...
@@ -488,6 +488,27 @@ const chart2Data = ref([]);
const
chart2ColorList
=
ref
([
"#4096FF"
,
"#FFA39E"
,
"#ADC6FF"
,
"#FFC069"
,
"#B5F5EC"
,
"#B37FEB"
,
"#D6E4FF"
]);
const
chart2ColorList
=
ref
([
"#4096FF"
,
"#FFA39E"
,
"#ADC6FF"
,
"#FFC069"
,
"#B5F5EC"
,
"#B37FEB"
,
"#D6E4FF"
]);
// 使用静态行业分布数据,用于“政治献金领域分布”模块展示
const
useStaticIndustryData
=
true
;
const
staticChart2Data
=
[
{
name
:
"集成电路"
,
value
:
21
},
{
name
:
"能源"
,
value
:
18
},
{
name
:
"量子科技"
,
value
:
16
},
{
name
:
"航空航天"
,
value
:
14
},
{
name
:
"通信设备"
,
value
:
12
},
{
name
:
"生物科技"
,
value
:
11
},
{
name
:
"其他"
,
value
:
8
}
];
const
staticAreaList
=
[
{
name
:
"集成电路"
,
amount
:
186000
,
insNum
:
8
},
{
name
:
"能源"
,
amount
:
180000
,
insNum
:
5
},
{
name
:
"量子科技"
,
amount
:
171000
,
insNum
:
2
},
{
name
:
"航空航天"
,
amount
:
75000
,
insNum
:
3
},
{
name
:
"通信设备"
,
amount
:
70000
,
insNum
:
2
}
];
const
sankeyColors
=
[
const
sankeyColors
=
[
"#5470c6"
,
"#5470c6"
,
"#91cc75"
,
"#91cc75"
,
...
@@ -684,25 +705,37 @@ const getPersonPoliContribution = async personId => {
...
@@ -684,25 +705,37 @@ const getPersonPoliContribution = async personId => {
if
(
res
.
code
===
200
&&
res
.
data
)
{
if
(
res
.
code
===
200
&&
res
.
data
)
{
personPoliContribution
.
value
=
res
.
data
;
personPoliContribution
.
value
=
res
.
data
;
// 政治献金流向:始终使用真实接口数据渲染桑基图
fullSourceList
.
value
=
res
.
data
.
sourceList
||
[];
fullSourceList
.
value
=
res
.
data
.
sourceList
||
[];
showAllSankeyData
.
value
=
false
;
// Reset to default (top 5)
showAllSankeyData
.
value
=
false
;
// Reset to default (top 5)
renderSankeyChart
();
renderSankeyChart
();
// Update Industry List (Chart 2 and List)
// 政治献金领域分布:根据配置选择静态数据或接口数据
if
(
useStaticIndustryData
)
{
// 饼图数据(左侧圆环)
chart2Data
.
value
=
staticChart2Data
;
const
chart2Static
=
getPieChart
(
chart2Data
.
value
,
chart2ColorList
.
value
);
setChart
(
chart2Static
,
"chart2"
);
// 右侧列表(Top5 领域)
areaList
.
value
=
staticAreaList
.
map
(
item
=>
({
name
:
item
.
name
,
num
:
item
.
amount
,
numtext
:
`$
${
item
.
amount
.
toLocaleString
()}
`
,
insNum
:
item
.
insNum
}));
}
else
{
// 使用接口返回的行业分布
const
industries
=
res
.
data
.
industryList
||
[];
const
industries
=
res
.
data
.
industryList
||
[];
// Update Chart 2 Data
chart2Data
.
value
=
industries
.
map
(
item
=>
({
chart2Data
.
value
=
industries
.
map
(
item
=>
({
name
:
item
.
industryName
,
name
:
item
.
industryName
,
value
:
item
.
amount
value
:
item
.
amount
}));
}));
// Re-render Chart 2
const
chart2Dynamic
=
getPieChart
(
chart2Data
.
value
,
chart2ColorList
.
value
);
let
chart2
=
getPieChart
(
chart2Data
.
value
,
chart2ColorList
.
value
);
setChart
(
chart2Dynamic
,
"chart2"
);
setChart
(
chart2
,
"chart2"
);
// Update List Data
// Sort by amount desc to ensure first item is max for progress bar
const
sortedIndustries
=
[...
industries
].
sort
((
a
,
b
)
=>
(
b
.
amount
||
0
)
-
(
a
.
amount
||
0
));
const
sortedIndustries
=
[...
industries
].
sort
((
a
,
b
)
=>
(
b
.
amount
||
0
)
-
(
a
.
amount
||
0
));
areaList
.
value
=
sortedIndustries
.
map
(
item
=>
({
areaList
.
value
=
sortedIndustries
.
map
(
item
=>
({
...
@@ -711,6 +744,7 @@ const getPersonPoliContribution = async personId => {
...
@@ -711,6 +744,7 @@ const getPersonPoliContribution = async personId => {
numtext
:
`$
${(
item
.
amount
||
0
).
toLocaleString
()}
`
,
numtext
:
`$
${(
item
.
amount
||
0
).
toLocaleString
()}
`
,
insNum
:
item
.
orgNum
insNum
:
item
.
orgNum
}));
}));
}
}
else
{
}
else
{
personPoliContribution
.
value
=
[];
personPoliContribution
.
value
=
[];
fullSourceList
.
value
=
[];
fullSourceList
.
value
=
[];
...
@@ -718,8 +752,8 @@ const getPersonPoliContribution = async personId => {
...
@@ -718,8 +752,8 @@ const getPersonPoliContribution = async personId => {
chart2Data
.
value
=
[];
chart2Data
.
value
=
[];
areaList
.
value
=
[];
areaList
.
value
=
[];
let
chart2
=
getPieChart
([],
chart2ColorList
.
value
);
const
chart2Empty
=
getPieChart
([],
chart2ColorList
.
value
);
setChart
(
chart2
,
"chart2"
);
setChart
(
chart2
Empty
,
"chart2"
);
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
...
@@ -729,8 +763,8 @@ const getPersonPoliContribution = async personId => {
...
@@ -729,8 +763,8 @@ const getPersonPoliContribution = async personId => {
chart2Data
.
value
=
[];
chart2Data
.
value
=
[];
areaList
.
value
=
[];
areaList
.
value
=
[];
let
chart2
=
getPieChart
([],
chart2ColorList
.
value
);
const
chart2Error
=
getPieChart
([],
chart2ColorList
.
value
);
setChart
(
chart2
,
"chart2"
);
setChart
(
chart2
Error
,
"chart2"
);
}
}
};
};
...
...
src/views/decree/decreeHome/index.vue
浏览文件 @
a28f1990
...
@@ -2049,6 +2049,7 @@ onMounted(async () => {
...
@@ -2049,6 +2049,7 @@ onMounted(async () => {
margin-top
:
21px
;
margin-top
:
21px
;
height
:
450px
;
height
:
450px
;
display
:
flex
;
display
:
flex
;
gap
:
16px
;
.box3
{
.box3
{
width
:
792px
;
width
:
792px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论