diff --git a/src/app/pages/gis-home/card-list/card-list.component.html b/src/app/pages/gis-home/card-list/card-list.component.html new file mode 100644 index 0000000..f120e5e --- /dev/null +++ b/src/app/pages/gis-home/card-list/card-list.component.html @@ -0,0 +1,15 @@ +
+
+ + {{title}} + + + + +
+
+ +
+
\ No newline at end of file diff --git a/src/app/pages/gis-home/card-list/card-list.component.scss b/src/app/pages/gis-home/card-list/card-list.component.scss new file mode 100644 index 0000000..bbfe11f --- /dev/null +++ b/src/app/pages/gis-home/card-list/card-list.component.scss @@ -0,0 +1,54 @@ +.box { + width: 280px; + font-size: 16px; + border: 1px solid #558DB1; +} +.title { + height: 32px; + line-height: 32px; + background-image: url(../../../../assets/gismap/listtitle.png); + background-size: 100% 100%; + background-repeat: no-repeat; + color: #fff; + box-sizing: border-box; + padding-left: 16px; + padding-right: 10px; + display: flex; + justify-content: space-between; + cursor: default; + .close{ + cursor: pointer; + } +} +.content { + max-height: 250px; + overflow-y: auto; + ul{ + margin-bottom: 0; + } + li { + height: 38px; + line-height: 38px; + padding-left: 16px; + padding-right: 10px; + color: #f7faff; + font-size: 15px; + cursor: pointer; + } + li:nth-child(odd) { + background: linear-gradient( + 90deg, + RGBA(17, 50, 83, 1), + RGBA(17, 50, 83, 0.8) + ); + } + li:nth-child(even) { + background: linear-gradient( + 90deg, + RGBA(38, 56, 73, 1), + RGBA(38, 56, 73, 0.8) + ); + border-top: 1px solid #3e4f60; + border-bottom: 1px solid #3e4f60; + } +} diff --git a/src/app/pages/gis-home/card-list/card-list.component.ts b/src/app/pages/gis-home/card-list/card-list.component.ts new file mode 100644 index 0000000..b692f8a --- /dev/null +++ b/src/app/pages/gis-home/card-list/card-list.component.ts @@ -0,0 +1,20 @@ +import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; + +@Component({ + selector: "app-card-list", + templateUrl: "./card-list.component.html", + styleUrls: ["./card-list.component.scss"], +}) +export class CardListComponent implements OnInit { + @Input() title; + @Input() data; + + @Output() childEvent = new EventEmitter(); + constructor() {} + + ngOnInit(): void {} + + close() { + this.childEvent.emit("closeCardList"); + } +} diff --git a/src/app/pages/gis-home/gis-home.component.html b/src/app/pages/gis-home/gis-home.component.html index 6ded6e1..cb897bc 100644 --- a/src/app/pages/gis-home/gis-home.component.html +++ b/src/app/pages/gis-home/gis-home.component.html @@ -2,9 +2,10 @@
-
+
- +
@@ -25,7 +26,8 @@
-
+ +
@@ -41,13 +43,13 @@
-
+
-
+
@@ -56,30 +58,7 @@
- +
+ +
\ No newline at end of file diff --git a/src/app/pages/gis-home/gis-home.component.scss b/src/app/pages/gis-home/gis-home.component.scss index 0c4a8a1..120b54a 100644 --- a/src/app/pages/gis-home/gis-home.component.scss +++ b/src/app/pages/gis-home/gis-home.component.scss @@ -138,4 +138,9 @@ bottom: 0; } - +.unitList { + position: absolute; + left: 24%; + top: 2%; + z-index: 500; +} diff --git a/src/app/pages/gis-home/gis-home.component.ts b/src/app/pages/gis-home/gis-home.component.ts index d2b0320..6e08b63 100644 --- a/src/app/pages/gis-home/gis-home.component.ts +++ b/src/app/pages/gis-home/gis-home.component.ts @@ -1172,4 +1172,28 @@ export class GisHomeComponent implements OnInit { MapClick(e) { console.log("点击坐标:", e.lnglat.getLng() + "," + e.lnglat.getLat()); } + + urlTo(url) { + window.open(url); + } + + unitList1 = ["广西有限公司", "重庆有限公司", "柳州有限公司"]; + unitList2 = [ + "芯恩集成电路有限公司", + "盛宏建材科技有限公司", + "高凯斯电子有限公司", + "君晟有限公司", + "昀朗建筑工程有限公司", + "必康有限公司", + ]; + isConnectedUnit = false; + handleChildData(e) { + console.log(e); + if (e === "openCardList") { + this.isConnectedUnit = true; + } + if (e === "closeCardList") { + this.isConnectedUnit = false; + } + } } diff --git a/src/app/pages/gis-home/unit-title/unit-title.component.html b/src/app/pages/gis-home/unit-title/unit-title.component.html index 75c8d6e..3848ec9 100644 --- a/src/app/pages/gis-home/unit-title/unit-title.component.html +++ b/src/app/pages/gis-home/unit-title/unit-title.component.html @@ -2,5 +2,5 @@
截至{{time}} , 已接入单位数 :
{{item}}
- -
\ No newline at end of file + +
\ No newline at end of file diff --git a/src/app/pages/gis-home/unit-title/unit-title.component.ts b/src/app/pages/gis-home/unit-title/unit-title.component.ts index f1b7099..91ec639 100644 --- a/src/app/pages/gis-home/unit-title/unit-title.component.ts +++ b/src/app/pages/gis-home/unit-title/unit-title.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from "@angular/core"; +import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; @Component({ selector: "app-unit-title", @@ -7,6 +7,8 @@ import { Component, Input, OnInit } from "@angular/core"; }) export class UnitTitleComponent implements OnInit { @Input() num: number; + + @Output() childEvent = new EventEmitter(); constructor() {} time: string; @@ -38,4 +40,9 @@ export class UnitTitleComponent implements OnInit { this.numArr = str.split(""); } } + + select(event) { + event.stopPropagation(); + this.childEvent.emit("openCardList"); + } } diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index a25f98b..621fa3f 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -1,8 +1,8 @@