diff --git a/proxy.config.json b/proxy.config.json index 1898eac..7a41359 100644 --- a/proxy.config.json +++ b/proxy.config.json @@ -1,6 +1,6 @@ { "/api": { - "target": "http://39.106.78.171:8000", + "target": "http://121.37.20.190:8000/", "secure": false, "changeOrigin": true } diff --git a/src/app/app.component.html b/src/app/app.component.html index 90c6b64..55e8a3b 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1 +1,4 @@ - \ No newline at end of file + +
+ +
\ No newline at end of file diff --git a/src/app/app.component.scss b/src/app/app.component.scss index e69de29..4e582fe 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -0,0 +1,12 @@ +.maskLayer{ + position: absolute; + left: 0; + top: 0; + z-index: 2000; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.2); + display: flex; + justify-content: center; + align-items: center; +} \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e8e367a..3e8e0d1 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -4,6 +4,7 @@ import { Data } from './interface' import { Router,ActivatedRoute } from '@angular/router' import {CacheTokenService} from './http-interceptors/cache-token.service'//引入服务 import { CookieService } from 'ngx-cookie-service'; +import { MaskLayerService } from './mask-layer.service'; @@ -14,9 +15,15 @@ import { CookieService } from 'ngx-cookie-service'; }) export class AppComponent { - constructor(private http:HttpClient,private router:Router,public token:CacheTokenService,private cookieService: CookieService) { } + constructor(private maskLayerService:MaskLayerService, private http:HttpClient,private router:Router,public token:CacheTokenService,private cookieService: CookieService) { } + isMaskLayerShow:boolean = false ngOnInit(): void { + //监听遮罩层 + this.maskLayerService.getMessage().subscribe((message: any)=>{ + this.isMaskLayerShow = message + }); + var token = this.cookieService.get("token") var refreshToken = this.cookieService.get("refreshToken"); if(token && refreshToken) { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 20093ac..7b8f5dc 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -20,6 +20,7 @@ import { TreeService } from'./http-interceptors/tree.service' import { CookieService } from 'ngx-cookie-service';//cookie插件 import { CountdownModule } from 'ngx-countdown'; //倒计时插件 import { MTokenK1Component } from './m-token-k1/m-token-k1.component'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; @NgModule({ declarations: [ @@ -39,7 +40,8 @@ import { MTokenK1Component } from './m-token-k1/m-token-k1.component'; PagesModule, FormsModule, HttpClientModule, - CountdownModule + CountdownModule, + MatProgressSpinnerModule ], providers: [httpInterceptorProviders, CacheTokenService,TreeService,CookieService], bootstrap: [AppComponent] diff --git a/src/app/mask-layer.service.ts b/src/app/mask-layer.service.ts new file mode 100644 index 0000000..c0a8988 --- /dev/null +++ b/src/app/mask-layer.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import {ReplaySubject} from "rxjs"; +import { Observable } from "rxjs"; +@Injectable({ + providedIn: 'root' +}) +export class MaskLayerService { + private _sendMessage: ReplaySubject = new ReplaySubject(1); + /** * 向其他组件发送信息 * + * @param message 需要发送的信息 * @returns {Observavle} */ + public sendMessage(message: any) { + this._sendMessage.next(message); + } + public getMessage(): Observable { + return this._sendMessage.asObservable(); + } + constructor() { } +} diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index d30c086..ab8a830 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -50,287 +50,289 @@
-
+
- - - -
-
- -
-
- keyboard_arrow_up - keyboard_arrow_down - - -
-
-
- - - - photo_size_select_actual - - - - - - -
-

- keyboard_arrow_up -

-

- edit - delete -

-

- cached - library_books -

-

- keyboard_arrow_down -

+ + + +
+
+ +
+
+ keyboard_arrow_up + keyboard_arrow_down + + +
+
+
+ + + + photo_size_select_actual + + + + + + +
+

+ keyboard_arrow_up +

+

+ edit + delete +

+

+ cached + library_books +

+

+ keyboard_arrow_down +

+
+
-
-
- -
-
- keyboard_arrow_up - keyboard_arrow_down - -
-
- - - - - + +
+
+ keyboard_arrow_up + keyboard_arrow_down + +
+
+ + + + + -
-
- -

{{items.name}}

+
+
+ +

{{items.name}}

+
-
- - - -
-
-
- -
- -
- -
-
-
- 属性 + +
- -
-

面积(平方米)

-
{{canvasData.selectStorey.area}}
-

详情

-
- {{canvasData.selectStorey.details}} -
-
- -
-

{{assetName}}

-
-

宽度(像素)

- -

高度(像素)

- -

角度

-
- - +
+ +
+ +
+ +
+
+
+ 属性
- -
-

厚度

-
- - + +
+

面积(平方米)

+
{{canvasData.selectStorey.area}}
+

详情

+
+ {{canvasData.selectStorey.details}}
+ +
+

{{assetName}}

-

是否高亮

-
- - 选中高亮 -
-
-
- 颜色 -
- +
+

宽度(像素)

+ +

高度(像素)

+ +

角度

+
+ +
-
-
    -
  • -
-
- 透明度 - - {{colorDivSliderValue}}% -
-
- -
-

{{item.PropertyName}}({{item.PhysicalUnit}})

- + +
+

厚度

+
+ + +
- -
-

{{item.PropertyName}}({{item.PhysicalUnit}})

- + +

是否高亮

+
+ + 选中高亮
- -
-

{{item.PropertyName}}({{item.PhysicalUnit}})

- +
+
+ 颜色 +
+ +
+
+
+
    +
  • +
+
+ 透明度 + + {{colorDivSliderValue}}%
- -
-
-

{{item.PropertyName}}

- {{imagesArr.length ? imagesArr.length : 0}} / {{item.PropertyValue}} - -
添加
- - -
-
-
+
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+
+

{{item.PropertyName}}

+ {{imagesArr.length ? imagesArr.length : 0}} / {{item.PropertyValue}} + +
添加
+ + +
+
+
+
+ +
+
+ + delete +
- -
-
- - delete -
-
- -
-

{{item.PropertyName}}

- -
- -
-

{{item.PropertyName}}

- - -
- -
-

{{item.PropertyName}}

- -
- -
-

{{item.PropertyName}}

- -
+ +
+

{{item.PropertyName}}

+ +
+ +
+

{{item.PropertyName}}

+ + +
+ +
+

{{item.PropertyName}}

+ +
+ +
+

{{item.PropertyName}}

+ +
+
-
- -
- -
- -
-
-
- 消防要素 -
+ +
+ +
+ +
+
+ 消防要素 +
+
-
- - +
+ + + + + + + {{node.name}} + + ({{node.children.length}}) + visibility + - - - - {{node.name}} - - ({{node.children.length}}) - visibility - - - - - - - {{node.name}} - - ({{node.children.length}}) - visibility - - - + + + + + {{node.name}} + + ({{node.children.length}}) + visibility + + + +
-
+
+ +
-
\ No newline at end of file diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index 8e5d717..3ca4bcf 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -332,4 +332,4 @@ div:focus { text-overflow: ellipsis; display: inline-block; width: 65px; -} \ No newline at end of file +} diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 73b3c81..9cdbeaa 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -9,6 +9,7 @@ import {FlatTreeControl} from '@angular/cdk/tree'; import {WorkingAreaComponent} from '../../working-area/working-area.component' import {CanvasShareDataService} from '../../canvas-share-data.service' //引入服务 import Viewer from 'viewerjs'; +import { MaskLayerService } from 'src/app/mask-layer.service'; @Component({ selector: 'app-collection-tools', templateUrl: './collection-tools.component.html', @@ -18,7 +19,7 @@ export class CollectionToolsComponent implements OnInit { @ViewChild('canvas') canvas:WorkingAreaComponent; //父组件中获得子组件的引用 - constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private element: ElementRef,public canvasData: CanvasShareDataService) { } + constructor(private maskLayerService:MaskLayerService, private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private element: ElementRef,public canvasData: CanvasShareDataService) { } // tree配置 private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数 return { @@ -518,7 +519,7 @@ export class CollectionToolsComponent implements OnInit { //更新用于统计的数据 this.canvasData.updateBuildingData() - + this.maskLayerService.sendMessage(true) if (this.selectingSitePlan && this.selectingSitePlan.id) { this.saveNum = [] let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData)); @@ -553,6 +554,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post("/api/CompanyAccount/SitePlanData",SitePlanData).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -571,6 +573,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post("/api/CompanyAccount/CompanyData",CompanyData).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -590,6 +593,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post("/api/CompanyAccount/CompanyAdjoins/Batch",CompanyAdjoins).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -609,6 +613,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post("/api/CompanyAccount/CompanyImportantLocations/Batch",CompanyImportantLocations).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -628,6 +633,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post("/api/CompanyAccount/CompanyFacilityAssets/Batch",CompanyFacilityAssets).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -648,6 +654,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post("/api/CompanyAccount/BuildingAreaData",SitePlanData).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -666,6 +673,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post("/api/CompanyAccount/BuildingData",CompanyData).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -685,6 +693,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post(`/api/CompanyAccount/BuildingAdjoins/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingAdjoins).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -704,6 +713,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post(`/api/CompanyAccount/BuildingImportantLocations/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingImportantLocations).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -723,6 +733,7 @@ export class CollectionToolsComponent implements OnInit { this.http.post(`/api/CompanyAccount/BuildingFacilityAssets/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingFacilityAssets).subscribe(data => { this.saveNum.push("1") if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; diff --git a/src/app/ui/ui.component.html b/src/app/ui/ui.component.html index 81f1dc8..e69de29 100644 --- a/src/app/ui/ui.component.html +++ b/src/app/ui/ui.component.html @@ -1 +0,0 @@ -

ui works!