diff --git a/src/app/home/basic-info/unit-details/unit-details.component.html b/src/app/home/basic-info/unit-details/unit-details.component.html index e24814d..4a349a2 100644 --- a/src/app/home/basic-info/unit-details/unit-details.component.html +++ b/src/app/home/basic-info/unit-details/unit-details.component.html @@ -1,4 +1,3 @@ -
@@ -11,53 +10,78 @@
单位信息
-
+ + - 所属救援站 - - - - - Please input your username! - - - The username is redundant! - - + 消防安全责任人 + + + + + + - 所属大队 - - - - - The input is not valid E-mail! - - - Please input your E-mail! - - + 所属救援站 + + + + + - 建筑类型 - - + 所属大队 + + + + + - + - Comment - - + 建筑类型 + + + + + -
- +
@@ -85,7 +109,8 @@

+ style="font-family:宋体; font-size:9pt">

@@ -95,7 +120,8 @@

+ style="font-family:宋体; font-size:9pt"> @@ -105,7 +131,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -116,7 +143,8 @@ -

+

@@ -125,7 +153,8 @@ -

+

@@ -134,7 +163,8 @@ -

+

@@ -146,7 +176,8 @@

+ style="font-family:宋体; font-size:9pt">

@@ -156,7 +187,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -166,7 +198,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -176,7 +209,8 @@

+ style="font-family:宋体; font-size:9pt">

@@ -188,22 +222,26 @@

东:

+ style="font-family:宋体; font-size:9pt">东:

南:

+ style="font-family:宋体; font-size:9pt">南:

西:

+ style="font-family:宋体; font-size:9pt">西:

北:

+ style="font-family:宋体; font-size:9pt">北:

@@ -215,7 +253,8 @@

+ style="font-family:宋体; font-size:9pt">

@@ -236,7 +275,8 @@ -

+

@@ -253,7 +293,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -263,7 +304,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -273,7 +315,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -283,7 +326,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -295,7 +339,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -305,7 +350,9 @@

+ style="font-family:'Times New Roman'; font-size:9pt"> +

@@ -322,7 +369,7 @@ style="font-family:宋体; font-size:9pt">)
无( --> - +


无( --> - +


无( --> - +


无( --> - +

@@ -383,7 +430,8 @@

+ style="font-family:宋体; font-size:9pt">

@@ -412,20 +461,23 @@ style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; padding-left:5.4pt; padding-right:5.03pt; vertical-align:middle; width:41.5pt">

数量:

+ style="font-family:'Times New Roman'; font-size:9pt">

扬程:m

流量L/S

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -455,20 +508,23 @@ style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.4pt; padding-right:5.03pt; vertical-align:middle; width:41.5pt">

数量:

+ style="font-family:'Times New Roman'; font-size:9pt">

扬程:m

流量:L/S

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -498,7 +555,8 @@ -

+

-

+

@@ -522,8 +580,8 @@ -

+

@@ -534,8 +592,8 @@ -

-

+

+

@@ -560,7 +619,8 @@

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -584,7 +644,7 @@ - +

 

diff --git a/src/app/home/basic-info/unit-details/unit-details.component.ts b/src/app/home/basic-info/unit-details/unit-details.component.ts index a0ea3a8..274a2c0 100644 --- a/src/app/home/basic-info/unit-details/unit-details.component.ts +++ b/src/app/home/basic-info/unit-details/unit-details.component.ts @@ -1,6 +1,7 @@ import { Component, Renderer2, OnDestroy, AfterViewInit, ElementRef, OnInit, ViewChild } from '@angular/core'; import { CustomReuseStrategy } from 'src/app/CustomReuseStrategy'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; import { asBlob } from 'html-docx-js-typescript' // 要保存这个docx文件推荐引入file-saver哦,你可以用npm i -D file-saver来安装 import { saveAs } from 'file-saver' @@ -12,14 +13,8 @@ import { saveAs } from 'file-saver' export class UnitDetailsComponent implements OnInit { @ViewChild('box') box: ElementRef; - constructor(private fb: FormBuilder, private renderer: Renderer2, private el: ElementRef) { - this.validateForm = this.fb.group({ - userName: [''], - email: [''], - password: [''], - confirm: [''], - comment: [''] - }); + constructor(private fb: FormBuilder, private http: HttpClient, private renderer: Renderer2, private el: ElementRef) { + } datas= { basicInfo: { @@ -71,29 +66,32 @@ export class UnitDetailsComponent implements OnInit { tips:"" } aaa = true + list={} validateForm!: FormGroup; + zhidui=[] + dadui=[] + jiuyuanzhan=[] + id='62f209e9f63e69362ed3239e' ngOnInit(): void { console.log(666,this.datas); + this.validateForm = this.fb.group({ + unit: [null, [Validators.required]], + name: [null], + iphone: [null], + addr: [null], + role: [null], + role2: [null], + nature: [null], + role4: [null], + phonenum: [null] + }); + this.getAllOrganization() + this.getCompanies() } - submitForm(value: { userName: string; email: string; password: string; confirm: string; comment: string }): void { - for (const key in this.validateForm.controls) { - this.validateForm.controls[key].markAsDirty(); - this.validateForm.controls[key].updateValueAndValidity(); - } - console.log(value); - } - resetForm(e: MouseEvent): void { - e.preventDefault(); - this.validateForm.reset(); - for (const key in this.validateForm.controls) { - this.validateForm.controls[key].markAsPristine(); - this.validateForm.controls[key].updateValueAndValidity(); - } - } - validateConfirmPassword(): void { - setTimeout(() => this.validateForm.controls.confirm.updateValueAndValidity()); - } - + listOfData: any[] = []; + listOfData2: any[] = []; + + exportClick() { let alarm="" let spray="" @@ -646,5 +644,48 @@ export class UnitDetailsComponent implements OnInit { back() { window.history.back() } - + getCompanies(){ + + this.http.get('/api/Companies/'+this.id).subscribe((data: any) => { + console.log(data); + this.datas=JSON.parse(data.data) + this.validateForm.patchValue({ + unit: [data.companyName, [Validators.required]], + name: [data.directorName], + iphone: [data.directorPhone], + addr: [data.address], + role: [data.organizationId], + role2: [null], + nature: [null], + role4: [null], + phonenum: [null]}) + + }) + } + nodes: any = [] + getAllOrganization(){ + let params = { + // OrganizationUnitId: OrganizationUnitId, + // IsContainsChildren: "true" + ContainsChildren: true, + pageSize: 9999 + } + this.http.get('/api/Organizations', { + params: params + }).subscribe((data: any) => { + console.log(data); + for (let index = 0; index < data.items.length; index++) { + if(data.items[index].level==1){ + this.zhidui.push(data.items[index]) + }else if(data.items[index].level==2){ + this.dadui.push(data.items[index]) + }else{ + this.jiuyuanzhan.push(data.items[index]) + } + + } + console.log(this.dadui); + + }) + } }