Browse Source

[完善]功能分区,实景图,上传CAD界面布局完成

develop
陈鹏飞 5 years ago
parent
commit
ce532aa7dd
  1. 6
      angular.json
  2. 111
      package-lock.json
  3. 4
      package.json
  4. 0
      src/app/ui/function-division/addPartition.html
  5. 0
      src/app/ui/function-division/addPartitionAttribute.html
  6. 50
      src/app/ui/function-division/function-division.component.html
  7. 23
      src/app/ui/function-division/function-division.component.scss
  8. 70
      src/app/ui/function-division/function-division.component.ts
  9. 0
      src/app/ui/realistic-picture/addRealPicture.html
  10. 0
      src/app/ui/realistic-picture/editRealPicture.html
  11. 0
      src/app/ui/realistic-picture/previewImg.html
  12. 46
      src/app/ui/realistic-picture/realistic-picture.component.html
  13. 96
      src/app/ui/realistic-picture/realistic-picture.component.scss
  14. 119
      src/app/ui/realistic-picture/realistic-picture.component.ts
  15. 6
      src/app/ui/ui.module.ts
  16. 53
      src/app/ui/uploading-cad/uploading-cad.component.html
  17. 17
      src/app/ui/uploading-cad/uploading-cad.component.scss
  18. 11
      src/app/ui/uploading-cad/uploading-cad.component.ts
  19. 2
      tsconfig.app.json

6
angular.json

@ -29,10 +29,12 @@
"src/assets" "src/assets"
], ],
"styles": [ "styles": [
"src/styles.scss" "src/styles.scss",
"./node_modules/swiper/css/swiper.css"
], ],
"scripts": [ "scripts": [
"node_modules/echarts/dist/echarts.js" "node_modules/echarts/dist/echarts.js",
"./node_modules/swiper/js/swiper.js"
] ]
}, },
"configurations": { "configurations": {

111
package-lock.json generated

@ -4233,6 +4233,11 @@
"integrity": "sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk=", "integrity": "sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk=",
"dev": true "dev": true
}, },
"@types/swiper": {
"version": "5.2.1",
"resolved": "https://registry.npm.taobao.org/@types/swiper/download/@types/swiper-5.2.1.tgz",
"integrity": "sha1-iJq5yQQQB8J/+jIgCXMDtrFnBgg="
},
"@types/webpack-sources": { "@types/webpack-sources": {
"version": "0.1.6", "version": "0.1.6",
"resolved": "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-0.1.6.tgz", "resolved": "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-0.1.6.tgz",
@ -6893,6 +6898,14 @@
"resolved": "https://registry.npm.taobao.org/dom-storage/download/dom-storage-2.1.0.tgz", "resolved": "https://registry.npm.taobao.org/dom-storage/download/dom-storage-2.1.0.tgz",
"integrity": "sha1-APuGi8kgE1fqJDx7z9MwTB406jk=" "integrity": "sha1-APuGi8kgE1fqJDx7z9MwTB406jk="
}, },
"dom7": {
"version": "2.1.3",
"resolved": "https://registry.npm.taobao.org/dom7/download/dom7-2.1.3.tgz",
"integrity": "sha1-pzb5w7+8TKA5qBzQlfl9HX894Zw=",
"requires": {
"ssr-window": "^1.0.1"
}
},
"domain-browser": { "domain-browser": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz", "resolved": "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz",
@ -9956,8 +9969,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -9978,14 +9990,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -10000,20 +10010,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -10130,8 +10137,7 @@
"inherits": { "inherits": {
"version": "2.0.4", "version": "2.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -10143,7 +10149,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -10158,7 +10163,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -10166,14 +10170,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.9.0", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -10192,7 +10194,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -10282,8 +10283,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -10295,7 +10295,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -10381,8 +10380,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -10418,7 +10416,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -10438,7 +10435,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -10482,14 +10478,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.1.1", "version": "3.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
@ -11395,6 +11389,14 @@
"integrity": "sha1-rCetpmFn+ohJpq3dg39rGJrSCBw=", "integrity": "sha1-rCetpmFn+ohJpq3dg39rGJrSCBw=",
"dev": true "dev": true
}, },
"ng2-file-upload": {
"version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/ng2-file-upload/download/ng2-file-upload-1.4.0.tgz",
"integrity": "sha1-jeoo1XMjTFKvR0rSpAAbM1Jx5cQ=",
"requires": {
"tslib": "^1.9.0"
}
},
"ngx-echarts": { "ngx-echarts": {
"version": "4.2.2", "version": "4.2.2",
"resolved": "https://registry.npm.taobao.org/ngx-echarts/download/ngx-echarts-4.2.2.tgz", "resolved": "https://registry.npm.taobao.org/ngx-echarts/download/ngx-echarts-4.2.2.tgz",
@ -14666,6 +14668,11 @@
"tweetnacl": "~0.14.0" "tweetnacl": "~0.14.0"
} }
}, },
"ssr-window": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/ssr-window/download/ssr-window-1.0.1.tgz",
"integrity": "sha1-MHUqakZm53Z/C35qpvwv29DZs2k="
},
"ssri": { "ssri": {
"version": "7.1.0", "version": "7.1.0",
"resolved": "https://registry.npm.taobao.org/ssri/download/ssri-7.1.0.tgz?cache=0&sync_timestamp=1571961490394&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-7.1.0.tgz", "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-7.1.0.tgz?cache=0&sync_timestamp=1571961490394&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-7.1.0.tgz",
@ -14972,6 +14979,15 @@
"util.promisify": "~1.0.0" "util.promisify": "~1.0.0"
} }
}, },
"swiper": {
"version": "5.3.6",
"resolved": "https://registry.npm.taobao.org/swiper/download/swiper-5.3.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fswiper%2Fdownload%2Fswiper-5.3.6.tgz",
"integrity": "sha1-ECt/gUXXNOxMMOBGAhYDgjVrWUg=",
"requires": {
"dom7": "^2.1.3",
"ssr-window": "^1.0.1"
}
},
"symbol-observable": { "symbol-observable": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/symbol-observable/download/symbol-observable-1.2.0.tgz", "resolved": "https://registry.npm.taobao.org/symbol-observable/download/symbol-observable-1.2.0.tgz",
@ -16875,8 +16891,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -16904,7 +16919,6 @@
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -16919,8 +16933,7 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
@ -16931,8 +16944,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -17049,8 +17061,7 @@
"inherits": { "inherits": {
"version": "2.0.4", "version": "2.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -17062,7 +17073,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -17077,7 +17087,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -17085,14 +17094,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.9.0", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -17111,7 +17118,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -17201,8 +17207,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -17214,7 +17219,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -17300,8 +17304,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -17337,7 +17340,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -17357,7 +17359,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -17401,14 +17402,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.1.1", "version": "3.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },

4
package.json

@ -23,6 +23,7 @@
"@angular/platform-browser-dynamic": "~9.0.0", "@angular/platform-browser-dynamic": "~9.0.0",
"@angular/router": "~9.0.0", "@angular/router": "~9.0.0",
"@types/cesium": "^1.59.5", "@types/cesium": "^1.59.5",
"@types/swiper": "^5.2.1",
"angular-calendar": "^0.28.2", "angular-calendar": "^0.28.2",
"cesium": "^1.64.0", "cesium": "^1.64.0",
"date-fns": "^2.9.0", "date-fns": "^2.9.0",
@ -33,10 +34,10 @@
"ngx-echarts": "^4.2.2", "ngx-echarts": "^4.2.2",
"ngx-perfect-scrollbar": "^8.0.0", "ngx-perfect-scrollbar": "^8.0.0",
"rxjs": "~6.5.4", "rxjs": "~6.5.4",
"swiper": "^5.3.6",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"zone.js": "~0.10.2" "zone.js": "~0.10.2"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.900.1", "@angular-devkit/build-angular": "~0.900.1",
"@angular/cli": "~9.0.1", "@angular/cli": "~9.0.1",
@ -58,5 +59,4 @@
"tslint": "~5.15.0", "tslint": "~5.15.0",
"typescript": "~3.7.5" "typescript": "~3.7.5"
} }
} }

0
src/app/ui/function-division/addPartition.html

0
src/app/ui/function-division/addPartitionAttribute.html

50
src/app/ui/function-division/function-division.component.html

@ -1 +1,49 @@
<p>function-division works!</p> <div class="content">
<div style="margin-top:16px">
<mat-icon title="创建" (click)='addPartition()'>add_circle_outline</mat-icon>
</div>
<mat-tab-group class="tableContent">
<mat-tab label="单位功能分区">
<div style="margin: 30px 0 25px 50px;">
<mat-icon title="创建" (click)='addPartitionAttribute()'>add_circle_outline</mat-icon>
<mat-icon title="删除" style="margin-left: 25px;">delete</mat-icon>
</div>
<table mat-table [dataSource]="dataSource" style="margin-left: 50px;">
<ng-container matColumnDef="checked">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element">
<mat-checkbox></mat-checkbox>
</td>
</ng-container>
<ng-container matColumnDef="region">
<th mat-header-cell *matHeaderCellDef>区域</th>
<td mat-cell *matCellDef="let element">
</td>
</ng-container>
<ng-container matColumnDef="measure">
<th mat-header-cell *matHeaderCellDef>面积</th>
<td mat-cell *matCellDef="let element">
</td>
</ng-container>
<ng-container matColumnDef="situation">
<th mat-header-cell *matHeaderCellDef>基本情况</th>
<td mat-cell *matCellDef="let element">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
</mat-tab>
</mat-tab-group>
</div>

23
src/app/ui/function-division/function-division.component.scss

@ -0,0 +1,23 @@
.content {
width: 100%;
height: 100%;
padding: 10px 0 0 10px;
display: flex;
}
.tableContent {
margin-left: 10px;
width: 100%;
height: 100%;
table {
width: 1000px;
text-align: center;
.cdk-header-cell {
text-align: center;
}
}
}
//icon统一样式
.mat-icon {
cursor:pointer;
}

70
src/app/ui/function-division/function-division.component.ts

@ -1,4 +1,8 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({ @Component({
selector: 'app-function-division', selector: 'app-function-division',
@ -7,9 +11,71 @@ import { Component, OnInit } from '@angular/core';
}) })
export class FunctionDivisionComponent implements OnInit { export class FunctionDivisionComponent implements OnInit {
constructor() { } constructor(private http:HttpClient,public dialog: MatDialog) { }
ngOnInit(): void {
}
displayedColumns: string[] = ['checked', 'region', 'measure', 'situation'];
dataSource:any; //所有功能分区
//创建功能分区
addPartition () {
let dialogRef = this.dialog.open(addPartition,
{data: {}});
dialogRef.afterClosed().subscribe();
}
//创建功能分区属性
addPartitionAttribute () {
let dialogRef = this.dialog.open(addPartitionAttribute,
{data: {}});
dialogRef.afterClosed().subscribe();
}
}
//创建功能分区组件
@Component({
selector: 'app-addPartition',
templateUrl: './addPartition.html',
styleUrls: ['./function-division.component.scss']
})
export class addPartition {
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<addPartition>,
@Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {
}
}
//创建功能分区属性组件
@Component({
selector: 'app-addPartitionAttribute',
templateUrl: './addPartitionAttribute.html',
styleUrls: ['./function-division.component.scss']
})
export class addPartitionAttribute {
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<addPartitionAttribute>,
@Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void { ngOnInit(): void {
} }
} }

0
src/app/ui/realistic-picture/addRealPicture.html

0
src/app/ui/realistic-picture/editRealPicture.html

0
src/app/ui/realistic-picture/previewImg.html

46
src/app/ui/realistic-picture/realistic-picture.component.html

@ -1 +1,45 @@
<p>realistic-picture works!</p> <div class="content">
<div class="leftBox">
<div class="bank">
<div>
<span class="title">实景图</span>
<mat-icon title="创建" (click)='addReal()'>add_circle_outline</mat-icon>
<mat-icon title="编辑" (click)='editReal()'>create</mat-icon>
<mat-icon title="下载">cloud_download</mat-icon>
<mat-icon title="删除">delete</mat-icon>
</div>
</div>
<div>
<div *ngFor="let item of allRealPicture,let key=index" class="material"
[ngClass]="{'leftFile': selectRealIndex===key}" (click)="changeReal(item,key)">
<mat-icon class="btn">folder</mat-icon><span class="matname">{{item.name}}</span>
</div>
</div>
</div>
<div class="rightBox">
<div class="topBox">
<div>
<span class="title" *ngIf="selectReal">{{selectReal.name}}</span>
<button mat-raised-button color="primary">上传图片</button>
<button mat-raised-button color="primary" style="margin-left: 15px;" (click)='download()'>批量下载</button>
<button mat-raised-button color="primary" style="margin-left: 15px;" *ngIf="isDownload">下载</button>
</div>
<div>
<span>已用/容量:</span>
<span style="color: red;"> 500MB/5G </span>
</div>
</div>
<div class="bottomBox">
<div class="imgBox">
<img src="../../../assets/images/upload.png" (click)='operation()'>
<label style="margin-left: 5px;">图片名称:</label>
<input type="text" style="margin-left: 10px;">
<a href="javascript:" style="margin-left: 5px;">保存</a>
<a href="javascript:" style="margin-left: 5px;">删除</a>
</div>
</div>
</div>
</div>

96
src/app/ui/realistic-picture/realistic-picture.component.scss

@ -0,0 +1,96 @@
.content {
margin: 0 0 0 10px;
width: 100%;
height: 100%;
display: flex;
.leftBox {
flex: 15%;
padding-top: 10px;
.bank {
display: flex;
padding-left: 10px;
.mat-icon {margin-right: 15px;}
}
}
.rightBox {
border-left: 1px solid #999;
flex: 85%;
display: flex;
flex-direction: column;
.topBox {
flex: 5%; padding: 10px;
display: flex;
:first-child {flex: 85%;};
:last-child {flex: 15%;}
}
.bottomBox {
flex: 95%;
padding: 5px 0 0 25px;
display: flex;
flex-direction: row;
flex-wrap: wrap;}
}
}
//icon统一样式
.mat-icon {
cursor:pointer;
width: 18px;
height: 18px;
vertical-align:top;
margin-right: 10px;
}
.title {margin-right: 30px;font-weight: 500; font-size: 18px;}
.material {
cursor:pointer;
height: 30px;
font-size: 16px;
margin-top: 10px;
padding-left: 15px;
.btn {
color: #FFC122;
}
}
.imgBox{
width: 300px;
height: 200px;
margin: 0 25px 25px 0;
display: inline-block;
img {width: 100%;cursor:pointer;}
input{
font-size:12px;
width: 100px;
height:18px;
border-radius:3px;
border:1px solid #c8cccf;
outline:0;
text-align:left;
padding-left: 5px;
display:inline-block;
cursor: pointer;}
input::-webkit-input-placeholder{
color: #986655;
font-size: 12px;
}
a {display: inline-block;
width: 45px;
height: 24px;
line-height: 24px;
text-align: center;
border-radius: 3px;
background-color: #2196F3;
font-size: 14px;
color: #fff;}
}
//左侧实景图文件样式
.leftFile {
background-color: rgba(225,225,225,0.8);
}
//选中图片样式
.selectImg {
-webkit-filter: drop-shadow(0px 0px 5px #000);
filter: drop-shadow(0px 0px 5px #000);
border: 2px solid #00FF00;
}

119
src/app/ui/realistic-picture/realistic-picture.component.ts

@ -1,4 +1,8 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({ @Component({
selector: 'app-realistic-picture', selector: 'app-realistic-picture',
@ -7,9 +11,120 @@ import { Component, OnInit } from '@angular/core';
}) })
export class RealisticPictureComponent implements OnInit { export class RealisticPictureComponent implements OnInit {
constructor() { } constructor(private http:HttpClient,public dialog: MatDialog) { }
ngOnInit(): void { ngOnInit(): void {
}
allRealPicture:any=[{name:'单位实景图'},{name:'高科技创业园'}]; //所有实景图文件
selectReal:any; //选中的实景图文件
selectRealIndex:any=0; //选中的实景图文件下标
isDownload:boolean = false; //是否批量下载
downloadList:any = []; //选中需要下载的图片
//切换左侧实际图文件
changeReal (e,index) {
if (this.selectRealIndex != index) {
this.selectReal = e
this.selectRealIndex = index
}
}
//选择批量下载
download () {this.isDownload = !this.isDownload}
// 预览图片---批量选择图片
operation () {
if (this.isDownload) { //批量选择图片
} else { //预览图片
let dialogRef = this.dialog.open(previewImg,
{height: '400px',
width:'600px',
data: {}});
dialogRef.afterClosed().subscribe();
}
}
//新建实景图文件
addReal () {
let dialogRef = this.dialog.open(addRealPicture,
{data: {}});
dialogRef.afterClosed().subscribe();
}
//编辑实景图文件
editReal () {
if (this.selectReal) {
let dialogRef = this.dialog.open(editRealPicture,
{data: {}});
dialogRef.afterClosed().subscribe();
}
} }
} }
//预览图片组件
@Component({
selector: 'app-previewImg',
templateUrl: './previewImg.html',
styleUrls: ['./realistic-picture.component.scss']
})
export class previewImg {
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<previewImg>,
@Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {
}
}
//新建实景图文件组件
@Component({
selector: 'app-addRealPicture',
templateUrl: './addRealPicture.html',
styleUrls: ['./realistic-picture.component.scss']
})
export class addRealPicture {
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<addRealPicture>,
@Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {}
}
//编辑实景图文件组件
@Component({
selector: 'app-editRealPicture',
templateUrl: './editRealPicture.html',
styleUrls: ['./realistic-picture.component.scss']
})
export class editRealPicture {
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<editRealPicture>,
@Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {}
}

6
src/app/ui/ui.module.ts

@ -85,14 +85,14 @@ import { PlanComponent } from './plan/plan.component';
import { AllaroundComponent } from './allaround/allaround.component'; import { AllaroundComponent } from './allaround/allaround.component';
import { FireFightingDeviceComponent } from './fire-fighting-device/fire-fighting-device.component'; import { FireFightingDeviceComponent } from './fire-fighting-device/fire-fighting-device.component';
import { KeySiteComponent } from './key-site/key-site.component'; import { KeySiteComponent } from './key-site/key-site.component';
import { FunctionDivisionComponent } from './function-division/function-division.component'; import { FunctionDivisionComponent,addPartition,addPartitionAttribute } from './function-division/function-division.component';
import { RealisticPictureComponent } from './realistic-picture/realistic-picture.component'; import { RealisticPictureComponent,previewImg,addRealPicture,editRealPicture } from './realistic-picture/realistic-picture.component';
import { UploadingCADComponent } from './uploading-cad/uploading-cad.component'; import { UploadingCADComponent } from './uploading-cad/uploading-cad.component';
import { AddHouseInfo } from './basicinfo/addhouseinfo.component'; import { AddHouseInfo } from './basicinfo/addhouseinfo.component';
import { ImgDetails } from './allaround/imgdetails.component'; import { ImgDetails } from './allaround/imgdetails.component';
@NgModule({ @NgModule({
declarations: [UiComponent, CardComponent, StepperComponent, TabgroupComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,EditRole,TimePipe,CreateNewUser,EditNewUser,allRoles,SharePower,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, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent,AddHouseInfo,ImgDetails], declarations: [UiComponent, CardComponent, StepperComponent, TabgroupComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,EditRole,TimePipe,CreateNewUser,EditNewUser,allRoles,SharePower,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, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent,AddHouseInfo,ImgDetails,previewImg,addRealPicture,editRealPicture,addPartition,addPartitionAttribute],
imports: [ imports: [
CommonModule, CommonModule,

53
src/app/ui/uploading-cad/uploading-cad.component.html

@ -1 +1,52 @@
<p>uploading-cad works!</p> <div class="header">
<div>
<button mat-raised-button color="primary">上传</button>
<button mat-raised-button color="primary">下载</button>
<button mat-raised-button color="primary">删除</button>
</div>
<div>
<span>已用/容量:</span>
<span style="color: red;"> 500MB/5G </span>
</div>
</div>
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="checked">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element">
<mat-checkbox></mat-checkbox>
</td>
</ng-container>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>名称</th>
<td mat-cell *matCellDef="let element">
</td>
</ng-container>
<ng-container matColumnDef="time">
<th mat-header-cell *matHeaderCellDef>时间</th>
<td mat-cell *matCellDef="let element">
</td>
</ng-container>
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef>状态</th>
<td mat-cell *matCellDef="let element">
</td>
</ng-container>
<ng-container matColumnDef="size">
<th mat-header-cell *matHeaderCellDef>大小</th>
<td mat-cell *matCellDef="let element">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>

17
src/app/ui/uploading-cad/uploading-cad.component.scss

@ -0,0 +1,17 @@
.header {
display: flex;
margin: 10px;
:first-child{flex:88%}
:last-child{flex:12%}
.mat-raised-button {
margin-left: 15px;
}
}
table {
margin: 10px;
width: 100%;
text-align: center;
.cdk-header-cell {
text-align: center;
}
}

11
src/app/ui/uploading-cad/uploading-cad.component.ts

@ -1,4 +1,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({ @Component({
selector: 'app-uploading-cad', selector: 'app-uploading-cad',
@ -7,9 +10,15 @@ import { Component, OnInit } from '@angular/core';
}) })
export class UploadingCADComponent implements OnInit { export class UploadingCADComponent implements OnInit {
constructor() { } constructor(private http:HttpClient,) { }
ngOnInit(): void { ngOnInit(): void {
} }
displayedColumns: string[] = ['checked', 'name', 'time', 'state','size'];
dataSource:any; //所有CAD图
} }

2
tsconfig.app.json

@ -2,7 +2,7 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out-tsc/app", "outDir": "./out-tsc/app",
"types": [] "types": ["swiper"]
}, },
"files": [ "files": [
"src/main.ts", "src/main.ts",

Loading…
Cancel
Save