Browse Source

[新增]多组织机构获取

test-assets
邵佳豪 6 months ago
parent
commit
697f701d5f
  1. 5
      proxy.config.json
  2. 14
      src/app/pages/audit/audit-ing/audit-ing.component.ts
  3. 494
      src/app/pages/audit/audit-record/audit-record.component.ts
  4. 2
      src/app/pages/home-page/home-page.component.ts
  5. 14
      src/app/pages/plan-admin/file-license-list/file-license-list.component.ts
  6. 230
      src/app/pages/plan-admin/plan-admin.component.ts
  7. 17
      src/app/pages/plan-admin/update-license-list/update-license-list.component.ts
  8. 24
      src/app/pages/records/criminal-records-admin/criminal-records-admin.component.ts
  9. 26
      src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts
  10. 1013
      src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts
  11. 4
      src/app/pages/singlelogin/singlelogin.component.ts
  12. 26
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  13. 21
      src/app/system-management/algorithm-config/algorithm-config.component.ts
  14. 384
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
  15. 28
      src/app/system-management/or-binding/or-binding-model/or-binding-model.component.ts
  16. 29
      src/app/system-management/organization/organization.component.ts
  17. 29
      src/app/system-management/user-binding/binding/binding.component.ts
  18. 122
      src/app/system-management/user/adduser/adduser.component.ts
  19. 24
      src/app/system-management/user/edituser/edituser.component.ts
  20. 8
      src/app/system-management/user/user.component.html
  21. 29
      src/app/system-management/user/user.component.ts
  22. 12
      src/theme.less

5
proxy.config.json

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

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

@ -438,8 +438,10 @@ export class AuditIngComponent implements OnInit {
async getAllOrganization() {
let OrganizationUnitId = JSON.parse(sessionStorage.getItem("userdata"))
.organization.id;
let OrganizationUnitIds = JSON.parse(
sessionStorage.getItem("userdata")
).organizations.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
await new Promise((resolve, reject) => {
@ -449,8 +451,14 @@ export class AuditIngComponent implements OnInit {
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (element.id == OrganizationUnitId) {
element.parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;

494
src/app/pages/audit/audit-record/audit-record.component.ts

@ -1,42 +1,60 @@
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 { AppealDetailsComponent } from '../audit-ing/appeal-details/appeal-details.component';
import { UserDetailsComponent } from '../audit-ing/user-details/user-details.component';
import { GasBaseInfoComponent } from '../gas-base-info/gas-base-info.component';
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 { AppealDetailsComponent } from "../audit-ing/appeal-details/appeal-details.component";
import { UserDetailsComponent } from "../audit-ing/user-details/user-details.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']
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) { }
constructor(
private element: ElementRef,
private modal: NzModalService,
private viewContainerRef: ViewContainerRef,
private toTree: TreeService,
private http: HttpClient,
private fb: FormBuilder
) {}
list = []
level = false
tableScrollHeight
resizeListener
startdate
enddate
list = [];
level = false;
tableScrollHeight;
resizeListener;
startdate;
enddate;
async ngOnInit(): Promise<void> {
if (JSON.parse(sessionStorage.getItem('userdata')).organization.level == 1) {
this.level = true
if (
JSON.parse(sessionStorage.getItem("userdata")).organization.level == 1
) {
this.level = true;
}
this.tableScrollHeight = '100px'
this.tableScrollHeight = "100px";
// 页面监听
this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px'
});
this.resizeListener = fromEvent(window, "resize")
.pipe(debounceTime(100))
.subscribe((event) => {
let tableHeader =
this.element.nativeElement.querySelector(
`.ant-table-header`
).clientHeight;
this.tableScrollHeight =
document.getElementById("tablebox").clientHeight -
tableHeader -
10 +
"px";
});
this.validateForm = this.fb.group({
type: [null],
info: [null],
@ -50,172 +68,214 @@ export class AuditRecordComponent implements OnInit {
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);//当前日期
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 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.getRecordList()
this.startdate =
lastY +
"-" +
(lastM < 10 ? "0" + lastM : lastM) +
"-" +
(lastD < 10 ? "0" + lastD : lastD); //三十天之前日期
this.getTypeList();
await this.getAllOrganization();
this.getRecordList();
this.warningType()
this.warningType();
}
ngOnDestroy(): void {
this.resizeListener.unsubscribe()
this.resizeListener.unsubscribe();
}
submitForm(): void {
if (this.validateForm.value.datePicker[0].toLocaleDateString) {
this.validateForm.value.datePicker[0] = 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.validateForm.value.datePicker[1] =
this.validateForm.value.datePicker[1].toLocaleDateString();
}
this.list = []
this.SkipCount = '0'
this.getRecordList()
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,
organization: JSON.parse(sessionStorage.getItem("userdata")).organization
.id,
datePicker: [this.startdate, this.enddate],
});
this.list = []
this.SkipCount = '0'
this.getRecordList()
this.list = [];
this.SkipCount = "0";
this.getRecordList();
}
//获取所有组织机构
nodes: any = []
nodes: any = [];
async getAllOrganization() {
let OrganizationUnitId = JSON.parse(sessionStorage.getItem('userdata')).organization.id
let OrganizationUnitId = JSON.parse(sessionStorage.getItem("userdata"))
.organization.id;
let OrganizationUnitIds = JSON.parse(
sessionStorage.getItem("userdata")
).organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true"
}
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],
this.http
.get("/api/services/app/Organization/GetAll", {
params: params,
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
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);
});
resolve(data)
})
})
});
}
//证照类型
typeLoading
typeList
typeLoading;
typeList;
typeListOfUsers
typeListOfStationData
typeListOfUpdate
typeListOfFile
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 => {
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)
}
})
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) => {
})
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
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.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)
})
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]
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]
this.typeList = [
...this.typeListOfStationData,
...this.typeListOfUpdate,
...this.typeListOfFile,
];
}
}
//历史记录列表
totalCount//列表总数
tableSpin = true
SkipCount: string = '0'
MaxResultCount: string = '50'
totalCount; //列表总数
tableSpin = true;
SkipCount: string = "0";
MaxResultCount: string = "50";
getRecordList() {
this.tableSpin = true
let endTime = this.validateForm.value.datePicker[1] + ' 23:59:59'
console.log('结束时间', endTime)
this.tableSpin = true;
let endTime = this.validateForm.value.datePicker[1] + " 23:59:59";
console.log("结束时间", endTime);
let params = {
IsContainsChildren: 'true',
IsContainsChildren: "true",
OrganizationUnitId: this.validateForm.value.organization,
AuditTitle: this.validateForm.value.type,
AuditType: this.validateForm.value.info,
@ -226,119 +286,145 @@ export class AuditRecordComponent implements OnInit {
Sorting: null,
SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount,
}
this.http.get('/api/services/app/ContentAuditLog/GetHistory', { params }).subscribe((data: any) => {
data.result.items.forEach(element => {
element.itemData = JSON.parse(element.itemData)
};
this.http
.get("/api/services/app/ContentAuditLog/GetHistory", { params })
.subscribe((data: any) => {
data.result.items.forEach((element) => {
element.itemData = JSON.parse(element.itemData);
});
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 -
10 +
"px";
}, 0);
});
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 - 10) + 'px'
}, 0);
})
}
details(item) {
console.log('点击的item', item)
let component
console.log("点击的item", item);
let component;
if (item.auditType == 0) {
component = GasBaseInfoComponent
component = GasBaseInfoComponent;
} else if (item.auditType == 1) {
component = AuditDetailsInformTimeComponent
component = AuditDetailsInformTimeComponent;
} else if (item.auditType == 2) {
component = DetailsUpdateCategoryComponent
component = DetailsUpdateCategoryComponent;
} else if (item.auditType == 4) {
component = UserDetailsComponent
component = UserDetailsComponent;
} else if (item.auditType == 5) {
component = AppealDetailsComponent
component = AppealDetailsComponent;
} else if (item.auditType) {
component = DetailsFileCategoryComponent
component = DetailsFileCategoryComponent;
}
this.getData(item).then(res => {
item.getData = res
this.getData(item).then((res) => {
item.getData = res;
if (item.auditType == 1) {
item.getData.organization = item.organization
item.getData.organization = item.organization;
}
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)'
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',
top: "50px",
},
nzComponentParams: {
data: item.getData,
},
nzKeyboard:false,
nzKeyboard: false,
nzFooter: null,
nzClosable: false,
});
})
});
}
//获取证照类data
getData(item) {
let url
if (item.auditType == 0) { //油站基本信息
let url;
if (item.auditType == 0) {
//油站基本信息
return new Promise((resolve, reject) => {
let organization = { organizationId: item.organizationId }
resolve(organization)
})
let organization = { organizationId: item.organizationId };
resolve(organization);
});
} else if (item.auditType == 1) {
url = '/api/services/app/OrganizationValidityLicenseRule/Get'
url = "/api/services/app/OrganizationValidityLicenseRule/Get";
} else if (item.auditType == 2) {
url = '/api/services/app/StationValidityLicense/Get'
url = "/api/services/app/StationValidityLicense/Get";
} else if (item.auditType == 4) {
url = '/api/services/app/EdittingUser/Get'
url = "/api/services/app/EdittingUser/Get";
} else if (item.auditType == 5) {
return new Promise((resolve, reject) => {
resolve(item)
})
resolve(item);
});
} else if (item.auditType) {
url = '/api/services/app/StationFileLicense/Get'
url = "/api/services/app/StationFileLicense/Get";
}
return new Promise((resolve, reject) => {
let params = { id: item.itemId }
let params = { id: item.itemId };
this.http.get(url, { params }).subscribe((data: any) => {
let auditLog = { rejectReason: item.rejectReason }
let organization = { displayName: item.organization ? item.organization.displayName : "" }
let auditLog = { rejectReason: item.rejectReason };
let organization = {
displayName: item.organization ? item.organization.displayName : "",
};
if (item.auditType == 1) {
data.result.auditLog = auditLog
data.result.organization = organization
data.result.handleRemindDaysDefault = data.result.licenseType.handleRemindDays
data.result.closingRemindDaysDefault = data.result.licenseType.closingRemindDays
data.result.auditLog = auditLog;
data.result.organization = organization;
data.result.handleRemindDaysDefault =
data.result.licenseType.handleRemindDays;
data.result.closingRemindDaysDefault =
data.result.licenseType.closingRemindDays;
}
if (item.auditType == 2 || item.auditType == 3) {
data.result.auditLogId = item.id
data.result.auditLogId = item.id;
}
if (item.auditType == 4) {
data.result.auditLog = auditLog
data.result.auditLog = auditLog;
}
resolve(data.result)
})
})
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()
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();
}
}
}
});
});
}
}

2
src/app/pages/home-page/home-page.component.ts

@ -801,7 +801,7 @@ export class HomePageComponent implements OnInit {
? (this.isSpinOfEventWarning = true)
: (this.isSpinOfOilDischarge = true);
let params = {
OrganizationUnitId: this.organizationUnitId,
// OrganizationUnitId: this.organizationUnitId,
IsContainsChildren: true,
ViolationTypes: type ? data : null,
EventSystemNames: type ? null : data,

14
src/app/pages/plan-admin/file-license-list/file-license-list.component.ts

@ -88,8 +88,10 @@ export class FileLicenseListComponent implements OnInit {
async getAllOrganization() {
let OrganizationUnitId = JSON.parse(sessionStorage.getItem("userdata"))
.organization.id;
let OrganizationUnitIds = JSON.parse(
sessionStorage.getItem("userdata")
).organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
await new Promise((resolve, reject) => {
@ -99,8 +101,14 @@ export class FileLicenseListComponent implements OnInit {
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (element.id == OrganizationUnitId) {
element.parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;

230
src/app/pages/plan-admin/plan-admin.component.ts

@ -1,161 +1,181 @@
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';
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';
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";
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']
selector: "app-plan-admin",
templateUrl: "./plan-admin.component.html",
styleUrls: ["./plan-admin.component.scss"],
})
export class PlanAdminComponent implements OnInit {
@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) { }
@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
) {}
ngOnInit(): void {
this.getAllOrganization()
this.getAllOrganization();
}
//选择右侧tab页
selectedTab = 0
selectedTab = 0;
selectTab(index) {
this.selectedTab = index
this.selectedTab = index;
if (this.selectedTab == 0) {
setTimeout(() => {
this.oilStationListComponent.list = []
this.oilStationListComponent.SkipCount = '0'
this.oilStationListComponent.onChildMethod()
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()
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()
this.fileLicenseListComponent.list = [];
this.fileLicenseListComponent.SkipCount = "0";
this.fileLicenseListComponent.onChildMethod();
}, 0);
}
}
//获取所有组织机构
nodes: any = []
nzExpandAll = false
nzSelectedKeys: any = []
orSpin: boolean = false
organization: any
nodes: any = [];
nzExpandAll = false;
nzSelectedKeys: any = [];
orSpin: boolean = false;
organization: any;
getAllOrganization() {
this.orSpin = true
let OrganizationUnitId = JSON.parse(sessionStorage.getItem('userdata')).organization.id
this.orSpin = true;
let OrganizationUnitId = 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 = data.result.items.filter((item, i) => {
return !item.isGasStation
// OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
this.http
.get("/api/services/app/Organization/GetAll", {
params: params,
})
this.organization = data.result.items
this.getStationsNum(data.result.items)
})
.subscribe((data: any) => {
data.result.items = data.result.items.filter((item, i) => {
return !item.isGasStation;
});
this.organization = data.result.items;
this.getStationsNum(data.result.items);
});
}
//获得组织机构下有多少油站
stationsList
stationsList;
getStationsNum(e) {
let OrganizationUnitId = JSON.parse(sessionStorage.getItem('userdata')).organization.id
this.http.get('/api/services/app/GasStation/GetCountsByOrganizations?IsContainsChildren=true').subscribe((data: any) => {
this.stationsList = data.result
const arrs = e.map(item => {
const data = this.stationsList.find(i => item.id == i.organizationId)
return {
...item,
products: data ? data : false
}
})
for (let index = 0; index < arrs.length; index++) {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null
let OrganizationUnitId = JSON.parse(sessionStorage.getItem("userdata"))
.organization.id;
let OrganizationUnitIds = JSON.parse(
sessionStorage.getItem("userdata")
).organizations.map((v) => v.id);
this.http
.get(
"/api/services/app/GasStation/GetCountsByOrganizations?IsContainsChildren=true"
)
.subscribe((data: any) => {
this.stationsList = data.result;
const arrs = e.map((item) => {
const data = this.stationsList.find(
(i) => item.id == i.organizationId
);
return {
...item,
products: data ? data : false,
};
});
for (let index = 0; index < arrs.length; index++) {
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(arrs[index].id)) {
arrs[index].parentId = null;
}
} else {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
}
}
arrs[index].title = arrs[index].displayName;
arrs[index].key = arrs[index].id;
}
arrs[index].title = arrs[index].displayName
arrs[index].key = arrs[index].id
}
this.orSpin = false
this.nodes = [...this.toTree.toTree(arrs)]
this.nzExpandedKeys = [OrganizationUnitId]
this.nzSelectedKeys = [OrganizationUnitId]
sessionStorage.setItem('planAdminOrid', OrganizationUnitId)
this.oilStationListComponent.onChildMethod()
})
this.orSpin = false;
this.nodes = [...this.toTree.toTree(arrs)];
console.log("树形结构", this.nodes);
this.nzExpandedKeys = [OrganizationUnitId];
this.nzSelectedKeys = [OrganizationUnitId];
sessionStorage.setItem("planAdminOrid", OrganizationUnitId);
this.oilStationListComponent.onChildMethod();
});
}
nzExpandedKeys: any = []
nzExpandedKeys: any = [];
activatedNode?: NzTreeNode;
//点击tree节点
activeNode(data: NzFormatEmitEvent): void {
this.activatedNode = data.node!;
sessionStorage.setItem('planAdminOrid', data.node.origin.id)
sessionStorage.setItem("planAdminOrid", data.node.origin.id);
if (this.selectedTab == 0) {
setTimeout(() => {
this.oilStationListComponent.list = []
this.oilStationListComponent.SkipCount = '0'
this.oilStationListComponent.onChildMethod()
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()
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()
this.fileLicenseListComponent.list = [];
this.fileLicenseListComponent.SkipCount = "0";
this.fileLicenseListComponent.onChildMethod();
}, 0);
}
}
expand(e, node) {
e.stopPropagation()
node.isExpanded = !node.isExpanded
e.stopPropagation();
node.isExpanded = !node.isExpanded;
}
}

17
src/app/pages/plan-admin/update-license-list/update-license-list.component.ts

@ -84,8 +84,11 @@ export class UpdateLicenseListComponent implements OnInit {
async getAllOrganization() {
let OrganizationUnitId = JSON.parse(sessionStorage.getItem("userdata"))
.organization.id;
let OrganizationUnitIds = JSON.parse(
sessionStorage.getItem("userdata")
).organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
await new Promise((resolve, reject) => {
@ -95,8 +98,14 @@ export class UpdateLicenseListComponent implements OnInit {
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (element.id == OrganizationUnitId) {
element.parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;
@ -287,7 +296,7 @@ export class UpdateLicenseListComponent implements OnInit {
},
nzFooter: null,
nzClosable: false,
nzKeyboard:false,
nzKeyboard: false,
nzOnOk: async () => {},
});
const instance = modal.getContentComponent();

24
src/app/pages/records/criminal-records-admin/criminal-records-admin.component.ts

@ -476,13 +476,15 @@ export class CriminalRecordsAdminComponent implements OnInit {
//获取所有组织机构
nodes: any = [];
getAllOrganization() {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
this.http
@ -491,8 +493,14 @@ export class CriminalRecordsAdminComponent implements OnInit {
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (element.id == OrganizationUnitId) {
element.parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;

26
src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts

@ -143,7 +143,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
let nowY = myDate.getFullYear();
let nowM = myDate.getMonth() + 1;
let nowD = myDate.getDate();
this.enddate =
nowY +
"-" +
@ -698,13 +698,15 @@ export class OilUnloadingProcessListComponent implements OnInit {
//获取所有组织机构
nodes: any = [];
getAllOrganization() {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
this.http
@ -713,8 +715,14 @@ export class OilUnloadingProcessListComponent implements OnInit {
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (element.id == OrganizationUnitId) {
element.parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;

1013
src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts

File diff suppressed because it is too large Load Diff

4
src/app/pages/singlelogin/singlelogin.component.ts

@ -93,6 +93,7 @@ export class SingleloginComponent implements OnInit {
resolve();
},
(err) => {
alert("token无效");
reject();
}
);
@ -114,6 +115,7 @@ export class SingleloginComponent implements OnInit {
resolve();
},
(err) => {
alert("token无效");
reject();
}
);
@ -162,7 +164,7 @@ export class SingleloginComponent implements OnInit {
resolve();
},
(err) => {
alert("未绑定本地用户!");
alert("SinochemLogin失败");
reject();
}
);

26
src/app/pages/today-warning-admin/today-warning-admin.component.ts

@ -183,13 +183,15 @@ export class TodayWarningAdminComponent implements OnInit {
//获取所有组织机构
nodes: any = [];
getAllOrganization() {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
this.http
@ -198,8 +200,14 @@ export class TodayWarningAdminComponent implements OnInit {
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (element.id == OrganizationUnitId) {
element.parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;
@ -245,7 +253,7 @@ export class TodayWarningAdminComponent implements OnInit {
ViolateTime = [
"2023-9-1",
moment(this.validateForm.value.datePickerEnd).format("yyyy-MM-DD"),
];
];
} else {
this.validateForm.value.datePickerEnd &&
this.validateForm.value.datePickerStart

21
src/app/system-management/algorithm-config/algorithm-config.component.ts

@ -51,7 +51,6 @@ export class AlgorithmConfigComponent implements OnInit {
organizationList; //组织机构列表
getAllOrganization() {
let params = {
OrganizationUnitId: this.OrganizationUnitId,
IsContainsChildren: "true",
};
this.http
@ -73,6 +72,14 @@ export class AlgorithmConfigComponent implements OnInit {
nzExpandedKeys = [];
nzSelectedKeys: any[] = [];
getStationsNum(e) {
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
this.http
.get(
"/api/services/app/GasStation/GetCountsByOrganizations?IsContainsChildren=true"
@ -90,8 +97,14 @@ export class AlgorithmConfigComponent implements OnInit {
});
for (let index = 0; index < arrs.length; index++) {
arrs[index].isLeaf = true;
if (arrs[index].id == this.OrganizationUnitId) {
arrs[index].parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(arrs[index].id)) {
arrs[index].parentId = null;
}
} else {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
}
}
arrs[index].title =
arrs[index].displayName +
@ -166,7 +179,7 @@ export class AlgorithmConfigComponent implements OnInit {
}
pageSizeChange($event) {
// console.log($event);
this.MaxResultCount = $event
this.MaxResultCount = $event;
this.SkipCount = 0;
this.nzPageIndex = 1;
this.getStationViolationConfigList();

384
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts

@ -1,284 +1,326 @@
import { HttpClient } from '@angular/common/http';
import { Component, OnInit, AfterViewInit, ViewChild, ViewContainerRef } from '@angular/core';
import { TreeService } from 'src/app/service/tree.service';
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NzModalService } from 'ng-zorro-antd/modal';
import { NzMessageService } from 'ng-zorro-antd/message';
import { AddhostComponent } from './addhost/addhost.component';
import { AddcameraComponent } from './addcamera/addcamera.component';
import { EdithostComponent } from './edithost/edithost.component';
import { EditcameraComponent } from './editcamera/editcamera.component';
import { HttpClient } from "@angular/common/http";
import {
Component,
OnInit,
AfterViewInit,
ViewChild,
ViewContainerRef,
} from "@angular/core";
import { TreeService } from "src/app/service/tree.service";
import {
NzFormatEmitEvent,
NzTreeComponent,
NzTreeNodeOptions,
} from "ng-zorro-antd/tree";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { NzModalService } from "ng-zorro-antd/modal";
import { NzMessageService } from "ng-zorro-antd/message";
import { AddhostComponent } from "./addhost/addhost.component";
import { AddcameraComponent } from "./addcamera/addcamera.component";
import { EdithostComponent } from "./edithost/edithost.component";
import { EditcameraComponent } from "./editcamera/editcamera.component";
@Component({
selector: 'app-analysis-of-the-host',
templateUrl: './analysis-of-the-host.component.html',
styleUrls: ['./analysis-of-the-host.component.scss']
selector: "app-analysis-of-the-host",
templateUrl: "./analysis-of-the-host.component.html",
styleUrls: ["./analysis-of-the-host.component.scss"],
})
export class AnalysisOfTheHostComponent implements OnInit {
constructor(private fb: FormBuilder, private http: HttpClient, private toTree: TreeService, private modal: NzModalService, private message: NzMessageService, private viewContainerRef: ViewContainerRef) { }
constructor(
private fb: FormBuilder,
private http: HttpClient,
private toTree: TreeService,
private modal: NzModalService,
private message: NzMessageService,
private viewContainerRef: ViewContainerRef
) {}
ngOnInit(): void {
this.getAllOrganization()
this.getAllOrganization();
}
//获取所有组织机构
searchValue = '';
searchValue = "";
nzExpandAll = false;
totalCount: string
totalCount: string;
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"
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
this.http.get('/api/services/app/Organization/GetAll', {
params: params
}).subscribe((data: any) => {
this.totalCount = data.result.totalCount
data.result.items.forEach(element => {
if (element.id == OrganizationUnitId) {
element.parentId = null
}
element.key = element.id
element.title = element.displayName
element.selectable = false
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
IsContainsChildren: "true",
};
this.http
.get("/api/services/app/Organization/GetAll", {
params: params,
})
.subscribe((data: any) => {
this.totalCount = data.result.totalCount;
data.result.items.forEach((element) => {
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;
element.selectable = false;
});
this.nodes = [...this.toTree.toTree(data.result.items)];
this.defaultExpandedKeys = [this.nodes[0].id];
this.defaultExpandedKeys = [...this.defaultExpandedKeys];
});
this.nodes = [...this.toTree.toTree(data.result.items)]
this.defaultExpandedKeys = [this.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
})
}
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
@ViewChild("nzTreeComponent", { static: false })
nzTreeComponent!: NzTreeComponent;
defaultExpandedKeys = [];
nodes: any[] = []
nzSelectedKeys: any[] = []
selectedOilStation: any
nodes: any[] = [];
nzSelectedKeys: any[] = [];
selectedOilStation: any;
nzClick(event: NzFormatEmitEvent): void {
console.log(event.node.origin);
if (event.node.origin.isGasStation) {//如果点击的是加油站才生效
this.nzSelectedKeys[0] = event.node.origin.id
this.nzSelectedKeys = [...this.nzSelectedKeys]
this.selectedOilStation = event.node.origin
this.getHost()
this.getCamera()
if (event.node.origin.isGasStation) {
//如果点击的是加油站才生效
this.nzSelectedKeys[0] = event.node.origin.id;
this.nzSelectedKeys = [...this.nzSelectedKeys];
this.selectedOilStation = event.node.origin;
this.getHost();
this.getCamera();
} else {
this.message.info('只有加油站才可以增加主机');
this.message.info("只有加油站才可以增加主机");
}
}
//获得加油站的主机
listOfData: any[] = [];
getHost() {
this.http.get('/api/services/app/EdgeDevice/GetAll', {
params: {
organizationUnitId: this.selectedOilStation.id,
SkipCount: '0',
MaxResultCount: '100',
}
}).subscribe((data: any) => {
console.log('主机列表', data.result.items)
this.listOfData = data.result.items
})
this.http
.get("/api/services/app/EdgeDevice/GetAll", {
params: {
organizationUnitId: this.selectedOilStation.id,
SkipCount: "0",
MaxResultCount: "100",
},
})
.subscribe((data: any) => {
console.log("主机列表", data.result.items);
this.listOfData = data.result.items;
});
}
//获得加油站摄像头
listOfDataCamera: any[] = [];
getCamera() {
this.http.get('/api/services/app/Camera/GetAll', {
params: {
organizationUnitId: this.selectedOilStation.id,
SkipCount: '0',
MaxResultCount: '100',
}
}).subscribe((data: any) => {
// console.log('摄像头列表', data)
this.listOfDataCamera = data.result.items
})
this.http
.get("/api/services/app/Camera/GetAll", {
params: {
organizationUnitId: this.selectedOilStation.id,
SkipCount: "0",
MaxResultCount: "100",
},
})
.subscribe((data: any) => {
// console.log('摄像头列表', data)
this.listOfDataCamera = data.result.items;
});
}
ngAfterViewInit(): void {
}
ngAfterViewInit(): void {}
//新增分析主机
addHost() {
console.log(this.selectedOilStation)
console.log(this.selectedOilStation);
const modal = this.modal.create({
nzTitle: '新增加油站主机',
nzTitle: "新增加油站主机",
nzContent: AddhostComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 288,
nzComponentParams: {},
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
console.log('表单信息', instance.validateForm)
await new Promise((resolve) => {
console.log("表单信息", instance.validateForm);
let body = {
hostIPAddress: instance.validateForm.value.ip,
organizationUnitId: this.selectedOilStation.id
}
this.http.post('/api/services/app/EdgeDevice/Create', body).subscribe(data => {
resolve(data)
this.message.create('success', '创建成功!');
this.getHost()
return true
})
})
organizationUnitId: this.selectedOilStation.id,
};
this.http
.post("/api/services/app/EdgeDevice/Create", body)
.subscribe((data) => {
resolve(data);
this.message.create("success", "创建成功!");
this.getHost();
return true;
});
});
} else {
this.message.create('warning', '请填写完整!');
return false
this.message.create("warning", "请填写完整!");
return false;
}
}
},
});
const instance = modal.getContentComponent();
}
edit(data) {
console.log(data)
console.log(data);
const modal = this.modal.create({
nzTitle: '编辑加油站主机',
nzTitle: "编辑加油站主机",
nzContent: EdithostComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 288,
nzComponentParams: {
ip: data.hostIPAddress
ip: data.hostIPAddress,
},
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
console.log('表单信息', instance.validateForm)
data.hostIPAddress = instance.validateForm.value.ip,
this.http.put('/api/services/app/EdgeDevice/Update', data).subscribe(data => {
resolve(data)
this.message.create('success', '修改成功!');
this.getHost()
return true
})
})
await new Promise((resolve) => {
console.log("表单信息", instance.validateForm);
(data.hostIPAddress = instance.validateForm.value.ip),
this.http
.put("/api/services/app/EdgeDevice/Update", data)
.subscribe((data) => {
resolve(data);
this.message.create("success", "修改成功!");
this.getHost();
return true;
});
});
} else {
this.message.create('warning', '请填写完整!');
return false
this.message.create("warning", "请填写完整!");
return false;
}
}
},
});
const instance = modal.getContentComponent();
}
delete(item) {
console.log(item)
console.log(item);
this.modal.confirm({
nzTitle: `确定要删除${item.name}这个主机吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOkText: "确定",
nzOkType: "primary",
nzOnOk: () => {
this.http.delete('/api/services/app/EdgeDevice/Delete', {
params: {
Id: item.id
}
}).subscribe(data => {
this.message.create('success', '删除成功!');
this.getHost()
})
this.http
.delete("/api/services/app/EdgeDevice/Delete", {
params: {
Id: item.id,
},
})
.subscribe((data) => {
this.message.create("success", "删除成功!");
this.getHost();
});
},
nzCancelText: '取消'
nzCancelText: "取消",
});
}
//摄像头
addCamera() {
console.log(this.selectedOilStation)
console.log(this.selectedOilStation);
const modal = this.modal.create({
nzTitle: '新增加油站摄像头',
nzTitle: "新增加油站摄像头",
nzContent: AddcameraComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 288,
nzComponentParams: {},
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
console.log('表单信息', instance.validateForm)
await new Promise((resolve) => {
console.log("表单信息", instance.validateForm);
let body = {
organizationUnitId: this.selectedOilStation.id,
ipAdress: instance.validateForm.value.ip,
code: instance.validateForm.value.code,
name: instance.validateForm.value.name,
// description: "",
}
this.http.post('/api/services/app/Camera/Create', body).subscribe(data => {
resolve(data)
this.message.create('success', '创建成功!');
this.getCamera()
return true
}, err => {
return false
})
})
};
this.http.post("/api/services/app/Camera/Create", body).subscribe(
(data) => {
resolve(data);
this.message.create("success", "创建成功!");
this.getCamera();
return true;
},
(err) => {
return false;
}
);
});
} else {
this.message.create('warning', '请填写完整!');
return false
this.message.create("warning", "请填写完整!");
return false;
}
}
},
});
const instance = modal.getContentComponent();
}
editCamera(data) {
console.log(data)
console.log(data);
const modal = this.modal.create({
nzTitle: '编辑加油站摄像头',
nzTitle: "编辑加油站摄像头",
nzContent: EditcameraComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 288,
nzComponentParams: {
data: data
data: data,
},
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
console.log('表单信息', instance.validateForm)
data.name = instance.validateForm.value.name
data.code = instance.validateForm.value.code
data.ipAdress = instance.validateForm.value.ip
this.http.put('/api/services/app/Camera/Update', data).subscribe(data => {
resolve(data)
this.message.create('success', '编辑成功!');
this.getCamera()
return true
}, err => {
return false
})
})
await new Promise((resolve) => {
console.log("表单信息", instance.validateForm);
data.name = instance.validateForm.value.name;
data.code = instance.validateForm.value.code;
data.ipAdress = instance.validateForm.value.ip;
this.http.put("/api/services/app/Camera/Update", data).subscribe(
(data) => {
resolve(data);
this.message.create("success", "编辑成功!");
this.getCamera();
return true;
},
(err) => {
return false;
}
);
});
} else {
this.message.create('warning', '请填写完整!');
return false
this.message.create("warning", "请填写完整!");
return false;
}
}
},
});
const instance = modal.getContentComponent();
}
deleteCamera(item) {
console.log(item)
console.log(item);
this.modal.confirm({
nzTitle: `确定要删除${item.name}这个摄像头吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOkText: "确定",
nzOkType: "primary",
nzOnOk: () => {
this.http.delete('/api/services/app/Camera/Delete', {
params: {
Id: item.id
}
}).subscribe(data => {
this.message.create('success', '删除成功!');
this.getCamera()
})
this.http
.delete("/api/services/app/Camera/Delete", {
params: {
Id: item.id,
},
})
.subscribe((data) => {
this.message.create("success", "删除成功!");
this.getCamera();
});
},
nzCancelText: '取消'
nzCancelText: "取消",
});
}
}

28
src/app/system-management/or-binding/or-binding-model/or-binding-model.component.ts

@ -60,13 +60,15 @@ export class OrBindingModelComponent implements OnInit {
nodes: any = [];
organization;
async getAllOrganization() {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
await new Promise<void>((resolve, reject) => {
@ -77,8 +79,18 @@ export class OrBindingModelComponent implements OnInit {
.subscribe(async (data: any) => {
this.organization = data.result.items;
for (let index = 0; index < data.result.items.length; index++) {
if (data.result.items[index].id == OrganizationUnitId) {
data.result.items[index].parentId = null;
// if (data.result.items[index].id == OrganizationUnitId) {
// data.result.items[index].parentId = null;
// }
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(data.result.items[index].id)) {
data.result.items[index].parentId = null;
}
} else {
if (data.result.items[index].id == OrganizationUnitId) {
data.result.items[index].parentId = null;
}
}
data.result.items[index].title =
data.result.items[index].displayName;

29
src/app/system-management/organization/organization.component.ts

@ -76,13 +76,7 @@ export class OrganizationComponent implements OnInit {
isLoading = false;
getAllOrganization() {
this.isLoading = true;
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
@ -99,11 +93,14 @@ export class OrganizationComponent implements OnInit {
//获得组织机构下有多少油站
stationsList;
getStationsNum(e) {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
this.http
.get(
"/api/services/app/GasStation/GetCountsByOrganizations?IsContainsChildren=true"
@ -120,8 +117,14 @@ export class OrganizationComponent implements OnInit {
};
});
for (let index = 0; index < arrs.length; index++) {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(arrs[index].id)) {
arrs[index].parentId = null;
}
} else {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
}
}
arrs[index].title = arrs[index].displayName;
arrs[index].key = arrs[index].id;

29
src/app/system-management/user-binding/binding/binding.component.ts

@ -100,13 +100,7 @@ export class BindingComponent implements OnInit {
nodes: any = [];
organization;
async 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",
};
await new Promise<void>((resolve, reject) => {
@ -123,11 +117,14 @@ export class BindingComponent implements OnInit {
});
}
async getuser(e) {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
@ -152,8 +149,14 @@ export class BindingComponent implements OnInit {
});
for (let index = 0; index < arrs.length; index++) {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(arrs[index].id)) {
arrs[index].parentId = null;
}
} else {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
}
}
arrs[index].title = arrs[index].displayName;
arrs[index].key = arrs[index].id;

122
src/app/system-management/user/adduser/adduser.component.ts

@ -1,19 +1,23 @@
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 { TreeService } from 'src/app/service/tree.service';
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 { TreeService } from "src/app/service/tree.service";
@Component({
selector: 'app-adduser',
templateUrl: './adduser.component.html',
styleUrls: ['./adduser.component.scss']
selector: "app-adduser",
templateUrl: "./adduser.component.html",
styleUrls: ["./adduser.component.scss"],
})
export class AdduserComponent implements OnInit {
@Input() title?: string;
@Input() subtitle?: string;
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { }
constructor(
private modal: NzModalRef,
private fb: FormBuilder,
private http: HttpClient,
private toTree: TreeService
) {}
ngOnInit(): void {
this.validateForm = this.fb.group({
@ -23,15 +27,15 @@ export class AdduserComponent implements OnInit {
role: [[], [Validators.required]],
role2: [[]],
phonenum: [null, [Validators.required]],
note:[null]
note: [null],
});
this.getAllRoles()
this.getAllRoles2()
this.getAllOrganization()
this.getAllRoles();
this.getAllRoles2();
this.getAllOrganization();
}
destroyModal(): void {
this.modal.destroy({ data: 'this the result data' });
this.modal.destroy({ data: "this the result data" });
}
listOfData: any[] = [];
@ -39,49 +43,67 @@ export class AdduserComponent implements OnInit {
//获取角色列表
getAllRoles() {
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
})
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;
});
}
//获取角色列表
getAllRoles2() {
let params = {
SkipCount: '0',
MaxResultCount: '999',
IsViolationRoles:'true'
}
this.http.get('/api/services/app/Role/GetAll', {
params: params
}).subscribe((data: any) => {
// console.log('角色列表', data.result.items)
this.listOfData2 = data.result.items
})
SkipCount: "0",
MaxResultCount: "999",
IsViolationRoles: "true",
};
this.http
.get("/api/services/app/Role/GetAll", {
params: params,
})
.subscribe((data: any) => {
// console.log('角色列表', data.result.items)
this.listOfData2 = data.result.items;
});
}
//获取所有组织机构
nodes: any = []
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"
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
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
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
IsContainsChildren: "true",
};
this.http
.get("/api/services/app/Organization/GetAll", {
params: params,
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;
});
this.nodes = [...this.toTree.toTree(data.result.items)];
});
this.nodes = [...this.toTree.toTree(data.result.items)]
})
}
}

24
src/app/system-management/user/edituser/edituser.component.ts

@ -112,13 +112,15 @@ export class EdituserComponent implements OnInit {
//获取所有组织机构
async getAllOrganization() {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
};
await new Promise<void>((resolve, reject) => {
@ -128,8 +130,14 @@ export class EdituserComponent implements OnInit {
})
.subscribe((data: any) => {
data.result.items.forEach((element) => {
if (element.id == OrganizationUnitId) {
element.parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(element.id)) {
element.parentId = null;
}
} else {
if (element.id == OrganizationUnitId) {
element.parentId = null;
}
}
element.key = element.id;
element.title = element.displayName;

8
src/app/system-management/user/user.component.html

@ -129,7 +129,7 @@
<td class="operation">
<i class="blueColor" nz-icon nzType="form" nzTheme="outline" (click)="editUser(data)" nz-tooltip
nzTooltipTitle="编辑"></i>
<i nz-icon nz-tooltip nzTooltipTitle="重置密码" (click)="resetPassword(data)">
<i *ngIf="isAdmin" nz-icon nz-tooltip nzTooltipTitle="重置密码" (click)="resetPassword(data)">
<svg width="14" height="14">
<path
d="M766.598 75.624c-112.55-65.312-250.07-87.553-385.693-51.212C110.437 96.883-50.07 374.89 22.4 645.357c72.472 270.468 350.479 430.975 620.946 358.504 270.467-72.472 430.975-350.479 358.503-620.946-0.211-0.789-0.424-1.577-0.639-2.363h-62.505a454.786 454.786 0 0 1 5.189 17.892c63.895 238.46-77.618 483.566-316.077 547.461-238.46 63.895-483.566-77.617-547.461-316.077-63.895-238.46 77.617-483.566 316.077-547.46 119.62-32.053 240.912-12.416 340.164 45.217l-42.383 73.409 217.66-6.997L809.104 2l-42.507 73.624z"
@ -139,9 +139,9 @@
fill="#36A2FF" p-id="2328"></path>
</svg>
</i>
<i *ngIf="!data.isActive" class="greenColor2" nz-icon nzType="stop" nzTheme="outline" nz-tooltip
nzTooltipTitle="启用" (click)="cancel(data,true)"></i>
<i *ngIf="data.isActive" class="redColor" nz-icon nzType="stop" nzTheme="outline" nz-tooltip
<i *ngIf="!data.isActive && isAdmin" class="greenColor2" nz-icon nzType="stop" nzTheme="outline"
nz-tooltip nzTooltipTitle="启用" (click)="cancel(data,true)"></i>
<i *ngIf="data.isActive && isAdmin" class="redColor" nz-icon nzType="stop" nzTheme="outline" nz-tooltip
nzTooltipTitle="停用" (click)="cancel(data,false)"></i>
<i *ngIf="isAdmin" class="redColor" nz-icon nzType="poweroff" nzTheme="outline" nz-tooltip
nzTooltipTitle="注销" (click)="delete(data)"></i>

29
src/app/system-management/user/user.component.ts

@ -161,13 +161,7 @@ export class UserComponent implements OnInit {
nodes: any = [];
organization;
async 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",
};
await new Promise<void>((resolve, reject) => {
@ -184,11 +178,14 @@ export class UserComponent implements OnInit {
});
}
async getuser(e) {
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let userData = null;
if (sessionStorage.getItem("isGasStation") == "true") {
userData = JSON.parse(sessionStorage.getItem("userdataOfgasstation"));
} else {
userData = JSON.parse(sessionStorage.getItem("userdata"));
}
let OrganizationUnitId = userData.organization.id;
let OrganizationUnitIds = userData.organizations?.map((v) => v.id);
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
@ -213,8 +210,14 @@ export class UserComponent implements OnInit {
});
for (let index = 0; index < arrs.length; index++) {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
if (OrganizationUnitIds && OrganizationUnitIds.length !== 0) {
if (OrganizationUnitIds.includes(arrs[index].id)) {
arrs[index].parentId = null;
}
} else {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
}
}
arrs[index].title = arrs[index].displayName;
arrs[index].key = arrs[index].id;

12
src/theme.less

@ -419,13 +419,13 @@
}
nz-tree {
nz-tree-node {
margin-left: 20px;
}
// nz-tree-node {
// margin-left: 20px;
// }
nz-tree-node:nth-child(1) {
margin-left: 0px;
}
// nz-tree-node:nth-child(1) {
// margin-left: 0px;
// }
}
.ant-table table {

Loading…
Cancel
Save