Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
雪碧有白泡泡
可视化 csdn 数据
提交
9b22cf7c
可
可视化 csdn 数据
项目概览
雪碧有白泡泡
/
可视化 csdn 数据
与 Fork 源项目一致
Fork自
yma16 / 可视化 csdn 数据
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
可
可视化 csdn 数据
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9b22cf7c
编写于
7月 17, 2023
作者:
6
63f1bb74d2451104dc7d8b9f
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Auto Commit
上级
f01209c9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
58 addition
and
58 deletion
+58
-58
src/components/GameChart.vue
src/components/GameChart.vue
+52
-42
src/components/const.js
src/components/const.js
+6
-16
未找到文件。
src/components/GameChart.vue
浏览文件 @
9b22cf7c
...
...
@@ -10,7 +10,12 @@
</a-button>
</div>
<div
style=
"display:flex"
>
<div
id=
"barChartId"
style=
"flex:1;width:600px;height:900px;margin: 0 auto;border: 1px solid #333;"
></div>
<div
id=
"barChartId"
style=
"flex:1;width:600px;height:900px;border: 1px solid #333;"
>
<div
style=
"width: 100%;font-weight: 600;text-align: center;"
>
{{
state
.
clickCity
}}
</div>
<div
id=
"barChartId"
style=
"width:600px;height:600px;margin: 0 auto;"
>
</div>
</div>
<div
style=
"width: 700px;height:900px;border: 1px solid #333;"
>
<a-table
:scroll=
"
{ x: 600, y: 750 }" :columns="state.columns" :data-source="state.dataSource"
:loading="state.loading" :pagination="state.pagination" bordered style="border-bottom:1px solid #f0f0f0;">
...
...
@@ -52,8 +57,9 @@ const props = defineProps({
const
state
=
reactive
({
title
:
'
python 爬虫赛道 参赛选手所在城市
'
,
clickCity
:
'
全国
'
,
linesCoord
:
[],
focusCity
:
'
深圳
'
,
focusCity
:
'
广东省
'
,
locationGis
:
[],
centerLoction
:
[],
aimPointData
:
[],
...
...
@@ -75,6 +81,7 @@ const state = reactive({
}
})
function
initDataSource
()
{
state
.
clickCity
=
'
全国
'
state
.
dataSource
=
[]
state
.
total
=
0
Object
.
keys
(
gameJson
).
forEach
(
uid
=>
{
...
...
@@ -89,7 +96,7 @@ function initDataSource() {
}
function
filterName
(
name
)
{
console
.
log
(
'
name
'
,
name
)
state
.
clickCity
=
name
state
.
dataSource
=
[]
state
.
total
=
0
Object
.
keys
(
gameJson
).
forEach
(
uid
=>
{
...
...
@@ -113,6 +120,7 @@ function initMap() {
let
itemData
=
chinaJson
.
features
let
length
=
itemData
.
length
state
.
aimPointData
=
[]
state
.
linesCoord
=
[]
for
(
let
loc
=
0
;
loc
<
length
;
++
loc
)
{
let
name
=
itemData
[
loc
].
properties
.
name
state
.
aimPointData
.
push
({
...
...
@@ -129,7 +137,8 @@ function initMap() {
let
number
=
0
let
center
=
itemData
[
loc
].
properties
.
center
Object
.
keys
(
gameJson
).
forEach
(
uid
=>
{
if
(
name
.
includes
(
gameJson
[
uid
].
ip
.
split
(
'
:
'
)[
1
]))
{
const
locName
=
gameJson
[
uid
].
ip
.
split
(
'
:
'
)[
1
]
if
(
name
.
includes
(
locName
)
||
locName
.
includes
(
name
))
{
number
+=
1
}
})
...
...
@@ -138,10 +147,13 @@ function initMap() {
})
// eslint-disable-next-line eqeqeq
if
(
!
name
.
includes
(
state
.
focusCity
))
{
state
.
linesCoord
.
push
([
center
,
state
.
centerLoction
])
if
(
center
&&
state
.
centerLoction
){
state
.
linesCoord
.
push
([
center
,
state
.
centerLoction
])
}
}
// eslint-disable-next-line eqeqeq
if
(
name
&&
name
!==
''
)
{
if
(
name
&&
name
!==
state
.
focusCity
)
{
let
temp
=
{
name
:
`
${
name
}
`
,
value
:
Number
(
number
)
...
...
@@ -209,15 +221,15 @@ function renderEchartBar() {
return
params
.
name
},
// backgroundColor: '#546de5',
//
align: 'center',
//
fontSize: 10,
//
width: (function () {
//
// let n = parseInt(Math.random() * 10)
//
return 110
//
})(),
//
height: 50,
//
shadowColor: 'rgba(0,0,0,.7)',
//
borderRadius: 10
align
:
'
center
'
,
fontSize
:
10
,
width
:
(
function
()
{
// let n = parseInt(Math.random() * 10)
return
110
})(),
height
:
50
,
shadowColor
:
'
rgba(0,0,0,.7)
'
,
borderRadius
:
10
},
zoom
:
1.2
},
...
...
@@ -231,7 +243,7 @@ function renderEchartBar() {
{
type
:
'
effectScatter
'
,
// 渲染显示
zlevel
:
2
,
zlevel
:
3
,
showEffectOn
:
'
render
'
,
data
:
state
.
locationGis
,
// 配置散点的坐标数据
coordinateSystem
:
'
geo
'
,
// 指明散点使用的坐标系统
...
...
@@ -248,32 +260,30 @@ function renderEchartBar() {
// 形状
symbol
:
'
circle
'
},
// // 飞线层
// {
// // name: '贵阳市飞线',
// type: 'lines',
// coordinateSystem: 'geo',
// polyline: true,
// zlevel: 3,
// effect: {
// show: true,
// period: 5,
// trailLength: 0, // 拖尾
// symbol: 'arrow', // 箭头
// color: 'red', // 样式颜色
// symbolSize: 5
// },
// lineStyle: {
// color: '#000',
// width: 2,
// type: 'solid',
// dashOffset: 0
// // cap: butt,
// // join: bevel
// },
// // 飞线层数据
// data: state.linesCoord
// }
// 飞线层
{
// name: '贵阳市飞线',
type
:
'
lines
'
,
coordinateSystem
:
'
geo
'
,
polyline
:
true
,
zlevel
:
3
,
effect
:
{
show
:
true
,
period
:
5
,
trailLength
:
0
,
// 拖尾
symbol
:
'
arrow
'
,
// 箭头
color
:
'
red
'
,
// 样式颜色
symbolSize
:
5
},
lineStyle
:
{
color
:
'
#000
'
,
width
:
2
,
type
:
'
solid
'
,
dashOffset
:
1
},
// 飞线层数据
data
:
state
.
linesCoord
}
],
visualMap
:
{
min
:
0
,
...
...
src/components/const.js
浏览文件 @
9b22cf7c
...
...
@@ -42,32 +42,22 @@ export const tableColumns= [
{
title
:
'
用户id
'
,
dataIndex
:
'
uid
'
,
sorter
:
true
,
sorter
:
(
a
,
b
)
=>
a
.
uid
[
0
].
charCodeAt
()
-
b
.
uid
[
0
].
charCodeAt
()
,
fixed
:
true
},
{
title
:
'
用户昵称
'
,
sorter
:
true
,
dataIndex
:
'
name
'
dataIndex
:
'
name
'
,
sorter
:
(
a
,
b
)
=>
a
.
name
[
0
].
charCodeAt
()
-
b
.
name
[
0
].
charCodeAt
(),
},
{
title
:
'
城市
'
,
sorter
:
true
,
dataIndex
:
'
ip
'
,
sorter
:
(
a
,
b
)
=>
a
.
ip
[
0
].
charCodeAt
()
-
b
.
ip
[
0
].
charCodeAt
(),
filters
:
[
{
text
:
'
深圳市
'
,
value
:
'
深圳市
'
,
},
{
text
:
'
上海市
'
,
value
:
'
上海市
'
,
},
{
text
:
'
北京市
'
,
value
:
'
北京市
'
,
},
{
text
:
'
贵阳市
'
,
value
:
'
贵阳市
'
,
text
:
'
广东省
'
,
value
:
'
广东省
'
,
}
]
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录