|
|
|
@ -1,28 +1,32 @@
|
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
|
import { Component, OnInit, ViewChild } from '@angular/core'; |
|
|
|
|
import { FormBuilder, FormGroup } from '@angular/forms'; |
|
|
|
|
|
|
|
|
|
import { Directive, HostListener, Input, EventEmitter, Output, OnDestroy } from '@angular/core'; |
|
|
|
|
import { TreeService } from 'src/app/service/tree.service'; |
|
|
|
|
|
|
|
|
|
import { debounceTime } from 'rxjs/operators'; |
|
|
|
|
import { Subject, Subscription } from 'rxjs'; |
|
|
|
|
import { fromEvent, Subject } from 'rxjs'; |
|
|
|
|
import { debounceTime } from 'rxjs/operators'; // 引入debounceTime、Subject
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-zhi-indicators', |
|
|
|
|
templateUrl: './zhi-indicators.component.html', |
|
|
|
|
styleUrls: ['./zhi-indicators.component.scss'] |
|
|
|
|
}) |
|
|
|
|
export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
|
@Input('appDebounceInput') debounceTime = 500; |
|
|
|
|
@Output() debounceInput = new EventEmitter(); |
|
|
|
|
private inputs = new Subject<any>(); |
|
|
|
|
private subscription: Subscription; |
|
|
|
|
|
|
|
|
|
@HostListener('input', ['event']) |
|
|
|
|
validateForm!: FormGroup; |
|
|
|
|
|
|
|
|
|
constructor(private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { } |
|
|
|
|
private valueChange = new Subject<string>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.getAllOrganization() |
|
|
|
|
//保存防抖
|
|
|
|
|
this.valueChange.pipe(debounceTime(1000)).subscribe(data => { |
|
|
|
|
console.log(data); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
saveItem() { |
|
|
|
|
this.valueChange.next('xxxx'); |
|
|
|
|
} |
|
|
|
|
months = [ |
|
|
|
|
{ name: '1月', isable: true }, |
|
|
|
|
{ name: '2月', isable: true }, |
|
|
|
@ -52,7 +56,9 @@ export class ZhiIndicatorsComponent implements OnInit {
|
|
|
|
|
search2: '',//选择单位气泡卡片---组织选择列表
|
|
|
|
|
search2Value: [], |
|
|
|
|
selectedMenu: 1,//选择单位气泡卡片
|
|
|
|
|
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],//表格数据
|
|
|
|
|
data: [ |
|
|
|
|
{ explain: '' } |
|
|
|
|
],//表格数据
|
|
|
|
|
nodes: [] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -68,6 +74,10 @@ export class ZhiIndicatorsComponent implements OnInit {
|
|
|
|
|
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],//表格数据
|
|
|
|
|
nodes: [] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isPopover(data) { |
|
|
|
|
data.isPopover = !data.isPopover |
|
|
|
|
} |
|
|
|
@ -83,9 +93,7 @@ export class ZhiIndicatorsComponent implements OnInit {
|
|
|
|
|
data.isExpand = !data.isExpand |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.getAllOrganization() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nzExpandAll = false; |
|
|
|
|
totalCount: string |
|
|
|
|