diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.ts b/src/app/pages/audit/audit-ing/audit-ing.component.ts
index aeb9def..03f20df 100644
--- a/src/app/pages/audit/audit-ing/audit-ing.component.ts
+++ b/src/app/pages/audit/audit-ing/audit-ing.component.ts
@@ -1,5 +1,5 @@
import { HttpClient } from '@angular/common/http';
-import { Component, OnInit, ViewContainerRef } from '@angular/core';
+import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { Observable, fromEvent } from 'rxjs';
@@ -17,7 +17,7 @@ import { AuditDisposeComponent } from './audit-dispose/audit-dispose.component';
})
export class AuditIngComponent implements OnInit {
- constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef,private http: HttpClient,private message: NzMessageService) { }
+ constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef,private http: HttpClient,private message: NzMessageService,private element: ElementRef) { }
tableSpin = false
tableScrollHeight
@@ -30,9 +30,21 @@ export class AuditIngComponent implements OnInit {
this.getStationList()
}
+ 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) {
+ this.SkipCount = String(Number(this.SkipCount) + 50)
+ this.getStationList()
+ }
+ }
+ });
+ }
+
list = []
- SkipCount: string = '0'
- MaxResultCount: string = '100'
+ totalCount;//列表总数
+ SkipCount: string = '0';
+ MaxResultCount: string = '100';
//获取当前油站档案类证照
getStationList() {
this.tableSpin = true
@@ -48,7 +60,9 @@ export class AuditIngComponent implements OnInit {
info.result.items.forEach(element => {
element.itemData = JSON.parse(element.itemData)
});
- this.list = info.result.items || []
+ this.list = this.list.concat(info.result.items);
+ this.list = [...this.list]
+ this.totalCount = info.result.totalCount
this.tableSpin = false
console.log(this.list)
})
diff --git a/src/app/pages/audit/audit-record/audit-record.component.html b/src/app/pages/audit/audit-record/audit-record.component.html
index fed8094..86d42a5 100644
--- a/src/app/pages/audit/audit-record/audit-record.component.html
+++ b/src/app/pages/audit/audit-record/audit-record.component.html
@@ -53,6 +53,7 @@
+
@@ -92,7 +93,7 @@
审批信息 |
加油站名称 |
- 区域 |
+ 区域 |
省公司 |
提交时间 |
审批状态 |
@@ -102,16 +103,21 @@
- 审批类型
+ {{item.auditTitle || ''}}
+ |
+
+ 油站信息
+ 更新类证照提醒时间
+ 更新类证照
+ 档案类证照
|
- 审批信息 |
- 加油站名称 |
- 区域 |
- 省公司 |
- 提交时间 |
- 审批状态 |
+ |
+ |
+ |
+ {{item.committedTime | date:"yyyy/MM/dd"}} |
+ {{item.auditStatusDesc}} |
- 详情
+ 详情
|
diff --git a/src/app/pages/audit/audit-record/audit-record.component.ts b/src/app/pages/audit/audit-record/audit-record.component.ts
index bc1dd22..3627804 100644
--- a/src/app/pages/audit/audit-record/audit-record.component.ts
+++ b/src/app/pages/audit/audit-record/audit-record.component.ts
@@ -5,6 +5,11 @@ 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';
+import { DetailsFileCategoryComponent } from '../../license/file-category/details-file-category/details-file-category.component';
+import { DetailsUpdateCategoryComponent } from '../../license/update-category/details-update-category/details-update-category.component';
+import { AuditDetailsInformTimeComponent } from '../audit-inform-time/audit-details-inform-time/audit-details-inform-time.component';
+import { GasBaseInfoComponent } from '../gas-base-info/gas-base-info.component';
+
@Component({
selector: 'app-audit-record',
templateUrl: './audit-record.component.html',
@@ -14,7 +19,7 @@ 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]
+ list = []
tableScrollHeight
startdate
@@ -41,7 +46,6 @@ export class AuditRecordComponent implements OnInit {
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) => {
@@ -49,38 +53,34 @@ export class AuditRecordComponent implements OnInit {
});
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();
+ if (this.validateForm.value.datePicker[0].toLocaleDateString) {
+ this.validateForm.value.datePicker[0] = this.validateForm.value.datePicker[0].toLocaleDateString()
+ }
+ if (this.validateForm.value.datePicker[1].toLocaleDateString) {
+ this.validateForm.value.datePicker[1] = this.validateForm.value.datePicker[1].toLocaleDateString()
}
this.list = []
this.SkipCount = '0'
- // this.getRecordList()
+ 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()
+ this.getRecordList()
}
-
//获取所有组织机构
nodes: any = []
async getAllOrganization() {
@@ -101,7 +101,6 @@ export class AuditRecordComponent implements OnInit {
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],
@@ -148,48 +147,103 @@ export class AuditRecordComponent implements OnInit {
});
this.typeLoading = false
this.typeList = arr
- // console.log('证照类型', arr)
}).catch((error) => {
- console.log('证照类型', error)
+
})
}
-
//历史记录列表
totalCount//列表总数
tableSpin = false
+ SkipCount: string = '0'
+ MaxResultCount: string = '100'
getRecordList() {
- console.log('获得历史记录列表')
+ this.tableSpin = true
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
+ IsContainsChildren: 'true',
+ OrganizationUnitId: this.validateForm.value.organization,
+ AuditTitle: this.validateForm.value.type,
+ AuditType: this.validateForm.value.info,
+ StartTime: this.validateForm.value.datePicker[0],
+ EndTime: this.validateForm.value.datePicker[1],
+ AuditStatuses: this.validateForm.value.state,
+ AuditLevel: this.validateForm.value.level,
+ Sorting: null,
+ SkipCount: this.SkipCount,
+ MaxResultCount: this.MaxResultCount,
}
- // 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
- // })
+ this.http.get('/api/services/app/ContentAuditLog/GetHistory', {params}).subscribe((data: any) => {
+ this.list = this.list.concat(data.result.items);
+ this.list = [...this.list]
+ this.totalCount = data.result.totalCount
+ this.tableSpin = false
+ console.log('审核历史纪录', this.list)
+ })
+ }
+
+ details(item) {
+ let component
+ if (item.auditType == 0) {
+ component = GasBaseInfoComponent
+ } else if (item.auditType == 1) {
+ component = AuditDetailsInformTimeComponent
+ } else if (item.auditType == 2) {
+ component = DetailsUpdateCategoryComponent
+ } else if (item.auditType) {
+ component = DetailsFileCategoryComponent
+ }
+ this.getData(item).then(res=>{
+ item.getData = res
+ const modal = this.modal.create({
+ nzContent: component,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: item.auditType == 0? 700 : 450,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzStyle: {
+ 'top': '50px',
+ },
+ nzComponentParams: {
+ data: item.getData
+ },
+ nzFooter: null,
+ nzClosable: false,
+ });
+ })
}
+ //获取证照类data
+ getData(item) {
+ let url
+ if (item.auditType == 0) { //油站基本信息
+ return new Promise((resolve, reject)=>{
+ let organization = { organizationId: item.organizationId }
+ resolve(organization)
+ })
+ } else if (item.auditType == 1) {
+ url = '/api/services/app/OrganizationValidityLicenseRule/Get'
+ } else if (item.auditType == 2) {
+ url = '/api/services/app/StationValidityLicense/Get'
+ } else if (item.auditType) {
+ url = '/api/services/app/StationFileLicense/Get'
+ }
+ return new Promise((resolve, reject)=>{
+ let params = { id: item.itemId }
+ this.http.get(url,{params}).subscribe((data: any)=>{
+ resolve(data.result)
+ })
+ })
+ }
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()
}
diff --git a/src/app/pages/audit/gas-base-info/gas-base-info.component.html b/src/app/pages/audit/gas-base-info/gas-base-info.component.html
index 27b9f18..462e684 100644
--- a/src/app/pages/audit/gas-base-info/gas-base-info.component.html
+++ b/src/app/pages/audit/gas-base-info/gas-base-info.component.html
@@ -89,12 +89,7 @@
{{item.creationTime | date:"yyyy/MM/dd"}}
- 无
- 审核中
- 审核通过
- 审核驳回
- 已撤销审核
- 审核完成
+ {{item.auditStatus | auditStatus}}
-->
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 da5183d..ff37dda 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
@@ -29,12 +29,7 @@
{{item.creationTime | date:"yyyy/MM/dd"}}
- 无
- 审核中
- 审核通过
- 审核驳回
- 已撤销审核
- 审核完成
+ {{item.auditStatus | auditStatus}}
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 d5aa61f..5ad7f2b 100644
--- a/src/app/pages/license/file-category/file-category.component.html
+++ b/src/app/pages/license/file-category/file-category.component.html
@@ -29,18 +29,13 @@
{{item.committedTime | date:"yyyy/MM/dd"}}未提交审核 |
- 无
- 审核中
- 审核通过
- 审核驳回
- 未提交审核
- 审核完成
+ {{item.auditStatus | auditStatus}}
|
编辑
详情
撤销审核
- 提交审核
+ 提交审核
审核完成
|
diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.html b/src/app/pages/license/update-category/details-update-category/details-update-category.component.html
index 64cad8a..415c4e9 100644
--- a/src/app/pages/license/update-category/details-update-category/details-update-category.component.html
+++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.html
@@ -39,12 +39,7 @@
{{item.creationTime | date:"yyyy/MM/dd"}}
- 无
- 审核中
- 审核通过
- 审核驳回
- 已撤销审核
- 审核完成
+ {{item.auditStatus | auditStatus}}
diff --git a/src/app/pages/license/update-category/update-category.component.html b/src/app/pages/license/update-category/update-category.component.html
index 5a29bec..bf1421f 100644
--- a/src/app/pages/license/update-category/update-category.component.html
+++ b/src/app/pages/license/update-category/update-category.component.html
@@ -36,12 +36,7 @@
是否 |
{{item.committedTime | date:"yyyy/MM/dd"}}未提交审核 |
- 无
- 审核中
- 审核通过
- 审核驳回
- 未提交审核
- 审核完成
+ {{item.auditStatus | auditStatus}}
|
无
@@ -53,7 +48,7 @@
编辑
详情
撤销审核
- 提交审核
+ 提交审核
审核完成
|