Browse Source

[完善]所有页面增加loading

dev
邵佳豪 3 years ago
parent
commit
9ddb539264
  1. 26
      src/app/pages/criminal-records-admin/criminal-records-admin.component.html
  2. 14
      src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
  3. 17
      src/app/pages/criminal-records/criminal-records.component.html
  4. 14
      src/app/pages/criminal-records/criminal-records.component.ts
  5. 5
      src/app/pages/home-page/home-page.component.html
  6. 6
      src/app/pages/home-page/home-page.component.ts
  7. 39
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html
  8. 9
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts
  9. 13
      src/app/pages/plan-admin/plan-admin.component.html
  10. 84
      src/app/pages/plan-admin/plan-admin.component.ts
  11. 5
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  12. 13
      src/theme.less

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

@ -30,15 +30,16 @@
<nz-form-item class="searchParams searchParamsLong">
<nz-form-control>
<nz-tree-select [nzAllowClear]="false" [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch [(ngModel)]="defaultOrId"
formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构">
<nz-tree-select [nzAllowClear]="false" [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch
[(ngModel)]="defaultOrId" formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构">
</nz-tree-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear id="type" (ngModelChange)="typeChange($event)" formControlName="type" nzPlaceHolder="请选择预警类型">
<nz-select nzAllowClear id="type" (ngModelChange)="typeChange($event)" formControlName="type"
nzPlaceHolder="请选择预警类型">
<nz-option *ngFor="let item of warningTypes" [nzValue]="item.key" [nzLabel]="item.key"></nz-option>
</nz-select>
</nz-form-control>
@ -95,7 +96,7 @@
<div class="chartsbox" [hidden]="!isEcharts">
<div class="chart">
<div class="leftbox">
<div class="leftbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
预警类别统计
@ -107,15 +108,16 @@
<div class="piechart" id="piechart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="rightbox">
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近一个月预警统计
</span>
<div class="btnbox">
<div class="btn" (click)="echartClick('分布')" [ngClass]="{'selectedbtn': selectedType == '分布'}">统计</div>
<div class="rankingBtnbox" (mouseenter)="mouseEnter()" (mouseleave)="mouseleave()">
<div class="rankingBtnbox" (mouseenter)="mouseEnter()" (mouseleave)="mouseleave()">
<div class="btn"
[ngClass]="{'selectedbtn': (selectedRankingType == '站点排名' || selectedRankingType == '事件排名')}">排名</div>
<div class="btn rankingBtn" *ngIf="isMouseEnter" (click)="echartClick2('站点排名')"
@ -126,6 +128,7 @@
</div>
<div class="barchart" id="barchart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
@ -228,14 +231,13 @@
<span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span> -->
</div>
</div>
<!-- <nz-spin style="text-align: center;margin-top: 12px;" nzSimple *ngIf="isSpin"></nz-spin> -->
<div nz-row class="tr" *ngIf="tableSpin">
<div nz-col nzSpan="24" style="text-align: center;">
<nz-spin nzSimple></nz-spin>
</div>
</div>
</div>
</div>
<!-- <div class="pagination">
<nz-pagination [nzPageIndex]="1" [nzTotal]="85" [nzPageSize]="20" [nzShowTotal]="totalTemplate"
nzShowQuickJumper></nz-pagination>
<ng-template #totalTemplate let-total> 16条/页,共100条 </ng-template>
</div> -->
</div>
</div>

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

@ -322,7 +322,9 @@ export class CriminalRecordsAdminComponent implements OnInit {
this.mybarChart.setOption(this.baroption);
this.warningType()
this.tableSpin = true
this.getAllOrganization()
this.getAggregations()
}
defaultOrId: string
@ -408,7 +410,9 @@ export class CriminalRecordsAdminComponent implements OnInit {
}
//获取统计信息
chartsSpin: boolean = false
getAggregations() {
this.chartsSpin = true
let ViolationIds = []
if (this.validateForm.value.type) {
this.warningTypesDetails.forEach(item => {
@ -425,6 +429,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
ViolationIds.length != 0 ? body.violationType = ViolationIds : null
this.http.post('/api/services/app/ViolateRecord/Aggregations', body).subscribe((data: any) => {
this.echartsData = data.result
this.chartsSpin = false
this.refreshPieData(data.result)
this.refreshBarLineData(this.echartsData, 'month')
})
@ -434,7 +439,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
MaxResultCount: string = '50'
list: any = []
totalCount: string
isSpin: boolean = false
tableSpin: boolean = false
getViolateRecordList() {
let ViolationIds = []
if (this.validateForm.value.event) {
@ -464,7 +469,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount
}
this.isSpin = true
this.tableSpin = true
this.http.get('/api/services/app/ViolateRecord/GetAll', {
params: params
}).subscribe((data: any) => {
@ -473,8 +478,8 @@ export class CriminalRecordsAdminComponent implements OnInit {
// this.list = data.result.items
this.totalCount = data.result.totalCount
console.log('违规记录列表', data)
this.isSpin = false
this.getAggregations()
this.tableSpin = false
console.log(this.list.length)
})
}
@ -540,6 +545,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
this.list = []
this.SkipCount = '0'
this.getViolateRecordList()
// this.getAggregations()
}
resetForm(e: MouseEvent): void {
e.preventDefault();

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

@ -85,7 +85,7 @@
</div>
<div class="chartsbox" [hidden]="!isEcharts">
<div class="chart">
<div class="leftbox">
<div class="leftbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
预警类别统计
@ -97,8 +97,9 @@
<div class="piechart" id="piechart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="rightbox">
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近一个月预警统计
@ -114,6 +115,7 @@
<div class="barchart" id="barchart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
@ -196,14 +198,13 @@
<span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span> -->
</div>
</div>
<!-- <nz-spin style="text-align: center;margin-top: 12px;" nzSimple *ngIf="isSpin"></nz-spin> -->
<div nz-row class="tr" *ngIf="tableSpin">
<div nz-col nzSpan="24" style="text-align: center;">
<nz-spin nzSimple></nz-spin>
</div>
</div>
</div>
</div>
<!-- <div class="pagination">
<nz-pagination [nzPageIndex]="1" [nzTotal]="85" [nzPageSize]="20" [nzShowTotal]="totalTemplate"
nzShowQuickJumper></nz-pagination>
<ng-template #totalTemplate let-total> 16条/页,共100条 </ng-template>
</div> -->
</div>
</div>
</div>

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

@ -327,7 +327,7 @@ export class CriminalRecordsComponent implements OnInit {
this.warningType()
this.getViolateRecordList()
this.getAggregations()
}
//刷新饼图图表数据
@ -387,7 +387,9 @@ export class CriminalRecordsComponent implements OnInit {
this.mybarChart.setOption(option);
}
//获取统计信息
chartsSpin: boolean = false
getAggregations() {
this.chartsSpin = true
let ViolationIds = []
if (this.validateForm.value.type) {
this.warningTypesDetails.forEach(item => {
@ -404,6 +406,7 @@ export class CriminalRecordsComponent implements OnInit {
ViolationIds.length != 0 ? body.violationType = ViolationIds : null
this.http.post('/api/services/app/ViolateRecord/Aggregations', body).subscribe((data: any) => {
this.echartsData = data.result
this.chartsSpin = false
this.refreshPieData(data.result)
this.refreshBarLineData(this.echartsData, 'month')
})
@ -414,7 +417,7 @@ export class CriminalRecordsComponent implements OnInit {
MaxResultCount: string = '50'
list: any = []
totalCount: string
isSpin: boolean = false
tableSpin: boolean = false
getViolateRecordList() {
let ViolationIds = []
if (this.validateForm.value.event) {
@ -444,7 +447,7 @@ export class CriminalRecordsComponent implements OnInit {
SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount
}
this.isSpin = true
this.tableSpin = true
this.http.get('/api/services/app/ViolateRecord/GetAll', {
params: params
}).subscribe((data: any) => {
@ -453,8 +456,7 @@ export class CriminalRecordsComponent implements OnInit {
// this.list = data.result.items
this.totalCount = data.result.totalCount
console.log('违规记录列表', data)
this.isSpin = false
this.getAggregations()
this.tableSpin = false
})
}
ngAfterViewInit(): void {
@ -534,7 +536,7 @@ export class CriminalRecordsComponent implements OnInit {
// if (!item.violateImage && !item.violateVideo) {
// this.message.create('warning', '没有预警照片或视频!');
// } else {
// }
const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent,

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

@ -110,6 +110,7 @@
<div class="angle-border right-top-border"></div>
<div class="angle-border left-bottom-border"></div>
<div class="angle-border right-bottom-border"></div>
<nz-spin *ngIf="isSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="leftitem">
<span class="itemname">近30天油站排名</span>
@ -162,6 +163,7 @@
<div class="angle-border right-top-border"></div>
<div class="angle-border left-bottom-border"></div>
<div class="angle-border right-bottom-border"></div>
<nz-spin *ngIf="isSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
@ -220,6 +222,7 @@
<div class="angle-border right-top-border"></div>
<div class="angle-border left-bottom-border"></div>
<div class="angle-border right-bottom-border"></div>
<nz-spin *ngIf="isSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
@ -240,7 +243,7 @@
<div class="angle-border right-top-border"></div>
<div class="angle-border left-bottom-border"></div>
<div class="angle-border right-bottom-border"></div>
<nz-spin *ngIf="isSpin" nzSimple class="nzspin"></nz-spin>
<div class="oilNum">
<div class="oilNumItem">
<div class="pointbox">

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

@ -454,6 +454,7 @@ export class HomePageComponent implements OnInit {
}
}
totalCount
isSpin:boolean = false
getHomeAggregation() {
let organizationUnitId
@ -466,6 +467,7 @@ export class HomePageComponent implements OnInit {
organizationUnitId: organizationUnitId,
isContainsChildren: true
}
this.isSpin = true
this.http.post('/api/services/app/Home/HomeAggregation', body).subscribe((data: any) => {
this.HomeAggregatioData = data.result
this.totalCount = data.result.todayRecordCount
@ -474,8 +476,8 @@ export class HomePageComponent implements OnInit {
{ name: '摄像头数量', value: data.result.dev.cameraCount },
{ name: '预警模型数量', value: data.result.dev.violationCount }
]
console.log('图表信息', data.result)
// console.log('图表信息', data.result)
this.isSpin = false
this.eventEcharts(data.result)
})

39
src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html

@ -16,7 +16,7 @@
<div class="chartsbox" [hidden]="!isEcharts">
<div class="chart">
<div class="leftbox">
<div class="leftbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
卸油预警统计
@ -29,8 +29,9 @@
<div class="piechart" id="piechart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="rightbox">
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近30天卸油作业总数走势
@ -38,6 +39,7 @@
<div class="barchart" id="barchart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
@ -57,31 +59,12 @@
</nz-form-item>
<nz-form-item class="searchParams searchParamsLong" *ngIf="isOrShow">
<nz-form-control>
<nz-tree-select [nzAllowClear]="false" [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch
[(ngModel)]="defaultOrId" formControlName="organization" [nzNodes]="nodes"
<nz-tree-select [nzAllowClear]="false" [nzDropdownClassName]="'maxHeightTreeSelect'"
nzShowSearch [(ngModel)]="defaultOrId" formControlName="organization" [nzNodes]="nodes"
nzPlaceHolder="请选择所属机构">
</nz-tree-select>
</nz-form-control>
</nz-form-item>
<!--
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select formControlName="type" nzPlaceHolder="请选择预警事件">
<nz-option *ngFor="let item of warningTypesDetails" [nzValue]="item.id" [nzLabel]="item.eventSystemName">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select formControlName="site" nzPlaceHolder="请选择处置状态">
<nz-option nzValue="0" nzLabel="已处置"></nz-option>
<nz-option nzValue="1" nzLabel="未处置"></nz-option>
<nz-option nzValue="2" nzLabel="已逾期"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item> -->
<nz-form-item class="searchParams searchParams2">
<nz-form-control>
@ -181,13 +164,13 @@
<span style="color: #36A2FF;cursor: pointer;" (click)="look(item)">查看</span>
</div>
</div>
<div nz-row class="tr" *ngIf="tableSpin">
<div nz-col nzSpan="24" style="text-align: center;">
<nz-spin nzSimple></nz-spin>
</div>
</div>
</div>
</div>
<!-- <div class="pagination">
<nz-pagination [nzPageIndex]="1" [nzTotal]="85" [nzPageSize]="20" [nzShowTotal]="totalTemplate"
nzShowQuickJumper></nz-pagination>
<ng-template #totalTemplate let-total> 16条/页,共100条 </ng-template>
</div> -->
</div>
</div>
</div>

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

@ -89,6 +89,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
this.myChart = echarts.init(document.getElementById('piechart'));
//柱状折线图
this.mybarChart = echarts.init(document.getElementById('barchart'));
this.tableSpin = true
this.getAllOrganization()
this.getAggregations()
if (this.router.url.indexOf('petrolStation') != -1) {
@ -562,7 +563,9 @@ export class OilUnloadingProcessListComponent implements OnInit {
})
}
//获取统计信息
chartsSpin:boolean = false
getAggregations() {
this.chartsSpin = true
let organizationUnitId
if (this.router.url.indexOf('petrolStation') != -1) {
organizationUnitId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
@ -575,6 +578,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
}
this.http.get('/api/services/app/OilUnloadingProcess/GetAllCountByDays', { params: params }).subscribe((data: any) => {
console.log('统计信息', data)
this.chartsSpin = false
this.echartsData = data.result
this.refreshEchartsData1(this.echartsData)
// this.refreshBarLineData(this.echartsData)
@ -586,7 +590,9 @@ export class OilUnloadingProcessListComponent implements OnInit {
MaxResultCount: string = '50'
list: any = []
totalCount: string
tableSpin:boolean = false
getViolateRecordList() {
this.tableSpin = true
let organizationUnitId
if (this.router.url.indexOf('petrolStation') != -1) {
organizationUnitId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
@ -609,12 +615,11 @@ export class OilUnloadingProcessListComponent implements OnInit {
this.http.get('/api/services/app/OilUnloadingProcess/GetAll', {
params: params
}).subscribe((data: any) => {
this.tableSpin = false
this.list = this.list.concat(data.result.items);
this.list = [...this.list]
// console.log('xxx',this.list)
this.totalCount = data.result.totalCount
console.log('获取卸油流程列表', data.result.items)
// this.getAggregations()
})
}
submitForm(): void {

13
src/app/pages/plan-admin/plan-admin.component.html

@ -1,6 +1,6 @@
<!-- <p>站点预案!</p> -->
<div class="stationPlanBox" id="stationPlanBox">
<div class="orbox">
<div class="orbox" style="position: relative;">
<div class="title">
<app-title [name]="'组织机构'"></app-title>
</div>
@ -22,6 +22,7 @@
src="../../../assets/images/unexpand.png" alt="">
</ng-template>
</div>
<nz-spin *ngIf="orSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="stationList">
<div class="title">
@ -51,8 +52,7 @@
</form>
</div>
<div class="tablebox" id="tablebox">
<nz-table [nzPageSize]='999' #headerTable [nzData]="list" [nzShowPagination]="false"
<nz-table [nzLoading]="tableSpin" [nzPageSize]='999' #headerTable [nzData]="list" [nzShowPagination]="false"
[nzScroll]="{ y:tableheight() }" [nzNoResult]='null' nzTableLayout="fixed">
<thead>
<tr>
@ -100,13 +100,6 @@
</tbody>
</nz-table>
<!--
<div class="pagination">
<nz-pagination [nzPageIndex]="1" [nzTotal]="85" [nzPageSize]="20" [nzShowTotal]="totalTemplate"
nzShowQuickJumper></nz-pagination>
<ng-template #totalTemplate let-total> 16条/页,共100条 </ng-template>
</div> -->
</div>
</div>
</div>

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

@ -18,38 +18,22 @@ export class PlanAdminComponent implements OnInit {
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
constructor(private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router) { }
list: any = []
tableHeight
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [null]
});
this.tableSpin = true
this.getAllOrganization()
}
ngAfterViewInit(): void {
fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe(async (event: any) => { //监听 DOM 滚动事件
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
let params = {
StationName: this.validateForm.value.name,
OrganizationUnitId: String(this.OrganizationUnitId),
IsContainsChildren: 'true',
SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
if (this.totalCount > this.list.length) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
await this.getGasStation()
}
await new Promise((resolve, reject) => {
this.http.get('/api/services/app/GasStation/GetAll', {
params: params
}).subscribe((data: any) => {
this.list = this.list.concat(data.result.items);
this.list = [...this.list]
resolve(data)
})
})
}
});
}
@ -61,20 +45,9 @@ export class PlanAdminComponent implements OnInit {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
let params = {
StationName: this.validateForm.value.name,
OrganizationUnitId: String(this.OrganizationUnitId),
IsContainsChildren: 'true',
SkipCount: '0',
MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
}
this.http.get('/api/services/app/GasStation/GetAll', {
params: params
}).subscribe((data: any) => {
this.list = [...data.result.items]
})
this.list = []
this.SkipCount = '0'
this.getGasStation()
}
resetForm(e: MouseEvent): void {
e.preventDefault();
@ -83,25 +56,17 @@ export class PlanAdminComponent implements OnInit {
this.validateForm.controls[key].markAsPristine();
this.validateForm.controls[key].updateValueAndValidity();
}
let params = {
StationName: this.validateForm.value.name,
OrganizationUnitId: String(this.OrganizationUnitId),
IsContainsChildren: 'true',
SkipCount: '0',
MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
}
this.http.get('/api/services/app/GasStation/GetAll', {
params: params
}).subscribe((data: any) => {
this.list = [...data.result.items]
})
this.list = []
this.SkipCount = '0'
this.getGasStation()
}
//获取所有组织机构
nodes: any = []
nzExpandAll = false
nzSelectedKeys: any = []
orSpin: boolean = false
getAllOrganization() {
this.orSpin = true
let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id
let params = {
OrganizationUnitId: OrganizationUnitId,
@ -122,16 +87,13 @@ export class PlanAdminComponent implements OnInit {
const element = data.result.items[index];
element.key = element.id
element.title = element.displayName
// if(element.parentId == OrganizationUnitId){
// element.isLeaf = true
// }
}
console.log('组织机构', data.result.items)
// console.log('组织机构', data.result.items)
this.orSpin = false
this.nodes = [...this.toTree.toTree(data.result.items)]
this.nzExpandedKeys = [OrganizationUnitId]
this.nzSelectedKeys = [OrganizationUnitId]
this.OrganizationUnitId = OrganizationUnitId
// this.nzExpandAll = true
this.getGasStation()
})
}
@ -163,8 +125,11 @@ export class PlanAdminComponent implements OnInit {
//点击tree节点
activeNode(data: NzFormatEmitEvent): void {
this.activatedNode = data.node!;
console.log(data)
// console.log(data)
this.OrganizationUnitId = data.node.origin.id
this.list = []
this.SkipCount = '0'
this.getGasStation()
}
@ -173,6 +138,8 @@ export class PlanAdminComponent implements OnInit {
SkipCount: string = '0'
MaxResultCount: string = '100'
OrganizationUnitId: any
tableSpin: boolean = false
totalCount: any //总数
async getGasStation() {
let params = {
StationName: this.validateForm.value.name,
@ -180,14 +147,17 @@ export class PlanAdminComponent implements OnInit {
IsContainsChildren: 'true',
SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
Sorting: ' BuildingBasicInfo.Id asc'
}
this.tableSpin = true
await new Promise((resolve, reject) => {
this.http.get('/api/services/app/GasStation/GetAll', {
params: params
}).subscribe((data: any) => {
// this.list = this.list.concat(data.result.items);
this.list = [...data.result.items]
this.totalCount = data.result.totalCount
this.list = this.list.concat(data.result.items);
this.list = [...this.list]
this.tableSpin = false
resolve(data)
})
})

5
src/app/pages/today-warning-admin/today-warning-admin.component.ts

@ -38,6 +38,7 @@ export class TodayWarningAdminComponent implements OnInit {
datePickerEnd: [new Date(`${moment(new Date()).format('YYYY-MM-DD')} 23:59`)]
});
this.warningType()
this.isSpin = true
this.getAllOrganization()
}
@ -47,7 +48,7 @@ export class TodayWarningAdminComponent implements OnInit {
warningType() {
this.http.get('/api/services/app/Violation/GetAllList').subscribe((data: any) => {
this.warningTypesDetails = data.result
console.log(this.warningTypesDetails)
// console.log(this.warningTypesDetails)
this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType });
})
}
@ -111,7 +112,7 @@ export class TodayWarningAdminComponent implements OnInit {
} else {
disposalState = null
}
console.log(this.validateForm.value)
// console.log(this.validateForm.value)
this.isSpin = true
let params = {
Level: this.validateForm.value.level,

13
src/theme.less

@ -403,10 +403,19 @@
align-items: center;
justify-content: center;
}
.vertical-center-modal .ant-modal {
top: 0;
}
.ant-select-clear,.ant-select-close-icon{
.ant-select-clear,
.ant-select-close-icon {
color: white;
}
}
.nzspin {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}

Loading…
Cancel
Save