徐振升
5 years ago
10 changed files with 684 additions and 48 deletions
@ -0,0 +1,38 @@
|
||||
<div class="functionalDomainContent"> |
||||
<div mat-dialog-title> |
||||
<label *ngIf="!data.isBuilding">新建平面图</label> |
||||
<label *ngIf="data.isBuilding">新建楼层/区域</label> |
||||
</div> |
||||
|
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
||||
|
||||
<div class="keyMargin"> |
||||
<mat-form-field> |
||||
<input matInput name="name" required ngModel placeholder="名称"> |
||||
</mat-form-field> |
||||
</div> |
||||
|
||||
<div class="keyMargin" *ngIf="data.isBuilding"> |
||||
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox> |
||||
</div> |
||||
|
||||
<div class="keyMargin"> |
||||
<mat-form-field> |
||||
<input matInput name="area" type="number" required ngModel placeholder="面积 (平方米)"> |
||||
</mat-form-field> |
||||
</div> |
||||
|
||||
<div class="keyMargin"> |
||||
<textarea name="details" required ngModel placeholder="详情"></textarea> |
||||
</div> |
||||
|
||||
<div class="submitBottom"> |
||||
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid"> |
||||
确定 |
||||
</button> |
||||
<button mat-raised-button mat-dialog-close>取消</button> |
||||
</div> |
||||
|
||||
</form> |
||||
|
||||
</div> |
@ -0,0 +1,39 @@
|
||||
<div class="functionalDomainContent"> |
||||
1 |
||||
<!-- <div mat-dialog-title> |
||||
<label *ngIf="!data.isBuilding">编辑平面图</label> |
||||
<label *ngIf="data.isBuilding">编辑楼层/区域</label> |
||||
</div> |
||||
|
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
||||
|
||||
<div class="keyMargin"> |
||||
<mat-form-field> |
||||
<input matInput name="name" required ngModel placeholder="名称"> |
||||
</mat-form-field> |
||||
</div> |
||||
|
||||
<div class="keyMargin" *ngIf="data.isBuilding"> |
||||
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox> |
||||
</div> |
||||
|
||||
<div class="keyMargin"> |
||||
<mat-form-field> |
||||
<input matInput name="area" type="number" required ngModel placeholder="面积 (平方米)"> |
||||
</mat-form-field> |
||||
</div> |
||||
|
||||
<div class="keyMargin"> |
||||
<textarea name="details" required ngModel placeholder="详情"></textarea> |
||||
</div> |
||||
|
||||
<div class="submitBottom"> |
||||
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid"> |
||||
确定 |
||||
</button> |
||||
<button mat-raised-button mat-dialog-close>取消</button> |
||||
</div> |
||||
|
||||
</form> --> |
||||
|
||||
</div> |
@ -0,0 +1,73 @@
|
||||
import { Component, OnInit, Inject } from '@angular/core'; |
||||
import { HttpClient, HttpHeaders } from '@angular/common/http'; |
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
||||
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
||||
|
||||
@Component({ |
||||
selector: 'app-leftFunctionalDomain', |
||||
templateUrl: './addPlaneFigure.html', |
||||
styleUrls: ['./panel.scss'] |
||||
}) |
||||
export class leftFunctionalDomainComponent implements OnInit { |
||||
|
||||
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@Inject(MAT_DIALOG_DATA) public data) { } |
||||
|
||||
ngOnInit(): void { |
||||
|
||||
} |
||||
|
||||
checked:boolean = false;//是否为避难层
|
||||
|
||||
//提交表单创建平面图
|
||||
onSubmit (e) { |
||||
if (!this.data.isBuilding) { //总平面图 创建平面图
|
||||
let data = { |
||||
companyId: sessionStorage.getItem('companyId'), |
||||
name: e.name, |
||||
order: this.data.order, |
||||
area:e.area, |
||||
details:e.details, |
||||
enabled: true, |
||||
modifiedTime: new Date(), |
||||
} |
||||
this.http.post('/api/CompanyAccount/SitePlans',data).subscribe(data=>{ |
||||
this.dialogRef.close('总平面图'); |
||||
}) |
||||
} else { //建筑 创建楼层/区域
|
||||
let data = { |
||||
isRefugeStorey: e.isRefugeStorey, |
||||
buildingId: this.data.Panel.id, |
||||
name: e.name, |
||||
order: this.data.order, |
||||
area:e.area, |
||||
details:e.details, |
||||
enabled: true, |
||||
modifiedTime: new Date(), |
||||
} |
||||
this.http.post('/api/CompanyAccount/BuildingAreas',data).subscribe(data=>{ |
||||
this.dialogRef.close('建筑'); |
||||
}) |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
//编辑平面图 楼层/区域
|
||||
@Component({ |
||||
selector: 'app-editPlaneFigure', |
||||
templateUrl: './editPlaneFigure.html', |
||||
styleUrls: ['./panel.scss'] |
||||
}) |
||||
export class editPlaneFigureComponent implements OnInit { |
||||
|
||||
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@Inject(MAT_DIALOG_DATA) public data) { } |
||||
|
||||
ngOnInit(): void { |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,14 @@
|
||||
<div style="position: relative;width: 1400px;height: 800px;line-height: 800px;" class="swiper-container"> |
||||
<div style="position: absolute;right: -2px;top: -392px;cursor: pointer;z-index: 999;width: 24px;height: 24px;" (click)="closeDialog()"> |
||||
<span><mat-icon>clear</mat-icon></span> |
||||
</div> |
||||
|
||||
<div class="swiper-wrapper"> |
||||
<div class="swiper-slide" style="text-align: center;" *ngFor="let img of imagesArr"> |
||||
<img style="max-width: 96%;max-height: 100%;" [src]="img.PropertyValue" alt=""> |
||||
</div> |
||||
</div> |
||||
<!-- 如果需要导航按钮 --> |
||||
<div class="swiper-button-next"></div> |
||||
<div class="swiper-button-prev"></div> |
||||
</div> |
Loading…
Reference in new issue