@@ -51,7 +76,8 @@
-
+
{{i.value.endDate | date:"yyyy-MM-dd"}}
diff --git a/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss b/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss
index 06cfc17..f97ff1c 100644
--- a/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss
+++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.scss
@@ -1,10 +1,16 @@
+.box {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+}
+
.search {
box-sizing: border-box;
- padding-left: 38px;
- padding-right: 35px;
+ padding-right: 5px;
width: 100%;
height: 32px;
- margin: 12px 0;
+ margin-bottom: 12px;
display: flex;
justify-content: space-between;
align-items: center;
@@ -41,7 +47,8 @@
}
.searchParams {
- width: 35%;
+ width: 30%;
+ margin-left: 16px;
}
.btn {
@@ -50,12 +57,6 @@
}
}
-.box {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
-}
.tablebox {
flex: 1;
diff --git a/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts b/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts
index 82abbfe..cf7e484 100644
--- a/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts
+++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts
@@ -11,6 +11,7 @@ import { debounceTime } from 'rxjs/operators';
import 'linqjs';
import { DetailsUpdateCategoryComponent } from '../../license/update-category/details-update-category/details-update-category.component';
import { NzModalService } from 'ng-zorro-antd/modal';
+import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
selector: 'app-update-license-list',
templateUrl: './update-license-list.component.html',
@@ -19,29 +20,64 @@ import { NzModalService } from 'ng-zorro-antd/modal';
export class UpdateLicenseListComponent implements OnInit {
validateForm!: FormGroup;
- constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router) { }
+ constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router, private message: NzMessageService) { }
tableScrollHeight
- ngOnInit(): void {
+ async ngOnInit(): Promise {
- this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
-
- console.log('tableScrollHeight', this.tableScrollHeight)
+ this.tableScrollHeight = '100px'
// 页面监听
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
- this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px'
});
+
+
this.validateForm = this.fb.group({
+ organization: [null],
name: [null]
});
this.tableSpin = true
+ await this.getAllOrganization()
+ this.getStationLicenses()
+
+ }
+
+ //获取所有组织机构
+ nodes: any = []
+ async getAllOrganization() {
+ let OrganizationUnitId = JSON.parse(sessionStorage.getItem('userdata')).organization.id
+ let params = {
+ OrganizationUnitId: OrganizationUnitId,
+ IsContainsChildren: "true"
+ }
+ await new Promise((resolve, reject) => {
+ this.http.get('/api/services/app/Organization/GetAll', {
+ params: params
+ }).subscribe((data: any) => {
+ data.result.items.forEach(element => {
+ if (element.id == OrganizationUnitId) {
+ element.parentId = null
+ }
+ element.key = element.id
+ element.title = element.displayName
+ });
+ this.nodes = [...this.toTree.toTree(data.result.items)]
+ this.validateForm.patchValue({
+ organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id,
+ });
+ resolve(data)
+ })
+ })
+
}
- ngAfterViewInit(): void {
+
+ ngAfterViewInit(): void {
fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe(async (event: any) => { //监听 DOM 滚动事件
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) {
if (this.totalCount > this.list.length) {
@@ -71,6 +107,9 @@ export class UpdateLicenseListComponent implements OnInit {
}
this.list = []
this.SkipCount = '0'
+ this.validateForm.patchValue({
+ organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id,
+ });
this.getStationLicenses()
}
@@ -79,17 +118,14 @@ export class UpdateLicenseListComponent implements OnInit {
//获取点击组织机构的所有加油站
SkipCount: string = '0'
MaxResultCount: string = '100'
-
- orId
list: any = []
async getStationLicenses() {
let params = {
StationName: this.validateForm.value.name,
- OrganizationUnitId: String(sessionStorage.getItem('planAdminOrid')),
+ OrganizationUnitId: this.validateForm.value.organization,
IsContainsChildren: 'true',
SkipCount: this.SkipCount,
- MaxResultCount: this.MaxResultCount,
- // Sorting: ' BuildingBasicInfo.Id asc'
+ MaxResultCount: this.MaxResultCount
}
this.tableSpin = true
await new Promise((resolve, reject) => {
@@ -122,22 +158,21 @@ export class UpdateLicenseListComponent implements OnInit {
}
let atLastArr = newArr.concat(newElement);
arr.push(atLastArr)
-
+ setTimeout(() => {
+ let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px'
+ }, 0);
});
+ setTimeout(() => {
+ let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px'
+ }, 0);
this.list = this.list.concat(arr);
this.list = [...this.list]
console.log('证照表格', this.list)
this.tableSpin = false
-
- setTimeout(() => {
- let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight
- this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px'
- }, 0);
-
-
-
resolve(data)
})
})
@@ -154,7 +189,7 @@ export class UpdateLicenseListComponent implements OnInit {
let params = {
Id: i.licenseId
}
- this.http.get('/api/services/app/StationValidityLicense/Get', { params: params }).subscribe((data:any) => {
+ this.http.get('/api/services/app/StationValidityLicense/Get', { params: params }).subscribe((data: any) => {
console.log('证照信息', data)
const modal = this.modal.create({
nzContent: DetailsUpdateCategoryComponent,
@@ -182,4 +217,31 @@ export class UpdateLicenseListComponent implements OnInit {
}
+
+
+
+ exportExcel() {
+ // console.log(this.validateForm)
+ const httpOptions = {
+ responseType: 'blob' as 'json',
+ params: {
+ OrganizationUnitId: this.validateForm.value.organization
+ }
+ };
+ this.http.get(`/api/services/app/StationValidityLicense/ExportStationLicenses`, httpOptions).subscribe((data: any) => {
+ // console.log('导出成功')
+ // 文件名中有中文 则对文件名进行转码
+ const link = document.createElement('a');
+ const blob = new Blob([data], { type: 'application/vnd.ms-excel' });
+ link.setAttribute('href', window.URL.createObjectURL(blob));
+ link.setAttribute('download', '经营类证照' + '.xls');
+ link.style.visibility = 'hidden';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ this.message.create('success', `导出成功`);
+ }, err => {
+ this.message.create('error', `导出失败`);
+ })
+ }
}
diff --git a/src/app/system-management/file-of-license/file-of-license.component.html b/src/app/system-management/file-of-license/file-of-license.component.html
index f226ca6..0b62c81 100644
--- a/src/app/system-management/file-of-license/file-of-license.component.html
+++ b/src/app/system-management/file-of-license/file-of-license.component.html
@@ -1,7 +1,7 @@
- 资产类证件列表
+ 资产类证照列表
- 资产类证件
+ 资产类证照
操作
diff --git a/src/app/system-management/update-of-license/update-of-license.component.html b/src/app/system-management/update-of-license/update-of-license.component.html
index 63f540c..6e8c812 100644
--- a/src/app/system-management/update-of-license/update-of-license.component.html
+++ b/src/app/system-management/update-of-license/update-of-license.component.html
@@ -1,7 +1,7 @@
- 更新类证件列表
+ 经营类证照列表
- 更新类证件
+ 经营类证照
办理提醒时间
临期提醒时间
办理类型
diff --git a/src/theme.less b/src/theme.less
index b73127c..cce0456 100644
--- a/src/theme.less
+++ b/src/theme.less
@@ -377,7 +377,8 @@
#inform,
#updateLicense,
#fileLicense,
-#histories {
+#histories,
+#statisticsList {
::-webkit-input-placeholder {
/* WebKit browsers */
color: #345d85;
@@ -480,6 +481,11 @@
.ant-table-tbody>tr>td:hover {
background: none;
}
+
+ .ant-select,
+ .ant-select-arrow {
+ color: #fff;
+ }
}
//蓝色 表格 tree-通知时间