陈敬瑜 3 years ago
parent
commit
b74dce7314
  1. 1
      src/app/data-collection/fire-force/fire-force.component.ts
  2. 1
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  3. 1
      src/app/data-collection/water-collection/water-collection.component.ts
  4. 2
      src/app/gis-management/gis-labeling/gis-labeling.component.html
  5. 11
      src/app/gis-management/gis-labeling/gis-labeling.component.ts
  6. 1
      src/app/key-unit/water-road/water-road.component.ts
  7. 10
      src/app/ui/collection-tools-building/collection-tools.component.html
  8. 116
      src/app/ui/collection-tools-building/collection-tools.component.scss
  9. 8
      src/index.html
  10. 2
      src/modules/map/declare/factory.ts
  11. 4
      src/modules/map/declare/gaode-map.ts
  12. 3
      src/modules/map/declare/keda-map.ts
  13. 1
      src/modules/map/declare/map.d.ts

1
src/app/data-collection/fire-force/fire-force.component.ts

@ -799,6 +799,7 @@ export class FireForceComponent implements OnInit {
}
this.cluster = MapFactory.MarkerClusterInstance(this.map, markerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});
this.cluster.on('click', (e) => {

1
src/app/data-collection/linkage-forces/linkage-forces.component.ts

@ -166,6 +166,7 @@ export class LinkageForcesComponent implements OnInit {
this.cluster = MapFactory.MarkerClusterInstance(this.map, markerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});
this.cluster.on('click',(e)=>{

1
src/app/data-collection/water-collection/water-collection.component.ts

@ -120,6 +120,7 @@ export class WaterCollectionComponent implements OnInit {
}
this.cluster = MapFactory.MarkerClusterInstance(this.map, markerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});
this.cluster.on('click',(e)=>{

2
src/app/gis-management/gis-labeling/gis-labeling.component.html

@ -90,7 +90,7 @@
<!-- 右上角 -->
<div class="rightTopBox">
<!-- <button (click)="setMaxZoom()">设置聚合范围</button> -->
<div class="topbox">
<div (click)="clickTitle(key)" *ngFor="let item of titleList;let key = index" class="titleItem" [ngClass]="{'selectedItem': key == selectedTitle}">
<img [src]="item.iconImg" alt="">

11
src/app/gis-management/gis-labeling/gis-labeling.component.ts

@ -402,6 +402,7 @@ export class GisLabelingComponent implements OnInit {
}
this.unitCluster = MapFactory.MarkerClusterInstance(this.map, unitMarkerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});
this.unitCluster.on('click', (e) => {
@ -456,9 +457,16 @@ export class GisLabelingComponent implements OnInit {
this.renderer2.listen(this.elementRef.nativeElement.querySelector('#share'), 'click', (event) => { this.share(item) })//分享点击事件
}
}, this)
}
setMaxZoom() {
this.unitCluster ? this.unitCluster.setMaxZoom(0) : null
this.waterCluster ? this.waterCluster.setMaxZoom(0) : null
this.fireForceCluster ? this.fireForceCluster.setMaxZoom(0) : null
this.linkageForcesCluster ? this.linkageForcesCluster.setMaxZoom(0) : null
}
//取消显示单位
resetUnit() {
this.keyUnitForm.reset()
@ -577,6 +585,7 @@ export class GisLabelingComponent implements OnInit {
}
this.fireForceCluster = MapFactory.MarkerClusterInstance(this.map, fireForceMarkerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});
@ -726,6 +735,7 @@ export class GisLabelingComponent implements OnInit {
this.linkageForcesCluster = MapFactory.MarkerClusterInstance(this.map, linkageForcesMarkerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});
@ -900,6 +910,7 @@ export class GisLabelingComponent implements OnInit {
// }
this.waterCluster = MapFactory.MarkerClusterInstance(this.map, waterMarkerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});

1
src/app/key-unit/water-road/water-road.component.ts

@ -263,6 +263,7 @@ export class WaterRoadComponent implements OnInit {
}
this.waterCluster = MapFactory.MarkerClusterInstance(this.map, waterMarkerArrcluster, {
gridSize: gridSize, // 设置网格像素大小
maxZoom :15,
render: render //自定义聚合点样式, 自定义非聚合点样式
});
this.waterCluster.on('click',(e)=>{

10
src/app/ui/collection-tools-building/collection-tools.component.html

@ -53,7 +53,7 @@
<!-- 头部操作栏 -->
<div class="headerOperate">
<button mat-button *ngFor="let item of allBuildings;let key = index" (click)="checkedBuilding(item,key)"
<div *ngFor="let item of allBuildings;let key = index" (click)="checkedBuilding(item,key)"
class="bigeditdeletebtn" [ngClass]="{'buildingbtnchecked': checkedBuildingIndex==key}">
<span class="bigeditdeletebtnname" [title]="item.name">{{item.name}}</span>
<span class="editdeletebtn" *ngIf="isEditPattern && pattern">
@ -62,10 +62,10 @@
<mat-icon (click)="deleteBuilding($event,item)"
style="font-size: 23px;vertical-align:sub;color: rgb(224, 51, 51);">delete</mat-icon>
</span>
</button>
<button mat-button (click)="createBuilding()" *ngIf="isEditPattern && pattern">
<span style="font-size: 24px;">+</span>
</button>
</div>
<div style="cursor: pointer;" (click)="createBuilding()" *ngIf="isEditPattern && pattern">
<span style="font-size: 20px;">+</span>
</div>
</div>
<!--功能区 -->

116
src/app/ui/collection-tools-building/collection-tools.component.scss

@ -1,12 +1,15 @@
@import "./panel.scss";
html {
::-webkit-scrollbar {
display: none;
}
}
.icongray {
color: #d9d0dc;
}
.content {
width: 100%;
height: 100%;
@ -30,38 +33,46 @@ html {
align-items: center;
min-height: 40px;
background-color: #fff;
.zoom {
display: flex;
align-items: center;
margin-left: 15px;
cursor: pointer;
img {
margin-right: 3px;
}
}
.marginLeftRight {
margin: 0 8px;
font-size: 16px;
user-select: none;
cursor: pointer;
.mat-icon {
vertical-align: middle;
font-size: 24px;
}
}
.copytobutn {
width: 60px;
min-width: 60px;
display: flex;
justify-content: center;
}
span {
height: 24px;
line-height: 24px;
}
.patternSwitch {
position: absolute;
right: 140px;
span {
font-size: 18px;
cursor: pointer;
@ -71,15 +82,18 @@ html {
border-radius: 3px;
padding: 0 5px;
}
.selectedPattern {
background-color: #2196f3;
color: white;
}
}
.rightSave {
cursor: pointer;
position: absolute;
right: 60px;
label {
vertical-align: middle;
color: #279fff;
@ -89,15 +103,6 @@ html {
//头部操作栏
.headerOperate {
img {
width: 24px;
height: 24px;
vertical-align: middle;
margin-left: 1px;
}
span {
font-size: 15px;
}
flex: 5%;
display: flex;
align-items: center;
@ -105,23 +110,36 @@ html {
box-sizing: border-box;
margin: 3px 0;
background-color: white;
button {
white-space: nowrap;
overflow-x: scroll;
span {
font-size: 15px;
}
div {
cursor: default;
border: 0.5px solid rgb(208, 211, 214);
margin: 0 2px;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 3px 8px;
height: 96%;
border-radius: 3px;
}
.editdeletebtn {
display: none;
}
.bigeditdeletebtn {
max-width: 200px;
.bigeditdeletebtnname {
display: inline-block;
max-width: 120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
// display: inline-block;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
}
}
.bigeditdeletebtn:hover {
.editdeletebtn {
display: inline-block;
@ -135,6 +153,7 @@ html {
cursor: pointer;
vertical-align: middle;
}
//左右两侧功能栏 统一样式
.publicCss {
border-radius: 5px;
@ -142,14 +161,17 @@ html {
height: 100%;
top: 0;
}
.functionalDomain {
flex: 90%;
overflow: hidden;
.functionalDomainContent {
position: relative;
width: 100%;
height: 100%;
}
.functionalDomainLeft {
background-color: #fff;
display: flex;
@ -161,6 +183,7 @@ html {
width: 235px;
left: 0;
z-index: 112;
.leftDragDiv {
position: absolute;
right: 0;
@ -170,6 +193,7 @@ html {
cursor: e-resize;
}
}
.functionalDomainRight {
z-index: 1001;
margin-right: 0px;
@ -184,15 +208,18 @@ html {
min-width: 195px;
width: 195px;
}
.functionalDomainRight {
width: 195px;
}
}
//右边导航栏显示隐藏
.togglePanel2 {
margin-right: -2000px;
transition: margin-right 1s;
}
//左侧导航栏显示隐藏
.togglePanel {
margin-left: -2000px;
@ -205,12 +232,14 @@ html {
width: 100%;
height: 35px;
background-color: #464646;
div {
width: 50%;
height: 35px;
line-height: 35px;
background-color: #595959;
border-radius: 5px;
span {
color: white;
font-size: 14px;
@ -224,13 +253,16 @@ html {
.property {
display: flex;
flex-flow: column;
.siteproperty {
height: 100%;
overflow-y: auto;
p {
color: #9c9fa5;
padding-left: 5px;
}
.siteproperty_size {
background-color: #e3e3e3;
width: 93%;
@ -238,6 +270,7 @@ html {
border-radius: 3px;
min-height: 21px;
}
.rightAttribute {
width: 12%;
height: 99.5%;
@ -248,54 +281,68 @@ html {
border: 2px solid #464646;
}
}
.assetsproperty {
overflow-y: auto;
height: 100%;
p {
color: #9c9fa5;
margin: 1px 0 3px 8px;
font-size: 14px;
}
span {
font-size: 15px;
}
input {
height: 18px;
}
.biginput {
display: block;
width: 88%;
margin: 0 auto;
}
.smallinput {
display: block;
width: 19%;
margin-left: 8px;
}
.textarea {
display: block;
width: 88%;
height: 50px;
margin: 0 auto;
}
.swiper-button-next {
right: 6px;
}
.swiper-button-prev {
left: 6px;
}
.swiper-container {
// --swiper-theme-color: #ff6600;/* 设置Swiper风格 */
// --swiper-navigation-color: #00ff33;/* 单独设置按钮颜色 */
--swiper-navigation-size: 20px; /* 设置按钮大小 */
--swiper-navigation-size: 20px;
/* 设置按钮大小 */
}
.hoverred:hover {
color: rgb(187, 28, 28);
}
.selectDiv {
height: 21px;
position: relative;
margin-bottom: 5px;
select {
width: 98px;
height: 22px;
@ -307,9 +354,11 @@ html {
border-radius: 2px;
}
}
.colorBigDiv {
width: 88%;
margin-left: 8px;
.colorBigTemplateDiv {
span {
color: #9c9fa5;
@ -317,6 +366,7 @@ html {
height: 26px;
line-height: 26px;
}
.colorTemplateDiv {
width: 65%;
height: 22px;
@ -334,6 +384,7 @@ html {
float: left;
border: 2px solid white;
}
.coloractive {
border: 2px solid black;
}
@ -341,6 +392,7 @@ html {
}
}
}
.hideAllTreeNode {
box-sizing: border-box;
margin: 3px 0;
@ -349,24 +401,29 @@ html {
height: 24px;
line-height: 24px;
display: flex;
label {
display: inline-block;
flex: 1;
cursor: pointer;
}
}
//右侧消防要素
.firecategories {
background-color: #fff;
position: relative;
display: flex;
flex-flow: column;
.firecategoriesTree {
overflow-y: auto;
height: 100%;
mat-tree-node {
position: relative;
}
.isLookCss {
position: absolute;
right: 6px;
@ -382,8 +439,10 @@ div:focus {
//没有图片时显示无图片背景图
.noImgCss {
background: url(../../../assets/images/noImg.png) no-repeat center center;
background-size: 88% 100%; /*按比例缩放*/
background-size: 88% 100%;
/*按比例缩放*/
}
.input {
width: 18px;
height: 18px;
@ -400,12 +459,15 @@ div:focus {
font-size: 13px;
cursor: pointer;
}
.treeNode:hover {
background-color: #ccebf8;
}
.isLookPattern {
display: none;
}
.treeText {
overflow: hidden;
white-space: nowrap;
@ -421,6 +483,7 @@ div:focus {
overflow: hidden;
right: 0;
}
.weatherBox {
height: 40px;
width: 700px;
@ -428,21 +491,25 @@ div:focus {
position: absolute;
right: 0;
transition: right linear 0.5s;
.openbtn {
font-size: 45px;
height: 45px;
width: 40px;
}
.name {
font-size: 16px;
vertical-align: middle;
margin-left: 3px;
}
input {
width: 140px;
height: 22px;
margin-left: 3px;
}
select {
width: 96px;
height: 25px;
@ -450,12 +517,15 @@ div:focus {
vertical-align: middle;
}
}
.open {
right: 0px;
}
.close {
right: -622px;
}
.bottomCss {
position: absolute;
left: 232px;
@ -466,6 +536,7 @@ div:focus {
z-index: 100;
background-color: white;
border: 1px solid #464646;
.dragDiv {
width: 100%;
height: 3px;
@ -474,9 +545,11 @@ div:focus {
z-index: 1000;
cursor: n-resize;
}
.title {
height: 35px;
background-color: #464646;
div {
background-color: #464646;
float: left;
@ -486,10 +559,12 @@ div:focus {
padding-left: 5px;
cursor: pointer;
}
.detailsAndattentBtn {
background-color: #595959;
}
}
.body {
textarea {
width: 100%;
@ -497,3 +572,8 @@ div:focus {
}
}
}
::-webkit-scrollbar {
height: 6px;
}

8
src/index.html

@ -23,10 +23,10 @@
</body>
<!-- <script type="text/javascript" src="./assets/kmap/kmap-service-main-kd.js"></script> -->
<!-- <script src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script> -->
<script src="https://webapi.amap.com/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script>
<script src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script>
<!-- <script src="https://webapi.amap.com/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->
<script src="/assets/html2canvas.js"></script>
<script type="text/javascript" src="/assets/wordexport/jquery.js"></script>
<script type="text/javascript" src="/assets/wordexport/FileSaver.js"></script>

2
src/modules/map/declare/factory.ts

@ -30,7 +30,7 @@ export class MapFactory {
}
}
public static MarkerClusterInstance(map: IMap, list: Object[], renderObj: { gridSize: number, render: IRenderClusterMarker }): IMarkerCluster {
public static MarkerClusterInstance(map: IMap, list: Object[], renderObj: { gridSize: number, render: IRenderClusterMarker ,maxZoom: number}): IMarkerCluster {
switch (mapSupplier) {
case 1: return new GaoDeMarkerCluster(map, list, renderObj);
case 2: return new KedaMarkerCluster(map, list, renderObj);

4
src/modules/map/declare/gaode-map.ts

@ -285,12 +285,16 @@ export class GaoDeMarkerCluster extends GaodeBasic implements IMarkerCluster {
this.self = new AMap.MarkerCluster(map.self, list, conf)
});
}
setMaxZoom(zoom: number) {
this.self.setMaxZoom(zoom)
}
on(eventName: string, callback: Function): void {
this.self.on(eventName, callback);
}
setData(list: any[]) {
this.self.setData(list)
}
}
export class GaoDeLngLat extends GaodeBasic implements ILngLat {

3
src/modules/map/declare/keda-map.ts

@ -694,6 +694,9 @@ export class KedaMarkerCluster extends KedaBasic implements IMarkerCluster { //M
// }
// })
}
setMaxZoom(zoom: number) {
throw new Error('Method not implemented.');
}
on(eventName: string, callback: MarkerClusterCallback, component?: any): void {
let _this =this;
if(!this.id){

1
src/modules/map/declare/map.d.ts vendored

@ -56,6 +56,7 @@ type MarkerClusterCallback = (event:MarkerClusterOptions)=>void;
export interface IMarkerCluster extends ISelf {
on(eventName: string, callback: MarkerClusterCallback, component?: any): void;
setData(list: any[]);
setMaxZoom(zoom: number)
}
type HtmlRender = (...args) => string | HTMLElement;

Loading…
Cancel
Save