Browse Source

档案类证照对接接口

beijing
陈鹏飞 3 years ago
parent
commit
5c2d2fd1a3
  1. 38
      src/app/pages/license/file-category/details-file-category/details-file-category.component.html
  2. 31
      src/app/pages/license/file-category/details-file-category/details-file-category.component.ts
  3. 11
      src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html
  4. 6
      src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
  5. 25
      src/app/pages/license/file-category/file-category.component.html
  6. 64
      src/app/pages/license/file-category/file-category.component.ts

38
src/app/pages/license/file-category/details-file-category/details-file-category.component.html

@ -7,42 +7,34 @@
</div> </div>
<div class="content"> <div class="content">
<p>证件名称: &nbsp;&nbsp;建设用地规划许可证</p> <p>证件名称: &nbsp;&nbsp;{{data.licenseTypeName}}</p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p>有效期类型: &nbsp;&nbsp;1523天</p> <p>有效期类型: &nbsp;&nbsp;<span *ngIf="data.validatyType == 0"></span><span *ngIf="data.validatyType == 1"></span><span *ngIf="data.validatyType == 2">不适用</span></p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p>是否年检: &nbsp;&nbsp;</p> <!-- <p>是否年检: &nbsp;&nbsp;是</p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div> -->
<p>证件图片: &nbsp;&nbsp;<img src="/api/Objects/sinochemweb/stationPhotos/175/timg.jpg" alt="" <p>证件图片: &nbsp;&nbsp;<img *ngIf="data.imageUrl" [src]="data.imageUrl" (click)="viewImg(data.imageUrl)"></p>
(click)="viewImg('/api/Objects/sinochemweb/stationPhotos/175/timg.jpg')"></p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p class="recordP"> <p class="recordP">
<span>审核记录</span> <span>审核记录</span>
<span> <span>
<span style="margin-right: 6px;"> <span style="margin-right: 6px;">
审核次数:6 审核次数:{{auditList.length}}
</span> </span>
<span> <span>
驳回次数:2 驳回次数:{{getRejectNum()}}
</span> </span>
</span> </span>
</p> </p>
<nz-timeline> <nz-timeline>
<nz-timeline-item> <nz-timeline-item *ngFor="let item of auditList">
<span style="margin-right: 12px;">2022.04.02</span> <span style="margin-right: 12px;">{{item.creationTime | date:"yyyy/MM/dd"}}</span>
<span>审核完成</span> <span *ngIf="item.auditStatus == 0"></span>
</nz-timeline-item> <span *ngIf="item.auditStatus == 1">审核中</span>
<nz-timeline-item> <span *ngIf="item.auditStatus == 2">审核通过</span>
<span style="margin-right: 12px;">2022.04.02</span> <span *ngIf="item.auditStatus == 3">审核驳回</span>
<span>审核完成</span> <span *ngIf="item.auditStatus == 4">已撤销审核</span>
</nz-timeline-item> <span *ngIf="item.auditStatus == 5">审核完成</span>
<nz-timeline-item>
<span style="margin-right: 12px;">2022.04.02</span>
<span>审核完成</span>
</nz-timeline-item>
<nz-timeline-item>
<span style="margin-right: 12px;">2022.04.02</span>
<span>审核完成</span>
</nz-timeline-item> </nz-timeline-item>
</nz-timeline> </nz-timeline>
<ng-template #soccerTemplate> <ng-template #soccerTemplate>

31
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 { HttpClient } from '@angular/common/http';
import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service';
import Viewer from 'viewerjs'; import Viewer from 'viewerjs';
@Component({ @Component({
selector: 'app-details-file-category', selector: 'app-details-file-category',
templateUrl: './details-file-category.component.html', templateUrl: './details-file-category.component.html',
@ -12,19 +13,42 @@ import Viewer from 'viewerjs';
export class DetailsFileCategoryComponent implements OnInit { export class DetailsFileCategoryComponent implements OnInit {
@Input() data?: any; @Input() data?: any;
constructor(private modal: NzModalRef) { } constructor(private modal: NzModalRef, private http: HttpClient) { }
ngOnInit(): void { 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() { destroyModal() {
this.modal.destroy({ data: 'this the result data' }); this.modal.destroy({ data: 'this the result data' });
} }
//查看图片 //查看图片
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")
@ -42,4 +66,5 @@ export class DetailsFileCategoryComponent implements OnInit {
node.click(); node.click();
}, 0); }, 0);
} }
} }

11
src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html

@ -6,7 +6,7 @@
<i nz-icon nzType="close" nzTheme="outline" (click)="destroyModal()"></i> <i nz-icon nzType="close" nzTheme="outline" (click)="destroyModal()"></i>
</div> </div>
<form nz-form [formGroup]="validateForm" class="form"> <form nz-form [formGroup]="validateForm" class="form">
<p>证件名称: 建设用地规划许可证</p> <p>证件名称: {{data2.licenseTypeName || ''}}</p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
@ -14,8 +14,10 @@
<nz-form-item> <nz-form-item>
<nz-form-control> <nz-form-control>
<nz-select formControlName="type"> <nz-select formControlName="type" [(ngModel)]="validatyType">
<nz-option nzValue="0" nzLabel="不适用"></nz-option> <nz-option nzValue="0" nzLabel="有"></nz-option>
<nz-option nzValue="1" nzLabel="无"></nz-option>
<nz-option nzValue="2" nzLabel="不适用"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -24,8 +26,7 @@
<div class="uploadDivbox"> <div class="uploadDivbox">
<div class="uploadDiv" style="margin-right: 12px;"> <div class="uploadDiv" style="margin-right: 12px;">
<img *ngIf="imageUrl" style="width: 100%;height: 100%;cursor: pointer;" [src]="imageUrl" alt="" <img *ngIf="data2 && data2.imageUrl" style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.imageUrl" (click)="viewImg(imageUrl)">
(click)="viewImg(imageUrl)">
<input *ngIf="!imageUrl" (change)="filechange($event)" class="fileinput" type="file" name="" id=""> <input *ngIf="!imageUrl" (change)="filechange($event)" class="fileinput" type="file" name="" id="">
<button *ngIf="!imageUrl" nz-button [nzLoading]=""><i nz-icon nzType="upload" <button *ngIf="!imageUrl" nz-button [nzLoading]=""><i nz-icon nzType="upload"
nzTheme="outline"></i>上传附件</button> nzTheme="outline"></i>上传附件</button>

6
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]] type: [null, [Validators.required]]
}); });
this.data2 = JSON.parse(JSON.stringify(this.data)) this.data2 = JSON.parse(JSON.stringify(this.data))
this.validatyType = (this.data2.validatyType).toString()
console.log(this.data2)
} }
validatyType: string
isLongTerm = false isLongTerm = false
imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg' imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg'
validityChange($event) { validityChange($event) {
console.log($event)
this.isLongTerm = $event this.isLongTerm = $event
} }
@ -70,6 +72,7 @@ export class EditFileCategoryComponent implements OnInit {
let dataObj = data as any; let dataObj = data as any;
let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName; let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
this.imageUrl = filePath this.imageUrl = filePath
this.data2.imageUrl = filePath
console.log('上传成功', filePath) console.log('上传成功', filePath)
resolve('success') resolve('success')
}); });
@ -85,6 +88,7 @@ export class EditFileCategoryComponent implements OnInit {
let dataObj = value as any; let dataObj = value as any;
let filePath = dataObj.filePath let filePath = dataObj.filePath
this.imageUrl = filePath this.imageUrl = filePath
this.data2.imageUrl = filePath
console.log('上传成功', filePath) console.log('上传成功', filePath)
}); });

25
src/app/pages/license/file-category/file-category.component.html

@ -17,19 +17,30 @@
<tbody id="table"> <tbody id="table">
<tr *ngFor="let item of headerTable.data;let key = index"> <tr *ngFor="let item of headerTable.data;let key = index">
<td> <td>
<span style="margin-left: 25%;">证件名称</span> <span style="margin-left: 25%;">{{item.licenseTypeName || ''}}</span>
</td>
<td>
<span *ngIf="item.validatyType == 0"></span>
<span *ngIf="item.validatyType == 1"></span>
<span *ngIf="item.validatyType == 2">不适用</span>
</td>
<td>
<img *ngIf="item.imageUrl" [src]="item.imageUrl" (click)="viewImg(item.imageUrl)">
</td> </td>
<td>有效期类型</td> <td>{{item.committedTime | date:"yyyy/MM/dd"}}<span *ngIf="!item.committedTime">未提交审核</span></td>
<td> <td>
<img src="../../../../assets/images/bgImg.png" alt="" <span *ngIf="item.auditStatus == 0"></span>
(click)="viewImg('../../../../assets/images/bgImg.png')"> <span *ngIf="item.auditStatus == 1">审核中</span>
<span *ngIf="item.auditStatus == 2">审核通过</span>
<span *ngIf="item.auditStatus == 3">审核驳回</span>
<span *ngIf="item.auditStatus == 4">未提交审核</span>
<span *ngIf="item.auditStatus == 5">审核完成</span>
</td> </td>
<td>提交时间</td>
<td>审核状态</td>
<td class="operation"> <td class="operation">
<span class="blueColor" (click)="edit(item)">编辑</span> <span class="blueColor" (click)="edit(item)">编辑</span>
<span class="blueColor" (click)="details(item)">详情</span> <span class="blueColor" (click)="details(item)">详情</span>
<span class="blueColor">提交审核</span> <span class="blueColor" (click)="cancelReview(item)" *ngIf="item.auditStatus === 1">撤销审核</span>
<span class="blueColor" (click)="submitReview(item)" *ngIf="item.auditStatus === 4">提交审核</span>
</td> </td>
</tr> </tr>
</tbody> </tbody>

64
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) { } 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 => {
let body = { instance.data2.validatyType = Number(instance.validatyType)
id: item.id, this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe(data => {
name: instance.validateForm.value.name, resolve(data);
storageLocation: instance.validateForm.value.storageLocation, this.getStationList();
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'), this.message.create('success', '修改成功!');
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'), return true
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();
})
}
} }

Loading…
Cancel
Save