Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
a2f6b7d9
提交
a2f6b7d9
authored
12月 25, 2025
作者:
huhuiqing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
葚图不显示的问题及词云接口对接
上级
a7a63573
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
42 行增加
和
38 行删除
+42
-38
overview.js
src/api/thinkTank/overview.js
+1
-1
index.vue
src/views/thinkTank/ReportDetail/reportAnalysis/index.vue
+7
-5
index.vue
src/views/thinkTank/index.vue
+34
-32
没有找到文件。
src/api/thinkTank/overview.js
浏览文件 @
a2f6b7d9
...
...
@@ -230,7 +230,7 @@ export function getThinkTankReportIndustry(params) {
export
function
getThinkTankReportIndustryCloud
(
params
)
{
return
request
({
method
:
'GET'
,
url
:
`/api/thinkTankReport/
industry/
${
params
.
id
}
/
${
params
.
industryI
d
}
`
,
url
:
`/api/thinkTankReport/
keyword/
${
params
.
i
d
}
`
,
})
}
...
...
src/views/thinkTank/ReportDetail/reportAnalysis/index.vue
浏览文件 @
a2f6b7d9
...
...
@@ -38,12 +38,12 @@
</div>
</div>
<div
class=
"box2-main"
>
<div
class=
"box2-main-tag-box"
>
<
!--
<
div
class=
"box2-main-tag-box"
>
<div
class=
"tag"
:class=
"
{ tagActive: activeArea === item }" v-for="(item, index) in areaList" :key="index"
@click="handleClickArea(item.status)">
{{
item
.
industryName
}}
</div>
</div>
</div>
-->
<div
class=
"box2-content"
id=
"box2Chart"
></div>
</div>
</div>
...
...
@@ -197,7 +197,7 @@ const handleGetThinkTankReportIndustryCloud = async () => {
try
{
const
params
=
{
id
:
router
.
currentRoute
.
_value
.
params
.
id
,
industryId
:
activeArea
.
value
//
industryId: activeArea.value
};
const
res
=
await
getThinkTankReportIndustryCloud
(
params
);
console
.
log
(
"科技领域词云"
,
res
);
...
...
@@ -372,6 +372,7 @@ const majorOpinions = ref([
]);
// 处理页码改变事件
const
currentPage
=
ref
(
1
);
const
total
=
ref
(
0
)
const
handleCurrentChange
=
page
=>
{
currentPage
.
value
=
page
;
handleGetThinkDynamicsReport
();
...
...
@@ -380,9 +381,10 @@ const handleCurrentChange = page => {
const
handleGetThinkTankReportContent
=
async
()
=>
{
try
{
const
res
=
await
getThinkTankReportContent
(
router
.
currentRoute
.
_value
.
params
.
id
);
console
.
log
(
"主要观点"
,
res
);
console
.
log
(
"主要观点"
,
res
.
data
.
totalElements
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
majorOpinions
.
value
=
res
.
data
.
content
;
total
.
value
=
res
.
data
.
totalElements
}
}
catch
(
error
)
{
console
.
error
(
"获取主要观点error"
,
error
);
...
...
@@ -588,7 +590,7 @@ onMounted(() => {
.box2-content
{
width
:
430px
;
height
:
231
px
;
height
:
315
px
;
box-sizing
:
border-box
;
border
:
1px
solid
rgba
(
234
,
236
,
238
,
1
);
border-radius
:
4px
;
...
...
src/views/thinkTank/index.vue
浏览文件 @
a2f6b7d9
...
...
@@ -977,78 +977,80 @@ const box7Data = ref({
{
source
:
"美国国务院"
,
target
:
"兰德公司"
,
value
:
15
}
]
});
function
transformThinkTankData
(
data
)
{
// 遍历每个智库
function
transformDataToSankey
(
inputData
)
{
const
nodes
=
[];
const
links
=
[];
const
nodeSet
=
new
Set
();
// 用于去重
// 遍历
每个智库
data
.
forEach
(
thinkTank
=>
{
const
thinkTankName
=
thinkTank
.
thinkTankName
;
// 遍历
输入数据
inputData
.
forEach
(
item
=>
{
const
thinkTankName
=
item
.
thinkTankName
;
// 添加智库节点
if
(
!
node
Set
.
has
(
thinkTankName
))
{
// 添加智库节点
(如果尚未添加)
if
(
!
node
s
.
some
(
node
=>
node
.
name
===
thinkTankName
))
{
nodes
.
push
({
name
:
thinkTankName
});
nodeSet
.
add
(
thinkTankName
);
}
// 遍历每个资金来源
thinkTank
.
thinkTankDonationSourceVOList
.
forEach
(
source
=>
{
const
{
amount
,
institution
,
secondInstitution
}
=
source
;
// 遍历捐赠来源
item
.
thinkTankDonationSourceVOList
.
forEach
(
donation
=>
{
const
institution
=
donation
.
institution
;
const
secondInstitution
=
donation
.
secondInstitution
;
const
amount
=
donation
.
amount
;
//
处理机构节点
if
(
institution
&&
!
nodeSet
.
has
(
institution
))
{
//
添加捐赠机构节点(如果尚未添加)
if
(
!
nodes
.
some
(
node
=>
node
.
name
===
institution
))
{
nodes
.
push
({
name
:
institution
});
nodeSet
.
add
(
institution
);
}
//
处理二级机构节点
if
(
secondInstitution
&&
!
node
Set
.
has
(
secondInstitution
))
{
//
如果存在二级机构,也添加二级机构节点(如果尚未添加)
if
(
secondInstitution
&&
!
node
s
.
some
(
node
=>
node
.
name
===
secondInstitution
))
{
nodes
.
push
({
name
:
secondInstitution
});
nodeSet
.
add
(
secondInstitution
);
}
// 构建链接
if
(
institution
&&
secondInstitution
)
{
// 情况1: institution → secondInstitution → thinkTankName
// 添加链接
if
(
secondInstitution
)
{
// 如果存在二级机构,先从捐赠机构到二级机构
if
(
institution
!==
secondInstitution
)
{
// 检查自引用
links
.
push
({
source
:
institution
,
target
:
secondInstitution
,
value
:
amount
});
}
// 再从二级机构到智库
if
(
secondInstitution
!==
thinkTankName
)
{
// 检查自引用
links
.
push
({
source
:
secondInstitution
,
target
:
thinkTankName
,
value
:
amount
});
}
else
if
(
institution
&&
!
secondInstitution
)
{
// 情况2: institution → thinkTankName
}
}
else
{
// 如果没有二级机构,直接从捐赠机构到智库
if
(
institution
!==
thinkTankName
)
{
// 检查自引用
links
.
push
({
source
:
institution
,
target
:
thinkTankName
,
value
:
amount
});
}
else
if
(
!
institution
&&
!
secondInstitution
)
{
// 情况3: 只有智库节点
links
.
push
({
source
:
thinkTankName
,
value
:
amount
});
}
}
});
});
console
.
log
(
nodes
,
links
,
'nodes, linksnodes, links'
)
return
{
nodes
,
links
};
}
// 智库资金流向
const
handleGetThinkTankDonation
=
async
()
=>
{
try
{
const
res
=
await
getThinkTankDonation
();
console
.
log
(
"智库资金流向"
,
res
);
console
.
log
(
"智库资金流向"
,
res
.
data
,
transformDataToSankey
(
res
.
data
)
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
box7Data
.
value
=
transform
ThinkTankData
(
res
.
data
);
box7Data
.
value
=
transform
DataToSankey
(
res
.
data
);
}
}
catch
(
error
)
{
console
.
error
(
"获取智库资金流向error"
,
error
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论