19 changed files with 1051 additions and 171 deletions
@ -0,0 +1,30 @@ |
|||||||
|
<div class="box" id="detailsupdatecategory"> |
||||||
|
<div class="title"> |
||||||
|
<div class="titlecontent"> |
||||||
|
详情 |
||||||
|
</div> |
||||||
|
<i nz-icon nzType="close" nzTheme="outline" (click)="destroyModal()"></i> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="content"> |
||||||
|
<p>山东省某中化公司</p> |
||||||
|
<div class="cutoffrule"></div> |
||||||
|
<p class="flexp"> |
||||||
|
<span>办理提醒时间:修改时间 80天</span> |
||||||
|
<span>默认时间 90天</span> |
||||||
|
</p> |
||||||
|
<div class="cutoffrule"></div> |
||||||
|
<p class="flexp"> |
||||||
|
<span>临期提醒时间:修改时间 15天</span> |
||||||
|
<span>默认时间 30天</span> |
||||||
|
</p> |
||||||
|
<div class="cutoffrule"></div> |
||||||
|
<p>修改说明:修改原因陈述修改原因陈述,修改原因陈述。</p> |
||||||
|
<div class="cutoffrule"></div> |
||||||
|
<p>审核状态:审核驳回</p> |
||||||
|
<div class="cutoffrule"></div> |
||||||
|
<p>驳回说明:不同意</p> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
</div> |
@ -0,0 +1,65 @@ |
|||||||
|
.box { |
||||||
|
.title { |
||||||
|
font-family: sybold; |
||||||
|
width: 100%; |
||||||
|
height: 48px; |
||||||
|
background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
position: relative; |
||||||
|
|
||||||
|
.titlecontent { |
||||||
|
width: 100%; |
||||||
|
height: 32px; |
||||||
|
line-height: 32px; |
||||||
|
background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); |
||||||
|
text-align: center; |
||||||
|
color: #91CCFF; |
||||||
|
font-size: 16px; |
||||||
|
} |
||||||
|
|
||||||
|
i { |
||||||
|
position: absolute; |
||||||
|
right: 12px; |
||||||
|
color: #fff; |
||||||
|
font-size: 18px; |
||||||
|
cursor: pointer; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.content { |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 0 15px; |
||||||
|
max-height: 580px; |
||||||
|
overflow-y: auto; |
||||||
|
|
||||||
|
.circle { |
||||||
|
width: 8px; |
||||||
|
height: 8px; |
||||||
|
background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%); |
||||||
|
opacity: 1; |
||||||
|
} |
||||||
|
|
||||||
|
.recordP { |
||||||
|
display: flex; |
||||||
|
justify-content: space-between; |
||||||
|
align-items: center; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
p { |
||||||
|
margin-bottom: 0; |
||||||
|
color: #C4E2FC; |
||||||
|
margin: 12px 0; |
||||||
|
|
||||||
|
img { |
||||||
|
width: 88px; |
||||||
|
height: 56px; |
||||||
|
cursor: pointer; |
||||||
|
} |
||||||
|
} |
||||||
|
.flexp{ |
||||||
|
display: flex; |
||||||
|
justify-content: space-between; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
import { Component, Input, OnInit } from '@angular/core'; |
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-audit-details-inform-time', |
||||||
|
templateUrl: './audit-details-inform-time.component.html', |
||||||
|
styleUrls: ['./audit-details-inform-time.component.scss'] |
||||||
|
}) |
||||||
|
export class AuditDetailsInformTimeComponent implements OnInit { |
||||||
|
@Input() data?: any; |
||||||
|
constructor(private modal: NzModalRef) { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
destroyModal() { |
||||||
|
this.modal.destroy({ data: 'this the result data' }); |
||||||
|
} |
||||||
|
} |
@ -1 +1,43 @@ |
|||||||
<p>audit-inform-time works!</p> |
<div class="box informTime" id="inform"> |
||||||
|
<div class="tablebox" id="tablebox"> |
||||||
|
<nz-table *ngIf="tableScrollHeight" [nzLoading]="tableSpin" [nzPageSize]='9999' #headerTable [nzData]="list" |
||||||
|
[nzShowPagination]="false" [nzScroll]="{ y:tableScrollHeight }" [nzNoResult]='null' nzTableLayout="fixed"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th rowspan="2" [nzWidth]="'16%'"> |
||||||
|
<span>审批类型</span> |
||||||
|
</th> |
||||||
|
<th colspan="2">办理提醒时间</th> |
||||||
|
<th colspan="2">临期提醒时间</th> |
||||||
|
<th rowspan="2">提交审核时间</th> |
||||||
|
<th rowspan="2">审核状态</th> |
||||||
|
<th rowspan="2">操作</th> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<th>默认时间</th> |
||||||
|
<th>现用时间</th> |
||||||
|
<th>默认时间</th> |
||||||
|
<th>现用时间</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody id="table"> |
||||||
|
<tr *ngFor="let item of headerTable.data;let key = index"> |
||||||
|
<td> |
||||||
|
营业执照 |
||||||
|
</td> |
||||||
|
<td>90天</td> |
||||||
|
<td>90天</td> |
||||||
|
<td>90天</td> |
||||||
|
<td>90天</td> |
||||||
|
<td>时间</td> |
||||||
|
<td>审批状态</td> |
||||||
|
<td class="operation"> |
||||||
|
<span class="blueColor" (click)="edit(item)">编辑</span> |
||||||
|
<span class="blueColor" (click)="details(item)">审核详情</span> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</tbody> |
||||||
|
</nz-table> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
@ -0,0 +1,15 @@ |
|||||||
|
.box { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
|
||||||
|
.tablebox { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
|
||||||
|
.operation { |
||||||
|
span { |
||||||
|
margin-right: 6px; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,54 @@ |
|||||||
|
<div class="box" id="editfilecategory"> |
||||||
|
<div class="title"> |
||||||
|
<div class="titlecontent"> |
||||||
|
编辑 |
||||||
|
</div> |
||||||
|
<i nz-icon nzType="close" nzTheme="outline" (click)="destroyModal()"></i> |
||||||
|
</div> |
||||||
|
<form nz-form [formGroup]="validateForm" class="form"> |
||||||
|
|
||||||
|
<div class="timebox"> |
||||||
|
<div> |
||||||
|
<p>办理提醒时间</p> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group> |
||||||
|
<input nz-input type="number" formControlName="time1" placeholder="请填写时间" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<p class="p2">默认时间: 90天</p> |
||||||
|
</div> |
||||||
|
<div> |
||||||
|
<p>临期提醒时间</p> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group> |
||||||
|
<input nz-input type="number" formControlName="time2" placeholder="请填写时间" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<p class="p2">默认时间: 30天</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="explain"> |
||||||
|
<p>修改说明</p> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control> |
||||||
|
<textarea formControlName="explain"></textarea> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
<div class="btnbox"> |
||||||
|
<button nz-button type="submit" class="ok" (click)="ok()">提交审核</button> |
||||||
|
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> |
@ -0,0 +1,103 @@ |
|||||||
|
.box { |
||||||
|
.title { |
||||||
|
font-family: sybold; |
||||||
|
width: 100%; |
||||||
|
height: 48px; |
||||||
|
background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
position: relative; |
||||||
|
|
||||||
|
.titlecontent { |
||||||
|
width: 100%; |
||||||
|
height: 32px; |
||||||
|
line-height: 32px; |
||||||
|
background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); |
||||||
|
text-align: center; |
||||||
|
color: #91CCFF; |
||||||
|
font-size: 16px; |
||||||
|
} |
||||||
|
|
||||||
|
i { |
||||||
|
position: absolute; |
||||||
|
right: 12px; |
||||||
|
color: #fff; |
||||||
|
font-size: 18px; |
||||||
|
cursor: pointer; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
p { |
||||||
|
margin-bottom: 0; |
||||||
|
color: #C4E2FC; |
||||||
|
margin: 12px 0; |
||||||
|
} |
||||||
|
|
||||||
|
.p2 { |
||||||
|
margin: 6px 0; |
||||||
|
font-size: 12px; |
||||||
|
color: #C4E2FC; |
||||||
|
} |
||||||
|
|
||||||
|
.form { |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 0 17px; |
||||||
|
|
||||||
|
.timebox { |
||||||
|
display: flex; |
||||||
|
|
||||||
|
div { |
||||||
|
flex: 1; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
box-sizing: border-box; |
||||||
|
padding:0 6px; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.explain { |
||||||
|
box-sizing: border-box; |
||||||
|
padding:0 6px; |
||||||
|
|
||||||
|
textarea { |
||||||
|
width: 100%; |
||||||
|
height: 100px; |
||||||
|
|
||||||
|
background: rgba(145, 204, 255, 0.16); |
||||||
|
color: #fff; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.btnbox { |
||||||
|
width: 100%; |
||||||
|
margin-top: 24px; |
||||||
|
margin-bottom: 17px; |
||||||
|
display: flex; |
||||||
|
justify-content: flex-end; |
||||||
|
|
||||||
|
button { |
||||||
|
border-radius: 0px; |
||||||
|
color: #91CCFF; |
||||||
|
} |
||||||
|
|
||||||
|
button:nth-child(2) { |
||||||
|
margin-left: 16px; |
||||||
|
} |
||||||
|
|
||||||
|
.ok { |
||||||
|
background: rgba(0, 129, 255, 0.4); |
||||||
|
} |
||||||
|
|
||||||
|
.cancel { |
||||||
|
border: 1px solid #C4E2FC; |
||||||
|
background: #0c1e38; |
||||||
|
color: rgba(99, 102, 105, 0.6); |
||||||
|
box-shadow: 0 0 3px 0 #fff inset; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
import { Component, OnInit, Input } from '@angular/core'; |
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal'; |
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
||||||
|
import { HttpClient } from '@angular/common/http'; |
||||||
|
import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; |
||||||
|
@Component({ |
||||||
|
selector: 'app-edit-inform-time', |
||||||
|
templateUrl: './edit-inform-time.component.html', |
||||||
|
styleUrls: ['./edit-inform-time.component.scss'] |
||||||
|
}) |
||||||
|
export class EditInformTimeComponent implements OnInit { |
||||||
|
|
||||||
|
@Input() data?: any; |
||||||
|
|
||||||
|
validateForm!: FormGroup; |
||||||
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService) { } |
||||||
|
|
||||||
|
|
||||||
|
data2 |
||||||
|
ngOnInit(): void { |
||||||
|
this.validateForm = this.fb.group({ |
||||||
|
time1: [null, [Validators.required]], |
||||||
|
time2: [null, [Validators.required]], |
||||||
|
explain: [null] |
||||||
|
}); |
||||||
|
this.data2 = JSON.parse(JSON.stringify(this.data)) |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
destroyModal() { |
||||||
|
this.modal.destroy({ data: 'this the result data' }); |
||||||
|
} |
||||||
|
ok() { |
||||||
|
this.modal.triggerOk() |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -1 +1,121 @@ |
|||||||
<p>audit-record works!</p> |
<div class="box" id="inform"> |
||||||
|
<div class="search"> |
||||||
|
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()"> |
||||||
|
<nz-form-item class="searchParams searchParamsLong"> |
||||||
|
<nz-form-control> |
||||||
|
<nz-select nzAllowClear formControlName="type" nzPlaceHolder="审批类型" [nzLoading]="typeLoading"> |
||||||
|
<nz-option *ngFor="let item of typeList" [nzValue]="item.licenseName" |
||||||
|
[nzLabel]="item.licenseName"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item class="searchParams"> |
||||||
|
<nz-form-control> |
||||||
|
<nz-select nzAllowClear formControlName="info" nzPlaceHolder="审批信息"> |
||||||
|
<nz-option nzValue="0" nzLabel="油站信息"></nz-option> |
||||||
|
<nz-option nzValue="1" nzLabel="更新类证照提醒时间"></nz-option> |
||||||
|
<nz-option nzValue="2" nzLabel="更新类证照"></nz-option> |
||||||
|
<nz-option nzValue="3" nzLabel="档案类证照"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item class="searchParams searchParamsLong"> |
||||||
|
<nz-form-control> |
||||||
|
<nz-tree-select [nzAllowClear]="false" [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch |
||||||
|
formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构" |
||||||
|
[nzExpandedIcon]="multiExpandedIconTpl"> |
||||||
|
</nz-tree-select> |
||||||
|
<ng-template #multiExpandedIconTpl let-node let-origin="origin"> |
||||||
|
<ng-container *ngIf="node.children.length == 0; else elseTemplate"> |
||||||
|
|
||||||
|
</ng-container> |
||||||
|
<ng-template #elseTemplate> |
||||||
|
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'" |
||||||
|
class="ant-tree-switcher-line-icon"></i> |
||||||
|
</ng-template> |
||||||
|
</ng-template> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
|
||||||
|
<nz-form-item class="searchParams searchParams2"> |
||||||
|
<nz-form-control> |
||||||
|
<nz-range-picker [nzAllowClear]="false" formControlName="datePicker"></nz-range-picker> |
||||||
|
<br /> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item class="searchParams"> |
||||||
|
<nz-form-control> |
||||||
|
<nz-select nzAllowClear formControlName="level" nzPlaceHolder="审批级别"> |
||||||
|
<nz-option nzValue="1" nzLabel="总公司"></nz-option> |
||||||
|
<nz-option nzValue="2" nzLabel="省公司"></nz-option> |
||||||
|
<nz-option nzValue="3" nzLabel="区域"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
<nz-form-item class="searchParams"> |
||||||
|
<nz-form-control> |
||||||
|
<nz-select nzAllowClear formControlName="state" nzPlaceHolder="审批状态"> |
||||||
|
<nz-option nzValue="1" nzLabel="审核中"></nz-option> |
||||||
|
<nz-option nzValue="2" nzLabel="审核通过"></nz-option> |
||||||
|
<nz-option nzValue="3" nzLabel="审核驳回"></nz-option> |
||||||
|
<nz-option nzValue="4" nzLabel="已撤销审核"></nz-option> |
||||||
|
<nz-option nzValue="5" nzLabel="审核完成"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item class="btn"> |
||||||
|
<nz-form-control> |
||||||
|
<button nz-button type="submit" class="submit"><i nz-icon [nzType]="'search'"></i>查询</button> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item class="btn"> |
||||||
|
<nz-form-control> |
||||||
|
<button nz-button type="button" class="reset" (click)="resetForm($event)"><i nz-icon |
||||||
|
[nzType]="'sync'"></i>重置</button> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</form> |
||||||
|
</div> |
||||||
|
<div class="tablebox" id="tablebox"> |
||||||
|
<nz-table *ngIf="tableScrollHeight" [nzLoading]="tableSpin" [nzPageSize]='9999' #headerTable [nzData]="list" |
||||||
|
[nzShowPagination]="false" [nzScroll]="{ y:tableScrollHeight }" [nzNoResult]='null' nzTableLayout="fixed"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th [nzWidth]="'16%'"> |
||||||
|
<span style="margin-left: 25%;">审批类型</span> |
||||||
|
</th> |
||||||
|
<th>审批信息</th> |
||||||
|
<th>加油站名称</th> |
||||||
|
<th>区域</th> |
||||||
|
<th>省公司</th> |
||||||
|
<th>提交时间</th> |
||||||
|
<th>审批状态</th> |
||||||
|
<th>操作</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody id="table"> |
||||||
|
<tr *ngFor="let item of headerTable.data;let key = index"> |
||||||
|
<td> |
||||||
|
<span style="margin-left: 25%;">审批类型</span> |
||||||
|
</td> |
||||||
|
<td>审批信息</td> |
||||||
|
<td>加油站名称</td> |
||||||
|
<td>区域</td> |
||||||
|
<td>省公司</td> |
||||||
|
<td>提交时间</td> |
||||||
|
<td>审批状态</td> |
||||||
|
<td class="operation"> |
||||||
|
<span class="blueColor">详情</span> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</tbody> |
||||||
|
</nz-table> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
@ -0,0 +1,67 @@ |
|||||||
|
.box { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
|
||||||
|
.search { |
||||||
|
box-sizing: border-box; |
||||||
|
width: 100%; |
||||||
|
height: 32px; |
||||||
|
margin-bottom: 16px; |
||||||
|
|
||||||
|
form { |
||||||
|
width: 100%; |
||||||
|
height: 32px; |
||||||
|
display: flex; |
||||||
|
justify-content: flex-start; |
||||||
|
|
||||||
|
.searchParams, |
||||||
|
.btn { |
||||||
|
margin: 0 3px; |
||||||
|
} |
||||||
|
|
||||||
|
.searchParams { |
||||||
|
// flex: 5; |
||||||
|
width: 150px; |
||||||
|
} |
||||||
|
|
||||||
|
.searchParamsLong { |
||||||
|
width: 250px; |
||||||
|
} |
||||||
|
|
||||||
|
.searchParams2 { |
||||||
|
width: 220px; |
||||||
|
} |
||||||
|
|
||||||
|
.btn { |
||||||
|
// flex: 1; |
||||||
|
} |
||||||
|
|
||||||
|
nz-select { |
||||||
|
color: rgba(145, 204, 255, 0.95); |
||||||
|
} |
||||||
|
|
||||||
|
nz-tree-select { |
||||||
|
color: rgba(145, 204, 255, 0.95); |
||||||
|
} |
||||||
|
|
||||||
|
nz-range-picker { |
||||||
|
background-color: rgba(0, 0, 0, 0); |
||||||
|
width: 100%; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
.tablebox { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
|
||||||
|
.operation { |
||||||
|
span { |
||||||
|
margin-right: 6px; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -1,15 +1,199 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { HttpClient } from '@angular/common/http'; |
||||||
|
import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; |
||||||
|
import { FormBuilder, FormGroup } from '@angular/forms'; |
||||||
|
import { NzModalService } from 'ng-zorro-antd/modal'; |
||||||
|
import { Observable, fromEvent } from 'rxjs'; |
||||||
|
import { debounceTime } from 'rxjs/operators'; |
||||||
|
import { TreeService } from 'src/app/service/tree.service'; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-audit-record', |
selector: 'app-audit-record', |
||||||
templateUrl: './audit-record.component.html', |
templateUrl: './audit-record.component.html', |
||||||
styleUrls: ['./audit-record.component.scss'] |
styleUrls: ['./audit-record.component.scss'] |
||||||
}) |
}) |
||||||
export class AuditRecordComponent implements OnInit { |
export class AuditRecordComponent implements OnInit { |
||||||
|
validateForm!: FormGroup; |
||||||
|
constructor(private element: ElementRef, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private toTree: TreeService, private http: HttpClient, private fb: FormBuilder) { } |
||||||
|
|
||||||
|
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 |
||||||
|
startdate |
||||||
|
enddate |
||||||
|
async ngOnInit(): Promise<void> { |
||||||
|
this.validateForm = this.fb.group({ |
||||||
|
type: [null], |
||||||
|
info: [null], |
||||||
|
organization: [null], |
||||||
|
datePicker: [null], |
||||||
|
level: [null], |
||||||
|
state: [null], |
||||||
|
}); |
||||||
|
//当前日期
|
||||||
|
let myDate: any = new Date(); |
||||||
|
let nowY = myDate.getFullYear(); |
||||||
|
let nowM = myDate.getMonth() + 1; |
||||||
|
let nowD = myDate.getDate(); |
||||||
|
this.enddate = nowY + "-" + (nowM < 10 ? "0" + nowM : nowM) + "-" + (nowD < 10 ? "0" + nowD : nowD);//当前日期
|
||||||
|
//获取三十天前日期
|
||||||
|
let lw = new Date(myDate - 1000 * 60 * 60 * 24 * 30);//最后一个数字30可改,30天的意思
|
||||||
|
let lastY = lw.getFullYear(); |
||||||
|
let lastM = lw.getMonth() + 1; |
||||||
|
let lastD = lw.getDate(); |
||||||
|
this.startdate = lastY + "-" + (lastM < 10 ? "0" + lastM : lastM) + "-" + (lastD < 10 ? "0" + lastD : lastD);//三十天之前日期
|
||||||
|
|
||||||
|
|
||||||
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
||||||
|
// 页面监听
|
||||||
|
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { |
||||||
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
||||||
|
}); |
||||||
|
|
||||||
|
this.getTypeList() |
||||||
|
|
||||||
|
await this.getAllOrganization() |
||||||
|
this.getRecordList() |
||||||
|
} |
||||||
|
SkipCount |
||||||
|
submitForm(): void { |
||||||
|
for (const i in this.validateForm.controls) { |
||||||
|
this.validateForm.controls[i].markAsDirty(); |
||||||
|
this.validateForm.controls[i].updateValueAndValidity(); |
||||||
|
} |
||||||
|
this.list = [] |
||||||
|
this.SkipCount = '0' |
||||||
|
// this.getRecordList()
|
||||||
|
} |
||||||
|
|
||||||
|
resetForm(e: MouseEvent): void { |
||||||
|
e.preventDefault(); |
||||||
|
this.validateForm.reset(); |
||||||
|
for (const key in this.validateForm.controls) { |
||||||
|
this.validateForm.controls[key].markAsPristine(); |
||||||
|
this.validateForm.controls[key].updateValueAndValidity(); |
||||||
|
} |
||||||
|
this.validateForm.patchValue({ |
||||||
|
organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, |
||||||
|
datePicker: [this.startdate, this.enddate], |
||||||
|
}); |
||||||
|
this.list = [] |
||||||
|
this.SkipCount = '0' |
||||||
|
// this.getViolateRecgordList()
|
||||||
|
} |
||||||
|
|
||||||
constructor() { } |
|
||||||
|
|
||||||
ngOnInit(): void { |
//获取所有组织机构
|
||||||
|
nodes: any = [] |
||||||
|
async getAllOrganization() { |
||||||
|
let OrganizationUnitId = JSON.parse(sessionStorage.getItem('userdata')).organization.id |
||||||
|
let params = { |
||||||
|
OrganizationUnitId: OrganizationUnitId, |
||||||
|
IsContainsChildren: "true" |
||||||
|
} |
||||||
|
await new Promise((resolve, reject) => { |
||||||
|
this.http.get('/api/services/app/Organization/GetAll', { |
||||||
|
params: params |
||||||
|
}).subscribe((data: any) => { |
||||||
|
data.result.items.forEach(element => { |
||||||
|
if (element.id == OrganizationUnitId) { |
||||||
|
element.parentId = null |
||||||
|
} |
||||||
|
element.key = element.id |
||||||
|
element.title = element.displayName |
||||||
|
}); |
||||||
|
this.nodes = [...this.toTree.toTree(data.result.items)] |
||||||
|
console.log('组织机构列表', this.nodes) |
||||||
|
this.validateForm.patchValue({ |
||||||
|
organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, |
||||||
|
datePicker: [this.startdate, this.enddate], |
||||||
|
}); |
||||||
|
resolve(data) |
||||||
|
|
||||||
|
}) |
||||||
|
}) |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
//证照类型
|
||||||
|
typeLoading |
||||||
|
typeList |
||||||
|
getTypeList() { |
||||||
|
this.typeLoading = true |
||||||
|
let promiseArr = [] |
||||||
|
let api = ['/api/services/app/ValidityLicenseType/GetAll', '/api/services/app/FileLicenseType/GetAll'] |
||||||
|
api.forEach(element => { |
||||||
|
promiseArr.push( |
||||||
|
new Promise((resolve, reject) => { |
||||||
|
this.http.get(element, { |
||||||
|
params: { |
||||||
|
SkipCount: '0', |
||||||
|
MaxResultCount: '999' |
||||||
|
} |
||||||
|
}).subscribe({ |
||||||
|
next: (data) => { |
||||||
|
resolve(data) |
||||||
|
}, |
||||||
|
error: err => { |
||||||
|
reject(err) |
||||||
|
} |
||||||
|
}) |
||||||
|
}) |
||||||
|
) |
||||||
|
}); |
||||||
|
|
||||||
|
Promise.all(promiseArr).then((result) => { |
||||||
|
|
||||||
|
let arr = [{ licenseName: '油站信息' }] |
||||||
|
result.forEach(item => { |
||||||
|
arr = arr.concat(item.result.items) |
||||||
|
}); |
||||||
|
this.typeLoading = false |
||||||
|
this.typeList = arr |
||||||
|
// console.log('证照类型', arr)
|
||||||
|
}).catch((error) => { |
||||||
|
console.log('证照类型', error) |
||||||
|
}) |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
//历史记录列表
|
||||||
|
totalCount//列表总数
|
||||||
|
tableSpin = false |
||||||
|
getRecordList() { |
||||||
|
console.log('获得历史记录列表') |
||||||
|
let params = { |
||||||
|
// Level: this.validateForm.value.level,
|
||||||
|
// ViolationIds: ViolationIds,
|
||||||
|
// ViolateArea: this.validateForm.value.site,
|
||||||
|
// OrganizationUnitId: this.validateForm.value.organization,
|
||||||
|
// IsContainsChildren: 'true',
|
||||||
|
// IsHandled: disposalState,
|
||||||
|
// ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null,
|
||||||
|
// SkipCount: this.SkipCount,
|
||||||
|
// MaxResultCount: this.MaxResultCount,
|
||||||
|
// Positive: this.validateForm.value.misinformation
|
||||||
|
} |
||||||
|
// this.tableSpin = true
|
||||||
|
// this.http.get('/api/services/app/ViolateRecord/GetAll', {
|
||||||
|
// params: params
|
||||||
|
// }).subscribe((data: any) => {
|
||||||
|
// this.list = this.list.concat(data.result.items);
|
||||||
|
// this.list = [...this.list]
|
||||||
|
// this.totalCount = data.result.totalCount
|
||||||
|
// console.log('违规记录列表', data)
|
||||||
|
// this.tableSpin = false
|
||||||
|
// })
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
ngAfterViewInit(): void { |
||||||
|
fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件
|
||||||
|
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) { |
||||||
|
if (this.totalCount > this.list.length) { |
||||||
|
console.log('需要加载数据了', event) |
||||||
|
this.SkipCount = String(Number(this.SkipCount) + 50) |
||||||
|
this.getRecordList() |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -0,0 +1,9 @@ |
|||||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||||
|
|
||||||
|
@Pipe({ name: 'auditStatus' }) |
||||||
|
export class auditStatusPipe implements PipeTransform { |
||||||
|
transform(value: number): string { |
||||||
|
let arr = ['未提交审核', '审核中', '审核通过', '审核驳回', '已撤销审核', '审核完成'] |
||||||
|
return arr[value] |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue