Browse Source

[完善] 上传底图增加遮罩层

zhuzhou
陈鹏飞 4 years ago
parent
commit
7e5c9c75a8
  1. 2
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  2. 6
      src/app/ui/collection-tools-plan/leftFunctionalDomain.ts

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

@ -1725,8 +1725,10 @@ export class CollectionToolsPlanComponent implements OnInit {
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
this.sitePlanData.length? this.renovateSitePlan() : this.getSitePlan()
this.maskLayerService.sendMessage(false)
} else if (data =='建筑') {
this.renovateBuilding()
this.maskLayerService.sendMessage(false)
}
})
}

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

@ -4,6 +4,7 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dial
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { CanvasShareDataService } from 'src/app/canvas-share-data.service';
import { EventManager } from '@angular/platform-browser';
import { MaskLayerService } from 'src/app/mask-layer.service';
@Component({
selector: 'app-leftFunctionalDomain-plan',
@ -17,7 +18,7 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data,public canvasData: CanvasShareDataService,) { }
@Inject(MAT_DIALOG_DATA) public data,public canvasData: CanvasShareDataService,private maskLayerService:MaskLayerService,) { }
ngOnInit(): void {
@ -37,7 +38,7 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('上传图片需小于5MB','确定',config);
this.snackBar.open('上传图片需小于10MB','确定',config);
}
}
}
@ -53,6 +54,7 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
//提交表单创建平面图
onSubmit (e) {
if (this.file) {
this.maskLayerService.sendMessage(true)
if (this.file.size<=5*1024*1024) { //小于5MB
let formData = new FormData()
formData.append("file",this.file)

Loading…
Cancel
Save