|
|
|
@ -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) |
|
|
|
|