From 2b904c17dbce1f9d8f881b27a9e03d7262359621 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 8 Sep 2021 15:22:27 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=95=B0=E6=8D=AE=E9=87=87?= =?UTF-8?q?=E9=9B=86=E8=BD=A6=E8=BE=86=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-collection/data-collection.module.ts | 5 +- .../fire-force/fire-force.component.html | 285 +++- .../fire-force/fire-force.component.scss | 531 ++++--- .../fire-force/fire-force.component.ts | 1263 ++++++++++------- .../export-excel/export-excel.component.ts | 4 +- src/assets/images/goback.png | Bin 0 -> 426 bytes src/styles.scss | 5 + 7 files changed, 1309 insertions(+), 784 deletions(-) create mode 100644 src/assets/images/goback.png diff --git a/src/app/data-collection/data-collection.module.ts b/src/app/data-collection/data-collection.module.ts index a689ae4..aa38d06 100644 --- a/src/app/data-collection/data-collection.module.ts +++ b/src/app/data-collection/data-collection.module.ts @@ -47,7 +47,7 @@ import { AddWater, WaterCollectionComponent } from './water-collection/water-col import { AddFireForce, FireForceComponent, ViewDetails } from './fire-force/fire-force.component'; import { AddLinkageForce, LinkageForcesComponent, ViewDetails2 } from './linkage-forces/linkage-forces.component'; import { NzTreeModule } from 'ng-zorro-antd/tree'; - +import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select'; @NgModule({ declarations: [WaterCollectionComponent, FireForceComponent, LinkageForcesComponent, AddWater, AddFireForce, ViewDetails, AddLinkageForce, ViewDetails2], imports: [ @@ -97,7 +97,8 @@ import { NzTreeModule } from 'ng-zorro-antd/tree'; FormsModule, ReactiveFormsModule, DataCollectionRoutingModule, - NzTreeModule + NzTreeModule, + // NzTreeSelectModule ] }) export class DataCollectionModule { } diff --git a/src/app/data-collection/fire-force/fire-force.component.html b/src/app/data-collection/fire-force/fire-force.component.html index 5e0e8df..004cbce 100644 --- a/src/app/data-collection/fire-force/fire-force.component.html +++ b/src/app/data-collection/fire-force/fire-force.component.html @@ -3,31 +3,35 @@
- 列表过滤 + 列表过滤 +
- +
@@ -38,27 +42,33 @@ 完整度
- - + + - + {{node.name}}
- {{node.fireForceDetailInfo ? accMul(node.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}% + {{node.fireForceDetailInfo ? + accMul(node.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}% -
+
-
highlight_off
+
+ highlight_off +
- - -
- {{item.name}} + {{item.name}}
@@ -127,14 +148,16 @@
详情
- - +
+
返回
- - close关闭 + + close关闭 +
@@ -167,10 +191,10 @@ - * + * 队站名称: - + @@ -194,7 +218,8 @@ 备注: - +

位置信息

@@ -209,16 +234,18 @@ 经度: - + 纬度: - + - +

人员数量

@@ -301,10 +328,10 @@ - * + * 队站名称: - + @@ -322,7 +349,8 @@ 备注: - +

位置信息

@@ -337,16 +365,18 @@ 经度: - + 纬度: - + - +

人员数量

@@ -370,7 +400,7 @@

联系方式

- + 站长姓名: @@ -449,9 +479,9 @@

基本信息

- + - * + * 队伍类型: @@ -479,8 +509,10 @@ 站长: - - + + @@ -492,8 +524,10 @@ 负责人: - - + + @@ -505,7 +539,8 @@ 备注: - +

位置信息

@@ -520,16 +555,18 @@ 经度: - + 纬度: - + - +

人员数量

@@ -553,7 +590,7 @@
-
+
@@ -562,33 +599,133 @@
-
+
- +
+
+
+
+
+ 列表过滤 +
+
+ + +
+
+ +
+
+ + + + + + + + + + + + + +
车辆名称所属队站完整度
{{item.name}}{{item.organization}} +
+ + {{item.integrityScore ? accMul(item.integrityScore.toFixed(3),100,1) : 0}}% + +
+
+
+
+ highlight_off +
+
+
+ +
+
+
+

基本信息

+
+
+ *车辆类别 + +
+
+

作战用信息

+

车载灭火剂

+

消防器材

+
+
+
-
+
highlight_off
+ || item.fileName.split('.')[item.fileName.split('.').length-1] == 'JPG'" class="thumbnailImg" + src="/api/Objects/PlanPlatform/{{item.objectName}}" alt=""> - - - + || item.fileName.split('.')[item.fileName.split('.').length-1] == 'doc'" class="thumbnailImg" + src="/assets/images/word.jpg" alt=""> + + +
{{item.fileName}} 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 ff93dcc..00d59eb 100644 --- a/src/app/data-collection/fire-force/fire-force.component.scss +++ b/src/app/data-collection/fire-force/fire-force.component.scss @@ -1,7 +1,7 @@ -.box{ +.box { width: 100%; height: 100%; - background-color: #F2F4F6; + background-color: #f2f4f6; display: flex; box-sizing: border-box; padding: 10px; @@ -9,43 +9,43 @@ font-weight: 400; color: #000000; } -.listbox{ +.listbox { width: 400px; height: 100%; background-color: #fff; display: flex; flex-direction: column; - .topbox{ + .topbox { max-height: 200px; box-sizing: border-box; padding: 10px 22px 22px; - .add{ + .add { height: 36px; line-height: 36px; display: flex; justify-content: space-between; } - .searchbox{ - .inputbox{ + .searchbox { + .inputbox { width: 100%; height: 36px; font-size: 14px; line-height: 36px; margin: 10px 0; display: flex; - span{ + span { margin-right: 5px; } - select,input{ + select, + input { flex: 1; - background-color: #F2F4F6; + background-color: #f2f4f6; border: 0; border-radius: 5px; box-sizing: border-box; - padding:0 8px; - + padding: 0 8px; } - .gray{ + .gray { color: gray; } // input::-moz-placeholder { @@ -61,12 +61,12 @@ } } } - .contantbox{ + .contantbox { flex: 1; overflow-y: auto; display: flex; flex-direction: column; - .title{ + .title { display: flex; justify-content: space-between; width: 100%; @@ -74,25 +74,25 @@ padding: 0 33px 0 22px; height: 36px; line-height: 36px; - span{ + span { font-size: 14px; font-weight: 500; } } - .fireForceTree{ + .fireForceTree { flex: 1; overflow-y: auto; - .nodename{ + .nodename { flex: 1; overflow: hidden; - text-overflow:ellipsis + text-overflow: ellipsis; } - .integrity{ + .integrity { width: 100px; height: 16px; position: relative; - background-color: #F2F4F6; - .integrityNum{ + background-color: #f2f4f6; + .integrityNum { position: absolute; left: 50%; top: 50%; @@ -101,23 +101,23 @@ font-size: 13px; cursor: default; } - .integrityColorDiv{ + .integrityColorDiv { height: 100%; } } - .mat-tree-node{ + .mat-tree-node { cursor: pointer; } - .selectedTreeNode{ + .selectedTreeNode { background-color: #d2eafd; } - .mat-tree-node:hover{ - background-color: #d2eafd; + .mat-tree-node:hover { + background-color: #d2eafd; } - .deletebtn{ + .deletebtn { width: 26px; text-align: center; - mat-icon{ + mat-icon { width: 20px; height: 20px; cursor: pointer; @@ -125,15 +125,15 @@ vertical-align: middle; color: rgba(49, 46, 46, 0.144); } - mat-icon:hover{ + mat-icon:hover { color: #000; } } } - .fireForceList{ + .fireForceList { flex: 1; overflow-y: auto; - li{ + li { cursor: pointer; width: 100%; height: 36px; @@ -141,24 +141,24 @@ display: flex; align-items: center; font-size: 14px; - div{ + div { float: left; box-sizing: border-box; } - .name{ + .name { text-align: left; width: 60%; padding-left: 22px; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } - .integrity{ + .integrity { height: 58%; width: 32%; position: relative; - background-color: #F2F4F6; - .integrityNum{ + background-color: #f2f4f6; + .integrityNum { position: absolute; left: 50%; top: 50%; @@ -167,14 +167,14 @@ font-size: 13px; cursor: default; } - .integrityColorDiv{ + .integrityColorDiv { height: 100%; } } - .deletebtn{ + .deletebtn { flex: 1; text-align: center; - mat-icon{ + mat-icon { width: 20px; height: 20px; cursor: pointer; @@ -182,102 +182,100 @@ vertical-align: text-top; color: rgba(49, 46, 46, 0.144); } - mat-icon:hover{ + mat-icon:hover { color: #000; } } } - li:hover{ + li:hover { background-color: #b3d3ee; } - .selectedLi{ + .selectedLi { background-color: #b3d3ee; } - } - .paginator{ + .paginator { height: 56px; width: 100%; } } } -.mapbox{ +.mapbox { flex: 1; margin-left: 10px; background-color: #fff; display: flex; flex-direction: column; - .mapcheckbox{ + .mapcheckbox { width: 100%; height: 50px; line-height: 50px; - mat-checkbox{ - margin-right:60px; + mat-checkbox { + margin-right: 60px; font-size: 15px; } - mat-checkbox:nth-child(1){ + mat-checkbox:nth-child(1) { margin-left: 20px; } } - #map{ + #map { flex: 1; position: relative; - #container{ + #container { width: 100%; height: 100%; } - .gistopbox{ + .gistopbox { position: absolute; box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); border-radius: 5px; top: 3px; width: 30%; - height:40px; - background: #FFFFFF; + height: 40px; + background: #ffffff; display: flex; align-items: center; - cursor: default;; - .inputBox{ + cursor: default; + .inputBox { width: 100%; display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-size: 14px; - .positionInput{ + .positionInput { border: 0; border-radius: 6px; width: 80%; height: 28px; - background: #F2F2F2; + background: #f2f2f2; margin-left: 8px; box-sizing: border-box; padding-left: 10px; } } - } - .hidden{ + .hidden { opacity: 0; z-index: -1; } - .show{ + .show { opacity: 1; z-index: 1; } } - .detailsbox{ + .detailsbox { width: 100%; - height:500px; + height: 500px; position: relative; transition: height 0.5s; - .putDown{ + .putDown { position: absolute; right: 0; top: -40px; cursor: pointer; } - .tabsbox{ + .tabsbox { // margin-top: 10px; width: 100%; height: 40px; @@ -287,28 +285,28 @@ display: flex; justify-content: space-between; font-size: 15px; - .tabs{ - div{ + .tabs { + div { float: left; width: 120px; text-align: center; cursor: pointer; color: #000000; opacity: 0.4; - border-right: 1px solid #F2F4F6; + border-right: 1px solid #f2f4f6; } - .selectedBtn{ - background-color: #2196F3; + .selectedBtn { + background-color: #2196f3; color: #fff; opacity: 1; } } - .btnbox{ + .btnbox { display: flex; align-items: center; flex: 1; justify-content: flex-end; - .uploadAttachment{ + .uploadAttachment { display: inline-block; margin-right: 20px; width: 120px; @@ -316,103 +314,114 @@ height: 28px; line-height: 28px; position: relative; - button{ + button { width: 100%; height: 28px; line-height: 28px; - mat-icon{ + mat-icon { transform: rotate(25deg); font-size: 20px; width: 20px; height: 20px; } } - .a-upload{ - display: inline-block; - position: absolute; - left: 0; - top: 0; - display: inline-block; - width: 100%; - height: 100%; - opacity: 0; - input{ + .a-upload { + display: inline-block; + position: absolute; + left: 0; + top: 0; + display: inline-block; + width: 100%; + height: 100%; + opacity: 0; + input { width: 100%; height: 100%; cursor: pointer; - } - } - } - span{ + } + } + } + span { display: inline-block; cursor: pointer; - color: #2196F3; - mat-icon{ + color: #2196f3; + mat-icon { vertical-align: sub; font-size: 20px; width: 20px; height: 20px; } } - span:hover{ - // text-decoration: underline; - } - .state{ - margin-right:30px; + .state { + margin-right: 30px; } - .submitAudit{ - margin-right:30px; + .submitAudit { + margin-right: 30px; } - .close{ + .close { margin-right: 30px; } + .goback{ + cursor: pointer; + display: flex; + align-items: center; + color: #2196f3; + img{ + width: 14px; + height: 14px; + margin-right: 5px; + } + margin-right: 12px; + } } } - .contant{ + .contant { width: 100%; - height:460px; + height: 460px; overflow-y: auto; - p{ - color: #2196F3; - background-color: #F2F4F6; + p { + color: #2196f3; + background-color: #f2f4f6; height: 33px; line-height: 33px; box-sizing: border-box; padding-left: 20px; font-size: 15px; } - span{ + span { font-size: 15px; } - input,select{ + input, + select { height: 30px; line-height: 30px; box-sizing: border-box; padding: 0 12px; width: 60%; margin-left: 5px; - border: 1px solid #EBEBEB; + border: 1px solid #ebebeb; border-radius: 5px; } - textarea{ + textarea { width: 89%; margin-left: 5px; height: 85%; - border: 1px solid #EBEBEB; + border: 1px solid #ebebeb; border-radius: 5px; } - .longinput{ + .longinput { width: 74%; } - .unitDiv{ + .unitDiv { width: 60%; position: relative; - input,select{ + input, + select { width: 100%; box-sizing: border-box; padding-right: 50px; } - .unit{ + .unit { position: absolute; right: 13px; top: 4px; @@ -420,14 +429,14 @@ opacity: 0.4; } } - .smallwidth{ + .smallwidth { width: 30%; } // 相关资料 - .fileDivBox{ + .fileDivBox { position: relative; float: left; - border: 1px solid #EBEBEB; + border: 1px solid #ebebeb; width: 160px; height: 162px; box-sizing: border-box; @@ -437,29 +446,29 @@ margin: 12px; align-items: center; cursor: pointer; - .imgbox{ + .imgbox { width: 134px; height: 110px; display: flex; justify-content: center; align-items: center; - .thumbnailImg{ + .thumbnailImg { width: 134px; height: 110px; } } - - span{ + + span { width: 100%; text-align: center; margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - color: gray; + color: gray; font-size: 14px; } - .deleteFile{ + .deleteFile { position: absolute; right: 0; top: 0; @@ -468,54 +477,179 @@ font-size: 18px; display: none; } - .btn{ + .btn { position: absolute; height: 30px; line-height: 30px; font-size: 14px; display: none; } - .btn1{ + .btn1 { top: 37px; } - .btn2{ + .btn2 { top: 78px; } } - .fileDivBox:hover{ + .fileDivBox:hover { border: 1px solid #000; - .deleteFile{ + .deleteFile { display: block; - } - .deleteFile:hover{ + .deleteFile:hover { color: red; } - .btn{ + .btn { display: block; } } + //车辆头部 + .cartopbox { + max-height: 200px; + box-sizing: border-box; + padding: 10px 22px; + .add { + height: 36px; + line-height: 36px; + display: flex; + justify-content: space-between; + margin-bottom: 5px; + } + .searchbox { + display: flex; + flex-wrap: wrap; + .inputbox { + width: 50%; + height: 40px; + font-size: 14px; + line-height: 40px; + margin: 5px 0; + display: flex; + justify-content: flex-end; + align-items: center; + span { + margin-right: 5px; + overflow: hidden; /*超出部分隐藏*/ + white-space: nowrap; /*不换行*/ + text-overflow: ellipsis; /*超出部分文字以...显示*/ + } + select, + input { + height: 100%; + width: 85%; + background-color: #f2f4f6; + border: 0; + border-radius: 5px; + box-sizing: border-box; + padding: 0 8px; + } + .shortselect{ + width: 68.5%; + } + .searchbtn{ + margin-left: 20px; + } + .gray { + color: gray; + } + } + } + } } - .masklayer{ + .carcontent{ + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + .carList{ + flex: 1; + overflow-y: auto; + box-sizing: border-box; + padding: 10px 22px; + border: 1px solid #F2F4F6; + table{ + width: 100%; + border-spacing:0px; + tr{ + height: 33px; + width: 100%; + td:nth-child(1){ + width: 46%; + } + td:nth-child(2){ + width: 26%; + } + td:nth-child(3){ + width: 26%; + } + td:nth-child(4){ + width: 2%; + display: flex; + align-items: center; + height: 33px; + } + td{ + border: none; + .integrity { + height: 18px; + width: 95%; + position: relative; + background-color: #f2f4f6; + .integrityNum { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + color: black; + font-size: 13px; + cursor: default; + } + .integrityColorDiv { + height: 100%; + } + } + .deleteFile{ + cursor: pointer; + } + } + .td1,.td2{ + color: #2196F3; + } + } + .caritem:hover{ + border: 0px; + cursor: default; + background-color: #d2eafd; + } + + } + + } + .pagingDevice{ + width: 100%; + height: 40px; + } + } + .masklayer { position: absolute; left: 0; top: 0; z-index: 2000; width: 100%; height: 100%; - background: rgba(0,0,0,0.2); + background: rgba(0, 0, 0, 0.2); display: flex; justify-content: center; align-items: center; flex-direction: column; - span{ + span { font-size: 14px; margin-top: 5px; } - .progressbar{ + .progressbar { width: 15%; } - .cancelbtn{ + .cancelbtn { height: 32px; line-height: 32px; font-size: 14px; @@ -523,8 +657,8 @@ } } } - .noHeight{ - .tabsbox{ + .noHeight { + .tabsbox { margin-top: 10px; } height: 0px; @@ -532,34 +666,33 @@ } } - -.addWaterBox{ +.addWaterBox { width: 260px; height: 284px; display: flex; flex-direction: column; - .topbox{ + .topbox { width: 100%; height: 40px; line-height: 40px; - background-color: #2196F3; + background-color: #2196f3; text-align: center; - color: #FFFFFF; + color: #ffffff; font-size: 15px; } - .contant{ + .contant { flex: 1; box-sizing: border-box; padding: 0 30px; display: flex; flex-direction: column; justify-content: space-around; - div{ + div { width: 100%; height: 36px; line-height: 36px; text-align: center; - background-color: #F2F4F6; + background-color: #f2f4f6; font-size: 14px; cursor: pointer; border: 1px solid #fff; @@ -567,25 +700,25 @@ display: flex; justify-content: center; align-items: center; - img{ + img { margin-right: 3px; } } - .selectedDiv{ - background-color: #2196F3; + .selectedDiv { + background-color: #2196f3; color: #fff; - border: 1px solid #2196F3; + border: 1px solid #2196f3; } } - .btnbox{ + .btnbox { width: 100%; height: 50px; box-sizing: border-box; padding: 0px 30px; display: flex; - align-items: flex-start;; + align-items: flex-start; justify-content: space-between; - button{ + button { width: 80px; height: 36px; line-height: 36px; @@ -593,109 +726,111 @@ } } - -@media screen and (max-width:1400px){ - .box{ +@media screen and (max-width: 1400px) { + .box { padding: 5px; font-size: 14px; } - .listbox{ + .listbox { width: 310px; - .contantbox{ - .waterList{ - li{ - .address{ + .contantbox { + .waterList { + li { + .address { width: 50%; } - .integrity{ + .integrity { width: 36%; } } } } } - .mapbox{ - .mapcheckbox{ + .mapbox { + .mapcheckbox { height: 30px; line-height: 30px; } - #map{ - .gistopbox{ + #map { + .gistopbox { width: 43%; } } - .detailsbox{ - height:338px; + .detailsbox { + height: 338px; transition: height 0.5s; - .tabsbox{ + .tabsbox { // margin-top: 5px; height: 38px; line-height: 38px; - .tabs{ - div{ + .tabs { + div { width: 90px; } } - .btnbox{ - .uploadAttachment{ + .btnbox { + .uploadAttachment { margin-right: 12px; width: 80px; - button{ - mat-icon{ + button { + mat-icon { display: none; } } - } - .state{ - margin-right:12px; } - .submitAudit{ - margin-right:12px; + .state { + margin-right: 12px; + } + .submitAudit { + margin-right: 12px; } - .close{ + .close { margin-right: 12px; } + + } } - .contant{ - height:300px; - - p{ + .contant { + height: 300px; + + p { padding-left: 20px; font-size: 14px; } - span{ + span { font-size: 14px; } - input,select{ + input, + select { width: 50%; } - textarea{ + textarea { width: 87%; } - .longinput{ + .longinput { width: 66%; } - .unitDiv{ + .unitDiv { width: 50%; position: relative; } - .setPositionBtn{ - width:85px; + .setPositionBtn { + width: 85px; text-align: center; margin-right: 8px; - mat-icon{ + mat-icon { display: none; } } } } - .noHeight{ - .tabsbox{ + .noHeight { + .tabsbox { margin-top: 10px; } height: 0px; transition: height 0.5s; } } -} \ 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 07eff1d..495a934 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -20,77 +20,319 @@ declare var CryptoJS }) export class FireForceComponent implements OnInit { - constructor(private tree: TreeService,public snackBar: MatSnackBar,private http:HttpClient,private elementRef: ElementRef,public renderer2: Renderer2,public dialog: MatDialog) { } - - isCheckedOfSearchDiv:boolean = true//列表过滤滑块 - slideChange(e){ + constructor(private tree: TreeService, public snackBar: MatSnackBar, private http: HttpClient, private elementRef: ElementRef, public renderer2: Renderer2, public dialog: MatDialog) { } + + isCheckedOfSearchDiv: boolean = true//列表过滤滑块 + slideChange(e) { this.isCheckedOfSearchDiv = e.checked } - searchForm:any = { - name:'', - integrityNum:'' + + searchForm: any = { + name: '', + integrityNum: '', + } + carSearchForm: any = { + name: '', + organization: '', + carType: '', + integrityNum: '' + } + listIntegrityNum: any[] = [ + { id: -1, name: '全部' }, + { id: 0, name: '<=50%' }, + { id: 1, name: '50%-60%' }, + { id: 2, name: '60%-70%' }, + { id: 3, name: '70%-80%' }, + { id: 4, name: '80%-90%' }, + { id: 5, name: '90%-100%' } + ] + checkBoxList: any[] = [ + { id: 0, name: '总队', isChecked: false }, + { id: 1, name: '支队', isChecked: false }, + { id: 2, name: '大队', isChecked: false }, + { id: 3, name: '中队(消防站)', isChecked: false }, + { id: 4, name: '其他消防队伍', isChecked: false } + ] + isCarCheckedOfSearchDiv: boolean = true//车辆列表过滤滑块 + carslideChange(e) { + this.isCarCheckedOfSearchDiv = e.checked } - listIntegrityNum:any[] = [ - {id:-1,name:'全部'}, - {id:0,name:'<=50%'}, - {id:1,name:'50%-60%'}, - {id:2,name:'60%-70%'}, - {id:3,name:'70%-80%'}, - {id:4,name:'80%-90%'}, - {id:5,name:'90%-100%'} + carsList: any = [ + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.72 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.52 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.32 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.02 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + { id: 0, name: '【沪C5869应急】沃尔沃18米高喷车', organization: '浦东支队', integrityScore: 0.92 }, + ] - checkBoxList:any[] = [ - {id:0,name:'总队',isChecked:false}, - {id:1,name:'支队',isChecked:false}, - {id:2,name:'大队',isChecked:false}, - {id:3,name:'中队(消防站)',isChecked:false}, - {id:4,name:'其他消防队伍',isChecked:false} + dataLength: any //获取的数据一共多少条 + PageNumber: any = 1 //当前第几页 + //分页事件 + chagePage(e) { + this.PageNumber = e.pageIndex + 1 + // this.getAllWaterData() + } + //进入车辆详情页 + carPageIndex: number = 0 + openCarDetails(item) { + this.carPageIndex = 1 + } + //返回车辆列表页 + goback() { + this.carPageIndex = 0 + } + //消防车类型 + carTpyeList: any = [ + { + name: '灭火类消防车', + children: [ + { name: '水罐车' }, + { name: '泡沫车' }, + { name: '高倍数泡沫车' }, + { name: '干粉车' }, + { name: '干粉泡沫联用车' }, + { name: '干粉水联用车' }, + { name: '干粉二氧化碳联用车' }, + { name: '涡喷车' }, + { name: '液氮车' }, + { name: '二氧化碳车' }, + { name: '其他灭火消防车' } + ] + }, + { + name: '举高类消防车', + children: [ + { name: '高喷车' }, + { name: '曲臂登高车' }, + { name: '直臂登高车' }, + { name: '其他举高消防车' } + ] + }, + { + name: '专勤类消防车', + children: [ + { name: '抢险救援车' }, + { name: '侦检车' }, + { name: '勘察车' }, + { name: '排烟车' }, + { name: '照明车' }, + { name: '宣传车' }, + { name: '排烟照明车' }, + { name: '通信指挥车' }, + { name: '有毒气体处置车' }, + { name: '防化消防车' }, + { name: '挖掘车' }, + { name: '铲车' }, + { name: '破拆车' }, + { name: '其他专勤消防车' } + ] + }, + { + name: '后援类消防车', + children: [ + { name: '饮食保障车' }, + { name: '卫勤保障车' }, + { name: '排障车' }, + { name: '装备抢修车' }, + { name: '拖车车' }, + { name: '运兵车' }, + { name: '运输车' }, + { name: '运渣车' }, + { name: '吊车' }, + { name: '移动供气车' }, + { name: '移动供液车' }, + { name: '油料供给车' }, + { name: '远程供水车(水泵)' }, + { name: '远程供水车(水带铺设)' }, + { name: '宿营车' }, + { name: '发电车' }, + { name: '淋浴车' }, + { name: '其他后援消防车' } + ] + }, + { + name: '机场消防车', + children: [ + { name: '机场快速调动消防车' }, + { name: '机场主力泡沫消防车' }, + { name: '其他机场消防车' }, + { name: '防爆消防车' }, + { name: '轨道消防车(GD)' } + ] + }, + { + name: '消防摩托车', + children: [ + { name: '灭火消防摩托车' }, + { name: '抢险救援摩托车' }, + { name: '其他消防摩托车' } + ] + }, + { + name: '联动类车辆', + children: [ + { name: '急救车' }, + { name: '警用指挥车' }, + { name: '警用巡逻车' }, + { name: '警用摩托车' }, + { name: '电力抢修车' }, + { name: '水力抢修车' }, + { name: '燃气抢修车' }, + { name: '特种工程车' }, + { name: '环保监测车' }, + { name: '其他联动车辆' } + ] + }, + { + name: '其他消防车辆' + } + ] + expandKeys = ['100', '1001']; + value?: string; + nodes = [ + { + title: 'parent 1', + key: '100', + children: [ + { + title: 'parent 1-0', + key: '1001', + children: [ + { title: 'leaf 1-0-0', key: '10010', isLeaf: true }, + { title: 'leaf 1-0-1', key: '10011', isLeaf: true } + ] + }, + { + title: 'parent 1-1', + key: '1002', + children: [{ title: 'leaf 1-1-0', key: '10020', isLeaf: true }] + } + ] + } + ]; + + onChange($event: string): void { + console.log($event); + } + + //车辆详细信息 + carData: any = { + basicInfo: { + carType: '',//车辆类别 + carName: '', + carNumber: '', + carOrganization: '' + }, + fightInfo: { + pumpFlow: '',//水泵流量 + fireGunFlow: '',//消防炮流量 + pumpPressure: '',//水泵额定压力 + waterCapacity: '',//载水量 + carHeight: '',//车辆高度 + carState: '',//车辆状态 + remark: '',//备注 + carPhoto: []//车辆照片 + }, + carExtinguishant: {//车载灭火剂 + isExpand: false, + data: [ + { + extinguishantType: '',//灭火剂类型 + extinguishantName: '',//灭火剂名称 + extinguishantOr: '',//所属队站 + mixingRatio: '',//混合比 + capacity: '',//车载量 + manufacturer: '',//成产厂家 + remark: ''//备注 + } + ] + }, + fireEquipment: {//消防器材 + isExpand: false, + data: [ + { + equipmentType: '',//器材类别 + equipmentName: '',//器材名称 + equipmentOr: '',//所属队站 + capacity: '',//车载量 + manufacturer: '',//成产厂家 + remark: ''//备注 + } + ] + } + } + + + + + + + + + + + + + + //勾选力量类型checkbox在地图上显示marker - checkBoxChange(){ + checkBoxChange() { let Levels = [] - this.checkBoxList.forEach(item =>{ - if(item.isChecked){ + this.checkBoxList.forEach(item => { + if (item.isChecked) { Levels.push(item.id) } }) - let params:any = { - PageSize : 999999, - Levels:Levels + let params: any = { + PageSize: 999999, + Levels: Levels } - if(Levels.length != 0){//如果勾选了checkbox - this.http.get('/api/CustomFireForce',{params:params}).subscribe((data:any) => { + if (Levels.length != 0) {//如果勾选了checkbox + this.http.get('/api/CustomFireForce', { params: params }).subscribe((data: any) => { this.createMarker(data) }) - }else{ + } else { this.cluster.setData([]) } } //循环渲染出所有力量markers - cluster:IMarkerCluster //力量聚合实例 - createMarker(list){ + cluster: IMarkerCluster //力量聚合实例 + createMarker(list) { let markerArrcluster = [] this.cluster ? this.cluster.setData([]) : null list.forEach((item) => { let image - if(item.forceType == 2){ + if (item.forceType == 2) { image = '/assets/fireForcesMarkers/qita.png' - }else if(item.level == 0){ + } else if (item.level == 0) { image = '/assets/fireForcesMarkers/zongdui.png' - }else if(item.level == 1){ + } else if (item.level == 1) { image = '/assets/fireForcesMarkers/zhidui.png' - }else if(item.level == 2){ + } else if (item.level == 2) { image = '/assets/fireForcesMarkers/dadui.png' - }else if(item.level == 3){ + } else if (item.level == 3) { image = '/assets/fireForcesMarkers/zhongdui.png' } // 用于点集合的数组 - item.fireForceDetailInfo.location ? - markerArrcluster.push({ - lnglat : [item.fireForceDetailInfo.location.x,item.fireForceDetailInfo.location.y], - image : image, - data : item - }) : null + item.fireForceDetailInfo.location ? + markerArrcluster.push({ + lnglat: [item.fireForceDetailInfo.location.x, item.fireForceDetailInfo.location.y], + image: image, + data: item + }) : null }) var gridSize = 60 @@ -98,167 +340,167 @@ export class FireForceComponent implements OnInit { let render = MapFactory.RenderClusterMarkerInstance(); render.contentRender = (contextCount) => { - var factor = Math.pow(contextCount / count, 1 / 18); - var div = document.createElement('div'); - var Hue = 180 - factor * 180; - var bgColor = 'hsla(' + Hue + ',100%,40%,0.7)'; - var fontColor = 'hsla(' + Hue + ',100%,90%,1)'; - var borderColor = 'hsla(' + Hue + ',100%,40%,1)'; - var shadowColor = 'hsla(' + Hue + ',100%,90%,1)'; - div.style.backgroundColor = bgColor; - var size = Math.round(30 + Math.pow(contextCount / count, 1 / 5) * 20); - div.style.width = div.style.height = size + 'px'; - div.style.border = 'solid 1px ' + borderColor; - div.style.borderRadius = size / 2 + 'px'; - div.style.boxShadow = '0 0 5px ' + shadowColor; - div.innerHTML = contextCount; - div.style.lineHeight = size + 'px'; - div.style.color = fontColor; - div.style.fontSize = '14px'; - div.style.textAlign = 'center'; - return div; + var factor = Math.pow(contextCount / count, 1 / 18); + var div = document.createElement('div'); + var Hue = 180 - factor * 180; + var bgColor = 'hsla(' + Hue + ',100%,40%,0.7)'; + var fontColor = 'hsla(' + Hue + ',100%,90%,1)'; + var borderColor = 'hsla(' + Hue + ',100%,40%,1)'; + var shadowColor = 'hsla(' + Hue + ',100%,90%,1)'; + div.style.backgroundColor = bgColor; + var size = Math.round(30 + Math.pow(contextCount / count, 1 / 5) * 20); + div.style.width = div.style.height = size + 'px'; + div.style.border = 'solid 1px ' + borderColor; + div.style.borderRadius = size / 2 + 'px'; + div.style.boxShadow = '0 0 5px ' + shadowColor; + div.innerHTML = contextCount; + div.style.lineHeight = size + 'px'; + div.style.color = fontColor; + div.style.fontSize = '14px'; + div.style.textAlign = 'center'; + return div; }; render.pixelRender = (contextCount) => { - var size = Math.round(30 + Math.pow(contextCount / count, 1 / 5) * 20); - return MapFactory.PixelInstance(-size / 2, -size / 2); + var size = Math.round(30 + Math.pow(contextCount / count, 1 / 5) * 20); + return MapFactory.PixelInstance(-size / 2, -size / 2); }; render.contentNonRender = (src) => { - return ``; + return ``; }; render.pixelNonRender = () => { - return MapFactory.PixelInstance(-15, -15); + return MapFactory.PixelInstance(-15, -15); } this.cluster = MapFactory.MarkerClusterInstance(this.map, markerArrcluster, { gridSize: gridSize, // 设置网格像素大小 render: render //自定义聚合点样式, 自定义非聚合点样式 }); - this.cluster.on('click',(e)=>{ - if(e.clusterData.length == 1){ + this.cluster.on('click', (e) => { + if (e.clusterData.length == 1) { let node = e.clusterData[0].data // console.log(node) this.clearData() this.selectedFireForce = node.fireForceDetailInfo this.selectedFireForceId = node.fireForceDetailId - if(node.forceType != 0){//如果是其他消防力量 + if (node.forceType != 0) {//如果是其他消防力量 this.selectedFireForceLevel = 4 - }else{ + } else { this.selectedFireForceLevel = node.level } this.FireForceDetailInfo.stationName = node.fireForceDetailInfo.name - if(node.fireForceDetailId){ + if (node.fireForceDetailId) { let type - if(node.forceType == 0){ + if (node.forceType == 0) { type = 0 - }else{ + } else { type = 1 } this.isMasklayer = true - this.http.get(`/api/FireForceDetail/${type}/${node.id}`).subscribe((data:any) => { + this.http.get(`/api/FireForceDetail/${type}/${node.id}`).subscribe((data: any) => { this.isMasklayer = false this.FireForceDetailInfo = data - if(data.location && data.location.x){//如果已经标注单位坐标 + if (data.location && data.location.x) {//如果已经标注单位坐标 this.positionLngLat = data.location } //相关资料 data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null - if(node.forceType == 0 && node.level == 0){ + if (node.forceType == 0 && node.level == 0) { this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData this.ZongcontactData = JSON.parse(data.contactData) || this.ZongcontactData } - if(node.forceType == 0 && node.level == 1){ + if (node.forceType == 0 && node.level == 1) { this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData this.ZhicontactData = JSON.parse(data.contactData) || this.ZhicontactData } - if(node.forceType == 0 && (node.level == 2 || node.level == 3)){ - this.DaZhongpersonCountData = JSON.parse(data.personCountData) || this.DaZhongpersonCountData + if (node.forceType == 0 && (node.level == 2 || node.level == 3)) { + this.DaZhongpersonCountData = JSON.parse(data.personCountData) || this.DaZhongpersonCountData this.DaZhongcontactData = JSON.parse(data.contactData) || this.DaZhongcontactData } - if(node.forceType != 0){ + if (node.forceType != 0) { this.otherpersonCountData = JSON.parse(data.personCountData) || this.otherpersonCountData this.othercontactData = JSON.parse(data.contactData) || this.otherpersonCountData } }) - + } //寻找管辖单位 this.allFireForceList.forEach(item => { - if(item.id == node.parentId){ + if (item.id == node.parentId) { this.superior.name = item.name this.superior.code = item.code } }) } - },this) + }, this) } - ngOnInit(): void { + ngOnInit(): void { this.getAllFireForce() setTimeout(() => { this.createMap() }, 0); } //获得所有消防力量 - newdata:any - allFireForceList:any= [] - getAllFireForce(){ + newdata: any + allFireForceList: any = [] + getAllFireForce() { let MinIntegrity = 0 let MaxIntegrity = 1.1 - if(this.searchForm.integrityNum == '0'){ + if (this.searchForm.integrityNum == '0') { MinIntegrity = 0 MaxIntegrity = 0.5 - }else if(this.searchForm.integrityNum == '1'){ + } else if (this.searchForm.integrityNum == '1') { MinIntegrity = 0.5 MaxIntegrity = 0.6 - }else if(this.searchForm.integrityNum == '2'){ + } else if (this.searchForm.integrityNum == '2') { MinIntegrity = 0.6 MaxIntegrity = 0.7 - }else if(this.searchForm.integrityNum == '3'){ + } else if (this.searchForm.integrityNum == '3') { MinIntegrity = 0.7 MaxIntegrity = 0.8 - }else if(this.searchForm.integrityNum == '4'){ + } else if (this.searchForm.integrityNum == '4') { MinIntegrity = 0.8 MaxIntegrity = 0.9 - }else if(this.searchForm.integrityNum == '5'){ + } else if (this.searchForm.integrityNum == '5') { MinIntegrity = 0.9 MaxIntegrity = 1.1 - }else if(this.searchForm.integrityNum == '-1'){ + } else if (this.searchForm.integrityNum == '-1') { MinIntegrity = 0 MaxIntegrity = 1.1 } - let params:any = { - Keyword : this.searchForm.name ? this.searchForm.name : '', - MinIntegrity : MinIntegrity, - MaxIntegrity : MaxIntegrity + let params: any = { + Keyword: this.searchForm.name ? this.searchForm.name : '', + MinIntegrity: MinIntegrity, + MaxIntegrity: MaxIntegrity } - this.http.get('/api/CustomFireForce',{params:params}).subscribe((data:any) => { + this.http.get('/api/CustomFireForce', { params: params }).subscribe((data: any) => { this.allFireForceList = data -    this.dataSource.data = this.tree.toTree(data) + this.dataSource.data = this.tree.toTree(data) this.treeControl.expand(this.treeControl.dataNodes[0]); }) } - upDateAllFireForce = ():void=>{ - this.http.get('/api/CustomFireForce').subscribe((data:any) => { -    this.newdata = this.tree.toTree(data) - const nodes = this.treeControl.dataNodes; - const expandNodes = []; - nodes.forEach((item) => { - if(item.expandable && this.treeControl.isExpanded(item)){ - expandNodes.push(item.id); - } - }); - this.dataSource.data = this.newdata; - let newNodes = this.treeControl.dataNodes; - newNodes = newNodes.filter(n => { - return expandNodes.indexOf(n.id) >= 0; - }); - newNodes.forEach(item => { - this.treeControl.expand(item); - }); - }) + upDateAllFireForce = (): void => { + this.http.get('/api/CustomFireForce').subscribe((data: any) => { + this.newdata = this.tree.toTree(data) + const nodes = this.treeControl.dataNodes; + const expandNodes = []; + nodes.forEach((item) => { + if (item.expandable && this.treeControl.isExpanded(item)) { + expandNodes.push(item.id); + } + }); + this.dataSource.data = this.newdata; + let newNodes = this.treeControl.dataNodes; + newNodes = newNodes.filter(n => { + return expandNodes.indexOf(n.id) >= 0; + }); + newNodes.forEach(item => { + this.treeControl.expand(item); + }); + }) } private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数 return { @@ -267,70 +509,70 @@ export class FireForceComponent implements OnInit { level: level, id: node.id, parentId: node.parentId, - enabled:node.enabled, - order:node.order, - children:node.children, - code:node.code, - division:node.division, - fireForceDetailId:node.fireForceDetailId, - forceType:node.forceType, - fireForceDetailInfo:node.fireForceDetailInfo, - contentVerify:node.contentVerify, + enabled: node.enabled, + order: node.order, + children: node.children, + code: node.code, + division: node.division, + fireForceDetailId: node.fireForceDetailId, + forceType: node.forceType, + fireForceDetailInfo: node.fireForceDetailInfo, + contentVerify: node.contentVerify, }; } treeControl = new FlatTreeControl(node => node.level, node => node.expandable); treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); hasChild = (_: number, node: any) => node.expandable; - selectedFireForceId:any - selectedFireForceLevel:any - selectedFireForce:any + selectedFireForceId: any + selectedFireForceLevel: any + selectedFireForce: any //选择要显示的消防力量 - superior:any = { //上级单位 - name:'', - code:'' + superior: any = { //上级单位 + name: '', + code: '' } - selectTreeNode(node){ + selectTreeNode(node) { // console.log(node) this.isGisTopBox = false - if(this.selectedFireForceId != node.id){ + if (this.selectedFireForceId != node.id) { this.clearData() this.selectedFireForce = node this.selectedFireForceId = node.id - if(node.forceType != 0){//如果是其他消防力量 + if (node.forceType != 0) {//如果是其他消防力量 this.selectedFireForceLevel = 4 - }else{ + } else { this.selectedFireForceLevel = node.level } this.FireForceDetailInfo.stationName = node.name - if(this.newPositionMarker){ + if (this.newPositionMarker) { this.map.remove(this.newPositionMarker); } - if(node.fireForceDetailId){ + if (node.fireForceDetailId) { this.isPost = false//是否走post创建接口 let type - if(node.forceType == 0){ + if (node.forceType == 0) { type = 0 - }else{ + } else { type = 1 } this.isMasklayer = true - this.http.get(`/api/FireForceDetail/${type}/${node.id}`).subscribe((data:any) => { + this.http.get(`/api/FireForceDetail/${type}/${node.id}`).subscribe((data: any) => { this.isMasklayer = false this.FireForceDetailInfo = data // console.log(888,data) - if(data.location && data.location.x){//如果已经标注单位坐标 + if (data.location && data.location.x) {//如果已经标注单位坐标 this.positionLngLat = data.location - this.map.setCenter([data.location.x,data.location.y]); + this.map.setCenter([data.location.x, data.location.y]); this.newPositionMarker = MapFactory.MarkerInstance({ - position: [data.location.x,data.location.y], + position: [data.location.x, data.location.y], content: this.newPositionMarkerContent, offset: MapFactory.PixelInstance(-15, -18) }) // 将 markers 添加到地图 this.map.add(this.newPositionMarker); - }else{ + } else { this.map.setCity('上海市'); } //相关资料 @@ -352,6 +594,9 @@ export class FireForceComponent implements OnInit { this.otherpersonCountData = JSON.parse(data.personCountData) || this.otherpersonCountData this.othercontactData = JSON.parse(data.contactData) || this.othercontactData } + }, err => { + this.isMasklayer = false + alert('获取信息错误!') }) } else { @@ -360,7 +605,7 @@ export class FireForceComponent implements OnInit { //寻找管辖单位 this.allFireForceList.forEach(item => { - if(item.id == node.parentId){ + if (item.id == node.parentId) { this.superior.name = item.name this.superior.code = item.code } @@ -368,65 +613,64 @@ export class FireForceComponent implements OnInit { } } //搜索 - isTreeView:boolean = true//决定显示树还是列表 - searchList(){ - if(!this.searchForm.name && !this.searchForm.integrityNum){ + isTreeView: boolean = true//决定显示树还是列表 + searchList() { + if (!this.searchForm.name && !this.searchForm.integrityNum) { this.isTreeView = true - }else{ + } else { this.isTreeView = false } this.getAllFireForce() } //重置搜索 - reset(){ + reset() { this.isTreeView = true this.selectedFireForceLevel = null this.searchForm = { - name:'', - integrityNum:'' + name: '', + integrityNum: '' } this.getAllFireForce() } //js乘法 - accMul(arg1,arg2,fix) { - if(!parseInt(fix)==fix) - { - return; + accMul(arg1, arg2, fix) { + if (!parseInt(fix) == fix) { + return; } - var m=0,s1=arg1.toString(),s2=arg2.toString(); - try{m+=s1.split(".")[1].length}catch(e){} - try{m+=s2.split(".")[1].length}catch(e){} - if(m>fix){ - return (Math.round(Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m-fix))/Math.pow(10,fix)); - }else if(m<=fix){ - return (Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)).toFixed(fix); - }else{ - return (arg1*arg2).toFixed(fix).toString(); - } - } + var m = 0, s1 = arg1.toString(), s2 = arg2.toString(); + try { m += s1.split(".")[1].length } catch (e) { } + try { m += s2.split(".")[1].length } catch (e) { } + if (m > fix) { + return (Math.round(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m - fix)) / Math.pow(10, fix)); + } else if (m <= fix) { + return (Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)).toFixed(fix); + } else { + return (arg1 * arg2).toFixed(fix).toString(); + } + } //完整度颜色 - integrity(width){ + integrity(width) { let _this = this - let style:any = {} - style.width = width +'%'; - if(width < 30){ + let style: any = {} + style.width = width + '%'; + if (width < 30) { style.background = '#FF5D4A' } - if(width >= 30 && width < 60){ + if (width >= 30 && width < 60) { style.background = '#FFDD00' } - if(width >= 60){ + if (width >= 60) { style.background = '#5CD64E' } return style } //删除某条消防队 - deleteFireForce(item,e){ + deleteFireForce(item, e) { e.stopPropagation() // console.log(this.dataSource.data) let isDelete = window.confirm(`确定要删除${item.name}吗`) - if(isDelete){ + if (isDelete) { // this.http.delete(`/api/CustomFireForce/${item.id}`).subscribe(data => { // let config = new MatSnackBarConfig(); // config.verticalPosition = 'top'; @@ -444,219 +688,219 @@ export class FireForceComponent implements OnInit { itemId: item.id, verifyState: 3, } - this.http.post('/api/ContentVerifies',body).subscribe((data) => { + this.http.post('/api/ContentVerifies', body).subscribe((data) => { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('删除审核提交成功','确定',config); + this.snackBar.open('删除审核提交成功', '确定', config); item.contentVerify = data }) } } //当前点击tab页面第几个 - tabIndex:any = 1 - selectedTab(index){ + tabIndex: any = 1 + selectedTab(index) { this.tabIndex = index } //消防力量详情提交信息 - FireForceDetailInfo:any = { + FireForceDetailInfo: any = { // id:'',//编号 - stationName:'',//队站名称 - isIndependentAlarm:true,//是否独立报警 - phoneNumber:'',//联系电话 - faxNumber:'',//传真 - jurisdictionArea:null,//辖区面积 - remark:'',//备注 - address:'',//地址 - location:{ - x:'', - y:'' + stationName: '',//队站名称 + isIndependentAlarm: true,//是否独立报警 + phoneNumber: '',//联系电话 + faxNumber: '',//传真 + jurisdictionArea: null,//辖区面积 + remark: '',//备注 + address: '',//地址 + location: { + x: '', + y: '' }, - personCountData:[],//人员数量自定义 - contactData:[],//联系方式自定义 - dutyForceData:[],//执勤力量自定义 - relevantInfomationData:[]//相关资料 + personCountData: [],//人员数量自定义 + contactData: [],//联系方式自定义 + dutyForceData: [],//执勤力量自定义 + relevantInfomationData: []//相关资料 } //总队支队人员数量 - ZongpersonCountData:any=[ - {PropertyName :'现役官兵人数',PropertyValue:''}, - {PropertyName :'政府专职消防员数',PropertyValue:''}, - {PropertyName :'消防文员数',PropertyValue:''} + ZongpersonCountData: any = [ + { PropertyName: '现役官兵人数', PropertyValue: '' }, + { PropertyName: '政府专职消防员数', PropertyValue: '' }, + { PropertyName: '消防文员数', PropertyValue: '' } ] //总队联系方式 - ZongcontactData:any=[ - {PropertyName :'总队长名称',PropertyValue:''}, - {PropertyName :'总队长联系方式',PropertyValue:''}, - {PropertyName :'总队政委名称',PropertyValue:''}, - {PropertyName :'总队政委联系方式',PropertyValue:''} + ZongcontactData: any = [ + { PropertyName: '总队长名称', PropertyValue: '' }, + { PropertyName: '总队长联系方式', PropertyValue: '' }, + { PropertyName: '总队政委名称', PropertyValue: '' }, + { PropertyName: '总队政委联系方式', PropertyValue: '' } ] //支队联系方式 - ZhicontactData:any=[ - {PropertyName :'支队长名称',PropertyValue:''}, - {PropertyName :'支队长联系方式',PropertyValue:''}, - {PropertyName :'支队政委名称',PropertyValue:''}, - {PropertyName :'支队政委联系方式',PropertyValue:''} + ZhicontactData: any = [ + { PropertyName: '支队长名称', PropertyValue: '' }, + { PropertyName: '支队长联系方式', PropertyValue: '' }, + { PropertyName: '支队政委名称', PropertyValue: '' }, + { PropertyName: '支队政委联系方式', PropertyValue: '' } ] //大队中队人员数量 - DaZhongpersonCountData:any=[ - {PropertyName :'现役人员',PropertyValue:''}, - {PropertyName :'政府专职消防员数',PropertyValue:''}, - {PropertyName :'每日执勤人数',PropertyValue:''} + DaZhongpersonCountData: any = [ + { PropertyName: '现役人员', PropertyValue: '' }, + { PropertyName: '政府专职消防员数', PropertyValue: '' }, + { PropertyName: '每日执勤人数', PropertyValue: '' } ] //大队中队联系方式 - DaZhongcontactData:any=[ - {PropertyName :'站长姓名',PropertyValue:''}, - {PropertyName :'站长联系方式',PropertyValue:''}, - {PropertyName :'指导员姓名',PropertyValue:''}, - {PropertyName :'指导员联系方式',PropertyValue:''}, - {PropertyName :'副指导员姓名',PropertyValue:''}, - {PropertyName :'副指导员联系方式',PropertyValue:''}, - {PropertyName :'副站长一姓名',PropertyValue:''}, - {PropertyName :'副站长一联系方式',PropertyValue:''}, - {PropertyName :'副站长二姓名',PropertyValue:''}, - {PropertyName :'副站长二联系方式',PropertyValue:''}, - {PropertyName :'副站长三姓名',PropertyValue:''}, - {PropertyName :'副站长三联系方式',PropertyValue:''} + DaZhongcontactData: any = [ + { PropertyName: '站长姓名', PropertyValue: '' }, + { PropertyName: '站长联系方式', PropertyValue: '' }, + { PropertyName: '指导员姓名', PropertyValue: '' }, + { PropertyName: '指导员联系方式', PropertyValue: '' }, + { PropertyName: '副指导员姓名', PropertyValue: '' }, + { PropertyName: '副指导员联系方式', PropertyValue: '' }, + { PropertyName: '副站长一姓名', PropertyValue: '' }, + { PropertyName: '副站长一联系方式', PropertyValue: '' }, + { PropertyName: '副站长二姓名', PropertyValue: '' }, + { PropertyName: '副站长二联系方式', PropertyValue: '' }, + { PropertyName: '副站长三姓名', PropertyValue: '' }, + { PropertyName: '副站长三联系方式', PropertyValue: '' } ] //其他消防力量联系方式 - othercontactData:any = [ - {PropertyName :'队长',PropertyValue:''}, - {PropertyName :'联系方式',PropertyValue:''}, - {PropertyName :'站长',PropertyValue:''}, - {PropertyName :'联系方式',PropertyValue:''}, - {PropertyName :'负责人',PropertyValue:''}, - {PropertyName :'联系方式',PropertyValue:''} + othercontactData: any = [ + { PropertyName: '队长', PropertyValue: '' }, + { PropertyName: '联系方式', PropertyValue: '' }, + { PropertyName: '站长', PropertyValue: '' }, + { PropertyName: '联系方式', PropertyValue: '' }, + { PropertyName: '负责人', PropertyValue: '' }, + { PropertyName: '联系方式', PropertyValue: '' } ] //其他消防力量人员数量 - otherpersonCountData:any = [ - {PropertyName :'每日执勤人数',PropertyValue:''}, - {PropertyName :'消防队员总人数',PropertyValue:''}, - {PropertyName :'执勤车辆数',PropertyValue:''}, - {PropertyName :'灭火剂总量',PropertyValue:''} + otherpersonCountData: any = [ + { PropertyName: '每日执勤人数', PropertyValue: '' }, + { PropertyName: '消防队员总人数', PropertyValue: '' }, + { PropertyName: '执勤车辆数', PropertyValue: '' }, + { PropertyName: '灭火剂总量', PropertyValue: '' } ] //清空表单数据 - clearData(){ + clearData() { this.deletedFile = []//清空相关资料已删除缓存 this.AttachmentArr = []//清空相关资料 - this.positionLngLat = {x:'',y:''} + this.positionLngLat = { x: '', y: '' } this.FireForceDetailInfo = { // id:'',//编号 - stationName:'',//队站名称 - isIndependentAlarm:null,//是否独立报警 - phoneNumber:'',//联系电话 - faxNumber:'',//传真 - jurisdictionArea:null,//辖区面积 - remark:'',//备注 - address:'',//地址 - location:{ - x:'', - y:'' + stationName: '',//队站名称 + isIndependentAlarm: null,//是否独立报警 + phoneNumber: '',//联系电话 + faxNumber: '',//传真 + jurisdictionArea: null,//辖区面积 + remark: '',//备注 + address: '',//地址 + location: { + x: '', + y: '' }, - personCountData:[],//人员数量自定义 - contactData:[],//联系方式自定义 - dutyForceData:[],//执勤力量自定义 - relevantInfomationData:[]//相关资料 + personCountData: [],//人员数量自定义 + contactData: [],//联系方式自定义 + dutyForceData: [],//执勤力量自定义 + relevantInfomationData: []//相关资料 } this.ZongpersonCountData = [ - {PropertyName :'现役官兵人数',PropertyValue:''}, - {PropertyName :'政府专职消防员数',PropertyValue:''}, - {PropertyName :'消防文员数',PropertyValue:''} + { PropertyName: '现役官兵人数', PropertyValue: '' }, + { PropertyName: '政府专职消防员数', PropertyValue: '' }, + { PropertyName: '消防文员数', PropertyValue: '' } ] this.ZongcontactData = [ - {PropertyName :'总队长名称',PropertyValue:''}, - {PropertyName :'总队长联系方式',PropertyValue:''}, - {PropertyName :'总队政委名称',PropertyValue:''}, - {PropertyName :'总队政委联系方式',PropertyValue:''} + { PropertyName: '总队长名称', PropertyValue: '' }, + { PropertyName: '总队长联系方式', PropertyValue: '' }, + { PropertyName: '总队政委名称', PropertyValue: '' }, + { PropertyName: '总队政委联系方式', PropertyValue: '' } ] this.ZhicontactData = [ - {PropertyName :'支队长名称',PropertyValue:''}, - {PropertyName :'支队长联系方式',PropertyValue:''}, - {PropertyName :'支队政委名称',PropertyValue:''}, - {PropertyName :'支队政委联系方式',PropertyValue:''} + { PropertyName: '支队长名称', PropertyValue: '' }, + { PropertyName: '支队长联系方式', PropertyValue: '' }, + { PropertyName: '支队政委名称', PropertyValue: '' }, + { PropertyName: '支队政委联系方式', PropertyValue: '' } ] this.DaZhongpersonCountData = [ - {PropertyName :'现役人员',PropertyValue:''}, - {PropertyName :'政府专职消防员数',PropertyValue:''}, - {PropertyName :'每日执勤人数',PropertyValue:''} + { PropertyName: '现役人员', PropertyValue: '' }, + { PropertyName: '政府专职消防员数', PropertyValue: '' }, + { PropertyName: '每日执勤人数', PropertyValue: '' } ] this.DaZhongcontactData = [ - {PropertyName :'站长姓名',PropertyValue:''}, - {PropertyName :'站长联系方式',PropertyValue:''}, - {PropertyName :'指导员姓名',PropertyValue:''}, - {PropertyName :'指导员联系方式',PropertyValue:''}, - {PropertyName :'副指导员姓名',PropertyValue:''}, - {PropertyName :'副指导员联系方式',PropertyValue:''}, - {PropertyName :'副站长一姓名',PropertyValue:''}, - {PropertyName :'副站长一联系方式',PropertyValue:''}, - {PropertyName :'副站长二姓名',PropertyValue:''}, - {PropertyName :'副站长二联系方式',PropertyValue:''}, - {PropertyName :'副站长三姓名',PropertyValue:''}, - {PropertyName :'副站长三联系方式',PropertyValue:''} + { PropertyName: '站长姓名', PropertyValue: '' }, + { PropertyName: '站长联系方式', PropertyValue: '' }, + { PropertyName: '指导员姓名', PropertyValue: '' }, + { PropertyName: '指导员联系方式', PropertyValue: '' }, + { PropertyName: '副指导员姓名', PropertyValue: '' }, + { PropertyName: '副指导员联系方式', PropertyValue: '' }, + { PropertyName: '副站长一姓名', PropertyValue: '' }, + { PropertyName: '副站长一联系方式', PropertyValue: '' }, + { PropertyName: '副站长二姓名', PropertyValue: '' }, + { PropertyName: '副站长二联系方式', PropertyValue: '' }, + { PropertyName: '副站长三姓名', PropertyValue: '' }, + { PropertyName: '副站长三联系方式', PropertyValue: '' } ] this.othercontactData = [ - {PropertyName :'队长',PropertyValue:''}, - {PropertyName :'联系方式',PropertyValue:''}, - {PropertyName :'站长',PropertyValue:''}, - {PropertyName :'联系方式',PropertyValue:''}, - {PropertyName :'负责人',PropertyValue:''}, - {PropertyName :'联系方式',PropertyValue:''} + { PropertyName: '队长', PropertyValue: '' }, + { PropertyName: '联系方式', PropertyValue: '' }, + { PropertyName: '站长', PropertyValue: '' }, + { PropertyName: '联系方式', PropertyValue: '' }, + { PropertyName: '负责人', PropertyValue: '' }, + { PropertyName: '联系方式', PropertyValue: '' } ] this.otherpersonCountData = [ - {PropertyName :'每日执勤人数',PropertyValue:''}, - {PropertyName :'消防队员总人数',PropertyValue:''}, - {PropertyName :'执勤车辆数',PropertyValue:''}, - {PropertyName :'灭火剂总量',PropertyValue:''} + { PropertyName: '每日执勤人数', PropertyValue: '' }, + { PropertyName: '消防队员总人数', PropertyValue: '' }, + { PropertyName: '执勤车辆数', PropertyValue: '' }, + { PropertyName: '灭火剂总量', PropertyValue: '' } ] } //新增消防力量 - selectedFireForceTypeIndex:any//新增消防力量名称 - addFireForce(){ - if(this.selectedFireForceId && this.selectedFireForce.forceType == 0){ + selectedFireForceTypeIndex: any//新增消防力量名称 + addFireForce() { + if (this.selectedFireForceId && this.selectedFireForce.forceType == 0) { const dialogRef = this.dialog.open(AddFireForce, { data: {}, - id:'addWater' + id: 'addWater' }); dialogRef.afterClosed().subscribe( - data=>{ - if(typeof data === 'number' && !isNaN(data)){ + data => { + if (typeof data === 'number' && !isNaN(data)) { this.isPost = true - this.selectedFireForceTypeIndex = data - this.selectedFireForceLevel = data - // this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null - // this.positionLngLat.x = 0 - // this.positionLngLat.y = 0 - // this.map.setCity('上海市'); - this.selectedFireForce.contentVerify = null - this.clearData() - } + this.selectedFireForceTypeIndex = data + this.selectedFireForceLevel = data + // this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null + // this.positionLngLat.x = 0 + // this.positionLngLat.y = 0 + // this.map.setCity('上海市'); + this.selectedFireForce.contentVerify = null + this.clearData() + } } ); - }else if(this.selectedFireForceId && this.selectedFireForce.forceType != 0){ + } else if (this.selectedFireForceId && this.selectedFireForce.forceType != 0) { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('该选中机构无法增加其他机构','确定',config); - } else{ + this.snackBar.open('该选中机构无法增加其他机构', '确定', config); + } else { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('请先从左侧列表选择一个组织机构','确定',config); + this.snackBar.open('请先从左侧列表选择一个组织机构', '确定', config); } - + } //保存 - isPost:boolean = false//是否走post创建接口 - newselectedFireForceId:any //创建成功其他消防力量后保存一下创建出来的id - save(){ - if(!this.FireForceDetailInfo.stationName){ + isPost: boolean = false//是否走post创建接口 + newselectedFireForceId: any //创建成功其他消防力量后保存一下创建出来的id + save() { + if (!this.FireForceDetailInfo.stationName) { alert('名称必填') return } //删除一下数据库的文件 - if(this.deletedFile.length != 0){ + if (this.deletedFile.length != 0) { this.deletedFile.forEach(item => { - this.http.delete(`/api/Objects/PlanPlatform/${item.objectName}`).subscribe(data=>{ + this.http.delete(`/api/Objects/PlanPlatform/${item.objectName}`).subscribe(data => { // console.log('删除原文件成功') }) }); @@ -665,102 +909,102 @@ export class FireForceComponent implements OnInit { this.FireForceDetailInfo.relevantInfomationData = JSON.stringify(this.AttachmentArr) // console.log(1111,this.FireForceDetailInfo) //如果是总支大中 - this.FireForceDetailInfo.location = {x:'',y:''} - if(this.atLastPositionLngLat.x){ + this.FireForceDetailInfo.location = { x: '', y: '' } + if (this.atLastPositionLngLat.x) { this.FireForceDetailInfo.location.x = this.atLastPositionLngLat.x this.FireForceDetailInfo.location.y = this.atLastPositionLngLat.y - }else{ + } else { this.FireForceDetailInfo.location = null } - if(this.selectedFireForce.forceType == 0&&(this.selectedFireForceLevel == 0 || this.selectedFireForceLevel == 1 || this.selectedFireForceLevel == 2 || this.selectedFireForceLevel == 3)){//如果是总队 + if (this.selectedFireForce.forceType == 0 && (this.selectedFireForceLevel == 0 || this.selectedFireForceLevel == 1 || this.selectedFireForceLevel == 2 || this.selectedFireForceLevel == 3)) {//如果是总队 let body = this.FireForceDetailInfo - - if(this.selectedFireForceLevel == 0){//总队 - this.FireForceDetailInfo.personCountData = JSON.stringify(this.ZongpersonCountData) + + if (this.selectedFireForceLevel == 0) {//总队 + this.FireForceDetailInfo.personCountData = JSON.stringify(this.ZongpersonCountData) this.FireForceDetailInfo.contactData = JSON.stringify(this.ZongcontactData) this.FireForceDetailInfo.dutyForceData = null } - if(this.selectedFireForceLevel == 1){//支队 - this.FireForceDetailInfo.personCountData = JSON.stringify(this.ZongpersonCountData) + if (this.selectedFireForceLevel == 1) {//支队 + this.FireForceDetailInfo.personCountData = JSON.stringify(this.ZongpersonCountData) this.FireForceDetailInfo.contactData = JSON.stringify(this.ZhicontactData) this.FireForceDetailInfo.dutyForceData = null } - if(this.selectedFireForceLevel == 2 || this.selectedFireForceLevel == 3){//大队 中队 - this.FireForceDetailInfo.personCountData = JSON.stringify(this.DaZhongpersonCountData) + if (this.selectedFireForceLevel == 2 || this.selectedFireForceLevel == 3) {//大队 中队 + this.FireForceDetailInfo.personCountData = JSON.stringify(this.DaZhongpersonCountData) this.FireForceDetailInfo.contactData = JSON.stringify(this.DaZhongcontactData) this.FireForceDetailInfo.dutyForceData = null } // console.log('body',body) - this.http.put(`/api/FireForceDetail/0/${this.selectedFireForce.id}`,body).subscribe(data => { + this.http.put(`/api/FireForceDetail/0/${this.selectedFireForce.id}`, body).subscribe(data => { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('保存成功','确定',config); + this.snackBar.open('保存成功', '确定', config); this.upDateAllFireForce() }) } //如果是其他消防力量 - else{ - if(!this.isPost){ + else { + if (!this.isPost) { let body = this.FireForceDetailInfo - body.personCountData = JSON.stringify(this.otherpersonCountData) + body.personCountData = JSON.stringify(this.otherpersonCountData) body.contactData = JSON.stringify(this.othercontactData) body.dutyForceData = null let id - if(this.selectedFireForce.forceType == 0){ + if (this.selectedFireForce.forceType == 0) { id = this.newselectedFireForceId - }else{ + } else { id = this.selectedFireForce.id } - this.http.put(`/api/FireForceDetail/1/${id}`,body).subscribe(data => { + this.http.put(`/api/FireForceDetail/1/${id}`, body).subscribe(data => { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('保存成功','确定',config); + this.snackBar.open('保存成功', '确定', config); this.upDateAllFireForce() }) - }else{ + } else { let forceType this.selectedFireForceTypeIndex == 4 ? forceType = 1 : null this.selectedFireForceTypeIndex == 5 ? forceType = 2 : null this.selectedFireForceTypeIndex == 6 ? forceType = 4 : null let body = { - organizationId:this.selectedFireForce.id, - name:this.FireForceDetailInfo.stationName, - createTime:new Date(), - forceType:forceType + organizationId: this.selectedFireForce.id, + name: this.FireForceDetailInfo.stationName, + createTime: new Date(), + forceType: forceType } let params = { - organizationId : this.selectedFireForce.id + organizationId: this.selectedFireForce.id } - this.http.post('/api/CustomFireForce',body,{params:params}).subscribe((data:any) => { + this.http.post('/api/CustomFireForce', body, { params: params }).subscribe((data: any) => { this.newselectedFireForceId = data.id this.selectedFireForce = data let body = this.FireForceDetailInfo body.personCountData = JSON.stringify(this.otherpersonCountData) body.contactData = JSON.stringify(this.othercontactData) body.dutyForceData = null - this.http.put(`/api/FireForceDetail/1/${data.id}`,body).subscribe(data2 => { + this.http.put(`/api/FireForceDetail/1/${data.id}`, body).subscribe(data2 => { this.upDateAllFireForce() this.selectedFireForceId = data.id this.isPost = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('保存成功','确定',config); + this.snackBar.open('保存成功', '确定', config); }) }) } - + } - - + + } //提交审核 - submitAudit(){ + submitAudit() { let isTrue = window.confirm('请确认保存后提交审核,否则将无法审核最新内容,是否继续?') - if(isTrue){ + if (isTrue) { // console.log('提交审核的消防力量',this.FireForceDetailInfo) let body = { title: this.FireForceDetailInfo.stationName, @@ -769,84 +1013,84 @@ export class FireForceComponent implements OnInit { itemId: this.selectedFireForce.id, verifyState: 3, } - this.http.post('/api/ContentVerifies',body).subscribe((data) => { + this.http.post('/api/ContentVerifies', body).subscribe((data) => { this.selectedFireForce.contentVerify = data let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('提交成功','确定',config); + this.snackBar.open('提交成功', '确定', config); }) } - + } //撤销审核 - cancelAudit(){ + cancelAudit() { let isTrue = window.confirm('您确认要撤销该审核吗?') - if(isTrue){ + if (isTrue) { // console.log('撤销审核的消防力量',this.waterData) this.http.delete(`/api/ContentVerifies/${this.selectedFireForce.contentVerify.id}`).subscribe((data) => { this.selectedFireForce.contentVerify = null let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('撤销成功','确定',config); + this.snackBar.open('撤销成功', '确定', config); }) } } - close(){ + close() { this.selectedFireForceLevel = null this.selectedFireForceId = null this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null this.isGisTopBox = false } - map:IMap + map: IMap placeSearch: IPlaceSearch//构造地点查询类 - isMapLabel:boolean = false //是否已经标记坐标 - newPositionMarkerContent:any = - '
' + - ' ' + - '
' - newPositionMarkerContentBtn:any = - '
' + - ' ' + - '
|
' + - '
' + isMapLabel: boolean = false //是否已经标记坐标 + newPositionMarkerContent: any = + '
' + + ' ' + + '
' + newPositionMarkerContentBtn: any = + '
' + + ' ' + + '
|
' + + '
' //创建地图 - newPositionMarker:IMarker//坐标实例 - createMap(){ + newPositionMarker: IMarker//坐标实例 + createMap() { this.map = MapFactory.MapInstance('container', { - zoom:12 + zoom: 12 }) this.map.setCity('上海市'); //输入提示 var autoOptions = { input: "tipinput" }; - let auto = MapFactory.AutocompleteInstance(autoOptions,this); + let auto = MapFactory.AutocompleteInstance(autoOptions, this); this.placeSearch = MapFactory.PlaceSearchInstance(this); //构造地点查询类 - auto.on("select", (e)=>{ - this.newPositionMarker.setPosition([e.poi.location.lng,e.poi.location.lat]) - this.positionLngLat = {x: e.poi.location.lng, y: e.poi.location.lat} - this.map.setCenter([e.poi.location.lng,e.poi.location.lat]); //设置地图中心点 + auto.on("select", (e) => { + this.newPositionMarker.setPosition([e.poi.location.lng, e.poi.location.lat]) + this.positionLngLat = { x: e.poi.location.lng, y: e.poi.location.lat } + this.map.setCenter([e.poi.location.lng, e.poi.location.lat]); //设置地图中心点 });//注册监听,当选中某条记录时会触发 } //点击位置 - isGisTopBox:boolean = false // - searchTitle:any = ''// + isGisTopBox: boolean = false // + searchTitle: any = ''// - positionLngLat:any = {x:'',y:''}//临时坐标点 - atLastPositionLngLat:any = {x:'',y:''}//最终坐标点 - setPosition(){ - if(!this.isGisTopBox){ + positionLngLat: any = { x: '', y: '' }//临时坐标点 + atLastPositionLngLat: any = { x: '', y: '' }//最终坐标点 + setPosition() { + if (!this.isGisTopBox) { this.isGisTopBox = true this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null let center - if(this.newPositionMarker && this.atLastPositionLngLat.x){//如果已经标注单位坐标 + if (this.newPositionMarker && this.atLastPositionLngLat.x) {//如果已经标注单位坐标 center = [this.atLastPositionLngLat.x, this.atLastPositionLngLat.y] - }else if(this.newPositionMarker && !this.atLastPositionLngLat.x && this.FireForceDetailInfo.location && this.FireForceDetailInfo.location.x){ + } else if (this.newPositionMarker && !this.atLastPositionLngLat.x && this.FireForceDetailInfo.location && this.FireForceDetailInfo.location.x) { center = [this.FireForceDetailInfo.location.x, this.FireForceDetailInfo.location.y] - }else{ + } else { center = this.map.getCenter(); //获取当前地图中心位置 } this.newPositionMarker = MapFactory.MarkerInstance({ @@ -855,18 +1099,18 @@ export class FireForceComponent implements OnInit { content: this.newPositionMarkerContentBtn, offset: MapFactory.PixelInstance(-15, -18) }); - this.positionLngLat = {x: center.lng || center[0], y: center.lat || center[1]} + this.positionLngLat = { x: center.lng || center[0], y: center.lat || center[1] } this.map.add(this.newPositionMarker); this.isMapLabel = true - this.newPositionMarker.on('dragend', (e)=>{ - this.positionLngLat = {x: e.lnglat.lng, y: e.lnglat.lat} - },this) + this.newPositionMarker.on('dragend', (e) => { + this.positionLngLat = { x: e.lnglat.lng, y: e.lnglat.lat } + }, this) //点击确定 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'),'click',(event)=>{ + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'), 'click', (event) => { this.isGisTopBox = false this.map.remove(this.newPositionMarker) this.newPositionMarker = MapFactory.MarkerInstance({ - position: [this.positionLngLat.x,this.positionLngLat.y], + position: [this.positionLngLat.x, this.positionLngLat.y], content: this.newPositionMarkerContent, offset: MapFactory.PixelInstance(-15, -18) }); @@ -874,29 +1118,29 @@ export class FireForceComponent implements OnInit { this.map.add(this.newPositionMarker); this.positionLngLat = this.atLastPositionLngLat }) - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'),'click',(event)=>{ + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'), 'click', (event) => { this.isGisTopBox = false this.map.remove(this.newPositionMarker) - if(this.positionLngLat.x && this.positionLngLat.x != 0 && !this.atLastPositionLngLat.x){//直接取消 + if (this.positionLngLat.x && this.positionLngLat.x != 0 && !this.atLastPositionLngLat.x) {//直接取消 this.map.remove(this.newPositionMarker) this.positionLngLat = {} this.atLastPositionLngLat = {} - }else{ + } else { this.newPositionMarker = MapFactory.MarkerInstance({ - position: [this.atLastPositionLngLat.x,this.atLastPositionLngLat.y], + position: [this.atLastPositionLngLat.x, this.atLastPositionLngLat.y], content: this.newPositionMarkerContent, offset: MapFactory.PixelInstance(-15, -18) }); - this.map.setCenter([this.atLastPositionLngLat.x,this.atLastPositionLngLat.y]); //设置地图中心点 + this.map.setCenter([this.atLastPositionLngLat.x, this.atLastPositionLngLat.y]); //设置地图中心点 this.map.add(this.newPositionMarker); this.positionLngLat = this.atLastPositionLngLat } })//取消 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'),'touchstart',(event)=>{ + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'), 'touchstart', (event) => { this.isGisTopBox = false this.map.remove(this.newPositionMarker) this.newPositionMarker = MapFactory.MarkerInstance({ - position: [this.positionLngLat.x,this.positionLngLat.y], + position: [this.positionLngLat.x, this.positionLngLat.y], content: this.newPositionMarkerContent, offset: MapFactory.PixelInstance(-15, -18) }); @@ -904,119 +1148,121 @@ export class FireForceComponent implements OnInit { this.map.add(this.newPositionMarker); this.positionLngLat = this.atLastPositionLngLat }) - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'),'touchstart',(event)=>{ + 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){//直接取消 + if (this.positionLngLat.x && this.positionLngLat.x != 0 && !this.atLastPositionLngLat.x) {//直接取消 this.map.remove(this.newPositionMarker) this.positionLngLat = {} this.atLastPositionLngLat = {} - }else{ + } else { this.newPositionMarker = MapFactory.MarkerInstance({ - position: [this.atLastPositionLngLat.x,this.atLastPositionLngLat.y], + position: [this.atLastPositionLngLat.x, this.atLastPositionLngLat.y], content: this.newPositionMarkerContent, offset: MapFactory.PixelInstance(-15, -18) }); - this.map.setCenter([this.atLastPositionLngLat.x,this.atLastPositionLngLat.y]); //设置地图中心点 + this.map.setCenter([this.atLastPositionLngLat.x, this.atLastPositionLngLat.y]); //设置地图中心点 this.map.add(this.newPositionMarker); this.positionLngLat = this.atLastPositionLngLat } })//取消 } - + } //上传附件 - file:any; //上传的文件 - AttachmentArr:any = []//上传附件地址集合 - uploadId:any//分块上传id - objectName:any - progressBarValue:any = 0//分块上传进度 - isMasklayer:boolean = false//圆圈遮罩层是否打开 - isMasklayerUploading:boolean = false//上传进度条遮罩层是否打开 - isMasklayerDownload:boolean = false//下载进度条遮罩层是否打开 - uploadAttachment(e){ + file: any; //上传的文件 + AttachmentArr: any = []//上传附件地址集合 + uploadId: any//分块上传id + objectName: any + progressBarValue: any = 0//分块上传进度 + isMasklayer: boolean = false//圆圈遮罩层是否打开 + isMasklayerUploading: boolean = false//上传进度条遮罩层是否打开 + isMasklayerDownload: boolean = false//下载进度条遮罩层是否打开 + uploadAttachment(e) { this.file = e.target.files[0] || null //上传的文件 let file = e.target.files[0] || null //获取上传的文件 let fileSize = file.size || null //上传文件的总大小 let shardSize = 5 * 1024 * 1024 //5MB一个分片 - - if (file && fileSize<=shardSize) { //上传文件<=5MB时 + + if (file && fileSize <= shardSize) { //上传文件<=5MB时 this.isMasklayer = true let formData = new FormData() - formData.append("file",file) + formData.append("file", file) let storageFolderId //要存储到服务器的文件夹id 一般为当前选中单位的id 如果新创建的话就存到public文件夹 this.selectedFireForce.id ? storageFolderId = this.selectedFireForce.id : storageFolderId = 'public' - this.http.post(`/api/Objects/PlanPlatform/FireForce/${storageFolderId}`,formData).subscribe((data:any)=>{ + this.http.post(`/api/Objects/PlanPlatform/FireForce/${storageFolderId}`, formData).subscribe((data: any) => { let obj = { - objectName:data.objectName, - fileName:data.fileName, - fileLength:data.fileLength + objectName: data.objectName, + fileName: data.fileName, + fileLength: data.fileLength } this.AttachmentArr.push(obj) this.isMasklayer = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('上传成功','确定',config); + this.snackBar.open('上传成功', '确定', config); }) - } else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传 + } else if (file && fileSize > shardSize) { //上传文件>5MB时,分块上传 this.isMasklayerUploading = true - let data = {filename: file.name} + let data = { filename: file.name } let storageFolderId //要存储到服务器的文件夹id 一般为当前选中单位的id 如果新创建的话就存到public文件夹 this.selectedFireForce.id ? storageFolderId = this.selectedFireForce.id : storageFolderId = 'public' - this.http.post(`/api/NewMultipartUpload/PlanPlatform/FireForce/${storageFolderId}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传 + this.http.post(`/api/NewMultipartUpload/PlanPlatform/FireForce/${storageFolderId}`, {}, { params: data }).subscribe((data: any) => { //初始化分段上传 this.objectName = data.objectName this.uploadId = data.uploadId this.subsectionUploading() }) } } - PartNumberETag:any=[]; //每次返回需要保存的信息 + PartNumberETag: any = []; //每次返回需要保存的信息 //开始分段上传 - async subsectionUploading () { + async subsectionUploading() { let file = this.file || null //获取上传的文件 let fileSize = file.size || null //上传文件的总大小 let shardSize = 5 * 1024 * 1024 //5MB一个分片 let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段 - for (let i = 0;i < allSlice;i++) { //循环分段上传 - let start = i * shardSize //切割文件开始位置 - let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 - let formData = new FormData() - formData.append("file",file.slice(start, end)) - - //同步写法实现异步调用 - let result = await new Promise((resolve, reject) => { - // await 需要后面返回一个 promise 对象 - this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i+1}`,formData).subscribe((data:any)=>{ - let msg = { - "partNumber":data.partNumber || null, - "eTag": data.eTag || null} - resolve(msg) // 调用 promise 内置方法处理成功 - }) - }); - this.PartNumberETag.push(result) - // this.progressBarValue = Number((i/allSlice).toFixed(2))*100 - this.progressBarValue = this.accMul(Number((i/allSlice).toFixed(2))*100,1,0) - if (this.PartNumberETag.length === allSlice) { - this.progressBarValue = 100 - this.endUploading()} + for (let i = 0; i < allSlice; i++) { //循环分段上传 + let start = i * shardSize //切割文件开始位置 + let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 + let formData = new FormData() + formData.append("file", file.slice(start, end)) + + //同步写法实现异步调用 + let result = await new Promise((resolve, reject) => { + // await 需要后面返回一个 promise 对象 + this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i + 1}`, formData).subscribe((data: any) => { + let msg = { + "partNumber": data.partNumber || null, + "eTag": data.eTag || null + } + resolve(msg) // 调用 promise 内置方法处理成功 + }) + }); + this.PartNumberETag.push(result) + // this.progressBarValue = Number((i/allSlice).toFixed(2))*100 + this.progressBarValue = this.accMul(Number((i / allSlice).toFixed(2)) * 100, 1, 0) + if (this.PartNumberETag.length === allSlice) { + this.progressBarValue = 100 + this.endUploading() + } }//for循环 } //完成分块上传 - endUploading () { + endUploading() { let data = this.PartNumberETag - let paramsData = {uploadId:this.uploadId} - this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`,data,{params:paramsData}).subscribe(data=>{ - this.PartNumberETag =[] //清空保存返回的信息 + let paramsData = { uploadId: this.uploadId } + this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`, data, { params: paramsData }).subscribe(data => { + this.PartNumberETag = [] //清空保存返回的信息 let obj = { - objectName:this.objectName, - fileName:this.file.name, - fileLength:this.file.size + objectName: this.objectName, + fileName: this.file.name, + fileLength: this.file.size } this.AttachmentArr.push(obj) this.isMasklayerUploading = false//关闭进度条遮罩层 @@ -1024,74 +1270,75 @@ export class FireForceComponent implements OnInit { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('上传成功','确定',config); + this.snackBar.open('上传成功', '确定', config); }) } //取消分块上传 cancelUploading() { - this.http.delete(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}`).subscribe(data=>{ + this.http.delete(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}`).subscribe(data => { this.progressBarValue = 0; - this.isMasklayerUploading= false - this.PartNumberETag =[] //清空保存返回的信息 + this.isMasklayerUploading = false + this.PartNumberETag = [] //清空保存返回的信息 const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('取消上传成功','确定',config); + this.snackBar.open('取消上传成功', '确定', config); }) } //下载 - download (e) { + download(e) { this.isMasklayerDownload = true //开启下载进度条 let file = e //传递过来的文件元数据 let fileSize = file.fileLength //下载文件的总大小 let shardSize = 3 * 1024 * 1024 //文件大小是否大于10MB - if (file && fileSize<=shardSize) { //<=3MB时直接下载 + if (file && fileSize <= shardSize) { //<=3MB时直接下载 this.progressBarValue = 60 - this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`,{responseType: 'blob'},).subscribe(data=>{ + this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`, { responseType: 'blob' },).subscribe(data => { let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址 let link = document.createElement("a"); link.style.display = "none"; link.href = url; - let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1] + let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length - 1] link.setAttribute("download", fileName); document.body.appendChild(link); link.click(); this.isMasklayerDownload = false //关闭下载进度条 this.progressBarValue = 0 //初始化进度条 }) - } else if (file && fileSize>shardSize) { //>3MB时分块下载 + } else if (file && fileSize > shardSize) { //>3MB时分块下载 this.blockingDownload(e) //分段下载 } } //分段下载并合并 - async blockingDownload (e) { + async blockingDownload(e) { let file = e //传递过来的文件元数据 let fileSize = file.fileLength //下载文件的总大小 let shardSize = 3 * 1024 * 1024 //3MB一个分片 let allSlice = Math.ceil(fileSize / shardSize) //总文件/3MB===共分多少段 - let allFile:any = [] //所有的file分段 + let allFile: any = [] //所有的file分段 - for (let i=0;i{ - this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`,{headers:{'range':`bytes= ${start}-${end}`},responseType:'blob'}).subscribe(data=>{ - result(data) }) + let result = await new Promise((result, reject) => { + this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`, { headers: { 'range': `bytes= ${start}-${end}` }, responseType: 'blob' }).subscribe(data => { + result(data) + }) }) allFile.push(result) // this.progressBarValue = Number((i/allSlice).toFixed(2))*100 //文件进度数 - this.progressBarValue = this.accMul(Number((i/allSlice).toFixed(2))*100,1,0) + this.progressBarValue = this.accMul(Number((i / allSlice).toFixed(2)) * 100, 1, 0) if (allFile.length === allSlice) { //合并文件输出给浏览器 let url = window.URL.createObjectURL(new Blob(allFile)); //createObjectURL创建一个下载Blob的url地址 let link = document.createElement("a"); link.style.display = "none"; link.href = url; - let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1] + let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length - 1] link.setAttribute("download", fileName); document.body.appendChild(link); link.click(); @@ -1104,31 +1351,31 @@ export class FireForceComponent implements OnInit { } //删除图片 - deletedFile:any = [] - deleteFile(item,e){ + deletedFile: any = [] + deleteFile(item, e) { e.stopPropagation() let isTrue = window.confirm('确定要删除该文件吗?') - if(isTrue){ + if (isTrue) { let index - this.AttachmentArr.forEach((element,key) => { - if(element.objectName == item.objectName){ + this.AttachmentArr.forEach((element, key) => { + if (element.objectName == item.objectName) { index = key } }); - this.AttachmentArr.splice(index,1) + this.AttachmentArr.splice(index, 1) this.deletedFile.push(item) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('删除成功','确定',config); + this.snackBar.open('删除成功', '确定', config); } } //点击文件 - clickFile(item){ - let suffix = item.fileName.split('.')[item.fileName.split('.').length-1] - if(suffix == 'png' || suffix == 'jpg' || suffix == 'JPG'){ - let dom = document.getElementById(`viewerjs`) + clickFile(item) { + let suffix = item.fileName.split('.')[item.fileName.split('.').length - 1] + if (suffix == 'png' || suffix == 'jpg' || suffix == 'JPG') { + let dom = document.getElementById(`viewerjs`) let pObjs = dom.childNodes; let node = document.createElement("img") node.style.display = "none"; @@ -1137,7 +1384,7 @@ export class FireForceComponent implements OnInit { dom.appendChild(node) setTimeout(() => { let viewer = new Viewer(document.getElementById(`viewerjs`), { - hidden:()=>{ + hidden: () => { dom.removeChild(pObjs[0]); viewer.destroy(); } @@ -1145,28 +1392,28 @@ export class FireForceComponent implements OnInit { node.click(); }, 0); } - if(suffix == 'docx' || suffix == 'doc' || suffix == 'pdf'){ + if (suffix == 'docx' || suffix == 'doc' || suffix == 'pdf') { let fetchUrl = item.objectName if (suffix == 'docx' || suffix == 'doc') { let arr = fetchUrl.split('.') arr[arr.length - 1] = 'pdf' window.open(`/api/Objects/PlanPlatform/` + arr.join('.')) - }else if (suffix == 'pdf') { + } else if (suffix == 'pdf') { window.open(`/api/Objects/PlanPlatform/` + fetchUrl) } } - if(suffix == 'mp4'){ + if (suffix == 'mp4') { const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去 - data: {item:item,type:"video"}, - id:'videodialog' + data: { item: item, type: "video" }, + id: 'videodialog' }); dialogRef.afterClosed().subscribe(); } } //收起展开列表 - isPutDown:boolean = false - putDown(){ + isPutDown: boolean = false + putDown() { this.isPutDown = !this.isPutDown } } @@ -1180,17 +1427,17 @@ export class FireForceComponent implements OnInit { styleUrls: ['./fire-force.component.scss'] }) export class AddFireForce { - - constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + + constructor(private http: HttpClient, public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data, public snackBar: MatSnackBar) { } - addList:any = [ - {id:4, name:'微型消防站'}, - {id:5, name:'企业专职消防站'}, - {id:6, name:'义务(志愿)消防站'} + addList: any = [ + { id: 4, name: '微型消防站' }, + { id: 5, name: '企业专职消防站' }, + { id: 6, name: '义务(志愿)消防站' } ] - selectedFireForceTypeIndex:any = 4 - selecteAddType(item,key){ + selectedFireForceTypeIndex: any = 4 + selecteAddType(item, key) { this.selectedFireForceTypeIndex = item.id } @@ -1198,7 +1445,7 @@ export class AddFireForce { } - confirm(){ + confirm() { this.dialogRef.close(this.selectedFireForceTypeIndex) } @@ -1214,15 +1461,15 @@ export class ViewDetails { // myControl = new FormControl(); //注入MatDialogRef,可以用来关闭对话框 //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌 - constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {} - Url:string + constructor(private http: HttpClient, public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data) { } + Url: string onNoClick(): void { this.dialogRef.close(); } ngOnInit(): void { - this.Url = '/api/Objects/PlanPlatform/' + this.data.item.objectName + this.Url = '/api/Objects/PlanPlatform/' + this.data.item.objectName } - closeDialog(){ + closeDialog() { this.dialogRef.close(); } diff --git a/src/app/export-excel/export-excel.component.ts b/src/app/export-excel/export-excel.component.ts index 63b2d70..f7e12d7 100644 --- a/src/app/export-excel/export-excel.component.ts +++ b/src/app/export-excel/export-excel.component.ts @@ -17,11 +17,11 @@ export class ExportExcelComponent implements OnInit { responseType: 'blob' as 'json' }; this.http.get('/api/StatisticsAnalysis/ExportToExcel',httpOptions).subscribe((data:any) => { - // // 文件名中有中文 则对文件名进行转码 + // 文件名中有中文 则对文件名进行转码 const link = document.createElement('a'); const blob = new Blob([data], {type: 'application/vnd.ms-excel'}); link.setAttribute('href', window.URL.createObjectURL(blob)); - link.setAttribute('download', '统计信息'+'.xlsx'); + link.setAttribute('download', '统计信息'+'.xls'); link.style.visibility = 'hidden'; document.body.appendChild(link); link.click(); diff --git a/src/assets/images/goback.png b/src/assets/images/goback.png new file mode 100644 index 0000000000000000000000000000000000000000..34cb58c6f8a536f8ad6ec97795056fce2352c9dc GIT binary patch literal 426 zcmV;b0agBqP)M)4-~)OCJb}ElJc1|C8(3~2H&|{!T8ODJjMT*_k9&Z0@ohKs6KCaE)i=!s^&)lD=0gIW`4{3=x9zYhxg4kR z=MEr45>6fv;Ug%YJ3)yx+0`u@K{Nw+xleTw8R6vgS+~!1o<|i#BZ7BjkN^_^8yXSf zlnaW;48*vJF!;0qs!HCDD?jd&=n61C4irQl!8arPaiBr$ zQt(l@w(pTj24!xGOpog*h>deM0(m_cq*nUmvvd&1Kp+^BtQ*I4$9A*H9(*atPdcgp zFDgJ<1l+U}bCnXyHJ3OAHT+2DBVUCot`RUsVtM&Xkae^Ytr8+K6(R&V+J3Ko0UyrN%iU0rr07*qoM6N<$g3Ir=iU0rr literal 0 HcmV?d00001 diff --git a/src/styles.scss b/src/styles.scss index 9391785..f1c51dc 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -2,6 +2,8 @@ @import './app/theme.scss'; @import "./app/ngZorroTree.css"; /* 引入组件样式 */ // @import "~ng-zorro-antd/select/style/index.min.css"; /* 引入组件样式 */ +@import "~ng-zorro-antd/style/index.min.css"; /* 引入基本样式 */ +@import "~ng-zorro-antd/tree-select/style/index.min.css"; /* 引入组件样式 */ @font-face { font-family: Regular; @@ -335,4 +337,7 @@ td{ .custom-content-marker .close-btn:hover { background: #666; } +} +.mat-paginator-container{ + min-height: 40px!important; } \ No newline at end of file