Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
d3f0ef39
提交
d3f0ef39
authored
1月 10, 2026
作者:
Vicky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
科技人物观点数据接入
上级
f9bbc15d
全部展开
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
503 行增加
和
70 行删除
+503
-70
technologyFigures.js
src/api/technologyFigures/technologyFigures.js
+29
-1
PersonNewsCard.vue
src/views/technologyFigures/component/PersonNewsCard.vue
+17
-0
PersonTable.vue
src/views/technologyFigures/component/PersonTable.vue
+61
-3
SourceLibrary.vue
src/views/technologyFigures/component/SourceLibrary.vue
+187
-20
TimelineMap.vue
src/views/technologyFigures/component/TimelineMap.vue
+157
-41
speechStance.vue
src/views/technologyFigures/component/speechStance.vue
+52
-5
index.vue
src/views/technologyFigures/index.vue
+0
-0
没有找到文件。
src/api/technologyFigures/technologyFigures.js
浏览文件 @
d3f0ef39
...
@@ -27,6 +27,7 @@ export function getMainCharactersView(params) {
...
@@ -27,6 +27,7 @@ export function getMainCharactersView(params) {
/**
/**
* @param {year}
* @param {year}
* @header token
* @header token
* @areaId
*/
*/
export
function
getCharacterOpinionWordCloud
(
params
)
{
export
function
getCharacterOpinionWordCloud
(
params
)
{
return
request
({
return
request
({
...
@@ -57,7 +58,7 @@ export function getOptionAreaChange(params) {
...
@@ -57,7 +58,7 @@ export function getOptionAreaChange(params) {
export
function
getPersonRelation
(
params
)
{
export
function
getPersonRelation
(
params
)
{
return
request
({
return
request
({
method
:
'GET'
,
method
:
'GET'
,
url
:
`/api/personRemarksOverview/personRelation
/
${
params
.
industryId
}
`
,
url
:
`/api/personRemarksOverview/personRelation`
,
params
,
params
,
})
})
}
}
...
@@ -107,3 +108,29 @@ export function getBillRiskSignal(params) {
...
@@ -107,3 +108,29 @@ export function getBillRiskSignal(params) {
url
:
`/api/commonFeature/riskSignal/
${
params
.
moduleId
}
`
,
url
:
`/api/commonFeature/riskSignal/
${
params
.
moduleId
}
`
,
})
})
}
}
//获取人物类别
export
function
getPersonType
(
params
)
{
return
request
({
method
:
'GET'
,
url
:
`/api/commonDict/personType`
,
params
})
}
// 获取人物全局信息 通过personId 获取personType
export
function
getPersonSummaryInfo
(
params
)
{
return
request
({
method
:
'GET'
,
url
:
`/api/personHomepage/summaryInfo/
${
params
.
personId
}
`
,
})
}
// 获取人物全局信息 通过personId 获取personType
export
function
getareaType
(
params
)
{
return
request
({
method
:
'GET'
,
url
:
`/api/commonDict/areaType`
,
params
})
}
\ No newline at end of file
src/views/technologyFigures/component/PersonNewsCard.vue
浏览文件 @
d3f0ef39
<!-- PersonNewsCard.vue -->
<!-- PersonNewsCard.vue -->
<
template
>
<
template
>
<div
class=
"person-news-card"
>
<div
class=
"person-news-card"
>
<el-carousel
ref=
"carouselRef"
height=
"354px"
:autoplay=
"true"
:interval=
"3000"
arrow=
"never"
indicator-position=
"none"
@
change=
"handleCarouselChange"
>
<!--
<el-carousel-item
v-for=
"(bill, billIndex) in hotBillList"
:key=
"billIndex"
>
-->
<!-- 左侧:头像 -->
<!-- 左侧:头像 -->
<div
class=
"avatar"
>
<div
class=
"avatar"
>
<img
:src=
"person.image_url"
alt=
"人物头像"
/>
<img
:src=
"person.image_url"
alt=
"人物头像"
/>
</div>
</div>
<!-- 事件列表 -->
<!-- 事件列表 -->
...
@@ -67,6 +79,8 @@
...
@@ -67,6 +79,8 @@
</div>
</div>
</div> -->
</div> -->
</div>
</div>
<!-- </el-carousel-item> -->
</el-carousel>
</div>
</div>
</template>
</template>
...
@@ -74,6 +88,9 @@
...
@@ -74,6 +88,9 @@
// 导入数据
// 导入数据
import
data
from
"../json/personUpdates"
;
// 假设你把 JSON 存在 data.json 文件中
import
data
from
"../json/personUpdates"
;
// 假设你把 JSON 存在 data.json 文件中
export
default
{
export
default
{
name
:
"PersonNewsCard"
,
name
:
"PersonNewsCard"
,
data
()
{
data
()
{
...
...
src/views/technologyFigures/component/PersonTable.vue
浏览文件 @
d3f0ef39
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<div
class=
"table-row"
v-for=
"(item, index) in personList"
:key=
"index"
>
<div
class=
"table-row"
v-for=
"(item, index) in personList"
:key=
"index"
>
<!-- 人物信息列 -->
<!-- 人物信息列 -->
<div
class=
"row-col col-person"
>
<div
class=
"row-col col-person"
>
<div
style=
"margin: 7px 12px 7px 24px"
>
<div
style=
"margin: 7px 12px 7px 24px
;
"
>
<img
:src=
"item.avatar"
class=
"avatar"
alt=
"avatar"
/>
<img
:src=
"item.avatar"
class=
"avatar"
alt=
"avatar"
/>
<div
class=
"person-tags"
>
<div
class=
"person-tags"
>
<div
class=
"person-tag-bg"
v-for=
"(tag, tIdx) in item.tags"
:key=
"tIdx"
>
<div
class=
"person-tag-bg"
v-for=
"(tag, tIdx) in item.tags"
:key=
"tIdx"
>
...
@@ -46,10 +46,59 @@
...
@@ -46,10 +46,59 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
"vue"
;
import
{
ref
,
onMounted
,
defineProps
,
watch
}
from
"vue"
;
import
personData
from
"../json/personData.json"
;
// 引入JSON数据
import
personData
from
"../json/personData.json"
;
// 引入JSON数据
import
{
getMainCharactersView
}
from
"@/api/technologyFigures/technologyFigures"
;
const
props
=
defineProps
({
persontypeid
:
{
type
:
String
,
default
:
"004"
},
yearSelect
:{
type
:
String
,
default
:
"2025"
}
});
watch
(()
=>
[
props
.
persontypeid
,
props
.
yearSelect
],
(
val
)
=>
{
handlegetMainCharactersViewFn
();
})
// 获取主要人物涉华观点统计
const
handlegetMainCharactersViewFn
=
async
()
=>
{
const
params
=
{
personTypeId
:
props
.
persontypeid
,
year
:
props
.
yearSelect
};
try
{
personList
.
value
=
[];
const
res
=
await
getMainCharactersView
(
params
);
console
.
log
(
"主要人物涉华观点统计"
,
res
);
if
(
res
.
code
===
200
)
{
personList
.
value
=
res
.
data
.
map
(
item
=>
{
return
{
avatar
:
item
.
personImage
,
name
:
item
.
personName
,
position
:
item
.
positionTitle
,
tags
:
[
"1"
,
"2"
],
chinaRelatedCount
:
item
.
remarksCount
,
mediaQuoteCount
:
item
.
remarksCount
}
});
}
}
catch
(
error
)
{}
};
onMounted
(
async
()
=>
{
handlegetMainCharactersViewFn
();
});
const
personList
=
ref
(
personData
);
const
personList
=
ref
();
// 进度条状态
// 进度条状态
const
getStatus
=
_percent
=>
{
const
getStatus
=
_percent
=>
{
const
percent
=
_percent
;
const
percent
=
_percent
;
...
@@ -106,6 +155,9 @@ const getProgress = count => (count / getMaxCount()) * 100;
...
@@ -106,6 +155,9 @@ const getProgress = count => (count / getMaxCount()) * 100;
/* 表格内容样式 */
/* 表格内容样式 */
.table-body
{
.table-body
{
/* background-color: #fff; */
/* background-color: #fff; */
height
:
300px
;
overflow-y
:
scroll
;
overflow-x
:
hidden
;
}
}
.table-row
{
.table-row
{
...
@@ -148,6 +200,7 @@ const getProgress = count => (count / getMaxCount()) * 100;
...
@@ -148,6 +200,7 @@ const getProgress = count => (count / getMaxCount()) * 100;
.person-info
{
.person-info
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
.person-name
{
.person-name
{
...
@@ -160,6 +213,11 @@ const getProgress = count => (count / getMaxCount()) * 100;
...
@@ -160,6 +213,11 @@ const getProgress = count => (count / getMaxCount()) * 100;
line-height
:
24px
;
line-height
:
24px
;
letter-spacing
:
0px
;
letter-spacing
:
0px
;
text-align
:
left
;
text-align
:
left
;
width
:
200px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
.person-position
{
.person-position
{
...
...
src/views/technologyFigures/component/SourceLibrary.vue
浏览文件 @
d3f0ef39
...
@@ -2,37 +2,42 @@
...
@@ -2,37 +2,42 @@
<
template
>
<
template
>
<div
class=
"source-library-container"
>
<div
class=
"source-library-container"
>
<div
class=
"source-library-grid"
>
<div
class=
"source-library-grid"
>
<div
v-for=
"(item, index) in
sourceLibraryData"
:key=
"index"
class=
"source-library-card
"
>
<div
v-for=
"(item, index) in
PersonResource"
:key=
"index"
class=
"source-library-card"
@
click=
"handleClcikToCharacter(item.id)
"
>
<div
class=
"source-library-avatar-wrapper"
>
<div
class=
"source-library-avatar-wrapper"
>
<img
:src=
"item.avatar"
alt=
""
class=
"source-library-avatar"
/>
<img
:src=
"item.avatar"
alt=
""
class=
"source-library-avatar"
/>
</div>
</div>
<div
class=
"source-library-text-content"
>
<div
class=
"source-library-text-content"
>
<div
style=
"width: 240px"
>
<div
style=
"width: 240px
;height: 120px;display: flex; flex-direction: column;
"
>
<h3
class=
"source-library-name"
>
{{
item
.
name
}}
</h3>
<h3
class=
"source-library-name"
>
{{
item
.
name
}}
</h3>
<p
class=
"source-library-title"
>
{{
item
.
title
}}
</p>
<p
class=
"source-library-title"
>
{{
item
.
title
}}
</p>
<div
class=
"taglist"
>
<p
<p
class=
"source-library-tag"
class=
"source-library-tag"
:style=
"
{
v-for=
"value in item.tag"
background: item.colorArray[2],
:class=
"
{tag1: value.typeId === '001',
color: item.colorArray[0],
tag2: value.typeId === '002',
borderColor: item.colorArray[1]
tag3: value.typeId === '003',
tag4: value.typeId === '004',
tag5: value.typeId === '005',
tag6: value.typeId === '006',
}"
}"
>
>
{{
item
.
tag
}}
{{
value
.
typeName
}}
</p>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"page"
>
<div
class=
"page"
>
<div
class=
"count"
>
共1205项调查
</div>
<div
class=
"count"
>
{{
`共${total
}
项调查`
}}
<
/div
>
<
el
-
pagination
<
el
-
pagination
v-model:current-page=
"currentPa
ge"
@
current
-
change
=
"handleCurrentChan
ge"
:
page
-
size
=
"pageSize"
:
page
-
size
=
"pageSize"
:total=
"total"
:
current
-
page
=
"currentPage"
layout=
"prev, pager, next"
background
background
@
current-change=
"handlePageChange"
layout
=
"prev, pager, next"
:
total
=
"total"
/>
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -41,10 +46,134 @@
...
@@ -41,10 +46,134 @@
<
script
setup
>
<
script
setup
>
// 导入数据(建议使用更具语义的变量名)
// 导入数据(建议使用更具语义的变量名)
import
sourceLibraryData
from
"../json/source.json"
;
import
sourceLibraryData
from
"../json/source.json"
;
import
{
ref
}
from
"vue"
;
import
{
ref
,
onMounted
}
from
"vue"
;
const
total
=
ref
(
1205
);
import
{
useRouter
}
from
"vue-router"
;
const
pageSize
=
ref
(
121
);
import
DefaultIcon1
from
'@/assets/icons/default-icon1.png'
const
currentPage
=
ref
(
5
);
import
DefaultIcon2
from
'@/assets/icons/default-icon2.png'
import
{
getPersonResource
,
getPersonSummaryInfo
}
from
"@/api/technologyFigures/technologyFigures"
;
const
router
=
useRouter
();
const
total
=
ref
(
0
);
const
pageSize
=
ref
(
16
);
const
loading
=
ref
(
false
);
const
abortController
=
ref
(
null
);
const
currentPage
=
ref
(
1
);
const
PersonResource
=
ref
([]);
// 获取人物资源库
const
handlegetPersonResourceFn
=
async
()
=>
{
// 取消上一次未完成的请求
if
(
abortController
.
value
)
{
abortController
.
value
.
abort
();
}
// 创建新的 AbortController
abortController
.
value
=
new
AbortController
();
loading
.
value
=
true
;
const
params
=
{
currentPage
:
currentPage
.
value
-
1
,
// Standard Spring Boot page index is 0-based
pageSize
:
pageSize
.
value
}
;
try
{
const
res
=
await
getPersonResource
(
params
,
abortController
.
value
.
signal
);
console
.
log
(
"人物资源库"
,
res
);
if
(
res
.
code
===
200
)
{
if
(
res
.
data
&&
res
.
data
.
content
)
{
PersonResource
.
value
=
res
.
data
.
content
.
map
(
item
=>
({
id
:
item
.
personId
,
name
:
item
.
personName
,
title
:
item
.
positionTitle
,
tag
:
item
.
personTypeList
,
avatar
:
item
.
personImage
||
DefaultIcon1
}
));
total
.
value
=
res
.
data
.
totalElements
;
}
else
{
PersonResource
.
value
=
[];
total
.
value
=
0
;
}
}
else
{
PersonResource
.
value
=
[];
total
.
value
=
0
;
}
loading
.
value
=
false
;
}
catch
(
error
)
{
if
(
error
.
name
!==
"AbortError"
)
{
console
.
error
(
error
);
loading
.
value
=
false
;
}
}
}
;
// 处理页码改变事件
const
handleCurrentChange
=
page
=>
{
currentPage
.
value
=
page
;
handlegetPersonResourceFn
();
}
;
// 跳转人物主页
const
handleClcikToCharacter
=
async
(
id
)
=>
{
const
personTypeList
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
"personTypeList"
));
let
type
=
0
;
let
personTypeName
=
""
;
const
params
=
{
personId
:
id
}
;
try
{
const
res
=
await
getPersonSummaryInfo
(
params
);
console
.
log
(
"人物全局信息"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
const
arr
=
personTypeList
.
filter
(
item
=>
{
return
item
.
typeId
===
res
.
data
.
personType
;
}
);
console
.
log
(
"arr"
,
arr
);
if
(
arr
&&
arr
.
length
>
0
)
{
personTypeName
=
arr
[
0
].
typeName
;
console
.
log
(
"personTypeName"
,
personTypeName
);
if
(
personTypeName
===
"科技企业领袖"
)
{
type
=
1
;
}
else
if
(
personTypeName
===
"国会议员"
)
{
type
=
2
;
}
else
if
(
personTypeName
===
"智库研究人员"
)
{
type
=
3
;
}
else
{
personTypeName
=
""
;
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
return
;
}
const
route
=
router
.
resolve
({
path
:
"/characterPage"
,
query
:
{
type
:
type
,
// type=1为科技企业领袖,2为国会议员,3为智库研究人员
personId
:
id
}
}
);
window
.
open
(
route
.
href
,
"_blank"
);
}
else
{
personTypeName
=
""
;
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
return
;
}
}
else
{
ElMessage
.
warning
(
"找不到当前人员的类型值!"
);
return
;
}
}
catch
(
error
)
{
}
}
;
onMounted
(
async
()
=>
{
handlegetPersonResourceFn
();
}
);
const
handlePageChange
=
p
=>
{
const
handlePageChange
=
p
=>
{
currentPage
.
value
=
p
;
currentPage
.
value
=
p
;
}
;
}
;
...
@@ -73,6 +202,8 @@ const handlePageChange = p => {
...
@@ -73,6 +202,8 @@ const handlePageChange = p => {
padding
:
20
px
18
px
;
padding
:
20
px
18
px
;
box
-
shadow
:
0
px
0
px
20
px
0
px
rgba
(
25
,
69
,
130
,
0.1
);
box
-
shadow
:
0
px
0
px
20
px
0
px
rgba
(
25
,
69
,
130
,
0.1
);
background
:
rgba
(
255
,
255
,
255
,
1
);
background
:
rgba
(
255
,
255
,
255
,
1
);
cursor
:
pointer
;
}
}
.
source
-
library
-
card
:
hover
{
.
source
-
library
-
card
:
hover
{
...
@@ -116,6 +247,7 @@ const handlePageChange = p => {
...
@@ -116,6 +247,7 @@ const handlePageChange = p => {
.
source
-
library
-
text
-
content
{
.
source
-
library
-
text
-
content
{
width
:
656
px
;
width
:
656
px
;
flex
:
1
;
flex
:
1
;
}
}
.
source
-
library
-
name
{
.
source
-
library
-
name
{
...
@@ -133,7 +265,7 @@ const handlePageChange = p => {
...
@@ -133,7 +265,7 @@ const handlePageChange = p => {
width
:
240
px
;
width
:
240
px
;
height
:
48
px
;
height
:
48
px
;
color
:
rgba
(
59
,
65
,
75
,
1
);
color
:
rgba
(
59
,
65
,
75
,
1
);
margin
:
11px
0
14
px
0
;
margin
:
11
px
0
0
px
0
;
font
-
family
:
Microsoft
YaHei
;
font
-
family
:
Microsoft
YaHei
;
font
-
size
:
16
px
;
font
-
size
:
16
px
;
font
-
weight
:
400
;
font
-
weight
:
400
;
...
@@ -142,6 +274,13 @@ const handlePageChange = p => {
...
@@ -142,6 +274,13 @@ const handlePageChange = p => {
text
-
align
:
left
;
text
-
align
:
left
;
}
}
.
taglist
{
display
:
flex
;
gap
:
10
px
;
margin
-
top
:
auto
;
margin
-
bottom
:
0
px
;
}
.
source
-
library
-
tag
{
.
source
-
library
-
tag
{
/* width: 72px; */
/* width: 72px; */
height
:
22
px
;
height
:
22
px
;
...
@@ -153,10 +292,7 @@ const handlePageChange = p => {
...
@@ -153,10 +292,7 @@ const handlePageChange = p => {
padding
:
1
px
8
px
1
px
8
px
;
padding
:
1
px
8
px
1
px
8
px
;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
border
:
1px
solid
rgba
(
255
,
229
,
143
,
1
);
border
-
radius
:
4
px
;
border
-
radius
:
4
px
;
background
:
rgba
(
255
,
251
,
230
,
1
);
color
:
rgba
(
22
,
119
,
255
,
1
);
margin
:
0
;
margin
:
0
;
font
-
family
:
Microsoft
YaHei
;
font
-
family
:
Microsoft
YaHei
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
...
@@ -166,6 +302,37 @@ const handlePageChange = p => {
...
@@ -166,6 +302,37 @@ const handlePageChange = p => {
text
-
align
:
left
;
text
-
align
:
left
;
}
}
.
tag1
{
border
:
1
px
solid
rgba
(
217
,
247
,
190
,
1
);
background
:
rgba
(
246
,
255
,
237
,
1
);
color
:
rgba
(
82
,
196
,
26
,
1
);
}
.
tag2
{
border
:
1
px
solid
rgba
(
186
,
224
,
255
,
1
);
background
:
rgba
(
230
,
244
,
255
,
1
);
color
:
rgba
(
22
,
119
,
255
,
1
);
}
.
tag3
{
border
:
1
px
solid
rgba
(
135
,
232
,
222
,
1
);
background
:
rgba
(
230
,
255
,
251
,
1
);
color
:
rgba
(
19
,
168
,
168
,
1
);
}
.
tag4
{
border
:
1
px
solid
rgba
(
211
,
173
,
247
,
1
);
background
:
rgba
(
249
,
240
,
255
,
1
);
color
:
rgba
(
114
,
46
,
209
,
1
);
}
.
tag5
{
border
:
1
px
solid
rgba
(
255
,
229
,
143
,
1
);
background
:
rgba
(
255
,
251
,
230
,
1
);
color
:
rgba
(
250
,
173
,
20
,
1
);
}
.
tag6
{
border
:
1
px
solid
rgba
(
255
,
163
,
158
,
1
);
background
:
rgba
(
255
,
241
,
240
,
1
);
color
:
rgba
(
245
,
34
,
45
,
1
);
}
.
page
{
.
page
{
/* width: 1221px; */
/* width: 1221px; */
width
:
1600
px
;
width
:
1600
px
;
...
...
src/views/technologyFigures/component/TimelineMap.vue
浏览文件 @
d3f0ef39
...
@@ -38,54 +38,168 @@
...
@@ -38,54 +38,168 @@
<
script
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
worldJson
from
"@/assets/json/world.json"
;
import
worldJson
from
"@/assets/json/world.json"
;
import
{
getCharacterTrends
}
from
"@/api/technologyFigures/technologyFigures"
import
{
ref
,
onMounted
}
from
"vue"
;
// const props = defineProps({
// peoDate: {
// type: String,
// default:"jinri"
// }
// })
// 获取人物动向
const
CharacterTrends
=
ref
([]);
const
time
=
ref
(
""
);
const
date
=
ref
(
""
);
const
handlegetCharacterTrendsFn
=
async
()
=>
{
const
params
=
{
startTime
:
"2025-01-01"
||
date
.
value
};
try
{
const
res
=
await
getCharacterTrends
(
params
);
console
.
log
(
"人物动向"
,
res
);
if
(
res
.
code
===
200
)
{
CharacterTrends
.
value
=
res
.
data
.
map
(
item
=>
{
return
{
time
:
item
.
newsDate
,
text
:
item
.
newsContent
.
substring
(
0
,
17
),
lon
:
item
.
lon
||
(
Math
.
random
()
*
360
-
180
).
toFixed
(
6
),
//没数据
lat
:
item
.
lat
||
(
Math
.
random
()
*
180
-
90
).
toFixed
(
6
),
//没数据
avatar
:
item
.
imageUrl
};
});
}
}
catch
(
error
)
{}
};
function
getDateDaysAgo
(
days
)
{
// 获取当前日期
const
currentDate
=
new
Date
();
// 计算指定月数之前的日期
const
pastDate
=
new
Date
(
currentDate
);
pastDate
.
setDate
(
currentDate
.
getDate
()
-
days
);
// 减去指定的天数
// 格式化日期为 "YYYY-MM-DD" 的形式
const
year
=
pastDate
.
getFullYear
();
const
month
=
String
(
pastDate
.
getMonth
()
+
1
).
padStart
(
2
,
"0"
);
// 月份从0开始,需要加1
const
day
=
String
(
pastDate
.
getDate
()).
padStart
(
2
,
"0"
);
return
`
${
year
}
-
${
month
}
-
${
day
}
`
;
}
// onMounted(async () => {
// handlegetCharacterTrendsFn();
// })
export
default
{
export
default
{
name
:
"MapAnimation"
,
name
:
"MapAnimation"
,
mounted
()
{
props
:
{
peoDate
:
{
type
:
String
,
default
:
"本周"
}
},
watch
:
{
async
peoDate
(
Val
)
{
time
.
value
=
Val
;
const
days
=
ref
();
if
(
time
.
value
===
"本周"
){
days
.
value
=
7
;
}
else
if
(
time
.
value
===
"今天"
){
days
.
value
=
0
;
}
else
if
(
time
.
value
===
"昨天"
){
days
.
value
=
1
;
}
else
if
(
time
.
value
===
"近三天"
){
days
.
value
=
3
;
}
else
if
(
time
.
value
===
"本月"
){
days
.
value
=
new
Date
().
getDate
()
-
1
;
}
date
.
value
=
getDateDaysAgo
(
days
.
value
);
await
handlegetCharacterTrendsFn
();
this
.
initMap
();
}
},
setup
(
props
)
{
onMounted
(
async
()
=>
{
time
.
value
=
props
.
peoDate
;
const
days
=
ref
();
if
(
time
.
value
===
"本周"
){
days
.
value
=
7
;
}
else
if
(
time
.
value
===
"今天"
){
days
.
value
=
0
;
}
else
if
(
time
.
value
===
"昨天"
){
days
.
value
=
1
;
}
else
if
(
time
.
value
===
"近三天"
){
days
.
value
=
3
;
}
else
if
(
time
.
value
===
"本月"
){
days
.
value
=
new
Date
().
getDate
()
-
1
;
}
date
.
value
=
getDateDaysAgo
(
days
.
value
);
});
},
async
mounted
()
{
await
handlegetCharacterTrendsFn
();
this
.
initMap
();
this
.
initMap
();
},
},
methods
:
{
methods
:
{
initMap
()
{
initMap
()
{
// 注册自定义地图数据
// 注册自定义地图数据
echarts
.
registerMap
(
"China"
,
worldJson
);
echarts
.
registerMap
(
"China"
,
worldJson
);
const
eventsData
=
[
// const eventsData = [
{
// {
time
:
"9月23日"
,
// time: "9月23日",
text
:
"随美国总统特朗普进行国事访问"
,
// text: "随美国总统特朗普进行国事访问",
lon
:
116.46
,
// lon: 116.46,
lat
:
39.92
,
// lat: 39.92,
avatar
:
"/testData/united_states 1 copy.png"
// avatar: "/testData/united_states 1 copy.png"
},
// },
{
// {
time
:
"9月23日"
,
// time: "9月23日",
text
:
"出席中国发展高层论坛2025年年会"
,
// text: "出席中国发展高层论坛2025年年会",
lon
:
116.46
,
// lon: 116.46,
lat
:
39.92
,
// lat: 39.92,
avatar
:
"/testData/united_states 1 copy.png"
// avatar: "/testData/united_states 1 copy.png"
},
// },
{
// {
time
:
"9月23日"
,
// time: "9月23日",
text
:
"与民主党领导人查克·舒默及哈基姆..."
,
// text: "与民主党领导人查克·舒默及哈基姆...",
lon
:
1.46
,
// lon: 1.46,
lat
:
39.92
,
// lat: 39.92,
avatar
:
"/testData/united_states 1 copy.png"
// avatar: "/testData/united_states 1 copy.png"
},
// },
{
// {
time
:
"9月23日"
,
// time: "9月23日",
text
:
"与阿拉伯国家领导人会晤,商讨加..."
,
// text: "与阿拉伯国家领导人会晤,商讨加...",
lon
:
116.46
,
// lon: 116.46,
lat
:
-
44.92
,
// lat: -44.92,
avatar
:
"/testData/united_states 1 copy.png"
// avatar: "/testData/united_states 1 copy.png"
},
// },
{
// {
time
:
"9月23日"
,
// time: "9月23日",
text
:
"对印度进行为期四天的访问,与总理..."
,
// text: "对印度进行为期四天的访问,与总理...",
lon
:
78.1
,
// lon: 78.1,
lat
:
20.7
,
// lat: 20.7,
avatar
:
"/testData/united_states 1 copy.png"
// avatar: "/testData/united_states 1 copy.png"
}
// }
];
// ];
const
eventsData
=
CharacterTrends
;
const
chart
=
echarts
.
init
(
this
.
$refs
.
map
);
const
chart
=
echarts
.
init
(
this
.
$refs
.
map
);
const
option
=
{
const
option
=
{
grid
:
{
grid
:
{
left
:
"10%"
,
left
:
"10%"
,
...
@@ -114,7 +228,7 @@ export default {
...
@@ -114,7 +228,7 @@ export default {
name
:
"行程"
,
name
:
"行程"
,
type
:
"effectScatter"
,
type
:
"effectScatter"
,
coordinateSystem
:
"geo"
,
coordinateSystem
:
"geo"
,
data
:
eventsData
.
map
(
item
=>
({
data
:
eventsData
.
value
.
map
(
item
=>
({
value
:
[
item
.
lon
,
item
.
lat
],
value
:
[
item
.
lon
,
item
.
lat
],
time
:
item
.
time
,
time
:
item
.
time
,
text
:
item
.
text
,
text
:
item
.
text
,
...
@@ -149,6 +263,7 @@ export default {
...
@@ -149,6 +263,7 @@ export default {
};
};
chart
.
setOption
(
option
);
chart
.
setOption
(
option
);
// 添加 graphic 元素并设置其位置
// 添加 graphic 元素并设置其位置
this
.
updateGraphics
(
chart
,
eventsData
);
this
.
updateGraphics
(
chart
,
eventsData
);
...
@@ -224,7 +339,7 @@ export default {
...
@@ -224,7 +339,7 @@ export default {
chart2
.
setOption
(
option2
);
chart2
.
setOption
(
option2
);
},
},
updateGraphics
(
chart
,
eventsData
)
{
updateGraphics
(
chart
,
eventsData
)
{
const
graphics
=
eventsData
.
map
((
event
,
index
)
=>
{
const
graphics
=
eventsData
.
value
.
map
((
event
,
index
)
=>
{
const
position
=
chart
.
convertToPixel
({
geoIndex
:
0
},
[
event
.
lon
,
event
.
lat
]);
const
position
=
chart
.
convertToPixel
({
geoIndex
:
0
},
[
event
.
lon
,
event
.
lat
]);
return
{
return
{
type
:
'group'
,
type
:
'group'
,
...
@@ -267,7 +382,8 @@ export default {
...
@@ -267,7 +382,8 @@ export default {
fontSize
:
16
,
fontSize
:
16
,
fontWeight
:
'400'
,
fontWeight
:
'400'
,
fill
:
'rgba(59, 65, 75, 1)'
,
// 文字颜色(ECharts 中用 fill,不是 color)
fill
:
'rgba(59, 65, 75, 1)'
,
// 文字颜色(ECharts 中用 fill,不是 color)
textAlign
:
'left'
textAlign
:
'left'
,
}
}
}
}
]
]
...
...
src/views/technologyFigures/component/speechStance.vue
浏览文件 @
d3f0ef39
...
@@ -2,18 +2,19 @@
...
@@ -2,18 +2,19 @@
<
template
>
<
template
>
<div
class=
"speech-stance-container"
>
<div
class=
"speech-stance-container"
>
<div
class=
"speech-stance-grid"
>
<div
class=
"speech-stance-grid"
>
<div
v-for=
"(item, index) in
speechStance
"
:key=
"index"
class=
"speech-stance-card"
>
<div
v-for=
"(item, index) in
PersonRelation
"
:key=
"index"
class=
"speech-stance-card"
>
<div
class=
"speech-stance-avatar-wrapper"
>
<div
class=
"speech-stance-avatar-wrapper"
>
<img
:src=
"item.
avatar
"
alt=
""
class=
"speech-stance-avatar"
/>
<img
:src=
"item.
personImage
"
alt=
""
class=
"speech-stance-avatar"
/>
</div>
</div>
<div
class=
"speech-stance-text-content"
>
<div
class=
"speech-stance-text-content"
>
<div
style=
"display: flex; width: 683px;"
>
<div
style=
"display: flex; width: 683px;"
>
<h3
class=
"speech-stance-name"
>
{{
item
.
n
ame
}}
</h3>
<h3
class=
"speech-stance-name"
>
{{
item
.
personN
ame
}}
</h3>
<p
class=
"speech-stance-title"
>
{{
item
.
t
itle
}}
</p>
<p
class=
"speech-stance-title"
>
{{
item
.
positionT
itle
}}
</p>
</div>
</div>
<p
class=
"speech-stance-content"
>
{{
item
.
content
}}
</p>
<p
class=
"speech-stance-content"
>
{{
item
.
remarks
}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -21,7 +22,53 @@
...
@@ -21,7 +22,53 @@
<
script
setup
>
<
script
setup
>
// 导入数据
// 导入数据
import
{
onMounted
,
ref
,
defineProps
,
watch
}
from
"vue"
;
import
speechStance
from
'../json/speechStance.json'
;
import
speechStance
from
'../json/speechStance.json'
;
import
{
getPersonRelation
}
from
"@/api/technologyFigures/technologyFigures"
const
props
=
defineProps
({
fieldSelected
:
{
type
:
String
,
default
:
"全部领域"
},
areaId
:
{
type
:
String
,
default
:
0
}
});
const
aId
=
ref
();
const
params
=
ref
({});
watch
(()
=>
props
.
fieldSelected
,
(
val
)
=>
{
aId
.
value
=
props
.
areaId
;
if
(
val
!==
"全部领域"
){
params
.
value
.
industryId
=
aId
.
value
;
}
else
{
params
.
value
=
{};
}
handlegetPersonRelationFn
();
})
// 获取重要人物言论及立场
const
PersonRelation
=
ref
([]);
const
handlegetPersonRelationFn
=
async
()
=>
{
try
{
const
res
=
await
getPersonRelation
(
params
.
value
);
console
.
log
(
"重要人物言论及立场"
,
res
);
if
(
res
.
code
===
200
)
{
PersonRelation
.
value
=
res
.
data
;
}
}
catch
(
error
)
{}
};
onMounted
(
async
()
=>
{
handlegetPersonRelationFn
();
});
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/technologyFigures/index.vue
浏览文件 @
d3f0ef39
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论