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
8890c002
Commit
8890c002
authored
Jul 25, 2019
by
niuxiaolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改编辑模式不同类型有不同颜色,section选择时选择项目等
parent
3a884fcd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
4 deletions
+55
-4
main.component.html
src/app/main/main.component.html
+17
-4
main.component.ts
src/app/main/main.component.ts
+0
-0
DrawingManager.js
src/assets/DrawingManager.js
+38
-0
No files found.
src/app/main/main.component.html
View file @
8890c002
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<section>
<section>
<div
*
ngIf=
"debug"
>
<div
*
ngIf=
"debug"
>
<select
[(
ngModel
)]="
type
"
>
<select
[(
ngModel
)]="
type
"
(
ngModelChange
)="
typeChange
($
event
)"
>
<option
value=
"0"
>
project
</option>
<option
value=
"0"
>
project
</option>
<option
value=
"1"
>
course
</option>
<option
value=
"1"
>
course
</option>
<option
value=
"2"
>
SECTION
</option>
<option
value=
"2"
>
SECTION
</option>
...
@@ -12,6 +12,12 @@
...
@@ -12,6 +12,12 @@
<select
[(
ngModel
)]="
currentCouseId
"
>
<select
[(
ngModel
)]="
currentCouseId
"
>
<option
*
ngFor=
"let c of courses"
[
value
]="
c
.
id
"
>
{{c.name}}
</option>
<option
*
ngFor=
"let c of courses"
[
value
]="
c
.
id
"
>
{{c.name}}
</option>
</select>
</select>
<select
[(
ngModel
)]="
currentProjId
"
(
ngModelChange
)="
proj2Change
($
event
,
1
)"
>
<option
*
ngFor=
"let c of projects1"
[
value
]="
c
.
id
"
>
{{c.name}}
</option>
</select>
<select
[(
ngModel
)]="
currentProjId
"
(
ngModelChange
)="
proj2Change
($
event
,
2
)"
>
<option
*
ngFor=
"let c of projects2"
[
value
]="
c
.
id
"
>
{{c.name}}
</option>
</select>
</div>
</div>
<!-- <button (click)="openDialog('custom-modal-1')" >新增项目</button> -->
<!-- <button (click)="openDialog('custom-modal-1')" >新增项目</button> -->
<button
[
ngClass
]="{
focus:highShow
}"
(
click
)="
toHighWay
()"
>
高速公路
</button>
<button
[
ngClass
]="{
focus:highShow
}"
(
click
)="
toHighWay
()"
>
高速公路
</button>
...
@@ -77,9 +83,16 @@
...
@@ -77,9 +83,16 @@
</button>
</button>
<label></label>
<label></label>
<label>
</label>
<label>
</label>
<label></label>
<label></label>
</section>
</section>
<section>
<button>
数据信息
</button>
<label>
名字:{{currProj.name}}
</label>
<label>
里程:{{currProj.mileage}}
</label>
<label>
投资:{{currProj.capital}}
</label>
</section>
</div>
</div>
</div>
</div>
...
@@ -90,7 +103,7 @@
...
@@ -90,7 +103,7 @@
<p>
capital:
<input
type=
"text"
[(
ngModel
)]="
proj
.
capital
"
/></p>
<p>
capital:
<input
type=
"text"
[(
ngModel
)]="
proj
.
capital
"
/></p>
<p>
coordinate:
<input
type=
"text"
[(
ngModel
)]="
proj
.
coordinate
"
/></p>
<p>
coordinate:
<input
type=
"text"
[(
ngModel
)]="
proj
.
coordinate
"
/></p>
<p>
course:
<input
type=
"text"
[(
ngModel
)]="
proj
.
course
"
/></p>
<p>
course:
<input
type=
"text"
[(
ngModel
)]="
proj
.
course
"
/></p>
<p>
lineStyle:
<input
type=
"text"
[(
ngModel
)]="
proj
.
lineStyle
"
/></p>
<p>
lineStyle:
<input
type=
"text"
[(
ngModel
)]="
proj
.
lineStyle
"
/></p>
<p>
lineWidth:
<input
type=
"text"
[(
ngModel
)]="
proj
.
lineWidth
"
/></p>
<p>
lineWidth:
<input
type=
"text"
[(
ngModel
)]="
proj
.
lineWidth
"
/></p>
<p>
mileage:
<input
type=
"text"
[(
ngModel
)]="
proj
.
mileage
"
/></p>
<p>
mileage:
<input
type=
"text"
[(
ngModel
)]="
proj
.
mileage
"
/></p>
...
@@ -119,7 +132,7 @@
...
@@ -119,7 +132,7 @@
<jw-modal
id=
"custom-modal-3"
>
<jw-modal
id=
"custom-modal-3"
>
<h1>
添加section
</h1>
<h1>
添加section
</h1>
<p>
courses
名称:
<input
type=
"text"
[(
ngModel
)]="
section
.
name
"
/></p>
<p>
section
名称:
<input
type=
"text"
[(
ngModel
)]="
section
.
name
"
/></p>
<p>
projectId:
<input
type=
"text"
[(
ngModel
)]="
section
.
project
"
/></p>
<p>
projectId:
<input
type=
"text"
[(
ngModel
)]="
section
.
project
"
/></p>
<p>
lineStyle:
<input
type=
"text"
[(
ngModel
)]="
section
.
lineStyle
"
/></p>
<p>
lineStyle:
<input
type=
"text"
[(
ngModel
)]="
section
.
lineStyle
"
/></p>
<p>
lineWidth:
<input
type=
"text"
[(
ngModel
)]="
section
.
lineWidth
"
/></p>
<p>
lineWidth:
<input
type=
"text"
[(
ngModel
)]="
section
.
lineWidth
"
/></p>
...
...
src/app/main/main.component.ts
View file @
8890c002
This diff is collapsed.
Click to expand it.
src/assets/DrawingManager.js
View file @
8890c002
/**
/**
* @fileoverview 百度地图的鼠标绘制工具,对外开放。
* @fileoverview 百度地图的鼠标绘制工具,对外开放。
* 允许用户在地图上点击完成鼠标绘制的功能。
* 允许用户在地图上点击完成鼠标绘制的功能。
...
@@ -1034,6 +1036,10 @@ var BMAP_DRAWING_MARKER = "marker", // 鼠标画点模式
...
@@ -1034,6 +1036,10 @@ var BMAP_DRAWING_MARKER = "marker", // 鼠标画点模式
if
(
me
.
controlButton
==
"right"
&&
(
e
.
button
==
1
||
e
.
button
==
0
)){
if
(
me
.
controlButton
==
"right"
&&
(
e
.
button
==
1
||
e
.
button
==
0
)){
return
;
return
;
}
}
// //添加hook处理
// if(me.hook&&!me.hook(e.point)){
// return;
// }
points
.
push
(
e
.
point
);
points
.
push
(
e
.
point
);
drawPoint
=
points
.
concat
(
points
[
points
.
length
-
1
]);
drawPoint
=
points
.
concat
(
points
[
points
.
length
-
1
]);
if
(
points
.
length
==
1
)
{
if
(
points
.
length
==
1
)
{
...
@@ -1642,3 +1648,35 @@ var BMAP_DRAWING_MARKER = "marker", // 鼠标画点模式
...
@@ -1642,3 +1648,35 @@ var BMAP_DRAWING_MARKER = "marker", // 鼠标画点模式
})();
})();
var
styleOptions
=
{
strokeColor
:
"red"
,
//边线颜色。
fillColor
:
"red"
,
//填充颜色。当参数为空时,圆形将没有填充效果。
strokeWeight
:
3
,
//边线的宽度,以像素为单位。
strokeOpacity
:
0.8
,
//边线透明度,取值范围0 - 1。
fillOpacity
:
0.6
,
//填充的透明度,取值范围0 - 1。
strokeStyle
:
'solid'
//边线的样式,solid或dashed。
}
var
mapOptions
=
{
enableMapClick
:
true
}
//实例化鼠标绘制工具
var
drawingManager
=
new
BMapLib
.
DrawingManager
(
map
,
{
isOpen
:
false
,
//是否开启绘制模式
enableDrawingTool
:
true
,
//是否显示工具栏
drawingToolOptions
:
{
// anchor: BMAP_ANCHOR_TOP_RIGHT, //位置
offset
:
new
BMap
.
Size
(
5
,
5
),
//偏离值
scale
:
0.8
//工具栏缩放比例
},
circleOptions
:
styleOptions
,
//圆的样式
polylineOptions
:
styleOptions
,
//线的样式
polygonOptions
:
styleOptions
,
//多边形的样式
rectangleOptions
:
styleOptions
//矩形的样式
});
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