|
|
|
@ -17,7 +17,7 @@ export class FileCategoryComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } |
|
|
|
|
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 |
|
|
|
|
ngOnInit(): void { |
|
|
|
@ -26,10 +26,21 @@ export class FileCategoryComponent implements OnInit {
|
|
|
|
|
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { |
|
|
|
|
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) { |
|
|
|
|
// url.split('?')[0]
|
|
|
|
|
let dom = document.getElementById(`viewerjs`) |
|
|
|
|
let pObjs = dom.childNodes; |
|
|
|
|
let node = document.createElement("img") |
|
|
|
@ -49,11 +60,10 @@ export class FileCategoryComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dispose() { |
|
|
|
|
console.log('处置') |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
edit(item) { |
|
|
|
|
console.log('item', item) |
|
|
|
|
const modal = this.modal.create({ |
|
|
|
|
nzContent: EditFileCategoryComponent, |
|
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
@ -71,34 +81,21 @@ export class FileCategoryComponent implements OnInit {
|
|
|
|
|
nzFooter: null, |
|
|
|
|
nzClosable: false, |
|
|
|
|
nzOnOk: async () => { |
|
|
|
|
if (instance.validateForm.valid) { |
|
|
|
|
await new Promise(resolve => { |
|
|
|
|
let body = { |
|
|
|
|
id: item.id, |
|
|
|
|
name: instance.validateForm.value.name, |
|
|
|
|
storageLocation: instance.validateForm.value.storageLocation, |
|
|
|
|
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'), |
|
|
|
|
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
|
|
|
|
|
// })
|
|
|
|
|
await new Promise(resolve => { |
|
|
|
|
instance.data2.validatyType = Number(instance.validatyType) |
|
|
|
|
this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe(data => { |
|
|
|
|
resolve(data); |
|
|
|
|
this.getStationList(); |
|
|
|
|
this.message.create('success', '修改成功!'); |
|
|
|
|
return true |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.message.create('warning', '请填写完整!'); |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
|
modal.afterClose.subscribe(result => { }); |
|
|
|
|
} |
|
|
|
|
details(item) { |
|
|
|
|
console.log('item', item) |
|
|
|
|
const modal = this.modal.create({ |
|
|
|
|
nzContent: DetailsFileCategoryComponent, |
|
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
@ -122,4 +119,23 @@ export class FileCategoryComponent implements OnInit {
|
|
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
|
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(); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|