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/audit/audit-ing/audit-ing.component.html b/src/app/pages/audit/audit-ing/audit-ing.component.html
index c03a84a..7fe981e 100644
--- a/src/app/pages/audit/audit-ing/audit-ing.component.html
+++ b/src/app/pages/audit/audit-ing/audit-ing.component.html
@@ -5,15 +5,15 @@
@@ -23,9 +23,9 @@
油站信息
- 更新类证照提醒时间
- 更新类证照
- 档案类证照
+ 经营类证照提醒时间
+ 经营类证照
+ 资产类证照
{{item.gasStation.stationName}}
{{item.gasStation.locationName}}
@@ -36,13 +36,11 @@
{{item.organization ? item.organization.displayName : null}}
-
-
- {{item.committedTime | date:"yyyy/MM/dd HH:mm:ss" }}
+
{{item.auditStatusDesc}}
- 处置
+ 审批
详情
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..4f47dc9 100644
--- a/src/app/pages/audit/audit-ing/audit-ing.component.ts
+++ b/src/app/pages/audit/audit-ing/audit-ing.component.ts
@@ -21,16 +21,19 @@ export class AuditIngComponent implements OnInit {
tableSpin = false
tableScrollHeight
+ resizeListener
ngOnInit(): void {
this.tableScrollHeight = '100px'
// 页面监听
- fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = 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.getStationList()
}
-
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
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) {
@@ -103,19 +106,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 => {
@@ -135,18 +138,24 @@ export class AuditIngComponent implements OnInit {
}
details(item) {
+ let itemCopy = JSON.parse(JSON.stringify(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 => {
+ this.getData(item).then((res: any) => {
+ // console.log('res', res)
item.getData = res
+ if (item.auditType == 1) {
+ item.getData.isYearlyCheckDefault = res.licenseType.isYearlyCheck
+ }
const modal = this.modal.create({
nzContent: component,
nzViewContainerRef: this.viewContainerRef,
@@ -189,13 +198,16 @@ export class AuditIngComponent implements OnInit {
let params = { id: item.itemId }
this.http.get(url, { params }).subscribe((data: any) => {
let auditLog = { rejectReason: item.rejectReason }
- let organization = { displayName: item.organization? item.organization.displayName : "" }
+ let organization = { displayName: item.organization ? item.organization.displayName : "" }
if (item.auditType == 1) {
data.result.auditLog = auditLog
data.result.organization = organization
data.result.handleRemindDaysDefault = data.result.licenseType.handleRemindDays
data.result.closingRemindDaysDefault = data.result.licenseType.closingRemindDays
}
+ if (item.auditType == 2 || item.auditType == 3) {
+ data.result.auditLogId = item.id
+ }
resolve(data.result)
})
})
diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.html b/src/app/pages/audit/audit-nav/audit-nav.component.html
index 49f53ab..f339bf3 100644
--- a/src/app/pages/audit/audit-nav/audit-nav.component.html
+++ b/src/app/pages/audit/audit-nav/audit-nav.component.html
@@ -6,18 +6,17 @@
{{item}}
- 通知时间
- 年检设置
+ 预警规则
\ 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 08f23b6..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/audit/audit-record/audit-record.component.html b/src/app/pages/audit/audit-record/audit-record.component.html
index 70597bf..f765342 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 @@
-
-
-
+
+
+
@@ -91,10 +91,12 @@
审批类型
审批信息
- 加油站名称
- 区域
+
省公司
- 提交时间
+ 申请人
+ 审批时间
+ 审批人
审批状态
操作
@@ -106,12 +108,12 @@
油站信息
- 更新类证照提醒时间
- 更新类证照
- 档案类证照
+ 经营类证照提醒时间
+ 经营类证照
+ 资产类证照
- {{item.gasStation.stationName}}
- {{item.gasStation.locationName}}
+
{{item.gasStation.companyName}}
@@ -120,7 +122,9 @@
{{item.organization ? item.organization.displayName : null}}
- {{item.committedTime | date:"yyyy/MM/dd HH:mm:ss"}}
+ {{item.creatorUser.name || ''}}
+ {{item.auditTime | date:"yyyy/MM/dd HH:mm:ss"}}
+ {{item.auditUser.name || ''}}
{{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 d74fe81..0d8a724 100644
--- a/src/app/pages/audit/audit-record/audit-record.component.ts
+++ b/src/app/pages/audit/audit-record/audit-record.component.ts
@@ -22,12 +22,13 @@ export class AuditRecordComponent implements OnInit {
list = []
tableScrollHeight
+ resizeListener
startdate
enddate
async ngOnInit(): Promise {
this.tableScrollHeight = '100px'
// 页面监听
- fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = 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'
@@ -59,6 +60,9 @@ export class AuditRecordComponent implements OnInit {
this.getRecordList()
}
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
submitForm(): void {
if (this.validateForm.value.datePicker[0].toLocaleDateString) {
this.validateForm.value.datePicker[0] = this.validateForm.value.datePicker[0].toLocaleDateString()
@@ -256,6 +260,9 @@ export class AuditRecordComponent implements OnInit {
data.result.handleRemindDaysDefault = data.result.licenseType.handleRemindDays
data.result.closingRemindDaysDefault = data.result.licenseType.closingRemindDays
}
+ if (item.auditType == 2 || item.auditType == 3) {
+ data.result.auditLogId = item.id
+ }
resolve(data.result)
})
})
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/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 85f86ac..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 @@
diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
index 9dd6a98..1d6cde1 100644
--- a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
+++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
@@ -57,6 +57,7 @@ export class EditFileCategoryComponent implements OnInit {
isLoadingSave: boolean = false
uploadIndex: string
filechange(e) {
+ this.isLoadingSave = true
let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
let file = e.target.files[0] || null //获取上传的文件
this.openFileSelect(file, `stationPhotos/${oilStationId}/`)
@@ -84,7 +85,7 @@ export class EditFileCategoryComponent implements OnInit {
let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
this.imageUrl = filePath
this.data2.imageUrl = filePath
- console.log('上传成功', filePath)
+ this.isLoadingSave = false
resolve('success')
});
})
@@ -100,7 +101,7 @@ export class EditFileCategoryComponent implements OnInit {
let filePath = dataObj.filePath
this.imageUrl = filePath
this.data2.imageUrl = filePath
- console.log('上传成功', filePath)
+ this.isLoadingSave = false
});
}
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 42fcd2c..8a20736 100644
--- a/src/app/pages/license/file-category/file-category.component.html
+++ b/src/app/pages/license/file-category/file-category.component.html
@@ -4,12 +4,12 @@
[nzShowPagination]="false" [nzScroll]="{ y:tableScrollHeight }" [nzNoResult]='null' nzTableLayout="fixed">
-
- 证照名称
+
+ 证照名称
有无证照
-
+
+ 审核状态
附件
操作
@@ -17,17 +17,17 @@
- {{item.licenseTypeName || ''}}
+ {{item.licenseTypeName || ''}}
不适用
无
有
-
{{item.auditLog.auditStatusDesc || ''}}
- -->
+
diff --git a/src/app/pages/license/file-category/file-category.component.ts b/src/app/pages/license/file-category/file-category.component.ts
index 5f557ca..7088429 100644
--- a/src/app/pages/license/file-category/file-category.component.ts
+++ b/src/app/pages/license/file-category/file-category.component.ts
@@ -20,15 +20,22 @@ export class FileCategoryComponent implements OnInit {
list = []; //tabelData
tableScrollHeight
+ resizeListener
ngOnInit(): void {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
// 页面监听
- fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
});
this.getStationList()
}
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
+
+
+
//获取当前油站档案类证照
getStationList() {
this.tableSpin = true
@@ -120,22 +127,27 @@ export class FileCategoryComponent implements OnInit {
this.message.create('warning', '请上传附件!');
return false;
}
- await new Promise(resolve => {
- instance.data2.validatyType = Number(instance.validatyType)
+ if (instance.validatyType != '2' && !instance.data2.remark) {
+ this.message.create('warning', '请填写完整!');
+ return false;
+ }
+ instance.data2.validatyType = Number(instance.validatyType)
+ if (!instance.isSubmit) {
this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe((data: any) => {
- if (!instance.isSubmit) {
- resolve(data);
- this.getStationList();
- this.message.create('success', '修改成功!');
- return true;
- } else { //提交审核
+ this.getStationList();
+ this.message.create('success', '修改成功!');
+ })
+ return false;
+ } else {
+ await new Promise(resolve => {
+ this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe((data: any) => {
this.submitReview(data.result).then(res=>{
resolve(data);
return true;
});
- }
+ })
})
- })
+ } //else
}
});
const instance = modal.getContentComponent();
diff --git a/src/app/pages/license/histories/histories.component.html b/src/app/pages/license/histories/histories.component.html
index 3dcfc90..8037efe 100644
--- a/src/app/pages/license/histories/histories.component.html
+++ b/src/app/pages/license/histories/histories.component.html
@@ -5,10 +5,10 @@
- 证件名称
+ 证照名称
- 证件编号
- 证件有效期
+ 证照编号
+ 证照有效期
有效期类型
办理类型
通知内容
@@ -32,7 +32,7 @@
{{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}}
- {{getHandleTypes(item.handleTypes)}}
+ {{getHandleTypes(item.licenseSnapshot.handleTypes)}}
{{item.notificationContent | notificationContent}}
diff --git a/src/app/pages/license/histories/histories.component.ts b/src/app/pages/license/histories/histories.component.ts
index 9cbd2dd..a37dd35 100644
--- a/src/app/pages/license/histories/histories.component.ts
+++ b/src/app/pages/license/histories/histories.component.ts
@@ -19,17 +19,20 @@ export class HistoriesComponent implements OnInit {
list = []
tableScrollHeight
+ resizeListener
ngOnInit(): void {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
// 页面监听
- fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
});
this.getInform()
}
-
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
dispose() {
console.log('处置')
}
diff --git a/src/app/pages/license/inform/inform.component.html b/src/app/pages/license/inform/inform.component.html
index f77cf12..180fe05 100644
--- a/src/app/pages/license/inform/inform.component.html
+++ b/src/app/pages/license/inform/inform.component.html
@@ -5,10 +5,10 @@
- 证件名称
+ 证照名称
- 证件编号
- 证件有效期
+ 证照编号
+ 证照有效期
有效期类型
办理类型
通知内容
@@ -29,10 +29,10 @@
长期
- {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}}
+ {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays +'天' : '/'}}
- {{getHandleTypes(item.handleTypes)}}
+ {{getHandleTypes(item.licenseSnapshot.handleTypes)}}
{{item.notificationContent | notificationContent}}
diff --git a/src/app/pages/license/inform/inform.component.ts b/src/app/pages/license/inform/inform.component.ts
index 41e6777..4008729 100644
--- a/src/app/pages/license/inform/inform.component.ts
+++ b/src/app/pages/license/inform/inform.component.ts
@@ -16,19 +16,21 @@ export class InformComponent implements OnInit {
tableScrollHeight
- fromEvent
+ resizeListener
ngOnInit(): void {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
// 页面监听
- this.fromEvent = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
});
this.getInform()
}
-
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
dispose() {
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..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.handleTypes)}}
+
办理类型: {{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 4bbc24a..4323f8b 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}}
- 证件编号*
+ 证照编号*
-
+
- 证件有效期*
+ 证照效期*
@@ -34,37 +34,41 @@
- 办理类型
-
-
-
-
-
-
-
-
+ 办理类型: {{getHandleTypes(data2.handleTypesDefault)}}
附件上传(图片格式、pdf格式、word格式)
-
+
+
+
+ 重新上传
+
+
+
+
+
+
-
-
上传附件
+
+
上传附件副本
-
- 提交审核
- 保存
+ 提交审核
+ 保存
取消
diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
index 2dcaf4a..ccf274f 100644
--- a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
+++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
@@ -27,7 +27,6 @@ export class EditUpdateCategoryComponent implements OnInit {
this.validateForm = this.fb.group({
number: [null, [Validators.required]],
isLongTerm: [null, [Validators.required]],
- type: [null, [Validators.required]],
isLongTermTime: [null,],
isNoLongTermTime: [null,],
});
@@ -104,6 +103,22 @@ export class EditUpdateCategoryComponent implements OnInit {
}
}
+ //获取办理类型
+ getHandleTypes(handleTypes: any[]):string {
+ if (!handleTypes || !handleTypes.length) {
+ return
+ }
+ let names: string[] = []
+ let handleTypeList = JSON.parse(JSON.stringify(handleTypes));
+ let list: handleTypeList[] = new handleType().list;
+ handleTypeList.forEach(item=>{
+ list.find(element=>{
+ item == element.value? names.push(element.name) : null
+ })
+ })
+ return names.join(',')
+ }
+
//获取文件格式
getFileType(name: string):string {
let suffix
@@ -119,25 +134,27 @@ export class EditUpdateCategoryComponent 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', '暂不支持查看!');
}
}
-
+ uploadType: boolean; //是否是上传副本
isLoadingSave: boolean = false
uploadIndex: string
- filechange(e) {
+ filechange(e, type: boolean) {
+ this.uploadType = type
+ this.isLoadingSave = true
let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
let file = e.target.files[0] || null //获取上传的文件
this.openFileSelect(file, `stationPhotos/${oilStationId}/`)
@@ -163,9 +180,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => {
let dataObj = data as any;
let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
- this.imageUrl = filePath
- this.data2.imageUrl = filePath
- console.log('上传成功', filePath)
+ if (this.uploadType){
+ this.data2.imageUrl = filePath
+ } else {
+ this.data2.attachment = filePath
+ }
+ this.isLoadingSave = false
resolve('success')
});
})
@@ -179,9 +199,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => {
let dataObj = value as any;
let filePath = dataObj.filePath
- this.imageUrl = filePath
- this.data2.imageUrl = filePath
- console.log('上传成功', filePath)
+ if (this.uploadType){
+ this.data2.imageUrl = filePath
+ } else {
+ this.data2.attachment = filePath
+ }
+ this.isLoadingSave = false
});
}
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..1b39841 100644
--- a/src/app/pages/license/update-category/update-category.component.html
+++ b/src/app/pages/license/update-category/update-category.component.html
@@ -12,8 +12,8 @@
有效天数
办理类型
+
提交时间 -->
+
审核状态
预警状态
附件
操作
@@ -35,12 +35,12 @@
- {{getHandleTypes(item.handleTypes)}}
+ {{getHandleTypes(item.handleTypesDefault)}}
{{item.auditLog.auditStatusDesc || ''}}
- -->
+
无
办理提醒
@@ -49,8 +49,13 @@
-
-
+
+
+
+
+
+
+
编辑
diff --git a/src/app/pages/license/update-category/update-category.component.ts b/src/app/pages/license/update-category/update-category.component.ts
index 3f9ac38..66e5fed 100644
--- a/src/app/pages/license/update-category/update-category.component.ts
+++ b/src/app/pages/license/update-category/update-category.component.ts
@@ -21,15 +21,18 @@ export class UpdateCategoryComponent implements OnInit {
list = []
tableScrollHeight
+ resizeListener
ngOnInit(): void {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
// 页面监听
- fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
});
this.getStationList()
}
-
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
//获取当前油站档案类证照
getStationList() {
this.tableSpin = true
@@ -93,15 +96,15 @@ export class UpdateCategoryComponent 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', '暂不支持查看!');
}
@@ -133,33 +136,41 @@ export class UpdateCategoryComponent implements OnInit {
nzFooter: null,
nzClosable: false,
nzOnOk: async () => {
+ if (!instance.data2.imageUrl) {
+ this.message.create('warning', '请上传附件!');
+ return false;
+ }
+ if (instance.data2.hasAttachmentDefault && !instance.data2.attachment) {
+ this.message.create('warning', '请上传附件副本!');
+ return false;
+ }
if (instance.validateForm.valid) {
- await new Promise(resolve => {
- let body = instance.data2
- // 日期
- if (body.isLongTerm) {
- body.validityStartTime = instance.isLongTermTime || new Date()
- } else {
- body.validityStartTime = instance.isNoLongTermTime[0] || new Date()
- body.validityEndTime = instance.isNoLongTermTime[1] || new Date()
- }
+ let body = instance.data2
+ if (body.isLongTerm) {
+ body.validityStartTime = instance.isLongTermTime || new Date()
+ } else {
+ body.validityStartTime = instance.isNoLongTermTime[0] || new Date()
+ body.validityEndTime = instance.isNoLongTermTime[1] || new Date()
+ }
+ if (!instance.isSubmit) {
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data:any) => {
- if (!instance.isSubmit) {
- resolve(data);
- this.getStationList();
- this.message.create('success', '修改成功!');
- return true;
- } else { //提交审核
+ this.getStationList();
+ this.message.create('success', '修改成功!');
+ })
+ return false;
+ } else {
+ await new Promise(resolve => {
+ this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data:any) => {
this.submitReview(data.result).then(res=>{
resolve(data);
return true;
});
- }
+ })
})
- })
+ } //else
} else {
this.message.create('warning', '请填写完整!');
- return false
+ return false;
}
}
});
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/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 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -21,6 +38,12 @@
[nzType]="'sync'">重置
+
+
+ 导出文档
+
+
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..429b3ba 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,65 @@ 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 {
+ resizeListener
+ async ngOnInit(): Promise
{
this.tableScrollHeight = '100px'
- console.log('tableScrollHeight', this.tableScrollHeight)
// 页面监听
- fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = 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 {
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
+ //获取所有组织机构
+ 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 +107,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 +126,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 +166,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 +188,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/oil-station-list/oil-station-list.component.ts b/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.ts
index 7d81460..de8a9ae 100644
--- a/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.ts
+++ b/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.ts
@@ -19,13 +19,13 @@ export class OilStationListComponent implements OnInit {
constructor(private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router) { }
tableScrollHeight
-
+ resizeListener
ngOnInit(): void {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
console.log('tableScrollHeight', this.tableScrollHeight)
// 页面监听
- fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
});
this.validateForm = this.fb.group({
@@ -34,6 +34,9 @@ export class OilStationListComponent implements OnInit {
this.tableSpin = true
}
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
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) {
diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html
index 7209128..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 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -30,6 +49,12 @@
[nzType]="'sync'">重置
+
+
+ 导出文档
+
+
@@ -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..b2c1dac 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,66 @@ 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
+ resizeListener
+ async ngOnInit(): Promise {
- ngOnInit(): void {
-
- 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'
+ this.resizeListener = 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 - 10) + 'px'
});
+
+
this.validateForm = this.fb.group({
+ organization: [null],
name: [null]
});
this.tableSpin = true
+ await this.getAllOrganization()
+ this.getStationLicenses()
+
+ }
+ ngOnDestroy(): void {
+ this.resizeListener.unsubscribe()
+ }
+ //获取所有组织机构
+ 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 +109,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 +120,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 +160,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 +191,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 +219,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 75f0d11..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 @@
- 档案类证件列表
+ 资产类证照列表
- 档案类证件
+ 资产类证照
操作
diff --git a/src/app/system-management/navigation/navigation.component.html b/src/app/system-management/navigation/navigation.component.html
index b2ac420..f41c717 100644
--- a/src/app/system-management/navigation/navigation.component.html
+++ b/src/app/system-management/navigation/navigation.component.html
@@ -18,8 +18,8 @@
角色管理
分析主机管理
推送管理
- 更新类证照管理
- 档案类证照管理
+ 经营类证照管理
+ 资产类证照管理
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..e81d414 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..4b5af42 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]],
+ handleType: [[], [Validators.required]],
+ isEctype: [false, [Validators.required]],
isYearlyCheck: [true, [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..d1395a1 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,9 +24,25 @@
+
+ 办理类型
+
+
+
+
+
+
+
+
+
+ 是否上传副本
+
+
+
+
是否年检
-
+
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..0fc8089 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,6 +20,8 @@ export class EditUpdateOfLicenseComponent implements OnInit {
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]]
});
}
@@ -26,4 +29,6 @@ export class EditUpdateOfLicenseComponent implements OnInit {
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.html b/src/app/system-management/update-of-license/update-of-license.component.html
index 49b64d4..6e8c812 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
@@ -1,7 +1,7 @@
- 更新类证件列表
+ 经营类证照列表
- 更新类证件
+ 经营类证照
办理提醒时间
临期提醒时间
+ 办理类型
+ 是否上传副本
是否年检
操作
@@ -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..9883a42 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()
}
@@ -48,11 +51,12 @@ 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,
+ 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 +97,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 +142,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(',')
+ }
}
diff --git a/src/theme.less b/src/theme.less
index b73127c..cce0456 100644
--- a/src/theme.less
+++ b/src/theme.less
@@ -377,7 +377,8 @@
#inform,
#updateLicense,
#fileLicense,
-#histories {
+#histories,
+#statisticsList {
::-webkit-input-placeholder {
/* WebKit browsers */
color: #345d85;
@@ -480,6 +481,11 @@
.ant-table-tbody>tr>td:hover {
background: none;
}
+
+ .ant-select,
+ .ant-select-arrow {
+ color: #fff;
+ }
}
//蓝色 表格 tree-通知时间