diff --git a/src/app/data-collection/fire-force/fire-force.component.scss b/src/app/data-collection/fire-force/fire-force.component.scss index 597f4b6..76e67df 100644 --- a/src/app/data-collection/fire-force/fire-force.component.scss +++ b/src/app/data-collection/fire-force/fire-force.component.scss @@ -298,6 +298,8 @@ .btnbox{ display: flex; align-items: center; + flex: 1; + justify-content: flex-end; .uploadAttachment{ display: inline-block; margin-right: 20px; @@ -574,4 +576,101 @@ line-height: 36px; } } +} + + +@media screen and (max-width:1400px){ + .box{ + padding: 5px; + font-size: 14px; + } + .listbox{ + width: 310px; + .contantbox{ + .waterList{ + li{ + .address{ + width: 50%; + } + .integrity{ + width: 36%; + } + } + } + } + } + .mapbox{ + .mapcheckbox{ + height: 30px; + line-height: 30px; + } + #map{ + .gistopbox{ + width: 43%; + } + } + .detailsbox{ + height:338px; + .tabsbox{ + height: 38px; + line-height: 38px; + .tabs{ + div{ + width: 90px; + } + } + .btnbox{ + .uploadAttachment{ + margin-right: 12px; + width: 80px; + button{ + mat-icon{ + display: none; + } + } + } + .state{ + margin-right:12px; + } + .submitAudit{ + margin-right:12px; + } + .close{ + margin-right: 12px; + } + } + } + .contant{ + height:300px; + p{ + padding-left: 20px; + font-size: 14px; + } + span{ + font-size: 14px; + } + input,select{ + width: 50%; + } + textarea{ + width: 87%; + } + .longinput{ + width: 66%; + } + .unitDiv{ + width: 50%; + position: relative; + } + .setPositionBtn{ + width:85px; + text-align: center; + margin-right: 8px; + mat-icon{ + display: none; + } + } + } + } + } } \ No newline at end of file diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index 6a6b9a2..077a144 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -878,6 +878,36 @@ export class FireForceComponent implements OnInit { this.positionLngLat = this.atLastPositionLngLat } })//取消 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'),'touchstart',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + this.newPositionMarker = new AMap.Marker({ + position: [this.positionLngLat.x,this.positionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.atLastPositionLngLat = JSON.parse(JSON.stringify(this.positionLngLat)) + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + }) + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'),'touchstart',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + if(this.positionLngLat.x && this.positionLngLat.x != 0 && !this.atLastPositionLngLat.x){//直接取消 + this.map.remove(this.newPositionMarker) + this.positionLngLat = {} + this.atLastPositionLngLat = {} + }else{ + this.newPositionMarker = new AMap.Marker({ + position: [this.atLastPositionLngLat.x,this.atLastPositionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.map.setCenter([this.atLastPositionLngLat.x,this.atLastPositionLngLat.y]); //设置地图中心点 + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + } + })//取消 } } diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.scss b/src/app/data-collection/linkage-forces/linkage-forces.component.scss index 10ce7fe..ddf644c 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.scss +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.scss @@ -259,8 +259,11 @@ } } .btnbox{ + display: flex; align-items: center; + flex: 1; + justify-content: flex-end; .uploadAttachment{ display: inline-block; margin-right: 20px; @@ -537,4 +540,124 @@ margin: 0 20px; } } +} + + +@media screen and (max-width:1400px){ + .box{ + padding: 5px; + font-size: 14px; + } + .listbox{ + width: 310px; + .contantbox{ + .waterList{ + li{ + .address{ + width: 50%; + } + .integrity{ + width: 36%; + } + } + } + } + } + .mapbox{ + .mapcheckbox,.swiper-container{ + width: 100%; + height: 50px; + .swiper-wrapper{ + flex: 1; + display: flex; + height: 50px; + line-height: 50px; + } + mat-checkbox{ + font-size: 15px; + min-width: 120px; + span{ + display: flex; + justify-content: center; + align-items: center; + img{ + margin-right: 3px; + } + } + + } + mat-checkbox:nth-child(1){ + margin-left: 20px; + } + + } + #map{ + .gistopbox{ + width: 43%; + } + } + .detailsbox{ + height:338px; + .tabsbox{ + height: 38px; + line-height: 38px; + .tabs{ + div{ + width: 90px; + } + } + .btnbox{ + .uploadAttachment{ + margin-right: 12px; + width: 80px; + button{ + mat-icon{ + display: none; + } + } + } + .state{ + margin-right:12px; + } + .submitAudit{ + margin-right:12px; + } + .close{ + margin-right: 12px; + } + } + } + .contant{ + height:300px; + p{ + padding-left: 20px; + font-size: 14px; + } + span{ + font-size: 14px; + } + input,select{ + width: 50%; + } + textarea{ + width: 87%; + } + .longinput{ + width: 66%; + } + .unitDiv{ + width: 50%; + position: relative; + } + .setPositionBtn{ + width:85px; + text-align: center; + margin-right: 8px; + mat-icon{ + display: none; + } + } + } + } + } } \ No newline at end of file diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index 3ceabef..f113b29 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -81,6 +81,7 @@ export class LinkageForcesComponent implements OnInit { createMarker(list){ let markerArrcluster = [] this.cluster ? this.cluster.setData([]) : null + console.log(678,list) list.forEach((item) => { let image if(item.linkageForceType == 0){//消火栓 @@ -115,11 +116,13 @@ export class LinkageForcesComponent implements OnInit { image = '/assets/linkageForcesMarkers/住建.png' } // 用于点集合的数组 - markerArrcluster.push({ - lnglat : [item.location.x,item.location.y], - image : image, - data : item - }) + if(item.location && item.location.x){ + markerArrcluster.push({ + lnglat : [item.location.x,item.location.y], + image : image, + data : item + }) + } }) this.map.plugin(["AMap.MarkerClusterer"],() => { var gridSize = 60 @@ -172,8 +175,15 @@ export class LinkageForcesComponent implements OnInit { ngOnInit(): void { this.getAllFireForce() setTimeout(() => { + console.log(document.documentElement.clientWidth) + let slidesPerView + if(document.documentElement.clientWidth < 1400){ + slidesPerView = 5 + }else{ + slidesPerView = 10 + } var mySwiper = new Swiper('.swiper-container', { - slidesPerView: 10,//每页显示的个数 + slidesPerView: slidesPerView,//每页显示的个数 slidesPerGroup: 3,//点击一次需要跳多少次 // 如果需要前进后退按钮 navigation: { @@ -597,6 +607,37 @@ export class LinkageForcesComponent implements OnInit { this.positionLngLat = this.atLastPositionLngLat } })//取消 + //点击确定 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'),'touchstart',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + this.newPositionMarker = new AMap.Marker({ + position: [this.positionLngLat.x,this.positionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.atLastPositionLngLat = JSON.parse(JSON.stringify(this.positionLngLat)) + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + }) + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'),'touchstart',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + if(this.positionLngLat.x && this.positionLngLat.x != 0 && !this.atLastPositionLngLat.x){//直接取消 + this.map.remove(this.newPositionMarker) + this.positionLngLat = {} + this.atLastPositionLngLat = {} + }else{ + this.newPositionMarker = new AMap.Marker({ + position: [this.atLastPositionLngLat.x,this.atLastPositionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.map.setCenter([this.atLastPositionLngLat.x,this.atLastPositionLngLat.y]); //设置地图中心点 + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + } + })//取消 } } diff --git a/src/app/data-collection/water-collection/water-collection.component.html b/src/app/data-collection/water-collection/water-collection.component.html index 862522f..2d07aa3 100644 --- a/src/app/data-collection/water-collection/water-collection.component.html +++ b/src/app/data-collection/water-collection/water-collection.component.html @@ -143,7 +143,7 @@ 纬度: - diff --git a/src/app/data-collection/water-collection/water-collection.component.scss b/src/app/data-collection/water-collection/water-collection.component.scss index b8caeac..dd72757 100644 --- a/src/app/data-collection/water-collection/water-collection.component.scss +++ b/src/app/data-collection/water-collection/water-collection.component.scss @@ -317,6 +317,10 @@ opacity: 0.4; } } + .setPositionBtn{ + width:85px; + text-align: center; + } } } } @@ -379,4 +383,93 @@ line-height: 36px; } } -} \ No newline at end of file +} + +@media screen and (max-width:1400px){ + .box{ + padding: 5px; + font-size: 14px; + } + .listbox{ + width: 310px; + .contantbox{ + .waterList{ + li{ + .address{ + width: 50%; + } + .integrity{ + width: 36%; + } + } + } + } + } + .mapbox{ + .mapcheckbox{ + height: 30px; + line-height: 30px; + } + #map{ + .gistopbox{ + width: 43%; + } + } + .detailsbox{ + height:338px; + .tabsbox{ + height: 38px; + line-height: 38px; + .tabs{ + div{ + width: 90px; + } + } + .btnbox{ + .state{ + margin-right:22px; + } + .submitAudit{ + margin-right:22px; + } + .close{ + margin-right: 22px; + } + } + } + .contant{ + height:300px; + p{ + padding-left: 20px; + font-size: 14px; + } + span{ + font-size: 14px; + } + input,select{ + width: 50%; + } + textarea{ + width: 87%; + } + .longinput{ + width: 66%; + } + .unitDiv{ + width: 50%; + position: relative; + } + .setPositionBtn{ + width:85px; + text-align: center; + margin-right: 8px; + mat-icon{ + display: none; + } + } + } + } + } +} + + diff --git a/src/app/data-collection/water-collection/water-collection.component.ts b/src/app/data-collection/water-collection/water-collection.component.ts index 59d10c0..3e6b7a7 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -72,11 +72,13 @@ export class WaterCollectionComponent implements OnInit { image = '/assets/waterMarkers/天然水源.png' } // 用于点集合的数组 - markerArrcluster.push({ - lnglat : [item.location.x,item.location.y], - image : image, - data : item - }) + if(item.location && item.location.x){ + markerArrcluster.push({ + lnglat : [item.location.x,item.location.y], + image : image, + data : item + }) + } }) this.map.plugin(["AMap.MarkerClusterer"],() => { var gridSize = 60 @@ -612,6 +614,37 @@ export class WaterCollectionComponent implements OnInit { this.positionLngLat = this.atLastPositionLngLat } })//取消 + //点击确定 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'),'touchstart',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + this.newPositionMarker = new AMap.Marker({ + position: [this.positionLngLat.x,this.positionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.atLastPositionLngLat = JSON.parse(JSON.stringify(this.positionLngLat)) + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + }) + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'),'touchstart',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + if(this.positionLngLat.x && this.positionLngLat.x != 0 && !this.atLastPositionLngLat.x){//直接取消 + this.map.remove(this.newPositionMarker) + this.positionLngLat = {} + this.atLastPositionLngLat = {} + }else{ + this.newPositionMarker = new AMap.Marker({ + position: [this.atLastPositionLngLat.x,this.atLastPositionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.map.setCenter([this.atLastPositionLngLat.x,this.atLastPositionLngLat.y]); //设置地图中心点 + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + } + })//取消 } } } diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index bbf9211..313e55e 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -40,14 +40,14 @@
天气 - + 气温
风力 - @@ -57,7 +57,7 @@ 风向 - @@ -67,10 +67,10 @@ - +
- + @@ -125,7 +125,7 @@ keyboard_arrow_up keyboard_arrow_down -