diff --git a/src/app/home/system-management/or/or.component.ts b/src/app/home/system-management/or/or.component.ts
index 3d9302d..3589294 100644
--- a/src/app/home/system-management/or/or.component.ts
+++ b/src/app/home/system-management/or/or.component.ts
@@ -28,11 +28,8 @@ export class OrComponent implements OnInit {
});
this.getAllOrganization()
- this.deleteRouteSnapshot();
- }
- deleteRouteSnapshot() {
- CustomReuseStrategy.deleteRouteSnapshot('/system/host');
}
+
//搜索框提交
submitForm(): void {
for (const i in this.validateForm.controls) {
@@ -48,10 +45,7 @@ export class OrComponent implements OnInit {
allOrList: any
getAllOrganization() {
- let OrganizationUnitId = ''
let params = {
- // OrganizationUnitId: OrganizationUnitId,
- // IsContainsChildren: "true"
ContainsChildren: true,
pageSize: 9999
}
@@ -67,7 +61,7 @@ export class OrComponent implements OnInit {
});
this.allOrList = data.items
this.nodes = [...this.toTree.toTree(data.items)]
- this.defaultExpandedKeys = [this.nodes[0].id]
+ this.defaultExpandedKeys.length == 0 ? this.defaultExpandedKeys = [this.nodes[0].id] : null
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
})
}
@@ -81,8 +75,6 @@ export class OrComponent implements OnInit {
addOr(node?: any) {
- console.log(node);
-
const modal = this.modal.create({
nzTitle: node ? '新增组织机构' : '新增一级组织机构',
nzContent: AddorComponent,
diff --git a/src/app/home/task/task.component.ts b/src/app/home/task/task.component.ts
index d911542..05c15e5 100644
--- a/src/app/home/task/task.component.ts
+++ b/src/app/home/task/task.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
@Component({
selector: 'app-task',
@@ -7,8 +8,9 @@ import { Component, OnInit } from '@angular/core';
})
export class TaskComponent implements OnInit {
- constructor() { }
+ constructor(private router: Router) { }
ngOnInit(): void {
+ this.router.navigate(['/task/indicators'])
}
}
diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.html b/src/app/home/task/zhi-indicators/zhi-indicators.component.html
index 02eb18f..7ede726 100644
--- a/src/app/home/task/zhi-indicators/zhi-indicators.component.html
+++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.html
@@ -63,8 +63,8 @@
+ #nzTreeComponent [nzData]="doubleRandom.nodes" [nzTreeTemplate]="nzTreeTemplate"
+ nzBlockNode [nzExpandedIcon]="multiExpandedIconTpl">
@@ -129,7 +129,8 @@
22
-
+
|
@@ -190,8 +191,8 @@
+ #nzTreeComponent [nzData]="rehearsal.nodes" [nzTreeTemplate]="nzTreeTemplate"
+ nzBlockNode [nzExpandedIcon]="multiExpandedIconTpl">
@@ -234,8 +235,7 @@
-
+
责任机构 |
diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
index 172710a..95f9c25 100644
--- a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
+++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
@@ -1,15 +1,24 @@
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';
@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();
+ private subscription: Subscription;
+ @HostListener('input', ['event'])
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { }
From f972f0f8fd2d639bc4419a9f9f8fb293f49454f8 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Wed, 10 Aug 2022 15:32:21 +0800
Subject: [PATCH 2/2] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E9=98=B2=E6=8A=96?=
=?UTF-8?q?=E5=87=BD=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zhi-indicators.component.html | 5 ++-
.../zhi-indicators.component.ts | 38 +++++++++++--------
2 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.html b/src/app/home/task/zhi-indicators/zhi-indicators.component.html
index 7ede726..7c124ae 100644
--- a/src/app/home/task/zhi-indicators/zhi-indicators.component.html
+++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.html
@@ -129,8 +129,9 @@
22
-
+
|
diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
index 95f9c25..a9c4809 100644
--- a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
+++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
@@ -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();
- private subscription: Subscription;
-
- @HostListener('input', ['event'])
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { }
+ private valueChange = new Subject();
+
+ 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