Browse Source

证照管理代办

beijing
jongbowen 2 years ago
parent
commit
a5a5bfead7
  1. 4
      proxy.config.json
  2. 94
      src/app/pages/audit/audit-ing/audit-ing.component.html
  3. 54
      src/app/pages/audit/audit-ing/audit-ing.component.scss
  4. 218
      src/app/pages/audit/audit-ing/audit-ing.component.ts

4
proxy.config.json

@ -1,6 +1,6 @@
{ {
"/api": { "/api": {
"target": "https://znaq.sinochemoilmarketing.com/", "target": "http://121.36.37.70:8906/",
"测试1": "http://121.36.37.70:8906/", "测试1": "http://121.36.37.70:8906/",
"测试2": "https://znaq.sinochemoilmarketing.com/", "测试2": "https://znaq.sinochemoilmarketing.com/",
"测试3": "https://gas.anxincloud.cn/", "测试3": "https://gas.anxincloud.cn/",
@ -8,7 +8,7 @@
"changeOrigin": true "changeOrigin": true
}, },
"/signalr": { "/signalr": {
"target": "https://znaq.sinochemoilmarketing.com/", "target": "http://121.36.37.70:8906/",
"secure": false, "secure": false,
"ws": true, "ws": true,
"logLevel": "debug" "logLevel": "debug"

94
src/app/pages/audit/audit-ing/audit-ing.component.html

@ -1,4 +1,97 @@
<div class="box" id="inform"> <div class="box" id="inform">
<div class="search">
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item class="searchParams">
<nz-form-control>
<!-- <nz-select nzAllowClear formControlName="info" nzPlaceHolder="审批类型"
(ngModelChange)="infoChange($event)">
<nz-option *ngIf="!level" nzValue="0" nzLabel="油站信息"></nz-option>
<nz-option *ngIf="level" nzValue="1" nzLabel="经营类证照提醒时间"></nz-option>
<nz-option *ngIf="!level" nzValue="2" nzLabel="经营类证照"></nz-option>
<nz-option *ngIf="!level" nzValue="3" nzLabel="资产类证照"></nz-option>
<nz-option *ngIf="level" nzValue="4" nzLabel="用户信息"></nz-option>
<nz-option *ngIf="level" nzValue="5" nzLabel="预警申诉"></nz-option>
</nz-select> -->
<input nz-input type="text" formControlName="info" placeholder="审批类型">
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams searchParamsLong">
<nz-form-control>
<nz-select nzAllowClear formControlName="type" nzPlaceHolder="审批信息" [nzLoading]="typeLoading">
<nz-option nzValue="0" nzLabel="油站信息"></nz-option>
<nz-option nzValue="1" nzLabel="经营类证照提醒时间"></nz-option>
<nz-option nzValue="2" nzLabel="经营类证照"></nz-option>
<nz-option nzValue="3" nzLabel="资产类证照"></nz-option>
<nz-option nzValue="4" nzLabel="用户信息"></nz-option>
<nz-option nzValue="5" nzLabel="预警申诉"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams searchParamsLong">
<nz-form-control>
<nz-tree-select [nzAllowClear]="false" [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch
formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构"
[nzExpandedIcon]="multiExpandedIconTpl">
</nz-tree-select>
<ng-template #multiExpandedIconTpl let-node let-origin="origin">
<ng-container *ngIf="node.children.length == 0; else elseTemplate">
</ng-container>
<ng-template #elseTemplate>
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'"
class="ant-tree-switcher-line-icon"></i>
</ng-template>
</ng-template>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams searchParams2">
<nz-form-control>
<nz-range-picker [nzAllowClear]="false" formControlName="datePicker"></nz-range-picker>
<br />
</nz-form-control>
</nz-form-item>
<!-- <nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear formControlName="level" nzPlaceHolder="审批级别">
<nz-option nzValue="1" nzLabel="总公司"></nz-option>
<nz-option nzValue="2" nzLabel="省公司"></nz-option>
<nz-option nzValue="3" nzLabel="区域"></nz-option>
<nz-option nzValue="4" nzLabel="油站"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item> -->
<!-- <nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear formControlName="state" nzPlaceHolder="审批状态">
<nz-option nzValue="2" nzLabel="审核中"></nz-option>
<nz-option nzValue="2" nzLabel="审核通过"></nz-option>
<nz-option nzValue="3" nzLabel="审核驳回"></nz-option>
<nz-option nzValue="4" nzLabel="已撤销审核"></nz-option>
<nz-option nzValue="5" nzLabel="审核完成"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item> -->
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="submit" class="submit" [nzLoading]="tableSpin"><i nz-icon
[nzType]="'search'"></i>查询</button>
</nz-form-control>
</nz-form-item>
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="button" class="reset" (click)="resetForm($event)" [nzLoading]="tableSpin"><i
nz-icon [nzType]="'sync'"></i>重置</button>
</nz-form-control>
</nz-form-item>
</form>
</div>
<div class="tablebox" id="tablebox"> <div class="tablebox" id="tablebox">
<nz-table *ngIf="tableScrollHeight" [nzLoading]="tableSpin" [nzPageSize]='9999' #headerTable [nzData]="list" <nz-table *ngIf="tableScrollHeight" [nzLoading]="tableSpin" [nzPageSize]='9999' #headerTable [nzData]="list"
[nzShowPagination]="false" [nzScroll]="{ y:tableScrollHeight }" [nzNoResult]='null' nzTableLayout="fixed"> [nzShowPagination]="false" [nzScroll]="{ y:tableScrollHeight }" [nzNoResult]='null' nzTableLayout="fixed">
@ -28,6 +121,7 @@
<span *ngIf="item.auditType == 2">经营类证照</span> <span *ngIf="item.auditType == 2">经营类证照</span>
<span *ngIf="item.auditType == 3">资产类证照</span> <span *ngIf="item.auditType == 3">资产类证照</span>
<span *ngIf="item.auditType == 4">用户信息</span> <span *ngIf="item.auditType == 4">用户信息</span>
<span *ngIf="item.auditType == 5">预警申诉</span>
</td> </td>
<td *ngIf="level != 1 "><label *ngIf="item.gasStation">{{item.gasStation.stationName}}</label></td> <td *ngIf="level != 1 "><label *ngIf="item.gasStation">{{item.gasStation.stationName}}</label></td>
<td *ngIf="level != 1 "><label *ngIf="item.gasStation">{{item.gasStation.locationName}}</label></td> <td *ngIf="level != 1 "><label *ngIf="item.gasStation">{{item.gasStation.locationName}}</label></td>

54
src/app/pages/audit/audit-ing/audit-ing.component.scss

@ -2,7 +2,61 @@
width: 100%; width: 100%;
height: 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;
}
input {
background: none;
border: 1px solid #91ccff;
color: #fff;
}
.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 { .tablebox {
width: 100%; width: 100%;
height: 100%; height: 100%;

218
src/app/pages/audit/audit-ing/audit-ing.component.ts

@ -1,4 +1,5 @@
import { HttpClient } from "@angular/common/http"; import { HttpClient } from "@angular/common/http";
import { FormBuilder, FormGroup } from "@angular/forms";
import { Component, ElementRef, OnInit, ViewContainerRef } from "@angular/core"; import { Component, ElementRef, OnInit, ViewContainerRef } from "@angular/core";
import { NzMessageService } from "ng-zorro-antd/message"; import { NzMessageService } from "ng-zorro-antd/message";
import { NzModalService } from "ng-zorro-antd/modal"; import { NzModalService } from "ng-zorro-antd/modal";
@ -11,6 +12,7 @@ import { GasBaseInfoComponent } from "../gas-base-info/gas-base-info.component";
import { AppealDetailsComponent } from "./appeal-details/appeal-details.component"; import { AppealDetailsComponent } from "./appeal-details/appeal-details.component";
import { AuditDisposeComponent } from "./audit-dispose/audit-dispose.component"; import { AuditDisposeComponent } from "./audit-dispose/audit-dispose.component";
import { UserDetailsComponent } from "./user-details/user-details.component"; import { UserDetailsComponent } from "./user-details/user-details.component";
import { TreeService } from "src/app/service/tree.service";
@Component({ @Component({
selector: "app-audit-ing", selector: "app-audit-ing",
@ -23,15 +25,18 @@ export class AuditIngComponent implements OnInit {
private viewContainerRef: ViewContainerRef, private viewContainerRef: ViewContainerRef,
private http: HttpClient, private http: HttpClient,
private message: NzMessageService, private message: NzMessageService,
private element: ElementRef private element: ElementRef,
private toTree: TreeService,
private fb: FormBuilder
) {} ) {}
tableSpin = false; tableSpin = false;
validateForm!: FormGroup;
tableScrollHeight; tableScrollHeight;
resizeListener; resizeListener;
startdate;
enddate;
level; level;
ngOnInit(): void { async ngOnInit(): Promise<void> {
this.tableScrollHeight = "100px"; this.tableScrollHeight = "100px";
// 页面监听 // 页面监听
this.resizeListener = fromEvent(window, "resize") this.resizeListener = fromEvent(window, "resize")
@ -47,6 +52,41 @@ export class AuditIngComponent implements OnInit {
10 + 10 +
"px"; "px";
}); });
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 * 29); //最后一个数字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.warningType();
this.getStationList(); this.getStationList();
this.level = JSON.parse( this.level = JSON.parse(
@ -88,12 +128,24 @@ export class AuditIngComponent implements OnInit {
this.tableSpin = true; this.tableSpin = true;
let data = JSON.parse(sessionStorage.getItem("userdata")); let data = JSON.parse(sessionStorage.getItem("userdata"));
let params = { let params = {
OrganizationUnitId: data.organization.id || "", OrganizationUnitId: this.validateForm.value.organization
? data.organization.id
: this.validateForm.value.organization,
IsContainsChildren: "true", IsContainsChildren: "true",
AuditStatuses: "1", AuditStatuses: "1",
AuditType:this.validateForm.value.type,
AuditTitle:this.validateForm.value.info,
StartTime: this.validateForm.value.datePicker
? this.validateForm.value.datePicker[0]
: null,
EndTime: this.validateForm.value.datePicker
? this.validateForm.value.datePicker[1] + ' 23:59:59'
: null,
SkipCount: this.SkipCount, SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount, MaxResultCount: this.MaxResultCount,
}; };
console.log(params,1557);
this.http this.http
.get(`/api/services/app/ContentAuditLog/GetAuditting`, { params }) .get(`/api/services/app/ContentAuditLog/GetAuditting`, { params })
.subscribe((info: any) => { .subscribe((info: any) => {
@ -262,4 +314,160 @@ export class AuditIngComponent implements OnInit {
}); });
}); });
} }
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.getStationList();
}
//证照类型
typeLoading;
typeList;
typeListOfUsers;
typeListOfStationData;
typeListOfUpdate;
typeListOfFile;
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) => {
// console.log('审批类型', result)
this.typeListOfUsers = [{ licenseName: "用户信息" }];
this.typeListOfStationData = [{ licenseName: "油站信息" }];
this.typeListOfUpdate = result[0].result.items;
this.typeListOfFile = result[1].result.items;
this.typeList = [
...this.typeListOfUsers,
...this.typeListOfStationData,
...this.typeListOfUpdate,
...this.typeListOfFile,
];
this.typeLoading = false;
})
.catch((error) => {});
}
warningTypesDetails;
warningTypesDetailsCopy;
//获得所有预警事件
warningType() {
this.http
.get("/api/services/app/Violation/GetAllList")
.subscribe((data: any) => {
data.result = data.result.filter((item) => {
return (
item.eventSystemName != "设备报废临期提醒" &&
item.eventSystemName != "设备维保临期提醒" &&
item.eventSystemName != "证照有效期办理提醒" &&
item.eventSystemName != "证照有效期临期提醒" &&
item.eventSystemName != "证照年检办理提醒" &&
item.eventSystemName != "证照年检临期提醒"
);
});
this.warningTypesDetails = JSON.parse(JSON.stringify(data.result));
this.warningTypesDetailsCopy = JSON.parse(JSON.stringify(data.result)); //原始数据备份
// console.log('所有预警事件', this.warningTypesDetailsCopy)
});
}
infoChange(e) {
if (e == "0") {
this.typeList = this.typeListOfStationData;
} else if (e == "1") {
this.typeList = this.typeListOfUpdate;
} else if (e == "2") {
this.typeList = this.typeListOfUpdate;
} else if (e == "3") {
this.typeList = this.typeListOfFile;
} else if (e == "4") {
this.typeList = this.typeListOfUsers;
} else if (e == "5") {
this.typeList = [...this.warningTypesDetailsCopy];
} else {
this.typeList = [
...this.typeListOfStationData,
...this.typeListOfUpdate,
...this.typeListOfFile,
];
}
}
//获取所有组织机构
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);
});
});
}
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.getStationList();
}
} }

Loading…
Cancel
Save