Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supervise-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
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
牛晓林
supervise-front
Commits
75be738c
Commit
75be738c
authored
Aug 05, 2019
by
niuxiaolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latest
parent
5ecc78f4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
16 deletions
+26
-16
package.json
package.json
+1
-1
main.component.html
src/app/main/main.component.html
+2
-2
main.component.less
src/app/main/main.component.less
+2
-2
mapv.js
src/assets/mapv.js
+13
-9
getscript.js
src/getscript.js
+1
-0
styles.less
src/styles.less
+7
-2
No files found.
package.json
View file @
75be738c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"version"
:
"0.0.0"
,
"version"
:
"0.0.0"
,
"scripts"
:
{
"scripts"
:
{
"ng"
:
"ng"
,
"ng"
:
"ng"
,
"start"
:
"ng serve --port
4321
--proxy--config proxy.json"
,
"start"
:
"ng serve --port
8008
--proxy--config proxy.json"
,
"build"
:
"ng build --prod --build-optimizer && npm run remove-to && npm run create && npm run copy-to "
,
"build"
:
"ng build --prod --build-optimizer && npm run remove-to && npm run create && npm run copy-to "
,
"remove-to"
:
"rd /s /q D:
\\
projects
\\
supervise
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
"remove-to"
:
"rd /s /q D:
\\
projects
\\
supervise
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
"create"
:
"mkdir D:
\\
projects
\\
supervise
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
"create"
:
"mkdir D:
\\
projects
\\
supervise
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
...
...
src/app/main/main.component.html
View file @
75be738c
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<div
class=
"main"
>
<div
class=
"main"
>
<div
class=
"left"
>
<div
class=
"left"
>
<fieldset>
<fieldset>
<legend
(
click
)="
toHighWay
()"
>
高速公路
:
</legend>
<legend
(
click
)="
toHighWay
()"
>
高速公路
</legend>
<div
class=
"proj-info"
*
ngIf=
"!highShow"
>
<div
class=
"proj-info"
*
ngIf=
"!highShow"
>
<label>
<label>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</fieldset>
</fieldset>
<fieldset>
<fieldset>
<legend>
普通干线
:
</legend>
<legend>
普通干线
</legend>
<div
class=
"proj-info"
*
ngIf=
"!normalShow"
>
<div
class=
"proj-info"
*
ngIf=
"!normalShow"
>
<label>
<label>
...
...
src/app/main/main.component.less
View file @
75be738c
...
@@ -88,7 +88,7 @@ baidu-map{
...
@@ -88,7 +88,7 @@ baidu-map{
box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #4a83b4, 0 0 35px #4a83b4, 0 0 40px #4a83b4, 0 0 50px #4a83b4, 0 0 75px #4a83b4;
box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #4a83b4, 0 0 35px #4a83b4, 0 0 40px #4a83b4, 0 0 50px #4a83b4, 0 0 75px #4a83b4;
border-radius: 14px;
border-radius: 14px;
margin-bottom: 1.
5
em;
margin-bottom: 1.
3
em;
cursor: pointer;
cursor: pointer;
width: 63px;
width: 63px;
}
}
...
@@ -129,7 +129,7 @@ fieldset{
...
@@ -129,7 +129,7 @@ fieldset{
padding: 0.5em;
padding: 0.5em;
background: #c1d9ef;
background: #c1d9ef;
font-weight: bolder;
font-weight: bolder;
font-size:
larger
;
font-size:
19px
;
border-radius: 8px;
border-radius: 8px;
&:hover{
&:hover{
background: #00daff33;
background: #00daff33;
...
...
src/assets/mapv.js
View file @
75be738c
...
@@ -481,11 +481,14 @@
...
@@ -481,11 +481,14 @@
var
pathSimple
=
{
var
pathSimple
=
{
//@author xiaolin 动线效果添加
render
:
function
(
points
,
context
)
{
render
:
function
(
points
,
cordId
,
context
)
{
console
.
log
(
points
)
if
(
window
[
cordId
]){
clearTimeout
(
window
[
cordId
]);
}
var
index
=
1
;
var
index
=
1
;
var
step
=
2
;
var
step
=
0.5
;
var
current
=
Object
.
assign
({},
points
[
0
]);
var
current
=
Object
.
assign
({},
points
[
0
]);
var
movStart
=
Object
.
assign
({},
points
[
0
]);
var
movStart
=
Object
.
assign
({},
points
[
0
]);
var
next
=
points
[
index
];
var
next
=
points
[
index
];
...
@@ -516,7 +519,7 @@
...
@@ -516,7 +519,7 @@
context
.
moveTo
(
moveStart
.
x
,
moveStart
.
y
);
context
.
moveTo
(
moveStart
.
x
,
moveStart
.
y
);
context
.
strokeStyle
=
'#fff'
;
context
.
strokeStyle
=
'#fff'
;
context
.
fillStyle
=
'#fff'
;
context
.
fillStyle
=
'#fff'
;
context
.
lineWidth
=
5
;
context
.
lineWidth
=
3
;
context
.
lineTo
(
current
.
x
,
current
.
y
);
context
.
lineTo
(
current
.
x
,
current
.
y
);
//context.fillStyle = 'rgba(7,120,249,1)';
//context.fillStyle = 'rgba(7,120,249,1)';
// context.fill();
// context.fill();
...
@@ -547,7 +550,7 @@
...
@@ -547,7 +550,7 @@
next
=
points
[
index
];
next
=
points
[
index
];
}
}
// console.log(Math.sqrt(Math.pow((current.x - next.x), 2) + Math.pow((current.y - next.y), 2)))
// console.log(Math.sqrt(Math.pow((current.x - next.x), 2) + Math.pow((current.y - next.y), 2)))
if
(
Math
.
sqrt
(
Math
.
pow
((
current
.
x
-
next
.
x
),
2
)
+
Math
.
pow
((
current
.
y
-
next
.
y
),
2
))
>
1
)
{
if
(
Math
.
sqrt
(
Math
.
pow
((
current
.
x
-
next
.
x
),
2
)
+
Math
.
pow
((
current
.
y
-
next
.
y
),
2
))
>
0.5
)
{
drawLine
(
movStart
,
current
);
drawLine
(
movStart
,
current
);
current
.
x
+=
getStep
(
movStart
,
next
).
stepx
;
current
.
x
+=
getStep
(
movStart
,
next
).
stepx
;
current
.
y
+=
getStep
(
movStart
,
next
).
stepy
;
current
.
y
+=
getStep
(
movStart
,
next
).
stepy
;
...
@@ -557,7 +560,7 @@
...
@@ -557,7 +560,7 @@
movStart
=
Object
.
assign
({},
points
[
index
-
1
])
;
movStart
=
Object
.
assign
({},
points
[
index
-
1
])
;
current
=
Object
.
assign
({},
movStart
)
;
current
=
Object
.
assign
({},
movStart
)
;
}
}
setTimeout
(
renderBody
,
1
);
window
[
cordId
]
=
setTimeout
(
renderBody
,
1
);
}
}
renderBody
();
renderBody
();
...
@@ -575,6 +578,7 @@
...
@@ -575,6 +578,7 @@
},
},
draw
:
function
draw
(
context
,
data
,
options
)
{
draw
:
function
draw
(
context
,
data
,
options
)
{
var
type
=
data
.
geometry
.
type
;
var
type
=
data
.
geometry
.
type
;
var
cordId
=
data
.
geometry
.
coordinates
[
0
][
0
]
+
":"
+
data
.
geometry
.
coordinates
[
data
.
geometry
.
coordinates
.
length
-
1
][
1
]
var
coordinates
=
data
.
geometry
.
_coordinates
||
data
.
geometry
.
coordinates
;
var
coordinates
=
data
.
geometry
.
_coordinates
||
data
.
geometry
.
coordinates
;
var
symbol
=
options
.
symbol
||
'circle'
;
var
symbol
=
options
.
symbol
||
'circle'
;
switch
(
type
)
{
switch
(
type
)
{
...
@@ -608,8 +612,8 @@
...
@@ -608,8 +612,8 @@
break
;
break
;
case
'LineString'
:
case
'LineString'
:
this
.
render
(
coordinates
.
map
(
c
=>
({
x
:
c
[
0
],
y
:
c
[
1
],
r
:
20
})),
context
);
this
.
render
(
coordinates
.
map
(
c
=>
({
x
:
c
[
0
],
y
:
c
[
1
],
r
:
20
})),
cordId
,
context
);
// for (var j = 0; j < coordinates.length; j++) {
// for (var j = 0; j < coordinates.length; j++) {
// var x = coordinates[j][0];
// var x = coordinates[j][0];
...
...
src/getscript.js
View file @
75be738c
...
@@ -3179,6 +3179,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
...
@@ -3179,6 +3179,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
return
c
return
c
}
}
;
function
pa
(
a
,
b
)
{
;
function
pa
(
a
,
b
)
{
if
(
/^http/
.
test
(
a
))
return
;
//修改 屏蔽ak验证,若调用外部资源直接返回
if
(
b
)
{
if
(
b
)
{
var
c
=
(
1
E5
*
Math
.
random
()).
toFixed
(
0
);
var
c
=
(
1
E5
*
Math
.
random
()).
toFixed
(
0
);
D
.
_rd
[
"_cbk"
+
c
]
=
function
(
a
)
{
D
.
_rd
[
"_cbk"
+
c
]
=
function
(
a
)
{
...
...
src/styles.less
View file @
75be738c
...
@@ -44,8 +44,11 @@
...
@@ -44,8 +44,11 @@
background:transparent!important;
background:transparent!important;
}
}
.label-panel{
.label-panel{
padding:4px;
padding: 4px;
font-size: 16px;
font-size: 16px;
background: #2f5aa51f;
border-radius: 4px;
border: 1px solid wheat;
}
}
.label-panel2{
.label-panel2{
display: inline;
display: inline;
...
@@ -271,4 +274,5 @@ legend{
...
@@ -271,4 +274,5 @@ legend{
}
}
.tooltiptextx{
.tooltiptextx{
color:white;
color:white;
font-size:15px;
}
}
\ No newline at end of file
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