Browse Source

[完善]完善统计页面

非煤矿山灾害智能感知和预警系统
邵佳豪 2 years ago
parent
commit
44e2530441
  1. 12
      src/app/home/home-routing.module.ts
  2. 6
      src/app/home/home.module.ts
  3. 5
      src/app/home/statistic-analysis/home/home.component.html
  4. 12
      src/app/home/statistic-analysis/home/home.component.scss
  5. 94
      src/app/home/statistic-analysis/home/home.component.ts
  6. 4
      src/app/home/statistic-analysis/statistic-analysis.component.html
  7. 4
      src/app/home/task/station-task-execution/station-task-execution.component.html
  8. 11
      src/app/home/task/station-task-execution/station-task-execution.component.scss
  9. 2
      src/app/home/task/station-task-execution/station-task-execution.component.ts
  10. 6
      src/index.html

12
src/app/home/home-routing.module.ts

@ -3,6 +3,7 @@ import { RouterModule, Routes } from '@angular/router';
import { BasicInfoComponent } from './basic-info/basic-info.component';
import { UnitDetailsComponent } from './basic-info/unit-details/unit-details.component';
import { UnitComponent } from './basic-info/unit/unit.component';
import { HomeComponent } from './statistic-analysis/home/home.component';
import { StatisticAnalysisComponent } from './statistic-analysis/statistic-analysis.component';
import { OrComponent } from './system-management/or/or.component';
import { RoleComponent } from './system-management/role/role.component';
@ -70,7 +71,16 @@ const routes: Routes = [
}
],
},
{ path: 'statistic', component: StatisticAnalysisComponent },
{
path: 'statistic', component: StatisticAnalysisComponent,
children: [
{ path: '', redirectTo: '/statistic', pathMatch: 'full' },
{
path: 'home',
component: HomeComponent,
}
],
},
{
path: 'system', component: SystemManagementComponent,
children: [

6
src/app/home/home.module.ts

@ -70,7 +70,8 @@ import { NzListModule } from 'ng-zorro-antd/list';
import { OperationLogComponent } from './basic-info/unit-details/operation-log/operation-log.component';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { ChatWindowComponent } from './commonComponents/chat-window/chat-window.component';
import { AngularDraggableModule } from 'angular2-draggable';
import { AngularDraggableModule } from 'angular2-draggable';
import { HomeComponent } from './statistic-analysis/home/home.component';
@NgModule({
declarations: [
NavComponent,
@ -109,7 +110,8 @@ import { AngularDraggableModule } from 'angular2-draggable';
EditOrComponent,
CreateTaskComponent,
OperationLogComponent,
ChatWindowComponent
ChatWindowComponent,
HomeComponent
],
imports: [
CommonModule,

5
src/app/home/statistic-analysis/home/home.component.html

@ -0,0 +1,5 @@
<div class="box">
<div class="mapbox" id="mapbox">
</div>
</div>

12
src/app/home/statistic-analysis/home/home.component.scss

@ -0,0 +1,12 @@
.box {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.mapbox{
width: 600px;
height: 500px;
border: 1px solid red;
}

94
src/app/home/statistic-analysis/home/home.component.ts

@ -0,0 +1,94 @@
import { Component, OnInit } from '@angular/core';
declare var AMap: any;
declare var AMapUI: any;
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit(): void {
window.setTimeout(()=>{
this.mapInit() //初始化地图
},0)
}
map
mapInit() {
//创建地图
this.map = new AMap.Map('mapbox', {
cursor: 'default',
zooms: [8, 16],
mapStyle: "amap://styles/light",
// bubble: true
});
let colors = [
"#EE30B3", "#B37CF0", "#BD2CE6", "#7768EE", "#359EEF", "#7B95CA", "#CAFBF8", "#43D0E1",
"#72C6EF"
];
AMapUI.loadUI(['geo/DistrictExplorer'], (DistrictExplorer) => {
//创建一个实例
let districtExplorer = new DistrictExplorer({
map: this.map,
eventSupport: true, //打开事件支持
});
// let adcode = this.adcode; //行政编码
let adcode = 370100
districtExplorer.loadAreaNode(adcode, (error, areaNode) => {
//更新地图视野
this.map.setBounds(areaNode.getBounds(), null, null, true);
//设置定位节点,支持鼠标位置识别
//注意节点的顺序,前面的高优先级
districtExplorer.setAreaNodesForLocating(areaNode);
//清除已有的绘制内容
districtExplorer.clearFeaturePolygons();
//绘制子区域
districtExplorer.renderSubFeatures(areaNode, (feature, i) => {
console.log(111,feature)
let fillColor = colors[i % colors.length];
let strokeColor = colors[colors.length - 1 - i % colors.length];
return {
cursor: 'default',
bubble: true,
strokeColor: strokeColor, //线颜色
strokeOpacity: 1, //线透明度
strokeWeight: 1, //线宽
fillColor: fillColor, //填充色
fillOpacity: 0.5, //填充透明度
};
});
//绘制父区域
districtExplorer.renderParentFeature(areaNode, {
cursor: 'default',
bubble: true,
strokeColor: 'black', //线颜色
strokeOpacity: 1, //线透明度
strokeWeight: 1, //线宽
fillColor: null, //填充色
fillOpacity: 0.5, //填充透明度
});
// 更新地图视野以适合区划面
this.map.setFitView(districtExplorer.getAllFeaturePolygons());
});
});
}
}

4
src/app/home/statistic-analysis/statistic-analysis.component.html

@ -1,4 +1,4 @@
<div class="box">
<nz-empty></nz-empty>
</div>
</div>
<!-- <router-outlet></router-outlet> -->

4
src/app/home/task/station-task-execution/station-task-execution.component.html

@ -77,10 +77,6 @@
</div>
</div>
<div class="content">
<!-- <div class="applybtn">
<button (click)="apply()" nz-button nzType="primary"><i nz-icon nzType="form"
nzTheme="outline"></i>申请</button>
</div> -->
<div class="tablebox">
<div class="tableboxitem" *ngFor="let item of taskLIst"
[ngClass]="{'greenborder': item.approvalStatus == '通过','redborder': item.approvalStatus == '驳回'}">

11
src/app/home/task/station-task-execution/station-task-execution.component.scss

@ -169,16 +169,16 @@
div {
flex: 1;
overflow:hidden;
span {
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
height: 33px;
line-height: 33px;
text-align: left;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
img {
width: 32px;
height: 32px;
@ -194,7 +194,6 @@
span:nth-child(1) {
color: #303133;
// margin-bottom: 8px;
}
span:nth-child(2) {

2
src/app/home/task/station-task-execution/station-task-execution.component.ts

@ -74,7 +74,7 @@ export class StationTaskExecutionComponent implements OnInit {
CompanyName: this.searchForm.unitname,
SupervisorId: this.isSupervisor ? this.userId : null,
AssitantOrganizationId: this.isSupervisor ? null : this.OrganizationId,
approvalStatuses: ['已检查'],
approvalStatuses: ['待检查', '已检查'],
PageNumber: this.PageNumber,
PageSize: this.PageSize
}

6
src/index.html

@ -1,5 +1,6 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>防消一体化综合治理平台</title>
@ -7,6 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
<div id="viewerjs" style="display:none"></div>
@ -15,4 +17,6 @@
<script type="text/javascript" src="/assets/wordexport/FileSaver.js"></script>
<script type="text/javascript" src="/assets/wordexport/jquery.wordexport.js"></script>
<script src='https://webapi.amap.com/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346'></script>
</html>
<script src="https://webapi.amap.com/ui/1.1/main.js?v=1.1.1"></script>
</html>
Loading…
Cancel
Save