陈敬瑜 3 years ago
parent
commit
b750ecb585
  1. 23
      package-lock.json
  2. 1
      package.json
  3. 9
      src/app/data-collection/data-collection.module.ts
  4. 2
      src/app/data-collection/fire-force/addFireForce.html
  5. 20
      src/app/data-collection/fire-force/addFireForceCar.html
  6. 455
      src/app/data-collection/fire-force/fire-force.component.html
  7. 702
      src/app/data-collection/fire-force/fire-force.component.scss
  8. 1734
      src/app/data-collection/fire-force/fire-force.component.ts
  9. 4
      src/app/export-excel/export-excel.component.ts
  10. 1
      src/app/gis-management/left-working/left-working.component.ts
  11. 3
      src/app/navigation/navigation.component.ts
  12. 85
      src/app/services/objects.service.ts
  13. 16
      src/app/ui/material-bank/addmatlibrary.component.ts
  14. 1
      src/app/ui/material-bank/addoriginalcopy.component.ts
  15. 14
      src/app/ui/material-bank/editmatlibrary.component.ts
  16. 1
      src/app/ui/material-bank/editoriginalcopy.component.ts
  17. 14
      src/app/ui/material-bank/material-bank.component.ts
  18. 1
      src/app/ui/material-bank/selectoriginalcopy.component.ts
  19. 62
      src/app/ui/role/role.component.ts
  20. 3
      src/app/ui/unit-information/addgroups.component.ts
  21. 1
      src/app/ui/unit-information/addunitinfo.component.ts
  22. 2
      src/app/ui/unit-information/editgroup.component.ts
  23. 1
      src/app/ui/unit-information/editunitinfo.component.ts
  24. 1
      src/app/ui/userdata/userdata.component.ts
  25. 4
      src/app/working-area/model/axLegend.ts
  26. 4
      src/app/working-area/working-area.component.ts
  27. BIN
      src/assets/images/add2.png
  28. BIN
      src/assets/images/goback.png
  29. BIN
      src/assets/images/uploadbtn.png
  30. 327
      src/styles.scss

23
package-lock.json generated

@ -465,7 +465,7 @@
},
"@ant-design/colors": {
"version": "3.2.2",
"resolved": "https://registry.npm.taobao.org/@ant-design/colors/download/@ant-design/colors-3.2.2.tgz?cache=0&sync_timestamp=1596611396536&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40ant-design%2Fcolors%2Fdownload%2F%40ant-design%2Fcolors-3.2.2.tgz",
"resolved": "https://registry.npm.taobao.org/@ant-design/colors/download/@ant-design/colors-3.2.2.tgz",
"integrity": "sha1-WtQ9YZ6RHzSI66wwPWBuZqhCOQM=",
"requires": {
"tinycolor2": "^1.4.1"
@ -473,7 +473,7 @@
},
"@ant-design/icons-angular": {
"version": "9.0.1",
"resolved": "https://registry.npm.taobao.org/@ant-design/icons-angular/download/@ant-design/icons-angular-9.0.1.tgz?cache=0&sync_timestamp=1601000889997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40ant-design%2Ficons-angular%2Fdownload%2F%40ant-design%2Ficons-angular-9.0.1.tgz",
"resolved": "https://registry.nlark.com/@ant-design/icons-angular/download/@ant-design/icons-angular-9.0.1.tgz",
"integrity": "sha1-Wsi+xbw00jEgggyT+FEbWaoRe8U=",
"requires": {
"@ant-design/colors": "^3.1.0"
@ -7097,11 +7097,6 @@
"assert-plus": "^1.0.0"
}
},
"date-fns": {
"version": "2.9.0",
"resolved": "https://registry.npm.taobao.org/date-fns/download/date-fns-2.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-fns%2Fdownload%2Fdate-fns-2.9.0.tgz",
"integrity": "sha1-0LF1pcN+1fF7l+InK7wfpa7Gd9I="
},
"date-format": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/date-format/download/date-format-2.1.0.tgz?cache=0&sync_timestamp=1572559173297&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-format%2Fdownload%2Fdate-format-2.1.0.tgz",
@ -11986,7 +11981,7 @@
},
"ng-zorro-antd": {
"version": "9.3.0",
"resolved": "https://registry.npm.taobao.org/ng-zorro-antd/download/ng-zorro-antd-9.3.0.tgz",
"resolved": "https://registry.nlark.com/ng-zorro-antd/download/ng-zorro-antd-9.3.0.tgz",
"integrity": "sha1-+A2+JxXleMR1codzRJRC8AmfFSw=",
"requires": {
"@angular/cdk": "^9.0.0",
@ -11997,9 +11992,9 @@
},
"dependencies": {
"date-fns": {
"version": "2.16.1",
"resolved": "https://registry.npm.taobao.org/date-fns/download/date-fns-2.16.1.tgz?cache=0&sync_timestamp=1598884189690&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-fns%2Fdownload%2Fdate-fns-2.16.1.tgz",
"integrity": "sha1-BXdXksPzMx2oEq8lPhqTWFHTg0s="
"version": "2.23.0",
"resolved": "https://registry.nlark.com/date-fns/download/date-fns-2.23.0.tgz?cache=0&sync_timestamp=1627020353586&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdate-fns%2Fdownload%2Fdate-fns-2.23.0.tgz",
"integrity": "sha1-TohslBZZrwz3sw+v3R6qN+iHiKk="
}
}
},
@ -15961,9 +15956,9 @@
"dev": true
},
"tinycolor2": {
"version": "1.4.1",
"resolved": "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.1.tgz",
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g="
"version": "1.4.2",
"resolved": "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.2.tgz",
"integrity": "sha1-P2pNEHGtB2dtf6Ry4frECnGdiAM="
},
"tinyqueue": {
"version": "1.2.3",

1
package.json

@ -31,7 +31,6 @@
"bson-objectid": "^1.3.1",
"cesium": "^1.64.0",
"crypto-js": "^4.0.0",
"date-fns": "^2.9.0",
"e-ngx-cesium": "^6.3.2",
"echarts": "^4.6.0",
"firebase": "^7.6.2",

9
src/app/data-collection/data-collection.module.ts

@ -44,12 +44,12 @@ import { MatTreeModule } from '@angular/material/tree';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { DataCollectionRoutingModule } from './data-collection.routing';
import { AddWater, WaterCollectionComponent } from './water-collection/water-collection.component';
import { AddFireForce, FireForceComponent, ViewDetails } from './fire-force/fire-force.component';
import { AddFireForce, AddFireForceCar, 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],
declarations: [WaterCollectionComponent, FireForceComponent, LinkageForcesComponent, AddWater, AddFireForce, ViewDetails, AddLinkageForce, ViewDetails2,AddFireForceCar],
imports: [
CommonModule,
A11yModule,
@ -97,7 +97,8 @@ import { NzTreeModule } from 'ng-zorro-antd/tree';
FormsModule,
ReactiveFormsModule,
DataCollectionRoutingModule,
NzTreeModule
NzTreeModule,
NzTreeSelectModule
]
})
export class DataCollectionModule { }

2
src/app/data-collection/fire-force/addFireForce.html

@ -2,7 +2,7 @@
<div class="topbox">
<span>新增消防力量</span>
</div>
<div class="contant">
<div class="content">
<div (click)="selecteAddType(item,key)" *ngFor="let item of addList;let key = index" [ngClass]="{selectedDiv: item.id == selectedFireForceTypeIndex}">
<!-- <img [src]="item.src" alt=""> -->
{{item.name}}

20
src/app/data-collection/fire-force/addFireForceCar.html

@ -0,0 +1,20 @@
<div class="addCarBox">
<div class="topbox">
<span>新增消防车辆</span>
</div>
<div class="content">
<!-- <div (click)="selecteAddType(item,key)" *ngFor="let item of addList;let key = index" [ngClass]="{selectedDiv: item.id == selectedFireForceTypeIndex}">
{{item.name}}
</div> -->
<form class="example-form" (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<mat-form-field class="example-full-width">
<mat-label>车辆名称</mat-label>
<input name="carName" matInput [(ngModel)]="carName" required>
</mat-form-field>
</form>
</div>
<div class="btnbox">
<button type="submit" mat-flat-button color="primary" [disabled]='form.invalid' (click)="onSubmit(form.value)">确定</button>
<button type="button" mat-flat-button style="background-color: #F2F4F6;" mat-dialog-close>取消</button>
</div>
</div>

455
src/app/data-collection/fire-force/fire-force.component.html

@ -3,10 +3,12 @@
<div class="topbox">
<div class="add">
<div>
<mat-slide-toggle color="primary" (change)='slideChange($event)' checked labelPosition='before'>列表过滤</mat-slide-toggle>
<mat-slide-toggle color="primary" (change)='slideChange($event)' checked labelPosition='before'>列表过滤
</mat-slide-toggle>
</div>
<div>
<button (click)="reset()" style="width: 68px;margin-right: 12px;" mat-flat-button color="primary">重置</button>
<button (click)="reset()" style="width: 68px;margin-right: 12px;" mat-flat-button
color="primary">重置</button>
<button (click)="addFireForce()" style="width: 68px;" mat-flat-button color="primary">新增</button>
</div>
</div>
@ -15,7 +17,7 @@
<span>
关键字:
</span>
<input type="text" placeholder="请输入名称/类别" [(ngModel)]="searchForm.name"/>
<input type="text" placeholder="请输入名称/类别" [(ngModel)]="searchForm.name" />
</div>
<div class="inputbox">
<span>
@ -27,38 +29,45 @@
</select>
</div>
<div class="searchbtn">
<button (click)="searchList()" style="width: 100%;" mat-flat-button color="primary"><mat-icon style="width: 20px;height: 20px;font-size: 20px;">search</mat-icon>搜索</button>
<button (click)="searchList()" style="width: 100%;" mat-flat-button color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">search</mat-icon>搜索
</button>
</div>
</div>
</div>
<div style="height: 1px;width: 100%;background-color: #F2F4F6;"></div>
<div class="contantbox">
<div class="contentbox">
<div class="title">
<span>消防队</span>
<span>完整度</span>
</div>
<div class="fireForceTree" id="fireForceTree" *ngIf="isTreeView">
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" >
<mat-tree-node (click)="selectTreeNode(node)" [ngClass]="{'selectedTreeNode': node.id == selectedFireForceId}" *matTreeNodeDef="let node;" matTreeNodePadding matTreeNodePaddingIndent='10px'>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node (click)="selectTreeNode(node)" [ngClass]="{'selectedTreeNode': node.id == selectedFireForceId}"
*matTreeNodeDef="let node;" matTreeNodePadding matTreeNodePaddingIndent='10px'>
<button mat-icon-button disabled ></button>
<button mat-icon-button disabled></button>
<span class="nodename">{{node.name}}</span>
<div class="integrity">
<span class="integrityNum">
{{node.fireForceDetailInfo ? accMul(node.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}%
{{node.fireForceDetailInfo ?
accMul(node.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}%
</span>
<div class="integrityColorDiv" [style]="integrity(node.fireForceDetailInfo ? (node.fireForceDetailInfo.integrityScore.toFixed(2) * 100).toFixed(): 0)">
<div class="integrityColorDiv"
[style]="integrity(node.fireForceDetailInfo ? (node.fireForceDetailInfo.integrityScore.toFixed(2) * 100).toFixed(): 0)">
</div>
</div>
<div class="deletebtn" (click)="deleteFireForce(node,$event)"><mat-icon>highlight_off</mat-icon></div>
<div class="deletebtn" (click)="deleteFireForce(node,$event)">
<mat-icon>highlight_off</mat-icon>
</div>
</mat-tree-node>
<mat-tree-node (click)="selectTreeNode(node)" [ngClass]="{'selectedTreeNode': node.id == selectedFireForceId}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding matTreeNodePaddingIndent='10px'>
<mat-tree-node (click)="selectTreeNode(node)"
[ngClass]="{'selectedTreeNode': node.id == selectedFireForceId}"
*matTreeNodeDef="let node;when: hasChild" matTreeNodePadding matTreeNodePaddingIndent='10px'>
<button mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
@ -66,27 +75,36 @@
<span class="nodename">{{node.name}}</span>
<div class="integrity">
<span class="integrityNum">
{{node.fireForceDetailInfo ? accMul(node.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}%
{{node.fireForceDetailInfo ?
accMul(node.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}%
</span>
<div class="integrityColorDiv" [style]="integrity(node.fireForceDetailInfo ? (node.fireForceDetailInfo.integrityScore.toFixed(2) * 100).toFixed(): 0)">
<div class="integrityColorDiv"
[style]="integrity(node.fireForceDetailInfo ? (node.fireForceDetailInfo.integrityScore.toFixed(2) * 100).toFixed(): 0)">
</div>
</div>
<div class="deletebtn" (click)="deleteFireForce(node,$event)"><mat-icon>highlight_off</mat-icon></div>
<div class="deletebtn" (click)="deleteFireForce(node,$event)">
<mat-icon>highlight_off</mat-icon>
</div>
</mat-tree-node>
</mat-tree>
</div>
<div class="fireForceList" *ngIf="!isTreeView">
<ul>
<li [ngClass]="{'selectedLi': item.id == selectedFireForceId}" *ngFor="let item of allFireForceList;let key = index" (click)="selectTreeNode(item)">
<li [ngClass]="{'selectedLi': item.id == selectedFireForceId}"
*ngFor="let item of allFireForceList;let key = index" (click)="selectTreeNode(item)">
<div class="name" [title]="item.name">{{item.name}}</div>
<div class="integrity">
<span class="integrityNum">
{{item.fireForceDetailInfo ? accMul(item.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}%
{{item.fireForceDetailInfo ?
accMul(item.fireForceDetailInfo.integrityScore.toFixed(3),100,1) : 0}}%
</span>
<div class="integrityColorDiv" [style]="integrity(item.fireForceDetailInfo ? (item.fireForceDetailInfo.integrityScore.toFixed(2) * 100).toFixed(): 0)">
<div class="integrityColorDiv"
[style]="integrity(item.fireForceDetailInfo ? (item.fireForceDetailInfo.integrityScore.toFixed(2) * 100).toFixed(): 0)">
</div>
</div>
<div class="deletebtn" (click)="deleteFireForce(item,$event)"><mat-icon>highlight_off</mat-icon></div>
<div class="deletebtn" (click)="deleteFireForce(item,$event)">
<mat-icon>highlight_off</mat-icon>
</div>
</li>
</ul>
</div>
@ -94,14 +112,16 @@
</div>
<div class="mapbox">
<div class="mapcheckbox">
<mat-checkbox (change)="checkBoxChange()" [(ngModel)]="item.isChecked" color="primary" *ngFor="let item of checkBoxList">{{item.name}}</mat-checkbox>
<mat-checkbox (change)="checkBoxChange()" [(ngModel)]="item.isChecked" color="primary"
*ngFor="let item of checkBoxList">{{item.name}}</mat-checkbox>
</div>
<div id="map" class="map" style="overflow: hidden;">
<div id="container"></div>
<div class="gistopbox hidden" [ngClass]="{'show': isGisTopBox}">
<div class="inputBox">
<span>搜索: </span>
<input name="position" [(ngModel)]="searchTitle" id="tipinput" class="positionInput" type="text" autocomplete="off">
<input name="position" [(ngModel)]="searchTitle" id="tipinput" class="positionInput" type="text"
autocomplete="off">
</div>
</div>
</div>
@ -129,13 +149,17 @@
</div>
<!-- <div (click)="selectedTab(2)" [ngClass]="{'selectedBtn': tabIndex == 2}">
<span>车辆装备</span>
</div> -->
<!-- <div (click)="selectedTab(3)" [ngClass]="{'selectedBtn': tabIndex == 3}">
</div>
<div (click)="selectedTab(3)" [ngClass]="{'selectedBtn': tabIndex == 3}">
<span>相关资料</span>
</div> -->
</div>
<div class="btnbox">
<div class="uploadAttachment" *ngIf="tabIndex == 3">
<!-- <div class="goback" (click)="goback()" *ngIf="carPageIndex == 1 && tabIndex == 2"><img
src="/assets/images/goback.png" alt=""> 返回
</div> -->
<!-- <span *ngIf="tabIndex == 2" type="submit" (click)="saveCarData(form.value)">保存车辆</span> -->
<!-- <div class="uploadAttachment" *ngIf="tabIndex == 3">
<button mat-flat-button color="primary">
<mat-icon>attach_file</mat-icon>
上传附件
@ -143,8 +167,7 @@
<a href="javascript:;" class="a-upload">
<input type="file" (change)='uploadAttachment($event)'>
</a>
</div>
</div> -->
<!-- <span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 3">(
<span *ngIf="selectedFireForce.contentVerify.operation == 2" style="color: red;">删除</span>
<span *ngIf="selectedFireForce.contentVerify.operation == 0" >新增</span>
@ -156,11 +179,13 @@
<span class="submitAudit" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5 || selectedFireForce.contentVerify.verifyState == 4" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 3" (click)="cancelAudit()">撤销审核</span>
<span class="save state" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5 || selectedFireForce.contentVerify.verifyState == 4" (click)="save()"><mat-icon>save</mat-icon>保存</span> -->
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
<span class="close" (click)="close()">
<mat-icon>close</mat-icon>关闭
</span>
</div>
</div>
<!-- 详情 -->
<div class="contant" *ngIf="tabIndex == 1">
<div class="content" *ngIf="tabIndex == 1">
<!-- 总队 支队 联系方式不同-->
<div *ngIf="selectedFireForceLevel == 0 || selectedFireForceLevel == 1">
<p>基本信息</p>
@ -170,7 +195,7 @@
<span style="color: red;">*</span>
队站名称:
</span>
<input [(ngModel)]="FireForceDetailInfo.stationName" type="text" style="width:88%;">
<input [(ngModel)]="FireForceDetailInfo.stationName" type="text" style="width:88%;">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
@ -194,7 +219,8 @@
<span>
备注:
</span>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;" name="" id="" cols="30" rows="10"></textarea>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;"
cols="30" rows="10"></textarea>
</mat-grid-tile>
</mat-grid-list>
<p>位置信息</p>
@ -209,11 +235,13 @@
<span>
经度:
</span>
<input [(ngModel)]="positionLngLat.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<input [(ngModel)]="positionLngLat.x" disabled type="text"
style="width: 26%;margin-right: 6%;">
<span>
纬度:
</span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<input [(ngModel)]="positionLngLat.y" disabled type="text"
style="width: 26%;margin-right: 6%;">
<!-- <button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button> -->
@ -304,7 +332,7 @@
<span style="color: red;">*</span>
队站名称:
</span>
<input type="text" style="width:81%;" [(ngModel)]="FireForceDetailInfo.stationName">
<input type="text" style="width:81%;" [(ngModel)]="FireForceDetailInfo.stationName">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
@ -322,7 +350,8 @@
<span>
备注:
</span>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;" name="" id="" cols="30" rows="10"></textarea>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;"
cols="30" rows="10"></textarea>
</mat-grid-tile>
</mat-grid-list>
<p>位置信息</p>
@ -337,11 +366,13 @@
<span>
经度:
</span>
<input [(ngModel)]="positionLngLat.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<input [(ngModel)]="positionLngLat.x" disabled type="text"
style="width: 26%;margin-right: 6%;">
<span>
纬度:
</span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<input [(ngModel)]="positionLngLat.y" disabled type="text"
style="width: 26%;margin-right: 6%;">
<!-- <button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button> -->
@ -370,7 +401,7 @@
</mat-grid-tile>
</mat-grid-list>
<p>联系方式</p>
<mat-grid-list cols="6" rowHeight="40px" >
<mat-grid-list cols="6" rowHeight="40px">
<mat-grid-tile colspan='3' rowspan='1'>
<span>
站长姓名:
@ -449,7 +480,7 @@
<div *ngIf="selectedFireForceLevel == 4 || selectedFireForceLevel == 5 || selectedFireForceLevel == 6">
<p>基本信息</p>
<mat-grid-list cols="6" rowHeight="40px">
<mat-grid-tile colspan='3' rowspan='1'>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
<span style="color: red;">*</span>
队伍类型:
@ -479,8 +510,10 @@
<span>
站长:
</span>
<input [(ngModel)]="othercontactData[2].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input [(ngModel)]="othercontactData[3].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
<input [(ngModel)]="othercontactData[2].PropertyValue" class="smallwidth" type="text"
placeholder="姓名">
<input [(ngModel)]="othercontactData[3].PropertyValue" class="smallwidth" type="text"
placeholder="联系方式">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
@ -492,8 +525,10 @@
<span>
负责人:
</span>
<input [(ngModel)]="othercontactData[4].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input [(ngModel)]="othercontactData[5].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
<input [(ngModel)]="othercontactData[4].PropertyValue" class="smallwidth" type="text"
placeholder="姓名">
<input [(ngModel)]="othercontactData[5].PropertyValue" class="smallwidth" type="text"
placeholder="联系方式">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
@ -505,7 +540,8 @@
<span>
备注:
</span>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 82%;" name="" id="" cols="30" rows="10"></textarea>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 82%;"
cols="30" rows="10"></textarea>
</mat-grid-tile>
</mat-grid-list>
<p>位置信息</p>
@ -520,11 +556,13 @@
<span>
经度:
</span>
<input [(ngModel)]="positionLngLat.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<input [(ngModel)]="positionLngLat.x" disabled type="text"
style="width: 26%;margin-right: 6%;">
<span>
纬度:
</span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<input [(ngModel)]="positionLngLat.y" disabled type="text"
style="width: 26%;margin-right: 6%;">
<!-- <button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button> -->
@ -568,33 +606,330 @@
</div>
</div>
<!-- 车辆 -->
<!-- <div class="contant" *ngIf="tabIndex == 2">
车辆
<!-- <div class="content" id="carcontent" *ngIf="tabIndex == 2">
<div class="carOne" *ngIf="carPageIndex == 0">
<div class="cartopbox">
<div class="add">
<div>
<mat-slide-toggle color="primary" (change)='carslideChange($event)' checked
labelPosition='before'>列表过滤</mat-slide-toggle>
</div>
<div>
<button (click)="resetCarList()" style="width: 68px;margin-right: 12px;" mat-flat-button
color="primary">重置</button>
<button (click)="addFireForceCar()" style="width: 68px;" mat-flat-button
color="primary">新增</button>
</div>
</div>
<div class="searchbox" *ngIf="isCarCheckedOfSearchDiv">
<div class="inputbox">
<span>
关键字:
</span>
<input type="text" placeholder="请输入名称/车牌号" [(ngModel)]="carSearchForm.name" />
</div>
<div class="inputbox">
<span>
所属队站:
</span>
<nz-tree-select [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandOrKeys" [nzNodes]="selectOrganizationTree" nzShowSearch
nzPlaceHolder="请选择" [(ngModel)]="carSearchForm.organization"
(ngModelChange)="onChange($event)"></nz-tree-select>
</div>
<div class="inputbox">
<span>
车辆类别:
</span>
<nz-tree-select #treeCarTypeSelected [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandCarTypeKeys" [nzNodes]="carTypeList" nzShowSearch
nzPlaceHolder="请选择" [(ngModel)]="carSearchForm.carType"
(ngModelChange)="onChangeCarType($event)"></nz-tree-select>
</div>
<div class="inputbox">
<span>
完整度:
</span>
<select class="shortselect" [(ngModel)]="carSearchForm.integrityNum"
[ngClass]="{'gray': carSearchForm.integrityNum == ''}">
<option value='' selected disabled style='display:none;'>请选择</option>
<option *ngFor="let item of listIntegrityNum" [value]="item.id">{{item.name}}
</option>
</select>
<div class="searchbtn">
<button (click)="searchCarList()" style="width: 100%;" mat-flat-button
color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">search</mat-icon>搜索
</button>
</div>
</div>
</div>
</div>
<div class="carList">
<table>
<tr>
<td>车辆名称</td>
<td>所属队站</td>
<td>完整度</td>
<td></td>
</tr>
<tr *ngFor="let item of carsList" class="caritem" (click)="openCarDetails(item)">
<td class="td1">{{item.name}}</td>
<td class="td2">{{item.organizationName}}</td>
<td>
<div class="integrity">
<span class="integrityNum">
{{item.integrityScore ? accMul(item.integrityScore.toFixed(3),100,1) : 0}}%
</span>
<div class="integrityColorDiv"
[style]="integrity(item.integrityScore ? (item.integrityScore.toFixed(2) * 100).toFixed(): 0)">
</div>
</div>
</td>
<td>
<mat-icon (click)="deleteCar(item,$event)" class="deleteFile">highlight_off
</mat-icon>
</td>
</tr>
</table>
</div>
<div class="pagingDevice">
<mat-paginator [length]="carDataLength" [pageSize]="16" (page)="carListChagePage($event)">
</mat-paginator>
</div>
</div>
<form class="example-form" (ngSubmit)="saveCarData(form.invalid)" #form="ngForm">
<div class="carTwo" *ngIf="carPageIndex == 1">
<p class="expandP">基本信息 <button type="submit" matRipple>保存车辆信息</button></p>
<div class="carTwoItemBox">
<div>
<span><span style="color: red;">*</span>车辆类别:</span>
<nz-tree-select #carDetailsTypeSelected [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandCarTypeKeys" [nzNodes]="carTypeList" nzShowSearch
nzPlaceHolder="请选择" [(ngModel)]="carData.basicInfo.carType"
(ngModelChange)="carDetailsTypeChange($event)" required name="carType"></nz-tree-select>
</div>
<div>
<span><span style="color: red;">*</span>车辆名称:</span>
<input type="text" name="carName" required [(ngModel)]="carData.basicInfo.carName">
</div>
<div>
<span><span style="color: red;">*</span>车牌号:</span>
<input type="text" name="carNumber" required [(ngModel)]="carData.basicInfo.carNumber">
</div>
<div>
<span><span style="color: red;">*</span>所属队站:</span>
<nz-tree-select required [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandOrKeys" [nzNodes]="selectOrganizationTree" nzShowSearch
nzPlaceHolder="请选择" [(ngModel)]="carData.basicInfo.carOrganization"
(ngModelChange)="onChange($event)" name="carOrganization">
</nz-tree-select>
</div>
</div>
<p>作战用信息</p>
<div class="carTwoItemBox">
<div>
<span>水泵流量:</span>
<div class="unitDiv">
<input type="text" name="pumpFlow" [(ngModel)]="carData.fightInfo.pumpFlow">
<span class="unit">L/s</span>
</div>
</div>
<div>
<span>消防炮流量:</span>
<div class="unitDiv">
<input type="text" name="fireGunFlow" [(ngModel)]="carData.fightInfo.fireGunFlow">
<span class="unit">L/s</span>
</div>
</div>
<div>
<span>水泵额定压力:</span>
<div class="unitDiv">
<input type="text" name="pumpPressure" [(ngModel)]="carData.fightInfo.pumpPressure">
<span class="unit">Mpa</span>
</div>
</div>
<div>
<span>载水量:</span>
<div class="unitDiv">
<input type="text" name="waterCapacity"
[(ngModel)]="carData.fightInfo.waterCapacity">
<span class="unit"></span>
</div>
</div>
<div>
<span>举高类车辆高度:</span>
<div class="unitDiv">
<input type="text" name="carHeight" [(ngModel)]="carData.fightInfo.carHeight">
<span class="unit"></span>
</div>
</div>
<div>
<span>车辆状态:</span>
<input type="text" name="carState" [(ngModel)]="carData.fightInfo.carState">
</div>
<div>
<span>备注:</span>
<textarea name="remark" [(ngModel)]="carData.fightInfo.remark" cols="30"
rows="10"></textarea>
</div>
<div>
<span>车辆照片:</span>
<div class="uploadbox">
<img class="img"
[src]="carData.fightInfo.carPhoto[0] ? carData.fightInfo.carPhoto[0] : '/assets/images/noImg.png'"
alt="">
<input name="uploadinput" class="uploadinput" type="file"
(change)='uploadCarImg($event)'>
<div class="uploadbtn"><img src="/assets/images/uploadbtn.png" alt=""> 上传照片</div>
</div>
</div>
</div>
<p class="expandP">
<span>
<span style="margin-right: 8px;">车载灭火剂</span>
<mat-slide-toggle color="primary" name="expand1"
[(ngModel)]="carData.carExtinguishant.isExpand">
</mat-slide-toggle>
</span>
<span *ngIf="carData.carExtinguishant.isExpand" class="add"
(click)="addCarDetailsItem('carExtinguishant')">
<img src="/assets/images/add2.png" alt=""> 新增
</span>
</p>
<div class="carTwoItemBox2" *ngIf="carData.carExtinguishant.isExpand">
<div class="item" *ngFor="let item of carData.carExtinguishant.data;let key = index">
<div>
<span><span style="color: red;">*</span>灭火剂类型:</span>
<nz-tree-select required [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandOrKeys" [nzNodes]="extinguishantTypeList" nzShowSearch
nzPlaceHolder="请选择" (ngModelChange)="onChange($event)"
[name]="'exextinguishantType' + key" [(ngModel)]="item.extinguishantType">
</nz-tree-select>
</div>
<div>
<span><span style="color: red;">*</span>灭火剂名称:</span>
<input [name]="'exextinguishantName' + key" type="text"
[(ngModel)]="item.extinguishantName">
</div>
<div>
<span><span style="color: red;">*</span>所属队站:</span>
<nz-tree-select required [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandOrKeys" [nzNodes]="selectOrganizationTree" nzShowSearch
nzPlaceHolder="请选择" (ngModelChange)="onChange($event)"
[name]="'exextinguishantOr' + key" [(ngModel)]="item.extinguishantOr">
</nz-tree-select>
</div>
<div>
<span>混合比:</span>
<div class="unitDiv">
<input type="text" [name]="'exmixingRatio' + key"
[(ngModel)]="item.mixingRatio">
<span class="unit">%</span>
</div>
</div>
<div>
<span>车载量:</span>
<div class="unitDiv">
<input type="text" [name]="'excapacity' + key" [(ngModel)]="item.capacity">
<span class="unit"></span>
</div>
</div>
<div>
<span>生产厂家:</span>
<input type="text" [name]="'exmanufacturer' + key" [(ngModel)]="item.manufacturer">
</div>
<div class="remark">
<span>备注:</span>
<textarea cols="30" rows="10" [name]="'exremark' + key"
[(ngModel)]="item.remark"></textarea>
<span style="color: red;margin-left: 8px;cursor: pointer;"
(click)="deleteCarDetailsItem(carData.carExtinguishant.data,key)">删除</span>
</div>
</div>
</div>
<p class="expandP">
<span>
<span style="margin-right: 8px;">消防器材</span>
<mat-slide-toggle color="primary" name="expand2"
[(ngModel)]="carData.fireEquipment.isExpand">
</mat-slide-toggle>
</span>
<span *ngIf="carData.fireEquipment.isExpand" class="add"
(click)="addCarDetailsItem('fireEquipment')">
<img src="/assets/images/add2.png" alt=""> 新增
</span>
</p>
<div class="carTwoItemBox3" *ngIf="carData.fireEquipment.isExpand">
<div class="item" *ngFor="let item of carData.fireEquipment.data;let key = index">
<div>
<span><span style="color: red;">*</span>器材类型:</span>
<nz-tree-select required [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandOrKeys" [nzNodes]="fireEquipmentTypeList" nzShowSearch
nzPlaceHolder="请选择" (ngModelChange)="onChange($event)"
[name]="'eqequipmentType' + key" [(ngModel)]="item.equipmentType">
</nz-tree-select>
</div>
<div>
<span><span style="color: red;">*</span>器材名称:</span>
<input type="text" [name]="'eqequipmentName' + key"
[(ngModel)]="item.equipmentName">
</div>
<div>
<span><span style="color: red;">*</span>所属队站:</span>
<nz-tree-select required [nzDropdownClassName]="'carTreeDropdown'"
[nzExpandedKeys]="expandOrKeys" [nzNodes]="selectOrganizationTree" nzShowSearch
nzPlaceHolder="请选择" (ngModelChange)="onChange($event)"
[name]="'eqequipmentOr' + key" [(ngModel)]="item.equipmentOr">
</nz-tree-select>
</div>
<div class="width50">
<span>车辆装载数:</span>
<div class="unitDiv">
<input type="text" [name]="'eqcapacity' + key" [(ngModel)]="item.capacity">
<span class="unit"></span>
</div>
</div>
<div class="width50">
<span>生产厂家:</span>
<input type="text" [name]="'eqmanufacturer' + key" [(ngModel)]="item.manufacturer">
</div>
<div class="remark">
<span>备注:</span>
<textarea cols="30" rows="10" [name]="'eqremark' + key"
[(ngModel)]="item.remark"></textarea>
<span style="color: red;margin-left: 8px;cursor: pointer;"
(click)="deleteCarDetailsItem(carData.fireEquipment.data,key)">删除</span>
</div>
</div>
</div>
</div>
</form>
</div> -->
<!-- 相关资料 -->
<div class="contant" *ngIf="tabIndex == 3">
<div class="fileDivBox" *ngFor="let item of AttachmentArr" >
<!-- <div class="content" *ngIf="tabIndex == 3">
<div class="fileDivBox" *ngFor="let item of AttachmentArr">
<mat-icon class="deleteFile" (click)="deleteFile(item,$event)">highlight_off</mat-icon>
<div class="imgbox">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'png'
|| item.fileName.split('.')[item.fileName.split('.').length-1] == 'jpg'
|| 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] == 'JPG'" class="thumbnailImg"
src="/api/Objects/PlanPlatform/{{item.objectName}}" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'docx'
|| item.fileName.split('.')[item.fileName.split('.').length-1] == 'doc'"
class="thumbnailImg" src="/assets/images/word.jpg" alt="">
|| item.fileName.split('.')[item.fileName.split('.').length-1] == 'doc'" class="thumbnailImg"
src="/assets/images/word.jpg" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'pdf'"
class="thumbnailImg" src="/assets/images/pdf.jpg" alt="">
class="thumbnailImg" src="/assets/images/pdf.jpg" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'txt'"
class="thumbnailImg" src="/assets/images/txt.jpg" alt="">
class="thumbnailImg" src="/assets/images/txt.jpg" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'mp4'"
class="thumbnailImg" src="/assets/images/vedio.jpg" alt="">
class="thumbnailImg" src="/assets/images/vedio.jpg" alt="">
</div>
<span [title]="item.fileName">{{item.fileName}}</span>
<button (click)="clickFile(item)" class="btn btn1" mat-flat-button color="primary">查看</button>
<button (click)="download (item)" class="btn btn2" mat-flat-button color="primary">下载</button>
</div>
</div>
</div> -->
</div>
</div>
</div>

702
src/app/data-collection/fire-force/fire-force.component.scss

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

4
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();

1
src/app/gis-management/left-working/left-working.component.ts

@ -1,6 +1,5 @@
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { FormControl } from '@angular/forms';
import { id } from 'date-fns/locale';
@Component({
selector: 'app-left-working',

3
src/app/navigation/navigation.component.ts

@ -8,9 +8,6 @@ import { TreeService } from '../http-interceptors/tree.service'
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { CacheTokenService } from '../http-interceptors/cache-token.service'//引入服务
import { Router, ActivatedRoute, ParamMap } from '@angular/router'
import { is } from 'date-fns/locale';
@Component({
selector: 'app-navigation',

85
src/app/services/objects.service.ts

@ -0,0 +1,85 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ObjectsService {
static readonly c_apiRoot = "/api/";//普通上传的API根路径
static readonly c_apiRoot_Multipart = "/api/";//分块上传的API根路径
// static testPath = "f1/f2";//测试路径
constructor(private http: HttpClient) { }
//普通上传,单个文件上限5M
static baseUrl = ObjectsService.c_apiRoot + 'Objects/PlanPlatform/';
postFile(extensionPath: string, file: File): Observable<Object> {
let formData = new FormData()
formData.append("file", file, file.name)
let data = { keepOriginalName: 'true' }
return this.http.post(ObjectsService.baseUrl + extensionPath, formData, { params: data });
}
//分块上传
static baseUrl_MultipartUpload = ObjectsService.c_apiRoot_Multipart + 'NewMultipartUpload/PlanPlatform/';
// {
// "objectName": "string",
// "uploadId": "string"
// }
postFile_MultipartUpload(extensionPath: string, file: File): Promise<Object> {
// let formData = new FormData()
// formData.append("file", file, file.name)
// return this.http.post(ObjectsService.baseUrl + extensionPath, formData);
let data = { keepOriginalName: 'true', filename: file.name }
return new Promise((resolve, reject) => {
this.http.post(ObjectsService.baseUrl_MultipartUpload + extensionPath, {}, { params: data }).subscribe(async (data: any) => { //初始化分段上传
let objectName = data.objectName
let uploadId = data.uploadId
let PartNumberETag = []; //每次返回需要保存的信息
//分块 处理
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(ObjectsService.c_apiRoot_Multipart + `MultipartUpload/PlanPlatform/${objectName}?uploadId=${uploadId}&partNumber=${i + 1}`, formData).subscribe((data: any) => {
let msg = { "partNumber": data.partNumber || null, "eTag": data.eTag || null }
resolve(msg) // 调用 promise 内置方法处理成功
})
});
PartNumberETag.push(result)
if (PartNumberETag.length === allSlice) { //分块上传完成
let data = PartNumberETag
let paramsData = { uploadId: uploadId };
let path = ObjectsService.c_apiRoot_Multipart + 'CompleteMultipartUpload/PlanPlatform/' + objectName;
this.http.post(path, data, { params: paramsData }).subscribe(data => {
let objData: any = new Object();
objData.fileName = file.name;
objData.filePath = (ObjectsService.baseUrl + objectName).replace(file.name, "");
resolve(objData)
})
}
}//for循环
//分块 处理
})
})
}
}

16
src/app/ui/material-bank/addmatlibrary.component.ts

@ -5,9 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import format from 'date-fns/format';
@Component({
selector: 'addmatlibrary',
@ -33,8 +30,19 @@ import format from 'date-fns/format';
order:number; //order
onSubmit(value){
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
this.http.post("/api/AssetLibraries",{
id: "",
name: value.name,

1
src/app/ui/material-bank/addoriginalcopy.component.ts

@ -4,7 +4,6 @@ import {FlatTreeControl} from '@angular/cdk/tree';
import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import format from 'date-fns/format';
import { TreeService } from '../../http-interceptors/tree.service'
import { FileUploader } from 'ng2-file-upload'
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';

14
src/app/ui/material-bank/editmatlibrary.component.ts

@ -5,7 +5,7 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import format from 'date-fns/format';
// import format from 'date-fns/format';
@Component({
selector: 'editmatlibrary',
templateUrl: './editmatlibrary.component.html',
@ -26,7 +26,17 @@ import format from 'date-fns/format';
}
onSubmit(value){
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
this.http.put(`/api/AssetLibraries/${this.data.material.id}`,{
id: this.data.material.id,
name: value.name,

1
src/app/ui/material-bank/editoriginalcopy.component.ts

@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
import format from 'date-fns/format';
import { TreeService } from '../../http-interceptors/tree.service'
import { FileUploader } from 'ng2-file-upload'
import { DomSanitizer } from '@angular/platform-browser'

14
src/app/ui/material-bank/material-bank.component.ts

@ -8,7 +8,7 @@ import { MatTableDataSource } from '@angular/material/table';
import { EditOriginalCopy } from './editoriginalcopy.component'
import { SelectOriginalCopy } from './selectoriginalcopy.component'
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
import format from 'date-fns/format';
// import format from 'date-fns/format';
@ -145,7 +145,17 @@ export class MaterialBankComponent implements OnInit {
//禁启用素材库
disabled(){
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
if(this.material.enabled){
this.http.put(`/api/AssetLibraries/${this.material.id}`,{
id: this.material.id,

1
src/app/ui/material-bank/selectoriginalcopy.component.ts

@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import format from 'date-fns/format';
@Component({
selector: 'selectoriginalcopy',
templateUrl: './selectoriginalcopy.component.html',

62
src/app/ui/role/role.component.ts

@ -3,7 +3,7 @@ import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog
import {FormControl} from '@angular/forms';
import { HttpClient } from '@angular/common/http';
import { CacheTokenService } from '../../http-interceptors/cache-token.service'
import format from 'date-fns/format';
// import format from 'date-fns/format';
import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
import {FlatTreeControl} from '@angular/cdk/tree';
import { TreeService } from '../../http-interceptors/tree.service'
@ -51,7 +51,17 @@ export class RoleComponent implements OnInit {
//向上按钮
up(node){
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
this.http.put(//把上一节点order换成点击的节点
`/api/Roles/${this.dataSource[node.order -1].id}`,
{
@ -82,7 +92,17 @@ export class RoleComponent implements OnInit {
//向下按钮
down(node){
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
this.http.put(//把下一节点order换成点击的节点
`/api/Roles/${this.dataSource[node.order + 1].id}`,
{
@ -151,7 +171,17 @@ export class RoleComponent implements OnInit {
//启用或禁用按钮
open(roledata){
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
this.http.put(
`/api/Roles/${roledata['id']}`,
{
@ -296,7 +326,17 @@ export class CreateRole {
//提交
onSubmit(value){
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
this.http.post(
'/api/Roles',
{
@ -537,7 +577,17 @@ export class EditRole {
}
}
let newdate = new Date();
let time = format(newdate, 'yyyy-MM-dd')
function getDate(date){
//date是传过来的时间戳,注意需为13位,10位需*1000
//也可以不传,获取的就是当前时间
var time = new Date(date);
var year= time.getFullYear() //年
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
var day = ("0" + time.getDate()).slice(-2); //日
var mydate = year + "-" + month + "-" + day;
return mydate
}
let time = getDate(newdate)
if(this.data['id'] != "0" && this.data['id'] != "1"){
this.http.put(
`/api/Roles/${this.data['id']}`,

3
src/app/ui/unit-information/addgroups.component.ts

@ -5,9 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import format from 'date-fns/format';
@Component({
selector: 'addgroups',

1
src/app/ui/unit-information/addunitinfo.component.ts

@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import format from 'date-fns/format';
@Component({
selector: 'addunitinfo',
templateUrl: './addunitinfo.component.html',

2
src/app/ui/unit-information/editgroup.component.ts

@ -5,8 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import format from 'date-fns/format';
@Component({

1
src/app/ui/unit-information/editunitinfo.component.ts

@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import format from 'date-fns/format';
@Component({
selector: 'editunitinfo',
templateUrl: './editunitinfo.component.html',

1
src/app/ui/userdata/userdata.component.ts

@ -4,7 +4,6 @@ import {MatTableDataSource} from '@angular/material/table';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { HttpClient,HttpHeaders } from '@angular/common/http';
import format from 'date-fns/format';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';

4
src/app/working-area/model/axLegend.ts

@ -24,10 +24,10 @@ export class AxLegend extends AxShape {
super(assetData, workingArea);
this.angle = -this.workingArea.backgroundImage.angle;
this.name = this.assetData.Id;
this.pivot.set(this.assetData.PivotX, this.assetData.PivotY);
this.pivot.set(this.assetData.PivotX == undefined ? 0 : this.assetData.PivotX, this.assetData.PivotY == undefined ? 0 : this.assetData.PivotY);
this.x = this.assetData.Point.x;
this.y = this.assetData.Point.y;
this.scale.set(this.assetData.Scale);
this.scale.set(this.assetData.Scale == undefined ? 1 : this.assetData.Scale);
this.shapeMap = shapeMap;
this.createPoint();
this.refresh();

4
src/app/working-area/working-area.component.ts

@ -16,7 +16,6 @@ import { PropertyInfo } from './model/PropertyInfo';
import { AxPreviewImageShape } from './model/axPreviewImageShape';
import { AxArrowConnector } from './model/axArrowConnector';
import { AxLegend, Legend } from './model/axLegend';
import { AxGrid } from './model/axGrid';
import { AxSelection } from './model/axSelection';
import { AxMessageSystem } from './model/axMessageSystem';
import { Grid2D } from './model/grid2D';
@ -24,7 +23,7 @@ import { Viewport } from 'pixi-viewport';
import { EVENT_IMAGE_RESIZE, EVENT_SELECTION_CHANGED } from './model/events';
import { Dimensioning } from './model/dimensioning';
import { Configuration, viewBounds } from './model/configuration';
import { id } from 'date-fns/locale';
@Component({
@ -1099,6 +1098,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
imageWidth: number = this.canvasData.selectStorey.imageWidth,
imageHeight: number = this.canvasData.selectStorey.imageHeight,
): Promise<void> {
console.log('当前背景图',imageUrl)
if (imageAngle === undefined || imageAngle === null) {
imageAngle = 0;
}

BIN
src/assets/images/add2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

BIN
src/assets/images/goback.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

BIN
src/assets/images/uploadbtn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

327
src/styles.scss

@ -1,107 +1,144 @@
@import './app/theme.scss';
@import "./app/theme.scss";
@import "./app/ngZorroTree.css"; /* 引入组件样式 */
// @import "~ng-zorro-antd/select/style/index.min.css"; /* 引入组件样式 */
@font-face
{
// @import "~ng-zorro-antd/style/index.min.css"; /* 引入基本样式 */
@import "~ng-zorro-antd/tree-select/style/index.min.css"; /* 引入组件样式 */
@font-face {
font-family: Regular;
src: url('./assets/font/SourceHanSansCN-Regular.otf'),
src: url("./assets/font/SourceHanSansCN-Regular.otf");
}
html,body{
html,
body {
touch-action: none;
width: 100%;
height:100%;
margin:0 auto;
padding:0;
width: 100%;
height: 100%;
margin: 0 auto;
padding: 0;
overflow: hidden;
font-family: Regular;
textarea{
font-family: Regular
textarea {
font-family: Regular;
}
user-select:auto!important
}
ul,ol,dl,li,dt,dd,p,form,input,h1,h2,h3,h4,h5,h6,section,article,aside,header,footer,nav,figure,time,mark,main,canvas{
margin:0;
padding:0;
}
b,strong,i,em,h1,h2,h3,h4,h5,h6{
font-weight:500;
font-style:normal;
}
img{
border:none;
user-select: auto !important;
}
ul,
ol,
dl,
li,
dt,
dd,
p,
form,
input,
h1,
h2,
h3,
h4,
h5,
h6,
section,
article,
aside,
header,
footer,
nav,
figure,
time,
mark,
main,
canvas {
margin: 0;
padding: 0;
}
a{
b,
strong,
i,
em,
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 500;
font-style: normal;
}
img {
border: none;
}
a {
text-decoration: none;
color:#000;
color: #000;
}
ul,ol,li{
list-style:none;
ul,
ol,
li {
list-style: none;
overflow-x: hidden;
}
.clearfn:after{
content:"";
clear:both;
.clearfn:after {
content: "";
clear: both;
display: block;
overflow:hidden;
height:0;
overflow: hidden;
height: 0;
visibility: hidden;
}
//root标签
app-root{
app-root {
height: 100%;
}
h1{
h1 {
font-size: 16px;
}
.mat-expansion-panel-body {
padding: 0px !important;
}
.mat-expansion-indicator::after {
color: white;
color: white;
}
.example-sidenav .mat-drawer-inner-container {
overflow: hidden;
}
table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,
table td.mat-footer-cell:last-of-type{
table th.mat-header-cell:last-of-type,
table td.mat-cell:last-of-type,
table td.mat-footer-cell:last-of-type {
padding-right: 0px;
}
.mat-tab-body{
height: 100%;
overflow-y: auto;
.mat-tab-body {
height: 100%;
overflow-y: auto;
}
.mat-content { //可展开面板垂直居中
align-items: center;
.mat-content {
//可展开面板垂直居中
align-items: center;
}
//滚动条样式
::-webkit-scrollbar{
width: 5px;
background-color: white;
::-webkit-scrollbar {
width: 5px;
background-color: white;
}
::-webkit-scrollbar-thumb{
background-color: #999;
::-webkit-scrollbar-thumb {
background-color: #999;
}
//x轴滚动条隐藏
.example-sidenav-content {
overflow-x: hidden; overflow-y: auto;
}
overflow-x: hidden;
overflow-y: auto;
}
.mat-tab-body-wrapper{
.mat-tab-body-wrapper {
height: 100%;
}
.mat-tab-body-content{
overflow: hidden!important;
.mat-tab-body-content {
overflow: hidden !important;
}
//gis单位信息tabs样式
#gis{
.mat-tab-label{
#gis {
.mat-tab-label {
height: 38px;
line-height: 38px;
min-width: 80px;
@ -109,26 +146,33 @@ table td.mat-footer-cell:last-of-type{
}
}
//可展开面板按钮颜色
#gisbasicinfo,#planlist,#allaround,#firefacilities,#keysite,#functionpartition,#realisticpicture{
#gisbasicinfo,
#planlist,
#allaround,
#firefacilities,
#keysite,
#functionpartition,
#realisticpicture {
.mat-expansion-indicator::after {
color: #333333;
}
}
#waitexamineergis{
#waitexamineergis {
.mat-expansion-indicator::after {
color: #fff;
}
mat-expansion-panel{
box-shadow: 0 0 black;border: 1px solid #EEF1F5;
mat-expansion-panel {
box-shadow: 0 0 black;
border: 1px solid #eef1f5;
}
}
//gis标点弹出框样式
#gispopupbox{
.btn{
#gispopupbox {
.btn {
width: 92px;
height: 36px;
background: #FFFFFF;
border: 1px solid #EEF1F5;
background: #ffffff;
border: 1px solid #eef1f5;
opacity: 1;
border-radius: 4px;
margin: 0 5px;
@ -136,25 +180,33 @@ table td.mat-footer-cell:last-of-type{
// font-family: Source Han Sans CN;
font-weight: 400;
line-height: 36px;
color: #0080FF;
color: #0080ff;
opacity: 1;
cursor: pointer;
display: table-cell; //主要是这个属性
text-align: center;
img{
img {
vertical-align: middle;
margin-right: 3px;
padding-bottom: 2px;
}
}
}
//弹出框样式取消padding
#shareDialog,#lookPlanDialog,#openPlanToolDialog,#addWater,#videodialog,#addLinkageForce,#videodialog2,#gisImgDialog{
#shareDialog,
#lookPlanDialog,
#openPlanToolDialog,
#addWater,
#addCar,
#videodialog,
#addLinkageForce,
#videodialog2,
#gisImgDialog {
padding: 0;
}
#setPosition,#map{
#setPosition,
#map {
.custom-content-marker {
position: relative;
width: 29px;
@ -172,40 +224,40 @@ table td.mat-footer-cell:last-of-type{
bottom: -36px;
width: 68px;
height: 30px;
background:#FFFFFF;
background: #ffffff;
border-radius: 60px;
color: #EBEBEB;
color: #ebebeb;
display: flex;
justify-content: space-around;
box-sizing: border-box;
padding: 0 5px;
padding: 0 5px;
align-items: center;
img{
img {
width: 20px;
height: 20px;
cursor: pointer;
}
}
.custom-content-marker .close-btn:hover{
.custom-content-marker .close-btn:hover {
background: #666;
}
}
#fireForceTree{
.mat-tree-node{
#fireForceTree {
.mat-tree-node {
min-height: 40px;
flex: none;
box-sizing: border-box;
}
.mat-icon-button{
.mat-icon-button {
width: 30px;
height: 30px;
line-height: 30px;
}
}
#linkageForcesSwiper{
.swiper-container{
--swiper-navigation-size: 26px;/* 设置按钮大小 */
#linkageForcesSwiper {
.swiper-container {
--swiper-navigation-size: 26px; /* 设置按钮大小 */
}
}
.KedaPosImg {
@ -221,47 +273,48 @@ table td.mat-footer-cell:last-of-type{
background: no-repeat center;
}
//点聚合自定义图片大小
.clusterImg{
.clusterImg {
width: 30px;
height: 30px;
}
//水源采集点聚合
.clusterImgCollection{
width:30px;
height:30px;
.clusterImgCollection {
width: 30px;
height: 30px;
}
#unitBasicInfo{
.mat-expansion-indicator::after{
#unitBasicInfo {
.mat-expansion-indicator::after {
color: black;
}
}
td{
word-break:break-all;
td {
word-break: break-all;
}
@media screen and (max-width:1400px){
.mat-toolbar-row, .mat-toolbar-single-row {
height: 50px!important;
@media screen and (max-width: 1400px) {
.mat-toolbar-row,
.mat-toolbar-single-row {
height: 50px !important;
}
}
#firefightingdevicelook,#firefightingdevice{
.expansionheader{
height: auto!important;
#firefightingdevicelook,
#firefightingdevice {
.expansionheader {
height: auto !important;
}
}
#planContainer{
#planContainer {
.custom-content-marker {
position: relative;
width: 28px;
height: 28px;
}
}
.custom-content-marker img {
.custom-content-marker img {
width: 100%;
height: 100%;
}
}
.custom-content-marker .close-btn {
.custom-content-marker .close-btn {
position: absolute;
top: -6px;
right: -8px;
@ -273,15 +326,16 @@ td{
color: #fff;
text-align: center;
line-height: 15px;
box-shadow: -1px 1px 1px rgba(10, 10, 10, .2);
}
box-shadow: -1px 1px 1px rgba(10, 10, 10, 0.2);
}
.custom-content-marker .close-btn:hover{
.custom-content-marker .close-btn:hover {
background: #666;
}
}
}
#setUnitPosition,#setUnitPositionLook{
#setUnitPosition,
#setUnitPositionLook {
.custom-content-marker {
position: relative;
// border: 1px solid red;
@ -336,3 +390,62 @@ td{
background: #666;
}
}
.mat-paginator-container {
min-height: 40px !important;
}
#carcontent {
.cartopbox {
nz-tree-select {
width: 81.4%;
margin-right: 22px;
}
.ant-select-selector {
background-color: #f2f4f6;
height: 40px;
border: none;
border-radius: 5px;
padding-top: 5px;
box-sizing: border-box;
width: 104.7%;
}
input{
height: 40px;
}
}
.carTwoItemBox{
nz-tree-select {
width: 71.6%;
margin-right: 22px;
}
.ant-select-selector {
height: 34px;
border: none;
border-radius: 4px;
border: 1px solid #EBEBEB;
box-sizing: border-box;
padding-top: 1px;
width: 104.9%;
}
}
.carTwoItemBox2,.carTwoItemBox3{
nz-tree-select {
width: 64.3%;
margin-right: 22px;
}
.ant-select-selector {
height: 34px;
border: none;
border-radius: 4px;
border: 1px solid #EBEBEB;
box-sizing: border-box;
padding-top: 1px;
width: 104.9%;
}
}
}
.carTreeDropdown{
max-height: 239px;
}
Loading…
Cancel
Save