From 16d7154508d8d7e64a84c8c516bf7aae08e440c5 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 23 May 2022 16:45:20 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E5=BE=85=E5=8A=9E,=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../audit-dispose/audit-dispose.component.html | 12 ++++++------ .../audit/audit-ing/audit-ing.component.html | 18 ++++++++---------- .../audit/audit-nav/audit-nav.component.ts | 4 ++-- .../audit-record/audit-record.component.html | 18 +++++++++++------- src/app/pages/home/home.component.html | 2 +- .../pages/plan-admin/plan-admin.component.html | 2 +- 6 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html index 0ed445b..b52cd69 100644 --- a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html @@ -13,7 +13,7 @@

公司名称:   {{data.organization.displayName}}

-

证件名称:   {{data.getData.licenseType.licenseName}}

+

证照名称:   {{data.getData.licenseType.licenseName}}

办理提醒时间:修改时间   {{data.getData.handleRemindDays}}天 @@ -28,11 +28,11 @@

修改说明:   {{data.getData.remark}}

-

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

+

证照名称:   {{data.getData.licenseTypeName}}

-

证件编号:   {{data.getData.licenseCode || ''}}

+

证照编号:   {{data.getData.licenseCode || ''}}

-

证件有效期:   {{data.getData.validityStartTime | date:"yyyy/MM/dd"}} - {{data.getData.validityEndTime | date:"yyyy/MM/dd"}}

+

证照效期:   {{data.getData.validityStartTime | date:"yyyy/MM/dd"}} - {{data.getData.validityEndTime | date:"yyyy/MM/dd"}}

办理类型:   {{getHandleTypes(data.getData.handleTypes)}}

@@ -41,12 +41,12 @@

是否年检:   

-

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

+

证照名称:   {{data.getData.licenseTypeName}}

有无证照:   不适用

-

证件图片:    +

附件:    diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.html b/src/app/pages/audit/audit-ing/audit-ing.component.html index c03a84a..5132fc0 100644 --- a/src/app/pages/audit/audit-ing/audit-ing.component.html +++ b/src/app/pages/audit/audit-ing/audit-ing.component.html @@ -9,11 +9,11 @@ 审批信息 加油站名称 - 区域 - 省公司 - 提交时间 - 审批状态 - 操作 + 区域名称 + 省公司名称 + + 审批 @@ -36,13 +36,11 @@ - - - {{item.committedTime | date:"yyyy/MM/dd HH:mm:ss" }} - {{item.auditStatusDesc}} + - 处置 + 审批 详情 diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.ts b/src/app/pages/audit/audit-nav/audit-nav.component.ts index 08f23b6..b455214 100644 --- a/src/app/pages/audit/audit-nav/audit-nav.component.ts +++ b/src/app/pages/audit/audit-nav/audit-nav.component.ts @@ -10,8 +10,8 @@ export class AuditNavComponent implements OnInit { constructor() { } - navList = ['审批', '历史纪录'] - selectedItem = '审批' + navList = ['待办', '审批记录'] + selectedItem = '待办' selectNav(item) { this.selectedItem = item } 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 70597bf..d764a62 100644 --- a/src/app/pages/audit/audit-record/audit-record.component.html +++ b/src/app/pages/audit/audit-record/audit-record.component.html @@ -91,11 +91,13 @@ 审批类型 审批信息 - 加油站名称 - 区域 + 省公司 - 提交时间 - 审批状态 + 申请人 + 审批时间 + 审批人 + 操作 @@ -110,8 +112,8 @@ 更新类证照 档案类证照 - - + @@ -120,8 +122,10 @@ + {{item.creatorUser.name}} {{item.committedTime | date:"yyyy/MM/dd HH:mm:ss"}} - {{item.auditStatusDesc}} + {{item.auditUser.name}} + 详情 diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 27657a1..0781041 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -20,7 +20,7 @@ 预警记录

  • - 审批 + 证照管理
  • diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html index 7209128..d8495ef 100644 --- a/src/app/pages/plan-admin/plan-admin.component.html +++ b/src/app/pages/plan-admin/plan-admin.component.html @@ -30,7 +30,7 @@
    - 站点管理 + 油站管理 更新类证照 档案类证照
    From 194f251f531025f5fab96d4f6dc8c77eac03a473 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 24 May 2022 11:35:50 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E7=BB=8F=E8=90=A5=E7=B1=BB=E8=AF=81?= =?UTF-8?q?=E7=85=A7=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../audit-inform-time.component.html | 16 +++++++--------- .../add-update-of-license.component.html | 16 +++++++++++++++- .../add-update-of-license.component.ts | 8 +++++++- .../edit-update-of-license.component.html | 16 +++++++++++++++- .../edit-update-of-license.component.ts | 7 ++++++- .../update-of-license.component.ts | 9 ++++++--- 6 files changed, 56 insertions(+), 16 deletions(-) diff --git a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html index aadc2ca..45c4f47 100644 --- a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html +++ b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html @@ -9,8 +9,8 @@ 办理提醒时间 临期提醒时间 - 提交审核时间 - 审核状态 + 操作 @@ -29,14 +29,12 @@ {{item.handleRemindDays}}天 {{item.closingRemindDaysDefault}}天 {{item.closingRemindDays}}天 - {{(item.auditLog && item.auditLog.committedTime) ? (item.auditLog.committedTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}} - {{item.auditStatus | auditStatus}} + - 编辑 - 撤销审核 - 审核详情 + 编辑 + 撤销审核 + 详情 diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html index 7983bdb..576c104 100644 --- a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html @@ -26,9 +26,23 @@ 是否年检 - + + + 是否需要上传附件 + + + + + + 办理类型 + + + + + +
    \ No newline at end of file diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts index ca3640d..083c833 100644 --- a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts @@ -2,6 +2,7 @@ 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 { handleType,handleTypeList } from 'src/app/pages/license/inform/inform.component'; @Component({ @@ -19,10 +20,15 @@ export class AddUpdateOfLicenseComponent implements OnInit { name: [null, [Validators.required]], handleRemindDays: [90, [Validators.required]], closingRemindDays: [30, [Validators.required]], - isYearlyCheck: [true, [Validators.required]] + isYearlyCheck: [true, [Validators.required]], + hasAttachment: [false, [Validators.required]], + handleTypes: [[], [Validators.required]] }); } destroyModal(): void { this.modal.destroy({ data: 'this the result data' }); } + + handleTypeList: handleTypeList[] = new handleType().list; //办理类型list + } diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html index 7983bdb..576c104 100644 --- a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html @@ -26,9 +26,23 @@ 是否年检 - + + + 是否需要上传附件 + + + + + + 办理类型 + + + + + +
    \ No newline at end of file diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts index 13fd904..e48067f 100644 --- a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts @@ -2,6 +2,7 @@ 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 { handleType,handleTypeList } from 'src/app/pages/license/inform/inform.component'; @Component({ selector: 'app-edit-update-of-license', @@ -19,11 +20,15 @@ export class EditUpdateOfLicenseComponent implements OnInit { name: [this.data.licenseName, [Validators.required]], handleRemindDays: [this.data.handleRemindDays, [Validators.required]], closingRemindDays: [this.data.closingRemindDays, [Validators.required]], - isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]] + isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]], + hasAttachment: [this.data.hasAttachment, [Validators.required]], + handleTypes: [this.data.handleTypes, [Validators.required]] }); } destroyModal(): void { this.modal.destroy({ data: 'this the result data' }); } + handleTypeList: handleTypeList[] = new handleType().list; //办理类型list + } diff --git a/src/app/system-management/update-of-license/update-of-license.component.ts b/src/app/system-management/update-of-license/update-of-license.component.ts index 19df34e..6514fb5 100644 --- a/src/app/system-management/update-of-license/update-of-license.component.ts +++ b/src/app/system-management/update-of-license/update-of-license.component.ts @@ -48,12 +48,13 @@ export class UpdateOfLicenseComponent implements OnInit { nzOnOk: async () => { if (instance.validateForm.valid) { await new Promise(resolve => { - console.log('表单信息', instance.validateForm) let body = { licenseName: instance.validateForm.value.name, handleRemindDays: instance.validateForm.value.handleRemindDays, closingRemindDays: instance.validateForm.value.closingRemindDays, - isYearlyCheck: instance.validateForm.value.isYearlyCheck + isYearlyCheck: instance.validateForm.value.isYearlyCheck, + hasAttachment: instance.validateForm.value.hasAttachment, + handleTypes: instance.validateForm.value.handleTypes, } this.http.post('/api/services/app/ValidityLicenseType/Create', body).subscribe(data => { resolve(data) @@ -93,7 +94,9 @@ export class UpdateOfLicenseComponent implements OnInit { licenseName: instance.validateForm.value.name, handleRemindDays: instance.validateForm.value.handleRemindDays, closingRemindDays: instance.validateForm.value.closingRemindDays, - isYearlyCheck: instance.validateForm.value.isYearlyCheck + isYearlyCheck: instance.validateForm.value.isYearlyCheck, + hasAttachment: instance.validateForm.value.hasAttachment, + handleTypes: instance.validateForm.value.handleTypes, } this.http.put('/api/services/app/ValidityLicenseType/Update', body).subscribe(data => { resolve(data) From 7b5d1b0de656fb351fe07cd5ab72875d1f7be120 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 24 May 2022 14:20:32 +0800 Subject: [PATCH 03/19] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=B1=BB=E8=AF=81=E7=85=A7=E7=AE=A1=E7=90=86=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=BB=9F=E4=B8=80=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/http-interceptors/base-interceptor.ts | 3 ++ .../audit/audit-ing/audit-ing.component.ts | 24 ++++++------- .../audit-record/audit-record.component.html | 2 +- .../oil-unloading-process-list.component.html | 2 +- .../oil-unloading-process-list.component.ts | 30 +++++++++------- .../add-update-of-license.component.html | 20 ++++++++++- .../add-update-of-license.component.ts | 14 ++++++++ .../edit-update-of-license.component.html | 16 +++++++++ .../edit-update-of-license.component.ts | 15 +++++++- .../update-of-license.component.html | 4 +++ .../update-of-license.component.ts | 36 +++++++++++++++++-- 11 files changed, 135 insertions(+), 31 deletions(-) diff --git a/src/app/http-interceptors/base-interceptor.ts b/src/app/http-interceptors/base-interceptor.ts index de1f108..f2f0af6 100644 --- a/src/app/http-interceptors/base-interceptor.ts +++ b/src/app/http-interceptors/base-interceptor.ts @@ -86,6 +86,9 @@ export class BaseInterceptor implements HttpInterceptor { if (error.status === 500) { this.message.create('error', `状态500,服务器错误!${error.error.message}`); } + if (error.status === 404) { + this.message.create('error', `实体未找到!`); + } if (error.error instanceof ErrorEvent) { // 发生客户端或网络错误。相应处理。 console.error('An error occurred:', error.error.message); 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 b482f0f..05065b8 100644 --- a/src/app/pages/audit/audit-ing/audit-ing.component.ts +++ b/src/app/pages/audit/audit-ing/audit-ing.component.ts @@ -103,19 +103,19 @@ export class AuditIngComponent implements OnInit { nzClosable: false, nzOnOk: async () => { await new Promise(resolve => { - let url - if (item.auditType == 0) { - url = '/api/services/app/GasStation/Audit' - } else if (item.auditType == 1) { - url = '/api/services/app/OrganizationValidityLicenseRule/Audit' - } else if (item.auditType == 2) { - url = '/api/services/app/StationValidityLicense/Audit' - } else if (item.auditType) { - url = '/api/services/app/StationFileLicense/Audit' - } + let url = '/api/services/app/ContentAuditLog/Audit' + // if (item.auditType == 0) { + // url = '/api/services/app/GasStation/Audit' + // } else if (item.auditType == 1) { + // url = '/api/services/app/OrganizationValidityLicenseRule/Audit' + // } else if (item.auditType == 2) { + // url = '/api/services/app/StationValidityLicense/Audit' + // } else if (item.auditType) { + // url = '/api/services/app/StationFileLicense/Audit' + // } let params = { - id: item.auditType == 0 ? item.gasStation.id : item.getData.id, - remark: instance.textarea + id: item.id, + rejectReason: instance.textarea } let body = instance.isPass ? 2 : 3; this.http.post(url, body, { params }).subscribe(data => { 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 d764a62..d04aa23 100644 --- a/src/app/pages/audit/audit-record/audit-record.component.html +++ b/src/app/pages/audit/audit-record/audit-record.component.html @@ -123,7 +123,7 @@ {{item.creatorUser.name}} - {{item.committedTime | date:"yyyy/MM/dd HH:mm:ss"}} + {{item.auditTime | date:"yyyy/MM/dd HH:mm:ss"}} {{item.auditUser.name}} diff --git a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html index 6461337..6401701 100644 --- a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html +++ b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html @@ -36,7 +36,7 @@
    - 近30天卸油作业总数走势 + 近30天卸油作业走势
    diff --git a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts index 0d3f4e4..83bfacf 100644 --- a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts +++ b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts @@ -235,7 +235,7 @@ export class OilUnloadingProcessListComponent implements OnInit { barWidth: '25%' }, { - name: '卸油事件', + name: '卸油预警', data: [], type: 'line', symbol: 'circle', @@ -254,17 +254,17 @@ export class OilUnloadingProcessListComponent implements OnInit { } } ], - // legend: { - // selectedMode: false, // 是否允许点击 - // data: ['卸油事件'], - // textStyle: { - // color: '#fff' - // }, - // right: 28, - // top: 18, - // itemWidth: 8, - // itemHeight: 8, - // }, + legend: { + selectedMode: false, // 是否允许点击 + data: ['卸油事件','卸油预警'], + textStyle: { + color: '#fff' + }, + right: 28, + top: 18, + itemWidth: 8, + itemHeight: 8, + }, grid: { left: '42px', right: '30px', @@ -495,13 +495,17 @@ export class OilUnloadingProcessListComponent implements OnInit { //柱状图 let monthArr = [] let valuedata = [] + let valuedata2 = [] data.list.forEach(element => { monthArr.push(moment(element.key).format('MM.DD')) valuedata.push(element.totalCount) + let item = Number(element.proccessBeforeCount + element.proccessingCount) + valuedata2.push(item) }); + // console.log('卸油预警',valuedata2) this.oilchartbarOption.xAxis.data = monthArr this.oilchartbarOption.series[0].data = valuedata - this.oilchartbarOption.series[1].data = valuedata + this.oilchartbarOption.series[1].data = valuedata2 this.mybarChart.setOption(this.oilchartbarOption); } refreshEchartsData2(data) { diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html index 7983bdb..3942876 100644 --- a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html @@ -24,9 +24,27 @@ + + + 办理类型 + + + + + + + + + + 是否上传副本 + + + + + 是否年检 - + diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts index ca3640d..d88cc52 100644 --- a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts @@ -13,12 +13,26 @@ export class AddUpdateOfLicenseComponent implements OnInit { validateForm!: FormGroup; constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } + handleTypeList = [ + { value: 0, name: "无" }, + { value: 1, name: "年度公示" }, + { value: 2, name: "年检" }, + { value: 3, name: "到期换证" }, + { value: 4, name: "年度执行报告" }, + { value: 5, name: "到期检测" }, + { value: 6, name: "年度复训" }, + { value: 7, name: "年度检测" }, + { value: 8, name: "到期备案" }, + { value: 9, name: "到期评价" }, + ] ngOnInit(): void { this.validateForm = this.fb.group({ name: [null, [Validators.required]], handleRemindDays: [90, [Validators.required]], closingRemindDays: [30, [Validators.required]], + handleType: [null, [Validators.required]], + isEctype: [true, [Validators.required]], isYearlyCheck: [true, [Validators.required]] }); } diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html index 7983bdb..7e1e0c0 100644 --- a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html @@ -24,6 +24,22 @@ + + 办理类型 + + + + + + + + + + 是否上传副本 + + + + 是否年检 diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts index 13fd904..73cc1e0 100644 --- a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts @@ -13,12 +13,25 @@ export class EditUpdateOfLicenseComponent implements OnInit { @Input() data?: any; validateForm!: FormGroup; constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } - + handleTypeList = [ + { value: 0, name: "无" }, + { value: 1, name: "年度公示" }, + { value: 2, name: "年检" }, + { value: 3, name: "到期换证" }, + { value: 4, name: "年度执行报告" }, + { value: 5, name: "到期检测" }, + { value: 6, name: "年度复训" }, + { value: 7, name: "年度检测" }, + { value: 8, name: "到期备案" }, + { value: 9, name: "到期评价" }, + ] ngOnInit(): void { this.validateForm = this.fb.group({ name: [this.data.licenseName, [Validators.required]], handleRemindDays: [this.data.handleRemindDays, [Validators.required]], closingRemindDays: [this.data.closingRemindDays, [Validators.required]], + handleType: [this.data.handleTypes, [Validators.required]], + isEctype: [this.data.hasAttachment, [Validators.required]], isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]] }); } diff --git a/src/app/system-management/update-of-license/update-of-license.component.html b/src/app/system-management/update-of-license/update-of-license.component.html index 49b64d4..63f540c 100644 --- a/src/app/system-management/update-of-license/update-of-license.component.html +++ b/src/app/system-management/update-of-license/update-of-license.component.html @@ -16,6 +16,8 @@ 更新类证件 办理提醒时间 临期提醒时间 + 办理类型 + 是否上传副本 是否年检 操作 @@ -25,6 +27,8 @@ {{data.licenseName}} {{data.handleRemindDays}}天 {{data.closingRemindDays}}天 + {{getHandleTypes(data.handleTypes)}} + {{data.hasAttachment ? '是' : '否'}} {{data.isYearlyCheck ? '是' : '否'}} 编辑 diff --git a/src/app/system-management/update-of-license/update-of-license.component.ts b/src/app/system-management/update-of-license/update-of-license.component.ts index 19df34e..d1409e3 100644 --- a/src/app/system-management/update-of-license/update-of-license.component.ts +++ b/src/app/system-management/update-of-license/update-of-license.component.ts @@ -15,6 +15,9 @@ export class UpdateOfLicenseComponent implements OnInit { constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } + + + ngOnInit(): void { this.getLicense() } @@ -53,6 +56,8 @@ export class UpdateOfLicenseComponent implements OnInit { licenseName: instance.validateForm.value.name, handleRemindDays: instance.validateForm.value.handleRemindDays, closingRemindDays: instance.validateForm.value.closingRemindDays, + hasAttachment: instance.validateForm.value.isEctype, + handleTypes: instance.validateForm.value.handleType, isYearlyCheck: instance.validateForm.value.isYearlyCheck } this.http.post('/api/services/app/ValidityLicenseType/Create', body).subscribe(data => { @@ -93,6 +98,8 @@ export class UpdateOfLicenseComponent implements OnInit { licenseName: instance.validateForm.value.name, handleRemindDays: instance.validateForm.value.handleRemindDays, closingRemindDays: instance.validateForm.value.closingRemindDays, + hasAttachment: instance.validateForm.value.isEctype, + handleTypes: instance.validateForm.value.handleType, isYearlyCheck: instance.validateForm.value.isYearlyCheck } this.http.put('/api/services/app/ValidityLicenseType/Update', body).subscribe(data => { @@ -136,6 +143,31 @@ export class UpdateOfLicenseComponent implements OnInit { } }); } - - + handleTypeList = [ + { value: 0, name: "无" }, + { value: 1, name: "年度公示" }, + { value: 2, name: "年检" }, + { value: 3, name: "到期换证" }, + { value: 4, name: "年度执行报告" }, + { value: 5, name: "到期检测" }, + { value: 6, name: "年度复训" }, + { value: 7, name: "年度检测" }, + { value: 8, name: "到期备案" }, + { value: 9, name: "到期评价" }, + ] + //获取办理类型 + getHandleTypes(handleTypes: any[]): string { + if (!handleTypes || !handleTypes.length) { + return + } + let names: string[] = [] + let handleTypeList = JSON.parse(JSON.stringify(handleTypes)); + let list = this.handleTypeList; + handleTypeList.forEach(item => { + list.find(element => { + item == element.value ? names.push(element.name) : null + }) + }) + return names.join(',') + } } From adf48b8b396d057f8f0aefab010e56c71211b12f Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 24 May 2022 14:34:08 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=89=AF=E6=9C=ACui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../details-update-category.component.html | 2 +- .../edit-update-category.component.html | 20 ++++++++++++++++--- .../update-category.component.html | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) 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 9dfca80..72a69d6 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 @@ -13,7 +13,7 @@

    证件有效期:   {{data.validityStartTime | date:"yyyy/MM/dd"}} - {{data.validityEndTime | date:"yyyy/MM/dd"}}

    -

    办理类型:   {{getHandleTypes(data.handleTypes)}}

    +

    办理类型:   {{getHandleTypes(data.handleTypesDefault)}}

    有效期类型:   {{data.validityDays || 0}}天

    diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html index 4bbc24a..e2be913 100644 --- a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html +++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html @@ -38,7 +38,7 @@ - + @@ -53,12 +53,26 @@ -
    - + +
    + +
    + + + + + + +
    +
    + +
    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 4ced581..31ccdf6 100644 --- a/src/app/pages/license/update-category/update-category.component.html +++ b/src/app/pages/license/update-category/update-category.component.html @@ -35,7 +35,7 @@ - {{getHandleTypes(item.handleTypes)}} + {{getHandleTypes(item.handleTypesDefault)}} @@ -17,7 +17,7 @@
    - - + +
    \ No newline at end of file diff --git a/src/app/pages/license/histories/histories.component.html b/src/app/pages/license/histories/histories.component.html index 3dcfc90..8399f3a 100644 --- a/src/app/pages/license/histories/histories.component.html +++ b/src/app/pages/license/histories/histories.component.html @@ -5,10 +5,10 @@ - 证件名称 + 证照名称 - 证件编号 - 证件有效期 + 证照编号 + 证照有效期 有效期类型 办理类型 通知内容 diff --git a/src/app/pages/license/inform/inform.component.html b/src/app/pages/license/inform/inform.component.html index f77cf12..3e2b4b1 100644 --- a/src/app/pages/license/inform/inform.component.html +++ b/src/app/pages/license/inform/inform.component.html @@ -5,10 +5,10 @@ - 证件名称 + 证照名称 - 证件编号 - 证件有效期 + 证照编号 + 证照有效期 有效期类型 办理类型 通知内容 From 64fd80f92c245bf82066d61ef1ea29bc26a42651 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 24 May 2022 16:42:02 +0800 Subject: [PATCH 08/19] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=BB=8F=E8=90=A5=E7=B1=BB=E8=B5=84=E4=BA=A7=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/audit/audit-ing/audit-ing.component.html | 6 +++--- .../audit/audit-record/audit-record.component.html | 12 ++++++------ src/app/pages/plan-admin/plan-admin.component.html | 4 ++-- .../file-of-license/file-of-license.component.html | 4 ++-- .../navigation/navigation.component.html | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.html b/src/app/pages/audit/audit-ing/audit-ing.component.html index 5132fc0..544d120 100644 --- a/src/app/pages/audit/audit-ing/audit-ing.component.html +++ b/src/app/pages/audit/audit-ing/audit-ing.component.html @@ -23,9 +23,9 @@ 油站信息 - 更新类证照提醒时间 - 更新类证照 - 档案类证照 + 经营类证照提醒时间 + 经营类证照 + 资产类证照 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 d04aa23..3150ad0 100644 --- a/src/app/pages/audit/audit-record/audit-record.component.html +++ b/src/app/pages/audit/audit-record/audit-record.component.html @@ -14,9 +14,9 @@ - - - + + + @@ -108,9 +108,9 @@ 油站信息 - 更新类证照提醒时间 - 更新类证照 - 档案类证照 + 经营类证照提醒时间 + 经营类证照 + 资产类证照 diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html index d8495ef..8e910de 100644 --- a/src/app/pages/plan-admin/plan-admin.component.html +++ b/src/app/pages/plan-admin/plan-admin.component.html @@ -31,8 +31,8 @@
    油站管理 - 更新类证照 - 档案类证照 + 经营类证照 + 资产类证照
    diff --git a/src/app/system-management/file-of-license/file-of-license.component.html b/src/app/system-management/file-of-license/file-of-license.component.html index 75f0d11..f226ca6 100644 --- a/src/app/system-management/file-of-license/file-of-license.component.html +++ b/src/app/system-management/file-of-license/file-of-license.component.html @@ -1,7 +1,7 @@
    - 档案类证件列表 + 资产类证件列表
    From ee1c5d6e85c340c16880a428276982ff2f3be8eb Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 24 May 2022 16:48:15 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../audit-dispose.component.html | 35 +++++++++++++------ .../audit-dispose/audit-dispose.component.ts | 10 +++--- .../details-file-category.component.html | 4 +-- .../edit-file-category.component.html | 2 +- .../details-update-category.component.html | 27 ++++++++++---- .../details-update-category.component.ts | 10 +++--- .../edit-update-category.component.html | 18 +++------- .../edit-update-category.component.ts | 17 ++++++++- 8 files changed, 79 insertions(+), 44 deletions(-) diff --git a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html index c72c45b..02b58bd 100644 --- a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html @@ -37,32 +37,47 @@

    证照编号:   {{data.getData.licenseCode || ''}}

    -

    证照效期:   {{data.getData.validityStartTime | - date:"yyyy/MM/dd"}} - {{data.getData.validityEndTime | date:"yyyy/MM/dd"}}

    +

    证照效期:   {{data.getData.isLongTerm ? '长期证照' : (data.getData.validityEndTime | date:"yyyy/MM/dd")}}

    -

    办理类型:   {{getHandleTypes(data.getData.handleTypes)}}

    +

    办理类型:   {{getHandleTypes(data.getData.handleTypesDefault)}}

    -

    有效期类型:   {{data.getData.validityDays || 0}}天

    +

    有效天数:    + + 长期 + + + {{data.getData.validityDays ? data.getData.validityDays+'天' : '/'}} + +

    -

    是否年检:   

    +

    是否年检:   

    证照名称:   {{data.getData.licenseTypeName}}

    -

    有无证照:   不适用 +

    有无证照:    + 不适用

    +
    +

    说明:   {{data.getData.remark}}

    附件:    + src="../../../../assets/images/license/word.png" (click)="lookFile(data.getData.imageUrl)"> + src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.getData.imageUrl)">

    +

    附件副本:    + + + +

    审批意见:

    diff --git a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts index e09e7cd..2a9b9a5 100644 --- a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts @@ -85,15 +85,15 @@ export class AuditDisposeComponent implements OnInit { //查看文件 lookFile(item) { - if (!item.imageUrl) { + if (!item) { return } - if (this.getFileType(item.imageUrl) == 'word') { - let arr = item.imageUrl.split('.') + if (this.getFileType(item) == 'word') { + let arr = item.split('.') arr[arr.length - 1] = 'pdf' window.open(arr.join('.')) - } else if (this.getFileType(item.imageUrl) == 'pdf') { - window.open(item.imageUrl) + } else if (this.getFileType(item) == 'pdf') { + window.open(item) } else { this.message.create('warning', '暂不支持查看!'); } 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 44f6cc7..085f6bb 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,13 +7,13 @@
    -

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

    +

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

    有无证照:   不适用

    -

    证件图片:    +

    附件:    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 11ca6a3..f852a09 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 || ''}}

    +

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

    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 72a69d6..a9cbce2 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 @@ -7,24 +7,37 @@
    -

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

    +

    证照名称:   {{data.licenseTypeName || ''}}

    -

    证件编号:   {{data.licenseCode || ''}}

    +

    证照编号:   {{data.licenseCode || ''}}

    -

    证件有效期:   {{data.validityStartTime | date:"yyyy/MM/dd"}} - {{data.validityEndTime | date:"yyyy/MM/dd"}}

    +

    证照效期:   {{data.isLongTerm ? '长期证照' : (data.validityEndTime | date:"yyyy/MM/dd")}}

    办理类型:   {{getHandleTypes(data.handleTypesDefault)}}

    -

    有效期类型:   {{data.validityDays || 0}}天

    +

    有效天数:    + + 长期 + + + {{data.validityDays ? data.validityDays+'天' : '/'}} + +

    -

    证件图片:    +

    附件:    - - + +

    +

    附件副本:    + + + +

    +

    审核记录 diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts b/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts index 18de9d9..76ccfbb 100644 --- a/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts +++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts @@ -91,15 +91,15 @@ export class DetailsUpdateCategoryComponent implements OnInit { //查看文件 lookFile(item) { - if (!item.imageUrl) { + if (!item) { return } - if (this.getFileType(item.imageUrl) == 'word') { - let arr = item.imageUrl.split('.') + if (this.getFileType(item) == 'word') { + let arr = item.split('.') arr[arr.length - 1] = 'pdf' window.open(arr.join('.')) - } else if (this.getFileType(item.imageUrl) == 'pdf') { - window.open(item.imageUrl) + } else if (this.getFileType(item) == 'pdf') { + window.open(item) } else { this.message.create('warning', '暂不支持查看!'); } diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html index df178bf..ec85ad4 100644 --- a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html +++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html @@ -6,20 +6,20 @@

    -

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

    +

    证照名称: {{data2.licenseTypeName}}

    -

    证件编号*

    +

    证照编号*

    - + -

    证件有效期*

    +

    证照效期*

    - - + + + + -
    \ No newline at end of file diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.ts b/src/app/pages/audit/audit-nav/audit-nav.component.ts index b455214..fdee4fe 100644 --- a/src/app/pages/audit/audit-nav/audit-nav.component.ts +++ b/src/app/pages/audit/audit-nav/audit-nav.component.ts @@ -10,8 +10,8 @@ export class AuditNavComponent implements OnInit { constructor() { } - navList = ['待办', '审批记录'] - selectedItem = '待办' + navList = ['经营类证照', '资产类证照','待办', '审批记录'] + selectedItem = '经营类证照' selectNav(item) { this.selectedItem = item } diff --git a/src/app/pages/license/inform/inform.component.html b/src/app/pages/license/inform/inform.component.html index d5ca73b..180fe05 100644 --- a/src/app/pages/license/inform/inform.component.html +++ b/src/app/pages/license/inform/inform.component.html @@ -29,7 +29,7 @@ 长期 - {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}} + {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays +'天' : '/'}} {{getHandleTypes(item.licenseSnapshot.handleTypes)}} diff --git a/src/app/pages/plan-admin/file-license-list/file-license-list.component.html b/src/app/pages/plan-admin/file-license-list/file-license-list.component.html index 03619c9..f3de1cd 100644 --- a/src/app/pages/plan-admin/file-license-list/file-license-list.component.html +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.html @@ -1,8 +1,25 @@ -
    +
    diff --git a/src/app/pages/plan-admin/file-license-list/file-license-list.component.scss b/src/app/pages/plan-admin/file-license-list/file-license-list.component.scss index 06cfc17..16823c1 100644 --- a/src/app/pages/plan-admin/file-license-list/file-license-list.component.scss +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.scss @@ -1,10 +1,9 @@ .search { box-sizing: border-box; - padding-left: 38px; - padding-right: 35px; + padding-right: 5px; width: 100%; height: 32px; - margin: 12px 0; + margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; @@ -41,7 +40,8 @@ } .searchParams { - width: 35%; + width: 30%; + margin-left: 16px; } .btn { diff --git a/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts b/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts index 0418bb0..a9117ef 100644 --- a/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts @@ -11,6 +11,7 @@ import { debounceTime } from 'rxjs/operators'; import 'linqjs'; import { DetailsUpdateCategoryComponent } from '../../license/update-category/details-update-category/details-update-category.component'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzMessageService } from 'ng-zorro-antd/message'; @Component({ selector: 'app-file-license-list', @@ -20,27 +21,63 @@ import { NzModalService } from 'ng-zorro-antd/modal'; export class FileLicenseListComponent implements OnInit { validateForm!: FormGroup; - constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router) { } + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router, private message: NzMessageService) { } tableScrollHeight - ngOnInit(): void { + async ngOnInit(): Promise { this.tableScrollHeight = '100px' - console.log('tableScrollHeight', this.tableScrollHeight) // 页面监听 fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight - this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px' }); + + this.validateForm = this.fb.group({ + organization: [null], name: [null] }); this.tableSpin = true + + await this.getAllOrganization() + this.getStationLicenses() + } - ngAfterViewInit(): 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)] + this.validateForm.patchValue({ + organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + }); + resolve(data) + }) + }) + + } + + + ngAfterViewInit(): void { fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe(async (event: any) => { //监听 DOM 滚动事件 if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) { if (this.totalCount > this.list.length) { @@ -68,6 +105,9 @@ export class FileLicenseListComponent implements OnInit { this.validateForm.controls[key].markAsPristine(); this.validateForm.controls[key].updateValueAndValidity(); } + this.validateForm.patchValue({ + organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + }); this.list = [] this.SkipCount = '0' this.getStationLicenses() @@ -84,7 +124,7 @@ export class FileLicenseListComponent implements OnInit { async getStationLicenses() { let params = { StationName: this.validateForm.value.name, - OrganizationUnitId: String(sessionStorage.getItem('planAdminOrid')), + OrganizationUnitId: this.validateForm.value.organization, IsContainsChildren: 'true', SkipCount: this.SkipCount, MaxResultCount: this.MaxResultCount, @@ -124,18 +164,16 @@ export class FileLicenseListComponent implements OnInit { }); - - this.list = this.list.concat(arr); - this.list = [...this.list] - console.log('证照表格', this.list) - this.tableSpin = false - setTimeout(() => { let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight - this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px' }, 0); + this.list = this.list.concat(arr); + this.list = [...this.list] + console.log('证照表格', this.list) + this.tableSpin = false resolve(data) }) @@ -148,37 +186,28 @@ export class FileLicenseListComponent implements OnInit { } - lookDetails(i) { - // console.log(i) - // let params = { - // Id: i.licenseId - // } - // this.http.get('/api/services/app/StationValidityLicense/Get', { params: params }).subscribe((data: any) => { - // console.log('证照信息', data) - // const modal = this.modal.create({ - // nzContent: DetailsUpdateCategoryComponent, - // nzViewContainerRef: this.viewContainerRef, - // nzWidth: 450, - // nzBodyStyle: { - // 'border': '1px solid #91CCFF', - // 'border-radius': '0px', - // 'padding': '7px', - // 'box-shadow': '0 0 8px 0 #fff', - // 'background-image': 'linear-gradient(#003665, #000f25)' - // }, - // nzComponentParams: { - // data: data.result - // }, - // nzFooter: null, - // nzClosable: false, - // nzOnOk: async () => { - - // } - // }); - // const instance = modal.getContentComponent(); - // modal.afterClose.subscribe(result => { }); - // }) - - + exportExcel() { + // console.log(this.validateForm) + const httpOptions = { + responseType: 'blob' as 'json', + params: { + OrganizationUnitId: this.validateForm.value.organization + } + }; + this.http.get(`/api/services/app/StationFileLicense/ExportStationLicenses`, httpOptions).subscribe((data: any) => { + // console.log('导出成功') + // 文件名中有中文 则对文件名进行转码 + const link = document.createElement('a'); + const blob = new Blob([data], { type: 'application/vnd.ms-excel' }); + link.setAttribute('href', window.URL.createObjectURL(blob)); + link.setAttribute('download', '资产类证照' + '.xls'); + link.style.visibility = 'hidden'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + this.message.create('success', `导出成功`); + }, err => { + this.message.create('error', `导出失败`); + }) } } diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html index 8e910de..fa9c35b 100644 --- a/src/app/pages/plan-admin/plan-admin.component.html +++ b/src/app/pages/plan-admin/plan-admin.component.html @@ -30,9 +30,9 @@
    - 油站管理 - 经营类证照 - 资产类证照 + 油站管理 +
    @@ -40,11 +40,11 @@
    -
    +
    \ No newline at end of file diff --git a/src/app/pages/plan-admin/update-license-list/update-license-list.component.html b/src/app/pages/plan-admin/update-license-list/update-license-list.component.html index 70b6bb8..35d71c4 100644 --- a/src/app/pages/plan-admin/update-license-list/update-license-list.component.html +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.html @@ -1,4 +1,4 @@ -
    +
    @@ -51,7 +76,8 @@ - + {{i.value.endDate | date:"yyyy-MM-dd"}} diff --git a/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss b/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss index 06cfc17..f97ff1c 100644 --- a/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss @@ -1,10 +1,16 @@ +.box { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + .search { box-sizing: border-box; - padding-left: 38px; - padding-right: 35px; + padding-right: 5px; width: 100%; height: 32px; - margin: 12px 0; + margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; @@ -41,7 +47,8 @@ } .searchParams { - width: 35%; + width: 30%; + margin-left: 16px; } .btn { @@ -50,12 +57,6 @@ } } -.box { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; -} .tablebox { flex: 1; diff --git a/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts b/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts index 82abbfe..cf7e484 100644 --- a/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts @@ -11,6 +11,7 @@ import { debounceTime } from 'rxjs/operators'; import 'linqjs'; import { DetailsUpdateCategoryComponent } from '../../license/update-category/details-update-category/details-update-category.component'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzMessageService } from 'ng-zorro-antd/message'; @Component({ selector: 'app-update-license-list', templateUrl: './update-license-list.component.html', @@ -19,29 +20,64 @@ import { NzModalService } from 'ng-zorro-antd/modal'; export class UpdateLicenseListComponent implements OnInit { validateForm!: FormGroup; - constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router) { } + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router, private message: NzMessageService) { } tableScrollHeight - ngOnInit(): void { + async ngOnInit(): Promise { - this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' - - console.log('tableScrollHeight', this.tableScrollHeight) + this.tableScrollHeight = '100px' // 页面监听 fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { - this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px' }); + + this.validateForm = this.fb.group({ + organization: [null], name: [null] }); this.tableSpin = true + await this.getAllOrganization() + this.getStationLicenses() + + } + + //获取所有组织机构 + 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)] + this.validateForm.patchValue({ + organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + }); + resolve(data) + }) + }) + } - ngAfterViewInit(): void { + + ngAfterViewInit(): void { fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe(async (event: any) => { //监听 DOM 滚动事件 if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) { if (this.totalCount > this.list.length) { @@ -71,6 +107,9 @@ export class UpdateLicenseListComponent implements OnInit { } this.list = [] this.SkipCount = '0' + this.validateForm.patchValue({ + organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + }); this.getStationLicenses() } @@ -79,17 +118,14 @@ export class UpdateLicenseListComponent implements OnInit { //获取点击组织机构的所有加油站 SkipCount: string = '0' MaxResultCount: string = '100' - - orId list: any = [] async getStationLicenses() { let params = { StationName: this.validateForm.value.name, - OrganizationUnitId: String(sessionStorage.getItem('planAdminOrid')), + OrganizationUnitId: this.validateForm.value.organization, IsContainsChildren: 'true', SkipCount: this.SkipCount, - MaxResultCount: this.MaxResultCount, - // Sorting: ' BuildingBasicInfo.Id asc' + MaxResultCount: this.MaxResultCount } this.tableSpin = true await new Promise((resolve, reject) => { @@ -122,22 +158,21 @@ export class UpdateLicenseListComponent implements OnInit { } let atLastArr = newArr.concat(newElement); arr.push(atLastArr) - + setTimeout(() => { + let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' + }, 0); }); + setTimeout(() => { + let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px' + }, 0); this.list = this.list.concat(arr); this.list = [...this.list] console.log('证照表格', this.list) this.tableSpin = false - - setTimeout(() => { - let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight - this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' - }, 0); - - - resolve(data) }) }) @@ -154,7 +189,7 @@ export class UpdateLicenseListComponent implements OnInit { let params = { Id: i.licenseId } - this.http.get('/api/services/app/StationValidityLicense/Get', { params: params }).subscribe((data:any) => { + this.http.get('/api/services/app/StationValidityLicense/Get', { params: params }).subscribe((data: any) => { console.log('证照信息', data) const modal = this.modal.create({ nzContent: DetailsUpdateCategoryComponent, @@ -182,4 +217,31 @@ export class UpdateLicenseListComponent implements OnInit { } + + + + exportExcel() { + // console.log(this.validateForm) + const httpOptions = { + responseType: 'blob' as 'json', + params: { + OrganizationUnitId: this.validateForm.value.organization + } + }; + this.http.get(`/api/services/app/StationValidityLicense/ExportStationLicenses`, httpOptions).subscribe((data: any) => { + // console.log('导出成功') + // 文件名中有中文 则对文件名进行转码 + const link = document.createElement('a'); + const blob = new Blob([data], { type: 'application/vnd.ms-excel' }); + link.setAttribute('href', window.URL.createObjectURL(blob)); + link.setAttribute('download', '经营类证照' + '.xls'); + link.style.visibility = 'hidden'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + this.message.create('success', `导出成功`); + }, err => { + this.message.create('error', `导出失败`); + }) + } } diff --git a/src/app/system-management/file-of-license/file-of-license.component.html b/src/app/system-management/file-of-license/file-of-license.component.html index f226ca6..0b62c81 100644 --- a/src/app/system-management/file-of-license/file-of-license.component.html +++ b/src/app/system-management/file-of-license/file-of-license.component.html @@ -1,7 +1,7 @@
    - 资产类证件列表 + 资产类证照列表