济南项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.9 KiB

import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { NzModalService } from 'ng-zorro-antd/modal';
import { NzMessageService } from 'ng-zorro-antd/message';
import { HttpClient } from '@angular/common/http';
import { TreeService } from 'src/app/service/tree.service';
@Component({
selector: 'app-station-task-execution',
templateUrl: './station-task-execution.component.html',
styleUrls: ['./station-task-execution.component.scss']
})
export class StationTaskExecutionComponent implements OnInit {
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { }
searchForm = {
taskname: '',
tasktime: '',
unitname: '',
unitlevel: '',
or: ''
}
usersNum
loading
usersLIst = [1]
ngOnInit(): void {
}
pageChange($event) {
}
cancel(item, type) {
}
delete(item) {
}
expandKeys
defaultOrId: string
//获取所有组织机构
nodes: any = []
getAllOrganization() {
let organizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
let params = {
OrganizationId: organizationId || '',
ContainsChildren: "true",
PageNumber: 1,
PageSize: 9999
}
this.http.get('/api/Organizations', {
params: params
}).subscribe((data: any) => {
data.items.forEach(element => {
if (element.id == organizationId) {
element.parentId = null
}
element.key = element.id
element.title = element.name
});
this.nodes = [...this.toTree.toTree(data.items)]
})
}
}