|
|
@ -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(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|