Browse Source

[完善]修改实景图文件夹bug,linksplan预览三维预案

tangshan
邵佳豪 3 years ago
parent
commit
7257b46b6d
  1. 19
      src/app/external-links-plan/external-links-plan.component.ts
  2. 4
      src/app/key-unit/edit-plan-info/edit-plan-info.component.html
  3. 47
      src/app/key-unit/realistic-picture/realistic-picture.component.ts
  4. 4
      src/app/key-unit/view-unit-details/view-unit-details.component.html
  5. 2
      src/app/ui/collection-tools-building/collection-tools.component.ts
  6. 1
      src/app/ui/collection-tools-building/panel.scss
  7. 4
      src/app/ui/collection-tools-plan/addPlaneFigure.html
  8. 3
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  9. 1
      src/app/ui/collection-tools-plan/panel.scss
  10. 2
      src/app/ui/collection-tools/collection-tools.component.ts

19
src/app/external-links-plan/external-links-plan.component.ts

@ -110,8 +110,25 @@ export class ExternalLinksPlanComponent implements OnInit {
// this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data.url)
// this.showType = 2
// })
window.location.href = `${data.url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`
let localhostPath = window.document.location.href.substring( 0, window.document.location.href.indexOf(window.document.location.pathname))
//localhostPath : http://39.106.78.171:8000/
let url = data.url
if(url.indexOf(localhostPath) != -1){
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`
}else{
// let substr = url.split('/').splice(3,url.split('/').length)
// let port = url.split(':')[2]
// if(port.indexOf('/') != -1){
// port = port.split('/')[0]
// }
// let ip = localhostPath.split(':')
// ip.pop()
// let newurl = ip.join(':') + ":" + port + "/" + substr.join('/');
// // console.log('xxx',newurl)
// window.location.href = `${newurl}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`
}
}
}
}

4
src/app/key-unit/edit-plan-info/edit-plan-info.component.html

@ -5,8 +5,8 @@
<label class="scorePrompt" *ngIf="selected.value == 3">*总平面图模块标注完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 4 || selected.value == 5">*层平面图模块标注完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 6">*填写2条以上可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 9">*外观,室内,安全出口各上传2张图片可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 10">*上传2张CAD图片可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 9">*重点部位、安全出口、外观各自不低于两张图片方可满分</label>
<label class="scorePrompt" *ngIf="selected.value == 10">*保证至少有一个文件可得满分</label>
</div>
<mat-tab-group style="height: 100%;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">

47
src/app/key-unit/realistic-picture/realistic-picture.component.ts

@ -79,6 +79,17 @@ export class RealisticPictureComponent implements OnInit {
}
}).subscribe((data: any) => {
this.allRealPicture = data
this.allRealPicture.unshift({
companyId: sessionStorage.getItem('companyId'),
id: '重点部位',
name: "重点部位",
realityImages: null
}, {
companyId: sessionStorage.getItem('companyId'),
id: '安全出口',
name: "安全出口",
realityImages: null
})
this.selectReal = data[this.selectRealIndex]
})
}
@ -93,7 +104,7 @@ export class RealisticPictureComponent implements OnInit {
pageSize: this.pageSize,
}
this.http.get('/api/CompanySafetyExits/GetCompanySafetyExitImages', { params: params }).subscribe((data: any) => {
console.log('当前单位安全出口', data)
// console.log('当前单位安全出口', data)
this.allImages = data.items
this.length = data.totalCount
this.pageSize = this.pageSize
@ -220,6 +231,17 @@ export class RealisticPictureComponent implements OnInit {
}
}).subscribe((data: any) => {
this.allRealPicture = data
this.allRealPicture.unshift({
companyId: sessionStorage.getItem('companyId'),
id: '重点部位',
name: "重点部位",
realityImages: null
}, {
companyId: sessionStorage.getItem('companyId'),
id: '安全出口',
name: "安全出口",
realityImages: null
})
this.selectReal = data[this.selectRealIndex]
this.allImages = []
this.getAllRealPicture()
@ -522,7 +544,7 @@ export class previewImg {
})
export class addRealPicture {
constructor(private router: Router, private route: ActivatedRoute, private http: HttpClient, public dialog: MatDialog, public dialogRef: MatDialogRef<addRealPicture>) { }
constructor(private router: Router, private route: ActivatedRoute, private http: HttpClient, public dialog: MatDialog, public dialogRef: MatDialogRef<addRealPicture>, public snackBar: MatSnackBar) { }
ngOnInit(): void {
this.companyId = sessionStorage.getItem('companyId')
@ -537,9 +559,16 @@ export class addRealPicture {
name: e.name,
companyId: companyId
}
this.http.post('/api/RealityImageGroups', data).subscribe(data => {
this.dialogRef.close(data);
})
if(e.name == '安全出口' || e.name == '重点部位'){
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('不允许创建名为安全出口或者重点部位的文件夹', '确定', config);
}else{
this.http.post('/api/RealityImageGroups', data).subscribe(data => {
this.dialogRef.close(data);
})
}
}
}
@ -555,7 +584,7 @@ export class addRealPicture {
export class editRealPicture {
constructor(private router: Router, private route: ActivatedRoute, private http: HttpClient, public dialog: MatDialog, public dialogRef: MatDialogRef<editRealPicture>,
@Inject(MAT_DIALOG_DATA) public data) { }
@Inject(MAT_DIALOG_DATA) public data, public snackBar: MatSnackBar) { }
ngOnInit(): void {
this.name = this.data.name
@ -571,6 +600,12 @@ export class editRealPicture {
name: e.name,
companyId: companyId
}
if(e.name == '安全出口' || e.name == '重点部位'){
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('文件名不允许为安全出口或者重点部位', '确定', config);
}else
this.http.put(`/api/RealityImageGroups/${this.data.id}`, data).subscribe(data => {
this.dialogRef.close('success');
})

4
src/app/key-unit/view-unit-details/view-unit-details.component.html

@ -5,8 +5,8 @@
<label class="scorePrompt" *ngIf="selected.value == 3">*总平面图模块标注完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 4 || selected.value == 5">*层平面图模块标注完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 6">*填写2条以上可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 9">*外观,室内,安全出口各上传2张图片可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 10">*上传2张CAD图片可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 9">*重点部位、安全出口、外观各自不低于两张图片方可满分</label>
<label class="scorePrompt" *ngIf="selected.value == 10">*保证至少有一个文件可得满分</label>
</div>
<mat-tab-group style="height:100%;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="1.基本信息">

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

@ -851,7 +851,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
isShowLegend: boolean = true; //图例是否显示
changeLegend(e) { this.canvasData.selectPanelPoint.BackgroundImageUrl ? null : this.canvas.setLegendVisible(this.isShowLegend) }
basicInfo: boolean = true //基本信息名称显隐
basicInfo: boolean = false //基本信息名称显隐
wantToWork: boolean = true //想定作业名称显隐
//点击基本信息名称
basicInfoClick() {

1
src/app/ui/collection-tools-building/panel.scss

@ -47,6 +47,7 @@
.mat-icon {
font-size: 20px;
}
overflow: hidden;
}
//火源/力量 图标

4
src/app/ui/collection-tools-plan/addPlaneFigure.html

@ -12,9 +12,9 @@
</mat-form-field>
</div>
<!-- <div class="keyMargin">
<div class="keyMargin">
<a href="javascript:;" class="uploadBackGround" (click)='toGIS()' [ngClass]="{'uploadBackGroundSelected': selectedType == 'gis'}">导入GIS地图</a>
</div> -->
</div>
<div class="keyMargin">
<a href="javascript:;" class="uploadBackGround" [ngClass]="{'uploadBackGroundSelected': selectedType == 'image'}">

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

@ -490,7 +490,6 @@ export class CollectionToolsPlanComponent implements OnInit {
multipleAssetData: any//当前多选的素材
firstMultipleAssetData: any//当前多选的第一个素材
ngOnInit(): void {
let _this = this
AxMessageSystem.addListener('selectionChanged', () => {
if (this.canvas.selection.size() == 1) {//如果是单选
@ -762,7 +761,7 @@ export class CollectionToolsPlanComponent implements OnInit {
isShowLegend: boolean = true; //图例是否显示
changeLegend(e) { this.canvasData.selectPanelPoint.BackgroundImageUrl ? null : this.canvas.setLegendVisible(this.isShowLegend) }
basicInfo: boolean = true //基本信息名称显隐
basicInfo: boolean = false //基本信息名称显隐
wantToWork: boolean = true //想定作业名称显隐
//点击基本信息名称
basicInfoClick() {

1
src/app/ui/collection-tools-plan/panel.scss

@ -48,6 +48,7 @@
.mat-icon {
font-size: 20px;
}
overflow: hidden;
}
//火源/力量 图标

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

@ -178,7 +178,7 @@ export class CollectionToolsComponent implements OnInit {
//基本信息编辑模式
baseInfo() {
if (!this.pattern) {
this.basicInfo = true
this.basicInfo = false
this.canvas.setNameVisible(this.basicInfo, 1)
this.pattern = true

Loading…
Cancel
Save