刘向辉 3 years ago
parent
commit
34c086b928
  1. 4
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
  2. 12
      src/app/pages/criminal-records-admin/criminal-records-admin.component.html
  3. 57
      src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
  4. 4
      src/app/pages/criminal-records/criminal-records.component.html
  5. 56
      src/app/pages/criminal-records/criminal-records.component.ts
  6. 22
      src/app/pages/equipment-info/equipment-info.component.ts
  7. 9
      src/app/pages/init3D.guard.ts
  8. 48
      src/app/pages/left-domain/left-domain.component.html
  9. 10
      src/app/pages/left-domain/left-domain.component.ts
  10. 9
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts
  11. 1
      src/app/pages/plan-admin/plan-admin.component.ts
  12. 12
      src/app/pages/plan/plan.component.html
  13. 6
      src/app/pages/plan/plan.component.scss
  14. 21
      src/app/pages/plan/plan.component.ts
  15. 6
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
  16. 69
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
  17. 19
      src/app/system-management/analysis-of-the-host/editcamera/editcamera.component.html
  18. 15
      src/app/system-management/analysis-of-the-host/editcamera/editcamera.component.ts
  19. BIN
      src/assets/images/save3DPlan.png

4
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -164,9 +164,9 @@ export class FacilityInfoInSceneWindow extends UIBase {
}
} else { // 单选
if (isChecked) { //选中
this.three.selectProperty(facilityInfoUIItem[0])
this.three.selectProperty(facilityInfoUIItem[0])
} else { //取消选中
this.three.isShowNature = false
}
}

12
src/app/pages/criminal-records-admin/criminal-records-admin.component.html

@ -115,7 +115,7 @@
<div nz-col nzSpan="2">
预警级别
</div>
<div nz-col nzSpan="3">
<div nz-col nzSpan="2">
预警类型
</div>
<div nz-col nzSpan="3">
@ -139,7 +139,7 @@
<div nz-col nzSpan="2">
状态
</div>
<div nz-col nzSpan="1">
<div nz-col nzSpan="2">
操作
</div>
</div>
@ -161,7 +161,7 @@
<span *ngIf="item.violation.level == 3">Ⅲ级</span>
<span *ngIf="item.violation.level == 4">Ⅳ级</span>
</div>
<div nz-col nzSpan="3">
<div nz-col nzSpan="2">
{{item.violation.violationType}}
</div>
<div nz-col nzSpan="3">
@ -186,8 +186,10 @@
<span *ngIf="item.handleTime">已处置</span>
<span *ngIf="!item.handleTime" style="color: #FF4B65;">未处置</span>
</div>
<div nz-col nzSpan="1">
<span class="look" (click)="look(item)">查看</span>
<div nz-col nzSpan="2">
<span class="look" (click)="look(item)" style="margin-right: 12px;">查看</span>
<span *ngIf="!item.handleTime" style="color: #36A2FF;cursor: pointer;" (click)="dispose(item)">处置</span>
<span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span>
</div>
</div>
</div>

57
src/app/pages/criminal-records-admin/criminal-records-admin.component.ts

@ -11,6 +11,8 @@ import * as moment from 'moment';
import { NzModalService } from 'ng-zorro-antd/modal';
import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component';
import { OilUnloadingProcessComponent } from '../oil-unloading-process/oil-unloading-process.component';
import { DispositionComponent } from '../disposition/disposition.component';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
selector: 'app-criminal-records-admin',
templateUrl: './criminal-records-admin.component.html',
@ -19,7 +21,7 @@ import { OilUnloadingProcessComponent } from '../oil-unloading-process/oil-unloa
export class CriminalRecordsAdminComponent implements OnInit {
validateForm!: FormGroup;
constructor(private element: ElementRef, private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { }
constructor(private element: ElementRef, private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { }
//饼图
myChart
option = {
@ -33,7 +35,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
type: 'pie',
radius: [88, 116],//内半径外,外半径
left: '0',
top:'8%',
top: '8%',
avoidLabelOverlap: false,//防止标签重叠策略
label: {//每一个标签外网延伸的引导说明
show: false,
@ -427,6 +429,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
this.totalCount = data.result.totalCount
console.log('违规记录列表', data)
this.getAggregations()
console.log(this.list.length)
})
}
@ -435,9 +438,11 @@ export class CriminalRecordsAdminComponent implements OnInit {
ngAfterViewInit(): void {
fromEvent(this.element.nativeElement.querySelector(`#tbody`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
this.getViolateRecordList()
if(this.totalCount > this.list.length){
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
this.getViolateRecordList()
}
}
});
}
@ -579,7 +584,47 @@ export class CriminalRecordsAdminComponent implements OnInit {
//跳转卸油统计页面
goOilList(){
goOilList() {
this.router.navigate(['/records/oliunloadinglist'])
}
dispose(item) {
console.log(item)
const modal = this.modal.create({
nzContent: DispositionComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 380,
nzBodyStyle: {
'border': '1px solid #91CCFF',
'border-radius': '0px',
'padding': '7px',
'box-shadow': '0 0 8px 0 #fff',
'background-image': 'linear-gradient(#003665, #000f25)'
},
nzComponentParams: {},
nzFooter: null,
nzClosable: false,
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
let body = {
id: item.id,
handleRecord: instance.validateForm.value.content
}
this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
resolve(data)
this.message.create('success', '处置成功!');
item.handleTime = new Date()
return true
})
})
} else {
this.message.create('warning', '请填写完整!');
return false
}
},
});
const instance = modal.getContentComponent();
}
}

4
src/app/pages/criminal-records/criminal-records.component.html

@ -168,7 +168,9 @@
<span *ngIf="!item.handleTime" style="color: #FF4B65;">未处置</span>
</div>
<div nz-col nzSpan="2">
<span class="look" (click)="look(item)">查看</span>
<span class="look" (click)="look(item)" style="margin-right: 12px;">查看</span>
<span *ngIf="!item.handleTime" style="color: #36A2FF;cursor: pointer;" (click)="dispose(item)">处置</span>
<span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span>
</div>
</div>
</div>

56
src/app/pages/criminal-records/criminal-records.component.ts

@ -8,6 +8,8 @@ import * as moment from 'moment';
import { fromEvent } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
import { Router } from '@angular/router';
import { DispositionComponent } from '../disposition/disposition.component';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
selector: 'app-criminal-records',
templateUrl: './criminal-records.component.html',
@ -15,7 +17,7 @@ import { Router } from '@angular/router';
})
export class CriminalRecordsComponent implements OnInit {
validateForm!: FormGroup;
constructor(private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef) { }
constructor(private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private message: NzMessageService) { }
myChart: any //左侧饼图
option = {
@ -29,7 +31,7 @@ export class CriminalRecordsComponent implements OnInit {
type: 'pie',
radius: [88, 116],//内半径外,外半径
left: '0',
top:'8%',
top: '8%',
avoidLabelOverlap: false,//防止标签重叠策略
label: {//每一个标签外网延伸的引导说明
show: false,
@ -323,7 +325,7 @@ export class CriminalRecordsComponent implements OnInit {
this.getViolateRecordList()
}
//刷新饼图图表数据
num
@ -440,9 +442,11 @@ export class CriminalRecordsComponent implements OnInit {
ngAfterViewInit(): void {
fromEvent(this.element.nativeElement.querySelector(`#tbody`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
this.getViolateRecordList()
if(this.totalCount > this.list.length){
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
this.getViolateRecordList()
}
}
});
}
@ -528,7 +532,45 @@ export class CriminalRecordsComponent implements OnInit {
}
goOilList(){
goOilList() {
this.router.navigate(['/records/petrolStation/oliunloadinglist'])
}
dispose(item) {
console.log(item)
const modal = this.modal.create({
nzContent: DispositionComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 380,
nzBodyStyle: {
'border': '1px solid #91CCFF',
'border-radius': '0px',
'padding': '7px',
'box-shadow': '0 0 8px 0 #fff',
'background-image': 'linear-gradient(#003665, #000f25)'
},
nzComponentParams: {},
nzFooter: null,
nzClosable: false,
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
let body = {
id: item.id,
handleRecord: instance.validateForm.value.content
}
this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
resolve(data)
this.message.create('success', '处置成功!');
item.handleTime = new Date()
return true
})
})
} else {
this.message.create('warning', '请填写完整!');
return false
}
},
});
const instance = modal.getContentComponent();
}
}

22
src/app/pages/equipment-info/equipment-info.component.ts

@ -6,6 +6,7 @@ import { AddequipmentComponent } from './addequipment/addequipment.component';
import { HttpClient } from '@angular/common/http';
import { EditequipmentComponent } from './editequipment/editequipment.component';
import { Router, ActivatedRoute } from '@angular/router'
import * as moment from 'moment';
@Component({
selector: 'app-equipment-info',
templateUrl: './equipment-info.component.html',
@ -13,7 +14,7 @@ import { Router, ActivatedRoute } from '@angular/router'
})
export class EquipmentInfoComponent implements OnInit {
validateForm!: FormGroup;
constructor(private router: Router,private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
constructor(private router: Router, private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
arr = []
ngOnInit(): void {
this.validateForm = this.fb.group({
@ -29,7 +30,7 @@ export class EquipmentInfoComponent implements OnInit {
getEquipment() {
this.http.get('/api/services/app/FireEquipment/GetAll', {
params: {
Name:this.validateForm.value.search ? this.validateForm.value.search : '',
Name: this.validateForm.value.search ? this.validateForm.value.search : '',
organizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id,
SkipCount: String(this.SkipCount),
MaxResultCount: String(this.MaxResultCount)
@ -73,9 +74,9 @@ export class EquipmentInfoComponent implements OnInit {
let body = {
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: instance.validateForm.value.prodtime,
purchaseDate: instance.validateForm.value.buytime,
validityEndTime: instance.validateForm.value.validitytime,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
organizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id
}
this.http.post('/api/services/app/FireEquipment/Create', body).subscribe(data => {
@ -94,9 +95,8 @@ export class EquipmentInfoComponent implements OnInit {
const instance = modal.getContentComponent();
}
edit(item) {
console.log(item)
console.log('xxxxx',item)
const modal = this.modal.create({
// nzTitle: '新增角色',
nzContent: EditequipmentComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 380,
@ -119,9 +119,9 @@ export class EquipmentInfoComponent implements OnInit {
id: item.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: instance.validateForm.value.prodtime,
purchaseDate: instance.validateForm.value.buytime,
validityEndTime: instance.validateForm.value.validitytime,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
organizationUnitId: item.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe(data => {
@ -161,7 +161,7 @@ export class EquipmentInfoComponent implements OnInit {
});
}
goback(){
goback() {
this.router.navigate(['/warning/petrolStation'])
}
}

9
src/app/pages/init3D.guard.ts

@ -16,15 +16,6 @@ export class init3DGuard implements CanActivate {
canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot,): Promise<boolean> {
return this.getGasStationBaseInfo().then((res: any) => {
sessionStorage.setItem("3dSceneData", JSON.stringify(res))
if (true) //是superadmin,是内部制作账号
{
ModeManager.s_isMakeMode = true;
}
else {
ModeManager.s_isMakeMode = true;
}
let isMakeMode = ModeManager.s_isMakeMode
if (isMakeMode || res.hasBuildingInfo) {
return true

48
src/app/pages/left-domain/left-domain.component.html

@ -48,7 +48,7 @@
<!-- 加油机 -->
<div class="publicBox refueller" *ngIf="beforeFence === 1">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table">
<div class="tableHeader">
<p>品牌</p>
@ -57,10 +57,10 @@
<p>油泵类型</p>
</div>
<div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().brand"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNum"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p style="padding-left: 8px;">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().brand" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNum" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p>
<p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilPumpType">
<nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option>
<nz-option nzValue="qyb" nzLabel="潜油泵"></nz-option>
@ -74,7 +74,7 @@
<!-- 油罐设备 -->
<div class="publicBox refueller" *ngIf="beforeFence === 2">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table">
<div class="tableHeader">
<p>油品品号</p>
@ -85,12 +85,12 @@
<p>油罐类型</p>
</div>
<div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().quantity"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().tankFarm"></p>
<p style="padding-left: 8px;">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankVolume" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().quantity" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().tankFarm" (click)="stopBubbling($event)"></p>
<p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankType">
<nz-option nzValue="scg" nzLabel="双层罐"></nz-option>
<nz-option nzValue="dcg" nzLabel="单层罐+防渗罐池"></nz-option>
@ -112,25 +112,25 @@
<!-- 输油管线 -->
<div class="publicBox refueller" *ngIf="beforeFence === 5">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table">
<div class="tableHeader" style="flex: 50%;">
<p>连接的加油机</p>
<p>连接的油罐</p>
</div>
<div class="tableContent" style="flex: 50%;">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkJYJ"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkYG"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkJYJ" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkYG" (click)="stopBubbling($event)"></p>
</div>
</div>
<div class="propertyImage" id="pipelineViewer{{item.getID()}}">
<p class="imgTitle">设计图纸</p>
<img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img">
<div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img">
<img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img" (click)="stopBubbling($event)">
<div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img" (click)="stopBubbling($event)">
<a href="javascript:;" class="imgAndVideoUpload"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="upload" nzTheme="outline"></i></a>
<i nz-icon nzType="delete" nzTheme="outline" (click)="deleteImg(item)"></i>
</div>
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a>
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img" (click)="stopBubbling($event)"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a>
</div>
</div>
</div>
@ -138,30 +138,30 @@
<!-- 油气回收 -->
<div class="publicBox refueller" *ngIf="beforeFence === 6">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table">
<div class="tableHeader" style="flex: 55%;">
<p>油气回收系统类型</p>
<p>油气回收泵类型</p>
</div>
<div class="tableContent" style="flex: 45%;">
<p style="padding-left: 8px;">
<p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUType">
<nz-option nzValue="fss" nzLabel="分散式"></nz-option>
<nz-option nzValue="jzs" nzLabel="集中式"></nz-option>
</nz-select>
</p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUPumpType"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUPumpType" (click)="stopBubbling($event)"></p>
</div>
</div>
<div class="propertyImage" id="orvrViewer{{item.getID()}}">
<p class="imgTitle">设计图纸</p>
<img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img">
<div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img">
<img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img" (click)="stopBubbling($event)">
<div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img" (click)="stopBubbling($event)">
<a href="javascript:;" class="imgAndVideoUpload"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="upload" nzTheme="outline"></i></a>
<i nz-icon nzType="delete" nzTheme="outline" (click)="deleteImg(item)"></i>
</div>
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a>
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img" (click)="stopBubbling($event)"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a>
</div>
</div>
</div>

10
src/app/pages/left-domain/left-domain.component.ts

@ -101,8 +101,6 @@ export class LeftDomainComponent implements OnInit {
//选中 设备
selectFacility(event, item: FacilityInfoUIItem) {
event.stopPropagation();
event.preventDefault();
if (this.selectFacilityId != item.getID()) {
this.selectFacilityId = item.getID()
FacilityInfoInSceneWindow.instance.selectFacilityItem(item);
@ -112,6 +110,12 @@ export class LeftDomainComponent implements OnInit {
}
}
//阻止 事件冒泡
stopBubbling(event) {
event.stopPropagation();
//event.preventDefault();
}
//上传设备 图片
uploadLeftDomainImg(e, item: FacilityInfoUIItem) {
if (e.target.files.length) {
@ -122,7 +126,7 @@ export class LeftDomainComponent implements OnInit {
return
}
PlanComponent.instance.isShowLoading = true //打开遮罩
let institutionKey = sessionStorage.getItem('unitId') || "ceshi"; //单位id
let institutionKey = PlanComponent.instance.companyData.id || "ceshi"; //单位id
let buildingKey = PlanComponent.instance.buildingUIItems.find(item => { return item.getBuildingID() == PlanComponent.instance.beforeOneBuildingID })
let url = DataManager.getResPath_facilityProperty(institutionKey, buildingKey.getBuildingID(), item.getType(), item.getID(), null)
ServeManager.instance.openFileSelect(file, url, (name: string, path: string) => { //上传

9
src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts

@ -574,9 +574,12 @@ export class OilUnloadingProcessListComponent implements OnInit {
ngAfterViewInit(): void {
fromEvent(this.element.nativeElement.querySelector(`#tbody`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
this.getViolateRecordList()
if (this.totalCount > this.list.length) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
this.getViolateRecordList()
}
}
});
}

1
src/app/pages/plan-admin/plan-admin.component.ts

@ -33,7 +33,6 @@ export class PlanAdminComponent implements OnInit {
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
// await this.getGasStation()
let params = {
StationName: this.validateForm.value.name,
OrganizationUnitId: String(this.OrganizationUnitId),

12
src/app/pages/plan/plan.component.html

@ -19,6 +19,7 @@
<img src="../../../assets/images/selectHeightFinding.png" title="测量高度" [hidden]="selectMeasure != 2" (click)="toggleMeasure(2)">
<img src="../../../assets/images/measuredArea.png" title="测量面积" [hidden]="selectMeasure === 3" (click)="toggleMeasure(3)">
<img src="../../../assets/images/selectMeasuredArea.png" title="测量面积" [hidden]="selectMeasure != 3" (click)="toggleMeasure(3)">
<img src="../../../assets/images/save3DPlan.png" title="保存" (click)="preserve(true)">
</div>
</div>
@ -132,21 +133,20 @@
<!-- 右侧图标栏 -->
<!-- 右上角快捷栏 -->
<div class="rightTopFast">
<div class="publicFast leftFunction" *ngIf="editMode && userMode">
<div class="rightTopFast" *ngIf="editMode && userMode">
<div class="publicFast leftFunction">
<button title="获取设备" (click)="getDevice()"></button>
<button title="清空设备" (click)="clearDevice()"></button>
</div>
<div class="publicFast leftFast" *ngIf="editMode && selectFence === 7">
<div class="publicFast leftFast">
<button title="平移" (click)="translation()" [ngClass]="{'selectRightTopFast': selectRightTopFast == 0}"></button>
<button title="旋转" (click)="revolve()" [ngClass]="{'selectRightTopFast': selectRightTopFast == 1}"></button>
<button title="缩放" (click)="scale()" [ngClass]="{'selectRightTopFast': selectRightTopFast == 2}"></button>
<!-- <button title="吸附" (click)="adsorb()" [ngClass]="{'leftFastIsTure': selectAdsorb }"></button>
<button title="切换至顶视图" (click)="toggleTopLevelView()" [ngClass]="{'leftFastIsTure': topLevelView }"></button> -->
</div>
<div class="save" *ngIf="editMode">
<button (click)="preserve(false)" title="保存模块" *ngIf="userMode"><i nz-icon nzType="file-done" nzTheme="outline"></i></button>
<img src="../../../assets/images/save3DPlan.png" (click)="preserve(true)" title="保存">
<div class="save">
<button (click)="preserve(false)" title="保存模块"><i nz-icon nzType="file-done" nzTheme="outline"></i></button>
</div>
</div>
<!-- 右上角快捷栏 -->

6
src/app/pages/plan/plan.component.scss

@ -55,7 +55,7 @@
position: absolute;
top: 0px;
right: 0px;
width: 200px;
width: 230px;
height: 50px;
line-height: 50px;
img { cursor: pointer; box-sizing: border-box; width: 36px; height: 36px; margin-left: 10px; }
@ -258,13 +258,11 @@
overflow-y: auto;
.everyIcon {
width: 60px;
height: 58px;
line-height: normal;
text-align: center;
display: inline-block;
overflow: hidden;
img { width: 40px; height: 40px; margin-top: 3px; cursor: pointer; }
p { height: 18px; line-height: 18px; margin-top: -3px; font-size: 12px; }
p { margin-bottom: 3px; font-size: 12px; word-break: break-all; }
}
}
.selectLeftIcon { background: rgb(0,128,255,0.5); } //选中样式

21
src/app/pages/plan/plan.component.ts

@ -50,7 +50,7 @@ export class PlanComponent implements OnInit {
public beforeOneSatus; //当前 satus
public canvas: HTMLCanvasElement; //canvas 实例
public editMode: boolean = true; //编辑/查看 模式
public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限
public userMode: boolean = false; //是否为 内部权限
public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名
public isShowLoading: boolean = true; //显隐 loading加载条
public companyData: any; //当前加油站所属组织机构 data
@ -63,7 +63,6 @@ export class PlanComponent implements OnInit {
ServeManager.Init(this.buildingBISrv, this.objectsSrv);
this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement;
this.game.init(this.canvas);
this.companyData = (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization || {}
let editMode = sessionStorage.getItem('isGasStation')
if (editMode == 'false') {
@ -73,7 +72,14 @@ export class PlanComponent implements OnInit {
this.editMode = false
ModeManager.currentMode = ModeType.Look
}
let userdata = JSON.parse(sessionStorage.getItem('userdata'))
if (userdata.userName == 'superadmin') { //是superadmin,是内部制作账号
this.userMode = true
ModeManager.s_isMakeMode = true;
} else {
this.userMode = false
ModeManager.s_isMakeMode = false;
}
//监听 delete键盘事件
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
if (event.keyCode == 46) { //delete
@ -110,6 +116,8 @@ export class PlanComponent implements OnInit {
let name = simpleData.name;
let id = simpleData.id;// 单位id
loginStatus.createInsitution(simpleData.key, name, id);
} else {
history.back(); //回退上一步路由
}
}
else //非内部制作模式,不开启
@ -434,7 +442,7 @@ export class PlanComponent implements OnInit {
return
}
this.isShowLoading = true //打开遮罩
let institutionKey = sessionStorage.getItem('unitId') || "ceshi"; //单位id
let institutionKey = this.companyData.id || "ceshi"; //单位id
let buildingKey = this.buildingUIItems.find(item => { return item.getBuildingID() == this.beforeOneBuildingID })
let facility = this.beforeOnePropertyData
let url = DataManager.getResPath_facilityProperty(institutionKey, buildingKey.getBuildingID(), facility.getType(), facility.getID(), null)
@ -695,16 +703,13 @@ export class PlanComponent implements OnInit {
return
}
this.isShowLoading = true //打开遮罩
let institutionKey = sessionStorage.getItem('unitId') || "ceshi"; //单位id
let institutionKey = this.companyData.id || "ceshi"; //单位id
let resType = isVideo ? ResType.Video : ResType.Texture
let key = `${(new Date()).getMonth() + 1}-${(new Date()).getDate()}-${(new Date()).getHours()}`
let url = DataManager.getResPath_mark(institutionKey, resType, key) //url
ServeManager.instance.openFileSelect(file, url, (name: string, path: string) => { //上传
if (!isVideo) { //img
this.beforePlanNode.texture = ObjectsService.getFullPath(path + name)
console.log("上传图片保存数据", this.beforePlanNode);
this.initViewer()
} else { //video
this.beforePlanNode.video = ObjectsService.getFullPath(path + name)

6
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html

@ -66,7 +66,7 @@
</tbody>
</nz-table>
</div>
<!-- <div class="topbox">
<div class="topbox" style="margin-top: 20px;">
<div class="lefttop">
<span>{{selectedOilStation ? selectedOilStation.displayName : '加油站'}} 摄像头列表
</span>
@ -90,12 +90,12 @@
<td>{{data.name}}</td>
<td>{{data.code}}</td>
<td class="operation">
<a (click)="editCamera(data)">编辑</a>
<a (click)="editCamera(data)" style="margin-right: 12px;">编辑</a>
<a (click)="deleteCamera(data)">删除</a>
</td>
</tr>
</tbody>
</nz-table>
</div> -->
</div>
</div>
</div>

69
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts

@ -8,6 +8,7 @@ import { NzMessageService } from 'ng-zorro-antd/message';
import { AddhostComponent } from './addhost/addhost.component';
import { AddcameraComponent } from './addcamera/addcamera.component';
import { EdithostComponent } from './edithost/edithost.component';
import { EditcameraComponent } from './editcamera/editcamera.component';
@Component({
selector: 'app-analysis-of-the-host',
templateUrl: './analysis-of-the-host.component.html',
@ -60,6 +61,7 @@ export class AnalysisOfTheHostComponent implements OnInit {
this.nzSelectedKeys = [...this.nzSelectedKeys]
this.selectedOilStation = event.node.origin
this.getHost()
this.getCamera()
} else {
this.message.info('只有加油站才可以增加主机');
}
@ -88,7 +90,7 @@ export class AnalysisOfTheHostComponent implements OnInit {
}
}).subscribe((data: any) => {
console.log('摄像头列表', data)
this.listOfDataCamera = data
this.listOfDataCamera = data.result.items
})
}
@ -144,12 +146,12 @@ export class AnalysisOfTheHostComponent implements OnInit {
await new Promise(resolve => {
console.log('表单信息', instance.validateForm)
data.hostIPAddress = instance.validateForm.value.ip,
this.http.put('/api/services/app/EdgeDevice/Update', data).subscribe(data => {
resolve(data)
this.message.create('success', '修改成功!');
this.getHost()
return true
})
this.http.put('/api/services/app/EdgeDevice/Update', data).subscribe(data => {
resolve(data)
this.message.create('success', '修改成功!');
this.getHost()
return true
})
})
} else {
this.message.create('warning', '请填写完整!');
@ -197,7 +199,7 @@ export class AnalysisOfTheHostComponent implements OnInit {
organizationUnitId: this.selectedOilStation.id,
code: instance.validateForm.value.code,
name: instance.validateForm.value.name,
description: "",
// description: "",
}
this.http.post('/api/services/app/Camera/Create', body).subscribe(data => {
resolve(data)
@ -218,8 +220,55 @@ export class AnalysisOfTheHostComponent implements OnInit {
}
editCamera(data) {
console.log(data)
const modal = this.modal.create({
nzTitle: '编辑加油站摄像头',
nzContent: EditcameraComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 288,
nzComponentParams: {
data: data
},
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
console.log('表单信息', instance.validateForm)
data.name = instance.validateForm.value.name
data.code = instance.validateForm.value.code
this.http.put('/api/services/app/Camera/Update', data).subscribe(data => {
resolve(data)
this.message.create('success', '编辑成功!');
this.getCamera()
return true
}, err => {
return false
})
})
} else {
this.message.create('warning', '请填写完整!');
return false
}
}
});
const instance = modal.getContentComponent();
}
deleteCamera(data) {
deleteCamera(item) {
console.log(item)
this.modal.confirm({
nzTitle: `确定要删除${item.name}这个摄像头吗?`,
nzOkText: '确定',
nzOkType: 'danger',
nzOnOk: () => {
this.http.delete('/api/services/app/Camera/Delete', {
params: {
Id: item.id
}
}).subscribe(data => {
this.message.create('success', '删除成功!');
this.getCamera()
})
},
nzCancelText: '取消'
});
}
}

19
src/app/system-management/analysis-of-the-host/editcamera/editcamera.component.html

@ -1 +1,18 @@
<p>editcamera works!</p>
<div class="box">
<form nz-form [formGroup]="validateForm">
<nz-form-item>
<nz-form-control>
<nz-input-group>
<input nz-input type="text" formControlName="name" placeholder="请输入名称" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-control>
<nz-input-group>
<input nz-input type="text" formControlName="code" placeholder="请输入编号" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
</form>
</div>

15
src/app/system-management/analysis-of-the-host/editcamera/editcamera.component.ts

@ -1,4 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, Input } from '@angular/core';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-editcamera',
@ -6,10 +9,16 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./editcamera.component.scss']
})
export class EditcameraComponent implements OnInit {
constructor() { }
@Input() data: any
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
ngOnInit(): void {
let datacopy = JSON.parse(JSON.stringify(this.data))
this.validateForm = this.fb.group({
name: [datacopy.name, [Validators.required]],
code: [datacopy.code, [Validators.required]]
});
}
}

BIN
src/assets/images/save3DPlan.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Loading…
Cancel
Save