刘向辉 3 years ago
parent
commit
bb21d18699
  1. 5
      src/app/pages/home-page/home-page.component.ts
  2. 44
      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. 12
      src/app/system-management/organization/organization.component.html
  5. 2
      src/app/system-management/organization/organization.component.ts
  6. 4
      src/app/system-management/user/user.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: '',

44
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 (this.httpBody.govUnitDetail) { if (!data.result.govUnitDetail) {
this.httpBody = data.result this.httpBody.govUnitDetail = {
policeStation: {},
hospital: {},
fireBrigade: {}
}
} else {
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>

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

@ -29,16 +29,24 @@
</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">
<span class="name">{{ node.title }}</span> <span class="name">{{ node.title }}</span>
<span class="operation"> <span class="operation">
<span (click)="addOr(node)">新增</span> <span (click)="addOr(node)" *ngIf="!node.origin.isGasStation">新增</span>
<span (click)="editOr(node)">编辑</span> <span (click)="editOr(node)">编辑</span>
<span (click)="deleteOr(node)">删除</span> <span (click)="deleteOr(node)">删除</span>
</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>

2
src/app/system-management/organization/organization.component.ts

@ -70,7 +70,7 @@ export class OrganizationComponent implements OnInit {
addOr(node?: any) { addOr(node?: any) {
// console.log(node) console.log(node)
const modal = this.modal.create({ const modal = this.modal.create({
nzTitle: node ? '新增组织机构' : '新增一级组织机构', nzTitle: node ? '新增组织机构' : '新增一级组织机构',
nzContent: AddorComponent, nzContent: AddorComponent,

4
src/app/system-management/user/user.component.html

@ -26,7 +26,7 @@
<th></th> <th></th>
<th>账号</th> <th>账号</th>
<th>姓名</th> <th>姓名</th>
<th>角色</th> <th style="width:45%;">角色</th>
<th>所属机构</th> <th>所属机构</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
@ -36,7 +36,7 @@
<td><img src="../../../assets/images/user.png" alt=""></td> <td><img src="../../../assets/images/user.png" alt=""></td>
<td>{{ data.userName }}</td> <td>{{ data.userName }}</td>
<td>{{ data.name }}</td> <td>{{ data.name }}</td>
<td> <td nzBreakWord>
<span style="margin-right: 8px;" *ngFor="let item of data.roleNames">{{item}}</span> <span style="margin-right: 8px;" *ngFor="let item of data.roleNames">{{item}}</span>
</td> </td>
<td> <td>

Loading…
Cancel
Save