chenjingyu 4 years ago
parent
commit
5b647a9a61
  1. 14
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts
  2. 2
      src/app/ui/training-recordinfo/training-recordinfo.component.html
  3. 4
      src/app/ui/training-recordinfo/training-recordinfo.component.ts
  4. 4
      src/app/ui/water-road/water-road.component.html
  5. 4
      src/app/ui/water-road/water-road.component.scss
  6. 13
      src/app/ui/water-road/water-road.component.ts

14
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts

@ -59,6 +59,13 @@ export class FireFightingDeviceComponent implements OnInit {
elements.total = element.facilityCount[index]
elements.expanded = false});
});
if(sessionStorage.getItem("tabsindex") == "4"){
this.companyBuiltInGrouping = [this.companyBuiltInGrouping[1]]
this.companyOptionalGrouping = []
}
if(sessionStorage.getItem("tabsindex") == "5"){
this.companyBuiltInGrouping.splice(1,1)
}
}) //http
} //if
@ -254,6 +261,13 @@ export class FireFightingDeviceComponent implements OnInit {
newElement.total = elements.facilityCount[index]
newElement.expanded = false });
});
if(sessionStorage.getItem("tabsindex") == "4"){
element.buildingFacilityGroups = [element.buildingFacilityGroups[1]]
element.buildingOptionalGroups = []
}
if(sessionStorage.getItem("tabsindex") == "5"){
element.buildingFacilityGroups.splice(1,1)
}
})
});

2
src/app/ui/training-recordinfo/training-recordinfo.component.html

@ -13,7 +13,7 @@
<div class="content">
<div class="cardbox">
<mat-tab-group style="height: 97%;" [selectedIndex]="tabsSelectedIndex">
<mat-tab-group style="height: 97%;" [selectedIndex]="tabsSelectedIndex" (selectedTabChange)="selectedtab($event)">
<mat-tab label="行驶路线">
<ng-template matTabContent>

4
src/app/ui/training-recordinfo/training-recordinfo.component.ts

@ -15,4 +15,8 @@ export class TrainingRecordinfoComponent implements OnInit {
console.log($event);//data from child
this.tabsSelectedIndex = 1
}
selectedtab(e){
sessionStorage.setItem("tabsindex",e.index)
// console.log(e.index)
}
}

4
src/app/ui/water-road/water-road.component.html

@ -12,8 +12,8 @@
</div>
</div> -->
<div class="editbtn" (click)="opendialog()">
<p style="margin-top: 20px;"><mat-icon>create</mat-icon></p>
<p style="font-size: 16px;color: #fff;">编辑</p>
<p><mat-icon>create</mat-icon></p>
<p style="color: #fff;">编辑</p>
</div>
</div>

4
src/app/ui/water-road/water-road.component.scss

@ -25,12 +25,14 @@
bottom: 0.439453rem;
width: 0.976563rem;
height: 0.976563rem;
// line-height: 0.976563rem;
line-height: 0.859375rem;
background: linear-gradient(360deg, #FC7045 0%, #FF4923 100%);
box-shadow: 0px 2px 10px #D8A798;
border-radius: 50%;
opacity: 1;
p{
height: 0.175781rem;
font-size: 0.15625rem;
color: #fff;
}
}

13
src/app/ui/water-road/water-road.component.ts

@ -54,7 +54,15 @@ export class WaterRoadComponent implements OnInit {
{lng:108.158521,lat: 22.61322},
{lng:107.925062,lat: 22.565038},
{lng:108.180494,lat: 22.501616},
{lng:107.743222,lat: 22.535121}]
{lng:107.743222,lat: 22.535121},
{lng:108.373809,lat: 22.764746},
{lng:108.378895,lat: 22.761877},
{lng:108.383337,lat: 22.766467},
{lng:108.37647,lat: 22.763341},
{lng:108.37662,lat: 22.767397},
{lng:108.378916,lat: 22.758513},
{lng:108.379045,lat: 22.765695},
{lng:108.384731,lat: 22.760096},]
let Arr = []
arr.forEach(item=>{
let viaMarker = new AMap.Marker({
@ -66,6 +74,7 @@ export class WaterRoadComponent implements OnInit {
})
this.map = new AMap.Map('map',{
center: [108.377865, 22.763499], //初始地图中心点
zoom: 16
});
@ -73,7 +82,7 @@ export class WaterRoadComponent implements OnInit {
console.log(e.lnglat.getLng() + ',' + e.lnglat.getLat())
});
this.map.setCity('南宁市')
// this.map.setCity('南宁市')
this.map.add(Arr);//火源标点

Loading…
Cancel
Save