|
|
@ -17,7 +17,7 @@ export class FileCategoryComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } |
|
|
|
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } |
|
|
|
tableSpin = false |
|
|
|
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] |
|
|
|
list = []; //tabelData
|
|
|
|
|
|
|
|
|
|
|
|
tableScrollHeight |
|
|
|
tableScrollHeight |
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
@ -26,10 +26,21 @@ export class FileCategoryComponent implements OnInit { |
|
|
|
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { |
|
|
|
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { |
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.getStationList() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取当前油站档案类证照
|
|
|
|
|
|
|
|
getStationList() { |
|
|
|
|
|
|
|
let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation')); |
|
|
|
|
|
|
|
let params = { orgId: data.organization.id || "" } |
|
|
|
|
|
|
|
this.http.get(`/api/services/app/StationFileLicense/GetStationList`,{params}).subscribe((info: any)=>{ |
|
|
|
|
|
|
|
this.list = info.result |
|
|
|
|
|
|
|
console.log(info.result) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//查看图片
|
|
|
|
//查看图片
|
|
|
|
viewImg(url) { |
|
|
|
viewImg(url) { |
|
|
|
// url.split('?')[0]
|
|
|
|
|
|
|
|
let dom = document.getElementById(`viewerjs`) |
|
|
|
let dom = document.getElementById(`viewerjs`) |
|
|
|
let pObjs = dom.childNodes; |
|
|
|
let pObjs = dom.childNodes; |
|
|
|
let node = document.createElement("img") |
|
|
|
let node = document.createElement("img") |
|
|
@ -49,11 +60,10 @@ export class FileCategoryComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dispose() { |
|
|
|
dispose() { |
|
|
|
console.log('处置') |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
edit(item) { |
|
|
|
edit(item) { |
|
|
|
console.log('item', item) |
|
|
|
|
|
|
|
const modal = this.modal.create({ |
|
|
|
const modal = this.modal.create({ |
|
|
|
nzContent: EditFileCategoryComponent, |
|
|
|
nzContent: EditFileCategoryComponent, |
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
@ -71,34 +81,21 @@ export class FileCategoryComponent implements OnInit { |
|
|
|
nzFooter: null, |
|
|
|
nzFooter: null, |
|
|
|
nzClosable: false, |
|
|
|
nzClosable: false, |
|
|
|
nzOnOk: async () => { |
|
|
|
nzOnOk: async () => { |
|
|
|
if (instance.validateForm.valid) { |
|
|
|
await new Promise(resolve => { |
|
|
|
await new Promise(resolve => { |
|
|
|
instance.data2.validatyType = Number(instance.validatyType) |
|
|
|
let body = { |
|
|
|
this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe(data => { |
|
|
|
id: item.id, |
|
|
|
resolve(data); |
|
|
|
name: instance.validateForm.value.name, |
|
|
|
this.getStationList(); |
|
|
|
storageLocation: instance.validateForm.value.storageLocation, |
|
|
|
this.message.create('success', '修改成功!'); |
|
|
|
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'), |
|
|
|
return true |
|
|
|
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'), |
|
|
|
|
|
|
|
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'), |
|
|
|
|
|
|
|
organizationUnitId: item.organizationUnitId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// this.http.put('/api/services/app/FireEquipment/Update', body).subscribe(data => {
|
|
|
|
|
|
|
|
// resolve(data)
|
|
|
|
|
|
|
|
// this.message.create('success', '修改成功!');
|
|
|
|
|
|
|
|
// return true
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
}) |
|
|
|
this.message.create('warning', '请填写完整!'); |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
modal.afterClose.subscribe(result => { }); |
|
|
|
modal.afterClose.subscribe(result => { }); |
|
|
|
} |
|
|
|
} |
|
|
|
details(item) { |
|
|
|
details(item) { |
|
|
|
console.log('item', item) |
|
|
|
|
|
|
|
const modal = this.modal.create({ |
|
|
|
const modal = this.modal.create({ |
|
|
|
nzContent: DetailsFileCategoryComponent, |
|
|
|
nzContent: DetailsFileCategoryComponent, |
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
@ -122,4 +119,23 @@ export class FileCategoryComponent implements OnInit { |
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
modal.afterClose.subscribe(result => { }); |
|
|
|
modal.afterClose.subscribe(result => { }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交审核
|
|
|
|
|
|
|
|
submitReview(item){ |
|
|
|
|
|
|
|
let params = { id: item.id } |
|
|
|
|
|
|
|
this.http.post('/api/services/app/StationFileLicense/Commit', {},{params}).subscribe(data => { |
|
|
|
|
|
|
|
this.message.create('success', '提交审核成功!'); |
|
|
|
|
|
|
|
this.getStationList(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//撤销审核
|
|
|
|
|
|
|
|
cancelReview(item){ |
|
|
|
|
|
|
|
let params = { id: item.id } |
|
|
|
|
|
|
|
this.http.post('/api/services/app/StationFileLicense/Uncommit', {},{params}).subscribe(data => { |
|
|
|
|
|
|
|
this.message.create('success', '撤销审核成功!'); |
|
|
|
|
|
|
|
this.getStationList(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|