|
|
|
import { Component, OnInit, ViewContainerRef } from '@angular/core';
|
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
|
|
import { Observable, fromEvent } from 'rxjs';
|
|
|
|
import { debounceTime } from 'rxjs/operators';
|
|
|
|
import { AuditDetailsInformTimeComponent } from './audit-details-inform-time/audit-details-inform-time.component';
|
|
|
|
import { EditInformTimeComponent } from './edit-inform-time/edit-inform-time.component';
|
|
|
|
// import { AuditDisposeComponent } from './audit-dispose/audit-dispose.component';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-audit-inform-time',
|
|
|
|
templateUrl: './audit-inform-time.component.html',
|
|
|
|
styleUrls: ['./audit-inform-time.component.scss']
|
|
|
|
})
|
|
|
|
export class AuditInformTimeComponent implements OnInit {
|
|
|
|
|
|
|
|
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef) { }
|
|
|
|
tableSpin = false
|
|
|
|
list = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
|
|
|
|
|
|
|
tableScrollHeight
|
|
|
|
ngOnInit(): void {
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 85) + 'px'
|
|
|
|
// 页面监听
|
|
|
|
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 85) + 'px'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
edit(item) {
|
|
|
|
console.log('item', item)
|
|
|
|
const modal = this.modal.create({
|
|
|
|
nzContent: EditInformTimeComponent,
|
|
|
|
nzViewContainerRef: this.viewContainerRef,
|
|
|
|
nzWidth: 600,
|
|
|
|
nzBodyStyle: {
|
|
|
|
'border': '1px solid #91CCFF',
|
|
|
|
'border-radius': '0px',
|
|
|
|
'padding': '7px',
|
|
|
|
'box-shadow': '0 0 8px 0 #fff',
|
|
|
|
'background-image': 'linear-gradient(#003665, #000f25)'
|
|
|
|
},
|
|
|
|
nzComponentParams: {
|
|
|
|
data: item
|
|
|
|
},
|
|
|
|
nzFooter: null,
|
|
|
|
nzClosable: false,
|
|
|
|
nzOnOk: async () => {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const instance = modal.getContentComponent();
|
|
|
|
modal.afterClose.subscribe(result => { });
|
|
|
|
}
|
|
|
|
details(item) {
|
|
|
|
console.log('item', item)
|
|
|
|
const modal = this.modal.create({
|
|
|
|
nzContent: AuditDetailsInformTimeComponent,
|
|
|
|
nzViewContainerRef: this.viewContainerRef,
|
|
|
|
nzWidth: 650,
|
|
|
|
nzBodyStyle: {
|
|
|
|
'border': '1px solid #91CCFF',
|
|
|
|
'border-radius': '0px',
|
|
|
|
'padding': '7px',
|
|
|
|
'box-shadow': '0 0 8px 0 #fff',
|
|
|
|
'background-image': 'linear-gradient(#003665, #000f25)'
|
|
|
|
},
|
|
|
|
nzComponentParams: {
|
|
|
|
data: item
|
|
|
|
},
|
|
|
|
nzFooter: null,
|
|
|
|
nzClosable: false,
|
|
|
|
nzOnOk: async () => {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const instance = modal.getContentComponent();
|
|
|
|
modal.afterClose.subscribe(result => { });
|
|
|
|
}
|
|
|
|
}
|