diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.html b/src/app/pages/license/file-category/details-file-category/details-file-category.component.html index 42ed216..fc1520f 100644 --- a/src/app/pages/license/file-category/details-file-category/details-file-category.component.html +++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.html @@ -7,42 +7,34 @@
-

证件名称:   建设用地规划许可证

+

证件名称:   {{data.licenseTypeName}}

-

有效期类型:   1523天

+

有效期类型:   不适用

-

是否年检:   是

-
-

证件图片:   

+ +

证件图片:   

审核记录 - 审核次数:6 + 审核次数:{{auditList.length}} - 驳回次数:2 + 驳回次数:{{getRejectNum()}}

- - 2022.04.02 - 审核完成 - - - 2022.04.02 - 审核完成 - - - 2022.04.02 - 审核完成 - - - 2022.04.02 - 审核完成 + + {{item.creationTime | date:"yyyy/MM/dd"}} + + 审核中 + 审核通过 + 审核驳回 + 已撤销审核 + 审核完成 diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts b/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts index 878358a..d6a6737 100644 --- a/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts +++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts @@ -4,6 +4,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; import Viewer from 'viewerjs'; + @Component({ selector: 'app-details-file-category', templateUrl: './details-file-category.component.html', @@ -12,19 +13,42 @@ import Viewer from 'viewerjs'; export class DetailsFileCategoryComponent implements OnInit { @Input() data?: any; - constructor(private modal: NzModalRef) { } - + constructor(private modal: NzModalRef, private http: HttpClient) { } ngOnInit(): void { + this.getAuditLogging() } + auditList: any[] = []; + //获取审核记录 + getAuditLogging() { + if (this.data.auditLogId == 0) { + return + } + let params = { id: this.data.auditLogId } + this.http.get(`/api/services/app/ContentAuditLog/Get`,{params}).subscribe((data: any)=>{ + this.auditList = data.result.actionList || [] + console.log(this.auditList) + }) + } + + //获取驳回次数 + getRejectNum(): number { + let num = 0 + this.auditList.forEach(item=>{ + if (item.auditStatus == 3) { + num = num + 1 + } + }) + return num + } destroyModal() { this.modal.destroy({ data: 'this the result data' }); } + //查看图片 viewImg(url) { - // url.split('?')[0] let dom = document.getElementById(`viewerjs`) let pObjs = dom.childNodes; let node = document.createElement("img") @@ -42,4 +66,5 @@ export class DetailsFileCategoryComponent implements OnInit { node.click(); }, 0); } + } diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html index 836a1cd..a6d5ad0 100644 --- a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html +++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html @@ -6,7 +6,7 @@
-

证件名称: 建设用地规划许可证

+

证件名称: {{data2.licenseTypeName || ''}}

@@ -14,8 +14,10 @@ - - + + + + @@ -24,8 +26,7 @@
- + diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts index 3701930..825b327 100644 --- a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts +++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts @@ -23,12 +23,14 @@ export class EditFileCategoryComponent implements OnInit { type: [null, [Validators.required]] }); this.data2 = JSON.parse(JSON.stringify(this.data)) + this.validatyType = (this.data2.validatyType).toString() + console.log(this.data2) } + validatyType: string isLongTerm = false imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg' validityChange($event) { - console.log($event) this.isLongTerm = $event } @@ -70,6 +72,7 @@ export class EditFileCategoryComponent implements OnInit { let dataObj = data as any; let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName; this.imageUrl = filePath + this.data2.imageUrl = filePath console.log('上传成功', filePath) resolve('success') }); @@ -85,6 +88,7 @@ export class EditFileCategoryComponent implements OnInit { let dataObj = value as any; let filePath = dataObj.filePath this.imageUrl = filePath + this.data2.imageUrl = filePath console.log('上传成功', filePath) }); diff --git a/src/app/pages/license/file-category/file-category.component.html b/src/app/pages/license/file-category/file-category.component.html index 3839e04..2d5eec8 100644 --- a/src/app/pages/license/file-category/file-category.component.html +++ b/src/app/pages/license/file-category/file-category.component.html @@ -17,19 +17,30 @@ - 证件名称 + {{item.licenseTypeName || ''}} + + + + + 不适用 + + + - 有效期类型 + {{item.committedTime | date:"yyyy/MM/dd"}}未提交审核 - + + 审核中 + 审核通过 + 审核驳回 + 未提交审核 + 审核完成 - 提交时间 - 审核状态 编辑 详情 - 提交审核 + 撤销审核 + 提交审核 diff --git a/src/app/pages/license/file-category/file-category.component.ts b/src/app/pages/license/file-category/file-category.component.ts index 052d489..4af5b3e 100644 --- a/src/app/pages/license/file-category/file-category.component.ts +++ b/src/app/pages/license/file-category/file-category.component.ts @@ -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(); + }) + } + }