Browse Source

[完善]完善油站基本信息

dev
邵佳豪 3 years ago
parent
commit
2bd68434a7
  1. 5
      src/app/pages/home-page/home-page.component.ts
  2. 42
      src/app/pages/oil-station-info/oil-station-info.component.ts
  3. 2
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
  4. 10
      src/app/system-management/organization/organization.component.html

5
src/app/pages/home-page/home-page.component.ts

@ -444,6 +444,11 @@ export class HomePageComponent implements OnInit {
violationType: { violationType: {
violationTypeAgg: [] violationTypeAgg: []
}, },
ouViolationType: {
ouCorrectCount: '',
ouNotCorrectCount: '',
ouTotalCount: ''
},
dev: { dev: {
stationCount: '', stationCount: '',
violationCount: '', violationCount: '',

42
src/app/pages/oil-station-info/oil-station-info.component.ts

@ -85,26 +85,40 @@ export class OilStationInfoComponent implements OnInit {
} }
}).subscribe((data: any) => { }).subscribe((data: any) => {
console.log('油站信息', data) console.log('油站信息', data)
this.httpBody = data.result
if (!data.result.govUnitDetail) {
this.httpBody.govUnitDetail = {
policeStation: {},
hospital: {},
fireBrigade: {}
}
} else {
if (this.httpBody.govUnitDetail) {
this.httpBody = data.result
this.httpBody.govUnitDetail = JSON.parse(data.result.govUnitDetail) this.httpBody.govUnitDetail = JSON.parse(data.result.govUnitDetail)
console.log('走这里了',data.result.govUnitDetail)
this.policeStation = data.result.govUnitDetail.policeStation this.policeStation = data.result.govUnitDetail.policeStation
this.hospital = data.result.govUnitDetail.hospital this.hospital = data.result.govUnitDetail.hospital
this.fireBrigade = data.result.govUnitDetail.fireBrigade this.fireBrigade = data.result.govUnitDetail.fireBrigade
this.httpBody.stationType = String(this.httpBody.stationType)
this.businessLicensevalidityTime[0] = data.result.validityStartTime
this.businessLicensevalidityTime[1] = data.result.validityEndTime
this.businessLicensevalidityTime = [...this.businessLicensevalidityTime]
this.hazardousLicensevalidityTime[0] = data.result.dangerousStartTime
this.hazardousLicensevalidityTime[1] = data.result.dangerousEndTime
this.hazardousLicensevalidityTime = [...this.hazardousLicensevalidityTime]
this.oilLicensevalidityTime[0] = data.result.sellLicenseStartTime
this.oilLicensevalidityTime[1] = data.result.sellLicenseEndTime
this.oilLicensevalidityTime = [...this.oilLicensevalidityTime]
} else {
this.httpBody.id = data.result.id
} }
this.httpBody.stationType = String(this.httpBody.stationType)
this.businessLicensevalidityTime[0] = data.result.validityStartTime
this.businessLicensevalidityTime[1] = data.result.validityEndTime
this.businessLicensevalidityTime = [...this.businessLicensevalidityTime]
this.hazardousLicensevalidityTime[0] = data.result.dangerousStartTime
this.hazardousLicensevalidityTime[1] = data.result.dangerousEndTime
this.hazardousLicensevalidityTime = [...this.hazardousLicensevalidityTime]
this.oilLicensevalidityTime[0] = data.result.sellLicenseStartTime
this.oilLicensevalidityTime[1] = data.result.sellLicenseEndTime
this.oilLicensevalidityTime = [...this.oilLicensevalidityTime]
// if (this.httpBody.govUnitDetail) {
// //
// } else {
// }
setTimeout(() => { setTimeout(() => {
this.gallery = new Viewer(document.getElementById('images'), { this.gallery = new Viewer(document.getElementById('images'), {
show: () => { // 动态加载图片后,更新实例 show: () => { // 动态加载图片后,更新实例

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

@ -81,6 +81,7 @@
<thead> <thead>
<tr> <tr>
<th>名称</th> <th>名称</th>
<th>ip</th>
<th>编号</th> <th>编号</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
@ -88,6 +89,7 @@
<tbody> <tbody>
<tr *ngFor="let data of basicTable2.data"> <tr *ngFor="let data of basicTable2.data">
<td>{{data.name}}</td> <td>{{data.name}}</td>
<td>{{data.ipAdress}}</td>
<td>{{data.code}}</td> <td>{{data.code}}</td>
<td class="operation"> <td class="operation">
<a (click)="editCamera(data)" style="margin-right: 12px;">编辑</a> <a (click)="editCamera(data)" style="margin-right: 12px;">编辑</a>

10
src/app/system-management/organization/organization.component.html

@ -29,7 +29,7 @@
</div> </div>
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="searchValue" #nzTreeComponent [nzData]="nodes" <nz-tree [nzHideUnMatched]='true' [nzSearchValue]="searchValue" #nzTreeComponent [nzData]="nodes"
[nzExpandAll]="nzExpandAll" [nzExpandedKeys]="defaultExpandedKeys" [nzTreeTemplate]="nzTreeTemplate" nzDraggable [nzExpandAll]="nzExpandAll" [nzExpandedKeys]="defaultExpandedKeys" [nzTreeTemplate]="nzTreeTemplate" nzDraggable
nzBlockNode (nzOnDrop)="nzEvent($event)" [nzBeforeDrop]="beforeDrop"> nzBlockNode (nzOnDrop)="nzEvent($event)" [nzBeforeDrop]="beforeDrop" [nzExpandedIcon]="multiExpandedIconTpl">
</nz-tree> </nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin"> <ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="nodebox"> <div class="nodebox">
@ -41,4 +41,12 @@
</span> </span>
</div> </div>
</ng-template> </ng-template>
<ng-template #multiExpandedIconTpl let-node let-origin="origin">
<ng-container *ngIf="node.children.length == 0; else elseTemplate">
</ng-container>
<ng-template #elseTemplate>
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'" class="ant-tree-switcher-line-icon"></i>
</ng-template>
</ng-template>
</div> </div>
Loading…
Cancel
Save