Commit 3a884fcd by niuxiaolin

latest

parent fe2a780a
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --proxy--config proxy.json", "start": "ng serve --proxy--config proxy.json",
"build": "ng build", "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\\src\\main\\resources\\static",
"create": "mkdir D:\\projects\\supervise\\src\\main\\resources\\static",
"copy-to": " powershell -command \" Copy-Item D:\\projects\\map\\dist\\map\\* -Destination D:\\projects\\supervise\\src\\main\\resources\\static\\ -Recurse \"",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e"
......
...@@ -4,13 +4,16 @@ import { MainComponent } from './main/main.component'; ...@@ -4,13 +4,16 @@ import { MainComponent } from './main/main.component';
import { VideoComponent } from './video/video.component'; import { VideoComponent } from './video/video.component';
const routes: Routes = [ const routes: Routes = [
{path:"",redirectTo:"./home",pathMatch:'full'}, {path:"",redirectTo:"home",pathMatch:'full'},
{path:'home',component:MainComponent}, {path:'home',component:MainComponent},
{path:'video',component:VideoComponent}, {path:'video',component:VideoComponent},
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forRoot(routes)], imports: [RouterModule.forRoot(routes,{
useHash:true
})],
exports: [RouterModule] exports: [RouterModule]
}) })
export class AppRoutingModule { } export class AppRoutingModule { }
...@@ -10,6 +10,7 @@ import { FormsModule } from '@angular/forms'; ...@@ -10,6 +10,7 @@ import { FormsModule } from '@angular/forms';
import { ModalComponent } from './modal/modal.component'; import { ModalComponent } from './modal/modal.component';
import { ApiModule } from './api'; import { ApiModule } from './api';
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
...@@ -18,9 +19,12 @@ import { HttpClientModule } from '@angular/common/http'; ...@@ -18,9 +19,12 @@ import { HttpClientModule } from '@angular/common/http';
ModalComponent ModalComponent
], ],
imports: [ imports: [
HttpClientModule, HttpClientModule,
BrowserModule, BrowserModule,
AppRoutingModule, AppRoutingModule,
FormsModule, FormsModule,
ApiModule, ApiModule,
BaiduMapModule.forRoot({ ak: 'KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6' }) BaiduMapModule.forRoot({ ak: 'KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6' })
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="left"> <div class="left">
<section> <section>
<div *ngIf="debug">
<select [(ngModel)]="type"> <select [(ngModel)]="type">
<option value="0">project</option> <option value="0">project</option>
<option value="1">course</option> <option value="1">course</option>
...@@ -12,8 +12,9 @@ ...@@ -12,8 +12,9 @@
<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>
</div>
<!-- <button (click)="openDialog('custom-modal-1')" >新增项目</button> --> <!-- <button (click)="openDialog('custom-modal-1')" >新增项目</button> -->
<button (click)="toHighWay()">高速公路</button> <button [ngClass]="{focus:highShow}" (click)="toHighWay()">高速公路</button>
<div *ngIf="!highShow"> <div *ngIf="!highShow">
<label>项目总数:{{staticHighWay.total}}个</label> <label>项目总数:{{staticHighWay.total}}个</label>
<label>总建设里程:{{staticHighWay.mileage}}Km </label> <label>总建设里程:{{staticHighWay.mileage}}Km </label>
...@@ -21,12 +22,12 @@ ...@@ -21,12 +22,12 @@
</div> </div>
<section *ngIf="highShow" class="sub"> <section *ngIf="highShow" class="sub">
<label (click)="changePolyline(prj)" *ngFor="let prj of projects">{{prj.name}} <label (click)="highLight(i,prj)" *ngFor="let prj of projects;let i=index">{{prj.name}}
</label> </label>
</section> </section>
</section> </section>
<section> <section>
<button (click)='toNormal()'>普通干线 <button [ngClass]="{focus:normalShow}" (click)='toNormal()'>普通干线
</button> </button>
<div *ngIf="!normalShow"> <div *ngIf="!normalShow">
...@@ -36,7 +37,7 @@ ...@@ -36,7 +37,7 @@
</div> </div>
<section *ngIf="normalShow" class="sub"> <section *ngIf="normalShow" class="sub">
<label (click)="changePolyline(prj)" *ngFor="let prj of normalProjects">{{prj.name}} <label (click)="highLight(i,prj)" *ngFor="let prj of normalProjects;let i=index">{{prj.name}}
</label> </label>
</section> </section>
</section> </section>
...@@ -45,8 +46,7 @@ ...@@ -45,8 +46,7 @@
<div class="map"> <div class="map">
<div id="polylineLength"></div> <div id="polylineLength"></div>
<div id="result"></div> <div id="result"></div>
<!-- <polyline *ngFor="let poly of polys" [points]="poly.points" [options]="poly.polylineOptions" (loaded)="polylineLoaded($event)" (clicked)="polylineClicked($event)"></polyline>
-->
<baidu-map #map [options]="opts" > <baidu-map #map [options]="opts" >
<polyline [points]="points" [options]="polylineOptions" (loaded)="polylineLoaded($event)" (clicked)="polylineClicked($event)"></polyline> <polyline [points]="points" [options]="polylineOptions" (loaded)="polylineLoaded($event)" (clicked)="polylineClicked($event)"></polyline>
...@@ -57,35 +57,28 @@ ...@@ -57,35 +57,28 @@
<button>视频监管 <button>视频监管
</button> </button>
<label>项目总数:**个</label> <label>监管项目:**个</label>
<label>总建设里程:***Km </label> <label>监控点总计:***Km </label>
<label>总投资:**亿</label>
</section> </section>
<section> <section>
<button>建设程序监管 <button>建设程序监管
</button> </button>
<label>项目总数:**个</label>
<label>总建设里程:***Km </label>
<label>总投资:**亿</label>
</section> </section>
<section> <section>
<button>质量安全监管 <button>质量安全监管 </button>
<label>年度累计完成产值:</label>
<label>年度总目标产值: </label>
</button>
<label>项目总数:**个</label>
<label>总建设里程:***Km </label>
<label>总投资:**亿</label>
</section> </section>
<section> <section>
<button>造价监管 <button>造价监管
</button> </button>
<label>项目总数:**个</label> <label></label>
<label>总建设里程:***Km </label> <label> </label>
<label>总投资:**亿</label> <label></label>
</section> </section>
</div> </div>
</div> </div>
......
...@@ -9,13 +9,14 @@ ...@@ -9,13 +9,14 @@
border: 4px solid #3885b3; border: 4px solid #3885b3;
button{ button{
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
background: #ea262d96; background: #43a5dd;
color:white; color: white;
border-radius: 4px; border-radius: 4px;
width: 100px; width: 130px;
height: 30px; height: 39px;
display: block; display: block;
margin: 0.3em; margin: 0.3em;
font-size: initial;
} }
label{ label{
display: block; display: block;
...@@ -44,4 +45,7 @@ ...@@ -44,4 +45,7 @@
.right{ .right{
} }
}
.focus{
background: #ea262d96!important;
} }
\ No newline at end of file
...@@ -1642,34 +1642,3 @@ var BMAP_DRAWING_MARKER = "marker", // 鼠标画点模式 ...@@ -1642,34 +1642,3 @@ 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(window.map, {
isOpen: true, //是否开启绘制模式
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 //矩形的样式
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment