Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-pc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
融通安全管理系统
rongtong-pc
Commits
942d5723
Commit
942d5723
authored
Sep 13, 2023
by
p-wanping.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉大屏点
parent
67f6737b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
134 additions
and
32 deletions
+134
-32
src/assets/map/accident.png
src/assets/map/accident.png
+0
-0
src/views/map/components/map-item-container.vue
src/views/map/components/map-item-container.vue
+1
-0
src/views/map/components/map-item-pie.vue
src/views/map/components/map-item-pie.vue
+2
-2
src/views/map/components/map-table.vue
src/views/map/components/map-table.vue
+1
-1
src/views/map/map-index.vue
src/views/map/map-index.vue
+130
-29
No files found.
src/assets/map/accident.png
0 → 100644
View file @
942d5723
6.06 KB
src/views/map/components/map-item-container.vue
View file @
942d5723
...
...
@@ -31,6 +31,7 @@ export default {
height
:
40px
;
background-image
:
url("../../../assets/map/title.png")
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
font-size
:
19px
;
color
:
#fff
;
padding-left
:
64px
;
...
...
src/views/map/components/map-item-pie.vue
View file @
942d5723
...
...
@@ -312,10 +312,10 @@ export default {
},
textStyle
:
{
color
:
"
#fff
"
,
fontSize
:
1
6
,
fontSize
:
1
0
,
},
rich
:
{
align
:
"
center
"
,
align
:
"
right
"
,
text
:
{
fontSize
:
14
,
color
:
"
#fff
"
,
...
...
src/views/map/components/map-table.vue
View file @
942d5723
...
...
@@ -80,7 +80,7 @@ export default {
height
:
100%
;
overflow
:
hidden
;
&
-box
{
height
:
100%
;
height
:
calc
(
100%
-
20px
)
;
overflow
:
auto
;
}
}
...
...
src/views/map/map-index.vue
View file @
942d5723
...
...
@@ -35,15 +35,15 @@
<echartMap
/>
</map-item-container>
<map-item-container
title=
"事故类型统计"
>
<div
style=
"columns: 4"
>
<div
style=
"columns: 4"
class=
"echarts-accident"
>
<div
v-for=
"
item in 10
"
v-for=
"
(item, index) in accidentList
"
:key=
"item"
:style=
"randomCircle()"
:style=
"randomCircle(
item, index
)"
class=
"map-circle-item"
>
<div>
物体打击
</div>
<div>
1455
</div>
<div>
{{
item
.
name
}}
</div>
<div>
{{
item
.
value
}}
</div>
</div>
</div>
</map-item-container>
...
...
@@ -69,15 +69,76 @@ export default {
},
data
()
{
return
{
accidentList
:
[
{
name
:
"
物体打击
"
,
value
:
1455
,
width
:
100
,
top
:
17
,
left
:
100
,
},
{
name
:
"
物体打击
"
,
value
:
1455
,
width
:
60
,
top
:
118
,
left
:
150
,
},
{
name
:
"
物体打击
"
,
value
:
1455
,
width
:
60
,
top
:
40
,
left
:
22
,
},
// {
// name: "物体打击",
// value: 1455,
// width: 60,
// top: 162,
// left: 96,
// },
{
name
:
"
物体打击
"
,
value
:
1455
,
width
:
60
,
top
:
110
,
left
:
38
,
},
{
name
:
"
物体
"
,
value
:
1455
,
width
:
50
,
top
:
140
,
left
:
100
,
},
{
name
:
"
物体打击
"
,
value
:
1455
,
width
:
60
,
top
:
60
,
left
:
230
,
},
{
name
:
"
其他
"
,
value
:
1455
,
width
:
40
,
top
:
140
,
left
:
220
,
},
],
name
:
100000
,
myMap
:
null
,
mapData
:
[],
myTopLeft
:
[],
tableList
:
[],
level
:
""
,
circlePos
:
[],
};
},
mounted
()
{
this
.
circlePos
=
this
.
generateRandomPointsInCircle
(
10
);
console
.
log
(
this
.
circlePos
);
this
.
myMap
=
echarts
.
init
(
this
.
$refs
.
myEchart
);
this
.
initMap
();
this
.
initListeners
();
...
...
@@ -108,17 +169,43 @@ export default {
});
}
},
randomCircle
()
{
generateRandomPointsInCircle
(
numPoints
)
{
var
points
=
[];
const
center
=
[
100
,
80
];
const
radius
=
65
;
// var angleIncrement = (2 * Math.PI) / numPoints;
for
(
var
i
=
0
;
i
<
numPoints
;
i
++
)
{
var
angle
=
Math
.
random
()
*
2
*
Math
.
PI
;
var
x
=
center
[
0
]
+
radius
*
Math
.
cos
(
angle
);
var
y
=
center
[
1
]
+
radius
*
Math
.
sin
(
angle
);
points
.
push
([
x
,
y
]);
}
return
points
;
},
randomCircle
(
item
,
index
)
{
const
w
=
parseInt
(
Math
.
random
()
*
40
+
50
);
let
r
=
Math
.
floor
(
Math
.
random
()
*
256
);
//0-255.999999
let
g
=
Math
.
floor
(
Math
.
random
()
*
256
);
let
b
=
Math
.
floor
(
Math
.
random
()
*
256
);
// let r = Math.floor(Math.random() * 256); //0-255.999999
// let g = Math.floor(Math.random() * 256);
// let b = Math.floor(Math.random() * 256);
var
brightness
=
100
;
// 设置亮度
var
r
=
Math
.
floor
(
Math
.
random
()
*
(
256
-
brightness
)
+
brightness
);
var
g
=
Math
.
floor
(
Math
.
random
()
*
(
256
-
brightness
)
+
brightness
);
var
b
=
Math
.
floor
(
Math
.
random
()
*
(
256
-
brightness
)
+
brightness
);
console
.
log
(
this
.
circlePos
[
index
]);
if
(
this
.
circlePos
.
length
)
{
return
{
width
:
w
+
"
px
"
,
height
:
w
+
"
px
"
,
width
:
item
.
width
+
"
px
"
,
height
:
item
.
width
+
"
px
"
,
backgroundColor
:
`rgba(
${
r
}
,
${
g
}
,
${
b
}
,0.4)`
,
color
:
`rgb(
${
r
}
,
${
g
}
,
${
b
}
)`
,
position
:
"
absolute
"
,
left
:
item
.
left
+
"
px
"
,
top
:
item
.
top
+
"
px
"
,
};
}
},
initMap
(
code
=
100000
)
{
if
(
code
!=
this
.
name
)
{
...
...
@@ -194,13 +281,13 @@ export default {
},
data
:
regions
,
},
{
type
:
"
scatter3D
"
,
coordinateSystem
:
"
geo3D
"
,
symbolSize
:
20
,
data
:
regions
,
zlevel
:
1
,
},
//
{
//
type: "scatter3D",
//
coordinateSystem: "geo3D",
//
symbolSize: 20,
//
data: regions,
//
zlevel: 1,
//
},
],
},
{
...
...
@@ -394,8 +481,8 @@ export default {
},
},
grid3D
:
{
boxWidth
:
2
0
0
,
boxHeight
:
1
0
0
,
boxWidth
:
2
3
0
,
boxHeight
:
1
2
0
,
boxDepth
:
90
,
viewControl
:
{
alpha
:
0
,
...
...
@@ -551,14 +638,18 @@ export default {
flex-direction
:
column
;
font-size
:
14px
;
}
.map-circle-item
:nth-of-type
(
2n
+
1
)
{
animation
:
circleAnimation
1
.8s
infinite
;
}
.map-circle-item
:nth-of-type
(
2n
)
{
animation
:
circleAnimation
1
s
infinite
;
animation
:
circleAnimation
2
s
infinite
;
}
.map-circle-item
:nth-of-type
(
2n
+
1
)
{
animation
:
circleAnimation
1
.3
s
infinite
;
.map-circle-item
:nth-of-type
(
1
)
{
animation
:
circleAnimation
2
.5
s
infinite
;
}
.map-circle-item
:last-child
{
animation
:
circleAnimation
1
.
6
s
infinite
;
animation
:
circleAnimation
1
.
2
s
infinite
;
}
@keyframes
circleAnimation
{
...
...
@@ -627,11 +718,21 @@ export default {
}
}
.map-index
{
width
:
98%
;
margin
:
0
auto
;
.map-content-item
{
height
:
34%
;
}
}
::v-deep
.map-content-title
{
background-size
:
100%
100%
;
// background-size: 100% 100%;
}
.echarts-accident
{
width
:
90%
;
height
:
90%
;
margin
:
0
auto
;
background
:
url("../../assets/map/accident.png")
center
bottom
no-repeat
;
background-size
:
100%
;
position
:
relative
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment