diff --git a/package-lock.json b/package-lock.json index 37fd692..62b8f74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2435,7 +2435,7 @@ }, "@babylonjs/core": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@babylonjs/core/-/core-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/@babylonjs/core/download/@babylonjs/core-4.2.1.tgz", "integrity": "sha512-Z2ZVNRKPB1UvmMeqQtxCJKrQtQ/hb5FcAZi66YEEE0MKBQlLmf6oZEM9vS1RljPK7NZoV/dZSdwjJgiQlGsuhA==", "requires": { "tslib": ">=1.10.0" @@ -2443,7 +2443,7 @@ }, "@babylonjs/gui": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@babylonjs/gui/-/gui-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/@babylonjs/gui/download/@babylonjs/gui-4.2.1.tgz", "integrity": "sha512-6gOolbWYFO5lrRWKunawYWQkX4a47dvuiIBrEmY6eKRN97e4f7YrR7oYolqeWFHLXzbn0JR0blOYQyUB5jQqmg==", "requires": { "@babylonjs/core": "4.2.1", @@ -2452,7 +2452,7 @@ }, "@babylonjs/inspector": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@babylonjs/inspector/-/inspector-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/@babylonjs/inspector/download/@babylonjs/inspector-4.2.1.tgz", "integrity": "sha512-P0l3oAVniyxYJIgpZsAJ3veJnA9Sq02HLsy7Dr3y5UOA8WP0n7X1Uv2T1MbONdTkXJ1YoX/KBfAYVAA81FXhbg==", "requires": { "@babylonjs/core": "4.2.1", @@ -2466,7 +2466,7 @@ }, "@babylonjs/loaders": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@babylonjs/loaders/-/loaders-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/@babylonjs/loaders/download/@babylonjs/loaders-4.2.1.tgz", "integrity": "sha512-huLdk18nTqwXHYIbxpXRTo1smcL1eCD8TvvyWiHciRjPttpRNjoACSR/G2J2FD0ymSBu8ZS8cdMvq1by7x2DsA==", "requires": { "@babylonjs/core": "4.2.1", @@ -2476,7 +2476,7 @@ }, "@babylonjs/materials": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@babylonjs/materials/-/materials-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/@babylonjs/materials/download/@babylonjs/materials-4.2.1.tgz", "integrity": "sha512-G4mfmixt2BnATaa2/uhf7xfZv4fqD6bGHocbEWT1Iu0KOJcpU7Q0EYjN8bqx78hVFjd94e4g0/7Bey2JaGrakA==", "requires": { "@babylonjs/core": "4.2.1", @@ -2485,7 +2485,7 @@ }, "@babylonjs/serializers": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@babylonjs/serializers/-/serializers-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/@babylonjs/serializers/download/@babylonjs/serializers-4.2.1.tgz", "integrity": "sha512-G4Jw9ILUJp8hO49Jg+sxVAKfYMZlgxGClNrUKCOcsIGWg5Yy0hKd1BZd86wEiyJAYt+MDpuocWCShzkEV2mJhA==", "requires": { "@babylonjs/core": "4.2.1", @@ -5175,12 +5175,12 @@ }, "babylonjs": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/babylonjs/-/babylonjs-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/babylonjs/download/babylonjs-4.2.1.tgz", "integrity": "sha512-FQdJ2VTENUpUJQ30ddihwTjV6K94kglET0P7jV8OQzjA4eez3sotmG22Fn9+8yb069SA26KnrAGOI2sKMQ7BCw==" }, "babylonjs-gltf2interface": { "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/babylonjs-gltf2interface/-/babylonjs-gltf2interface-4.2.1.tgz", + "resolved": "https://registry.npmmirror.com/babylonjs-gltf2interface/download/babylonjs-gltf2interface-4.2.1.tgz", "integrity": "sha512-ZBfKgIoztO1x1nyf9aPQJ+WXmB6Kw0VlyxvcKchIixbICqeeExiN8nmjvypwXC4hl+5ZDMnUKQNrIhh7uzulnA==" }, "backo2": { diff --git a/package.json b/package.json index afc7441..6db11a6 100644 --- a/package.json +++ b/package.json @@ -81,4 +81,4 @@ "tslint": "~5.15.0", "typescript": "~3.7.5" } -} \ No newline at end of file +} diff --git a/src/app/pages/audit/annual-inspection/annual-inspection.component.html b/src/app/pages/audit/annual-inspection/annual-inspection.component.html new file mode 100644 index 0000000..b43c909 --- /dev/null +++ b/src/app/pages/audit/annual-inspection/annual-inspection.component.html @@ -0,0 +1,28 @@ +
+
+ + + + 审批类型 + 是否年检 + 年检时间 + 操作 + + + + + {{item.licenseName}} + + {{item.isYearlyCheck ? '是' : '否'}} + + {{item.yearlyCheckDate | date:"MM/dd"}} + + 编辑 + + + + + +
+
\ No newline at end of file diff --git a/src/app/pages/audit/annual-inspection/annual-inspection.component.scss b/src/app/pages/audit/annual-inspection/annual-inspection.component.scss new file mode 100644 index 0000000..aaca580 --- /dev/null +++ b/src/app/pages/audit/annual-inspection/annual-inspection.component.scss @@ -0,0 +1,15 @@ +.box { + width: 100%; + height: 100%; +} + +.tablebox { + width: 100%; + height: 100%; + + .operation { + span { + margin-right: 6px; + } + } +} diff --git a/src/app/pages/audit/annual-inspection/annual-inspection.component.ts b/src/app/pages/audit/annual-inspection/annual-inspection.component.ts new file mode 100644 index 0000000..9cd5035 --- /dev/null +++ b/src/app/pages/audit/annual-inspection/annual-inspection.component.ts @@ -0,0 +1,84 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import { EditAnnualInspectionComponent } from './edit-annual-inspection/edit-annual-inspection.component'; +@Component({ + selector: 'app-annual-inspection', + templateUrl: './annual-inspection.component.html', + styleUrls: ['./annual-inspection.component.scss'] +}) +export class AnnualInspectionComponent implements OnInit { + + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private http: HttpClient, private message: NzMessageService, private element: ElementRef) { } + tableSpin = false + + tableScrollHeight + ngOnInit(): void { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + // 页面监听 + fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + }); + this.getAnnualInspectionList() + } + + + + list = [] + totalCount;//列表总数 + SkipCount: string = '0'; + MaxResultCount: string = '100'; + //获取当前油站档案类证照 + getAnnualInspectionList() { + this.tableSpin = true + let data = JSON.parse(sessionStorage.getItem('userdata')); + let params = { + OrganizationUnitId: data.organization.id || "", + IsContainsChildren: "true", + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount, + } + this.http.get(`/api/services/app/OrganizationValidityLicenseRule/GetCurOrgYearlyCheckRules`, { params }).subscribe((data: any) => { + + this.list = data.result + this.list = [...this.list] + this.tableSpin = false + console.log(data) + }) + } + + + edit(item) { + console.log('item', item) + if (!item.isYearlyCheck) { + this.message.create('warning', '不需要年检'); + return + } + + const modal = this.modal.create({ + nzContent: EditAnnualInspectionComponent, + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + this.getAnnualInspectionList() + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } +} diff --git a/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.html b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.html new file mode 100644 index 0000000..e0eb4d0 --- /dev/null +++ b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.html @@ -0,0 +1,33 @@ +
+
+
+ 编辑 +
+ +
+
+ +
+
+

请选择年检日期

+ + + + + + + + +
+
+ + +
+ + +
+
+
\ No newline at end of file diff --git a/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.scss b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.scss new file mode 100644 index 0000000..4be1a5b --- /dev/null +++ b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.scss @@ -0,0 +1,105 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + + + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + } + + .p2 { + margin: 6px 0; + font-size: 12px; + color: #C4E2FC; + } + + .form { + box-sizing: border-box; + padding: 0 17px; + + .timebox { + display: flex; + + div { + flex: 1; + display: flex; + flex-direction: column; + box-sizing: border-box; + padding: 0 6px; + } + } + + .explain { + box-sizing: border-box; + padding: 0 6px; + + textarea { + width: 100%; + height: 100px; + + background: rgba(145, 204, 255, 0.16); + color: #fff; + } + } + + .btnbox { + width: 100%; + margin-top: 24px; + margin-bottom: 17px; + display: flex; + justify-content: flex-end; + box-sizing: border-box; + padding: 0 7px; + + button { + border-radius: 0px; + color: #91CCFF; + } + + button:nth-child(2) { + margin-left: 16px; + } + + .ok { + background: rgba(0, 129, 255, 0.4); + } + + .cancel { + border: 1px solid #C4E2FC; + background: #0c1e38; + color: rgba(99, 102, 105, 0.6); + box-shadow: 0 0 3px 0 #fff inset; + } + } + } + +} diff --git a/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.ts b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.ts new file mode 100644 index 0000000..5f10426 --- /dev/null +++ b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.ts @@ -0,0 +1,64 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import * as moment from 'moment'; + +@Component({ + selector: 'app-edit-annual-inspection', + templateUrl: './edit-annual-inspection.component.html', + styleUrls: ['./edit-annual-inspection.component.scss'] +}) +export class EditAnnualInspectionComponent implements OnInit { + + + @Input() data?: any; + + validateForm!: FormGroup; + constructor(private message: NzMessageService, private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService) { } + + + dataCopy + ngOnInit(): void { + this.dataCopy = JSON.parse(JSON.stringify(this.data)) + this.validateForm = this.fb.group({ + time: [this.dataCopy.yearlyCheckDate, [Validators.required]], + }); + + } + + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + + } + + + isLoading = false + ok() { + if (this.validateForm.valid) { + this.isLoading = true + let body = { + licenseTypeId: this.dataCopy.licenseTypeId, + organizationId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + yearlyCheckDate: moment(this.validateForm.value.time).format('YYYY-MM-DD')//开业时间格式化 + } + this.http.put('/api/services/app/OrganizationValidityLicenseRule/UpdateYearlyCheckDate', body).subscribe((data) => { + this.message.create('success', '修改成功'); + this.isLoading = false + this.modal.triggerOk() + }, err => { + this.message.create('error', '修改失败'); + this.isLoading = false + }) + } else { + this.message.create('warning', '请填写完整!'); + } + + + } + + dateFormat = 'MM/dd'; +} diff --git a/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html new file mode 100644 index 0000000..8a8cfbe --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html @@ -0,0 +1,30 @@ +
+
+
+ 详情 +
+ +
+ +
+

{{organizationName}}

+
+

+ 办理提醒时间:修改时间 {{data.handleRemindDays}}天 + 默认时间 {{data.handleRemindDaysDefault}}天 +

+
+

+ 临期提醒时间:修改时间 {{data.closingRemindDays}}天 + 默认时间 {{data.closingRemindDaysDefault}}天 +

+
+

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

+
+

审核状态:{{data.auditStatus | auditStatus}}

+
+

驳回说明:{{data.auditLog? data.auditLog.rejectReason : ''}}

+
+ + +
\ No newline at end of file diff --git a/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.scss b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.scss new file mode 100644 index 0000000..83c449f --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.scss @@ -0,0 +1,65 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + .content { + box-sizing: border-box; + padding: 0 15px; + max-height: 580px; + overflow-y: auto; + + .circle { + width: 8px; + height: 8px; + background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%); + opacity: 1; + } + + .recordP { + display: flex; + justify-content: space-between; + align-items: center; + } + } + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + + img { + width: 88px; + height: 56px; + cursor: pointer; + } + } + .flexp{ + display: flex; + justify-content: space-between; + } +} diff --git a/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.ts b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.ts new file mode 100644 index 0000000..d2d65a2 --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.ts @@ -0,0 +1,22 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; + +@Component({ + selector: 'app-audit-details-inform-time', + templateUrl: './audit-details-inform-time.component.html', + styleUrls: ['./audit-details-inform-time.component.scss'] +}) +export class AuditDetailsInformTimeComponent implements OnInit { + @Input() data?: any; + constructor(private modal: NzModalRef) { } + + + organizationName + ngOnInit(): void { + + this.organizationName = JSON.parse(sessionStorage.getItem('userdata')).organization.displayName + } + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + } +} 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 new file mode 100644 index 0000000..aadc2ca --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html @@ -0,0 +1,46 @@ +
+
+ + + + + 审批类型 + + 办理提醒时间 + 临期提醒时间 + 提交审核时间 + 审核状态 + 操作 + + + 默认时间 + 现用时间 + 默认时间 + 现用时间 + + + + + + {{item.licenseName}} + + {{item.handleRemindDaysDefault}}天 + {{item.handleRemindDays}}天 + {{item.closingRemindDaysDefault}}天 + {{item.closingRemindDays}}天 + {{(item.auditLog && item.auditLog.committedTime) ? (item.auditLog.committedTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}} + {{item.auditStatus | auditStatus}} + + 编辑 + 撤销审核 + 审核详情 + + + + + +
+
\ No newline at end of file diff --git a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.scss b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.scss new file mode 100644 index 0000000..aaca580 --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.scss @@ -0,0 +1,15 @@ +.box { + width: 100%; + height: 100%; +} + +.tablebox { + width: 100%; + height: 100%; + + .operation { + span { + margin-right: 6px; + } + } +} diff --git a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.ts b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.ts new file mode 100644 index 0000000..fe83c75 --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.ts @@ -0,0 +1,130 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import { AuditDetailsInformTimeComponent } from './audit-details-inform-time/audit-details-inform-time.component'; +import { EditInformTimeComponent } from './edit-inform-time/edit-inform-time.component'; +// import { AuditDisposeComponent } from './audit-dispose/audit-dispose.component'; + +@Component({ + selector: 'app-audit-inform-time', + templateUrl: './audit-inform-time.component.html', + styleUrls: ['./audit-inform-time.component.scss'] +}) +export class AuditInformTimeComponent implements OnInit { + + constructor(private message: NzMessageService, private http: HttpClient, private element: ElementRef, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } + tableSpin = false + list = [] + + tableScrollHeight + ngOnInit(): void { + // 页面监听 + this.tableScrollHeight = '0px' + 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) + 'px' + }); + + this.getTimeList() + } + + SkipCount: string = '0' + MaxResultCount: string = '100' + async getTimeList() { + let params = { + OrganizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + IsContainsChildren: 'true', + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount, + } + this.tableSpin = true + await new Promise((resolve, reject) => { + this.http.get('/api/services/app/OrganizationValidityLicenseRule/GetCurOrgRules', { + params: params + }).subscribe((data: any) => { + this.list = data.result + this.list = [...this.list] + console.log('时间表格', data) + this.tableSpin = false + + setTimeout(() => { + let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader) + 'px' + }, 0); + resolve(data) + }) + }) + } + + + edit(item) { + console.log('item', item) + if (item.auditStatus == 1) { + this.message.create('warning', '审核中不允许编辑'); + return + } + + const modal = this.modal.create({ + nzContent: EditInformTimeComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 600, + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + this.getTimeList() + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } + details(item) { + console.log('item', item) + const modal = this.modal.create({ + nzContent: AuditDetailsInformTimeComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 650, + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } + + unCommit(item) { + let params = { + id: item.id + } + this.http.post('/api/services/app/OrganizationValidityLicenseRule/Uncommit', '', { params: params }).subscribe((data) => { + this.message.create('success', '撤销审核成功'); + this.getTimeList() + }, err => { + this.message.create('error', '撤销审核失败'); + }) + } +} diff --git a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.html b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.html new file mode 100644 index 0000000..176eade --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.html @@ -0,0 +1,54 @@ +
+
+
+ 编辑 +
+ +
+
+ +
+
+

办理提醒时间

+ + + + + + + + + +

默认时间: 90天

+
+
+

临期提醒时间

+ + + + + + + + + +

默认时间: 30天

+
+
+
+

修改说明

+ + + + + + +
+ + +
+ + +
+
+
\ No newline at end of file diff --git a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.scss b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.scss new file mode 100644 index 0000000..4be1a5b --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.scss @@ -0,0 +1,105 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + + + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + } + + .p2 { + margin: 6px 0; + font-size: 12px; + color: #C4E2FC; + } + + .form { + box-sizing: border-box; + padding: 0 17px; + + .timebox { + display: flex; + + div { + flex: 1; + display: flex; + flex-direction: column; + box-sizing: border-box; + padding: 0 6px; + } + } + + .explain { + box-sizing: border-box; + padding: 0 6px; + + textarea { + width: 100%; + height: 100px; + + background: rgba(145, 204, 255, 0.16); + color: #fff; + } + } + + .btnbox { + width: 100%; + margin-top: 24px; + margin-bottom: 17px; + display: flex; + justify-content: flex-end; + box-sizing: border-box; + padding: 0 7px; + + button { + border-radius: 0px; + color: #91CCFF; + } + + button:nth-child(2) { + margin-left: 16px; + } + + .ok { + background: rgba(0, 129, 255, 0.4); + } + + .cancel { + border: 1px solid #C4E2FC; + background: #0c1e38; + color: rgba(99, 102, 105, 0.6); + box-shadow: 0 0 3px 0 #fff inset; + } + } + } + +} diff --git a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts new file mode 100644 index 0000000..3e4b643 --- /dev/null +++ b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts @@ -0,0 +1,67 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import { NzMessageService } from 'ng-zorro-antd/message'; +@Component({ + selector: 'app-edit-inform-time', + templateUrl: './edit-inform-time.component.html', + styleUrls: ['./edit-inform-time.component.scss'] +}) +export class EditInformTimeComponent implements OnInit { + + @Input() data?: any; + + validateForm!: FormGroup; + constructor(private message: NzMessageService, private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService) { } + + + dataCopy + ngOnInit(): void { + this.dataCopy = JSON.parse(JSON.stringify(this.data)) + this.validateForm = this.fb.group({ + time1: [this.dataCopy.handleRemindDays, [Validators.required]], + time2: [this.dataCopy.closingRemindDays, [Validators.required]], + explain: [null] + }); + + } + + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + + } + + + isLoading = false + ok() { + if (this.validateForm.valid) { + this.isLoading = true + let body = { + licenseTypeId: this.dataCopy.licenseTypeId, + organizationId: this.dataCopy.organizationId, + handleRemindDays: this.validateForm.value.time1, + closingRemindDays: this.validateForm.value.time2, + remark: this.validateForm.value.explain + } + console.log(body) + this.http.put('/api/services/app/OrganizationValidityLicenseRule/UpdateAndCommit', body).subscribe((data) => { + console.log('提交审核成功') + this.message.create('success', '提交审核成功'); + this.isLoading = false + this.modal.triggerOk() + }, err => { + this.message.create('error', '提交审核失败'); + this.isLoading = false + }) + } else { + this.message.create('warning', '请填写完整!'); + } + + + } + + +} 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 new file mode 100644 index 0000000..82c9c24 --- /dev/null +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html @@ -0,0 +1,59 @@ +
+
+
+ 处置 +
+ +
+ +
+

{{data.gasStation.companyName}} - {{data.gasStation.locationName}} - {{data.gasStation.stationName}}

+
+
+
+

+ 办理提醒时间:修改时间   {{data.getData.handleRemindDays}}天 + 默认时间 {{data.getData.handleRemindDaysDefault}}天 +

+
+

+ 临期提醒时间:修改时间   {{data.getData.closingRemindDays}}天 + 默认时间 {{data.getData.closingRemindDaysDefault}}天 +

+
+

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

+
+
+

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

+
+

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

+
+

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

+
+

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

+
+

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

+
+

是否年检:   

+
+
+

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

+
+

有效期类型:   不适用

+
+
+

证件图片:    + + + +

+

审批意见:

+ +
+ + +
+
+ + +
\ No newline at end of file diff --git a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.scss b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.scss new file mode 100644 index 0000000..b951afb --- /dev/null +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.scss @@ -0,0 +1,91 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + .content { + box-sizing: border-box; + padding: 0 15px; + // max-height: 580px; + // overflow-y: auto; + + .circle { + width: 8px; + height: 8px; + background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%); + opacity: 1; + } + + .recordP { + display: flex; + justify-content: space-between; + align-items: center; + } + + .btnbox { + width: 100%; + margin: 10px 0; + display: flex; + justify-content: flex-end; + + button { + border-radius: 0px; + color: #91CCFF; + } + + button:nth-child(2) { + margin-left: 16px; + } + + .ok { + + background: rgba(0, 129, 255, 0.24); + } + + .cancel { + border: 1px solid #C4E2FC; + + background: rgba(255, 75, 101, 0.24); + + color: #C4E2FC; + // box-shadow: 0 0 3px 0 #fff inset; + } + } + } + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + + img { + width: 88px; + height: 56px; + cursor: pointer; + } + } +} 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 new file mode 100644 index 0000000..e09e7cd --- /dev/null +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts @@ -0,0 +1,102 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import Viewer from 'viewerjs'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { handleType, handleTypeList } from 'src/app/pages/license/update-category/edit-update-category/edit-update-category.component'; + + +@Component({ + selector: 'app-audit-dispose', + templateUrl: './audit-dispose.component.html', + styleUrls: ['./audit-dispose.component.scss'] +}) +export class AuditDisposeComponent implements OnInit { + + @Input() data?: any; + constructor(private modal: NzModalRef, private message: NzMessageService) { } + + textarea: string = ""; //审批意见 + ngOnInit(): void { + console.log(this.data) + } + + + destroyModal() { + this.modal.destroy(); + } + + isPass: boolean; + ok(isPass: boolean) { + this.isPass = isPass; + this.modal.triggerOk() + } + + //获取办理类型 + 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 + if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { + suffix = 'img' + } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { + suffix = 'word' + } else if (name.substring(name.length-4).includes('pdf')) { + suffix = 'pdf' + } + return suffix + } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } + + //查看文件 + lookFile(item) { + if (!item.imageUrl) { + return + } + if (this.getFileType(item.imageUrl) == 'word') { + let arr = item.imageUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(arr.join('.')) + } else if (this.getFileType(item.imageUrl) == 'pdf') { + window.open(item.imageUrl) + } 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 new file mode 100644 index 0000000..558691e --- /dev/null +++ b/src/app/pages/audit/audit-ing/audit-ing.component.html @@ -0,0 +1,44 @@ +
+
+ + + + + 审批类型 + + 审批信息 + 加油站名称 + 区域 + 省公司 + 提交时间 + 审批状态 + 操作 + + + + + + {{item.auditTitle || ''}} + + + 油站信息 + 更新类证照提醒时间 + 更新类证照 + 档案类证照 + + + + + {{item.committedTime | date:"yyyy/MM/dd"}} + {{item.auditStatusDesc}} + + 处置 + 详情 + + + + + +
+
\ No newline at end of file diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.scss b/src/app/pages/audit/audit-ing/audit-ing.component.scss new file mode 100644 index 0000000..aaca580 --- /dev/null +++ b/src/app/pages/audit/audit-ing/audit-ing.component.scss @@ -0,0 +1,15 @@ +.box { + width: 100%; + height: 100%; +} + +.tablebox { + width: 100%; + height: 100%; + + .operation { + span { + margin-right: 6px; + } + } +} diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.ts b/src/app/pages/audit/audit-ing/audit-ing.component.ts new file mode 100644 index 0000000..1a29b58 --- /dev/null +++ b/src/app/pages/audit/audit-ing/audit-ing.component.ts @@ -0,0 +1,196 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import { DetailsFileCategoryComponent } from '../../license/file-category/details-file-category/details-file-category.component'; +import { DetailsUpdateCategoryComponent } from '../../license/update-category/details-update-category/details-update-category.component'; +import { AuditDetailsInformTimeComponent } from '../audit-inform-time/audit-details-inform-time/audit-details-inform-time.component'; +import { GasBaseInfoComponent } from '../gas-base-info/gas-base-info.component'; +import { AuditDisposeComponent } from './audit-dispose/audit-dispose.component'; + +@Component({ + selector: 'app-audit-ing', + templateUrl: './audit-ing.component.html', + styleUrls: ['./audit-ing.component.scss'] +}) +export class AuditIngComponent implements OnInit { + + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private http: HttpClient, private message: NzMessageService, private element: ElementRef) { } + tableSpin = false + + tableScrollHeight + ngOnInit(): void { + this.tableScrollHeight = '100px' + // 页面监听 + 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() + } + + ngAfterViewInit(): void { + fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件 + if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) { + if (this.totalCount > this.list.length) { + this.SkipCount = String(Number(this.SkipCount) + 50) + this.getStationList() + } + } + }); + } + + list = [] + totalCount;//列表总数 + SkipCount: string = '0'; + MaxResultCount: string = '100'; + //获取当前油站档案类证照 + getStationList() { + this.tableSpin = true + let data = JSON.parse(sessionStorage.getItem('userdata')); + let params = { + OrganizationUnitId: data.organization.id || "", + IsContainsChildren: "true", + AuditStatuses: "1", + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount, + } + this.http.get(`/api/services/app/ContentAuditLog/GetAuditting`, { params }).subscribe((info: any) => { + info.result.items.forEach(element => { + element.itemData = JSON.parse(element.itemData) + }); + this.list = this.list.concat(info.result.items); + this.list = [...this.list] + this.totalCount = info.result.totalCount + this.tableSpin = false + setTimeout(() => { + let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' + }, 0); + + console.log(this.list) + }) + } + + + + dispose(item) { + // if (item.auditStatus != 1) { + // return + // } + this.getData(item).then(res => { + item.getData = res + const modal = this.modal.create({ + nzContent: AuditDisposeComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: item.auditType == 0 ? 700 : 600, + nzBodyStyle: { + 'border': '1px solid #91CCFF', + 'border-radius': '0px', + 'padding': '7px', + 'box-shadow': '0 0 8px 0 #fff', + 'background-image': 'linear-gradient(#003665, #000f25)' + }, + nzStyle: { + 'top': '50px', + }, + nzComponentParams: { + data: item + }, + nzFooter: null, + 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 params = { + id: item.auditType == 0 ? item.gasStation.id : item.getData.id, + remark: instance.textarea + } + let body = instance.isPass ? 2 : 3; + this.http.post(url, body, { params }).subscribe(data => { + resolve(data); + this.list = [] + this.SkipCount = '0' + this.getStationList(); + this.message.create('success', '审核完成!'); + return true + }) + }) + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + }) + } + + details(item) { + let component + if (item.auditType == 0) { + component = GasBaseInfoComponent + } else if (item.auditType == 1) { + component = AuditDetailsInformTimeComponent + } else if (item.auditType == 2) { + component = DetailsUpdateCategoryComponent + } else if (item.auditType) { + component = DetailsFileCategoryComponent + } + this.getData(item).then(res => { + item.getData = res + const modal = this.modal.create({ + nzContent: component, + nzViewContainerRef: this.viewContainerRef, + nzWidth: item.auditType == 0 ? 700 : 450, + nzBodyStyle: { + 'border': '1px solid #91CCFF', + 'border-radius': '0px', + 'padding': '7px', + 'box-shadow': '0 0 8px 0 #fff', + 'background-image': 'linear-gradient(#003665, #000f25)' + }, + nzStyle: { + 'top': '50px', + }, + nzComponentParams: { + data: item.getData + }, + nzFooter: null, + nzClosable: false, + }); + }) + } + + //获取证照类data + getData(item) { + let url + if (item.auditType == 0) { //油站基本信息 + return new Promise((resolve, reject) => { + let organization = { organizationId: item.organizationId } + resolve(organization) + }) + } else if (item.auditType == 1) { + url = '/api/services/app/OrganizationValidityLicenseRule/Get' + } else if (item.auditType == 2) { + url = '/api/services/app/StationValidityLicense/Get' + } else if (item.auditType) { + url = '/api/services/app/StationFileLicense/Get' + } + return new Promise((resolve, reject) => { + let params = { id: item.itemId } + this.http.get(url, { params }).subscribe((data: any) => { + resolve(data.result) + }) + }) + } + +} diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.html b/src/app/pages/audit/audit-nav/audit-nav.component.html new file mode 100644 index 0000000..49f53ab --- /dev/null +++ b/src/app/pages/audit/audit-nav/audit-nav.component.html @@ -0,0 +1,23 @@ +
+
+
+ + +
+
+
+ + + + +
+
\ No newline at end of file diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.scss b/src/app/pages/audit/audit-nav/audit-nav.component.scss new file mode 100644 index 0000000..454084c --- /dev/null +++ b/src/app/pages/audit/audit-nav/audit-nav.component.scss @@ -0,0 +1,76 @@ +.audit { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.title { + width: 100%; + height: 64px; + box-sizing: border-box; + padding: 0 28px; + margin: 13px 0; + position: relative; + + .titlebox { + width: 100%; + height: 100%; + display: flex; + align-items: center; + + img { + width: 65px; + height: 65px; + } + + .nav { + flex: 1; + height: 48px; + display: flex; + align-items: center; + justify-content: center; + // background-image: linear-gradient(to right, #002147, #033565, #064e8e, #064e8e, #033565, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.32) 50%, rgba(35, 153, 255, 0) 100%); + + .navitem { + width: 100%; + height: 32px; + display: flex; + align-items: center; + // background-image: linear-gradient(to right, #002147, #0f5ca0, #1c88e6, #1c88e6, #0f5ca0, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.8) 50%, rgba(35, 153, 255, 0) 100%); + + span { + margin-left: 25px; + color: #bce0ff; + font-size: 20px; + font-family: titlefont; + cursor: pointer; + } + + span:nth-child(1) { + margin-left: 12px; + } + + .grey { + color: #68829F; + } + } + + } + } + + .packup { + position: absolute; + right: 33px; + top: 16px; + cursor: pointer; + } +} + +.content { + flex: 1; + box-sizing: border-box; + padding: 0 40px 20px 40px; +} diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.ts b/src/app/pages/audit/audit-nav/audit-nav.component.ts new file mode 100644 index 0000000..08f23b6 --- /dev/null +++ b/src/app/pages/audit/audit-nav/audit-nav.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-audit-nav', + templateUrl: './audit-nav.component.html', + styleUrls: ['./audit-nav.component.scss'] +}) +export class AuditNavComponent implements OnInit { + + constructor() { } + + + navList = ['审批', '历史纪录'] + selectedItem = '审批' + selectNav(item) { + this.selectedItem = item + } + + + isLevel + ngOnInit(): void { + this.isLevel = JSON.parse(sessionStorage.getItem('userdata')).organization.level + } + +} diff --git a/src/app/pages/audit/audit-record/audit-record.component.html b/src/app/pages/audit/audit-record/audit-record.component.html new file mode 100644 index 0000000..c0ae045 --- /dev/null +++ b/src/app/pages/audit/audit-record/audit-record.component.html @@ -0,0 +1,126 @@ +
+ +
+ + + + + 审批类型 + + 审批信息 + 加油站名称 + 区域 + 省公司 + 提交时间 + 审批状态 + 操作 + + + + + + {{item.auditTitle || ''}} + + + 油站信息 + 更新类证照提醒时间 + 更新类证照 + 档案类证照 + + + + + {{item.committedTime | date:"yyyy/MM/dd"}} + {{item.auditStatusDesc}} + + 详情 + + + + + +
+
\ No newline at end of file diff --git a/src/app/pages/audit/audit-record/audit-record.component.scss b/src/app/pages/audit/audit-record/audit-record.component.scss new file mode 100644 index 0000000..8daef6d --- /dev/null +++ b/src/app/pages/audit/audit-record/audit-record.component.scss @@ -0,0 +1,67 @@ +.box { + width: 100%; + height: 100%; +} + +.search { + box-sizing: border-box; + width: 100%; + height: 32px; + margin-bottom: 16px; + + form { + width: 100%; + height: 32px; + display: flex; + justify-content: flex-start; + + .searchParams, + .btn { + margin: 0 3px; + } + + .searchParams { + // flex: 5; + width: 150px; + } + + .searchParamsLong { + width: 250px; + } + + .searchParams2 { + width: 220px; + } + + .btn { + // flex: 1; + } + + nz-select { + color: rgba(145, 204, 255, 0.95); + } + + nz-tree-select { + color: rgba(145, 204, 255, 0.95); + } + + nz-range-picker { + background-color: rgba(0, 0, 0, 0); + width: 100%; + } + + } + + +} + +.tablebox { + width: 100%; + height: 100%; + + .operation { + span { + margin-right: 6px; + } + } +} diff --git a/src/app/pages/audit/audit-record/audit-record.component.ts b/src/app/pages/audit/audit-record/audit-record.component.ts new file mode 100644 index 0000000..74a9f46 --- /dev/null +++ b/src/app/pages/audit/audit-record/audit-record.component.ts @@ -0,0 +1,259 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import { TreeService } from 'src/app/service/tree.service'; +import { DetailsFileCategoryComponent } from '../../license/file-category/details-file-category/details-file-category.component'; +import { DetailsUpdateCategoryComponent } from '../../license/update-category/details-update-category/details-update-category.component'; +import { AuditDetailsInformTimeComponent } from '../audit-inform-time/audit-details-inform-time/audit-details-inform-time.component'; +import { GasBaseInfoComponent } from '../gas-base-info/gas-base-info.component'; + +@Component({ + selector: 'app-audit-record', + templateUrl: './audit-record.component.html', + styleUrls: ['./audit-record.component.scss'] +}) +export class AuditRecordComponent implements OnInit { + validateForm!: FormGroup; + constructor(private element: ElementRef, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private toTree: TreeService, private http: HttpClient, private fb: FormBuilder) { } + + list = [] + + tableScrollHeight + startdate + enddate + async ngOnInit(): Promise { + this.tableScrollHeight = '100px' + // 页面监听 + 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' + + console.log('页面尺寸变化', this.tableScrollHeight) + }); + this.validateForm = this.fb.group({ + type: [null], + info: [null], + organization: [null], + datePicker: [null], + level: [null], + state: [null], + }); + //当前日期 + let myDate: any = new Date(); + let nowY = myDate.getFullYear(); + let nowM = myDate.getMonth() + 1; + let nowD = myDate.getDate(); + this.enddate = nowY + "-" + (nowM < 10 ? "0" + nowM : nowM) + "-" + (nowD < 10 ? "0" + nowD : nowD);//当前日期 + //获取三十天前日期 + let lw = new Date(myDate - 1000 * 60 * 60 * 24 * 30);//最后一个数字30可改,30天的意思 + let lastY = lw.getFullYear(); + let lastM = lw.getMonth() + 1; + let lastD = lw.getDate(); + this.startdate = lastY + "-" + (lastM < 10 ? "0" + lastM : lastM) + "-" + (lastD < 10 ? "0" + lastD : lastD);//三十天之前日期 + + this.getTypeList() + await this.getAllOrganization() + this.getRecordList() + } + + submitForm(): void { + if (this.validateForm.value.datePicker[0].toLocaleDateString) { + this.validateForm.value.datePicker[0] = this.validateForm.value.datePicker[0].toLocaleDateString() + } + if (this.validateForm.value.datePicker[1].toLocaleDateString) { + this.validateForm.value.datePicker[1] = this.validateForm.value.datePicker[1].toLocaleDateString() + } + this.list = [] + this.SkipCount = '0' + this.getRecordList() + } + + resetForm(e: MouseEvent): void { + e.preventDefault(); + this.validateForm.reset(); + this.validateForm.patchValue({ + organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + datePicker: [this.startdate, this.enddate], + }); + this.list = [] + this.SkipCount = '0' + this.getRecordList() + } + + //获取所有组织机构 + 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, + datePicker: [this.startdate, this.enddate], + }); + resolve(data) + + }) + }) + + } + + //证照类型 + typeLoading + typeList + getTypeList() { + this.typeLoading = true + let promiseArr = [] + let api = ['/api/services/app/ValidityLicenseType/GetAll', '/api/services/app/FileLicenseType/GetAll'] + api.forEach(element => { + promiseArr.push( + new Promise((resolve, reject) => { + this.http.get(element, { + params: { + SkipCount: '0', + MaxResultCount: '999' + } + }).subscribe({ + next: (data) => { + resolve(data) + }, + error: err => { + reject(err) + } + }) + }) + ) + }); + + Promise.all(promiseArr).then((result) => { + + let arr = [{ licenseName: '油站信息' }] + result.forEach(item => { + arr = arr.concat(item.result.items) + }); + this.typeLoading = false + this.typeList = arr + }).catch((error) => { + + }) + } + + //历史记录列表 + totalCount//列表总数 + tableSpin = true + SkipCount: string = '0' + MaxResultCount: string = '100' + getRecordList() { + this.tableSpin = true + let params = { + IsContainsChildren: 'true', + OrganizationUnitId: this.validateForm.value.organization, + AuditTitle: this.validateForm.value.type, + AuditType: this.validateForm.value.info, + StartTime: this.validateForm.value.datePicker[0], + EndTime: this.validateForm.value.datePicker[1], + AuditStatuses: this.validateForm.value.state, + AuditLevel: this.validateForm.value.level, + Sorting: null, + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount, + } + this.http.get('/api/services/app/ContentAuditLog/GetHistory', { params }).subscribe((data: any) => { + this.list = this.list.concat(data.result.items); + this.list = [...this.list] + this.totalCount = data.result.totalCount + this.tableSpin = false + console.log('审核历史纪录', this.list) + setTimeout(() => { + let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' + }, 0); + }) + } + + details(item) { + let component + if (item.auditType == 0) { + component = GasBaseInfoComponent + } else if (item.auditType == 1) { + component = AuditDetailsInformTimeComponent + } else if (item.auditType == 2) { + component = DetailsUpdateCategoryComponent + } else if (item.auditType) { + component = DetailsFileCategoryComponent + } + this.getData(item).then(res => { + item.getData = res + const modal = this.modal.create({ + nzContent: component, + nzViewContainerRef: this.viewContainerRef, + nzWidth: item.auditType == 0 ? 700 : 450, + nzBodyStyle: { + 'border': '1px solid #91CCFF', + 'border-radius': '0px', + 'padding': '7px', + 'box-shadow': '0 0 8px 0 #fff', + 'background-image': 'linear-gradient(#003665, #000f25)' + }, + nzStyle: { + 'top': '50px', + }, + nzComponentParams: { + data: item.getData + }, + nzFooter: null, + nzClosable: false, + }); + }) + } + + //获取证照类data + getData(item) { + let url + if (item.auditType == 0) { //油站基本信息 + return new Promise((resolve, reject) => { + let organization = { organizationId: item.organizationId } + resolve(organization) + }) + } else if (item.auditType == 1) { + url = '/api/services/app/OrganizationValidityLicenseRule/Get' + } else if (item.auditType == 2) { + url = '/api/services/app/StationValidityLicense/Get' + } else if (item.auditType) { + url = '/api/services/app/StationFileLicense/Get' + } + return new Promise((resolve, reject) => { + let params = { id: item.itemId } + this.http.get(url, { params }).subscribe((data: any) => { + resolve(data.result) + }) + }) + } + + ngAfterViewInit(): void { + fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件 + if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) { + if (this.totalCount > this.list.length) { + this.SkipCount = String(Number(this.SkipCount) + 50) + this.getRecordList() + } + } + }); + } +} diff --git a/src/app/pages/audit/gas-base-info/gas-base-info.component.html b/src/app/pages/audit/gas-base-info/gas-base-info.component.html new file mode 100644 index 0000000..bd804c6 --- /dev/null +++ b/src/app/pages/audit/gas-base-info/gas-base-info.component.html @@ -0,0 +1,95 @@ +
+
+
+ 详情 +
+ +
+ +

+ + +

+
+

+ + +

+
+

地址:   {{baseInfo.address}}

+
+

+ + +

+
+

+ + +

+
+

+ + +

+
+

+ + +

+
+
+

+ + +

+
+

+ + +

+
+
+
+

+ + +

+
+

+ + +

+
+
+
+

+ + +

+
+

+ + +

+
+
+ + +
diff --git a/src/app/pages/audit/gas-base-info/gas-base-info.component.scss b/src/app/pages/audit/gas-base-info/gas-base-info.component.scss new file mode 100644 index 0000000..8604584 --- /dev/null +++ b/src/app/pages/audit/gas-base-info/gas-base-info.component.scss @@ -0,0 +1,47 @@ +p { + margin-bottom: 0; + color: #C4E2FC; + margin: 10px 0; + img { + width: 88px; + height: 56px; + cursor: pointer; + } +} +label{ display: inline-block; vertical-align: middle; } +.marginLeft { + width: 55%; + overflow: hidden; +} +.title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } +} +.recordP{ + display: flex; + justify-content: space-between; + align-items: center; +} \ No newline at end of file diff --git a/src/app/pages/audit/gas-base-info/gas-base-info.component.ts b/src/app/pages/audit/gas-base-info/gas-base-info.component.ts new file mode 100644 index 0000000..b419c66 --- /dev/null +++ b/src/app/pages/audit/gas-base-info/gas-base-info.component.ts @@ -0,0 +1,75 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, Input, OnInit } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; + +@Component({ + selector: 'app-gas-base-info', + templateUrl: './gas-base-info.component.html', + styleUrls: ['./gas-base-info.component.scss'] +}) +export class GasBaseInfoComponent implements OnInit { + + constructor(private modal: NzModalRef,private http: HttpClient) { } + + @Input() data?: any; + isDetails: boolean = false; //是否是详情 + + ngOnInit(): void { + if (this.data.id === undefined) { //详情 + this.isDetails = true + //this.getAuditLogging() + } + this.getBaseInfo() + } + + baseInfo: any = { + stationType: null, + } + getBaseInfo() { + let params = { organizationUnitId: this.data.organizationId } + this.http.get('/api/services/app/GasStation/Get',{params}).subscribe((data: any)=>{ + data.result.govUnitDetail? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null; + this.baseInfo = data.result + }) + } + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + } + + auditList: any[] = []; + //获取审核记录 + getAuditLogging() { + if (!this.data.organizationId) { + return + } + let params = { orgId: this.data.organizationId } + this.http.get(`/api/services/app/GasStation/GetAuditted`,{params}).subscribe((data: any)=>{ + //this.auditList = data.result.actionList || [] + console.log(data) + }) + } + + //获取审核次数 + getVerifyNum(): number { + let num = 0 + this.auditList.forEach(item=>{ + if (item.auditStatus == 2 || item.auditStatus == 3) { + num = num + 1 + } + }) + return num + } + + //获取驳回次数 + getRejectNum(): number { + let num = 0 + this.auditList.forEach(item=>{ + if (item.auditStatus == 3) { + num = num + 1 + } + }) + return num + } + +} diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html index 891e4e3..d81ea7b 100644 --- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html +++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html @@ -1,5 +1,4 @@
-
@@ -8,6 +7,7 @@
预警类型统计 + 卸油统计 证照预警统计
@@ -21,10 +21,10 @@ - - - - + + + + @@ -89,7 +89,19 @@
- + + + + + + + + + @@ -196,10 +208,14 @@ {{key + 1}}
- - - - + + + + Ⅰ级 Ⅱ级 Ⅲ级 @@ -230,8 +246,13 @@ {{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
- 已处置 - 未处置 + + 误报 + + + 已处置 + 未处置 +
查看 diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts index 7d0c97f..35205b6 100644 --- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts +++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts @@ -182,7 +182,7 @@ export class CriminalRecordsAdminComponent implements OnInit { formatter: function (value, index) { let newParamsName = ''; const paramsNameNumber = value.length; - const provideNumber = 10; + const provideNumber = 1000; const rowNumber = Math.ceil(paramsNameNumber / provideNumber); if (paramsNameNumber > provideNumber) { for (let p = 0; p < rowNumber; p++) { @@ -219,7 +219,7 @@ export class CriminalRecordsAdminComponent implements OnInit { } } }, - inverse: true + inverse: true//倒序 }, series: @@ -250,13 +250,12 @@ export class CriminalRecordsAdminComponent implements OnInit { global: false // 缺省为 false } }, - barWidth: '36%', - + barWidth: '36%' } , grid: { - left: '150px', - right: '80px', + left: '175px', + right: '60px', bottom: '3px', top: '36px' }, @@ -291,7 +290,24 @@ export class CriminalRecordsAdminComponent implements OnInit { } startdate enddate + + isMisinformation: boolean = false//误报按钮的显隐 ngOnInit(): void { + let loginUserInfo + if (sessionStorage.getItem('isGasStation') == 'true') { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + } else { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + } + + if (loginUserInfo.roles.find((item) => { + return item.name == 'ViolationPositiveCensorer' + })) { + this.isMisinformation = true + } else { + this.isMisinformation = false + } + //当前日期 let myDate: any = new Date(); let nowY = myDate.getFullYear(); @@ -312,7 +328,8 @@ export class CriminalRecordsAdminComponent implements OnInit { event: [null], site: [null], disposalState: [null], - datePicker: [[this.startdate, this.enddate]] + datePicker: [[this.startdate, this.enddate]], + misinformation: ['true'], }); //饼图 @@ -463,12 +480,13 @@ export class CriminalRecordsAdminComponent implements OnInit { Level: this.validateForm.value.level, ViolationIds: ViolationIds, ViolateArea: this.validateForm.value.site, - OrganizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + OrganizationUnitId: this.validateForm.value.organization, IsContainsChildren: 'true', IsHandled: disposalState, ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null, SkipCount: this.SkipCount, - MaxResultCount: this.MaxResultCount + MaxResultCount: this.MaxResultCount, + Positive: this.validateForm.value.misinformation } this.tableSpin = true this.http.get('/api/services/app/ViolateRecord/GetAll', { @@ -476,12 +494,9 @@ export class CriminalRecordsAdminComponent implements OnInit { }).subscribe((data: any) => { this.list = this.list.concat(data.result.items); this.list = [...this.list] - // this.list = data.result.items this.totalCount = data.result.totalCount console.log('违规记录列表', data) this.tableSpin = false - - console.log(this.list.length) }) } @@ -557,10 +572,12 @@ export class CriminalRecordsAdminComponent implements OnInit { } this.validateForm.patchValue({ organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, - datePicker: [this.startdate, this.enddate] + datePicker: [this.startdate, this.enddate], + misinformation: 'true', }); this.list = [] this.SkipCount = '0' + console.log('xxxx',this.validateForm.value) this.getViolateRecordList() } @@ -685,7 +702,15 @@ export class CriminalRecordsAdminComponent implements OnInit { }, nzFooter: null, nzOnOk: async () => { - + console.log('误报处理') + for (let index = 0; index < this.list.length; index++) { + const element = this.list[index]; + if (element.id == item.id) { + this.list.splice(index, 1) + this.totalCount = String(Number(this.totalCount) - 1) + this.SkipCount = String(Number(this.SkipCount) - 1) + } + } } }); const instance = modal.getContentComponent(); @@ -737,7 +762,9 @@ export class CriminalRecordsAdminComponent implements OnInit { goWarningList() { this.router.navigate(['/records/warningstatisticslist']) } - + goMisinformationList() { + this.router.navigate(['records/misinformationList']) + } dispose(item) { console.log(item) const modal = this.modal.create({ diff --git a/src/app/pages/criminal-records/criminal-records.component.html b/src/app/pages/criminal-records/criminal-records.component.html index 16da2bd..504340e 100644 --- a/src/app/pages/criminal-records/criminal-records.component.html +++ b/src/app/pages/criminal-records/criminal-records.component.html @@ -7,6 +7,7 @@
预警类型统计 + 卸油统计 证照预警统计
@@ -19,10 +20,10 @@ - - - - + + + + @@ -69,7 +70,14 @@
- + + + + + + + + @@ -193,8 +201,13 @@ {{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
- 已处置 - 未处置 + + 误报 + + + 已处置 + 未处置 +
查看 diff --git a/src/app/pages/criminal-records/criminal-records.component.ts b/src/app/pages/criminal-records/criminal-records.component.ts index 795d9f4..0d3262f 100644 --- a/src/app/pages/criminal-records/criminal-records.component.ts +++ b/src/app/pages/criminal-records/criminal-records.component.ts @@ -297,7 +297,23 @@ export class CriminalRecordsComponent implements OnInit { } startdate enddate + + isMisinformation: boolean = false//误报按钮的显隐 ngOnInit(): void { + let loginUserInfo + if (sessionStorage.getItem('isGasStation') == 'true') { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + } else { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + } + + if (loginUserInfo.roles.find((item) => { + return item.name == 'ViolationPositiveCensorer' + })) { + this.isMisinformation = true + } else { + this.isMisinformation = false + } //当前日期 let myDate: any = new Date(); let nowY = myDate.getFullYear(); @@ -316,7 +332,8 @@ export class CriminalRecordsComponent implements OnInit { event: [null], disposalState: [null], site: [null], - datePicker: [[this.startdate, this.enddate]] + datePicker: [[this.startdate, this.enddate]], + misinformation: ['true'], }); // 饼图 this.myChart = echarts.init(document.getElementById('piechart')); @@ -446,7 +463,8 @@ export class CriminalRecordsComponent implements OnInit { ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null, IsHandled: disposalState, SkipCount: this.SkipCount, - MaxResultCount: this.MaxResultCount + MaxResultCount: this.MaxResultCount, + Positive: this.validateForm.value.misinformation } this.tableSpin = true this.http.get('/api/services/app/ViolateRecord/GetAll', { @@ -490,7 +508,8 @@ export class CriminalRecordsComponent implements OnInit { this.validateForm.controls[key].updateValueAndValidity(); } this.validateForm.patchValue({ - datePicker: [this.startdate, this.enddate] + datePicker: [this.startdate, this.enddate], + misinformation: 'true' }); this.list = [] this.SkipCount = '0' @@ -643,6 +662,9 @@ export class CriminalRecordsComponent implements OnInit { goWarningList() { this.router.navigate(['/records/petrolStation/warningstatisticslist']) } + goMisinformationList() { + this.router.navigate(['records/petrolStation/misinformationList']) + } dispose(item) { console.log(item) const modal = this.modal.create({ diff --git a/src/app/pages/home-page/home-page.component.scss b/src/app/pages/home-page/home-page.component.scss index 2bcbd41..eea676e 100644 --- a/src/app/pages/home-page/home-page.component.scss +++ b/src/app/pages/home-page/home-page.component.scss @@ -1016,7 +1016,7 @@ } // 适配150% -@media screen and (max-height: 600px) { +@media screen and (max-height: 630px) { .informbox { width: 100%; height: 32px; @@ -1333,6 +1333,38 @@ width: 76%; // border: 1px solid red; } + + .oilNum { + position: absolute; + left: 4%; + bottom: 16px; + display: flex; + flex-direction: column; + + .oilNumItem { + display: flex; + align-items: center; + justify-content: space-between; + color: white; + font-size: 12px; + + span { + margin: 0 4px; + } + + .pointbox { + display: flex; + align-items: center; + } + + .point { + width: 6px; + height: 6px; + background-color: #91CCFF; + + } + } + } } } @@ -1356,3 +1388,6 @@ height: 6px; } } + + +//适配1366*768 diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts index 6a86b41..9fecdc0 100644 --- a/src/app/pages/home-page/home-page.component.ts +++ b/src/app/pages/home-page/home-page.component.ts @@ -424,6 +424,13 @@ export class HomePageComponent implements OnInit { this.getHomeAggregation() }, 10 * 6000); + + this.resolutionRatio() + } + + resolutionRatio() { + console.log(document.documentElement.clientWidth) + console.log(document.documentElement.clientHeight) } //获得所有未读消息 @@ -669,7 +676,7 @@ export class HomePageComponent implements OnInit { isOpenModel: boolean = false look(item) { - console.log('消息item', item) + console.log('消息item', item) if (item.notification.data.eventSystemName == '灭火器维护') { this.isOpenModel = true let copydata = item.notification.data diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 2cd7b54..a99a790 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -19,6 +19,9 @@
  • 预警记录
  • +
  • + 审批 +
  • @@ -30,6 +33,9 @@
  • 预警记录
  • +
  • + 证件 +
  • diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 2255548..ee6b0e1 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -43,38 +43,31 @@ export class HomeComponent implements OnInit { userName: string ngOnInit(): void { - this.navChangeService.getMessage().subscribe((message: any) => { - console.log(message);//send a message - if (message.name == 'oilstation') { - this.isGasStationNav = true - } - }); - + // this.navChangeService.getMessage().subscribe((message: any) => { + // console.log(message);//send a message + // if (message.name == 'oilstation') { + // this.isGasStationNav = true + // } + // }); if (this.router.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'false') {//控制返回按钮显示 + this.isGasStationNav = true this.isGasStationBack = true } else { + this.isGasStationNav = false this.isGasStationBack = false } - // if (this.router.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'true') { - // this.isGasStation = true - // } else { - // this.isGasStation = false - // } - if (sessionStorage.getItem('isGasStation') == 'true') { this.isGasStation = true this.isGasStationNav = true - } else { - this.isGasStation = false - this.isGasStationNav = false } this.router.events.pipe( filter(event => event instanceof NavigationEnd) ).subscribe((event: any) => { if (event.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'false') {//控制返回按钮显示 + this.isGasStationNav = true this.isGasStationBack = true } else { this.isGasStationBack = false @@ -154,6 +147,8 @@ export class HomeComponent implements OnInit { SignalRAspNetCoreHelper.initSignalR(); abp.event.on('abp.notifications.received', this.reloadPage); } + + //右下角消息弹窗 messageId = [] receiptOfNotification(userNotification) { let obj = { @@ -283,7 +278,7 @@ export class HomeComponent implements OnInit { nzComponentParams: { data: copydata }, - nzFooter: null, + nzFooter: null }); const instance = modal.getContentComponent(); } @@ -309,7 +304,6 @@ export class HomeComponent implements OnInit { }) } close(item) { - // console.log(item) this.messageId.forEach((element) => { if (element.id == item.notification.entityId) { this.notificationService.remove(element.messageId) @@ -322,6 +316,7 @@ export class HomeComponent implements OnInit { console.log('退出') abp.event.off('abp.notifications.received', this.reloadPage); abp.signalr.disconnect() + this.notificationService.remove() } //获得时间 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 new file mode 100644 index 0000000..c44bbdd --- /dev/null +++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.html @@ -0,0 +1,47 @@ +
    +
    +
    + 详情 +
    + +
    + +
    +

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

    +
    +

    有效期类型:   不适用

    +
    + +

    证件图片:    + + + +

    +
    +

    + 审核记录 + + + 审核次数:{{getVerifyNum()}} + + + 驳回次数:{{getRejectNum()}} + + +

    + + + {{item.creationTime | date:"yyyy/MM/dd"}} + {{item.auditStatus | auditStatus}} + + + +
    + +
    +
    +
    + + +
    \ No newline at end of file diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.scss b/src/app/pages/license/file-category/details-file-category/details-file-category.component.scss new file mode 100644 index 0000000..b5b9ea1 --- /dev/null +++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.scss @@ -0,0 +1,60 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + .content { + box-sizing: border-box; + padding: 0 15px; + max-height: 580px; + overflow-y: auto; + + .circle { + width: 8px; + height: 8px; + background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%); + opacity: 1; + } + .recordP{ + display: flex; + justify-content: space-between; + align-items: center; + } + } + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + + img { + width: 88px; + height: 56px; + cursor: pointer; + } + } +} diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts b/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts new file mode 100644 index 0000000..2161bd7 --- /dev/null +++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts @@ -0,0 +1,111 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import Viewer from 'viewerjs'; +import { NzMessageService } from 'ng-zorro-antd/message'; + +@Component({ + selector: 'app-details-file-category', + templateUrl: './details-file-category.component.html', + styleUrls: ['./details-file-category.component.scss'] +}) +export class DetailsFileCategoryComponent implements OnInit { + + @Input() data?: any; + constructor(private modal: NzModalRef, private http: HttpClient,private message: NzMessageService) { } + + ngOnInit(): void { + this.getAuditLogging() + } + + auditList: any[] = []; + //获取审核记录 + getAuditLogging() { + if (!this.data.auditLogId) { + return + } + let params = { id: this.data.auditLogId } + this.http.get(`/api/services/app/ContentAuditLog/Get`,{params}).subscribe((data: any)=>{ + this.auditList = data.result.actionList || [] + console.log(this.auditList) + }) + } + + //获取审核次数 + getVerifyNum(): number { + let num = 0 + this.auditList.forEach(item=>{ + if (item.auditStatus == 2 || item.auditStatus == 3) { + num = num + 1 + } + }) + return num + } + + //获取驳回次数 + getRejectNum(): number { + let num = 0 + this.auditList.forEach(item=>{ + if (item.auditStatus == 3) { + num = num + 1 + } + }) + return num + } + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + } + + //获取文件格式 + getFileType(name: string):string { + let suffix + if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { + suffix = 'img' + } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { + suffix = 'word' + } else if (name.substring(name.length-4).includes('pdf')) { + suffix = 'pdf' + } + return suffix + } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } + + //查看文件 + lookFile(item) { + if (!item.imageUrl) { + return + } + if (this.getFileType(item.imageUrl) == 'word') { + let arr = item.imageUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(arr.join('.')) + } else if (this.getFileType(item.imageUrl) == 'pdf') { + window.open(item.imageUrl) + } else { + this.message.create('warning', '暂不支持查看!'); + } + } + +} 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 new file mode 100644 index 0000000..7efab10 --- /dev/null +++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html @@ -0,0 +1,48 @@ +
    +
    +
    + 编辑 +
    + +
    +
    +

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

    + +
    + +

    有效期类型*

    + + + + + + + + + + + +

    附件上传(图片格式、pdf格式、word格式)

    + +
    +
    + + + + + + +
    +
    + + +
    +
    + +
    + + +
    +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss new file mode 100644 index 0000000..75ccce6 --- /dev/null +++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss @@ -0,0 +1,127 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + } + + .form { + box-sizing: border-box; + padding: 0 17px; + + label { + color: #C4E2FC; + margin-right: 6px; + } + + + + .validity { + display: flex; + align-items: center; + } + + nz-date-picker { + flex: .5; + } + + nz-range-picker { + flex: 1; + } + + .btnbox { + width: 100%; + margin-top: 24px; + margin-bottom: 17px; + display: flex; + justify-content: flex-end; + + button { + border-radius: 0px; + color: #91CCFF; + } + + button:nth-child(2) { + margin-left: 16px; + } + + .ok { + background: rgba(0, 129, 255, 0.4); + } + + .cancel { + border: 1px solid #C4E2FC; + background: #0c1e38; + color: rgba(99, 102, 105, 0.6); + box-shadow: 0 0 3px 0 #fff inset; + } + } + } + + .uploadDivbox { + width: 100%; + height: 80px; + display: flex; + align-items: center; + position: relative; + margin: 5px 0; + + .uploadDiv { + width: 120px; + height: 80px; + display: flex; + align-items: center; + justify-content: center; + position: relative; + + .fileinput { + width: 114px; + height: 32px; + position: absolute; + z-index: 100; + opacity: 0; + top: 23px; + cursor: pointer; + } + + button { + z-index: 99; + width: 114px; + height: 32px; + background: rgba(0, 129, 255, 0.3); + border: 1px solid #36A2FF; + opacity: 1; + border-radius: 0px; + color: #91CCFF; + } + } + } +} 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 new file mode 100644 index 0000000..8d590bb --- /dev/null +++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts @@ -0,0 +1,147 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import Viewer from 'viewerjs'; +import { NzMessageService } from 'ng-zorro-antd/message'; +@Component({ + selector: 'app-edit-file-category', + templateUrl: './edit-file-category.component.html', + styleUrls: ['./edit-file-category.component.scss'] +}) +export class EditFileCategoryComponent implements OnInit { + + @Input() data?: any; + + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService,private message: NzMessageService) { } + + + data2 + ngOnInit(): void { + this.validateForm = this.fb.group({ + type: [null, [Validators.required]] + }); + this.data2 = JSON.parse(JSON.stringify(this.data)) + this.validatyType = (this.data2.validatyType).toString() + console.log(this.data2) + } + + validatyType: string + isLongTerm = false + imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg' + validityChange($event) { + this.isLongTerm = $event + } + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + } + ok() { + this.modal.triggerOk() + } + + + + isLoadingSave: boolean = false + uploadIndex: string + filechange(e) { + let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id + let file = e.target.files[0] || null //获取上传的文件 + this.openFileSelect(file, `stationPhotos/${oilStationId}/`) + } + //设置文件路径并上传 + postFilePath + async openFileSelect(file: File, extensionPath: string) { + this.postFilePath = extensionPath; + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传 + if (fileSize >= shardSize) // 超过5MB要分块上传 + { + await this.postFileByMul(file); + } + else //普通上传 + { + await this.postFile(file); + } + } + //上传文件 + async postFile(file: File) { + await new Promise((resolve, reject) => { + 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) + resolve('success') + }); + }) + } + + /** + * 分块上传 + * @param file + */ + postFileByMul(file: File) { + 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) + }); + + } + + //获取文件格式 + getFileType(name: string):string { + let suffix + if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { + suffix = 'img' + } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { + suffix = 'word' + } else if (name.substring(name.length-4).includes('pdf')) { + suffix = 'pdf' + } + return suffix + } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } + + //查看文件 + lookFile(item) { + if (!item.imageUrl) { + return + } + if (this.getFileType(item.imageUrl) == 'word') { + let arr = item.imageUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(arr.join('.')) + } else if (this.getFileType(item.imageUrl) == 'pdf') { + window.open(item.imageUrl) + } else { + this.message.create('warning', '暂不支持查看!'); + } + } + +} diff --git a/src/app/pages/license/file-category/file-category.component.html b/src/app/pages/license/file-category/file-category.component.html new file mode 100644 index 0000000..a279810 --- /dev/null +++ b/src/app/pages/license/file-category/file-category.component.html @@ -0,0 +1,47 @@ +
    +
    + + + + + 证件名称 + + 有效期类型 + 附件 + 提交时间 + 审核状态 + 操作 + + + + + + {{item.licenseTypeName || ''}} + + + 不适用 + + + + + + + + + {{item.committedTime | date:"yyyy/MM/dd"}}未提交审核 + + {{item.auditStatus | auditStatus}} + + + 编辑 + 详情 + 撤销审核 + 提交审核 + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/file-category/file-category.component.scss b/src/app/pages/license/file-category/file-category.component.scss new file mode 100644 index 0000000..7b92f86 --- /dev/null +++ b/src/app/pages/license/file-category/file-category.component.scss @@ -0,0 +1,23 @@ +.box { + width: 100%; + height: 100%; +} + +.tablebox { + width: 100%; + height: 100%; + + .operation { + span { + margin-right: 6px; + } + } + + #table { + img { + width: 30px; + height: 30px; + cursor: pointer; + } + } +} diff --git a/src/app/pages/license/file-category/file-category.component.ts b/src/app/pages/license/file-category/file-category.component.ts new file mode 100644 index 0000000..e8a7828 --- /dev/null +++ b/src/app/pages/license/file-category/file-category.component.ts @@ -0,0 +1,175 @@ +import { Component, OnInit, ViewContainerRef } from '@angular/core'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import Viewer from 'viewerjs'; +import * as moment from 'moment'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { HttpClient } from '@angular/common/http'; +import { EditFileCategoryComponent } from './edit-file-category/edit-file-category.component'; +import { DetailsFileCategoryComponent } from './details-file-category/details-file-category.component'; +@Component({ + selector: 'app-file-category', + templateUrl: './file-category.component.html', + styleUrls: ['./file-category.component.scss'] +}) +export class FileCategoryComponent implements OnInit { + + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } + tableSpin = false + list = []; //tabelData + + tableScrollHeight + ngOnInit(): void { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + // 页面监听 + fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + }); + this.getStationList() + } + + //获取当前油站档案类证照 + getStationList() { + this.tableSpin = true + let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation')); + let params = { orgId: data.organization.id || "" } + this.http.get(`/api/services/app/StationFileLicense/GetStationList`, { params }).subscribe((info: any) => { + this.list = info.result + this.tableSpin = false + console.log(info.result) + }) + } + + //获取文件格式 + getFileType(name: string):string { + let suffix + if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { + suffix = 'img' + } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { + suffix = 'word' + } else if (name.substring(name.length-4).includes('pdf')) { + suffix = 'pdf' + } + return suffix + } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } + + //查看文件 + lookFile(item) { + if (!item.imageUrl) { + return + } + if (this.getFileType(item.imageUrl) == 'word') { + let arr = item.imageUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(arr.join('.')) + } else if (this.getFileType(item.imageUrl) == 'pdf') { + window.open(item.imageUrl) + } else { + this.message.create('warning', '暂不支持查看!'); + } + } + + dispose() { + + } + + edit(item) { + const modal = this.modal.create({ + nzContent: EditFileCategoryComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 750, + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + await new Promise(resolve => { + instance.data2.validatyType = Number(instance.validatyType) + this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe(data => { + resolve(data); + this.getStationList(); + this.message.create('success', '修改成功!'); + return true + }) + }) + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } + details(item) { + const modal = this.modal.create({ + nzContent: DetailsFileCategoryComponent, + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } + + //提交审核 + submitReview(item) { + if (!item.id) { + return + } + let params = { id: item.id } + this.http.post('/api/services/app/StationFileLicense/Commit', {}, { params }).subscribe(data => { + this.message.create('success', '提交审核成功!'); + this.getStationList(); + }) + } + + //撤销审核 + cancelReview(item) { + let params = { id: item.id } + this.http.post('/api/services/app/StationFileLicense/Uncommit', {}, { params }).subscribe(data => { + this.message.create('success', '撤销审核成功!'); + this.getStationList(); + }) + } + +} diff --git a/src/app/pages/license/histories/histories.component.html b/src/app/pages/license/histories/histories.component.html new file mode 100644 index 0000000..3dcfc90 --- /dev/null +++ b/src/app/pages/license/histories/histories.component.html @@ -0,0 +1,49 @@ +
    +
    + + + + + 证件名称 + + 证件编号 + 证件有效期 + 有效期类型 + 办理类型 + 通知内容 + 通知状态 + 处置状态 + 操作 + + + + + + {{item.licenseSnapshot.validityLicenseType.licenseName}} + + {{item.licenseSnapshot.licenseCode}} + {{item.licenseSnapshot.validityEndTime | date:"yyyy/MM/dd"}} + + + 长期 + + + {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}} + + + {{getHandleTypes(item.handleTypes)}} + {{item.notificationContent | notificationContent}} + + {{item.licenseSnapshot.licenseViolationType | licenseViolationType}} + {{item.handleState | handleState}} + + 详情 + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/histories/histories.component.scss b/src/app/pages/license/histories/histories.component.scss new file mode 100644 index 0000000..aaca580 --- /dev/null +++ b/src/app/pages/license/histories/histories.component.scss @@ -0,0 +1,15 @@ +.box { + width: 100%; + height: 100%; +} + +.tablebox { + width: 100%; + height: 100%; + + .operation { + span { + margin-right: 6px; + } + } +} diff --git a/src/app/pages/license/histories/histories.component.ts b/src/app/pages/license/histories/histories.component.ts new file mode 100644 index 0000000..8600679 --- /dev/null +++ b/src/app/pages/license/histories/histories.component.ts @@ -0,0 +1,123 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, OnInit, ViewContainerRef } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import { DetailsUpdateCategoryComponent } from '../update-category/details-update-category/details-update-category.component'; +@Component({ + selector: 'app-histories', + templateUrl: './histories.component.html', + styleUrls: ['./histories.component.scss'] +}) + + +export class HistoriesComponent implements OnInit { + + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private http: HttpClient, private message: NzMessageService) { } + tableSpin = false + list = [] + + tableScrollHeight + ngOnInit(): void { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + // 页面监听 + fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + }); + + + this.getInform() + } + + dispose() { + console.log('处置') + } + + + //获取当前油站通知 + SkipCount = '0' + MaxResultCount = '999' + getInform() { + this.tableSpin = true + let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation')); + let params: any = { + OrganizationUnitId: data.organization.id || "", + Active: false, + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount + } + this.http.get(`/api/services/app/StationValidityLicenseNotificationRecord/GetAll`, { params: params }).subscribe((data: any) => { + + this.list = data.result.items + this.tableSpin = false + console.log(data.result.items) + }) + } + + + //获取办理类型 + 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(',') + } + + + //处置 + details(item) { + 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: item.licenseSnapshot + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } + +} + + +//办理类型 +export class handleType { + list: 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: "到期评价" }, + ] +} +export class handleTypeList { + value: number + name: string +} \ No newline at end of file diff --git a/src/app/pages/license/inform/inform.component.html b/src/app/pages/license/inform/inform.component.html new file mode 100644 index 0000000..f77cf12 --- /dev/null +++ b/src/app/pages/license/inform/inform.component.html @@ -0,0 +1,51 @@ +
    +
    + + + + + 证件名称 + + 证件编号 + 证件有效期 + 有效期类型 + 办理类型 + 通知内容 + 通知状态 + 处置状态 + 操作 + + + + + + {{item.licenseSnapshot.validityLicenseType.licenseName}} + + {{item.licenseSnapshot.licenseCode}} + {{item.licenseSnapshot.validityEndTime | date:"yyyy/MM/dd"}} + + + 长期 + + + {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}} + + + {{getHandleTypes(item.handleTypes)}} + {{item.notificationContent | notificationContent}} + + {{item.licenseSnapshot.licenseViolationType | licenseViolationType}} + {{item.handleState | handleState}} + + 忽略 + 处置 + 申请延期 + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/inform/inform.component.scss b/src/app/pages/license/inform/inform.component.scss new file mode 100644 index 0000000..710d327 --- /dev/null +++ b/src/app/pages/license/inform/inform.component.scss @@ -0,0 +1,13 @@ +.box{ + width: 100%; + height: 100%; +} +.tablebox{ + width: 100%; + height: 100%; + .operation{ + span{ + margin-right: 6px; + } + } +} \ No newline at end of file diff --git a/src/app/pages/license/inform/inform.component.ts b/src/app/pages/license/inform/inform.component.ts new file mode 100644 index 0000000..41e6777 --- /dev/null +++ b/src/app/pages/license/inform/inform.component.ts @@ -0,0 +1,108 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, OnInit } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +@Component({ + selector: 'app-inform', + templateUrl: './inform.component.html', + styleUrls: ['./inform.component.scss'] +}) +export class InformComponent implements OnInit { + + constructor(private http: HttpClient, private message: NzMessageService) { } + tableSpin = false + list = [] + + tableScrollHeight + + fromEvent + ngOnInit(): void { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + // 页面监听 + + this.fromEvent = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + }); + + + this.getInform() + } + + + + dispose() { + console.log('处置') + } + + + //获取当前油站通知 + SkipCount = '0' + MaxResultCount = '100' + getInform() { + this.tableSpin = true + let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation')); + let params: any = { + OrganizationUnitId: data.organization.id || "", + Active: true, + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount + } + this.http.get(`/api/services/app/StationValidityLicenseNotificationRecord/GetAll`, { params: params }).subscribe((data: any) => { + this.list = data.result.items + this.tableSpin = false + console.log(data.result.items) + }) + } + + + //获取办理类型 + 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(',') + } + + + //处置 + updateState(item, type) { + let body = { + id: item.id, + operation: type + } + this.http.put('/api/services/app/StationValidityLicenseNotificationRecord/UpdateState', body).subscribe(data => { + this.getInform() + this.message.create('success', '操作成功'); + }, err => { + this.message.create('error', '操作失败'); + }) + } +} +//办理类型 +export class handleType { + list: 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: "到期评价" }, + ] +} +export class handleTypeList { + value: number + name: string +} \ No newline at end of file diff --git a/src/app/pages/license/nav-bar/nav-bar.component.html b/src/app/pages/license/nav-bar/nav-bar.component.html new file mode 100644 index 0000000..790c47c --- /dev/null +++ b/src/app/pages/license/nav-bar/nav-bar.component.html @@ -0,0 +1,19 @@ +
    +
    +
    + + +
    +
    +
    + + + + +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/nav-bar/nav-bar.component.scss b/src/app/pages/license/nav-bar/nav-bar.component.scss new file mode 100644 index 0000000..71c53c0 --- /dev/null +++ b/src/app/pages/license/nav-bar/nav-bar.component.scss @@ -0,0 +1,75 @@ +.license { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.title { + width: 100%; + height: 64px; + box-sizing: border-box; + padding: 0 28px; + margin: 13px 0; + position: relative; + + .titlebox { + width: 100%; + height: 100%; + display: flex; + align-items: center; + + img { + width: 65px; + height: 65px; + } + + .nav { + flex: 1; + height: 48px; + display: flex; + align-items: center; + justify-content: center; + // background-image: linear-gradient(to right, #002147, #033565, #064e8e, #064e8e, #033565, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.32) 50%, rgba(35, 153, 255, 0) 100%); + + .navitem { + width: 100%; + height: 32px; + display: flex; + align-items: center; + // background-image: linear-gradient(to right, #002147, #0f5ca0, #1c88e6, #1c88e6, #0f5ca0, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.8) 50%, rgba(35, 153, 255, 0) 100%); + + span { + margin-left: 25px; + color: #bce0ff; + font-size: 20px; + font-family: titlefont; + cursor: pointer; + } + + span:nth-child(1) { + margin-left: 12px; + } + + .grey { + color: #68829F; + } + } + + } + } + + .packup { + position: absolute; + right: 33px; + top: 16px; + cursor: pointer; + } +} +.content{ + flex: 1; + box-sizing: border-box; + padding: 0 40px 20px 40px; +} diff --git a/src/app/pages/license/nav-bar/nav-bar.component.ts b/src/app/pages/license/nav-bar/nav-bar.component.ts new file mode 100644 index 0000000..5f0f058 --- /dev/null +++ b/src/app/pages/license/nav-bar/nav-bar.component.ts @@ -0,0 +1,20 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-nav-bar', + templateUrl: './nav-bar.component.html', + styleUrls: ['./nav-bar.component.scss'] +}) +export class NavBarComponent implements OnInit { + + constructor() { } + + navList = ['通知','更新类证件','档案类证件','历史纪录'] + selectedItem = '通知' + selectNav(item){ + this.selectedItem = item + } + ngOnInit(): void { + } + +} diff --git a/src/app/pages/license/pdf-word-look/pdf-word-look.component.html b/src/app/pages/license/pdf-word-look/pdf-word-look.component.html new file mode 100644 index 0000000..b8db427 --- /dev/null +++ b/src/app/pages/license/pdf-word-look/pdf-word-look.component.html @@ -0,0 +1,12 @@ +
    +
    +
    + 详情 +
    + +
    + +
    + +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/pdf-word-look/pdf-word-look.component.scss b/src/app/pages/license/pdf-word-look/pdf-word-look.component.scss new file mode 100644 index 0000000..96c259d --- /dev/null +++ b/src/app/pages/license/pdf-word-look/pdf-word-look.component.scss @@ -0,0 +1,38 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + .content { + box-sizing: border-box; + padding: 0 15px; + max-height: 580px; + overflow-y: auto; + + } + +} diff --git a/src/app/pages/license/pdf-word-look/pdf-word-look.component.ts b/src/app/pages/license/pdf-word-look/pdf-word-look.component.ts new file mode 100644 index 0000000..505bdac --- /dev/null +++ b/src/app/pages/license/pdf-word-look/pdf-word-look.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import Viewer from 'viewerjs'; +@Component({ + selector: 'app-pdf-word-look', + templateUrl: './pdf-word-look.component.html', + styleUrls: ['./pdf-word-look.component.scss'] +}) +export class PdfWordLookComponent implements OnInit { + + @Input() data?: any; + constructor(private modal: NzModalRef) { } + + + ngOnInit(): void { + console.log('文档地址',this.data.url) + } + + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + } + + +} 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 new file mode 100644 index 0000000..7ac2a22 --- /dev/null +++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.html @@ -0,0 +1,53 @@ +
    +
    +
    + 详情 +
    + +
    + +
    +

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

    +
    +

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

    +
    +

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

    +
    +

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

    +
    +

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

    +
    + +

    证件图片:    + + + +

    +
    +

    + 审核记录 + + + 审核次数:{{getVerifyNum()}} + + + 驳回次数:{{getRejectNum()}} + + +

    + + + {{item.creationTime | date:"yyyy/MM/dd"}} + {{item.auditStatus | auditStatus}} + + + +
    + +
    +
    +
    + + +
    \ No newline at end of file diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.scss b/src/app/pages/license/update-category/details-update-category/details-update-category.component.scss new file mode 100644 index 0000000..ff540a7 --- /dev/null +++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.scss @@ -0,0 +1,59 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + .content { + box-sizing: border-box; + padding: 0 15px; + max-height: 580px; + overflow-y: auto; + .circle { + width: 8px; + height: 8px; + background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%); + opacity: 1; + } + .recordP{ + display: flex; + justify-content: space-between; + align-items: center; + } + } + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + + img { + width: 88px; + height: 56px; + cursor: pointer; + } + } +} 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 new file mode 100644 index 0000000..18de9d9 --- /dev/null +++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts @@ -0,0 +1,128 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import Viewer from 'viewerjs'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { handleType, handleTypeList } from '../edit-update-category/edit-update-category.component'; + +@Component({ + selector: 'app-details-update-category', + templateUrl: './details-update-category.component.html', + styleUrls: ['./details-update-category.component.scss'] +}) +export class DetailsUpdateCategoryComponent implements OnInit { + @Input() data?: any; + constructor(private modal: NzModalRef,private message: NzMessageService,private http: HttpClient) { } + + + ngOnInit(): void { + this.getAuditLogging() + } + + auditList: any[] = []; + //获取审核记录 + getAuditLogging() { + if (!this.data.auditLogId) { + return + } + let params = { id: this.data.auditLogId } + this.http.get(`/api/services/app/ContentAuditLog/Get`,{params}).subscribe((data: any)=>{ + this.auditList = data.result.actionList || [] + console.log(this.auditList) + }) + } + + //获取审核次数 + getVerifyNum(): number { + let num = 0 + this.auditList.forEach(item=>{ + if (item.auditStatus == 2 || item.auditStatus == 3) { + num = num + 1 + } + }) + return num + } + + //获取驳回次数 + getRejectNum(): number { + let num = 0 + this.auditList.forEach(item=>{ + if (item.auditStatus == 3) { + num = num + 1 + } + }) + return num + } + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + } + + //获取办理类型 + 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 + if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { + suffix = 'img' + } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { + suffix = 'word' + } else if (name.substring(name.length-4).includes('pdf')) { + suffix = 'pdf' + } + return suffix + } + + //查看文件 + lookFile(item) { + if (!item.imageUrl) { + return + } + if (this.getFileType(item.imageUrl) == 'word') { + let arr = item.imageUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(arr.join('.')) + } else if (this.getFileType(item.imageUrl) == 'pdf') { + window.open(item.imageUrl) + } else { + this.message.create('warning', '暂不支持查看!'); + } + } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 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 new file mode 100644 index 0000000..5020e33 --- /dev/null +++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html @@ -0,0 +1,70 @@ +
    +
    +
    + 编辑 +
    + +
    +
    +

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

    + +
    + +

    证件编号*

    + + + + + + + + +

    证件有效期*

    + +
    + + + +
    + +

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

    + +

    办理类型

    + + + + + + + + + +

    附件上传(图片格式、pdf格式、word格式)

    + +
    +
    + + + + + + +
    +
    + + +
    +
    + +
    + + +
    +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss new file mode 100644 index 0000000..75ccce6 --- /dev/null +++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss @@ -0,0 +1,127 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 12px 0; + } + + .form { + box-sizing: border-box; + padding: 0 17px; + + label { + color: #C4E2FC; + margin-right: 6px; + } + + + + .validity { + display: flex; + align-items: center; + } + + nz-date-picker { + flex: .5; + } + + nz-range-picker { + flex: 1; + } + + .btnbox { + width: 100%; + margin-top: 24px; + margin-bottom: 17px; + display: flex; + justify-content: flex-end; + + button { + border-radius: 0px; + color: #91CCFF; + } + + button:nth-child(2) { + margin-left: 16px; + } + + .ok { + background: rgba(0, 129, 255, 0.4); + } + + .cancel { + border: 1px solid #C4E2FC; + background: #0c1e38; + color: rgba(99, 102, 105, 0.6); + box-shadow: 0 0 3px 0 #fff inset; + } + } + } + + .uploadDivbox { + width: 100%; + height: 80px; + display: flex; + align-items: center; + position: relative; + margin: 5px 0; + + .uploadDiv { + width: 120px; + height: 80px; + display: flex; + align-items: center; + justify-content: center; + position: relative; + + .fileinput { + width: 114px; + height: 32px; + position: absolute; + z-index: 100; + opacity: 0; + top: 23px; + cursor: pointer; + } + + button { + z-index: 99; + width: 114px; + height: 32px; + background: rgba(0, 129, 255, 0.3); + border: 1px solid #36A2FF; + opacity: 1; + border-radius: 0px; + color: #91CCFF; + } + } + } +} 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 new file mode 100644 index 0000000..fe390b5 --- /dev/null +++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts @@ -0,0 +1,221 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import Viewer from 'viewerjs'; +import { NzMessageService } from 'ng-zorro-antd/message'; + +@Component({ + selector: 'app-edit-update-category', + templateUrl: './edit-update-category.component.html', + styleUrls: ['./edit-update-category.component.scss'] +}) +export class EditUpdateCategoryComponent implements OnInit { + + @Input() data?: any; + + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService,private message: NzMessageService,) { } + + handleTypeList: handleTypeList[] = new handleType().list; + data2: any; //深拷贝data + isLongTermTime: Date = null; // 限期 日期 + isNoLongTermTime: Date[] = []; //长期 日期 + + ngOnInit(): void { + this.validateForm = this.fb.group({ + number: [null, [Validators.required]], + isLongTerm: [null, [Validators.required]], + type: [null, [Validators.required]], + isLongTermTime: [null,], + isNoLongTermTime: [null,], + }); + // 日期 + this.data2 = JSON.parse(JSON.stringify(this.data)) + if (this.data2.isLongTerm) { + this.isLongTermTime = new Date(this.data2.validityStartTime) + if (this.isLongTermTime.getFullYear && this.isLongTermTime.getFullYear() < 1000) { + this.isLongTermTime = new Date() + } + } else { + this.isNoLongTermTime = [] + this.isNoLongTermTime.push(new Date(this.data2.validityStartTime)) + this.isNoLongTermTime.push(new Date(this.data2.validityEndTime)) + if (this.isNoLongTermTime.length && this.isNoLongTermTime.find(item=>{ return item.getFullYear() < 1000 })) { + this.isNoLongTermTime[0] = new Date() + this.isNoLongTermTime[1] = new Date() + } + } + + console.log(this.data2) + } + + imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg' + + destroyModal() { + this.modal.destroy({ data: 'this the result data' }); + } + + ok() { + this.modal.triggerOk() + } + + //check change + validityChange($event) { + if ($event) { //长期 + this.data2.validityDays = 999 + } else { //限期 + let start = (new Date(this.isNoLongTermTime[0])).getTime(); + let end = (new Date(this.isNoLongTermTime[1])).getTime(); + let time = end - start + if (time <= 0) { + this.data2.validityDays = 0 + } else { + this.data2.validityDays = time / (1000*3600*24); + } + } + } + + //date change + onChange(e) { + if (!e) { + return + } + if (e instanceof Array) { + let start = (new Date(e[0])).getTime(); + let end = (new Date(e[1])).getTime(); + let time = end - start + if (time <= 0) { + this.data2.validityDays = 0 + } else { + this.data2.validityDays = time / (1000*3600*24); + } + } else { + this.data2.validityDays = 999 + } + } + + //获取文件格式 + getFileType(name: string):string { + let suffix + if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { + suffix = 'img' + } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { + suffix = 'word' + } else if (name.substring(name.length-4).includes('pdf')) { + suffix = 'pdf' + } + return suffix + } + + //查看文件 + lookFile(item) { + if (!item.imageUrl) { + return + } + if (this.getFileType(item.imageUrl) == 'word') { + let arr = item.imageUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(arr.join('.')) + } else if (this.getFileType(item.imageUrl) == 'pdf') { + window.open(item.imageUrl) + } else { + this.message.create('warning', '暂不支持查看!'); + } + } + + + + isLoadingSave: boolean = false + uploadIndex: string + filechange(e) { + let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id + let file = e.target.files[0] || null //获取上传的文件 + this.openFileSelect(file, `stationPhotos/${oilStationId}/`) + } + //设置文件路径并上传 + postFilePath + async openFileSelect(file: File, extensionPath: string) { + this.postFilePath = extensionPath; + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传 + if (fileSize >= shardSize) // 超过5MB要分块上传 + { + await this.postFileByMul(file); + } + else //普通上传 + { + await this.postFile(file); + } + } + //上传文件 + async postFile(file: File) { + await new Promise((resolve, reject) => { + 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) + resolve('success') + }); + }) + } + + /** + * 分块上传 + * @param file + */ + postFileByMul(file: File) { + 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) + }); + + } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } + +} + +//办理类型 +export class handleType { + list: 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: "到期评价" }, + ] +} +export class handleTypeList { + value: number + name: string +} \ No newline at end of file diff --git a/src/app/pages/license/update-category/update-category.component.html b/src/app/pages/license/update-category/update-category.component.html new file mode 100644 index 0000000..b205c16 --- /dev/null +++ b/src/app/pages/license/update-category/update-category.component.html @@ -0,0 +1,66 @@ +
    +
    + + + + + 证件名称 + + 证件编号 + 证件有效期 + 附件 + 有效期类型 + 办理类型 + + 提交时间 + 审核状态 + 预警状态 + 操作 + + + + + + {{item.licenseTypeName || ''}} + + {{item.licenseCode || ''}} + {{item.isLongTerm ? '长期证照' : (item.validityEndTime | date:"yyyy/MM/dd")}} + + + + + + + + 长期 + + + {{item.validityDays ? item.validityDays+'天' : '/'}} + + + + {{getHandleTypes(item.handleTypes)}} + + {{item.committedTime | date:"yyyy/MM/dd"}}未提交审核 + + {{item.auditStatus | auditStatus}} + + + + 办理提醒 + 临期提醒 + 逾期报警 + + + 编辑 + 详情 + 撤销审核 + 提交审核 + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/pages/license/update-category/update-category.component.scss b/src/app/pages/license/update-category/update-category.component.scss new file mode 100644 index 0000000..87b68c8 --- /dev/null +++ b/src/app/pages/license/update-category/update-category.component.scss @@ -0,0 +1,20 @@ +.box{ + width: 100%; + height: 100%; +} +.tablebox{ + width: 100%; + height: 100%; + .operation{ + span{ + margin-right: 6px; + } + } + #table{ + img{ + width: 30px; + height: 30px; + cursor: pointer; + } + } +} \ No newline at end of file diff --git a/src/app/pages/license/update-category/update-category.component.ts b/src/app/pages/license/update-category/update-category.component.ts new file mode 100644 index 0000000..4e36b4f --- /dev/null +++ b/src/app/pages/license/update-category/update-category.component.ts @@ -0,0 +1,205 @@ +import { Component, OnInit, ViewContainerRef } from '@angular/core'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Observable, fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import Viewer from 'viewerjs'; +import { EditUpdateCategoryComponent, handleType, handleTypeList } from './edit-update-category/edit-update-category.component'; +import * as moment from 'moment'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { HttpClient } from '@angular/common/http'; +import { DetailsUpdateCategoryComponent } from './details-update-category/details-update-category.component'; +import { PdfWordLookComponent } from '../pdf-word-look/pdf-word-look.component'; +@Component({ + selector: 'app-update-category', + templateUrl: './update-category.component.html', + styleUrls: ['./update-category.component.scss'] +}) +export class UpdateCategoryComponent implements OnInit { + + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } + tableSpin = false + list = [] + + tableScrollHeight + ngOnInit(): void { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + // 页面监听 + fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + }); + this.getStationList() + } + + //获取当前油站档案类证照 + getStationList() { + this.tableSpin = true + let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation')); + let params = { orgId: data.organization.id || "" } + this.http.get(`/api/services/app/StationValidityLicense/GetCurStationLicense`,{params}).subscribe((info: any)=>{ + this.list = info.result + this.tableSpin = false + console.log(info.result) + }) + } + + //获取办理类型 + 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 + if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { + suffix = 'img' + } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { + suffix = 'word' + } else if (name.substring(name.length-4).includes('pdf')) { + suffix = 'pdf' + } + return suffix + } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } + + //查看文件 + lookFile(item) { + if (!item.imageUrl) { + return + } + if (this.getFileType(item.imageUrl) == 'word') { + let arr = item.imageUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(arr.join('.')) + } else if (this.getFileType(item.imageUrl) == 'pdf') { + window.open(item.imageUrl) + } else { + this.message.create('warning', '暂不支持查看!'); + } + } + + dispose() { + + } + + edit(item) { + const modal = this.modal.create({ + nzContent: EditUpdateCategoryComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 750, + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise(resolve => { + let body = instance.data2 + // 日期 + if (body.isLongTerm) { + body.validityStartTime = instance.isLongTermTime + } else { + body.validityStartTime = instance.isNoLongTermTime[0] || new Date() + body.validityEndTime = instance.isNoLongTermTime[1] || new Date() + } + this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe(data => { + resolve(data); + this.getStationList(); + this.message.create('success', '修改成功!'); + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } + + details(item) { + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { }); + } + + //提交审核 + submitReview(item){ + if (!item.id) { + return + } + let params = { id: item.id } + this.http.post('/api/services/app/StationValidityLicense/Commit', {},{params}).subscribe(data => { + this.message.create('success', '提交审核成功!'); + this.getStationList(); + }) + } + + //撤销审核 + cancelReview(item){ + let params = { id: item.id } + this.http.post('/api/services/app/StationValidityLicense/Uncommit', {},{params}).subscribe(data => { + this.message.create('success', '撤销审核成功!'); + this.getStationList(); + }) + } + +} diff --git a/src/app/pages/login/login.component.html b/src/app/pages/login/login.component.html index c14a77a..56bc092 100644 --- a/src/app/pages/login/login.component.html +++ b/src/app/pages/login/login.component.html @@ -7,14 +7,14 @@ - + - @@ -47,4 +47,4 @@

    智能安全管理系统

    -->
    -
    +
    \ No newline at end of file diff --git a/src/app/pages/misinformation-list/misinformation-list.component.html b/src/app/pages/misinformation-list/misinformation-list.component.html new file mode 100644 index 0000000..98b6949 --- /dev/null +++ b/src/app/pages/misinformation-list/misinformation-list.component.html @@ -0,0 +1,260 @@ +
    +
    + +
    +
    + +
    +
    + 预警类型统计 + 预警误报统计 + 卸油统计 + 证照预警统计 +
    +
    +
    + +
    + + + + + + + +
    +
    +
    +
    + 序号 +
    +
    + + 预警级别 + +
    +
    + 预警类型 +
    +
    + 预警事件 +
    +
    + 所属公司 +
    +
    + 管理区域 +
    +
    + 加油站 +
    +
    + 预警区域 +
    +
    + 摄像头名称 +
    +
    + 预警时间 +
    +
    + 状态 +
    +
    + 操作 +
    +
    +
    +
    +
    + {{key + 1}} +
    +
    + + + + + Ⅰ级 + Ⅱ级 + Ⅲ级 + Ⅳ级 +
    +
    + {{item.violation.violationType}} +
    +
    + {{item.violation.eventSystemName}} +
    +
    + {{item.gasStation.companyName}} +
    +
    + {{item.gasStation.locationName}} +
    +
    + {{item.gasStation.stationName}} +
    +
    + {{item.violateArea}} +
    +
    + {{item.cameraNo}} +
    +
    + {{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}} +
    +
    + 已处置 + 未处置 +
    +
    + 查看 + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/pages/misinformation-list/misinformation-list.component.scss b/src/app/pages/misinformation-list/misinformation-list.component.scss new file mode 100644 index 0000000..33965e7 --- /dev/null +++ b/src/app/pages/misinformation-list/misinformation-list.component.scss @@ -0,0 +1,612 @@ +.recordsboxadmin { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.search { + box-sizing: border-box; + padding: 0 36px; + width: 100%; + height: 32px; + margin-bottom: 16px; + + form { + width: 100%; + height: 32px; + display: flex; + justify-content: flex-start; + + .searchParams, + .btn { + margin: 0 3px; + } + + .searchParams { + // flex: 5; + width: 150px; + } + + .searchParamsLong { + width: 250px; + } + + .searchParams2 { + width: 220px; + } + + .btn { + // flex: 1; + } + + nz-select { + color: rgba(145, 204, 255, 0.95); + } + + nz-tree-select { + color: rgba(145, 204, 255, 0.95); + } + + nz-range-picker { + background-color: rgba(0, 0, 0, 0); + width: 100%; + } + + } + + +} + +.content { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + + .title { + width: 100%; + height: 64px; + box-sizing: border-box; + padding: 0 28px; + margin: 13px 0; + position: relative; + + .titlebox { + width: 100%; + height: 100%; + display: flex; + align-items: center; + + img { + width: 65px; + height: 65px; + } + + .content { + flex: 1; + height: 48px; + display: flex; + align-items: center; + justify-content: center; + // background-image: linear-gradient(to right, #002147, #033565, #064e8e, #064e8e, #033565, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.32) 50%, rgba(35, 153, 255, 0) 100%); + + .contentitem { + width: 100%; + height: 32px; + display: flex; + align-items: center; + // background-image: linear-gradient(to right, #002147, #0f5ca0, #1c88e6, #1c88e6, #0f5ca0, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.8) 50%, rgba(35, 153, 255, 0) 100%); + + span { + margin-left: 10px; + color: #bce0ff; + font-size: 20px; + font-family: titlefont; + cursor: pointer; + } + + span:nth-child(1) { + margin-left: 12px; + } + + .grey { + color: #68829F; + } + } + + } + } + + .packup { + position: absolute; + right: 33px; + top: 16px; + cursor: pointer; + } + } + + .chartsbox { + width: 100%; + display: flex; + justify-content: center; + + .chartname { + position: absolute; + left: 20px; + top: 12px; + } + + .chart { + width: 98%; + height: 350px; + box-sizing: border-box; + padding: 0 10px; + display: flex; + + div { + display: flex; + flex-direction: column; + + span { + font-family: titlefont; + display: flex; + align-items: center; + height: 28px; + color: #bee1ff; + font-size: 16px; + } + + div { + flex: 1; + } + + } + + .leftbox { + width: 360px; + position: relative; + border: 0px; + box-shadow: 0 0 26px 0px #1a7fd7 inset; + margin-right: 16px; + + .centerContent { + position: absolute; + top: 42%; + left: 50%; + transform: translateX(-50%); + width: 170px; + + div { + text-align: center; + } + + .numname { + font-family: titlefont; + color: #bee1ff; + } + + .num { + color: #FFFFFF; + font-size: 42px; + text-shadow: 0px 0px 16px #3A9AFF; + font-weight: bold; + height: 49px; + line-height: 50px; + } + } + } + + .rightbox { + flex: 1; + position: relative; + border: 0px; + box-shadow: 0 0 26px 0px #1a7fd7 inset; + + .btnbox { + position: absolute; + right: 28px; + top: 12px; + display: flex; + flex-direction: row; + z-index: 999; + + .btn { + width: 64px; + height: 30px; + text-align: center; + line-height: 30px; + // border: 1px solid #91CCFF; + color: #91CCFF; + border-radius: 0px; + box-shadow: 0 0 5px 1px #2399FF inset; + background: none; + cursor: pointer; + } + + .rankingBtnbox { + display: flex; + flex-direction: column; + } + + .selectedbtn { + background: linear-gradient(180deg, #000D21 0%, #001331 27%, #2399FF 100%); + color: white; + } + } + } + } + } + + .tablebox { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + overflow: hidden; + + .table { + color: white; + flex: 1; + width: 96%; + display: flex; + flex-direction: column; + overflow: hidden; + + .th { + height: 38px; + line-height: 38px; + background: rgba(35, 153, 255, 0.2); + border: 1px solid rgba(35, 217, 255, 0.4); + box-shadow: 0 0 3px 0 rgba(35, 217, 255, 0.4) inset; + color: #23D9FF; + } + + .tbody { + flex: 1; + overflow-y: auto; + + .tr { + height: 38px; + line-height: 38px; + border-bottom: 1px solid #0d3761; + + div { + color: #91CCFF; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + .look { + color: #36A2FF; + cursor: pointer; + } + } + + img { + width: 36px; + } + + } + } + } + + .pagination { + margin: 15px 0; + display: flex; + align-items: center; + justify-content: center; + } + + ::-webkit-scrollbar { + width: 0px; + } + + } +} + + +// 适配125% +@media screen and (max-height: 750px) { + .search { + box-sizing: border-box; + padding: 0 30px; + height: 32px; + margin-bottom: 12px; + + form { + width: 100%; + height: 32px; + } + } + + .content { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + + .title { + height: 42px; + padding: 0 20px; + margin: 8px 0; + + .titlebox { + width: 100%; + height: 100%; + display: flex; + align-items: center; + + img { + width: 46px; + height: 46px; + } + + .content { + height: 36px; + + .contentitem { + width: 100%; + height: 25px; + + span { + margin-left: 6px; + font-size: 16px; + } + + span:nth-child(1) { + margin-left: 8px; + } + } + + } + } + + .packup { + position: absolute; + right: 33px; + top: 4px; + cursor: pointer; + } + } + + .chartsbox { + width: 100%; + height: 43%; + + .chartname { + position: absolute; + left: 20px; + top: 12px; + } + + .chart { + height: 100%; + + div { + span { + font-size: 14px; + } + + div { + flex: 1; + } + + } + + .leftbox { + width: 300px; + box-shadow: 0 0 20px 0px #1a7fd7 inset; + margin-right: 12px; + + .centerContent { + .num { + color: #FFFFFF; + font-size: 42px; + text-shadow: 0px 0px 16px #3A9AFF; + font-weight: bold; + height: 49px; + line-height: 50px; + } + } + } + + .rightbox { + flex: 1; + position: relative; + border: 0px; + box-shadow: 0 0 26px 0px #1a7fd7 inset; + + .btnbox { + position: absolute; + right: 28px; + top: 12px; + display: flex; + flex-direction: row; + z-index: 999; + + .rankingBtn { + margin-right: 12px; + } + } + } + } + } + + .tablebox { + .table { + .th { + height: 32px; + line-height: 32px; + font-size: 12px !important; + } + + .tbody { + + .tr { + height: 32px; + line-height: 32px; + + div { + font-size: 12px !important; + } + + img { + width: 32px; + } + } + } + } + } + } +} + +// 适配150% +@media screen and (max-height: 600px) { + .search { + box-sizing: border-box; + padding: 0 22px; + height: 32px; + margin-bottom: 6px; + + form { + width: 100%; + height: 32px; + } + } + + .content { + .title { + height: 36px; + padding: 0 20px; + margin: 3px 0; + + .titlebox { + width: 100%; + height: 100%; + display: flex; + align-items: center; + + img { + width: 36px; + height: 36px; + } + + .content { + height: 30px; + + .contentitem { + width: 100%; + height: 22px; + + span { + margin-left: 6px; + font-size: 13px; + } + + span:nth-child(1) { + margin-left: 12px; + } + } + + } + } + + .packup { + position: absolute; + right: 33px; + top: 2px; + cursor: pointer; + } + } + + .chartsbox { + width: 100%; + height: 40%; + + .chartname { + position: absolute; + left: 20px; + top: 12px; + } + + .chart { + height: 100%; + + div { + span { + font-size: 14px; + } + + div { + flex: 1; + } + + } + + .leftbox { + width: 260px; + box-shadow: 0 0 20px 0px #1a7fd7 inset; + margin-right: 8px; + + .centerContent { + .num { + color: #FFFFFF; + font-size: 32px; + text-shadow: 0px 0px 12px #3A9AFF; + font-weight: bold; + height: 42px; + line-height: 42px; + } + } + } + + .rightbox { + box-shadow: 0 0 22px 0px #1a7fd7 inset; + + .btnbox { + position: absolute; + right: 28px; + top: 12px; + display: flex; + flex-direction: row; + z-index: 999; + + .rankingBtn { + margin-right: 8px; + } + } + } + } + } + + .tablebox { + .table { + .th { + height: 28px; + line-height: 28px; + font-size: 10px !important; + } + + .tbody { + + .tr { + height: 28px; + line-height: 28px; + + div { + font-size: 10px !important; + } + + img { + width: 30px; + } + } + } + } + + } + } +} diff --git a/src/app/pages/misinformation-list/misinformation-list.component.ts b/src/app/pages/misinformation-list/misinformation-list.component.ts new file mode 100644 index 0000000..00899e8 --- /dev/null +++ b/src/app/pages/misinformation-list/misinformation-list.component.ts @@ -0,0 +1,822 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Router } from '@angular/router' +import * as echarts from 'echarts'; + +import { fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; + +import * as moment from 'moment'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; +import { OilUnloadingProcessComponent } from '../oil-unloading-process/oil-unloading-process.component'; +import { DispositionComponent } from '../disposition/disposition.component'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { TreeService } from 'src/app/service/tree.service'; +import { DisposeequipmentComponent } from '../warning-statistics-list/disposeequipment/disposeequipment.component'; + +@Component({ + selector: 'app-misinformation-list', + templateUrl: './misinformation-list.component.html', + styleUrls: ['./misinformation-list.component.scss'] +}) +export class MisinformationListComponent implements OnInit { + + validateForm!: FormGroup; + constructor(private element: ElementRef, private toTree: TreeService, private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } + //饼图 + myChart + option = { + color: ['#FF4B65', '#23D9FF', '#608AFF', '#B2FF6D', '#FFFF99', '#C4E2FC', '#FF7F00', '#0090FF', '#FFD634', '#105597', '#FF4B65', '#23D9FF', '#71FFF5', '#B2FF6D'], + tooltip: { + trigger: 'item'//触发类型 + }, + series: [ + { + // name: 'Access From', + type: 'pie', + radius: ['58%', '75%'],//内半径外,外半径 + left: '0', + top: '9%', + avoidLabelOverlap: false,//防止标签重叠策略 + label: {//每一个标签外网延伸的引导说明 + show: false, + position: 'outside' + }, + labelLine: {//引导线 + show: true, + showAbove: true + }, + emphasis: {//中间高亮区域 + label: { + show: false, + fontSize: '40', + fontWeight: 'bold' + } + }, + data: [ + + ], + tooltip: {//鼠标移入提示 + position: 'right', + padding: [14, 19], + backgroundColor: 'rgba(28, 129, 218, 0.4)', + textStyle: { + color: '#fff', + fontSize: 12 + }, + formatter: "{b} : {c} ({d}%)" + } + } + ] + }; + //柱状图 + mybarChart: any + baroption = { + xAxis: { + type: 'category', + data: [], + axisLine: { + show: false, + lineStyle: { + color: '#91CCFF' + } + }, + axisTick: {//刻度线 + show: false + }, + inverse: true + }, + yAxis: { + type: 'value', + nameTextStyle: { + color: '#C4E2FC' + }, + splitLine: {//分割线 + lineStyle: { + color: ['#0f4374'], + width: 2 + } + }, + axisTick: {//刻度线 + show: false + }, + axisLine: {//轴线 + show: false, + lineStyle: { + color: '#C4E2FC' + } + } + }, + tooltip: { + // trigger: 'axis' + }, + series: [ + { + data: [], + type: 'bar', + itemStyle: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: '#23F0FF' // 0% 处的颜色 + }, { + offset: 1, color: 'rgba(35, 153, 255, 0.1)' // 100% 处的颜色 + }], + global: false // 缺省为 false + } + }, + barWidth: '25%' + }, + { + data: [], + type: 'line', + symbol: 'circle', + symbolSize: 8, + label: { + show: true + }, + itemStyle: { + color: '#fff', + shadowColor: '#fff', + shadowBlur: 10 + }, + lineStyle: { + color: '#FFCC8A', + width: 1 + } + } + ], + grid: { + left: '42px', + right: '30px', + bottom: '38px', + top: '80px' + } + }; + baroption2 = { + xAxis: { + type: 'value', + show: false + }, + tooltip: { + // trigger: 'axis' + }, + yAxis: { + type: 'category', + data: [], + axisLine: { + show: false, + lineStyle: { + color: '#91CCFF', + } + }, + axisTick: {//刻度线 + show: false + }, + axisLabel: { + formatter: function (value, index) { + let newParamsName = ''; + const paramsNameNumber = value.length; + const provideNumber = 1000; + const rowNumber = Math.ceil(paramsNameNumber / provideNumber); + if (paramsNameNumber > provideNumber) { + for (let p = 0; p < rowNumber; p++) { + let tempStr = ''; + const start = p * provideNumber; + const end = start + provideNumber; + if (p == rowNumber - 1) { + tempStr = value.substring(start, paramsNameNumber); + } else { + tempStr = value.substring(start, end) + '\n'; + } + newParamsName += tempStr; + } + } else { + newParamsName = value; + } + // 格式化成月/日,只在第一个刻度显示年份 + return '{s|·}' + `{a|${newParamsName}}`; + }, + rich: { + a: { + color: '#C4E2FC', + padding: [0, 0, 0, 8], + }, + s: { + color: '#fff', + borderWidth: 1, + borderColor: '#23D9FF', + backgroundColor: '#fff', + width: 4, + height: 4, + shadowBlur: 3, + shadowColor: "#fff" + } + } + }, + inverse: true//倒序 + + }, + series: + { + label: { + // 柱图头部显示值 + show: true, + position: "right", + color: "#fff", + fontSize: 12, + formatter: '{c}', + offset: [6, 0] + }, + data: [], + type: 'bar', + itemStyle: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [{ + offset: 0, color: '#063d72' // 0% 处的颜色 + }, { + offset: 1, color: '#FF9963' // 100% 处的颜色 + }], + global: false // 缺省为 false + } + }, + barWidth: '36%' + } + , + grid: { + left: '175px', + right: '60px', + bottom: '3px', + top: '36px' + }, + // dataZoom: [ //Y轴滑动条 + // { + // type: 'slider', //滑动条 + // show: true, //开启 + // yAxisIndex: 0,//表示控制第几个y轴 + // left: '97%', //滑动条位置 + // start: 1, //初始化时,滑动条宽度开始标度 + // end: 100, //初始化时,滑动条宽度结束标度
    + // maxValueSpan: 10,//显示数据的条数(默认显示10个) + // showDataShadow: false,//是否显示数据阴影 默认auto + // showDetail: false,//即拖拽时候是否显示详细数值信息 默认true + // realtime: true, //是否实时更新 + // filterMode: 'filter', + // backgroundColor: '#001735', + // width: '18' + // }, + // { + // type: 'inside', + // yAxisIndex: 0, + // zoomOnMouseWheel: false, //滚轮是否触发缩放 + // moveOnMouseMove: true, //鼠标滚轮触发滚动 + // moveOnMouseWheel: true + // } + // ] + } + isEcharts: boolean = true + isEchartsShow() { + this.isEcharts = !this.isEcharts + } + startdate + enddate + + isMisinformation: boolean = false//误报按钮的显隐 + ngOnInit(): void { + let loginUserInfo + if (sessionStorage.getItem('isGasStation') == 'true') { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + } else { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + } + + if (loginUserInfo.roles.find((item) => { + return item.name == 'ViolationPositiveCensorer' + })) { + this.isMisinformation = true + } else { + this.isMisinformation = false + } + + //当前日期 + let myDate: any = new Date(); + let nowY = myDate.getFullYear(); + let nowM = myDate.getMonth() + 1; + let nowD = myDate.getDate(); + this.enddate = nowY + "-" + (nowM < 10 ? "0" + nowM : nowM) + "-" + (nowD < 10 ? "0" + nowD : nowD);//当前日期 + //获取三十天前日期 + let lw = new Date(myDate - 1000 * 60 * 60 * 24 * 30);//最后一个数字30可改,30天的意思 + let lastY = lw.getFullYear(); + let lastM = lw.getMonth() + 1; + let lastD = lw.getDate(); + this.startdate = lastY + "-" + (lastM < 10 ? "0" + lastM : lastM) + "-" + (lastD < 10 ? "0" + lastD : lastD);//三十天之前日期 + + this.validateForm = this.fb.group({ + level: [null], + organization: [null], + type: [null], + event: [null], + site: [null], + disposalState: [null], + datePicker: [[this.startdate, this.enddate]] + }); + + //饼图 + this.myChart = echarts.init(document.getElementById('piechart')); + this.myChart.setOption(this.option); + //柱状折线图 + this.mybarChart = echarts.init(document.getElementById('barchart')); + this.mybarChart.setOption(this.baroption); + + this.warningType() + this.tableSpin = true + this.getAllOrganization() + this.getAggregations() + } + + defaultOrId: string + //获取所有组织机构 + nodes: any = [] + getAllOrganization() { + let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id + let params = { + OrganizationUnitId: OrganizationUnitId, + IsContainsChildren: "true" + } + 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.defaultOrId = JSON.parse(sessionStorage.getItem('userdata')).organization.id + this.validateForm.value.organization = this.defaultOrId + this.getViolateRecordList() + }) + } + //刷新饼图图表数据 + num + echartsData: any + refreshPieData(data) { + //饼图 + let option = this.myChart.getOption(); + var num = 0 + data.pieTop.forEach(element => { + num += element.count + element.name = element.key + element.value = element.count + }); + this.num = num + option.series[0].data = data.pieTop; + this.myChart.setOption(option); + } + //刷新柱状折线图表数据 + refreshBarLineData(data, type) { + console.log('统计图表数据', data) + //柱状图 + let option = this.mybarChart.getOption(); + console.log('柱图option', option) + if (type == 'month') {//近一个月柱状折线图 + option = this.baroption + let monthArr = [] + let valuedata = [] + data.timeTop.forEach(element => { + monthArr.push(moment(element.key).format('MM.DD')) + valuedata.push(element.count) + }); + option.xAxis.data = monthArr + option.series[0].data = valuedata + option.series[1].data = valuedata + } else if (type == 'eventTop') { + option = this.baroption2 + let ydata = [] + let valuedata = [] + data.eventTop.forEach(element => { + ydata.push(element.key) + valuedata.push(element.count) + }); + option.yAxis.data = ydata + option.series.data = valuedata + } else if (type == 'siteTop') { + option = this.baroption2 + let ydata = [] + let valuedata = [] + data.siteTop.forEach(element => { + ydata.push(element.key) + valuedata.push(element.count) + }); + option.yAxis.data = ydata + option.series.data = valuedata + } + this.mybarChart.setOption(option); + } + + //获取统计信息 + chartsSpin: boolean = false + getAggregations() { + this.chartsSpin = true + let ViolationIds = [] + if (this.validateForm.value.type) { + this.warningTypesDetails.forEach(item => { + item.id ? ViolationIds.push(item.id) : null + }); + } + let body: any = { + organizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + isContainsChildren: true, + ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null + } + this.validateForm.value.level ? body.level = this.validateForm.value.level : null + this.validateForm.value.site ? body.violateArea = this.validateForm.value.site : null + ViolationIds.length != 0 ? body.violationType = ViolationIds : null + this.http.post('/api/services/app/ViolateRecord/Aggregations', body).subscribe((data: any) => { + this.echartsData = data.result + this.chartsSpin = false + this.refreshPieData(data.result) + this.refreshBarLineData(this.echartsData, 'month') + }) + } + //获得违规记录列表 + SkipCount: string = '0' + MaxResultCount: string = '50' + list: any = [] + totalCount: string + tableSpin: boolean = false + getViolateRecordList() { + let ViolationIds = [] + if (this.validateForm.value.event) { + ViolationIds.push(this.validateForm.value.event) + } + if (this.validateForm.value.type && !this.validateForm.value.event) { + this.warningTypesDetails.forEach(item => { + item.id ? ViolationIds.push(item.id) : null + }); + } + let disposalState + if (this.validateForm.value.disposalState == '0') { + disposalState = true + } else if (this.validateForm.value.disposalState == '1') { + disposalState = false + } else { + disposalState = null + } + let params = { + Level: this.validateForm.value.level, + ViolationIds: ViolationIds, + ViolateArea: this.validateForm.value.site, + OrganizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + IsContainsChildren: 'true', + IsHandled: disposalState, + ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null, + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount + } + this.tableSpin = true + this.http.get('/api/services/app/ViolateRecord/GetAll', { + params: params + }).subscribe((data: any) => { + this.list = this.list.concat(data.result.items); + this.list = [...this.list] + // this.list = data.result.items + this.totalCount = data.result.totalCount + console.log('违规记录列表', data) + this.tableSpin = false + + console.log(this.list.length) + }) + } + + isMouseEnter = false + mouseEnter() { + this.isMouseEnter = true + } + mouseleave() { + this.isMouseEnter = false + } + + ngAfterViewInit(): void { + fromEvent(this.element.nativeElement.querySelector(`#tbody`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件 + if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) { + if (this.totalCount > this.list.length) { + console.log('需要加载数据了', event) + this.SkipCount = String(Number(this.SkipCount) + 50) + this.getViolateRecordList() + } + } + }); + } + getThirtyDays() { + //获取当前日期 + let myDate = new Date(); + var nowY = myDate.getFullYear(); + var nowM = myDate.getMonth() + 1; + var nowD = myDate.getDate(); + var enddateStr = nowY + "-" + (nowM < 10 ? "0" + nowM : nowM) + "-" + (nowD < 10 ? "0" + nowD : nowD);//当前日期 + var enddate = new Date(enddateStr); + + + //获取三十天前日期 + var lw = new Date(new Date().getTime() - 1000 * 60 * 60 * 24 * 30);//最后一个数字30可改,30天的意思 + var lastY = lw.getFullYear(); + var lastM = lw.getMonth() + 1; + var lastD = lw.getDate(); + var startdateStr = lastY + "-" + (lastM < 10 ? "0" + lastM : lastM) + "-" + (lastD < 10 ? "0" + lastD : lastD);//三十天之前日期 + var startDate = new Date(startdateStr); + + const dateList = [] + while (true) { + startDate.setDate(startDate.getDate() + 1) + if (startDate.getTime() <= enddate.getTime()) { + if (startDate.getDate() < 10) { + // startDate.getFullYear() 获取年,此处没加上年份 + dateList.push((startDate.getMonth() + 1) + '.0' + startDate.getDate()) + } else { + dateList.push((startDate.getMonth() + 1) + '.' + startDate.getDate()) + } + } else { + break + } + } + return dateList; + } + submitForm(): void { + for (const i in this.validateForm.controls) { + this.validateForm.controls[i].markAsDirty(); + this.validateForm.controls[i].updateValueAndValidity(); + } + this.list = [] + this.SkipCount = '0' + this.getViolateRecordList() + // this.getAggregations() + } + resetForm(e: MouseEvent): void { + e.preventDefault(); + this.validateForm.reset(); + for (const key in this.validateForm.controls) { + this.validateForm.controls[key].markAsPristine(); + this.validateForm.controls[key].updateValueAndValidity(); + } + this.validateForm.patchValue({ + organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + datePicker: [this.startdate, this.enddate] + }); + this.list = [] + this.SkipCount = '0' + this.getViolateRecordList() + } + + //预警类型接口 + warningTypes: any //预警接口数据 + warningTypesDetails: any + warningType() { + this.http.get('/api/services/app/Violation/GetAllList').subscribe((data: any) => { + this.warningTypesDetails = data.result + this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType }); + }) + } + typeChange(e) { + this.warningTypes.forEach(element => { + if (element.key == e) { + this.warningTypesDetails = element + } + }); + this.validateForm.patchValue({ + event: null, + }); + } + + + + look(item) { + console.log('点击item', item) + if (item.violation.eventSystemName == '灭火器维护') { + item.violatedItemSnapshotObj = JSON.parse(item.violatedItemSnapshot) + const modal = this.modal.create({ + nzContent: DisposeequipmentComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 380, + 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: item + }, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + if (instance.isScrap) { + await new Promise(resolve => { + let body = { + id: item.violatedItemSnapshotObj.id, + name: instance.copydata2.violatedItemSnapshotObj.name, + storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation, + productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'), + maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'), + validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD'), + isScrapped: true, + organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId + } + this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => { + let body = { + id: item.id, + handleRecord: '报废成功!' + } + this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { + resolve(data) + this.message.create('success', '报废成功!'); + item.handleTime = new Date() + return true + }) + }) + }) + + } else { + if (instance.validateForm.valid) { + await new Promise(resolve => { + let body = { + id: item.violatedItemSnapshotObj.id, + name: instance.validateForm.value.name, + storageLocation: instance.validateForm.value.storageLocation, + productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'), + maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'), + validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'), + organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId + } + this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => { + // item.violatedItemSnapshotObj = data.result + let body = { + id: item.id, + handleRecord: '维保成功!' + } + this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { + resolve(data) + this.message.create('success', '维保成功!'); + item.handleTime = new Date() + return true + }) + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + } + } + }); + const instance = modal.getContentComponent(); + } else { + const modal = this.modal.create({ + nzContent: GetOutOfLineDetailsComponent, + nzWrapClassName: "vertical-center-modal", + nzViewContainerRef: this.viewContainerRef, + nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200, + nzBodyStyle: { + 'border': '1px solid #6d9cc7', + 'border-radius': '0px', + 'padding': '0px', + 'box-shadow': '0 0 8px 0 #fff', + 'background': '#000D21', + }, + nzComponentParams: { + data: item + }, + nzFooter: null, + nzOnOk: async () => { + console.log('误报处理') + for (let index = 0; index < this.list.length; index++) { + const element = this.list[index]; + if (element.id == item.id) { + this.list.splice(index, 1) + this.totalCount = String(Number(this.totalCount) - 1) + this.SkipCount = String(Number(this.SkipCount) - 1) + } + } + } + }); + const instance = modal.getContentComponent(); + } + + } + + + selectedType = '分布' + selectedRankingType = null + echartClick(type) { + this.selectedType = type + this.mybarChart.dispose() + this.mybarChart = echarts.init(document.getElementById('barchart')); + // if (type == '排名') { + + // console.log(this.selectedRankingType) + // if (this.selectedRankingType == '站点排名') { + // this.refreshBarLineData(this.echartsData, 'siteTop') + // } + // if (this.selectedRankingType == '事件排名') { + // this.refreshBarLineData(this.echartsData, 'eventTop') + // } + // } else { + + // } + this.selectedRankingType = null + this.refreshBarLineData(this.echartsData, 'month') + + } + echartClick2(type) { + this.mybarChart.dispose() + this.mybarChart = echarts.init(document.getElementById('barchart')); + this.selectedType = null + this.selectedRankingType = type + if (this.selectedRankingType == '站点排名') { + this.refreshBarLineData(this.echartsData, 'siteTop') + } + if (this.selectedRankingType == '事件排名') { + this.refreshBarLineData(this.echartsData, 'eventTop') + } + } + + + //跳转卸油统计页面 + goOilList() { + + if (this.router.url.indexOf('petrolStation') != -1) { + this.router.navigate(['/records/petrolStation/oliunloadinglist']) + } else { + this.router.navigate(['/records/oliunloadinglist']) + } + } + + goWarningList() { + if (this.router.url.indexOf('petrolStation') != -1) { + this.router.navigate(['/records/petrolStation/warningstatisticslist']) + } else { + this.router.navigate(['/records/warningstatisticslist']) + } + } + gorecordList() { + if (this.router.url.indexOf('petrolStation') != -1) { + this.router.navigate(['/records/petrolStation']) + } else { + this.router.navigate(['/records']) + } + } + dispose(item) { + console.log(item) + const modal = this.modal.create({ + nzContent: DispositionComponent, + nzWrapClassName: "vertical-center-modal", + nzViewContainerRef: this.viewContainerRef, + nzWidth: 380, + nzBodyStyle: { + 'border': '1px solid #91CCFF', + 'border-radius': '0px', + 'padding': '7px', + 'box-shadow': '0 0 8px 0 #fff', + 'background-image': 'linear-gradient(#003665, #000f25)' + }, + nzComponentParams: {}, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise(resolve => { + let body = { + id: item.id, + handleRecord: instance.validateForm.value.content + } + this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { + resolve(data) + this.message.create('success', '处置成功!'); + item.handleTime = new Date() + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + }, + }); + const instance = modal.getContentComponent(); + } + +} diff --git a/src/app/pages/oil-station-info/oil-station-info.component.html b/src/app/pages/oil-station-info/oil-station-info.component.html index 4fef0be..ac37f7a 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.html +++ b/src/app/pages/oil-station-info/oil-station-info.component.html @@ -6,6 +6,7 @@
    + @@ -28,9 +29,9 @@ - - - + + + @@ -58,14 +59,14 @@ + --> @@ -300,7 +301,14 @@
    站名 + + + + + + +
    区域
    - + + +
    + 审核中... +
    + + +
    - + 当前审核状态:{{httpBody.auditStatus | auditStatus}} + + +
    diff --git a/src/app/pages/oil-station-info/oil-station-info.component.scss b/src/app/pages/oil-station-info/oil-station-info.component.scss index bd41ce5..d8f917f 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.scss +++ b/src/app/pages/oil-station-info/oil-station-info.component.scss @@ -4,6 +4,7 @@ display: flex; justify-content: center; position: relative; + overflow-y: auto; } ::-webkit-scrollbar { @@ -26,11 +27,12 @@ .tablebox { flex: 1; - overflow-y: auto; + .table { + position: relative; table, table tr th, @@ -177,31 +179,40 @@ } } + + .shade { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + background-color: rgba(77, 80, 83, 0.3); + display: flex; + justify-content: center; + align-items: center; + font-size: 25px; + font-family: titlefont; + color: white; + } } .btnbox { - height: 40px; + height: 36px; + line-height: 36px; width: 100%; - margin-bottom: 24px; display: flex; justify-content: flex-end; button { - height: 40px; - background: rgba(0, 129, 255, 0.3); + height: 36px; + background: rgba(0, 129, 255, 0.4); border: 1px solid #36A2FF; opacity: 1; border-radius: 0px; color: #91CCFF; } - button:nth-child(1) { - width: 100px; - margin-left: 16px; - } - - button:nth-child(2) { - width: 130px; + button{ margin-left: 16px; } } diff --git a/src/app/pages/oil-station-info/oil-station-info.component.ts b/src/app/pages/oil-station-info/oil-station-info.component.ts index 21e6a8a..b43f325 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.ts +++ b/src/app/pages/oil-station-info/oil-station-info.component.ts @@ -53,15 +53,7 @@ export class OilStationInfoComponent implements OnInit { address: [null], distance: [null], contactInformation: [null] - }), - // validityTime: this.fb.group({ - // businessLicensevalidityTime: [null], - // businessLicensevalidityTimeDay: [null, [Validators.required]], - // hazardousLicensevalidityTime: [null], - // hazardousLicensevalidityTimeDay: [null, [Validators.required]], - // oilLicensevalidityTime: [null], - // oilLicensevalidityTimeDay: [null, [Validators.required]] - // }) + }) }); this.getInfo() @@ -71,14 +63,17 @@ export class OilStationInfoComponent implements OnInit { //获取油站信息 - gallery + // gallery getInfo() { this.http.get('/api/services/app/GasStation/Get', { params: { organizationUnitId: this.userdata.organization.id } }).subscribe((data: any) => { - console.log('油站信息', data) + + if (new Date(data.result.openTime).getTime() == -62135625943000) { + data.result.openTime = null + } this.httpBody = data.result if (!this.httpBody.govUnitDetail) { this.httpBody.govUnitDetail = { @@ -92,30 +87,8 @@ export class OilStationInfoComponent implements OnInit { this.hospital = data.result.govUnitDetail.hospital this.fireBrigade = data.result.govUnitDetail.fireBrigade } - if (this.httpBody.licenses.length == 0) { - this.httpBody.licenses = [ - { name: '营业执照', code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 1, hasAnnualInspection: true }, - { name: '危险化学品', code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 3, hasAnnualInspection: false }, - { name: '成品油零售', code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 2, hasAnnualInspection: true } - ] - } else { - console.log('走这里了',this.httpBody.licenses) - this.httpBody.licenses.forEach(item => { - if (item.endTime == '9999-01-01T00:00:00') { - item.isPerpetual = true - } else { - item.isPerpetual = false - } - }) - } - this.httpBody.stationType ? this.httpBody.stationType = String(this.httpBody.stationType) : null - setTimeout(() => { - this.gallery = new Viewer(document.getElementById('images'), { - show: () => { // 动态加载图片后,更新实例 - this.gallery.update(); - }, - }); - }, 0); + + // console.log('油站信息', this.httpBody) }, err => { console.log('油站错误信息', err.error.error.message) @@ -165,6 +138,7 @@ export class OilStationInfoComponent implements OnInit { id: null, stationName: JSON.parse(sessionStorage.getItem('userdata')).organization.displayName, organizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, + auditStatus: null, openTime: '', stationType: '', laneCount: '', @@ -195,66 +169,15 @@ export class OilStationInfoComponent implements OnInit { } } - onChange($event) { - - } - - addName = '' - isVisible = false; - showModal(): void { - console.log(this.addName) - this.addName = '' - this.isVisible = true; - } - - handleOk(): void { - this.isVisible = false; - if (this.addName) { - this.addTr() - } - } - - handleCancel(): void { - console.log('Button cancel clicked!'); - this.isVisible = false; - } - addTr() { - this.httpBody.licenses.push( - { name: this.addName, code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: -1, hasAnnualInspection: false }, - ) - } - deleteTrConfirm(key) { - console.log(key) - this.httpBody.licenses.splice(key, 1); - } goback() { this.router.navigate(['/todaywarning/petrolStation']) } - submitForm() { - let valid = true - console.log(this.httpBody.licenses) - this.httpBody.licenses.forEach(element => { - if (!element.startTime || !element.endTime || !element.firstWarnTime || !element.secondWarnTime || !element.code) { - valid = false - console.log('普通拦截') - return - } - if (element.hasAnnualInspection) { - if (!element.annualInspectionWarnTime || !element.annualInspectionOrganizationName || !element.annualInspectionTime) { - valid = false - console.log('年检拦截') - return - } - } - }); - if (!valid) { - this.message.create('error', '请将证照信息填写完整!'); - return - } + isLoadingSave: boolean = false + async submitForm() { if (this.validateForm.valid) { this.isLoadingSave = true - this.httpBody.openTime = moment(this.httpBody.openTime).format('YYYY-MM-MM')//开业时间格式化 + this.httpBody.openTime = moment(this.httpBody.openTime).format('YYYY-MM-DD')//开业时间格式化 this.httpBody.govUnitDetail.policeStation = this.validateForm.value.policeStation this.httpBody.govUnitDetail.hospital = this.validateForm.value.hospital this.httpBody.govUnitDetail.fireBrigade = this.validateForm.value.fireBrigade @@ -268,13 +191,15 @@ export class OilStationInfoComponent implements OnInit { delete item.isPerpetual }) - this.http.put('/api/services/app/GasStation/Update', body).subscribe((data: any) => { - this.isLoadingSave = false - this.message.create('success', '保存成功!'); - // this.httpBody.licenses = data.result.licenses - }, err => { - this.isLoadingSave = false - this.message.create('error', '保存失败!'); + await new Promise((resolve, reject) => { + this.http.put('/api/services/app/GasStation/Update', body).subscribe((data: any) => { + resolve(data) + this.isLoadingSave = false + this.message.create('success', '保存成功!'); + }, err => { + this.isLoadingSave = false + this.message.create('error', '保存失败!'); + }) }) } else { this.message.create('warning', '请填写完整!'); @@ -283,57 +208,37 @@ export class OilStationInfoComponent implements OnInit { } - isLoadingSave: boolean = false - uploadIndex: string - filechange(e, index) { - let file = e.target.files[0] || null //获取上传的文件 - this.uploadIndex = index - this.openFileSelect(file, `stationPhotos/${this.userdata.organization.id}/`) - } - //设置文件路径并上传 - postFilePath - async openFileSelect(file: File, extensionPath: string) { - this.postFilePath = extensionPath; - let fileSize = file.size || null //上传文件的总大小 - let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传 - if (fileSize >= shardSize) // 超过5MB要分块上传 - { - await this.postFileByMul(file); - setTimeout(() => { - this.gallery.destroy() - this.gallery = new Viewer(document.getElementById('images')); - }, 0); - } - else //普通上传 - { - await this.postFile(file); - setTimeout(() => { - this.gallery.destroy() - this.gallery = new Viewer(document.getElementById('images')); - }, 0); + + isSubmitAuditLoading: boolean = false + async submitAudit() { + + await this.submitForm() + + let params = { + id: this.httpBody.id } - } - //上传文件 - async postFile(file: File) { - await new Promise((resolve, reject) => { - this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => { - let dataObj = data as any; - let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName; - this.httpBody.licenses[this.uploadIndex].imageUrl = filePath - resolve('success') - }); + this.http.post('/api/services/app/GasStation/Commit', null, { params: params }).subscribe((data: any) => { + this.isSubmitAuditLoading = false + this.getInfo() + this.message.create('success', '提交审核成功!'); + }, err => { + this.isSubmitAuditLoading = false + this.message.create('error', '提交审核失败!'); }) } - /** - * 分块上传 - * @param file - */ - postFileByMul(file: File) { - this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => { - let dataObj = value as any; - this.httpBody.licenses[this.uploadIndex].imageUrl = dataObj.filePath - }); - + isRevocationAuditLoading: boolean = false + revocationAudit() { + let params = { + id: this.httpBody.id + } + this.http.post('/api/services/app/GasStation/Uncommit', null, { params: params }).subscribe((data: any) => { + this.isRevocationAuditLoading = false + this.getInfo() + this.message.create('success', '撤销审核成功!'); + }, err => { + this.isRevocationAuditLoading = false + this.message.create('error', '撤销审核失败!'); + }) } } 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 244bb6a..353003e 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 @@ -7,6 +7,7 @@
    预警类型统计 + 卸油统计 证照预警统计
    @@ -52,7 +53,8 @@ - + @@ -164,13 +166,22 @@ {{item.allProccessCount}}
    -->
    - - 合规 + + + 合规 + + + 预警 + - 预警 + 卸油中 + + + +
    查看 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 d4a2b56..949407a 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 @@ -67,7 +67,23 @@ export class OilUnloadingProcessListComponent implements OnInit { enddate isOrShow: boolean + + isMisinformation: boolean = false//误报按钮的显隐 ngOnInit(): void { + let loginUserInfo + if (sessionStorage.getItem('isGasStation') == 'true') { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + } else { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + } + + if (loginUserInfo.roles.find((item) => { + return item.name == 'ViolationPositiveCensorer' + })) { + this.isMisinformation = true + } else { + this.isMisinformation = false + } //当前日期 let myDate: any = new Date(); let nowY = myDate.getFullYear(); @@ -239,6 +255,7 @@ export class OilUnloadingProcessListComponent implements OnInit { } ], legend: { + selectedMode: false, // 是否允许点击 data: ['卸油事件'], textStyle: { color: '#fff' @@ -353,6 +370,7 @@ export class OilUnloadingProcessListComponent implements OnInit { } }, legend: { + selectedMode: false, // 是否允许点击 data: ['事前准备', '事中操作', '全程监测'], textStyle: { color: '#fff' @@ -529,7 +547,13 @@ export class OilUnloadingProcessListComponent implements OnInit { this.SkipCount = '0' this.getViolateRecordList() } - + stateChange($event) { + if (!$event) { + this.list = [] + this.SkipCount = '0' + this.getViolateRecordList() + } + } defaultOrId: string @@ -721,4 +745,12 @@ export class OilUnloadingProcessListComponent implements OnInit { this.router.navigate(['/records/warningstatisticslist']) } } + + goMisinformationList() { + if (this.router.url.indexOf('petrolStation') != -1) { + this.router.navigate(['records/petrolStation/misinformationList']) + } else { + this.router.navigate(['records/misinformationList']) + } + } } diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index 903c72f..297ba2a 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -13,6 +13,9 @@ import { HomePageComponent } from './home-page/home-page.component'; import { OilUnloadingProcessListComponent } from './oil-unloading-process-list/oil-unloading-process-list.component'; import { init3DGuard } from './init3D.guard'; import { WarningStatisticsListComponent } from './warning-statistics-list/warning-statistics-list.component'; +import { NavBarComponent } from './license/nav-bar/nav-bar.component'; +import { MisinformationListComponent } from './misinformation-list/misinformation-list.component'; +import { AuditNavComponent } from './audit/audit-nav/audit-nav.component'; const routes: Routes = [ { path: 'homepage', component: HomePageComponent }, @@ -27,7 +30,12 @@ const routes: Routes = [ { path: 'records/warningstatisticslist', component: WarningStatisticsListComponent }, { path: 'records/petrolStation/warningstatisticslist', component: WarningStatisticsListComponent }, { path: 'equipmentInfo', component: EquipmentInfoComponent }, - { path: 'oliStationInfo', component: OilStationInfoComponent } + { path: 'oliStationInfo', component: OilStationInfoComponent }, + { path: 'license/petrolStation', component: NavBarComponent }, + { path: 'records/misinformationList', component: MisinformationListComponent }, + { path: 'records/petrolStation/misinformationList', component: MisinformationListComponent }, + { path: 'audit', component: AuditNavComponent } + ]; @NgModule({ diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index eb6f4da..0a0279e 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -59,10 +59,37 @@ import { FacilitySortPipe } from './facility-sort.pipe'; import { WarningStatisticsListComponent } from './warning-statistics-list/warning-statistics-list.component'; import { DisposeequipmentComponent } from './warning-statistics-list/disposeequipment/disposeequipment.component'; import { NzToolTipModule } from 'ng-zorro-antd/tooltip'; +import { NavBarComponent } from './license/nav-bar/nav-bar.component'; +import { InformComponent } from './license/inform/inform.component'; +import { UpdateCategoryComponent } from './license/update-category/update-category.component'; +import { FileCategoryComponent } from './license/file-category/file-category.component'; +import { HistoriesComponent } from './license/histories/histories.component'; +import { EditUpdateCategoryComponent } from './license/update-category/edit-update-category/edit-update-category.component'; +import { DetailsUpdateCategoryComponent } from './license/update-category/details-update-category/details-update-category.component'; +import { EditFileCategoryComponent } from './license/file-category/edit-file-category/edit-file-category.component'; +import { DetailsFileCategoryComponent } from './license/file-category/details-file-category/details-file-category.component'; +import { NzTimelineModule } from 'ng-zorro-antd/timeline'; +import { PdfWordLookComponent } from './license/pdf-word-look/pdf-word-look.component'; +import { MisinformationListComponent } from './misinformation-list/misinformation-list.component'; +import { OilStationListComponent } from './plan-admin/oil-station-list/oil-station-list.component'; +import { UpdateLicenseListComponent } from './plan-admin/update-license-list/update-license-list.component'; +import { FileLicenseListComponent } from './plan-admin/file-license-list/file-license-list.component'; +import { AuditNavComponent } from './audit/audit-nav/audit-nav.component'; +import { AuditIngComponent } from './audit/audit-ing/audit-ing.component'; +import { AuditRecordComponent } from './audit/audit-record/audit-record.component'; +import { AuditInformTimeComponent } from './audit/audit-inform-time/audit-inform-time.component'; +import { AuditDisposeComponent } from './audit/audit-ing/audit-dispose/audit-dispose.component'; +import { EditInformTimeComponent } from './audit/audit-inform-time/edit-inform-time/edit-inform-time.component'; +import { AuditDetailsInformTimeComponent } from './audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component'; +import { auditStatusPipe, handleState, licenseViolationType, notificationContent } from '../pipes/type.pipe'; +import { GasBaseInfoComponent } from './audit/gas-base-info/gas-base-info.component'; +import { AnnualInspectionComponent } from './audit/annual-inspection/annual-inspection.component'; +import { EditAnnualInspectionComponent } from './audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component'; + @NgModule({ declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent, TodayWarningAdminComponent, CriminalRecordsAdminComponent, LeftDomainComponent, EquipmentInfoComponent, OilStationInfoComponent, - AddequipmentComponent, EditequipmentComponent, PlanAdminComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, HomePageComponent, OilUnloadingProcessListComponent, ChangePasswordComponent, FacilitySortPipe, WarningStatisticsListComponent, DisposeequipmentComponent], + AddequipmentComponent, EditequipmentComponent, PlanAdminComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, HomePageComponent, OilUnloadingProcessListComponent, ChangePasswordComponent, FacilitySortPipe, WarningStatisticsListComponent, DisposeequipmentComponent, NavBarComponent, InformComponent, UpdateCategoryComponent, FileCategoryComponent, HistoriesComponent, EditUpdateCategoryComponent, DetailsUpdateCategoryComponent, EditFileCategoryComponent, DetailsFileCategoryComponent, PdfWordLookComponent, MisinformationListComponent, OilStationListComponent, UpdateLicenseListComponent, FileLicenseListComponent, AuditNavComponent, AuditIngComponent, AuditRecordComponent, AuditInformTimeComponent, AuditDisposeComponent, EditInformTimeComponent, AuditDetailsInformTimeComponent, auditStatusPipe, GasBaseInfoComponent, notificationContent, licenseViolationType, handleState, AnnualInspectionComponent, EditAnnualInspectionComponent], imports: [ @@ -103,9 +130,10 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip'; NzPopconfirmModule, NzBadgeModule, NzRadioModule, - NzToolTipModule + NzToolTipModule, + NzTimelineModule ], - entryComponents: [AddequipmentComponent, EditequipmentComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, ChangePasswordComponent, DisposeequipmentComponent], + entryComponents: [AddequipmentComponent, EditequipmentComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, ChangePasswordComponent, DisposeequipmentComponent, EditUpdateCategoryComponent, DetailsUpdateCategoryComponent, EditFileCategoryComponent, DetailsFileCategoryComponent, PdfWordLookComponent, AuditDisposeComponent, EditInformTimeComponent, AuditDetailsInformTimeComponent, GasBaseInfoComponent, EditAnnualInspectionComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) 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 new file mode 100644 index 0000000..03619c9 --- /dev/null +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.html @@ -0,0 +1,63 @@ +
    + +
    + +
    + + + + + + + + + + + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..06cfc17 --- /dev/null +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.scss @@ -0,0 +1,79 @@ +.search { + box-sizing: border-box; + padding-left: 38px; + padding-right: 35px; + width: 100%; + height: 32px; + margin: 12px 0; + display: flex; + justify-content: space-between; + align-items: center; + + .legendbox { + display: flex; + align-items: center; + color: #FFFFFF; + flex: 1; + + .legendItem { + display: flex; + align-items: center; + margin-right: 12px; + + div { + width: 8px; + height: 8px; + margin-right: 3px; + } + } + } + + form { + flex: 1; + height: 32px; + display: flex; + justify-content: flex-end; + + input { + background: none; + border: 1px solid #91ccff; + color: #fff; + } + + .searchParams { + width: 35%; + } + + .btn { + margin-left: 16px; + } + } +} + +.box { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.tablebox { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + overflow: hidden; +} + + +.green { + color: #4BFFD4; +} + +.yellow { + color: #FFBD4B; +} + +.red { + color: #FF4B65; +} 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 new file mode 100644 index 0000000..0418bb0 --- /dev/null +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts @@ -0,0 +1,184 @@ +import { Component, OnInit, ViewChild, ElementRef, ViewContainerRef } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { TreeService } from 'src/app/service/tree.service'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown'; +import { NzFormatEmitEvent, NzTreeComponent, NzTreeNode } from 'ng-zorro-antd/tree'; +import { Router } from '@angular/router'; +import { NavChangeService } from 'src/app/service/navChange.service'; +import { fromEvent } from 'rxjs'; +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'; + +@Component({ + selector: 'app-file-license-list', + templateUrl: './file-license-list.component.html', + styleUrls: ['./file-license-list.component.scss'] +}) +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) { } + + tableScrollHeight + + ngOnInit(): void { + 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.validateForm = this.fb.group({ + name: [null] + }); + + this.tableSpin = true + } + 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) { + console.log('需要加载数据了', event) + this.SkipCount = String(Number(this.SkipCount) + 50) + await this.getStationLicenses() + } + } + }); + } + + submitForm(): void { + for (const i in this.validateForm.controls) { + this.validateForm.controls[i].markAsDirty(); + this.validateForm.controls[i].updateValueAndValidity(); + } + this.list = [] + this.SkipCount = '0' + this.getStationLicenses() + } + resetForm(e: MouseEvent): void { + e.preventDefault(); + this.validateForm.reset(); + for (const key in this.validateForm.controls) { + this.validateForm.controls[key].markAsPristine(); + this.validateForm.controls[key].updateValueAndValidity(); + } + this.list = [] + this.SkipCount = '0' + this.getStationLicenses() + } + + tableSpin: boolean + totalCount: any //总数 + //获取点击组织机构的所有加油站 + SkipCount: string = '0' + MaxResultCount: string = '100' + + orId + list: any = [] + async getStationLicenses() { + let params = { + StationName: this.validateForm.value.name, + OrganizationUnitId: String(sessionStorage.getItem('planAdminOrid')), + IsContainsChildren: 'true', + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount, + // Sorting: ' BuildingBasicInfo.Id asc' + } + this.tableSpin = true + await new Promise((resolve, reject) => { + this.http.get('/api/services/app/StationFileLicense/GetStationLicenses', { + params: params + }).subscribe((data: any) => { + this.totalCount = data.result.totalCount + let arr = [] + data.result.data.forEach(element => { + let keyArr = Object.keys(element); + let valueArr = Object.values(element); + let newElement = (keyArr as any).zip(valueArr, (a, b) => { return { name: a, value: b } }); + + //修改排头 + let newArr = [] + for (let index = 0; index < newElement.length; index++) { + const item = newElement[index]; + if (item.name == '省公司') { + newArr[0] = item + newElement.splice(index--, 1) + } + if (item.name == '区域') { + newArr[1] = item + newElement.splice(index--, 1) + } + if (item.name == '油站名称') { + newArr[2] = item + newElement.splice(index--, 1) + } + } + let atLastArr = newArr.concat(newElement); + arr.push(atLastArr) + + }); + + + 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) + }) + }) + } + + //父组件调用子组件方法 + public onChildMethod() { + this.getStationLicenses() + } + + + 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 => { }); + // }) + + + } +} diff --git a/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.html b/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.html new file mode 100644 index 0000000..da7d4ac --- /dev/null +++ b/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.html @@ -0,0 +1,78 @@ +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.scss b/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.scss new file mode 100644 index 0000000..fb58501 --- /dev/null +++ b/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.scss @@ -0,0 +1,66 @@ +.search { + box-sizing: border-box; + padding-left: 38px; + padding-right: 35px; + width: 100%; + height: 32px; + margin: 12px 0; + display: flex; + justify-content: space-between; + align-items: center; + + .legendbox { + display: flex; + align-items: center; + color: #FFFFFF; + flex: 1; + + .legendItem { + display: flex; + align-items: center; + margin-right: 12px; + + div { + width: 8px; + height: 8px; + margin-right: 3px; + } + } + } + + form { + flex: 1; + height: 32px; + display: flex; + justify-content: flex-end; + + input { + background: none; + border: 1px solid #91ccff; + color: #fff; + } + + .searchParams { + width: 35%; + } + + .btn { + margin-left: 16px; + } + } +} + +.box { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.tablebox { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + overflow: hidden; +} 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 new file mode 100644 index 0000000..7d81460 --- /dev/null +++ b/src/app/pages/plan-admin/oil-station-list/oil-station-list.component.ts @@ -0,0 +1,123 @@ +import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { TreeService } from 'src/app/service/tree.service'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown'; +import { NzFormatEmitEvent, NzTreeComponent, NzTreeNode } from 'ng-zorro-antd/tree'; +import { Router } from '@angular/router'; +import { NavChangeService } from 'src/app/service/navChange.service'; +import { fromEvent } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; + +@Component({ + selector: 'app-oil-station-list', + templateUrl: './oil-station-list.component.html', + styleUrls: ['./oil-station-list.component.scss'] +}) +export class OilStationListComponent implements OnInit { + validateForm!: FormGroup; + constructor(private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router) { } + + tableScrollHeight + + ngOnInit(): void { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + + console.log('tableScrollHeight', this.tableScrollHeight) + // 页面监听 + fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + }); + this.validateForm = this.fb.group({ + name: [null] + }); + + this.tableSpin = true + } + 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) { + console.log('需要加载数据了', event) + this.SkipCount = String(Number(this.SkipCount) + 50) + await this.getGasStation() + } + } + }); + } + + submitForm(): void { + for (const i in this.validateForm.controls) { + this.validateForm.controls[i].markAsDirty(); + this.validateForm.controls[i].updateValueAndValidity(); + } + this.list = [] + this.SkipCount = '0' + this.getGasStation() + } + resetForm(e: MouseEvent): void { + e.preventDefault(); + this.validateForm.reset(); + for (const key in this.validateForm.controls) { + this.validateForm.controls[key].markAsPristine(); + this.validateForm.controls[key].updateValueAndValidity(); + } + this.list = [] + this.SkipCount = '0' + this.getGasStation() + } + + + + look(item) { + let gastionobj = { + organization: { + displayName: item.stationName, + isGasStation: true, + id: item.organizationUnitId + } + } + sessionStorage.setItem('userdataOfgasstation', JSON.stringify(gastionobj)) + this.router.navigate(['/todaywarning/petrolStation']) + let obj = { + name: 'oilstation' + } + this.navChangeService.sendMessage(obj);//发布一条消息 + } + + tableSpin: boolean + totalCount: any //总数 + //获取点击组织机构的所有加油站 + SkipCount: string = '0' + MaxResultCount: string = '100' + + orId + list: any = [] + async getGasStation() { + let params = { + StationName: this.validateForm.value.name, + OrganizationUnitId: String(sessionStorage.getItem('planAdminOrid')), + IsContainsChildren: 'true', + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount, + Sorting: ' BuildingBasicInfo.Id asc' + } + this.tableSpin = true + await new Promise((resolve, reject) => { + this.http.get('/api/services/app/GasStation/GetAll', { + params: params + }).subscribe((data: any) => { + this.totalCount = data.result.totalCount + this.list = this.list.concat(data.result.items); + this.list = [...this.list] + this.tableSpin = false + resolve(data) + }) + }) + } + + //父组件调用子组件方法 + public onChildMethod() { + this.getGasStation() + } +} diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html index 9370510..7209128 100644 --- a/src/app/pages/plan-admin/plan-admin.component.html +++ b/src/app/pages/plan-admin/plan-admin.component.html @@ -26,80 +26,25 @@
    - +
    + +
    +
    + 站点管理 + 更新类证照 + 档案类证照 +
    +
    +
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    + +
    +
    +
    \ No newline at end of file diff --git a/src/app/pages/plan-admin/plan-admin.component.scss b/src/app/pages/plan-admin/plan-admin.component.scss index 79ecb13..a973d33 100644 --- a/src/app/pages/plan-admin/plan-admin.component.scss +++ b/src/app/pages/plan-admin/plan-admin.component.scss @@ -9,12 +9,61 @@ .title { width: 100%; height: 48px; + + .titlebox { + width: 100%; + height: 100%; + display: flex; + align-items: center; + box-sizing: border-box; + padding-left: 12px; + + img { + width: 65px; + height: 65px; + } + + .content { + flex: 1; + height: 48px; + display: flex; + align-items: center; + // background-image: linear-gradient(to right, #002147, #033565, #064e8e, #064e8e, #033565, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.32) 50%, rgba(35, 153, 255, 0) 100%); + + .contentitem { + width: 100%; + height: 32px; + display: flex; + align-items: center; + // background-image: linear-gradient(to right, #002147, #0f5ca0, #1c88e6, #1c88e6, #0f5ca0, #002147); + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.8) 50%, rgba(35, 153, 255, 0) 100%); + + .grey { + color: #6585a1; + } + + .selectedItem { + color: #bce0ff; + } + + span { + // + font-size: 20px; + font-family: titlefont; + margin-right: 20px; + cursor: pointer; + } + } + + } + } + } .orbox { height: 100%; - width: 360px; - margin-right: 40px; + width: 300px; display: flex; flex-direction: column; @@ -25,7 +74,7 @@ background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%); margin-top: 12px; box-sizing: border-box; - padding: 18px 12px; + padding: 12px 8px; nz-tree { background: none; @@ -37,59 +86,15 @@ .stationList { flex: 1; - display: flex; - flex-direction: column; - - .search { - box-sizing: border-box; - padding-left: 22px; - padding-right: 33px; - width: 100%; - height: 32px; - margin-top: 14px; - margin-bottom: 22px; - - form { - width: 100%; - height: 32px; - display: flex; - justify-content: flex-end; - - input { - background: none; - border: 1px solid #91ccff; - color: #fff; - } - - .searchParams { - width: 22%; - } - .btn { - width: 5%; - margin-left: 16px; - } - } - } - .tablebox { - flex: 1; + .tabbox { + width: 100%; + height: 100%; display: flex; flex-direction: column; - align-items: center; - overflow: hidden; - - .pagination { - margin-top: 26px; - display: flex; - align-items: center; - justify-content: center; - } - - ::-webkit-scrollbar { - width: 0px; - } } + } @@ -102,6 +107,27 @@ .title { width: 100%; height: 42px; + + .titlebox { + img { + width: 46px; + height: 46px; + } + + .content { + height: 36px; + + .contentitem { + height: 25px; + + span { + margin-left: 6px; + font-size: 16px; + } + } + + } + } } .orbox { @@ -148,11 +174,32 @@ .title { width: 100%; height: 33px; + + .titlebox { + img { + width: 36px; + height: 36px; + } + + .content { + height: 28px; + + .contentitem { + height: 20px; + + span { + margin-left: 6px; + font-size: 13px; + } + } + + } + } } .orbox { width: 250px; - margin-right:23px; + margin-right: 23px; .or { margin-top: 5px; @@ -182,10 +229,11 @@ } } } - .tablebox{ - nz-table{ - th{ - font-size: 10px!important; + + .tablebox { + nz-table { + th { + font-size: 10px !important; } } } diff --git a/src/app/pages/plan-admin/plan-admin.component.ts b/src/app/pages/plan-admin/plan-admin.component.ts index 641d9a6..373d84e 100644 --- a/src/app/pages/plan-admin/plan-admin.component.ts +++ b/src/app/pages/plan-admin/plan-admin.component.ts @@ -8,58 +8,57 @@ import { Router } from '@angular/router'; import { NavChangeService } from 'src/app/service/navChange.service'; import { fromEvent } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; +import { OilStationListComponent } from './oil-station-list/oil-station-list.component'; +import { UpdateLicenseListComponent } from './update-license-list/update-license-list.component'; +import { FileLicenseListComponent } from './file-license-list/file-license-list.component'; @Component({ selector: 'app-plan-admin', templateUrl: './plan-admin.component.html', styleUrls: ['./plan-admin.component.scss'] }) export class PlanAdminComponent implements OnInit { - validateForm!: FormGroup; + @ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent; + @ViewChild('child') oilStationListComponent!: OilStationListComponent;; + @ViewChild('child2') updateLicenseListComponent!: UpdateLicenseListComponent;; + @ViewChild('child3') fileLicenseListComponent!: FileLicenseListComponent;; constructor(private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router) { } - list: any = [] + ngOnInit(): void { - this.validateForm = this.fb.group({ - name: [null] - }); - this.tableSpin = true this.getAllOrganization() } - 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) { - console.log('需要加载数据了', event) - this.SkipCount = String(Number(this.SkipCount) + 50) - await this.getGasStation() - } - } - }); - } + //选择右侧tab页 + selectedTab = 0 + selectTab(index) { + this.selectedTab = index - submitForm(): void { - for (const i in this.validateForm.controls) { - this.validateForm.controls[i].markAsDirty(); - this.validateForm.controls[i].updateValueAndValidity(); + if (this.selectedTab == 0) { + setTimeout(() => { + this.oilStationListComponent.list = [] + this.oilStationListComponent.SkipCount = '0' + this.oilStationListComponent.onChildMethod() + }, 0); } - this.list = [] - this.SkipCount = '0' - this.getGasStation() - } - resetForm(e: MouseEvent): void { - e.preventDefault(); - this.validateForm.reset(); - for (const key in this.validateForm.controls) { - this.validateForm.controls[key].markAsPristine(); - this.validateForm.controls[key].updateValueAndValidity(); + if (this.selectedTab == 1) { + setTimeout(() => { + this.updateLicenseListComponent.list = [] + this.updateLicenseListComponent.SkipCount = '0' + this.updateLicenseListComponent.onChildMethod() + }, 0); + } + if (this.selectedTab == 2) { + setTimeout(() => { + this.fileLicenseListComponent.list = [] + this.fileLicenseListComponent.SkipCount = '0' + this.fileLicenseListComponent.onChildMethod() + }, 0); } - this.list = [] - this.SkipCount = '0' - this.getGasStation() } + + //获取所有组织机构 nodes: any = [] nzExpandAll = false @@ -67,7 +66,7 @@ export class PlanAdminComponent implements OnInit { orSpin: boolean = false getAllOrganization() { this.orSpin = true - let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id + let OrganizationUnitId = JSON.parse(sessionStorage.getItem('userdata')).organization.id let params = { OrganizationUnitId: OrganizationUnitId, IsContainsChildren: "true" @@ -93,75 +92,47 @@ export class PlanAdminComponent implements OnInit { this.nodes = [...this.toTree.toTree(data.result.items)] this.nzExpandedKeys = [OrganizationUnitId] this.nzSelectedKeys = [OrganizationUnitId] - this.OrganizationUnitId = OrganizationUnitId - this.getGasStation() + + sessionStorage.setItem('planAdminOrid', OrganizationUnitId) + this.oilStationListComponent.onChildMethod() }) } - tableheight() { - return (document.getElementById('tablebox').clientHeight - 42) + 'px' - } - - look(item) { - - let gastionobj = { - organization: { - displayName: item.stationName, - isGasStation: true, - id: item.organizationUnitId - } - } - sessionStorage.setItem('userdataOfgasstation', JSON.stringify(gastionobj)) - this.router.navigate(['/todaywarning/petrolStation']) - let obj = { - name: 'oilstation' - } - this.navChangeService.sendMessage(obj);//发布一条消息 - } nzExpandedKeys: any = [] activatedNode?: NzTreeNode; //点击tree节点 activeNode(data: NzFormatEmitEvent): void { this.activatedNode = data.node!; - // console.log(data) - this.OrganizationUnitId = data.node.origin.id - - this.list = [] - this.SkipCount = '0' - this.getGasStation() + sessionStorage.setItem('planAdminOrid', data.node.origin.id) + if (this.selectedTab == 0) { + setTimeout(() => { + this.oilStationListComponent.list = [] + this.oilStationListComponent.SkipCount = '0' + this.oilStationListComponent.onChildMethod() + }, 0); + } + if (this.selectedTab == 1) { + setTimeout(() => { + this.updateLicenseListComponent.list = [] + this.updateLicenseListComponent.SkipCount = '0' + this.updateLicenseListComponent.onChildMethod() + }, 0); + } + if (this.selectedTab == 2) { + setTimeout(() => { + this.fileLicenseListComponent.list = [] + this.fileLicenseListComponent.SkipCount = '0' + this.fileLicenseListComponent.onChildMethod() + }, 0); + } } - //获取点击组织机构的所有加油站 - SkipCount: string = '0' - MaxResultCount: string = '100' - OrganizationUnitId: any - tableSpin: boolean = false - totalCount: any //总数 - async getGasStation() { - let params = { - StationName: this.validateForm.value.name, - OrganizationUnitId: String(this.OrganizationUnitId), - IsContainsChildren: 'true', - SkipCount: this.SkipCount, - MaxResultCount: this.MaxResultCount, - Sorting: ' BuildingBasicInfo.Id asc' - } - this.tableSpin = true - await new Promise((resolve, reject) => { - this.http.get('/api/services/app/GasStation/GetAll', { - params: params - }).subscribe((data: any) => { - this.totalCount = data.result.totalCount - this.list = this.list.concat(data.result.items); - this.list = [...this.list] - this.tableSpin = false - resolve(data) - }) - }) - } + + + 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 new file mode 100644 index 0000000..70b6bb8 --- /dev/null +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.html @@ -0,0 +1,73 @@ +
    + +
    + +
    + + + + + + + + + + + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..06cfc17 --- /dev/null +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss @@ -0,0 +1,79 @@ +.search { + box-sizing: border-box; + padding-left: 38px; + padding-right: 35px; + width: 100%; + height: 32px; + margin: 12px 0; + display: flex; + justify-content: space-between; + align-items: center; + + .legendbox { + display: flex; + align-items: center; + color: #FFFFFF; + flex: 1; + + .legendItem { + display: flex; + align-items: center; + margin-right: 12px; + + div { + width: 8px; + height: 8px; + margin-right: 3px; + } + } + } + + form { + flex: 1; + height: 32px; + display: flex; + justify-content: flex-end; + + input { + background: none; + border: 1px solid #91ccff; + color: #fff; + } + + .searchParams { + width: 35%; + } + + .btn { + margin-left: 16px; + } + } +} + +.box { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.tablebox { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + overflow: hidden; +} + + +.green { + color: #4BFFD4; +} + +.yellow { + color: #FFBD4B; +} + +.red { + color: #FF4B65; +} 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 new file mode 100644 index 0000000..82abbfe --- /dev/null +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts @@ -0,0 +1,185 @@ +import { Component, OnInit, ViewChild, ElementRef, ViewContainerRef } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { TreeService } from 'src/app/service/tree.service'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown'; +import { NzFormatEmitEvent, NzTreeComponent, NzTreeNode } from 'ng-zorro-antd/tree'; +import { Router } from '@angular/router'; +import { NavChangeService } from 'src/app/service/navChange.service'; +import { fromEvent } from 'rxjs'; +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'; +@Component({ + selector: 'app-update-license-list', + templateUrl: './update-license-list.component.html', + styleUrls: ['./update-license-list.component.scss'] +}) +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) { } + + tableScrollHeight + + ngOnInit(): void { + + + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + + console.log('tableScrollHeight', this.tableScrollHeight) + // 页面监听 + fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' + }); + this.validateForm = this.fb.group({ + name: [null] + }); + + this.tableSpin = true + } + 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) { + console.log('需要加载数据了', event) + this.SkipCount = String(Number(this.SkipCount) + 50) + await this.getStationLicenses() + } + } + }); + } + + submitForm(): void { + for (const i in this.validateForm.controls) { + this.validateForm.controls[i].markAsDirty(); + this.validateForm.controls[i].updateValueAndValidity(); + } + this.list = [] + this.SkipCount = '0' + this.getStationLicenses() + } + resetForm(e: MouseEvent): void { + e.preventDefault(); + this.validateForm.reset(); + for (const key in this.validateForm.controls) { + this.validateForm.controls[key].markAsPristine(); + this.validateForm.controls[key].updateValueAndValidity(); + } + this.list = [] + this.SkipCount = '0' + this.getStationLicenses() + } + + tableSpin: boolean + totalCount: any //总数 + //获取点击组织机构的所有加油站 + SkipCount: string = '0' + MaxResultCount: string = '100' + + orId + list: any = [] + async getStationLicenses() { + let params = { + StationName: this.validateForm.value.name, + OrganizationUnitId: String(sessionStorage.getItem('planAdminOrid')), + IsContainsChildren: 'true', + SkipCount: this.SkipCount, + MaxResultCount: this.MaxResultCount, + // Sorting: ' BuildingBasicInfo.Id asc' + } + this.tableSpin = true + await new Promise((resolve, reject) => { + this.http.get('/api/services/app/StationValidityLicense/GetStationLicenses', { + params: params + }).subscribe((data: any) => { + this.totalCount = data.result.totalCount + let arr = [] + data.result.data.forEach(element => { + let keyArr = Object.keys(element); + let valueArr = Object.values(element); + let newElement = (keyArr as any).zip(valueArr, (a, b) => { return { name: a, value: b } }); + + //修改排头 + let newArr = [] + for (let index = 0; index < newElement.length; index++) { + const item = newElement[index]; + if (item.name == '省公司') { + newArr[0] = item + newElement.splice(index--, 1) + } + if (item.name == '区域') { + newArr[1] = item + newElement.splice(index--, 1) + } + if (item.name == '油站名称') { + newArr[2] = item + newElement.splice(index--, 1) + } + } + let atLastArr = newArr.concat(newElement); + arr.push(atLastArr) + + }); + + + 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) + }) + }) + } + + //父组件调用子组件方法 + public onChildMethod() { + this.getStationLicenses() + } + + + 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 => { }); + }) + + + } +} diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.html b/src/app/pages/today-warning-admin/today-warning-admin.component.html index 638951d..515b7c7 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.html +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.html @@ -12,10 +12,10 @@ - - - - + + + + diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.ts b/src/app/pages/today-warning-admin/today-warning-admin.component.ts index 5bf9863..87c6258 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.ts +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.ts @@ -49,10 +49,10 @@ export class TodayWarningAdminComponent implements OnInit { } //更新处置状态 if (message.type == 'updatehandleTime') { - console.log('更新处置状态',message) + console.log('更新处置状态', message) console.log(this.list) this.list.forEach(element => { - if(element.id == message.data){ + if (element.id == message.data) { element.handleTime = new Date() } }); @@ -302,7 +302,15 @@ export class TodayWarningAdminComponent implements OnInit { }, nzFooter: null, nzOnOk: async () => { - console.log(99999, instance.content) + console.log('误报处理') + for (let index = 0; index < this.list.length; index++) { + const element = this.list[index]; + if (element.id == item.id) { + this.list.splice(index, 1) + this.totalCount = String(Number(this.totalCount) - 1) + // this.SkipCount = String(Number(this.SkipCount) - 1) + } + } } }); const instance = modal.getContentComponent(); diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html index 6bb2cc3..f07f779 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html @@ -26,12 +26,21 @@
    处置内容 -
    - 误报 - 提交 - 已处置 -
    + + + 已进行误报处置 + + +
    + 误报 + 提交 + 已处置 +
    +
    + + +
    diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss index 07dcc6b..3eb7fe1 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss @@ -108,11 +108,14 @@ .btn { display: flex; align-items: center; - span{ + + span { margin: 0 4px; display: inline-block; // border: 1px solid red; } + + span:first-child(1) {margin-right: 12px;} } } diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts index 21b3c33..ade529f 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts @@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http'; import { Component, OnInit, Input } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { NzMessageService } from 'ng-zorro-antd/message'; -import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; @Component({ selector: 'app-get-out-of-line-details', templateUrl: './get-out-of-line-details.component.html', @@ -11,19 +11,37 @@ import { NzModalService } from 'ng-zorro-antd/modal'; export class GetOutOfLineDetailsComponent implements OnInit { @Input() data: any - constructor(private fb: FormBuilder, private http: HttpClient, private message: NzMessageService, private modal: NzModalService) { } + constructor(private fb: FormBuilder, private http: HttpClient, private message: NzMessageService, private modal: NzModalService, private initialModal: NzModalRef) { } imgUrl: string vedioUrl: string content details + + + isMisinformation: boolean = false//误报按钮的显隐 ngOnInit(): void { console.log(this.data) this.details = this.data.content1 this.imgUrl = this.data.violateImage this.vedioUrl = this.data.violateVideo this.content = this.data.handleRecord + + let loginUserInfo + if (sessionStorage.getItem('isGasStation') == 'true') { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + } else { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + } + + if (loginUserInfo.roles.find((item) => { + return item.name == 'ViolationPositiveCensorer' + }) && this.data.violation.eventSystemName != '证照预警') { + this.isMisinformation = true + } else { + this.isMisinformation = false + } } @@ -54,18 +72,14 @@ export class GetOutOfLineDetailsComponent implements OnInit { nzOnOk: () => { let body = { id: this.data.id, - handleRecord: this.content ? this.content : '此条预警为误报', - isFalsePositive: true + positive: false } - this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { + this.http.post('/api/services/app/ViolateRecord/CensorViolateRecord', body).subscribe(data => { this.message.create('success', '处置成功!'); - this.data.handleTime = new Date() - if (this.content) { - this.data.handleRecord = this.content - } else { - this.data.handleRecord = '此条预警为误报' - this.content = '此条预警为误报' - } + // this.data.handleTime = new Date() + this.initialModal.triggerOk() + }, err => { + this.message.create('warning', '处置失败,请联系管理员!'); }) }, diff --git a/src/app/pages/today-warning/today-warning.component.html b/src/app/pages/today-warning/today-warning.component.html index 217800e..70ad296 100644 --- a/src/app/pages/today-warning/today-warning.component.html +++ b/src/app/pages/today-warning/today-warning.component.html @@ -12,17 +12,18 @@ - - - - + + + + - + @@ -50,13 +51,15 @@ - + - + @@ -76,6 +79,32 @@
    +
    +
    + 预警级别 +
    +
    + 预警类型 +
    +
    + 预警信息 +
    +
    + 区域 +
    +
    + 摄像头 +
    +
    + 预警时间 +
    +
    + 处置状态 +
    +
    + 操作 +
    +
    @@ -105,16 +134,16 @@
    - 预警类型: {{item.violation.violationType}} + {{item.violation.violationType}}
    - 预警信息: {{item.violation.eventSystemName}} + {{item.violation.eventSystemName}}
    - 区域: {{item.violateArea}} + {{item.violateArea ? item.violateArea : '/'}}
    - 摄像头: {{item.cameraNo}} + {{item.cameraNo ? item.cameraNo : '/'}}
    {{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}} @@ -128,9 +157,7 @@
    - - +
    diff --git a/src/app/pages/today-warning/today-warning.component.scss b/src/app/pages/today-warning/today-warning.component.scss index 4cdd9cb..0ddeff2 100644 --- a/src/app/pages/today-warning/today-warning.component.scss +++ b/src/app/pages/today-warning/today-warning.component.scss @@ -126,7 +126,10 @@ } } } - + .listitem2{ + height: 40px; + line-height: 40px; + } .dispositioned { color: #23D9FF; } diff --git a/src/app/pages/today-warning/today-warning.component.ts b/src/app/pages/today-warning/today-warning.component.ts index 763ba24..c2e3942 100644 --- a/src/app/pages/today-warning/today-warning.component.ts +++ b/src/app/pages/today-warning/today-warning.component.ts @@ -249,7 +249,15 @@ export class TodayWarningComponent implements OnInit { }, nzFooter: null, nzOnOk: async () => { - + console.log('误报处理') + for (let index = 0; index < this.list.length; index++) { + const element = this.list[index]; + if (element.id == item.id) { + this.list.splice(index, 1) + this.totalCount = String(Number(this.totalCount) - 1) + // this.SkipCount = String(Number(this.SkipCount) - 1) + } + } } }); const instance = modal.getContentComponent(); diff --git a/src/app/pages/warning-statistics-list/warning-statistics-list.component.html b/src/app/pages/warning-statistics-list/warning-statistics-list.component.html index 198d224..f4182d3 100644 --- a/src/app/pages/warning-statistics-list/warning-statistics-list.component.html +++ b/src/app/pages/warning-statistics-list/warning-statistics-list.component.html @@ -6,6 +6,7 @@
    预警类型统计 + 卸油统计 证照预警统计
    @@ -167,8 +168,8 @@ {{item.violatedItemSnapshotObj.name ? item.violatedItemSnapshotObj.name : '/'}}
    - {{item.violatedItemSnapshotObj.validityEndTime ? - (item.violatedItemSnapshotObj.validityEndTime | date:"yyyy-MM-dd") : '/'}} + {{item.violatedItemSnapshotObj.endTime ? + (item.violatedItemSnapshotObj.endTime | date:"yyyy-MM-dd") : '/'}}
    查看 diff --git a/src/app/pages/warning-statistics-list/warning-statistics-list.component.ts b/src/app/pages/warning-statistics-list/warning-statistics-list.component.ts index 29c95f9..3275d22 100644 --- a/src/app/pages/warning-statistics-list/warning-statistics-list.component.ts +++ b/src/app/pages/warning-statistics-list/warning-statistics-list.component.ts @@ -33,7 +33,23 @@ export class WarningStatisticsListComponent implements OnInit { enddate isOrShow: boolean + + isMisinformation: boolean = false//误报按钮的显隐 ngOnInit(): void { + let loginUserInfo + if (sessionStorage.getItem('isGasStation') == 'true') { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + } else { + loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + } + + if (loginUserInfo.roles.find((item) => { + return item.name == 'ViolationPositiveCensorer' + })) { + this.isMisinformation = true + } else { + this.isMisinformation = false + } //当前日期 let myDate: any = new Date(); let nowY = myDate.getFullYear(); @@ -207,6 +223,7 @@ export class WarningStatisticsListComponent implements OnInit { } ], legend: { + selectedMode: false, // 是否允许点击 data: ['预警事件'], textStyle: { color: '#fff' @@ -321,6 +338,7 @@ export class WarningStatisticsListComponent implements OnInit { } }, legend: { + selectedMode: false, // 是否允许点击 data: ['事前准备', '事中操作', '全程监测'], textStyle: { color: '#fff' @@ -735,5 +753,11 @@ export class WarningStatisticsListComponent implements OnInit { this.router.navigate(['/records']) } } - + goMisinformationList() { + if (this.router.url.indexOf('petrolStation') != -1) { + this.router.navigate(['records/petrolStation/misinformationList']) + } else { + this.router.navigate(['records/misinformationList']) + } + } } diff --git a/src/app/pipes/type.pipe.ts b/src/app/pipes/type.pipe.ts new file mode 100644 index 0000000..40610c1 --- /dev/null +++ b/src/app/pipes/type.pipe.ts @@ -0,0 +1,36 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ name: 'auditStatus' }) +export class auditStatusPipe implements PipeTransform { + transform(value: number): string { + let arr = ['未提交审核', '审核中', '审核通过', '审核驳回', '已撤销审核', '审核完成'] + return arr[value] + } +} + +// 通知内容 +@Pipe({ name: 'notificationContent' }) +export class notificationContent implements PipeTransform { + transform(value: number): string { + let arr = ['有效期', '年检'] + return arr[value] + } +} + +// 通知状态 +@Pipe({ name: 'licenseViolationType' }) +export class licenseViolationType implements PipeTransform { + transform(value: number): string { + let arr = ['无效', '办理提醒', '临期提醒', '逾期报警'] + return arr[value] + } +} + +// 处置状态 +@Pipe({ name: 'handleState' }) +export class handleState implements PipeTransform { + transform(value: number): string { + let arr = ['未启动', '已启动', '已关闭', '已延期'] + return arr[value] + } +} \ No newline at end of file diff --git a/src/app/service/objectsSimple.service.ts b/src/app/service/objectsSimple.service.ts index 25a5fcf..609be78 100644 --- a/src/app/service/objectsSimple.service.ts +++ b/src/app/service/objectsSimple.service.ts @@ -48,7 +48,7 @@ export class ObjectsSimpleService { let fileSize = file.size || null //上传文件的总大小 let shardSize = 5 * 1024 * 1024 //5MB一个分片 let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段 - + console.log('共分多少段' + allSlice) for (let i = 0; i < allSlice; i++) { //循环分段上传 let start = i * shardSize //切割文件开始位置 let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 @@ -66,13 +66,14 @@ export class ObjectsSimpleService { PartNumberETag.push(result) if (PartNumberETag.length === allSlice) { //分块上传完成 + let data = PartNumberETag let paramsData = { uploadId: uploadId }; let path = ObjectsSimpleService.c_apiRoot_Multipart + 'CompleteMultipartUpload/sinochemweb/' + objectName; this.http.post(path, data, { params: paramsData }).subscribe(data => { let objData: any = new Object(); objData.fileName = file.name; - objData.filePath = (ObjectsSimpleService.baseUrl + objectName).replace(file.name, ""); + objData.filePath = ObjectsSimpleService.baseUrl + objectName resolve(objData) }) } diff --git a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html index 6f0708f..ca8b9dc 100644 --- a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html +++ b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html @@ -48,7 +48,7 @@
    - +
    @@ -77,7 +77,7 @@
    - +
    diff --git a/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.html b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.html new file mode 100644 index 0000000..8f6d510 --- /dev/null +++ b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.html @@ -0,0 +1,11 @@ +
    +
    + + + + + + + + +
    \ No newline at end of file diff --git a/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.scss b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.ts b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.ts new file mode 100644 index 0000000..e08d323 --- /dev/null +++ b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.ts @@ -0,0 +1,24 @@ +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'; + +@Component({ + selector: 'app-add-file-of-license', + templateUrl: './add-file-of-license.component.html', + styleUrls: ['./add-file-of-license.component.scss'] +}) +export class AddFileOfLicenseComponent implements OnInit { + + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } + + ngOnInit(): void { + this.validateForm = this.fb.group({ + name: [null, [Validators.required]] + }); + } + destroyModal(): void { + this.modal.destroy({ data: 'this the result data' }); + } +} diff --git a/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.html b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.html new file mode 100644 index 0000000..8f6d510 --- /dev/null +++ b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.html @@ -0,0 +1,11 @@ +
    +
    + + + + + + + + +
    \ No newline at end of file diff --git a/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.scss b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.ts b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.ts new file mode 100644 index 0000000..c99154e --- /dev/null +++ b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.ts @@ -0,0 +1,24 @@ +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'; + +@Component({ + selector: 'app-edit-file-of-license', + templateUrl: './edit-file-of-license.component.html', + styleUrls: ['./edit-file-of-license.component.scss'] +}) +export class EditFileOfLicenseComponent implements OnInit { + @Input() data?: any; + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } + + ngOnInit(): void { + this.validateForm = this.fb.group({ + name: [this.data.licenseName, [Validators.required]] + }); + } + destroyModal(): void { + this.modal.destroy({ data: 'this the result data' }); + } +} 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 new file mode 100644 index 0000000..75f0d11 --- /dev/null +++ b/src/app/system-management/file-of-license/file-of-license.component.html @@ -0,0 +1,30 @@ +
    +
    +
    + 档案类证件列表 +
    +
    + +
    +
    +
    + +
    + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/system-management/file-of-license/file-of-license.component.scss b/src/app/system-management/file-of-license/file-of-license.component.scss new file mode 100644 index 0000000..2c00b6f --- /dev/null +++ b/src/app/system-management/file-of-license/file-of-license.component.scss @@ -0,0 +1,57 @@ +.licenseBox { + width: 100%; + height: 100%; + background: #FFFFFF; + box-sizing: border-box; + padding: 20px; + overflow: hidden; + display: flex; + flex-direction: column; + + tbody { + tr { + td { + span { + margin-right: 18px; + } + } + + td:nth-child(1) { + padding-left: 40px; + } + } + + .operation { + a { + color: #2399FF; + margin-right: 8px; + } + + a:last-child { + color: rgba(0, 13, 33, 0.48); + } + } + + } +} + +.topbox { + width: 100%; + height: 36px; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 12px; + + .lefttop { + span { + color: #000D21; + } + } +} + +.tablebox { + flex: 1; + overflow-y: auto; + +} diff --git a/src/app/system-management/file-of-license/file-of-license.component.ts b/src/app/system-management/file-of-license/file-of-license.component.ts new file mode 100644 index 0000000..6a2d6fb --- /dev/null +++ b/src/app/system-management/file-of-license/file-of-license.component.ts @@ -0,0 +1,134 @@ +import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { HttpClient } from '@angular/common/http'; +import { AddFileOfLicenseComponent } from './add-file-of-license/add-file-of-license.component'; +import { EditFileOfLicenseComponent } from './edit-file-of-license/edit-file-of-license.component'; + +@Component({ + selector: 'app-file-of-license', + templateUrl: './file-of-license.component.html', + styleUrls: ['./file-of-license.component.scss'] +}) +export class FileOfLicenseComponent implements OnInit { + + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } + + ngOnInit(): void { + this.getLicense() + } + + listOfData: any[] = []; + + //获取证照列表 + isLoading = false + getLicense() { + this.isLoading = true + let params = { + SkipCount: '0', + MaxResultCount: '999' + } + this.http.get('/api/services/app/FileLicenseType/GetAll', { + params: params + }).subscribe((data: any) => { + console.log('证照列表', data.result.items) + this.isLoading = false + this.listOfData = data.result.items + }) + } + + addRole(): void { + const modal = this.modal.create({ + nzTitle: '新增证照', + nzContent: AddFileOfLicenseComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 288, + nzComponentParams: {}, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise(resolve => { + console.log('表单信息', instance.validateForm) + let body = { + licenseName: instance.validateForm.value.name, + } + this.http.post('/api/services/app/FileLicenseType/Create', body).subscribe(data => { + resolve(data) + this.message.create('success', '创建成功!'); + this.getLicense() + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + } + }); + const instance = modal.getContentComponent(); + modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); + // Return a result when closed + modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); + } + + + edit(item) { + const modal = this.modal.create({ + nzTitle: '编辑证照', + nzContent: EditFileOfLicenseComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 325, + nzComponentParams: { + data: item + }, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise(resolve => { + console.log('表单信息', instance.validateForm) + let body = { + id: item.id, + licenseName: instance.validateForm.value.name + } + this.http.put('/api/services/app/FileLicenseType/Update', body).subscribe(data => { + resolve(data) + this.message.create('success', '修改成功!'); + this.getLicense() + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + } + }); + const instance = modal.getContentComponent(); + modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); + // Return a result when closed + modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); + } + + delete(item) { + console.log(item) + this.modal.confirm({ + nzTitle: `确定要删除${item.licenseName}这个证照吗?`, + nzOkText: '确定', + nzOkType: 'danger', + nzOnOk: () => { + this.http.delete('/api/services/app/FileLicenseType/Delete', { + params: { + Id: item.id + } + }).subscribe(data => { + this.message.create('success', '删除成功!'); + this.getLicense() + }) + }, + nzCancelText: '取消', + nzOnCancel: () => { + + } + }); + } + +} diff --git a/src/app/system-management/navigation/navigation.component.html b/src/app/system-management/navigation/navigation.component.html index d7010d6..b2ac420 100644 --- a/src/app/system-management/navigation/navigation.component.html +++ b/src/app/system-management/navigation/navigation.component.html @@ -18,6 +18,8 @@
  • 角色管理
  • 分析主机管理
  • 推送管理
  • +
  • 更新类证照管理
  • +
  • 档案类证照管理
  • diff --git a/src/app/system-management/role/role.component.html b/src/app/system-management/role/role.component.html index a3db2a4..b91e611 100644 --- a/src/app/system-management/role/role.component.html +++ b/src/app/system-management/role/role.component.html @@ -9,7 +9,7 @@
    - +
    diff --git a/src/app/system-management/role/role.component.ts b/src/app/system-management/role/role.component.ts index 39ae8ee..d9f42a9 100644 --- a/src/app/system-management/role/role.component.ts +++ b/src/app/system-management/role/role.component.ts @@ -18,7 +18,7 @@ export class RoleComponent implements OnInit { ngOnInit(): void { this.getAllRoles() - this.loadMore() + this.loadMore() } listOfData: any[] = []; @@ -26,7 +26,13 @@ export class RoleComponent implements OnInit { //获取角色列表 getAllRoles() { - this.http.get('/api/services/app/Role/GetAll').subscribe((data: any) => { + let params = { + SkipCount: '0', + MaxResultCount: '999' + } + this.http.get('/api/services/app/Role/GetAll', { + params: params + }).subscribe((data: any) => { console.log('角色列表', data.result.items) this.listOfData = data.result.items }) diff --git a/src/app/system-management/system-management-routing.module.ts b/src/app/system-management/system-management-routing.module.ts index c21a207..a8990e2 100644 --- a/src/app/system-management/system-management-routing.module.ts +++ b/src/app/system-management/system-management-routing.module.ts @@ -7,13 +7,17 @@ import { OrganizationComponent } from './organization/organization.component'; import { UserComponent } from './user/user.component'; import { AnalysisOfTheHostComponent } from './analysis-of-the-host/analysis-of-the-host.component'; import { PushComponent } from './push/push.component'; +import { UpdateOfLicenseComponent } from './update-of-license/update-of-license.component'; +import { FileOfLicenseComponent } from './file-of-license/file-of-license.component'; const routes: Routes = [ { path: 'organization', component: OrganizationComponent }, { path: 'user', component: UserComponent }, { path: 'role', component: RoleComponent }, { path: 'host', component: AnalysisOfTheHostComponent }, - { path: 'push', component: PushComponent } + { path: 'push', component: PushComponent }, + { path: 'fileOfLicense', component: FileOfLicenseComponent }, + { path: 'updateOfLicense', component: UpdateOfLicenseComponent } ]; @NgModule({ diff --git a/src/app/system-management/system-management.module.ts b/src/app/system-management/system-management.module.ts index f5d4321..b4231bb 100644 --- a/src/app/system-management/system-management.module.ts +++ b/src/app/system-management/system-management.module.ts @@ -34,8 +34,14 @@ import { AddcameraComponent } from './analysis-of-the-host/addcamera/addcamera.c import { EditcameraComponent } from './analysis-of-the-host/editcamera/editcamera.component'; import { PushComponent } from './push/push.component'; import { EditPushItemComponent } from './push/edit-push-item/edit-push-item.component'; +import { FileOfLicenseComponent } from './file-of-license/file-of-license.component'; +import { UpdateOfLicenseComponent } from './update-of-license/update-of-license.component'; +import { AddFileOfLicenseComponent } from './file-of-license/add-file-of-license/add-file-of-license.component'; +import { EditFileOfLicenseComponent } from './file-of-license/edit-file-of-license/edit-file-of-license.component'; +import { AddUpdateOfLicenseComponent } from './update-of-license/add-update-of-license/add-update-of-license.component'; +import { EditUpdateOfLicenseComponent } from './update-of-license/edit-update-of-license/edit-update-of-license.component'; @NgModule({ - declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent, AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, PushComponent, EditPushItemComponent], + declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent, AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, PushComponent, EditPushItemComponent, FileOfLicenseComponent, UpdateOfLicenseComponent, AddFileOfLicenseComponent, EditFileOfLicenseComponent, AddUpdateOfLicenseComponent, EditUpdateOfLicenseComponent], imports: [ CommonModule, SystemRoutingModule, @@ -57,7 +63,7 @@ import { EditPushItemComponent } from './push/edit-push-item/edit-push-item.comp NzTreeSelectModule, NzCheckboxModule ], - entryComponents :[AdduserComponent,EdituserComponent,AddroleComponent,EditroleComponent,AddorComponent,EditorComponent,AddhostComponent,EdithostComponent,AddcameraComponent,EditcameraComponent,EditPushItemComponent] - + entryComponents: [AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, EditPushItemComponent, AddFileOfLicenseComponent, EditFileOfLicenseComponent, AddUpdateOfLicenseComponent, EditUpdateOfLicenseComponent] + }) export class SystemManagementModule { } 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 new file mode 100644 index 0000000..7983bdb --- /dev/null +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html @@ -0,0 +1,34 @@ +
    +
    + + 证照名称 + + + + + + + + 办理提醒时间 + + + + + + + + 临期提醒时间 + + + + + + + + 是否年检 + + + + + +
    \ 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.scss b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.scss new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..ca3640d --- /dev/null +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts @@ -0,0 +1,28 @@ +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'; + + +@Component({ + selector: 'app-add-update-of-license', + templateUrl: './add-update-of-license.component.html', + styleUrls: ['./add-update-of-license.component.scss'] +}) +export class AddUpdateOfLicenseComponent implements OnInit { + + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } + + ngOnInit(): void { + this.validateForm = this.fb.group({ + name: [null, [Validators.required]], + handleRemindDays: [90, [Validators.required]], + closingRemindDays: [30, [Validators.required]], + isYearlyCheck: [true, [Validators.required]] + }); + } + destroyModal(): void { + this.modal.destroy({ data: 'this the result data' }); + } +} 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 new file mode 100644 index 0000000..7983bdb --- /dev/null +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html @@ -0,0 +1,34 @@ +
    +
    + + 证照名称 + + + + + + + + 办理提醒时间 + + + + + + + + 临期提醒时间 + + + + + + + + 是否年检 + + + + + +
    \ 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.scss b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.scss new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..13fd904 --- /dev/null +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts @@ -0,0 +1,29 @@ +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'; + +@Component({ + selector: 'app-edit-update-of-license', + templateUrl: './edit-update-of-license.component.html', + styleUrls: ['./edit-update-of-license.component.scss'] +}) +export class EditUpdateOfLicenseComponent implements OnInit { + + @Input() data?: any; + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } + + 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]], + isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]] + }); + } + destroyModal(): void { + this.modal.destroy({ data: 'this the result data' }); + } + +} 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 new file mode 100644 index 0000000..49b64d4 --- /dev/null +++ b/src/app/system-management/update-of-license/update-of-license.component.html @@ -0,0 +1,37 @@ +
    +
    +
    + 更新类证件列表 +
    +
    + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/system-management/update-of-license/update-of-license.component.scss b/src/app/system-management/update-of-license/update-of-license.component.scss new file mode 100644 index 0000000..2c00b6f --- /dev/null +++ b/src/app/system-management/update-of-license/update-of-license.component.scss @@ -0,0 +1,57 @@ +.licenseBox { + width: 100%; + height: 100%; + background: #FFFFFF; + box-sizing: border-box; + padding: 20px; + overflow: hidden; + display: flex; + flex-direction: column; + + tbody { + tr { + td { + span { + margin-right: 18px; + } + } + + td:nth-child(1) { + padding-left: 40px; + } + } + + .operation { + a { + color: #2399FF; + margin-right: 8px; + } + + a:last-child { + color: rgba(0, 13, 33, 0.48); + } + } + + } +} + +.topbox { + width: 100%; + height: 36px; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 12px; + + .lefttop { + span { + color: #000D21; + } + } +} + +.tablebox { + flex: 1; + overflow-y: auto; + +} 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 new file mode 100644 index 0000000..19df34e --- /dev/null +++ b/src/app/system-management/update-of-license/update-of-license.component.ts @@ -0,0 +1,141 @@ +import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { HttpClient } from '@angular/common/http'; +import { AddUpdateOfLicenseComponent } from './add-update-of-license/add-update-of-license.component'; +import { EditUpdateOfLicenseComponent } from './edit-update-of-license/edit-update-of-license.component'; + +@Component({ + selector: 'app-update-of-license', + templateUrl: './update-of-license.component.html', + styleUrls: ['./update-of-license.component.scss'] +}) +export class UpdateOfLicenseComponent implements OnInit { + + constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } + + ngOnInit(): void { + this.getLicense() + } + + listOfData: any[] = []; + + //获取证照列表 + isLoading = false + getLicense() { + this.isLoading = true + let params = { + SkipCount: '0', + MaxResultCount: '999' + } + this.http.get('/api/services/app/ValidityLicenseType/GetAll', { + params: params + }).subscribe((data: any) => { + console.log('证照列表', data.result.items) + this.isLoading = false + this.listOfData = data.result.items + }) + } + + addRole(): void { + const modal = this.modal.create({ + nzTitle: '新增证照', + nzContent: AddUpdateOfLicenseComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 588, + nzComponentParams: {}, + 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 + } + this.http.post('/api/services/app/ValidityLicenseType/Create', body).subscribe(data => { + resolve(data) + this.message.create('success', '创建成功!'); + this.getLicense() + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + } + }); + const instance = modal.getContentComponent(); + modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); + // Return a result when closed + modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); + } + + + edit(item) { + const modal = this.modal.create({ + nzTitle: '编辑证照', + nzContent: EditUpdateOfLicenseComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 588, + nzComponentParams: { + data: item + }, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise(resolve => { + console.log('表单信息', instance.validateForm) + let body = { + id: item.id, + licenseName: instance.validateForm.value.name, + handleRemindDays: instance.validateForm.value.handleRemindDays, + closingRemindDays: instance.validateForm.value.closingRemindDays, + isYearlyCheck: instance.validateForm.value.isYearlyCheck + } + this.http.put('/api/services/app/ValidityLicenseType/Update', body).subscribe(data => { + resolve(data) + this.message.create('success', '修改成功!'); + this.getLicense() + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + } + }); + const instance = modal.getContentComponent(); + modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); + // Return a result when closed + modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); + } + + delete(item) { + console.log(item) + this.modal.confirm({ + nzTitle: `确定要删除${item.licenseName}这个证照吗?`, + nzOkText: '确定', + nzOkType: 'danger', + nzOnOk: () => { + this.http.delete('/api/services/app/ValidityLicenseType/Delete', { + params: { + Id: item.id + } + }).subscribe(data => { + this.message.create('success', '删除成功!'); + this.getLicense() + }) + }, + nzCancelText: '取消', + nzOnCancel: () => { + + } + }); + } + + +} diff --git a/src/app/system-management/user/adduser/adduser.component.ts b/src/app/system-management/user/adduser/adduser.component.ts index ed57586..fa79626 100644 --- a/src/app/system-management/user/adduser/adduser.component.ts +++ b/src/app/system-management/user/adduser/adduser.component.ts @@ -35,7 +35,13 @@ export class AdduserComponent implements OnInit { //获取角色列表 getAllRoles() { - this.http.get('/api/services/app/Role/GetAll').subscribe((data: any) => { + let params = { + SkipCount: '0', + MaxResultCount: '999' + } + this.http.get('/api/services/app/Role/GetAll', { + params: params + }).subscribe((data: any) => { console.log('角色列表', data.result.items) this.listOfData = data.result.items }) diff --git a/src/app/system-management/user/edituser/edituser.component.ts b/src/app/system-management/user/edituser/edituser.component.ts index 3b03612..c58bd2e 100644 --- a/src/app/system-management/user/edituser/edituser.component.ts +++ b/src/app/system-management/user/edituser/edituser.component.ts @@ -28,10 +28,10 @@ export class EdituserComponent implements OnInit { // Promise.all([this.getAllRoles(), this.getAllOrganization()]).then(()=>{ // this.modal.containerInstance.config.nzOkLoading = false // }) - if(this.listOfData.length == 0){ + if (this.listOfData.length == 0) { this.getAllRoles() } - if(this.nodes.length == 0){ + if (this.nodes.length == 0) { this.getAllOrganization() } } @@ -42,8 +42,14 @@ export class EdituserComponent implements OnInit { //获取角色列表 async getAllRoles() { + let params = { + SkipCount: '0', + MaxResultCount: '999' + } await new Promise((resolve, reject) => { - this.http.get('/api/services/app/Role/GetAll').subscribe((data: any) => { + this.http.get('/api/services/app/Role/GetAll', { + params: params + }).subscribe((data: any) => { resolve(data) this.listOfData = data.result.items }) diff --git a/src/app/system-management/user/user.component.ts b/src/app/system-management/user/user.component.ts index 9da47ef..018bcf5 100644 --- a/src/app/system-management/user/user.component.ts +++ b/src/app/system-management/user/user.component.ts @@ -52,11 +52,17 @@ export class UserComponent implements OnInit { this.getAllUsers() } - listOfData:any = [] + listOfData: any = [] //获取角色列表 async getAllRoles() { + let params = { + SkipCount: '0', + MaxResultCount: '999' + } await new Promise((resolve, reject) => { - this.http.get('/api/services/app/Role/GetAll').subscribe((data: any) => { + this.http.get('/api/services/app/Role/GetAll', { + params: params + }).subscribe((data: any) => { resolve(data) this.listOfData = data.result.items }) @@ -153,8 +159,8 @@ export class UserComponent implements OnInit { // nzOkLoading: true, nzComponentParams: { data: data, - listOfData:this.listOfData, - nodes:this.nodes + listOfData: this.listOfData, + nodes: this.nodes }, nzOnOk: async () => { if (instance.validateForm.valid) { diff --git a/src/assets/images/icon/license.png b/src/assets/images/icon/license.png new file mode 100644 index 0000000..4c3d396 Binary files /dev/null and b/src/assets/images/icon/license.png differ diff --git a/src/assets/images/license/pdf.png b/src/assets/images/license/pdf.png new file mode 100644 index 0000000..0fbbf86 Binary files /dev/null and b/src/assets/images/license/pdf.png differ diff --git a/src/assets/images/license/word.png b/src/assets/images/license/word.png new file mode 100644 index 0000000..5939eb1 Binary files /dev/null and b/src/assets/images/license/word.png differ diff --git a/src/index.html b/src/index.html index e24c7ef..79008b4 100644 --- a/src/index.html +++ b/src/index.html @@ -9,6 +9,7 @@ + diff --git a/src/styles.scss b/src/styles.scss index 9d3f266..11ae818 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -81,7 +81,7 @@ ul, ol, li { list-style: none; - overflow-x: hidden; + // overflow-x: hidden; } .clearfn:after { diff --git a/src/theme.less b/src/theme.less index 6091c84..286d270 100644 --- a/src/theme.less +++ b/src/theme.less @@ -1,6 +1,26 @@ @import "../node_modules/ng-zorro-antd/ng-zorro-antd.less"; +.blueColor { + color: #36A2FF; + cursor: pointer; +} + +.greyColor { + color: #5D687A; + cursor: not-allowed; +} + +.yellowColor { + color: #FFBD4B; +} + +.greenColor { + color: #4BFFD4; +} +.redColor { + color: #FF4B65; +} //分页器 #recordsboxadmin, @@ -26,8 +46,6 @@ } } - - //查询重置按钮 .submit { background: rgba(0, 129, 255, 0.61); @@ -60,6 +78,7 @@ background: #FF9963; } + //接收报警弹出框 .ant-notification { width: 500px; @@ -149,7 +168,11 @@ #login, #equipmentInfo, #addequipment, -#disposeequipment { +#disposeequipment, +#editupdatecategory, +#detailsupdatecategory, +#editfilecategory, +#detailsfilecategory { nz-input-group, input { @@ -163,37 +186,37 @@ -webkit-border-radius: 0px; -webkit-font-size: 16px !important; } -} -//表格 -#userBox, -#roleBox, -#hostbox { - .ant-table-thead>tr>th { - background: rgba(145, 204, 255, 0.15); - } -} -#hostbox { + .ant-select-selection-item { + background: #143c61; + color: #fff; + } - .ant-table-thead>tr>th, - .ant-table-tbody>tr>td { - text-align: center; + .ant-select-selection-item-remove { + color: #fff; } + } + + @select-background: transparent; @border-color-base: #91CCFF; //日期选择器 -// @input-placeholder-color: #345d85; #recordsboxadmin, #recordsbox, #warningbox, #warningboxadmin, #addequipment, #stationPlanBox, -#disposeequipment { +#disposeequipment, +#editupdatecategory, +#detailsupdatecategory, +#editfilecategory, +#detailsfilecategory, +#inform { ::-webkit-input-placeholder { /* WebKit browsers */ color: #345d85; @@ -201,7 +224,7 @@ //滚动条样式 ::-webkit-scrollbar { - width: 10px; + width: 5px; } ::-webkit-scrollbar-thumb { @@ -227,17 +250,60 @@ color: #36A2FF; } - //日期选择器 - // @input-placeholder-color: #345d85; - .ant-picker-suffix, .ant-picker-input>input { color: rgba(145, 204, 255, 0.95); } +} + +//证件弹出框 +#editupdatecategory, +#detailsupdatecategory, +#editfilecategory, +#detailsfilecategory { + nz-form-item { + margin-bottom: 0; + + input, + select { + color: rgba(145, 204, 255, 0.95) !important; + } + } + + nz-date-picker, + nz-range-picker, + nz-select { + background-color: #143c61; + } + + nz-select { + color: rgba(145, 204, 255, 0.95) !important; + } + .ant-timeline-item-content { + color: rgba(145, 204, 255, 0.95); + } + + .ant-timeline-item-tail { + border-left: 2px solid rgba(196, 226, 252, 0.4); + } + + .ant-timeline-item-head { + border: 0; + background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%); + } } +.cutoffrule { + width: 100%; + height: 1px; + background-color: rgba(196, 226, 252, 0.24); + border: 0; +} + + + #orbox { nz-tree { @@ -250,7 +316,7 @@ } -//input填充100% +//input填充100% --- 油站基本信息页面 #oilStationInfo { nz-form-item { margin-bottom: 0px; @@ -292,8 +358,29 @@ } } +//蓝色 表格 tree +#stationPlanBox, +#inform, +#updateLicense, +#fileLicense, +#histories { + ::-webkit-input-placeholder { + /* WebKit browsers */ + color: #345d85; + } -#stationPlanBox { + //滚动条样式 + ::-webkit-scrollbar { + width: 5px; + } + + ::-webkit-scrollbar-thumb { + background-image: linear-gradient(#2495f8, #1c73c2, #0a3d6a, #061d3c); + } + + ::-webkit-scrollbar-track { + background-color: #061d3c; + } .ant-tree .ant-tree-node-content-wrapper:hover, .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { @@ -301,8 +388,7 @@ } .ant-tree .ant-tree-node-content-wrapper { - padding: 2px 20px; - // margin-left: 30px; + padding: 2px 15px; } nz-tree { @@ -322,7 +408,7 @@ nz-table { flex: 1; - width: 96%; + width: 100%; } .ant-table { @@ -342,6 +428,7 @@ border-bottom: none; padding: 0; color: #23D9FF; + line-height: 28px; } .ant-table-tbody>tr { @@ -350,13 +437,13 @@ border-bottom: 1px solid #0d3761; } - .ant-table-tbody>tr>th { - font-weight: 400; + .ant-table-tbody>tr>td { + font-weight: 300; font-family: synormal; background: none; border-bottom: none; padding: 0; - color: #91CCFF; + color: #C4E2FC; } .look { @@ -381,25 +468,43 @@ } } +//蓝色 表格 tree-通知时间 + +.informTime { + + + + .ant-table-thead>tr { + border: 0px; + box-shadow: none !important; + } + + .ant-table-thead>tr>th { + text-align: center; + border: 1px solid rgba(35, 217, 255, 0.4); + } + + .ant-table-tbody>tr>td { + text-align: center; + } + + +} + +#stationPlanBox { + nz-table { + width: 96%; + } +} .ant-modal-close-x { color: #fff; } - .maxHeightTreeSelect { max-height: 280px; } -.cdk-overlay-pane { - // position: fixed!important; - // top: 47px; - // right: 26px!important; - // left: none!important; - - // width: 88px; -} - .vertical-center-modal { display: flex; align-items: center; @@ -421,3 +526,30 @@ top: 50%; transform: translate(-50%, -50%); } + +.ant-pagination-prev, +.ant-pagination-next { + overflow: hidden; +} + + + + +//管理员界面 ---- 表格 +#userBox, +#roleBox, +#hostbox, +#licenseBox, +#licenseBox2 { + .ant-table-thead>tr>th { + background: rgba(145, 204, 255, 0.15); + } +} + +#hostbox { + + .ant-table-thead>tr>th, + .ant-table-tbody>tr>td { + text-align: center; + } +}
    序号 + {{item.name}} +
    {{key + 1}} + + + + {{i.value.validityType}} + + + + {{i.value}} + + + + / + + +
    +
    + +
    加油站名称 +
    区域所属公司联系人联系电话油站等级经营品类油机数量车道数量油罐容积操作
    +
    + +
    + {{item.stationName}} +
    {{item.locationName}}{{item.companyName}}{{item.leaderName}}{{item.leaderContact}}{{item.stationLevel}}{{item.sellVariety}}{{item.gasStationCount}}{{item.laneCount}} + {{item.tankVolume}} + {{item.tankVolume ? 'm³' : null}} + + 查看 +
    -
    - -
    加油站名称 -
    区域所属公司联系人联系电话油站等级经营品类油机数量车道数量油罐容积操作
    -
    - -
    - {{item.stationName}} -
    {{item.locationName}}{{item.companyName}}{{item.leaderName}}{{item.leaderContact}}{{item.stationLevel}}{{item.sellVariety}}{{item.gasStationCount}}{{item.laneCount}} - {{item.tankVolume}} - {{item.tankVolume ? 'm³' : null}} - - 查看 -
    序号 + {{item.name}} +
    {{key + 1}} + + + + {{i.value.endDate | date:"yyyy-MM-dd"}} + + + + {{i.value}} + + + + + / + + +
    ip
    名称
    档案类证件操作
    {{data.licenseName}} + 编辑 + 删除 +
    角色
    更新类证件办理提醒时间临期提醒时间是否年检操作
    {{data.licenseName}}{{data.handleRemindDays}}天{{data.closingRemindDays}}天{{data.isYearlyCheck ? '是' : '否'}} + 编辑 + 删除 +