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
5ca763d3
Commit
5ca763d3
authored
Jul 29, 2019
by
niuxiaolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latet
parent
31e4f790
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
default.service.ts
src/app/api/api/default.service.ts
+1
-1
main.component.ts
src/app/main/main.component.ts
+10
-8
video.component.html
src/app/video/video.component.html
+1
-1
No files found.
src/app/api/api/default.service.ts
View file @
5ca763d3
...
@@ -42,7 +42,7 @@ import { Observable } from 'rxjs';
...
@@ -42,7 +42,7 @@ import { Observable } from 'rxjs';
export
class
DefaultService
{
export
class
DefaultService
{
public
basePath
=
'http://localhost:8081'
;
public
basePath
=
'http://localhost:8081'
;
//
public basePath = 'http://192.168.19.200:8081';
//
public basePath = 'http://192.168.19.200:8081';
public
defaultHeaders
=
new
HttpHeaders
();
public
defaultHeaders
=
new
HttpHeaders
();
public
configuration
=
new
Configuration
();
public
configuration
=
new
Configuration
();
...
...
src/app/main/main.component.ts
View file @
5ca763d3
...
@@ -145,7 +145,7 @@ export class MainComponent implements OnInit {
...
@@ -145,7 +145,7 @@ export class MainComponent implements OnInit {
this
.
courses
=
res
.
data
;
this
.
courses
=
res
.
data
;
//加载全局线路
//加载全局线路
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
loadPolys
(
res
);
this
.
loadPolys
(
res
,
false
);
},
5000
);
},
5000
);
});
});
this
.
http
.
get
<
any
>
(
this
.
s
.
basePath
+
"/scetion/list"
).
subscribe
(
res
=>
{
this
.
http
.
get
<
any
>
(
this
.
s
.
basePath
+
"/scetion/list"
).
subscribe
(
res
=>
{
...
@@ -172,18 +172,20 @@ export class MainComponent implements OnInit {
...
@@ -172,18 +172,20 @@ export class MainComponent implements OnInit {
///map.clearOverlays();
///map.clearOverlays();
this
.
http
.
get
<
any
>
(
this
.
s
.
basePath
+
`/project/list/
${
markType
.
HIGHWAY
}
`
).
subscribe
(
res
=>
{
this
.
http
.
get
<
any
>
(
this
.
s
.
basePath
+
`/project/list/
${
markType
.
HIGHWAY
}
`
).
subscribe
(
res
=>
{
this
.
projects
=
res
.
data
;
this
.
projects
=
res
.
data
;
var
points
=
this
.
loadPolys
(
res
);
var
points
=
this
.
loadPolys
(
res
,
true
);
this
.
m
.
animationLine
(
points
.
map
(
p
=>
({
lng
:
p
[
0
],
lat
:
p
[
1
]
})));
});
});
}
}
}
}
private
loadPolys
(
res
:
any
)
{
private
loadPolys
(
res
:
any
,
animation
:
boolean
)
{
var
allPoints
=
[];
var
allPoints
=
[];
res
.
data
.
forEach
(
obj
=>
{
res
.
data
.
forEach
(
obj
=>
{
this
.
addPoly
(
obj
);
this
.
addPoly
(
obj
);
// var newPoints = this.corToPoint(obj.coordinate);
if
(
animation
){
// this.m.animationLine(newPoints);
var
newPoints
=
this
.
corToPoint
(
obj
.
coordinate
);
this
.
m
.
animationLine
(
newPoints
);
}
allPoints
=
allPoints
.
concat
(
JSON
.
parse
(
obj
.
coordinate
));
allPoints
=
allPoints
.
concat
(
JSON
.
parse
(
obj
.
coordinate
));
});
});
return
allPoints
;
return
allPoints
;
...
@@ -236,7 +238,7 @@ export class MainComponent implements OnInit {
...
@@ -236,7 +238,7 @@ export class MainComponent implements OnInit {
// });
// });
//设置标注信息
//设置标注信息
//
this.addLabel(points,obj);
this
.
addLabel
(
points
,
obj
);
//设置动画效果
//设置动画效果
this
.
m
.
animationLine
(
points
)
this
.
m
.
animationLine
(
points
)
...
@@ -245,7 +247,7 @@ export class MainComponent implements OnInit {
...
@@ -245,7 +247,7 @@ export class MainComponent implements OnInit {
setPrj
(
prj
:
Project
)
{
setPrj
(
prj
:
Project
)
{
this
.
http
.
get
<
any
>
(
this
.
s
.
basePath
+
"/scetion/findListById/"
+
prj
.
id
).
subscribe
(
res
=>
{
this
.
http
.
get
<
any
>
(
this
.
s
.
basePath
+
"/scetion/findListById/"
+
prj
.
id
).
subscribe
(
res
=>
{
prj
.
secs
=
res
.
data
;
prj
.
secs
=
res
.
data
;
this
.
loadPolys
(
res
);
this
.
loadPolys
(
res
,
false
);
});
});
}
}
setCamera
(
sec
:
Scetion
)
{
setCamera
(
sec
:
Scetion
)
{
...
...
src/app/video/video.component.html
View file @
5ca763d3
<div
class=
"main"
>
<div
class=
"main"
>
<div>
<div>
<tree-ngx
(
nameClick
)="
nameChange
($
event
)"
[
nodeItems
]="
nodeItems
"
>
</tree-ngx>
<tree-ngx
[
nodeItems
]="
nodeItems
"
>
</tree-ngx>
<a
href=
"http://192.168.19.175/portal/"
style=
" color: white;
<a
href=
"http://192.168.19.175/portal/"
style=
" color: white;
text-decoration: none;
text-decoration: none;
margin-left: 2em;"
>
演示demo
</a>
margin-left: 2em;"
>
演示demo
</a>
...
...
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