chenjingyu 4 years ago
parent
commit
af8d51eb96
  1. 6
      angular.json
  2. 48
      src/app/canvas-share-data.service.ts
  3. 46
      src/app/data-collection/fire-force/fire-force.component.ts
  4. 43
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  5. 29
      src/app/data-collection/water-collection/water-collection.component.ts
  6. 31
      src/app/gis-management/gis-labeling/gis-labeling.component.ts
  7. 28
      src/app/key-unit/function-division-look/function-division.component.ts
  8. 28
      src/app/key-unit/function-division/function-division.component.ts
  9. 2
      src/app/key-unit/router-gis/router-gis.component.html
  10. 7
      src/app/key-unit/router-gis/router-gis.component.scss
  11. 100
      src/app/key-unit/router-gis/router-gis.component.ts
  12. 1
      src/app/navigation/navigation.component.html
  13. 63
      src/app/pages/home2/home2.component.html
  14. 247
      src/app/pages/home2/home2.component.scss
  15. 25
      src/app/pages/home2/home2.component.spec.ts
  16. 348
      src/app/pages/home2/home2.component.ts
  17. 7
      src/app/pages/pages-routing.module.ts
  18. 7
      src/app/pages/pages.module.ts
  19. 280
      src/app/pages/personaldata/personaldata.component.html
  20. 110
      src/app/pages/personaldata/personaldata.component.scss
  21. 25
      src/app/pages/personaldata/personaldata.component.spec.ts
  22. 15
      src/app/pages/personaldata/personaldata.component.ts
  23. 2
      src/app/plan-audit/plan-record/plan-record.component.ts
  24. 2
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  25. 2
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  26. 6
      src/app/plan-management/meet-plan/meet-plan.component.ts
  27. 2
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  28. 2
      src/app/plan-management/pass-plan/pass-plan.component.ts
  29. 2
      src/app/plan-management/type-plan/type-plan.component.ts
  30. 16
      src/app/tabbar/tabbar.component.html
  31. 10
      src/app/tabbar/tabbar.component.scss
  32. 86
      src/app/tabbar/tabbar.component.ts
  33. 18
      src/app/ui/badge/badge.component.html
  34. 3
      src/app/ui/badge/badge.component.scss
  35. 25
      src/app/ui/badge/badge.component.spec.ts
  36. 14
      src/app/ui/badge/badge.component.ts
  37. 6
      src/app/ui/button/button.component.html
  38. 0
      src/app/ui/button/button.component.scss
  39. 25
      src/app/ui/button/button.component.spec.ts
  40. 89
      src/app/ui/button/button.component.ts
  41. 12
      src/app/ui/card/card.component.html
  42. 10
      src/app/ui/card/card.component.scss
  43. 25
      src/app/ui/card/card.component.spec.ts
  44. 15
      src/app/ui/card/card.component.ts
  45. 25
      src/app/ui/collection-tools-building/collection-tools.component.spec.ts
  46. 8
      src/app/ui/collection-tools-building/collection-tools.component.ts
  47. 25
      src/app/ui/collection-tools-plan/collection-tools.component.spec.ts
  48. 10
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  49. 1
      src/app/ui/collection-tools-plan/leftFunctionalDomain.ts
  50. 6
      src/app/ui/collection-tools/collection-tools.component.html
  51. 25
      src/app/ui/collection-tools/collection-tools.component.spec.ts
  52. 26
      src/app/ui/collection-tools/collection-tools.component.ts
  53. 4
      src/app/ui/collection-tools/leftFunctionalDomain.ts
  54. 6
      src/app/ui/collection-tools/save.ts
  55. 11
      src/app/ui/dateselect/dateselect.component.html
  56. 7
      src/app/ui/dateselect/dateselect.component.scss
  57. 25
      src/app/ui/dateselect/dateselect.component.spec.ts
  58. 23
      src/app/ui/dateselect/dateselect.component.ts
  59. 6
      src/app/ui/footer/footer.component.html
  60. 15
      src/app/ui/footer/footer.component.scss
  61. 25
      src/app/ui/footer/footer.component.spec.ts
  62. 15
      src/app/ui/footer/footer.component.ts
  63. 34
      src/app/ui/grid/grid.component.html
  64. 12
      src/app/ui/grid/grid.component.scss
  65. 25
      src/app/ui/grid/grid.component.spec.ts
  66. 15
      src/app/ui/grid/grid.component.ts
  67. 63
      src/app/ui/list/list.component.html
  68. 0
      src/app/ui/list/list.component.scss
  69. 25
      src/app/ui/list/list.component.spec.ts
  70. 28
      src/app/ui/list/list.component.ts
  71. 66
      src/app/ui/menu/menu.component.html
  72. 0
      src/app/ui/menu/menu.component.scss
  73. 25
      src/app/ui/menu/menu.component.spec.ts
  74. 15
      src/app/ui/menu/menu.component.ts
  75. 13
      src/app/ui/progress/progress.component.html
  76. 0
      src/app/ui/progress/progress.component.scss
  77. 25
      src/app/ui/progress/progress.component.spec.ts
  78. 15
      src/app/ui/progress/progress.component.ts
  79. 1
      src/app/ui/slide/slide.component.html
  80. 0
      src/app/ui/slide/slide.component.scss
  81. 25
      src/app/ui/slide/slide.component.spec.ts
  82. 22
      src/app/ui/slide/slide.component.ts
  83. 10
      src/app/ui/snackbar/snackbar.component.html
  84. 0
      src/app/ui/snackbar/snackbar.component.scss
  85. 25
      src/app/ui/snackbar/snackbar.component.spec.ts
  86. 19
      src/app/ui/snackbar/snackbar.component.ts
  87. 51
      src/app/ui/stepper/stepper.component.html
  88. 0
      src/app/ui/stepper/stepper.component.scss
  89. 25
      src/app/ui/stepper/stepper.component.spec.ts
  90. 23
      src/app/ui/stepper/stepper.component.ts
  91. 22
      src/app/ui/tabgroup/tabgroup.component.html
  92. 0
      src/app/ui/tabgroup/tabgroup.component.scss
  93. 25
      src/app/ui/tabgroup/tabgroup.component.spec.ts
  94. 17
      src/app/ui/tabgroup/tabgroup.component.ts
  95. 22
      src/app/ui/ui-routing.module.ts
  96. 16
      src/app/ui/ui.module.ts
  97. 59
      src/app/working-area/working-area.component.ts
  98. 31
      src/assets/chartstheme/chongqing.js
  99. BIN
      src/assets/images/map.png
  100. 1
      src/main.ts

6
angular.json

@ -36,13 +36,11 @@
"node_modules/echarts/dist/echarts.js",
"src/assets/mTokenK1/mToken_K1.js",
"./node_modules/swiper/js/swiper.min.js",
"src/assets/chartstheme/chongqing.js",
"src/assets/chartstheme/westeros.js",
"src/assets/chartstheme/walden.js",
"src/assets/chartstheme/westeros.js",
"src/assets/chartstheme/echarts-skin.js",
"src/assets/qrcode/qrcode.min.js"
"src/assets/qrcode/qrcode.min.js",
"./node_modules/crypto-js/crypto-js.js"
]
},
"configurations": {

48
src/app/canvas-share-data.service.ts

@ -1,3 +1,4 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import {ReplaySubject} from 'rxjs';
import { Observable } from 'rxjs';
@ -7,7 +8,7 @@ import { GameMode } from './working-area/model/gameMode';
providedIn: 'root'
})
export class CanvasShareDataService {
constructor() { }
constructor(private http:HttpClient) { }
private _sendMessage: ReplaySubject<any> = new ReplaySubject<any>(1);
examDisposalNodesData; // 考生进入时获取当前试卷的处置节点
@ -29,7 +30,7 @@ export class CanvasShareDataService {
// 处置 节点
allDisposalNode: any = []; // 所有 处置节点
allNodeMarkers: any; // 灾情 标签信息
allNodeMarkers: any = { highlightMarkers:{}, markers:{} }; // 灾情 标签信息
selectPanelPoint: DisposalNodeData = new DisposalNodeData(); // 当前数据节点
selectPanelPointBaseData: any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 对应 父级节点
customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称
@ -81,6 +82,49 @@ export class CanvasShareDataService {
return this._sendMessage.asObservable();
}
//分段上传
sectionUpload (companyId:string,file) {
let data = {filename: file.name}
return new Promise ((resolve, reject)=>{
this.http.post(`/api/NewMultipartUpload/PlanPlatform/${companyId}/DisposalNode`,{},{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(`/api/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}
this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${objectName}`,data,{params:paramsData}).subscribe(data=>{
resolve(objectName)
})
}
}//for循环
//分块 处理
})
})
}
// 处置节点 筛选出 匹配数据 匹配不到 return undefined
findDisposalNode(parentId: string= null, name: string= null) {
if (parentId && name) { // 匹配 父id, name

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

@ -9,7 +9,7 @@ import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'
import { NzTreeNode } from 'ng-zorro-antd/tree';
import { TreeService } from 'src/app/http-interceptors/tree.service';
import Viewer from 'viewerjs'
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
declare var AMap: any;
@Component({
@ -57,10 +57,8 @@ export class FireForceComponent implements OnInit {
PageSize : 999999,
Levels:Levels
}
console.log('4444',Levels)
if(Levels.length != 0){//如果勾选了checkbox
this.http.get('/api/CustomFireForce',{params:params}).subscribe((data:any) => {
console.log('所有力量',data)
this.createMarker(data)
})
}else{
@ -177,7 +175,6 @@ export class FireForceComponent implements OnInit {
MaxIntegrity : MaxIntegrity
}
this.http.get('/api/CustomFireForce',{params:params}).subscribe((data:any) => {
console.log('所有消防力量列表',data)
this.allFireForceList = data
   this.dataSource.data = this.tree.toTree(data)
this.treeControl.expand(this.treeControl.dataNodes[0]);
@ -198,11 +195,9 @@ export class FireForceComponent implements OnInit {
newNodes = newNodes.filter(n => {
return expandNodes.indexOf(n.id) >= 0;
});
console.log(newNodes)
newNodes.forEach(item => {
this.treeControl.expand(item);
});
console.log('所有消防力量',data)
})
}
private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数
@ -235,7 +230,6 @@ export class FireForceComponent implements OnInit {
code:''
}
selectTreeNode(node){
console.log(node)
this.isGisTopBox = false
if(this.selectedFireForceId != node.id){
this.clearData()
@ -264,7 +258,6 @@ export class FireForceComponent implements OnInit {
this.isMasklayer = false
this.FireForceDetailInfo = data
if(data.location && data.location.x){//如果已经标注单位坐标
console.log('开始标注')
this.positionLngLat = data.location
this.map.setCenter([data.location.x,data.location.y]);
this.newPositionMarker = new AMap.Marker({
@ -278,7 +271,6 @@ export class FireForceComponent implements OnInit {
this.map.setCity('上海市');
}
//相关资料
console.log('详情',data)
data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null
if(node.forceType == 0 && node.level == 0){
@ -315,7 +307,6 @@ export class FireForceComponent implements OnInit {
//搜索
isTreeView:boolean = true//决定显示树还是列表
searchList(){
console.log(this.searchForm)
if(!this.searchForm.name && !this.searchForm.integrityNum){
this.isTreeView = true
}else{
@ -573,11 +564,8 @@ export class FireForceComponent implements OnInit {
//删除一下数据库的文件
if(this.deletedFile.length != 0){
this.deletedFile.forEach(item => {
// this.http.delete(`/api/Objects/PlanPlatform/${item.objectName}?x-oss-process=image/resize,m_fixed,h_100,w_100`).subscribe(data=>{
// console.log('删除缩略图成功')
// })
this.http.delete(`/api/Objects/PlanPlatform/${item.objectName}`).subscribe(data=>{
console.log('删除原文件成功')
// console.log('删除原文件成功')
})
});
@ -637,7 +625,6 @@ export class FireForceComponent implements OnInit {
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
this.upDateAllFireForce()
// console.log(123,data)
})
}else{
let forceType
@ -654,7 +641,6 @@ export class FireForceComponent implements OnInit {
organizationId : this.selectedFireForce.id
}
this.http.post('/api/CustomFireForce',body,{params:params}).subscribe((data:any) => {
console.log('创建其他消防力量成功',data)
this.newselectedFireForceId = data.id
this.selectedFireForce = data
let body = this.FireForceDetailInfo
@ -669,7 +655,6 @@ export class FireForceComponent implements OnInit {
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
console.log(123,data2)
})
})
}
@ -717,21 +702,6 @@ export class FireForceComponent implements OnInit {
});//注册监听,当选中某条记录时会触发
});
if(this.isMapLabel){//如果已经标注单位坐标
console.log('已标注单位位置')
// this.map.setCenter([this.unitinfo.location.x,this.unitinfo.location.y]);
// this.oldPositionMarker = new AMap.Marker({
// position: [this.unitinfo.location.x,this.unitinfo.location.y],
// content: this.newPositionMarkerContent,
// offset: new AMap.Pixel(-15, -18)
// })
// // 将 markers 添加到地图
// this.map.add(this.oldPositionMarker);
}else{
console.log('未标注单位位置')
// this.map.setCity('上海市');
}
}
//点击位置
isGisTopBox:boolean = false //
@ -744,15 +714,11 @@ export class FireForceComponent implements OnInit {
this.isGisTopBox = true
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
let center
console.log(789,this.atLastPositionLngLat)
if(this.newPositionMarker && this.atLastPositionLngLat.x){//如果已经标注单位坐标
console.log(1)
center = [this.atLastPositionLngLat.x, this.atLastPositionLngLat.y]
}else if(this.newPositionMarker && !this.atLastPositionLngLat.x && this.FireForceDetailInfo.location && this.FireForceDetailInfo.location.x){
console.log(2)
center = [this.FireForceDetailInfo.location.x, this.FireForceDetailInfo.location.y]
}else{
console.log(3)
center = this.map.getCenter(); //获取当前地图中心位置
}
this.newPositionMarker = new AMap.Marker({
@ -815,7 +781,6 @@ export class FireForceComponent implements OnInit {
isMasklayerUploading:boolean = false//上传进度条遮罩层是否打开
isMasklayerDownload:boolean = false//下载进度条遮罩层是否打开
uploadAttachment(e){
console.log('选择的文件',e)
this.file = e.target.files[0] || null //上传的文件
let file = e.target.files[0] || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
@ -823,12 +788,9 @@ export class FireForceComponent implements OnInit {
if (file && fileSize<=shardSize) { //上传文件<=5MB时
this.isMasklayer = true
console.log('file',this.file)
let formData = new FormData()
formData.append("file",file)
//this.selectedFireForce.id 选择的组织机构的id
this.http.post(`/api/Objects/PlanPlatform/FireForce/${this.selectedFireForce.id}`,formData).subscribe((data:any)=>{
// this.objectName = data.objectName
let obj = {
objectName:data.objectName,
fileName:data.fileName,
@ -836,7 +798,6 @@ export class FireForceComponent implements OnInit {
}
this.AttachmentArr.push(obj)
this.isMasklayer = false
console.log('上传成功',data)
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@ -846,7 +807,6 @@ export class FireForceComponent implements OnInit {
this.isMasklayerUploading = true
let data = {filename: file.name}
this.http.post(`/api/NewMultipartUpload/PlanPlatform/FireForce/${this.selectedFireForce.id}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
console.log('初始化分块上传成功',data)
this.objectName = data.objectName
this.uploadId = data.uploadId
this.subsectionUploading()
@ -986,7 +946,6 @@ export class FireForceComponent implements OnInit {
//删除图片
deletedFile:any = []
deleteFile(item,e){
console.log(this.AttachmentArr)
e.stopPropagation()
let isTrue = window.confirm('确定要删除该文件吗?')
if(isTrue){
@ -1007,7 +966,6 @@ export class FireForceComponent implements OnInit {
//点击文件
clickFile(item){
// console.log(item)
let suffix = item.fileName.split('.')[item.fileName.split('.').length-1]
if(suffix == 'png' || suffix == 'jpg' || suffix == 'JPG'){
let dom = document.getElementById(`viewerjs`)

43
src/app/data-collection/linkage-forces/linkage-forces.component.ts

@ -10,7 +10,7 @@ import { NzTreeNode } from 'ng-zorro-antd/tree';
import { TreeService } from 'src/app/http-interceptors/tree.service';
import Viewer from 'viewerjs'
import Swiper from 'swiper';
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
declare var AMap: any;
@Component({
selector: 'app-linkage-forces',
@ -68,10 +68,8 @@ export class LinkageForcesComponent implements OnInit {
PageSize : 999999,
LinkageForceTypes:LinkageForceTypes
}
console.log('4444',LinkageForceTypes)
if(LinkageForceTypes.length != 0){//如果勾选了checkbox
this.http.get('/api/LinkageForces',{params:params}).subscribe((data:any) => {
console.log('所有力量',data)
this.createMarker(data.items)
})
}else{
@ -219,7 +217,6 @@ export class LinkageForcesComponent implements OnInit {
PageNumber : this.PageNumber,
}
this.http.get('/api/LinkageForces',{params:params}).subscribe((data:any) => {
console.log('所有消防力量列表',data)
this.dataLength = data.totalCount
this.allLinkageForceObj = data
})
@ -237,10 +234,7 @@ export class LinkageForcesComponent implements OnInit {
if(this.newPositionMarker){
this.map.remove(this.newPositionMarker);
}
console.log('当前点击的li',item)
if(item.location && item.location.x){//如果已经标注单位坐标
console.log('开始标注')
this.map.setCenter([item.location.x,item.location.y]);
this.newPositionMarker = new AMap.Marker({
position: [item.location.x,item.location.y],
@ -385,7 +379,6 @@ export class LinkageForcesComponent implements OnInit {
data=>{
if(typeof data === 'number' && !isNaN(data)){
this.clearData()
console.log('清空了',this.LinkageForceDetailInfo)
this.LinkageForceDetailInfo.linkageForceType = data
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
this.map.setCity('上海市');
@ -405,7 +398,7 @@ export class LinkageForcesComponent implements OnInit {
if(this.deletedFile.length != 0){
this.deletedFile.forEach(item => {
this.http.delete(`/api/Objects/PlanPlatform/${item.objectName}`).subscribe(data=>{
console.log('删除原文件成功')
// console.log('删除原文件成功')
})
});
}
@ -422,19 +415,15 @@ export class LinkageForcesComponent implements OnInit {
let body = this.LinkageForceDetailInfo
if(this.LinkageForceDetailInfo.id){
this.http.put(`/api/LinkageForces/${this.LinkageForceDetailInfo.id}`,body).subscribe((data:any) =>{
console.log('修改成功',data)
this.isMasklayer = false
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('修改成功','确定',config);
// this.LinkageForceDetailInfo.id = data.id
this.getAllFireForce()
})
}else{
this.http.post('/api/LinkageForces',body).subscribe((data:any) =>{
console.log('创建成功',data)
this.isMasklayer = false
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -450,8 +439,6 @@ export class LinkageForcesComponent implements OnInit {
//关闭
close(){
this.LinkageForceDetailInfo={}
// this.LinkageForceDetailInfo.id = null
console.log(this.LinkageForceDetailInfo)
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
}
map:any
@ -487,21 +474,6 @@ export class LinkageForcesComponent implements OnInit {
});//注册监听,当选中某条记录时会触发
});
if(this.isMapLabel){//如果已经标注单位坐标
console.log('已标注单位位置')
// this.map.setCenter([this.unitinfo.location.x,this.unitinfo.location.y]);
// this.oldPositionMarker = new AMap.Marker({
// position: [this.unitinfo.location.x,this.unitinfo.location.y],
// content: this.newPositionMarkerContent,
// offset: new AMap.Pixel(-15, -18)
// })
// // 将 markers 添加到地图
// this.map.add(this.oldPositionMarker);
}else{
console.log('未标注单位位置')
// this.map.setCity('上海市');
}
}
//点击位置
isGisTopBox:boolean = false //
@ -514,15 +486,11 @@ export class LinkageForcesComponent implements OnInit {
this.isGisTopBox = true
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
let center
console.log(789,this.atLastPositionLngLat)
if(this.newPositionMarker && this.atLastPositionLngLat.x){//如果已经标注单位坐标
console.log(1)
center = [this.atLastPositionLngLat.x, this.atLastPositionLngLat.y]
}else if(this.newPositionMarker && !this.atLastPositionLngLat.x && this.LinkageForceDetailInfo.location && this.LinkageForceDetailInfo.location.x){
console.log(2)
center = [this.LinkageForceDetailInfo.location.x, this.LinkageForceDetailInfo.location.y]
}else{
console.log(3)
center = this.map.getCenter(); //获取当前地图中心位置
}
this.newPositionMarker = new AMap.Marker({
@ -585,7 +553,6 @@ export class LinkageForcesComponent implements OnInit {
isMasklayerUploading:boolean = false//上传进度条遮罩层是否打开
isMasklayerDownload:boolean = false//下载进度条遮罩层是否打开
uploadAttachment(e){
console.log('选择的文件',e)
this.file = e.target.files[0] || null //上传的文件
let file = e.target.files[0] || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
@ -593,7 +560,6 @@ export class LinkageForcesComponent implements OnInit {
if (file && fileSize<=shardSize) { //上传文件<=5MB时
this.isMasklayer = true
console.log('file',this.file)
let formData = new FormData()
formData.append("file",file)
//this.selectedFireForce.id 选择的组织机构的id
@ -606,7 +572,6 @@ export class LinkageForcesComponent implements OnInit {
}
this.AttachmentArr.push(obj)
this.isMasklayer = false
console.log('上传成功',data)
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@ -616,7 +581,6 @@ export class LinkageForcesComponent implements OnInit {
this.isMasklayerUploading = true
let data = {filename: file.name}
this.http.post(`/api/NewMultipartUpload/PlanPlatform/LinkageForce/${this.LinkageForceDetailInfo.id}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
console.log('初始化分块上传成功',data)
this.objectName = data.objectName
this.uploadId = data.uploadId
this.subsectionUploading()
@ -756,7 +720,6 @@ export class LinkageForcesComponent implements OnInit {
//删除图片
deletedFile:any = []
deleteFile(item,e){
console.log(this.AttachmentArr)
e.stopPropagation()
let isTrue = window.confirm('确定要删除该文件吗?')
if(isTrue){
@ -777,10 +740,8 @@ export class LinkageForcesComponent implements OnInit {
//点击文件
clickFile(item){
console.log(item)
let suffix = item.fileName.split('.')[item.fileName.split('.').length-1]
if(suffix == 'png' || suffix == 'jpg' || suffix == 'JPG'){
console.log('这是图片')
let dom = document.getElementById(`viewerjs`)
let pObjs = dom.childNodes;
let node = document.createElement("img")

29
src/app/data-collection/water-collection/water-collection.component.ts

@ -167,12 +167,10 @@ export class WaterCollectionComponent implements OnInit {
this.http.get('/api/WaterSources',{params:params}).subscribe((data:any) => {
this.addWaterListData = data
this.dataLength = data.totalCount
console.log('所有水源',data)
})
}
//搜索
searchList(){
console.log(this.searchForm)
this.getAllWaterData()
}
//分页事件
@ -200,7 +198,7 @@ export class WaterCollectionComponent implements OnInit {
//点击水源列表
selectedLiIndex:any
clickWaterLi(item,index){
console.log(item)
// console.log(item)
if(this.selectedLiIndex != index){
this.selectedLiIndex = index
this.clearData()
@ -214,8 +212,6 @@ export class WaterCollectionComponent implements OnInit {
this.map.remove(this.newPositionMarker);
}
if(item.location.x){//如果已经标注单位坐标
console.log('开始标注')
this.map.setCenter([item.location.x,item.location.y]);
this.newPositionMarker = new AMap.Marker({
position: [item.location.x,item.location.y],
@ -473,21 +469,6 @@ export class WaterCollectionComponent implements OnInit {
});//注册监听,当选中某条记录时会触发
});
if(this.isMapLabel){//如果已经标注单位坐标
console.log('已标注单位位置')
// this.map.setCenter([this.unitinfo.location.x,this.unitinfo.location.y]);
// this.oldPositionMarker = new AMap.Marker({
// position: [this.unitinfo.location.x,this.unitinfo.location.y],
// content: this.newPositionMarkerContent,
// offset: new AMap.Pixel(-15, -18)
// })
// // 将 markers 添加到地图
// this.map.add(this.oldPositionMarker);
}else{
console.log('未标注单位位置')
// this.map.setCity('上海市');
}
}
//点击位置
isGisTopBox:boolean = false //
@ -501,13 +482,10 @@ export class WaterCollectionComponent implements OnInit {
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
let center
if(this.newPositionMarker && this.atLastPositionLngLat.x){//如果已经标注单位坐标
console.log(1)
center = [this.atLastPositionLngLat.x, this.atLastPositionLngLat.y]
}else if(this.newPositionMarker && !this.atLastPositionLngLat.x && this.waterData.location.x){
console.log(2)
center = [this.waterData.location.x, this.waterData.location.y]
}else{
console.log(3)
center = this.map.getCenter(); //获取当前地图中心位置
}
this.newPositionMarker = new AMap.Marker({
@ -579,12 +557,7 @@ export class AddWater {
selecteAddType(item,key){
this.selectedWaterTypeIndex = key
}
ngOnInit(): void {
}
confirm(){
console.log(this.selectedWaterTypeIndex)
this.dialogRef.close(this.selectedWaterTypeIndex)
}

31
src/app/gis-management/gis-labeling/gis-labeling.component.ts

@ -915,12 +915,19 @@ export class GisLabelingComponent implements OnInit {
var autoComplete = new AMap.Autocomplete(autoOptions);
autoComplete.search(keywords, function(status, result) {
if (result && result.tips && result.tips.length) { //搜索到数据时
that._ngZone.run(()=>{
if(e == 0){
if(e == 0){//起点
that.routeStartList = result.tips
that.startCoordinate = new AMap.LngLat(result.tips[0].location.lng, result.tips[0].location.lat)
}else{
if(result.tips.length != 0){
for (let index = 0; index < result.tips.length; index++) {
const element = result.tips[index];
if(element.location){
that.startCoordinate = new AMap.LngLat(element.location.lng, element.location.lat)
return
}
}
}
}else{//终点
that.routeEndList = result.tips
that.endCoordinate = new AMap.LngLat(result.tips[0].location.lng, result.tips[0].location.lat)
}
@ -986,6 +993,19 @@ export class GisLabelingComponent implements OnInit {
this.routeGIS = new AMap.Driving({
map: this.map,
});
if(!this.startCoordinate){
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('未查询到起点坐标信息,请输入有效地址','确定',config);
return
}else if(!this.startCoordinate){
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('未查询到终点坐标信息,请输入有效地址','确定',config);
return
}else{
this.routeGIS.search(this.startCoordinate,this.endCoordinate,
function(status, result) {
if (status === 'complete') {
@ -995,6 +1015,8 @@ export class GisLabelingComponent implements OnInit {
);
}
}
//切换 导航模式 推荐方案/躲避拥堵
toggleRoute (e) {
let that = this
@ -1006,6 +1028,7 @@ export class GisLabelingComponent implements OnInit {
policy: e==true? AMap.DrivingPolicy.LEAST_TIME : AMap.DrivingPolicy.REAL_TRAFFIC
});
// 根据起终点名称规划驾车导航路线
this.routeGIS.search(this.startCoordinate,this.endCoordinate,
function(status, result) {
if (status === 'complete') {

28
src/app/key-unit/function-division-look/function-division.component.ts

@ -129,21 +129,45 @@ export class FunctionDivisionLookComponent implements OnInit {
})
}
noDataList = [] //没有 创建功能分区 的建筑
//获得所有建筑的功能分区
getAllBuildingFunctionalZoning () {
this.selectBuildingFunctionalZoning = []
this.allBuildingFunctionalZoning = []
this.allBuilding.forEach(element => {
this.noDataList = []
this.allBuilding.forEach((element,index) => {
let data={buildingId: element.id}
this.http.get(`/api/BuildingFunctionalDivisions`,{params:data}).subscribe((data:any)=>{
if (data.length) {
element.functionalZoning = data
this.selectBuildingFunctionalZoning.push([]) //拥有建筑功能分区的提前push空数组
this.allBuildingFunctionalZoning.push(element) }
this.allBuildingFunctionalZoning.push(element)
this.noDataList.push(true)
} else {
this.noDataList.push(false)
}
if (this.noDataList.length === this.allBuilding.length) { this.addVoluntarilyPartition() }
})
});
}
// 没有 创建 建筑功能分区时 自动创建
addVoluntarilyPartition () {
let isFalse = []
this.noDataList.forEach(item=> { item===false? isFalse.push(1) : null })
if (isFalse.length === this.allBuilding.length) { //没有 建筑功能分区时
let data = {
buildingId: this.allBuilding[0].id,
region: "",
area: 0,
details: ""
}
this.http.post('/api/BuildingFunctionalDivisions',data,{params:{companyId : this.route.snapshot.queryParams.id}}).subscribe(data=>{
this.getAllBuilding()
})
} //if
}
//封装函数刷新当前建筑功能分区
updateCurrent (e,index) {
let data= {buildingId: e.id}

28
src/app/key-unit/function-division/function-division.component.ts

@ -131,21 +131,45 @@ export class FunctionDivisionComponent implements OnInit {
})
}
noDataList = [] //没有 创建功能分区 的建筑
//获得所有建筑的功能分区
getAllBuildingFunctionalZoning () {
this.selectBuildingFunctionalZoning = []
this.allBuildingFunctionalZoning = []
this.allBuilding.forEach(element => {
this.noDataList = []
this.allBuilding.forEach((element,index) => {
let data={buildingId: element.id}
this.http.get(`/api/BuildingFunctionalDivisions`,{params:data}).subscribe((data:any)=>{
if (data.length) {
element.functionalZoning = data
this.selectBuildingFunctionalZoning.push([]) //拥有建筑功能分区的提前push空数组
this.allBuildingFunctionalZoning.push(element) }
this.allBuildingFunctionalZoning.push(element)
this.noDataList.push(true)
} else {
this.noDataList.push(false)
}
if (this.noDataList.length === this.allBuilding.length) { this.addVoluntarilyPartition() }
})
});
}
// 没有 创建 建筑功能分区时 自动创建
addVoluntarilyPartition () {
let isFalse = []
this.noDataList.forEach(item=> { item===false? isFalse.push(1) : null })
if (isFalse.length === this.allBuilding.length) { //没有 建筑功能分区时
let data = {
buildingId: this.allBuilding[0].id,
region: "",
area: 0,
details: ""
}
this.http.post('/api/BuildingFunctionalDivisions',data,{params:{companyId : this.route.snapshot.queryParams.id}}).subscribe(data=>{
this.getAllBuilding()
})
} //if
}
//封装函数刷新当前建筑功能分区
updateCurrent (e,index) {
let data= {buildingId: e.id}

2
src/app/key-unit/router-gis/router-gis.component.html

@ -60,4 +60,6 @@
</div>
<!-- 导航路线 -->
<button class="submitRouter" mat-raised-button color='primary' (click)='submitRouter()'>保存路线</button>
</div>

7
src/app/key-unit/router-gis/router-gis.component.scss

@ -110,3 +110,10 @@
//选择路线 方案 button
.routeType { margin: 0 10px; outline: none; border: none; background-color: transparent; font-size: 14px; font-weight: 550; color: rgb(122, 116, 116); }
.selectRouteType { color: #0080FF; }
//保存
.submitRouter {
position: absolute;
top: 15px;
right: 30px;
}

100
src/app/key-unit/router-gis/router-gis.component.ts

@ -1,5 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Component, EventEmitter, NgZone, OnInit, Output } from '@angular/core';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { ActivatedRoute } from '@angular/router';
declare var AMap: any;
@Component({
@ -9,14 +11,75 @@ declare var AMap: any;
})
export class RouterGISComponent implements OnInit {
@Output() onCustomEvent: EventEmitter<any> = new EventEmitter();//创建实力
constructor(public _ngZone:NgZone,public snackBar: MatSnackBar,) { }
constructor(public _ngZone:NgZone,public snackBar: MatSnackBar,private http:HttpClient,private route:ActivatedRoute,) { }
ngOnInit(): void {
this.getCompanyData()
}
ngAfterViewInit(): void {
window.setTimeout(()=>{
this.mapInit()
},0)
}
//获取单位 信息
getCompanyData () {
this.http.get(`/api/Companies/${this.route.snapshot.queryParams.id}`).subscribe((data:any)=>{
if (data.driveRouteStartPoint && data.driveRouteStartPoint.x && data.driveRouteStartPoint.y && data.driveRouteStartName) { //开始坐标 名称
this.routeStart = data.driveRouteStartName
this.startCoordinate = [data.driveRouteStartPoint.x,data.driveRouteStartPoint.y]
}
if (data.driveRouteEndPoint && data.driveRouteEndPoint.x && data.driveRouteEndPoint.y && data.driveRouteEndName) { //结束坐标 名称
this.routeEnd = data.driveRouteEndName
this.endCoordinate = [data.driveRouteEndPoint.x,data.driveRouteEndPoint.y]
} else if (data.location && data.location.x && data.location.y) {
this.routeEnd = data.name
this.endCoordinate = [data.location.x,data.location.y]
}
})
}
//保存 路线
submitRouter () {
if (this.startCoordinate && this.endCoordinate && this.routeStart && this.routeEnd) {
let start = {x:null, y:null}
let end = {x:null, y:null}
if (this.startCoordinate instanceof Array) {
start.x = this.startCoordinate[0]
start.y = this.startCoordinate[1]
} else {
start.x = this.startCoordinate.lng
start.y = this.startCoordinate.lat
}
if (this.endCoordinate instanceof Array) {
end.x = this.endCoordinate[0]
end.y = this.endCoordinate[1]
} else {
end.x = this.endCoordinate.lng
end.y = this.endCoordinate.lat
}
let params = {
id: this.route.snapshot.queryParams.id,
driveRouteStartPoint: start,
driveRouteStartName: this.routeStart,
driveRouteEndPoint: end,
driveRouteEndName: this.routeEnd,
}
this.http.put(`/api/Companies/${this.route.snapshot.queryParams.id}`,params).subscribe(data=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
})
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请先规划路线','确定',config);
}
}
//地图初始化
mapInit () {
let that = this
@ -31,6 +94,9 @@ export class RouterGISComponent implements OnInit {
layers:[layer], //当只想显示标准图层时layers属性可缺省,
});
that.map.setCity('上海市');
AMap.plugin('AMap.Driving', function() {
that.startCoordinate && that.endCoordinate? that.queryGISRoute() : null
})
}
map:any; //地图实例
@ -41,6 +107,9 @@ export class RouterGISComponent implements OnInit {
timeout:any; //延时器
routeGIS:any; //查询结果 规划路线
selectType:boolean = true; //路线选择 推荐方案/躲避用拥堵
routes:any = { distance: 0, time: 0, steps: [], };//导航查询结果 路线规划
startCoordinate:any//开始坐标
endCoordinate:any//结束坐标
//输入框 输入事件
routeChange (e) {
@ -56,11 +125,18 @@ export class RouterGISComponent implements OnInit {
var autoComplete = new AMap.Autocomplete(autoOptions);
autoComplete.search(keywords, function(status, result) {
if (result && result.tips && result.tips.length) { //搜索到数据时
that._ngZone.run(()=>{
if(e == 0){
that.routeStartList = result.tips
that.startCoordinate = new AMap.LngLat(result.tips[0].location.lng, result.tips[0].location.lat)
if(result.tips.length != 0){
for (let index = 0; index < result.tips.length; index++) {
const element = result.tips[index];
if(element.location){
that.startCoordinate = new AMap.LngLat(element.location.lng, element.location.lat)
return
}
}
}
}else{
that.routeEndList = result.tips
that.endCoordinate = new AMap.LngLat(result.tips[0].location.lng, result.tips[0].location.lat)
@ -113,10 +189,6 @@ export class RouterGISComponent implements OnInit {
this.endCoordinate = data2
}
routes:any = { distance: 0, time: 0, steps: [], };//导航查询结果 路线规划
startCoordinate:any//开始坐标
endCoordinate:any//结束坐标
//导航查询
queryGISRoute () {
if (this.startCoordinate && this.endCoordinate) {
@ -127,6 +199,19 @@ export class RouterGISComponent implements OnInit {
this.routeGIS = new AMap.Driving({
map: this.map,
});
if(!this.startCoordinate){
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('未查询到起点坐标信息,请输入有效地址','确定',config);
return
}else if(!this.startCoordinate){
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('未查询到终点坐标信息,请输入有效地址','确定',config);
return
}else{
this.routeGIS.search(this.startCoordinate,this.endCoordinate,
function(status, result) {
if (status === 'complete') {
@ -134,6 +219,7 @@ export class RouterGISComponent implements OnInit {
} else { alert('获取驾驶规划路线失败') }
}
);
}
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';

1
src/app/navigation/navigation.component.html

@ -66,4 +66,3 @@
</div>
</mat-sidenav-container>
<!-- <app-footer [class.myapp-dark-theme]="darktheme"></app-footer> -->

63
src/app/pages/home2/home2.component.html

@ -1,63 +0,0 @@
<div class="contentBox">
<header>
<h1>数字化预案编制和管理平台</h1>
<div class="showTime">{{time}}</div>
</header>
<section class="mainbox">
<div class="column">
<div class="panel bar">
<h2>单位类型</h2>
<div class="chart" id="unitType"></div>
<div class="panel-footer"></div>
</div>
<div class="panel line">
<h2>预案状态</h2>
<div class="chart" id="planStates"></div>
<div class="panel-footer"></div>
</div>
<div class="panel pie">
<h2>预案类型</h2>
<div class="chart" id="planType"></div>
<div class="panel-footer"></div>
</div>
</div>
<div class="column">
<div class="no">
<div class="no-hd">
<ul>
<li>123</li>
<li>456</li>
</ul>
</div>
<div class="no-bd">
<ul>
<li>预案数量</li>
<li>单位数量</li>
</ul>
</div>
</div>
<div class="map">
<div class="map1"></div>
<div class="map2"></div>
<div class="map3" id='map' style='width:98%; height:98%;'></div>
</div>
</div>
<div class="column">
<div class="panel bar">
<h2>趋势图</h2>
<div class="chart" id="trend"></div>
<div class="panel-footer"></div>
</div>
<div class="panel line">
<h2>玫瑰图</h2>
<div class="chart" id="xxx"></div>
<div class="panel-footer"></div>
</div>
<div class="panel pie">
<h2>柱状图</h2>
<div class="chart" id="yyy"></div>
<div class="panel-footer"></div>
</div>
</div>
</section>
</div>

247
src/app/pages/home2/home2.component.scss

@ -1,247 +0,0 @@
@font-face {
font-family: electronicFont;
src: url(../../../assets/font/DS-DIGIT.TTF);
}
.contentBox{
width: 100%;
height: 100%;
background: url(../../../assets/images/bg.jpg) no-repeat top center;
line-height: 1.15;
header{
position: relative;
height:8%;
min-height: 64px;
background: url(../../../assets/images/head_bg.png) no-repeat;
background-size: 100% 100%;
h1{
font-size: 28px;
color: #fff;
text-align: center;
line-height: 64px;
}
.showTime{
position: absolute;
right: 20px;
line-height: 60px;
color: rgba(255,255,255, $alpha: 0.7);
font-size: 16px;
top: 0;
}
}
.mainbox{
width: 100%;
height: 92%;
// background-color: pink;
padding: 2px 0 2px 0;
display: flex;
.column{
flex: 3;
}
.column:nth-child(2){
flex: 6;
margin: 0 8px 8px 8px;
}
.panel{
height: 29.8%;
position: relative;
// background-color: red;
border: 1px solid rgba(25,186,139,0.17);
background: url(../../../assets/images/line.png) rgba(255,255,255, $alpha: 0.03);
margin-bottom: 8px;
&::before{
position: absolute;
top: 0;
left: 0;
content: "";
width:14px;
height:14px;
border-left: 2px solid #02a6b5;
border-top: 2px solid #02a6b5;
}
&::after{
position: absolute;
top: 0;
right: 0;
content: "";
width:14px;
height:14px;
border-right: 2px solid #02a6b5;
border-top: 2px solid #02a6b5;
}
.panel-footer{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 14px;
&::before{
position: absolute;
top: 0;
left: 0;
content: "";
width:14px;
height:14px;
border-left: 2px solid #02a6b5;
border-bottom: 2px solid #02a6b5;
}
&::after{
position: absolute;
top: 0;
right: 0;
content: "";
width:14px;
height:14px;
border-right: 2px solid #02a6b5;
border-bottom: 2px solid #02a6b5;
}
}
h2{
height: 18px;
color: #fff;
line-height: 18px;
text-align: center;
font-size: 14px;
font-weight: 400;
}
.chart{
height: 91%;
// background-color: pink;
}
}
.no{
background: rgba(101,132,226,0.1);
padding: 4px 16px;
height: 10%;
min-height: 100px;
.no-hd{
position: relative;
border: 1px solid rgba(25,186,139,0.17);
&::before{
position: absolute;
top: 0;
left: 0;
content: "";
width:30px;
height:14px;
border-left: 2px solid #02a6b5;
border-top: 2px solid #02a6b5;
}
&::after{
position: absolute;
bottom: 0;
right: 0;
content: "";
width:30px;
height:14px;
border-right: 2px solid #02a6b5;
border-bottom: 2px solid #02a6b5;
}
ul{
display: flex;
li{
flex: 1;
line-height: 55px;
font-size: 48px;
color: #ffeb7b;
text-align: center;
font-family: 'electronicFont';
}
li:nth-child(1){
position: relative;
&::after{
position: absolute;
top: 25%;
height: 50%;
right: 0;
content: "";
width:1px;
background: rgba(255,255,255, $alpha: 0.2);
}
}
}
}
.no-bd{
ul{
display: flex;
padding: 4px 0;
li{
flex: 1;
text-align: center;
color: rgba(255,255,255, $alpha: 0.7);
font-size: 14px;
line-height: 30px;
}
}
}
}
.map {
position: relative;
margin-top: 12px;
height: 78%;
.map1 {
width: 480px;
height: 480px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: url(../../../assets/images/map.png);
background-size: 100% 100%;
opacity: 0.3;
}
.map2 {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 600px;
height: 600px;
background: url(../../../assets/images/lbx.png);
animation: rotate1 15s linear infinite;
opacity: 0.6;
background-size: 100% 100%;
}
.map3 {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// width: 7.075rem;
// height: 7.075rem;
// background: url(../images/jt.png);
// animation: rotate2 10s linear infinite;
// opacity: 0.6;
background-size: 100% 100%;
}
// .chart {
// position: absolute;
// top: 0;
// left: 0;
// // background-color: pink;
// width: 100%;
// height: 10.125rem;
// }
@keyframes rotate1 {
0% {
transform: translate(-50%, -50%) rotate(0deg);
};
100% {
transform: translate(-50%, -50%) rotate(360deg);
}
}
// @keyframes rotate2 {
// form {
// transform: translate(-50%, -50%) rotate(0deg);
// }
// to {
// transform: translate(-50%, -50%) rotate(-360deg);
// }
// }
}
}
}

25
src/app/pages/home2/home2.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Home2Component } from './home2.component';
describe('Home2Component', () => {
let component: Home2Component;
let fixture: ComponentFixture<Home2Component>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ Home2Component ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(Home2Component);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

348
src/app/pages/home2/home2.component.ts

@ -1,348 +0,0 @@
import { Component, OnInit ,ElementRef} from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { HighlightSpanKind } from 'typescript';
declare var echarts: any;
declare var westeros: any;
declare var AMap: any;
declare var Loca: any;
@Component({
selector: 'app-home2',
templateUrl: './home2.component.html',
styleUrls: ['./home2.component.scss']
})
export class Home2Component implements OnInit {
constructor(private http:HttpClient,public element: ElementRef) { }
unitTypeStatistics:any //单位类型统计
myUnitTypeChart:any //单位类型统计图表
unitTypeOption:any = {
title: {
// text: '单位类型统计',
// left: 'center'
},
tooltip: {
trigger: 'item',
formatter: '占比: <br/>{b} : {c} ({d}%)'
},
legend: {
// orient: 'vertical',
// top: 'middle',
bottom: 0,
left: 'center',
data: []
},
series: [
{
type: 'pie',
radius: '65%',
center: ['50%', '50%'],
selectedMode: 'single',
data: [
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}; //单位类型数据
planStateStatistics //预案状态统计
myPlanStateChart:any //预案状态统计图表
planStateOption:any = {
title: {
// text: '预案编制情况统计',
// left: 'center'
},
tooltip: {
trigger: 'item',
formatter: '占比: <br/>{b} : {c} ({d}%)'
},
legend: {
// orient: 'vertical',
// top: 'middle',
bottom: 0,
left: 'center',
data: ['审核通过','已提交','已公开']
},
series: [
{
type: 'pie',//类型为饼图
radius: '65%',
center: ['50%', '50%'],
selectedMode: 'single',
data: [
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}; //预案状态数据
planTypeStatistics //各类型预案统计
myPlanTypeChart:any //各类型预案图表
planTypeOption:any = {
title: {
// text: '各类型预案情况统计',
// left: 'center'
},
tooltip: {
trigger: 'item',
formatter: '占比: <br/>{b} : {c} ({d}%)'
},
legend: {
// orient: 'vertical',
// top: 'middle',
bottom: 0,
left: 'center',
data: ['卡片预案','二维预案','三维预案','其他预案']
},
series: [
{
type: 'pie',
radius: '65%',
center: ['50%', '50%'],
selectedMode: 'single',
data: [
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}; //预案状态数据
trendStatistics //趋势统计
trendChart:any //趋势图表
trendOption:any = {
title: {
// text: '预案趋势统计'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['新增预案', '修改预案']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月','十二月']
},
yAxis: {
type: 'value'
},
series: [
{
name: '新增预案',
type: 'line',
stack: '总量',
data: []
},
{
name: '修改预案',
type: 'line',
stack: '总量',
data: []
}
]
}; //预案状态数据
xxxChart:any
xxxOption:any = {
title: {
// text: '南丁格尔玫瑰图',
// subtext: '纯属虚构',
// left: 'center'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
left: 'center',
top: 'bottom',
data: ['1', '2', '3', '4']
},
toolbox: {
show: true,
feature: {
mark: {show: true},
dataView: {show: true, readOnly: false},
magicType: {
show: true,
type: ['pie', 'funnel']
},
restore: {show: true},
saveAsImage: {show: true}
}
},
series: [
{
name: '面积模式',
type: 'pie',
radius: [30, 110],
// center: ['75%', '50%'],
roseType: 'area',
data: [
{value: 10, name: '1'},
{value: 5, name: '2'},
{value: 15, name: '3'},
{value: 25, name: '4'}
]
}
]
}
yyyChart:any
yyyOption:any = {
color: ['#3398DB'],
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
axisTick: {
alignWithLabel: true
}
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: '直接访问',
type: 'bar',
barWidth: '60%',
data: [10, 52, 200, 334, 390, 330, 220]
}
]
};
t:any
time:any
theme:any //主题风格
ngOnInit(): void {
// const map = new AMap.Map(this.element.nativeElement.querySelector('#map'), {
// mapStyle: 'amap://styles/1de318cbb8d12c02303a22c550b9ccc9',
// // pitch: 0,
// features: ['bg', 'road'],//地图显示要素
// zoom: 6,
// center: [116.408075, 39.950187],
// // viewMode: '3D'
// });
// const layer = new Loca.DistrictLayer({
// map: map
// });
// layer.setMap(map);
this.getTime()
setTimeout(() => {
this.myUnitTypeChart = echarts.init(this.element.nativeElement.querySelector('#unitType'),'westeros');
this.myPlanStateChart = echarts.init(this.element.nativeElement.querySelector('#planStates') ,'westeros');
this.myPlanTypeChart = echarts.init(this.element.nativeElement.querySelector('#planType'),'westeros');
this.trendChart = echarts.init(this.element.nativeElement.querySelector('#trend'),'westeros');
this.xxxChart = echarts.init(this.element.nativeElement.querySelector('#xxx'),'westeros');
this.xxxChart.setOption(this.xxxOption);
this.yyyChart = echarts.init(this.element.nativeElement.querySelector('#yyy'),'westeros');
this.yyyChart.setOption(this.yyyOption);
}, 0);
this.chartsSetOption();
}
getTime():any{
this.t = setInterval(()=>{
var dt = new Date();
var y = dt.getFullYear();
var mt = dt.getMonth() + 1;
var day = dt.getDate();
var h = dt.getHours(); //获取时
var m = dt.getMinutes(); //获取分
var s = dt.getSeconds(); //获取秒
this.time = "当前时间:" + y + "年" + mt + "月" + day + "-" + h + "时" + m + "分" + s + "秒";
}, 1000); //開始运行
}
chartsSetOption(){
this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{
//单位类型统计
this.unitTypeStatistics = data.companyStatistics.buildingTypeStatistics.buildingTypes
this.unitTypeStatistics.forEach(item => {
item.name = item.buildingTypeName
item.value = item.count
// this.unitTypeOption.legend.data.push(item.buildingTypeName)
});
this.unitTypeOption.series[0].data = this.unitTypeStatistics
this.myUnitTypeChart.setOption(this.unitTypeOption,true);
//预案状态统计
this.planStateStatistics = data.planStatistics.planningStatistics
this.planStateOption.series[0].data.push({name:'审核通过',value:data.planStatistics.planningStatistics.approvedCount})
this.planStateOption.series[0].data.push({name:'已提交',value:data.planStatistics.planningStatistics.committedCount})
this.planStateOption.series[0].data.push({name:'已公开',value:data.planStatistics.planningStatistics.publicCount})
this.myPlanStateChart.setOption(this.planStateOption,true);
//各类型预案统计
this.planTypeStatistics = data.planStatistics.planTypeStatistics
this.planTypeOption.series[0].data.push({name:'卡片预案',value:data.planStatistics.planTypeStatistics.planCardCount})
this.planTypeOption.series[0].data.push({name:'二维预案',value:data.planStatistics.planTypeStatistics.plan2DCount})
this.planTypeOption.series[0].data.push({name:'三维预案',value:data.planStatistics.planTypeStatistics.plan3DCount})
this.planTypeOption.series[0].data.push({name:'其他预案',value:data.planStatistics.planTypeStatistics.planOtherCount})
this.myPlanTypeChart.setOption(this.planTypeOption,true);
//预案趋势图统计
this.trendStatistics = data.planStatistics.trendStatistics
// this.trendOption.series = []
this.trendStatistics.added.forEach(item=>{
this.trendOption.series[0].data.push(item.count)
})
this.trendStatistics.modified.forEach(item=>{
this.trendOption.series[1].data.push(item.count)
})
this.trendChart.setOption(this.trendOption,true);
})
}
ngOnDestroy(){
window.clearInterval(this.t) //清一遍定时器
}
}

7
src/app/pages/pages-routing.module.ts

@ -1,17 +1,10 @@
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { PagesComponent } from './pages.component';
import { PersonaldataComponent } from './personaldata/personaldata.component';
import { HomeComponent } from './home/home.component';
import { Home2Component } from './home2/home2.component';
import { HomedetailComponent } from './homedetail/homedetail.component';
const routes: Routes = [
{ path: '', component: HomeComponent},
{ path: '2', component: Home2Component},
{ path: 'detail', component: HomedetailComponent},
];
@NgModule({

7
src/app/pages/pages.module.ts

@ -48,17 +48,12 @@ import {MatToolbarModule} from '@angular/material/toolbar';
import {MatTooltipModule} from '@angular/material/tooltip';
import {MatTreeModule} from '@angular/material/tree';
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PersonaldataComponent } from './personaldata/personaldata.component';
import { RouterModule } from '@angular/router';
import { LockscreenComponent } from './lockscreen/lockscreen.component';
import { HomeComponent } from './home/home.component';
import { Home2Component } from './home2/home2.component';
import { HomedetailComponent } from './homedetail/homedetail.component';
// import { PagesRoutingModule } from './pages-routing.module';
@NgModule({
declarations: [PagesComponent, LoginComponent, RegisterComponent, LockscreenComponent, HomeComponent, Home2Component, HomedetailComponent],
declarations: [PagesComponent, LoginComponent, RegisterComponent, LockscreenComponent, HomeComponent, HomedetailComponent],
imports: [
PagesRoutingModule,

280
src/app/pages/personaldata/personaldata.component.html

@ -1,280 +0,0 @@
<div class="pages-profile">
<div fxLayout.gt-sm="row nowrap" fxLayout.lt-md="column nowrap" fxLayoutAlign.gt-sm="space-between start"
fxLayoutGap="30px" id="xxx">
<mat-card fxFlex="30" class="profile-card">
<mat-card-content>
<img mat-card-avatar src="">
<mat-card-title class="profile-user">安信科创</mat-card-title>
<mat-card-subtitle class="profile-job">嘻嘻嘻嘻</mat-card-subtitle>
<p class="profile-introduction">
不要做程序员,要做问题解决者
</p>
<div class="profile-social">
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
</div>
<button mat-flat-button color="accent">关注</button>
</mat-card-content>
<mat-card-actions class="profile-card-footer" fxLayout="row nowrap">
<div fxFlex="32">
<strong class="profile-stat-count">260</strong>
<span>粉丝</span>
</div>
<div fxFlex="32">
<strong class="profile-stat-count">180</strong>
<span>关注</span>
</div>
<div fxFlex="32">
<strong class="profile-stat-count">2000</strong>
<span>博客</span>
</div>
</mat-card-actions>
</mat-card>
<mat-card fxFlex="70" class="profile-board">
<mat-tab-group>
<mat-tab label="活动">
<mat-list>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
</mat-list>
<div class="pt-40 pb-40">
<button mat-flat-button class="show-more-btn">更多</button>
</div>
</mat-tab>
<mat-tab label="评论">
<mat-list>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
</div>
</mat-list-item>
</mat-list>
</mat-tab>
<mat-tab label="消息">
<mat-list>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
</mat-list>
</mat-tab>
</mat-tab-group>
</mat-card>
</div>
</div>

110
src/app/pages/personaldata/personaldata.component.scss

@ -1,110 +0,0 @@
#xxx{
display: flex;
justify-content: space-around;
}
.pages-profile {
padding: 30px;
.profile-card {
padding: 9px;
text-align: center;
font-family: Roboto, sans-serif;
width: 500px;
height: 600px;
mat-card-content {
padding: 40px 15px;
margin: 0;
}
.mat-card-avatar {
width: 130px;
height: 130px;
margin-bottom: 10px;
}
.profile-user {
margin: 10px 0;
font-weight: normal;
}
.profile-job {
margin-bottom: 20px;
color: #9e9e9e;
font-weight: 500;
}
.profile-introduction {
margin: 0 0 1rem;
color: #757575;
}
.profile-social {
margin: 25px 0;
mat-icon {
margin: 0 10px;
color: rgba(66, 66, 66, .4);
}
}
mat-card-actions {
padding: 10px;
background: #f6f9fd;
}
.profile-card-footer {
display: flex;
justify-content: space-around;
.profile-stat-count {
display: block;
margin-bottom: 3px;
font-size: 20px;
font-weight: bold;
color: #616161;
+span {
color: #9e9e9e;
}
}
}
}
.profile-board {
padding: 30px;
width: 500px;
mat-list {
padding-bottom: 20px;
}
mat-list-item {
height: auto;
padding: 25px 0;
margin-left: -16px;
border-bottom: 1px solid #dfe0df;
.profile-item-content {
padding: 20px 0 0 56px;
line-height: 1.571429;
color: #757575;
white-space: normal;
display: flex;
flex-wrap: wrap;
img {
width: 100%;
max-width: 220px;
max-height: 150px;
padding: 0 20px 20px 0;
}
}
}
}
.show-more-btn {
width: 100%;
background-color: #eee;
color: #3949ab;
}
}

25
src/app/pages/personaldata/personaldata.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PersonaldataComponent } from './personaldata.component';
describe('PersonaldataComponent', () => {
let component: PersonaldataComponent;
let fixture: ComponentFixture<PersonaldataComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PersonaldataComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PersonaldataComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
src/app/pages/personaldata/personaldata.component.ts

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-personaldata',
templateUrl: './personaldata.component.html',
styleUrls: ['./personaldata.component.scss']
})
export class PersonaldataComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

2
src/app/plan-audit/plan-record/plan-record.component.ts

@ -11,7 +11,7 @@ import { FormControl } from '@angular/forms';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { HttpClient } from '@angular/common/http'
import { DomSanitizer } from '@angular/platform-browser';
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
@Component({
selector: 'app-plan-record',

2
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -10,7 +10,7 @@ import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { HttpClient } from '@angular/common/http'
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
import { DomSanitizer } from '@angular/platform-browser';
import { Viewer } from 'photo-sphere-viewer';
declare var echarts: any;

2
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -13,7 +13,7 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import { async } from '@angular/core/testing';
import { Viewer } from 'photo-sphere-viewer';
import {STEPPER_GLOBAL_OPTIONS} from '@angular/cdk/stepper';
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
@Component({
selector: 'app-entry-plan-look',
templateUrl: './entry-plan-look.component.html',

6
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -9,11 +9,7 @@ import { PageEvent } from '@angular/material/paginator';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import CryptoJS from 'crypto-js/crypto-js'
//import Base64 from 'crypto-js/enc-base64';
declare var CryptoJS
@Component({
selector: 'app-meet-plan',
templateUrl: './meet-plan.component.html',

2
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

@ -20,7 +20,7 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import { ConstantPool } from '@angular/compiler';
import { MatTableDataSource } from '@angular/material/table';
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
@Component({

2
src/app/plan-management/pass-plan/pass-plan.component.ts

@ -9,7 +9,7 @@ import { PageEvent } from '@angular/material/paginator';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
@Component({
selector: 'app-pass-plan',
templateUrl: './pass-plan.component.html',

2
src/app/plan-management/type-plan/type-plan.component.ts

@ -17,7 +17,7 @@ import { PageEvent } from '@angular/material/paginator';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import CryptoJS from 'crypto-js/crypto-js'
declare var CryptoJS
@Component({
selector: 'app-type-plan',

16
src/app/tabbar/tabbar.component.html

@ -112,7 +112,7 @@
</div>
</div>
<p style="font-size: 16px;position: absolute; right: 170px;">欢迎您, {{realName}}</p>
<p style="font-size: 16px;position: absolute; right: 233px;">欢迎您, {{realName}}</p>
<div class="scoringRule" *ngIf="companyIntegrityScore">
@ -187,6 +187,20 @@
</div>
</div>
<div class="spinner" *ngIf="isSpinner">
<mat-spinner [diameter]='26' color="warn"></mat-spinner>
<span style="font-size: 13px;margin-left: 6px;">帮助文档下载中,请等待...</span>
</div>
<!-- 帮助文档按钮 -->
<button mat-icon-button [matMenuTriggerFor]="appSetHelp" class="help" title="帮助">
<mat-icon>help</mat-icon>
</button>
<mat-menu #appSetHelp="matMenu" yPosition="below" xPosition="after">
<button mat-menu-item (click)='downloadHelpFile()'>
<mat-icon>save_alt</mat-icon>
<span>下载帮助文档</span>
</button>
</mat-menu>
<!-- 全屏 -->
<button mat-button (click)="!isfullscreen?fullscreenToggle():closefullscreen()" class="fullscreen">
<ng-container *ngIf="!isfullscreen; else elseTemplate">

10
src/app/tabbar/tabbar.component.scss

@ -61,6 +61,16 @@ mat-icon{
position: absolute;
right:60px;
}
.spinner{
position: absolute;
right:400px;
display: flex;
align-items: center;
}
.help{
position: absolute;
right:170px;
}
.setting{
position: absolute;
right:120px;

86
src/app/tabbar/tabbar.component.ts

@ -8,7 +8,6 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { filter } from 'rxjs/operators';
import { TabbarAndScoreService } from '../http-interceptors/tabbar-and-score.service';
@Component({
selector: 'app-tabbar',
templateUrl: './tabbar.component.html',
@ -29,8 +28,7 @@ export class TabbarComponent implements OnInit {
this.toggleDarkTheme.emit(eventValue);
}
constructor(private tabbarService: TabbarAndScoreService,private http:HttpClient,private router:Router,private route:ActivatedRoute,public token:CacheTokenService,public dialog: MatDialog,
public snackBar: MatSnackBar) { }
constructor(private tabbarService: TabbarAndScoreService,private http:HttpClient,private router:Router,private route:ActivatedRoute,public token:CacheTokenService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
grade = null //单位完整度得分
title:any = "数字化预案编制管理平台"
@ -71,6 +69,88 @@ export class TabbarComponent implements OnInit {
}
isSpinner:boolean = false//下载帮助文档进度
//下载帮助文档
downloadHelpFile () {
this.getFileMSG()
}
helpFile:any = 'api/ObjectMetadata/help/数字化预案编制管理平台手册.pdf'; //下载文件的url地址
download:any; //下载的文件
//获取下载文件信息
getFileMSG () {
this.isSpinner = true
this.http.get(`${this.helpFile}`).subscribe(data=>{
this.download = data
this.downloadFile()
},err=>{
let config = new MatSnackBarConfig();
config.verticalPosition = 'bottom';
config.duration = 3000
this.snackBar.open('下载失败','确定',config);
})
}
//初始化下载
downloadFile () {
let file = this.download
let fileSize = file.fileLength//下载文件的总大小
let shardSize = 10 * 1024 * 1024 //文件大小是否大于10MB
if (file && fileSize<=shardSize) { //<=10MB时直接下载
this.http.get(`/api/Objects/help/${file.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;
link.setAttribute("download", '数字化预案编制管理平台手册.pdf');
document.body.appendChild(link);
link.click();
this.isSpinner = false
},err=>{
let config = new MatSnackBarConfig();
config.verticalPosition = 'bottom';
config.duration = 3000
this.snackBar.open('下载失败','确定',config);
})
} else if (file && fileSize>shardSize) { //>10MB时分块下载
this.blockingDownload() //分段下载
}
}
//分段下载并合并
async blockingDownload () {
let file = this.download
let fileSize = file.fileLength //下载文件的总大小
let shardSize = 3 * 1024 * 1024 //3MB一个分片
let allSlice = Math.ceil(fileSize / shardSize) //总文件/3MB===共分多少段
let allFile:any = [] //所有的file分段
for (let i=0;i<allSlice;i++) {
let start = i * shardSize //每次下载文件开始位置
let end = Math.min(fileSize, start + shardSize-1); //每次下载文件结束为止
let result = await new Promise ((result,reject)=>{
this.http.get(`/api/Objects/help/${file.objectName}`,{headers:{'range':`bytes= ${start}-${end}`},responseType:'blob'}).subscribe(data=>{
result(data) })
})
allFile.push(result)
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;
link.setAttribute("download", '数字化预案编制管理平台手册.pdf');
document.body.appendChild(link);
link.click();
this.isSpinner = false
}
} //for循环
}
//根据usci获取当前单位的分数信息
getIntegrityScore(){
let params:any = {

18
src/app/ui/badge/badge.component.html

@ -1,18 +0,0 @@
<p>
<span matBadge="4" matBadgeOverlap="false">未读信息</span>
</p>
<p>
<button
mat-raised-button color="primary"
matBadge="8"
matBadgePosition="after"
matBadgeColor="accent">
按钮徽章
</button>
</p>
<p>
<mat-icon matBadge="15" matBadgeColor="warn">home</mat-icon>
</p>

3
src/app/ui/badge/badge.component.scss

@ -1,3 +0,0 @@
p{
margin: 30px;
}

25
src/app/ui/badge/badge.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BadgeComponent } from './badge.component';
describe('BadgeComponent', () => {
let component: BadgeComponent;
let fixture: ComponentFixture<BadgeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BadgeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BadgeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

14
src/app/ui/badge/badge.component.ts

@ -1,14 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-badge',
templateUrl: './badge.component.html',
styleUrls: ['./badge.component.scss']
})
export class BadgeComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

6
src/app/ui/button/button.component.html

@ -1,6 +0,0 @@
<ul cdkDropList (cdkDropListDropped)="drop($event)">
<li *ngFor="let item of data" cdkDrag>{{item.name}}</li>
</ul>
<mat-checkbox checked="checked" ></mat-checkbox>

0
src/app/ui/button/button.component.scss

25
src/app/ui/button/button.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ButtonComponent } from './button.component';
describe('ButtonComponent', () => {
let component: ButtonComponent;
let fixture: ComponentFixture<ButtonComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ButtonComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ButtonComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

89
src/app/ui/button/button.component.ts

@ -1,89 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
@Component({
selector: 'app-button',
templateUrl: './button.component.html',
styleUrls: ['./button.component.scss']
})
export class ButtonComponent implements OnInit {
constructor(public http: HttpClient) { }
data =[
{
id:"1",
name:"广西总队",
order:0,
parentId:null,
children:[
{
id:"2",
name:"南宁支队",
order:2,
parentId:1,
children:[
{
id:"6",
name:"南宁特勤大队",
order:0,
parentId:2,
children:[
{
id:"6",
name:"南宁特勤3中队",
order:3,
parentId:6,
},
{
id:"6",
name:"南宁特勤2中队",
order:2,
parentId:6,
},
{
id:"6",
name:"南宁特勤1中队",
order:1,
parentId:6,
}
]
}
]
},
{
id:"3",
name:"北海支队",
order:1,
parentId:1
},
{
id:"4",
name:"梧州支队",
order:0,
parentId:1
},
{
id:"5",
name:"桂林支队",
order:3,
parentId:1
},
]
}
]
ngOnInit() {
var str = "xxxx.jjjj"
// console.log(2222,str.split('.')[1])
}
drop(event: CdkDragDrop<string[]>) {
moveItemInArray(this.data, event.previousIndex, event.currentIndex);
}
}

12
src/app/ui/card/card.component.html

@ -1,12 +0,0 @@
<mat-card>
<mat-card-title>简单的卡片</mat-card-title>
<mat-card-subtitle>卡片的字幕</mat-card-subtitle>
<mat-card-content>原来爱情的世界很大,大得可以装下一百种委屈;原来爱情的世界很小,小得三个人就会窒息。</mat-card-content>
<img mat-card-image src="https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1579480490&di=f80c114e78ea7a439c19cc7f1622227f&src=http://pic1.win4000.com/wallpaper/2017-11-17/5a0e94afc140c.jpg">
<mat-card-actions>
<button mat-raised-button color="primary">我是按钮</button>
</mat-card-actions>
<mat-card-footer>
我要被固定在卡片底部
</mat-card-footer>
</mat-card>

10
src/app/ui/card/card.component.scss

@ -1,10 +0,0 @@
mat-card{
width: 300px;
height: 600px;
img{
width: 300px;
height: 300px;
padding: 16px;
}
}

25
src/app/ui/card/card.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CardComponent } from './card.component';
describe('CardComponent', () => {
let component: CardComponent;
let fixture: ComponentFixture<CardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CardComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
src/app/ui/card/card.component.ts

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-card',
templateUrl: './card.component.html',
styleUrls: ['./card.component.scss']
})
export class CardComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

25
src/app/ui/collection-tools-building/collection-tools.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CollectionToolsComponent } from './collection-tools.component';
describe('CollectionToolsComponent', () => {
let component: CollectionToolsComponent;
let fixture: ComponentFixture<CollectionToolsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CollectionToolsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CollectionToolsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

8
src/app/ui/collection-tools-building/collection-tools.component.ts

@ -1806,14 +1806,14 @@ export class CollectionToolsBuildingComponent implements OnInit {
this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
let isSuccess = this.renovateSitePlan()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
})
} else { //楼层/区域
this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
let isSuccess = this.renovateBuilding()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
})
}
@ -1957,7 +1957,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
let isSuccess = this.renovateSitePlan()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -1968,7 +1968,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
let isSuccess = this.renovateBuilding()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';

25
src/app/ui/collection-tools-plan/collection-tools.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CollectionToolsComponent } from './collection-tools.component';
describe('CollectionToolsComponent', () => {
let component: CollectionToolsComponent;
let fixture: ComponentFixture<CollectionToolsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CollectionToolsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CollectionToolsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

10
src/app/ui/collection-tools-plan/collection-tools.component.ts

@ -1735,7 +1735,7 @@ export class CollectionToolsPlanComponent implements OnInit {
let dialogRef = this.dialog.open(leftFunctionalDomainComponentPlan,{data});
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
this.renovateSitePlan()
this.sitePlanData.length? this.renovateSitePlan() : this.getSitePlan()
} else if (data =='建筑') {
this.renovateBuilding()
}
@ -1816,14 +1816,14 @@ export class CollectionToolsPlanComponent implements OnInit {
this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
let isSuccess = this.renovateSitePlan()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
})
} else { //楼层/区域
this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
let isSuccess = this.renovateBuilding()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
})
}
@ -1967,7 +1967,7 @@ export class CollectionToolsPlanComponent implements OnInit {
this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
let isSuccess = this.renovateSitePlan()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -1978,7 +1978,7 @@ export class CollectionToolsPlanComponent implements OnInit {
this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
let isSuccess = this.renovateBuilding()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';

1
src/app/ui/collection-tools-plan/leftFunctionalDomain.ts

@ -55,7 +55,6 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
formData.append("file",this.file)
this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}`,formData).subscribe((data:any)=>{
let imgURL = '/api/Objects/WebPlan2D/' + data.objectName
console.log(imgURL)
if (!this.data.isBuilding) { //总平面图 创建平面图
let data = {
companyId: sessionStorage.getItem('companyId'),

6
src/app/ui/collection-tools/collection-tools.component.html

@ -14,9 +14,9 @@
想定作业名称<mat-icon>visibility</mat-icon>
</span>
<!-- <span class="marginLeftRight">
<mat-checkbox color="primary"></mat-checkbox> 多选
</span> -->
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isMultiSelect" (change)='changeMultiSelect($event)'></mat-checkbox> 多选
</span>
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isShowLegend" (change)='changeLegend($event)' [disabled]='this.canvasData.selectPanelPoint.BackgroundImageUrl'></mat-checkbox> 显示图例
</span>

25
src/app/ui/collection-tools/collection-tools.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CollectionToolsComponent } from './collection-tools.component';
describe('CollectionToolsComponent', () => {
let component: CollectionToolsComponent;
let fixture: ComponentFixture<CollectionToolsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CollectionToolsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CollectionToolsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

26
src/app/ui/collection-tools/collection-tools.component.ts

@ -1569,6 +1569,8 @@ export class CollectionToolsComponent implements OnInit {
beforeOneCheckedBuildingIsShow:boolean = false; //想定作业下 建筑是否显示
togglebeforeOneCheckedBuilding () { this.beforeOneCheckedBuildingIsShow = !this.beforeOneCheckedBuildingIsShow }
isMultiSelect:boolean = false; // 多选/单选 切换
changeMultiSelect (e) { this.canvas.setMulitSelect(this.isMultiSelect) }
isShowLegend:boolean = true; //图例是否显示
changeLegend (e) { this.canvasData.selectPanelPoint.BackgroundImageUrl? null : this.canvas.setLegendVisible(this.isShowLegend) }
@ -1594,7 +1596,7 @@ export class CollectionToolsComponent implements OnInit {
}
sitePlanData:any = []; //总平面图 楼层/区域 数据
selectingSitePlan:any; //选中的 平面图 楼层/区域
selectingSitePlan:any = {id:null}; //选中的 平面图 楼层/区域
selectSitePlanIndex:number; //选中的 平面图 楼层/区域 index
//获取总平面图
@ -1842,14 +1844,14 @@ export class CollectionToolsComponent implements OnInit {
this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
let isSuccess = this.renovateSitePlan()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
})
} else { //楼层/区域
this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
let isSuccess = this.renovateBuilding()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
})
}
@ -1993,7 +1995,7 @@ export class CollectionToolsComponent implements OnInit {
this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
let isSuccess = this.renovateSitePlan()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -2004,7 +2006,7 @@ export class CollectionToolsComponent implements OnInit {
this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
let isSuccess = this.renovateBuilding()
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
})
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -2123,6 +2125,7 @@ export class CollectionToolsComponent implements OnInit {
//获取所有处置节点
getDisposalNode () {
this.selectDisposalNode = ''
this.canvasData.selectPanelPoint = new DisposalNodeData();
let params = {disasterId: this.allFirePlan[0].id || ''}
this.http.get('/api/DisasterData/Markers',{params:params}).subscribe(data=>{ //灾情标签信息
this.canvasData.allNodeMarkers = data
@ -2398,6 +2401,7 @@ export class CollectionToolsComponent implements OnInit {
//自定义数据节点 时
async customizeNodes() {
this.canvasData.selectPanelPoint.BackgroundImageAngle = 0
await this.canvas.loadNoRelevantInformationDisposalPlan(this.canvasData.selectPanelPoint)
let other = {
children: [],
@ -2443,6 +2447,12 @@ export class CollectionToolsComponent implements OnInit {
this.selectingSitePlan = this.sitePlanData[index] || {}
this.canvasData.selectStorey = this.sitePlanData[index] || {} //服务中 存一份数据
this.selectSitePlanIndex = index
if (index == -1) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('匹配楼层已被删除','确定',config);
}
Promise.all([fireData,planData]).then((res)=>{
this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据
@ -2459,6 +2469,12 @@ export class CollectionToolsComponent implements OnInit {
this.selectingSitePlan = this.sitePlanData[index] || {}
this.canvasData.selectStorey = this.sitePlanData[index] || {} //服务中 存一份数据
this.selectSitePlanIndex = index
if (index == -1) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('匹配楼层已被删除','确定',config);
}
Promise.all([fireData,planData]).then((res)=>{
this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据

4
src/app/ui/collection-tools/leftFunctionalDomain.ts

@ -145,14 +145,14 @@ export class addBGCDisposalNodeComponent implements OnInit {
//上传图片
selectFile (e) {
if (e.target.files.length) {
let maxSize = 5*1024*1024
let maxSize = 10*1024*1024
if (e.target.files[0].size <= maxSize) {
this.file = e.target.files[0]
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('上传图片需小于5MB','确定',config);
this.snackBar.open('上传图片需小于10MB','确定',config);
}
}
}

6
src/app/ui/collection-tools/save.ts

@ -332,11 +332,17 @@ export class saveOneDialog {
return new Promise((resolve,reject)=>{
if (this.canvasData.selectPanelPoint.BackgroundImageUrl && !this.canvasData.selectPanelPoint.DisposalNodeId) { //新建逻辑
if (this.canvasData.customizeDisposalNode) {
let fiveSize = 5*1024*1024
if (this.canvasData.customizeDisposalNode.file.size <= fiveSize) { //小于5MB
let formData = new FormData()
formData.append("file",this.canvasData.customizeDisposalNode.file)
this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}/DisposalNode`,formData).subscribe((data:any)=>{
resolve('/api/Objects/WebPlan2D/' + data.objectName)
})
} else { //大于5MB
let upload = this.canvasData.sectionUpload(sessionStorage.getItem('companyId'),this.canvasData.customizeDisposalNode.file)
upload.then(res=>{ resolve('/api/Objects/PlanPlatform/' + res) })
} //else
}
} else {
resolve(null)

11
src/app/ui/dateselect/dateselect.component.html

@ -1,11 +0,0 @@
<mat-form-field>
<input matInput [matDatepicker]="picker" placeholder="选择日期" (dateInput)="addEvent('日期是',$event)" (dataChange)="addEvent('日期是',$event)">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
<div class="example-events">
<div *ngFor="let e of events">{{e}}</div>
</div>

7
src/app/ui/dateselect/dateselect.component.scss

@ -1,7 +0,0 @@
.example-events {
width: 400px;
height: 200px;
border: 1px solid #555;
overflow: auto;
}

25
src/app/ui/dateselect/dateselect.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DateselectComponent } from './dateselect.component';
describe('DateselectComponent', () => {
let component: DateselectComponent;
let fixture: ComponentFixture<DateselectComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DateselectComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DateselectComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

23
src/app/ui/dateselect/dateselect.component.ts

@ -1,23 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {MatDatepickerInputEvent} from '@angular/material/datepicker';
@Component({
selector: 'app-dateselect',
templateUrl: './dateselect.component.html',
styleUrls: ['./dateselect.component.scss'],
})
export class DateselectComponent implements OnInit {
constructor() { }
ngOnInit() {
}
events: string[] = [];
addEvent(type: string, event: MatDatepickerInputEvent<Date>) {
this.events.push(`${type}: ${event.value}`);
}
}

6
src/app/ui/footer/footer.component.html

@ -1,6 +0,0 @@
<mat-toolbar class="footer" color="primary">
<div>
<span>Copyright 2020. All Rights Reserved By Anxin</span>
</div>
</mat-toolbar>

15
src/app/ui/footer/footer.component.scss

@ -1,15 +0,0 @@
.footer{
position: fixed;
bottom: 0;
height: 46px;
width: 100%;
z-index: 100;
span{
font-size: 16px;
color: white;
position: absolute;
right: 80px;
top: 8px;
}
}

25
src/app/ui/footer/footer.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component';
describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FooterComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
src/app/ui/footer/footer.component.ts

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss']
})
export class FooterComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

34
src/app/ui/grid/grid.component.html

@ -1,34 +0,0 @@
<h1>网格列表</h1>
<mat-grid-list cols="2" rowHeight="2:1" gutterSize="1px">
<mat-grid-tile>
<mat-grid-tile-header>我是页眉</mat-grid-tile-header>
<img src="http://t8.baidu.com/it/u=2247852322,986532796&fm=79&app=86&f=JPEG?w=1280&h=853" alt="">
<mat-grid-tile-footer>我是页脚</mat-grid-tile-footer>
</mat-grid-tile>
<mat-grid-tile><img src="http://t9.baidu.com/it/u=3363001160,1163944807&fm=79&app=86&f=JPEG?w=1280&h=830" alt=""></mat-grid-tile>
<mat-grid-tile><img src="http://t8.baidu.com/it/u=1484500186,1503043093&fm=79&app=86&f=JPEG?w=1280&h=853" alt=""></mat-grid-tile>
<mat-grid-tile><img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578887209526&di=fad671fc33c930b0bce56d44ee89ac1f&imgtype=0&src=http%3A%2F%2Fimgs.aixifan.com%2Fo_1cqcn9cruusp5k1paa10ak1s98r.jpg" alt=""></mat-grid-tile>
</mat-grid-list>
<br><br><br>
<mat-grid-list cols="4">
<mat-grid-tile [rowspan]="2">
<img src="https://pinimg.ibenchu.net/564x/b8/43/42/b8434218b90dbc45b7c0d8156a4131e6.jpg">
</mat-grid-tile>
<mat-grid-tile>
<img src="https://pinimg.ibenchu.net/564x/29/da/12/29da12d800c0fa53ec5899e29a3fb50e.jpg">
</mat-grid-tile>
<mat-grid-tile>
<img src="https://pinimg.ibenchu.net/564x/11/24/5e/11245e128eb31ecb38471a1a3b54474e.jpg">
</mat-grid-tile>
<mat-grid-tile>
<img src="https://pinimg.ibenchu.net/564x/d1/7e/da/d17edaf30276ac0c1cc24cc8bf1d7c41.jpg">
</mat-grid-tile>
<mat-grid-tile [colspan]="2">
<img src="https://pinimg.ibenchu.net/564x/b4/8f/f5/b48ff5c6f0932cf3d34beaccd7ca7ea5.jpg">
</mat-grid-tile>
<mat-grid-tile>
<img src="https://pinimg.ibenchu.net/564x/83/61/d3/8361d3cea8c217262d0ba0d9a43e4370.jpg">
</mat-grid-tile>
</mat-grid-list>

12
src/app/ui/grid/grid.component.scss

@ -1,12 +0,0 @@
mat-grid-tile {
background: lightblue;
}
h1{
font-size: 26px;
}
img {
width: 100%;
height: 100%;
}

25
src/app/ui/grid/grid.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { GridComponent } from './grid.component';
describe('GridComponent', () => {
let component: GridComponent;
let fixture: ComponentFixture<GridComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GridComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GridComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
src/app/ui/grid/grid.component.ts

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-grid',
templateUrl: './grid.component.html',
styleUrls: ['./grid.component.scss']
})
export class GridComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

63
src/app/ui/list/list.component.html

@ -1,63 +0,0 @@
<!-- <mat-list>
<h3 mat-subheader>Folders</h3>
<mat-list-item *ngFor="let folder of folders; last as last">
<mat-icon mat-list-icon>folder</mat-icon>
<h4 mat-line>{{folder.name}}</h4>
<p mat-line class="demo-2"> {{folder.updated}} </p>
<mat-divider [inset]="true" *ngIf="!last"></mat-divider>
</mat-list-item>
<mat-divider></mat-divider>
<h3 mat-subheader>Notes</h3>
<mat-list-item *ngFor="let note of notes">
<mat-icon mat-list-icon>note</mat-icon>
<h4 mat-line>{{note.name}}</h4>
<p mat-line class="demo-2"> {{note.updated}} </p>
</mat-list-item>
</mat-list> -->
<h1>列表分隔线</h1>
<mat-list>
<mat-list-item>Item 1</mat-list-item>
<mat-divider></mat-divider>
<mat-list-item>Item 2</mat-list-item>
<mat-divider></mat-divider>
<mat-list-item>Item 3</mat-list-item>
</mat-list>
<br><br><br>
<h1>导航列表</h1>
<mat-nav-list>
<mat-list-item *ngFor="let link of links">
<a matLine href="/ui/list">{{ link.name }}</a>
<button mat-icon-button (click)="showInfo(link)">
跳转到编辑页面
</button>
</mat-list-item>
</mat-nav-list>
<br><br><br>
<h1>行动列表</h1>
<mat-action-list>
<button mat-list-item (click)="save()"> 行动一 </button>
<button mat-list-item (click)="undo()"> 行动二 </button>
</mat-action-list>
<br><br><br>
<h1>选择列表</h1>
<mat-selection-list #shoes>
<mat-list-option *ngFor="let shoe of typesOfShoes">
{{shoe}}
</mat-list-option>
</mat-selection-list>
<p>
已选: {{shoes.selectedOptions.selected.length}}种
</p>
<br><br><br>
<h1>多行列表且带图标</h1>
<mat-list>
<mat-list-item>
<mat-icon matListIcon>folder</mat-icon>
<h3 matLine> item标题 </h3>
<p matLine>
<span> 我是 </span>
<span class="demo-2"> -- xxx </span>
</p>
</mat-list-item>
</mat-list>

0
src/app/ui/list/list.component.scss

25
src/app/ui/list/list.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ListComponent } from './list.component';
describe('ListComponent', () => {
let component: ListComponent;
let fixture: ComponentFixture<ListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

28
src/app/ui/list/list.component.ts

@ -1,28 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router'
@Component({
selector: 'app-list',
templateUrl: './list.component.html',
styleUrls: ['./list.component.scss']
})
export class ListComponent implements OnInit {
constructor(private router:Router,private route:ActivatedRoute) { }
ngOnInit() {
}
links = [
{id:0,name:'小红'},
{id:1,name:'小绿'},
{id:2,name:'小兰'}
]
typesOfShoes: string[] = ['耐克', '阿迪达斯', '彪马', '亚瑟士', '斯凯奇'];
showInfo(link){
this.router.navigate([link.id],{relativeTo:this.route})
}
save () {
}
undo () {}
}

66
src/app/ui/menu/menu.component.html

@ -1,66 +0,0 @@
<button mat-button [matMenuTriggerFor]="menu">菜单</button>
<mat-menu #menu="matMenu">
<button mat-menu-item>我是老大</button>
<button mat-menu-item>我是老二</button>
</mat-menu>
<button mat-icon-button [matMenuTriggerFor]="appMenu">
<mat-icon>more_vert</mat-icon>
</button>
<!-- <mat-menu #appMenu="matMenu">
<button mat-menu-item>设置</button>
<button mat-menu-item>帮助</button>
</mat-menu> -->
<mat-menu #appMenu="matMenu">
<button mat-menu-item>
<mat-icon>dialpad</mat-icon>
<span>重播</span>
</button>
<button mat-menu-item disabled>
<mat-icon>voicemail</mat-icon>
<span>检查邮件</span>
</button>
<button mat-menu-item>
<mat-icon>notifications_off</mat-icon>
<span>禁止弹出框</span>
</button>
</mat-menu>
<button mat-icon-button [matMenuTriggerFor]="rootMenu">
动物
</button>
<mat-menu #rootMenu="matMenu">
<!-- 延时渲染 -->
<ng-template matMenuContent>
<button mat-menu-item [matMenuTriggerFor]="subMenu">家养</button>
<button mat-menu-item>野生</button>
</ng-template>
</mat-menu>
<mat-menu #subMenu="matMenu">
<button mat-menu-item [matMenuTriggerFor]="subMenu2">小狗</button>
<button mat-menu-item>小猫</button>
<button mat-menu-item>小乌龟</button>
</mat-menu>
<mat-menu #subMenu2="matMenu">
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
<button mat-menu-item>小黑狗</button>
</mat-menu>

0
src/app/ui/menu/menu.component.scss

25
src/app/ui/menu/menu.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MenuComponent } from './menu.component';
describe('MenuComponent', () => {
let component: MenuComponent;
let fixture: ComponentFixture<MenuComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MenuComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MenuComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
src/app/ui/menu/menu.component.ts

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-menu',
templateUrl: './menu.component.html',
styleUrls: ['./menu.component.scss']
})
export class MenuComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

13
src/app/ui/progress/progress.component.html

@ -1,13 +0,0 @@
<mat-spinner color="warn"></mat-spinner>
<br>
<h1>确定进度条</h1>
<mat-progress-bar mode="determinate" value="40"></mat-progress-bar>
<br>
<h1>不确定进度条</h1>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
<br>
<h1>缓冲进度条</h1>
<mat-progress-bar mode="buffer"></mat-progress-bar>
<br>
<h1>查询进度条</h1>
<mat-progress-bar mode="query"></mat-progress-bar>

0
src/app/ui/progress/progress.component.scss

25
src/app/ui/progress/progress.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ProgressComponent } from './progress.component';
describe('ProgressComponent', () => {
let component: ProgressComponent;
let fixture: ComponentFixture<ProgressComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProgressComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ProgressComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
src/app/ui/progress/progress.component.ts

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-progress',
templateUrl: './progress.component.html',
styleUrls: ['./progress.component.scss']
})
export class ProgressComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

1
src/app/ui/slide/slide.component.html

@ -1 +0,0 @@
<mat-slide-toggle [(checked)]="xxx" (click)="sss()">{{xxx}}</mat-slide-toggle>

0
src/app/ui/slide/slide.component.scss

25
src/app/ui/slide/slide.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SlideComponent } from './slide.component';
describe('SlideComponent', () => {
let component: SlideComponent;
let fixture: ComponentFixture<SlideComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SlideComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SlideComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

22
src/app/ui/slide/slide.component.ts

@ -1,22 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-slide',
templateUrl: './slide.component.html',
styleUrls: ['./slide.component.scss']
})
export class SlideComponent implements OnInit {
xxx:boolean=false
sss(){
this.xxx = !this.xxx
console.log(this.xxx)
}
constructor() {
}
ngOnInit() {
}
}

10
src/app/ui/snackbar/snackbar.component.html

@ -1,10 +0,0 @@
<p>底部提示消息</p>
<mat-form-field>
<input matInput value="哈哈" placeholder="提示信息1" #message>
</mat-form-field>
<mat-form-field>
<input matInput value="嘻嘻" placeholder="提示信息2" #action>
</mat-form-field>
<button mat-button (click)="openSnackBar(message.value, action.value)">显示出来吧!</button>

0
src/app/ui/snackbar/snackbar.component.scss

25
src/app/ui/snackbar/snackbar.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SnackbarComponent } from './snackbar.component';
describe('SnackbarComponent', () => {
let component: SnackbarComponent;
let fixture: ComponentFixture<SnackbarComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SnackbarComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SnackbarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

19
src/app/ui/snackbar/snackbar.component.ts

@ -1,19 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {MatSnackBar} from '@angular/material/snack-bar';
@Component({
selector: 'app-snackbar',
templateUrl: './snackbar.component.html',
styleUrls: ['./snackbar.component.scss']
})
export class SnackbarComponent implements OnInit {
constructor(private _snackBar: MatSnackBar) { }
ngOnInit() {
}
openSnackBar(message: string, action: string) {
this._snackBar.open(message, action, {
duration: 2000,
});
}
}

51
src/app/ui/stepper/stepper.component.html

@ -1,51 +0,0 @@
<button mat-raised-button (click)="isLinear = !isLinear" id="toggle-linear">
{{!isLinear ? '切换为线性' : '切换为非线性'}}
</button>
<!-- 整个流程总标签 -->
<!-- mat-vertical-stepper是垂直方向 -->
<!-- labelPosition可以定义标签位置 -->
<!-- linear控制只有在完成前面步骤才可以进行后续步骤 -->
<mat-horizontal-stepper [linear]="isLinear" #stepper>
<!-- 第一步 -->
<!-- stepControl检查步骤有效性 -->
<mat-step [stepControl]="firstFormGroup">
<form [formGroup]="firstFormGroup">
<ng-template matStepLabel>填写姓名</ng-template>
<mat-form-field>
<!-- 指定控制器名称 -->
<!-- 过滤器-必填 -->
<input matInput placeholder="姓名" formControlName="firstCtrl" required>
</mat-form-field>
<div>
<!-- 必须添加type="button"防止提交 -->
<button mat-button matStepperNext type="button">下一步</button>
</div>
</form>
</mat-step>
<!-- 第二步 -->
<!-- optional属性表示可选 -->
<mat-step [stepControl]="secondFormGroup" optional="true">
<form [formGroup]="secondFormGroup">
<ng-template matStepLabel>家庭住址</ng-template>
<mat-form-field>
<input matInput placeholder="住址" formControlName="secondCtrl" required>
</mat-form-field>
<div>
<!-- 步骤按钮 -->
<button mat-button matStepperPrevious type="button">上一步</button>
<button mat-button matStepperNext type="button">下一步</button>
</div>
</form>
</mat-step>
<!-- 第三步 -->
<mat-step>
<ng-template matStepLabel>完成</ng-template>
你已经完成了
<div>
<button mat-button matStepperPrevious>上一步</button>
<button mat-button (click)="stepper.reset()">重置</button>
</div>
</mat-step>
</mat-horizontal-stepper>

0
src/app/ui/stepper/stepper.component.scss

25
src/app/ui/stepper/stepper.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { StepperComponent } from './stepper.component';
describe('StepperComponent', () => {
let component: StepperComponent;
let fixture: ComponentFixture<StepperComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ StepperComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(StepperComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

23
src/app/ui/stepper/stepper.component.ts

@ -1,23 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
@Component({
selector: 'app-stepper',
templateUrl: './stepper.component.html',
styleUrls: ['./stepper.component.scss']
})
export class StepperComponent implements OnInit {
isLinear = false;
firstFormGroup: FormGroup;
secondFormGroup: FormGroup;
constructor(private _formBuilder: FormBuilder) { }
ngOnInit() {
this.firstFormGroup = this._formBuilder.group({
firstCtrl: ['', Validators.required]
});
this.secondFormGroup = this._formBuilder.group({
secondCtrl: ['', Validators.required]
});
}
}

22
src/app/ui/tabgroup/tabgroup.component.html

@ -1,22 +0,0 @@
<mat-tab-group focusChange="xxx()">
<mat-tab label="选项一"> 我是内容一 </mat-tab>
<mat-tab label="选项二"> 我是内容二 </mat-tab>
<mat-tab label="选项三"> 我是内容三 </mat-tab>
</mat-tab-group>
<!-- 对于更复杂的标签标题,请在其中添加带有mat-tab-label指令的模板mat-tab。 -->
<mat-tab-group>
<mat-tab>
<ng-template mat-tab-label>
<strong></strong>
</ng-template>
<h1>四五六</h1>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon>thumb_down</mat-icon> 失败者
</ng-template>
<h1>rush B!!!</h1>
</mat-tab>
</mat-tab-group>

0
src/app/ui/tabgroup/tabgroup.component.scss

25
src/app/ui/tabgroup/tabgroup.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TabgroupComponent } from './tabgroup.component';
describe('TabgroupComponent', () => {
let component: TabgroupComponent;
let fixture: ComponentFixture<TabgroupComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TabgroupComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TabgroupComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

17
src/app/ui/tabgroup/tabgroup.component.ts

@ -1,17 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-tabgroup',
templateUrl: './tabgroup.component.html',
styleUrls: ['./tabgroup.component.scss']
})
export class TabgroupComponent implements OnInit {
constructor() { }
ngOnInit() {
}
xxx(){
console.log("xxxx")
}
}

22
src/app/ui/ui-routing.module.ts

@ -1,18 +1,7 @@
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { UiComponent } from './ui.component';
import { DateselectComponent } from './dateselect/dateselect.component';
import { MenuComponent } from './menu/menu.component';
import { CardComponent } from './card/card.component';
import { ListComponent } from './list/list.component';
import { GridComponent } from './grid/grid.component';
import { StepperComponent } from './stepper/stepper.component';
import { TabgroupComponent } from './tabgroup/tabgroup.component';
import { ButtonComponent } from './button/button.component';
import { BadgeComponent } from './badge/badge.component';
import { ProgressComponent } from './progress/progress.component';
import { PaginatorComponent } from './paginator/paginator.component';
import { PersonaldataComponent } from '../pages/personaldata/personaldata.component';
import { UserdataComponent } from './userdata/userdata.component';
import { OrganizationComponent } from './organization/organization.component';
import { UnittypeComponent } from './unittype/unittype.component';
@ -31,18 +20,7 @@ import { CollectionToolsComponent } from './collection-tools/collection-tools.co
const routes: Routes = [
{ path: '', component: UiComponent},
{ path: 'dateselect', component:DateselectComponent},
{ path: 'menu', component:MenuComponent},
{ path: 'card', component:CardComponent},
{ path: 'list', component:ListComponent},
{ path: 'grid', component:GridComponent},
{ path: 'stepper', component:StepperComponent},
{ path: 'tabgroup', component:TabgroupComponent},
{ path: 'btn', component:ButtonComponent },
{ path: 'badge', component:BadgeComponent },
{ path: 'progress', component:ProgressComponent },
{ path: 'paginator', component:PaginatorComponent },
{ path: 'person', component:PersonaldataComponent },
{ path: 'userdata', component:UserdataComponent },
{ path: 'organization', component:OrganizationComponent },
{ path: 'unittype', component:UnittypeComponent },

16
src/app/ui/ui.module.ts

@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { UiComponent } from './ui.component';
import { DateselectComponent } from './dateselect/dateselect.component';
import { UiRoutingModule } from './ui-routing.module';
import {A11yModule} from '@angular/cdk/a11y';
import {DragDropModule} from '@angular/cdk/drag-drop';
@ -44,22 +43,10 @@ import {MatTabsModule} from '@angular/material/tabs';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatTooltipModule} from '@angular/material/tooltip';
import {MatTreeModule} from '@angular/material/tree';
import { MenuComponent } from './menu/menu.component';
import { CardComponent } from './card/card.component';
import { ListComponent } from './list/list.component';
import { GridComponent } from './grid/grid.component';
import { StepperComponent } from './stepper/stepper.component';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { TabgroupComponent } from './tabgroup/tabgroup.component';
import { ButtonComponent } from './button/button.component';
import { BadgeComponent } from './badge/badge.component';
import { ProgressComponent } from './progress/progress.component';
import { SnackbarComponent } from './snackbar/snackbar.component';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatPaginatorIntl } from '@angular/material/paginator';
import { PaginatorModule } from './paginator/paginator.module';
import { PersonaldataComponent } from '../pages/personaldata/personaldata.component';
import { FooterComponent } from './footer/footer.component';
import { UserdataComponent, EditUser } from './userdata/userdata.component';
import { ChangepasswordComponent } from './changepassword/changepassword.component';
import { OrganizationComponent, CreateOrganization, EditOrganization, addOffices, editOffices } from './organization/organization.component';
@ -100,7 +87,7 @@ import {CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuil
import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,addDisposalNodeBuildingComponent,editDisposalNodeBuildingComponent} from './collection-tools-building/leftFunctionalDomain'
import {saveOneDialogBuilding,saveTwoDialogBuilding} from './collection-tools-building/save'
@NgModule({
declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,ViewDetailsPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addDisposalNodeComponentPlan,editDisposalNodeComponentPlan,saveOneDialogPlan,saveTwoDialogPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,ViewDetailsBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,addDisposalNodeBuildingComponent,editDisposalNodeBuildingComponent,saveOneDialogBuilding,saveTwoDialogBuilding],
declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,ViewDetailsPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addDisposalNodeComponentPlan,editDisposalNodeComponentPlan,saveOneDialogPlan,saveTwoDialogPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,ViewDetailsBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,addDisposalNodeBuildingComponent,editDisposalNodeBuildingComponent,saveOneDialogBuilding,saveTwoDialogBuilding],
imports: [
CommonModule,
@ -156,7 +143,6 @@ import {saveOneDialogBuilding,saveTwoDialogBuilding} from './collection-tools-bu
exports:[
FooterComponent,
CollectionToolsComponent,
CollectionToolsBuildingComponent,
CollectionToolsPlanComponent

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

@ -109,11 +109,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
*
*/
private enterPaintEndButton = PIXI.Sprite.from('assets/images/enterPaintButton.png');
/**
*
*/
editorPointTexture: PIXI.Texture = PIXI.Texture.from('assets/images/handle-main.png');
backgroundTexture: PIXI.Texture = PIXI.Texture.from('assets/images/noImg.png');
/**
*
*/
@ -159,24 +159,34 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
PIXI.utils.skipHello();
this.sayHello();
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
event.stopPropagation();
if (event.keyCode === 17) {
this.isCtrlKeyClicked = true;
}
// event.stopPropagation();
// if (event.keyCode === 17) {
// this.isCtrlKeyClicked = true;
// }
});
this.eventManager.addGlobalEventListener('window', 'keyup', (event: any) => {
event.stopPropagation();
if (event.keyCode === 17) {
this.isCtrlKeyClicked = false;
this.rectToolGraphics.visible = false;
this.rectToolGraphics.clear();
}
// event.stopPropagation();
// if (event.keyCode === 17) {
// this.isCtrlKeyClicked = false;
// this.rectToolGraphics.visible = false;
// this.rectToolGraphics.clear();
// }
// 按Del键删除选中的图标
if (event.keyCode === 46) {
this.deleteSelectedShape();
}
});
}
public setMulitSelect(b: boolean) {
if (b) {
this.isCtrlKeyClicked = true;
} else {
this.isCtrlKeyClicked = false;
this.rectToolGraphics.visible = false;
this.rectToolGraphics.clear();
}
}
/**
*
*/
@ -877,16 +887,19 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/**
*
*/
public async refreshBackgroundImage(imageUrl: string = this.canvasData.selectStorey.imageUrl, imageAngle: number = this.canvasData.selectStorey.imageAngle): Promise<void> {
if (imageUrl === undefined || imageUrl === null || imageUrl === '') {
this.backgroundImage.visible = false;
} else {
this.backgroundImage.visible = false;
public async refreshBackgroundImage(imageUrl: string, imageAngle: number): Promise<void> {
if (imageAngle === undefined || imageAngle === null) {
imageAngle = 0;
}
this.backgroundImage.scale.set(1);
this.backgroundImage.pivot.set(0);
this.backgroundImage.x = this.app.view.width / 2;
this.backgroundImage.y = this.app.view.height / 2;
if (imageUrl === undefined || imageUrl === null || imageUrl === '') {
this.backgroundImage.texture = this.backgroundTexture;
} else {
this.backgroundImage.texture = await PIXI.Texture.fromURL(imageUrl);
}
this.backgroundImage.angle = imageAngle;
// 等待图片加载完成
const imageWidth = this.backgroundImage.texture.width;
@ -898,22 +911,20 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
const scale = wScale < hScale ? wScale : hScale;
// 设置图片缩放
this.backgroundImage.scale.set(scale);
this.backgroundImage.visible = true;
// this.backgroundImage.visible = true;
this.backgroundImage.children.forEach((item) => {
if (item instanceof AxShape) {
item.refresh();
}
});
}
}
/**
*
* @param imageUrl
* @param imageAngle
*/
public async refresh(imageUrl: string = this.canvasData.selectStorey.imageUrl,
imageAngle: number = this.canvasData.selectStorey.imageAngle): Promise<void> {
await this.refreshBackgroundImage();
public async refresh(): Promise<void> {
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];
@ -1319,7 +1330,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
*
*/
public async onExamineeClickFloor() {
await this.refreshBackgroundImage();
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];
@ -1346,7 +1357,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* -
*/
public async onExaminerClickFloor() {
await this.refreshBackgroundImage();
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];
@ -1372,7 +1383,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* -
*/
public async onExaminerClickFloor_CreateTestpaper() {
await this.refreshBackgroundImage();
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];

31
src/assets/chartstheme/chongqing.js

File diff suppressed because one or more lines are too long

BIN
src/assets/images/map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

1
src/main.ts

@ -3,7 +3,6 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}

Loading…
Cancel
Save