Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
84abdc2b
提交
84abdc2b
authored
12月 26, 2025
作者:
Vicky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
人物页面接口
上级
a6dd260f
全部展开
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
100 行增加
和
3 行删除
+100
-3
index.vue
...ts/techLeader/components/characterRelationships/index.vue
+97
-2
index.vue
src/views/characterPage/components/techLeader/index.vue
+0
-0
index.vue
src/views/characterPage/index.vue
+3
-1
没有找到文件。
src/views/characterPage/components/techLeader/components/characterRelationships/index.vue
浏览文件 @
84abdc2b
...
...
@@ -21,6 +21,7 @@
<
script
setup
>
import
{
ref
,
onMounted
,
onBeforeUnmount
,
watch
}
from
"vue"
;
import
*
as
echarts
from
"echarts"
;
import
{
getCharacterGlobalInfo
,
getCharacterRelation
}
from
"@/api/characterPage/characterPage.js"
;
import
Center
from
"./assets/img1.png"
;
import
P1
from
"./assets/img2.png"
;
import
P2
from
"./assets/img3.png"
;
...
...
@@ -35,8 +36,10 @@ import P10 from "./assets/img11.png";
import
P11
from
"./assets/img12.png"
;
import
PS
from
"./assets/img13.png"
;
const
list
=
ref
([
"圆形布局"
,
"力导向布局"
,
"树形布局"
]);
const
activeIndex
=
ref
(
"圆形布局"
);
// 人物全局信息
const
characterInfo
=
ref
({});
// 人物关系
const
CharacterRelation
=
ref
({});
const
nodes
=
[
{
...
...
@@ -75,6 +78,98 @@ const nodes = [
{
id
:
"n3"
,
name
:
"格温・肖特韦尔"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P3
}
`
,
r
:
80
}
];
const
getCharacterGlobalInfoFn
=
async
()
=>
{
const
params
=
{
personId
:
window
.
sessionStorage
.
getItem
(
"personId"
)
||
"Y000064"
};
try
{
const
res
=
await
getCharacterGlobalInfo
(
params
);
if
(
res
.
code
===
200
)
{
console
.
log
(
"人物全局信息"
,
res
);
if
(
res
.
data
)
{
characterInfo
.
value
=
res
.
data
;
}
}
const
res1
=
await
getCharacterRelation
(
params
);
if
(
res1
.
code
===
200
)
{
console
.
log
(
"人物关系"
,
res1
);
if
(
res1
.
data
)
{
CharacterRelation
.
value
=
res1
.
data
;
}
}
nodes
=
[
{
id
:
"c"
,
name
:
characterInfo
.
value
.
name
,
category
:
0
,
symbolSize
:
80
,
symbol
:
`image://
${
characterInfo
.
value
.
imageUrl
}
`
,
label
:
{
show
:
true
,
position
:
"bottom"
,
formatter
:
"{n|埃隆·马斯克}"
,
rich
:
{
n
:
{
color
:
"rgba(5,95,194,1)"
,
fontSize
:
24
,
fontWeight
:
700
,
fontFamily
:
"Microsoft YaHei"
,
lineHeight
:
36
}
}
}
},
// 从三点钟方向顺时针排序
{
id
:
"n11"
,
name
:
"贾斯汀・马斯克"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P11
}
`
},
{
id
:
"n7"
,
name
:
"杰弗里·凯斯勒"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P7
}
`
,
r
:
80
},
{
id
:
"n6"
,
name
:
"斯科特·贝森特"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P6
}
`
},
{
id
:
"n9"
,
name
:
"道格·伯格姆"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P9
}
`
},
{
id
:
"n12"
,
name
:
"史蒂夫・尤尔韦松"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
PS
}
`
},
{
id
:
"n5"
,
name
:
"拉里・埃里森"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P5
}
`
,
r
:
80
},
{
id
:
"n8"
,
name
:
"马尔科·卢比奥"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P8
}
`
},
{
id
:
"n10"
,
name
:
"艾拉・埃伦普里斯"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P10
}
`
,
r
:
80
},
{
id
:
"n2"
,
name
:
"詹姆斯・默多克"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P2
}
`
},
{
id
:
"n1"
,
name
:
"唐纳德・特朗普"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P1
}
`
},
{
id
:
"n4"
,
name
:
"金博尔・马斯克"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P4
}
`
},
{
id
:
"n3"
,
name
:
"格温・肖特韦尔"
,
category
:
1
,
symbolSize
:
80
,
symbol
:
`image://
${
P3
}
`
,
r
:
80
}
];
}
catch
(
error
){
}
};
const
getCharacterRelationFn
=
async
()
=>
{
const
params
=
{
personId
:
window
.
sessionStorage
.
getItem
(
"personId"
)
||
"Y000064"
};
try
{
const
res
=
await
getCharacterRelation
(
params
);
if
(
res
.
code
===
200
)
{
console
.
log
(
"人物关系"
,
res
);
if
(
res
.
data
)
{
CharacterRelation
.
value
=
res
.
data
;
}
}
}
catch
(
error
){
}
};
onMounted
(()
=>
{
getCharacterRelationFn
();
getCharacterGlobalInfoFn
();
});
const
list
=
ref
([
"圆形布局"
,
"力导向布局"
,
"树形布局"
]);
const
activeIndex
=
ref
(
"圆形布局"
);
const
links
=
[
{
source
:
"n11"
,
target
:
"c"
,
label
:
{
show
:
true
,
formatter
:
"第一任妻子"
}
},
{
source
:
"n7"
,
target
:
"c"
,
label
:
{
show
:
true
,
formatter
:
"风险投资家"
}
},
...
...
src/views/characterPage/components/techLeader/index.vue
浏览文件 @
84abdc2b
差异被折叠。
点击展开。
src/views/characterPage/index.vue
浏览文件 @
84abdc2b
...
...
@@ -4,7 +4,7 @@
<!-- 主要内容 -->
<div
class=
"main"
>
<!-- 科技领袖 -->
<tech-leader
v-if=
"type == 1"
/>
<tech-leader
v-if=
"type == 1"
/>
<!-- 国会议员 -->
<member-of-congress
v-if=
"type == 2"
/>
<!-- 智库研究人员 -->
...
...
@@ -23,6 +23,8 @@ import ThinkTankPerson from './components/thinkTankPerson/index.vue';
// 获取路由参数,1为科技领袖,2为国会议员,3为智库研究人员
const
route
=
useRoute
();
const
type
=
ref
(
route
.
query
.
type
||
1
);
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论