|
|
|
@ -17,15 +17,16 @@ import { AuditDisposeComponent } from './audit-dispose/audit-dispose.component';
|
|
|
|
|
}) |
|
|
|
|
export class AuditIngComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef,private http: HttpClient,private message: NzMessageService,private element: ElementRef) { } |
|
|
|
|
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private http: HttpClient, private message: NzMessageService, private element: ElementRef) { } |
|
|
|
|
tableSpin = false |
|
|
|
|
|
|
|
|
|
tableScrollHeight |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
|
|
|
|
this.tableScrollHeight = '100px' |
|
|
|
|
// 页面监听
|
|
|
|
|
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
|
|
|
|
let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' |
|
|
|
|
}); |
|
|
|
|
this.getStationList() |
|
|
|
|
} |
|
|
|
@ -50,13 +51,13 @@ export class AuditIngComponent implements OnInit {
|
|
|
|
|
this.tableSpin = true |
|
|
|
|
let data = JSON.parse(sessionStorage.getItem('userdata')); |
|
|
|
|
let params = { |
|
|
|
|
OrganizationUnitId: data.organization.id || "" , |
|
|
|
|
OrganizationUnitId: data.organization.id || "", |
|
|
|
|
IsContainsChildren: "true", |
|
|
|
|
AuditStatuses: "1", |
|
|
|
|
SkipCount: this.SkipCount, |
|
|
|
|
MaxResultCount: this.MaxResultCount, |
|
|
|
|
} |
|
|
|
|
this.http.get(`/api/services/app/ContentAuditLog/GetAuditting`,{params}).subscribe((info: any)=>{ |
|
|
|
|
this.http.get(`/api/services/app/ContentAuditLog/GetAuditting`, { params }).subscribe((info: any) => { |
|
|
|
|
info.result.items.forEach(element => { |
|
|
|
|
element.itemData = JSON.parse(element.itemData) |
|
|
|
|
}); |
|
|
|
@ -64,6 +65,11 @@ export class AuditIngComponent implements OnInit {
|
|
|
|
|
this.list = [...this.list] |
|
|
|
|
this.totalCount = info.result.totalCount |
|
|
|
|
this.tableSpin = false |
|
|
|
|
setTimeout(() => { |
|
|
|
|
let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' |
|
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
console.log(this.list) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -74,12 +80,12 @@ export class AuditIngComponent implements OnInit {
|
|
|
|
|
// if (item.auditStatus != 1) {
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
this.getData(item).then(res=>{ |
|
|
|
|
this.getData(item).then(res => { |
|
|
|
|
item.getData = res |
|
|
|
|
const modal = this.modal.create({ |
|
|
|
|
nzContent: AuditDisposeComponent, |
|
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
|
nzWidth: item.auditType == 0? 700 : 600, |
|
|
|
|
nzWidth: item.auditType == 0 ? 700 : 600, |
|
|
|
|
nzBodyStyle: { |
|
|
|
|
'border': '1px solid #91CCFF', |
|
|
|
|
'border-radius': '0px', |
|
|
|
@ -108,12 +114,14 @@ export class AuditIngComponent implements OnInit {
|
|
|
|
|
url = '/api/services/app/StationFileLicense/Audit' |
|
|
|
|
} |
|
|
|
|
let params = { |
|
|
|
|
id: item.auditType == 0? item.gasStation.id : item.getData.id, |
|
|
|
|
id: item.auditType == 0 ? item.gasStation.id : item.getData.id, |
|
|
|
|
remark: instance.textarea |
|
|
|
|
} |
|
|
|
|
let body = instance.isPass? 2 : 3; |
|
|
|
|
this.http.post(url,body,{params}).subscribe(data => { |
|
|
|
|
let body = instance.isPass ? 2 : 3; |
|
|
|
|
this.http.post(url, body, { params }).subscribe(data => { |
|
|
|
|
resolve(data); |
|
|
|
|
this.list = [] |
|
|
|
|
this.SkipCount = '0' |
|
|
|
|
this.getStationList(); |
|
|
|
|
this.message.create('success', '审核完成!'); |
|
|
|
|
return true |
|
|
|
@ -137,12 +145,12 @@ export class AuditIngComponent implements OnInit {
|
|
|
|
|
} else if (item.auditType) { |
|
|
|
|
component = DetailsFileCategoryComponent |
|
|
|
|
} |
|
|
|
|
this.getData(item).then(res=>{ |
|
|
|
|
this.getData(item).then(res => { |
|
|
|
|
item.getData = res |
|
|
|
|
const modal = this.modal.create({ |
|
|
|
|
nzContent: component, |
|
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
|
nzWidth: item.auditType == 0? 700 : 450, |
|
|
|
|
nzWidth: item.auditType == 0 ? 700 : 450, |
|
|
|
|
nzBodyStyle: { |
|
|
|
|
'border': '1px solid #91CCFF', |
|
|
|
|
'border-radius': '0px', |
|
|
|
@ -166,7 +174,7 @@ export class AuditIngComponent implements OnInit {
|
|
|
|
|
getData(item) { |
|
|
|
|
let url |
|
|
|
|
if (item.auditType == 0) { //油站基本信息
|
|
|
|
|
return new Promise((resolve, reject)=>{ |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
let organization = { organizationId: item.organizationId } |
|
|
|
|
resolve(organization) |
|
|
|
|
}) |
|
|
|
@ -177,9 +185,9 @@ export class AuditIngComponent implements OnInit {
|
|
|
|
|
} else if (item.auditType) { |
|
|
|
|
url = '/api/services/app/StationFileLicense/Get' |
|
|
|
|
} |
|
|
|
|
return new Promise((resolve, reject)=>{ |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
let params = { id: item.itemId } |
|
|
|
|
this.http.get(url,{params}).subscribe((data: any)=>{ |
|
|
|
|
this.http.get(url, { params }).subscribe((data: any) => { |
|
|
|
|
resolve(data.result) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|