Browse Source

[完善]完善组织机构管理

非煤矿山灾害智能感知和预警系统
邵佳豪 2 years ago
parent
commit
98a55f1121
  1. 6
      src/app/home/system-management/or/or.component.html
  2. 12
      src/app/home/system-management/or/or.component.ts
  3. 4
      src/app/home/task/task.component.ts
  4. 14
      src/app/home/task/zhi-indicators/zhi-indicators.component.html
  5. 9
      src/app/home/task/zhi-indicators/zhi-indicators.component.ts

6
src/app/home/system-management/or/or.component.html

@ -18,8 +18,10 @@
<span>操作</span>
</div>
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="searchValue" #nzTreeComponent [nzData]="nodes"
[nzExpandAll]="nzExpandAll" [nzExpandedKeys]="defaultExpandedKeys" [nzTreeTemplate]="nzTreeTemplate" nzDraggable
nzBlockNode (nzOnDrop)="nzEvent($event)" [nzBeforeDrop]="beforeDrop" [nzExpandedIcon]="multiExpandedIconTpl">
[nzExpandAll]="nzExpandAll" [nzExpandedKeys]="defaultExpandedKeys" [nzTreeTemplate]="nzTreeTemplate" nzBlockNode
(nzOnDrop)="nzEvent($event)" [nzBeforeDrop]="beforeDrop" [nzExpandedIcon]="multiExpandedIconTpl"
[nzAsyncData]="true">
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="nodebox">

12
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,

4
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'])
}
}

14
src/app/home/task/zhi-indicators/zhi-indicators.component.html

@ -63,8 +63,8 @@
</div>
<div class="popoverContentitem">
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="doubleRandom.search2"
#nzTreeComponent [nzData]="doubleRandom.nodes" [nzTreeTemplate]="nzTreeTemplate" nzBlockNode
[nzExpandedIcon]="multiExpandedIconTpl">
#nzTreeComponent [nzData]="doubleRandom.nodes" [nzTreeTemplate]="nzTreeTemplate"
nzBlockNode [nzExpandedIcon]="multiExpandedIconTpl">
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="nodebox">
@ -129,7 +129,8 @@
22
</td>
<td style="padding:0 2px!important;">
<textarea style="border: 0;" rows="1" nz-input placeholder="一段简短的说明文字..."></textarea>
<!-- <textarea [appDebounceInput]="700" (debounceInput)="dealInput($event)"
style="border: 0;" rows="1" nz-input placeholder="一段简短的说明文字..."></textarea> -->
</td>
</tr>
</tbody>
@ -190,8 +191,8 @@
</div>
<div class="popoverContentitem">
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="rehearsal.search2"
#nzTreeComponent [nzData]="rehearsal.nodes" [nzTreeTemplate]="nzTreeTemplate" nzBlockNode
[nzExpandedIcon]="multiExpandedIconTpl">
#nzTreeComponent [nzData]="rehearsal.nodes" [nzTreeTemplate]="nzTreeTemplate"
nzBlockNode [nzExpandedIcon]="multiExpandedIconTpl">
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="nodebox">
@ -234,8 +235,7 @@
</div>
</div>
<div class="panelcontent" *ngIf="rehearsal.isExpand">
<nz-table #colSpanTable [nzData]="rehearsal.data" nzBordered nzSize="small"
[nzShowPagination]="false">
<nz-table #colSpanTable [nzData]="rehearsal.data" nzBordered nzSize="small" [nzShowPagination]="false">
<thead>
<tr>
<th nzWidth="18%">责任机构</th>

9
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<any>();
private subscription: Subscription;
@HostListener('input', ['event'])
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { }

Loading…
Cancel
Save