From 41d9a0e35a599768405aad3a25a2e32c7a1041e3 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 14 Jun 2023 14:46:09 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=8D=95=E4=BD=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A1=AB=E5=86=99=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy.config.json | 6 +- .../add-unit/add-unit.component.html | 4 +- .../basic-info/add-unit/add-unit.component.ts | 2 +- .../unit-details/unit-details.component.html | 48 +- .../unit-details/unit-details.component.ts | 1345 ++++++++++------- .../home/basic-info/unit/unit.component.ts | 6 +- .../chat-window/chat-window.component.ts | 1 - .../statistic-analysis/home/home.component.ts | 5 + src/styles.scss | 10 + 9 files changed, 829 insertions(+), 598 deletions(-) diff --git a/proxy.config.json b/proxy.config.json index 17515f4..d1368d5 100644 --- a/proxy.config.json +++ b/proxy.config.json @@ -1,11 +1,13 @@ { "/api": { - "target": "https://fx.anxincloud.cn/", + "target": "https://121.36.37.70:8204/", + "测试": "https://121.36.37.70:8204/", + "生产": "https://fx.anxincloud.cn/", "secure": false, "changeOrigin": true }, "/hubs": { - "target": "https://fx.anxincloud.cn/", + "target": "https://121.36.37.70:8204/", "secure": false, "ws": true, "logLevel": "debug" diff --git a/src/app/home/basic-info/add-unit/add-unit.component.html b/src/app/home/basic-info/add-unit/add-unit.component.html index 24e1500..295a805 100644 --- a/src/app/home/basic-info/add-unit/add-unit.component.html +++ b/src/app/home/basic-info/add-unit/add-unit.component.html @@ -74,14 +74,14 @@ - + 单位类型 diff --git a/src/app/home/basic-info/add-unit/add-unit.component.ts b/src/app/home/basic-info/add-unit/add-unit.component.ts index c5dcd92..e236039 100644 --- a/src/app/home/basic-info/add-unit/add-unit.component.ts +++ b/src/app/home/basic-info/add-unit/add-unit.component.ts @@ -24,7 +24,7 @@ export class AddUnitComponent implements OnInit { orStation: [null, [Validators.required]], orDa: [null], companyLevel: [null, [Validators.required]], - nature: [null], + // nature: [null], unittype: [null] }); this.getAllOrganization() 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 43738b7..f442bd8 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 @@ -9,19 +9,19 @@
单位信息
-
+
- - 社会统一信用代码 + - 所属救援站 + 所属救援站 @@ -29,7 +29,7 @@ - 所属大队 + 所属大队 @@ -38,7 +38,7 @@ - 单位类型 + 单位类型 @@ -47,7 +47,7 @@ - 单位级别 + 单位级别 @@ -57,32 +57,32 @@ - - 使用性质 + - 法定代表人 + 法人/消防负责人 - + - 法人联系方式 + 法人/消防责任人
联系方式
- +
- - 消防责任人 + - 消防安全管理员 + 消防安全管理人 - + - 管理员联系方式 + 消防安全管理员
联系方式
- +
- 单位照片 + 单位照片
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 7146d29..2c7ef91 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,4 +1,14 @@ -import { Component, Input, Renderer2, OnDestroy, AfterViewInit, ElementRef, OnInit, ViewChild, ViewContainerRef } from '@angular/core'; +import { + Component, + Input, + Renderer2, + OnDestroy, + AfterViewInit, + ElementRef, + OnInit, + ViewChild, + ViewContainerRef, +} from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { NzMessageService } from 'ng-zorro-antd/message'; import { Router, ActivatedRoute } from '@angular/router'; @@ -6,127 +16,148 @@ import { Router, ActivatedRoute } from '@angular/router'; import { MethodService } from 'src/app/service/method.service'; import { TreeService } from 'src/app/service/tree.service'; import { HttpClient } from '@angular/common/http'; -import { asBlob } from 'html-docx-js-typescript' +import { asBlob } from 'html-docx-js-typescript'; // 要保存这个docx文件推荐引入file-saver哦,你可以用npm i -D file-saver来安装 -import { saveAs } from 'file-saver' +import { saveAs } from 'file-saver'; import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; declare var AMap: any; import Viewer from 'viewerjs'; import { NzModalService } from 'ng-zorro-antd/modal'; import { OperationLogComponent } from './operation-log/operation-log.component'; -declare var $: any -declare var Print: any +declare var $: any; +declare var Print: any; @Component({ selector: 'app-unit-details', templateUrl: './unit-details.component.html', - styleUrls: ['./unit-details.component.scss'] + styleUrls: ['./unit-details.component.scss'], }) - export class UnitDetailsComponent implements OnInit { @ViewChild('box') box: ElementRef; loading = false; avatarUrl?: string; - constructor(public methodService: MethodService, private route: ActivatedRoute, private message: NzMessageService, private router: Router, private toTree: TreeService, private fb: FormBuilder, private http: HttpClient, private renderer: Renderer2, private el: ElementRef, public renderer2: Renderer2, private elementRef: ElementRef, private objectsSrv: ObjectsSimpleService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { - - } - index = 1 - disableds = false + constructor( + public methodService: MethodService, + private route: ActivatedRoute, + private message: NzMessageService, + private router: Router, + private toTree: TreeService, + private fb: FormBuilder, + private http: HttpClient, + private renderer: Renderer2, + private el: ElementRef, + public renderer2: Renderer2, + private elementRef: ElementRef, + private objectsSrv: ObjectsSimpleService, + private modal: NzModalService, + private viewContainerRef: ViewContainerRef + ) {} + index = 1; + disableds = false; exerciseData: any = { data: { - people: "", - typeAndAmount: "", - time: "请选择时间", + people: '', + typeAndAmount: '', + time: '请选择时间', add: '', - information: "", - situation: "",//消防设施使用情况 + information: '', + situation: '', //消防设施使用情况 data: { danger: '', from: [ { - name: '侦查', form: { + name: '侦查', + form: { // mode: '', // people: '', // add: '', // marshalling: '', // imgShow: '' - } + }, }, { - name: '警戒', form: { + name: '警戒', + form: { // mode: '', // people: '', // add: '', // jingshi: '', // imgShow: '' - } + }, }, { - name: '供水', form: { + name: '供水', + form: { // mode: '', // people: '', // gongshui: '', // qushuidian: '', // imgShow: '' - } + }, }, { - name: '搜救', form: { + name: '搜救', + form: { // mode: '', // people: '', // add: '', // jingshi: '', // imgShow: '' - } + }, }, { - name: '排烟', form: { + name: '排烟', + form: { // mode: '', // people: '', // add: '', // paiyan: '', // imgShow: '' - } + }, }, { - name: '灭火', form: { + name: '灭火', + form: { // mode: '', // people: '', // add: '', // jingshi: '', // imgShow: '' - } + }, }, { - name: '照明', form: { + name: '照明', + form: { // mode: '', // people: '', // zhaoming: '', // imgShow: '' - } + }, }, { - name: '撤离', form: { + name: '撤离', + form: { // cheliluxian: '', // chelixinhao: '', // imgShow: '' - } + }, }, { - name: '讲评', form: { + name: '讲评', + form: { // jiangpingren: '', // qingdian: '', // haode: '', // buzu: '', // imgShow: '' - } - } + }, + }, ], - exerciseData: '' + exerciseData: '', }, - vehicleType: [] - } - } + vehicleType: [], + }, + }; /** * 救援预案信息 */ @@ -148,13 +179,138 @@ export class UnitDetailsComponent implements OnInit { dong: '', xi: '', nan: '', - bei: '' + bei: '', }, luxian: '', - time: '' + time: '', }, other: { - listdata: [{ + listdata: [ + { + name: '消防水源', + data: [ + { name: '消防水池数量', value: '' }, + { name: '消防水池位置', value: '' }, + { name: '总容量(平方米)', value: '' }, + { name: '补给方式', value: '' }, + { name: '室外其他水源', value: '' }, + { name: '室外其他水源位置', value: '' }, + ], + }, + { + name: '消防栓泵', + data: [ + { name: '数量', value: '' }, + { name: '扬程(m)', value: '' }, + { name: '流量(L/S)', value: '' }, + { name: '水泵接合器数量', value: '' }, + { name: '水泵接合器位置', value: '' }, + ], + }, + { + name: '喷淋泵', + data: [ + { name: '数量', value: '' }, + { name: '扬程(m)', value: '' }, + { name: '流量(L/S)', value: '' }, + { name: '水泵接合器数量', value: '' }, + { name: '水泵接合器位置', value: '' }, + ], + }, + { + name: '消防电梯', + data: [ + { name: '数量', value: '' }, + { name: '位置', value: '' }, + ], + }, + { + name: '疏散电梯', + data: [ + { name: '数量', value: '' }, + { name: '位置', value: '' }, + ], + }, + { + name: '安全出口', + data: [ + { name: '数量', value: '' }, + { name: '位置', value: '' }, + ], + }, + { + name: '标准层室内消火栓', + data: [ + { name: '数量', value: '' }, + { name: '位置', value: '' }, + ], + }, + ], + radiodata: [ + { + name: '自动报警系统', + isHave: null, + }, + { + name: '自动喷水系统', + isHave: null, + }, + { + name: '应急广播系统', + isHave: null, + }, + { + name: '放排烟系统', + isHave: null, + }, + ], + }, + key: [], + zhongdiantishi: '', + }, + }; + + /** + * 消防控制室 + */ + + kongzhishiweizhi = ''; + shiwaixiaohuoshuanweizhi = ''; + /** + * 室外消火栓 + */ + shiwaixiaohuoshuan = { + data: { + addres: '', + }, + }; + company: string; + organization: string; + datas: any = { + basicInfo: { + name: '', + address: '', + people: '', + phone: '', + peoplenum: '', + buildingheight: '', + cengshu: '', + jiegou: '', + zhandimianji: '', + zongmianji: '', + xingzhi: '', + pilin: { + dong: '', + xi: '', + nan: '', + bei: '', + }, + luxian: '', + time: '', + }, + other: { + listdata: [ + { name: '消防水源', data: [ { name: '消防水池数量', value: '' }, @@ -162,8 +318,8 @@ export class UnitDetailsComponent implements OnInit { { name: '总容量(平方米)', value: '' }, { name: '补给方式', value: '' }, { name: '室外其他水源', value: '' }, - { name: '室外其他水源位置', value: '' } - ] + { name: '室外其他水源位置', value: '' }, + ], }, { name: '消防栓泵', @@ -172,8 +328,8 @@ export class UnitDetailsComponent implements OnInit { { name: '扬程(m)', value: '' }, { name: '流量(L/S)', value: '' }, { name: '水泵接合器数量', value: '' }, - { name: '水泵接合器位置', value: '' } - ] + { name: '水泵接合器位置', value: '' }, + ], }, { name: '喷淋泵', @@ -183,184 +339,55 @@ export class UnitDetailsComponent implements OnInit { { name: '流量(L/S)', value: '' }, { name: '水泵接合器数量', value: '' }, { name: '水泵接合器位置', value: '' }, - ] - - + ], }, { name: '消防电梯', data: [ { name: '数量', value: '' }, { name: '位置', value: '' }, - ] + ], }, { name: '疏散电梯', data: [ { name: '数量', value: '' }, { name: '位置', value: '' }, - ] + ], }, { name: '安全出口', data: [ { name: '数量', value: '' }, { name: '位置', value: '' }, - ] + ], }, { name: '标准层室内消火栓', data: [ { name: '数量', value: '' }, { name: '位置', value: '' }, - ] - } - - ], - radiodata: [{ + ], + }, + ], + radiodata: [ + { name: '自动报警系统', - isHave: null + isHave: null, }, { name: '自动喷水系统', - isHave: null + isHave: null, }, { name: '应急广播系统', - isHave: null + isHave: null, }, { name: '放排烟系统', - isHave: null - } - ] - }, - key: [ - - ], - zhongdiantishi: '' - } - } - - /** - * 消防控制室 - */ - - kongzhishiweizhi = '' - shiwaixiaohuoshuanweizhi = '' - /** - * 室外消火栓 - */ - shiwaixiaohuoshuan = { - data: { - addres: '' - } - } - company: string - organization: string - datas: any = { - basicInfo: { - name: '', - address: '', - people: '', - phone: '', - peoplenum: '', - buildingheight: '', - cengshu: '', - jiegou: '', - zhandimianji: '', - zongmianji: '', - xingzhi: '', - pilin: { - dong: '', - xi: '', - nan: '', - bei: '' - }, - luxian: '', - time: '' - }, - other: { - listdata: [{ - name: '消防水源', - data: [ - { name: '消防水池数量', value: '' }, - { name: '消防水池位置', value: '' }, - { name: '总容量(平方米)', value: '' }, - { name: '补给方式', value: '' }, - { name: '室外其他水源', value: '' }, - { name: '室外其他水源位置', value: '' } - ] - }, - { - name: '消防栓泵', - data: [ - { name: '数量', value: '' }, - { name: '扬程(m)', value: '' }, - { name: '流量(L/S)', value: '' }, - { name: '水泵接合器数量', value: '' }, - { name: '水泵接合器位置', value: '' } - ] - }, - { - name: '喷淋泵', - data: [ - { name: '数量', value: '' }, - { name: '扬程(m)', value: '' }, - { name: '流量(L/S)', value: '' }, - { name: '水泵接合器数量', value: '' }, - { name: '水泵接合器位置', value: '' }, - ] - - - }, - { - name: '消防电梯', - data: [ - { name: '数量', value: '' }, - { name: '位置', value: '' }, - ] - }, - { - name: '疏散电梯', - data: [ - { name: '数量', value: '' }, - { name: '位置', value: '' }, - ] - }, - { - name: '安全出口', - data: [ - { name: '数量', value: '' }, - { name: '位置', value: '' }, - ] - }, - { - name: '标准层室内消火栓', - data: [ - { name: '数量', value: '' }, - { name: '位置', value: '' }, - ] - } - + isHave: null, + }, ], - radiodata: [{ - name: '自动报警系统', - isHave: null - }, - { - name: '自动喷水系统', - isHave: null - }, - { - name: '应急广播系统', - isHave: null - }, - { - name: '放排烟系统', - isHave: null - } - ] }, key: [ { @@ -370,8 +397,8 @@ export class UnitDetailsComponent implements OnInit { { name: '所在位置', value: '' }, { name: '建筑结构', value: '' }, { name: '使用性质', value: '' }, - { name: '主要危险性', value: '' } - ] + { name: '主要危险性', value: '' }, + ], }, { buwei: '', @@ -380,9 +407,9 @@ export class UnitDetailsComponent implements OnInit { { name: '所在位置', value: '' }, { name: '建筑结构', value: '' }, { name: '使用性质', value: '' }, - { name: '主要危险性', value: '' } - ] - } + { name: '主要危险性', value: '' }, + ], + }, ], ewai: { kongzhishiweizhi: '', @@ -390,231 +417,270 @@ export class UnitDetailsComponent implements OnInit { shiwaishuliang: '', shiwaiweizhi: '', }, - zhongdiantishi: '' - } + zhongdiantishi: '', + }; validateForm!: FormGroup; - id = "" - integrity = 0 + id = ''; + integrity = 0; - taskAlldataOfcompany: any - taskAlldataOfform: any - checkTime: string + taskAlldataOfcompany: any; + taskAlldataOfform: any; + checkTime: string; - isHaveLastTask = true + isHaveLastTask = true; ngOnInit(): void { - this.id = this.router['browserUrlTree'].queryParams.id - if (this.router['browserUrlTree'].queryParams.pattern != "edit") { - this.disableds = true + this.id = this.router['browserUrlTree'].queryParams.id; + if (this.router['browserUrlTree'].queryParams.pattern != 'edit') { + this.disableds = true; } - this.company = this.route.snapshot.queryParams.company - this.organization = this.route.snapshot.queryParams.organization - - let taskId = this.route.snapshot.queryParams.id - this.methodService.getCompanyTaskDetails(taskId).then((data: any) => { - this.checkTime = data.checkTime - let obj = JSON.parse(data.resultData) - console.log('所有数据', obj) - this.taskAlldataOfcompany = obj.company - this.taskAlldataOfform = obj.form - - let exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form) - if (exerciseData.data.data) { - this.exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form) - } - // console.log('实战演练详情', this.exerciseData) - - let planData = this.methodService.getTaskDetailsItem('数字化预案', obj.form) - if (JSON.stringify(planData.data) != "{}") { - if (JSON.stringify(planData.data.basicInfo) != "{}") { - this.planData.data.basicInfo = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.basicInfo + this.company = this.route.snapshot.queryParams.company; + this.organization = this.route.snapshot.queryParams.organization; + + let taskId = this.route.snapshot.queryParams.id; + this.methodService + .getCompanyTaskDetails(taskId) + .then((data: any) => { + this.checkTime = data.checkTime; + let obj = JSON.parse(data.resultData); + console.log('所有数据', obj); + this.taskAlldataOfcompany = obj.company; + this.taskAlldataOfform = obj.form; + + let exerciseData = this.methodService.getTaskDetailsItem( + '实战演练', + obj.form + ); + if (exerciseData.data.data) { + this.exerciseData = this.methodService.getTaskDetailsItem( + '实战演练', + obj.form + ); } - if (JSON.stringify(planData.data.other) != "{}") { - this.planData.data.other = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.other - } - if (planData.data.key.lenth != 0) { - this.planData.data.key = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.key - } - if (planData.data.zhongdiantishi) { - this.planData.data.zhongdiantishi = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.zhongdiantishi + // console.log('实战演练详情', this.exerciseData) + + let planData = this.methodService.getTaskDetailsItem( + '数字化预案', + obj.form + ); + if (JSON.stringify(planData.data) != '{}') { + if (JSON.stringify(planData.data.basicInfo) != '{}') { + this.planData.data.basicInfo = + this.methodService.getTaskDetailsItem( + '数字化预案', + obj.form + ).data.basicInfo; + } + if (JSON.stringify(planData.data.other) != '{}') { + this.planData.data.other = this.methodService.getTaskDetailsItem( + '数字化预案', + obj.form + ).data.other; + } + if (planData.data.key.lenth != 0) { + this.planData.data.key = this.methodService.getTaskDetailsItem( + '数字化预案', + obj.form + ).data.key; + } + if (planData.data.zhongdiantishi) { + this.planData.data.zhongdiantishi = + this.methodService.getTaskDetailsItem( + '数字化预案', + obj.form + ).data.zhongdiantishi; + } } - } - // console.log('数字化预案详情', this.planData) - this.kongzhishiweizhi = obj.company.datas.facilities.controlPosition - this.shiwaixiaohuoshuanweizhi = obj.company.datas.facilities.fireFightingFacilities.shiwaifenbu - // let kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form) - // if (JSON.stringify(kongzhishi.data) != "{}") { - // this.kongzhishiweizhi = this.methodService.getTaskDetailsItem('消防控制室', obj.form) - // } - // let shiwaixiaohuoshuan = this.methodService.getTaskDetailsItem('室外消火栓', obj.form) - // if (JSON.stringify(shiwaixiaohuoshuan.data) != "{}") { - // this.shiwaixiaohuoshuan = this.methodService.getTaskDetailsItem('室外消火栓', obj.form) - // } - // console.log('消防控制室详情', this.kongzhishi) - // console.log('室外消火栓详情', this.shiwaixiaohuoshuan) - }).catch((err) => { - this.isHaveLastTask = false - }) + // console.log('数字化预案详情', this.planData) + this.kongzhishiweizhi = obj.company.datas.facilities.controlPosition; + this.shiwaixiaohuoshuanweizhi = + obj.company.datas.facilities.fireFightingFacilities.shiwaifenbu; + // let kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form) + // if (JSON.stringify(kongzhishi.data) != "{}") { + // this.kongzhishiweizhi = this.methodService.getTaskDetailsItem('消防控制室', obj.form) + // } + // let shiwaixiaohuoshuan = this.methodService.getTaskDetailsItem('室外消火栓', obj.form) + // if (JSON.stringify(shiwaixiaohuoshuan.data) != "{}") { + // this.shiwaixiaohuoshuan = this.methodService.getTaskDetailsItem('室外消火栓', obj.form) + // } + // console.log('消防控制室详情', this.kongzhishi) + // console.log('室外消火栓详情', this.shiwaixiaohuoshuan) + }) + .catch((err) => { + this.isHaveLastTask = false; + }); this.validateForm = this.fb.group({ - code: [null], + // code: [null], organizationId: [null, [Validators.required]], - relatedOrganizationId: [null], - buildingTypeId: [null], + relatedOrganizationId: [null, [Validators.required]], + buildingTypeId: [null, [Validators.required]], companyLevel: [null, [Validators.required]], - useNature: [null], - legalPersonName: [null], - legalPersonPhone: [null], - principalName: [null], - principalPhone: [null], - adminName: [null], - adminPhone: [null] + // useNature: [null, [Validators.required]], + legalPersonName: [null, [Validators.required]], + legalPersonPhone: [null, [Validators.required]], + // principalName: [null], + // principalPhone: [null], + adminName: [null, [Validators.required]], + adminPhone: [null, [Validators.required]], }); - this.getAllOrganization() - this.getAllOrganization2() - this.getCompanies() - this.getBuildingTypes() + this.getAllOrganization(); + this.getAllOrganization2(); + this.getCompanies(); + this.getBuildingTypes(); } - - imageUrl = ''//单位照片 - isLoadingSave: boolean = false - uploadIndex: string + imageUrl = ''; //单位照片 + isLoadingSave: boolean = false; + uploadIndex: string; filechange(e) { - this.isLoadingSave = true - let file = e.target.files[0] || null //获取上传的文件 - this.openFileSelect(file, `unitPhoto/${this.id}/`) + this.isLoadingSave = true; + let file = e.target.files[0] || null; //获取上传的文件 + this.openFileSelect(file, `unitPhoto/${this.id}/`); } //设置文件路径并上传 - postFilePath + postFilePath; openFileSelect(file: File, extensionPath: string) { this.postFilePath = extensionPath; - let fileSize = file.size || null //上传文件的总大小 - let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传 - if (fileSize >= shardSize) // 超过5MB要分块上传 - { + let fileSize = file.size || null; //上传文件的总大小 + let shardSize = 5 * 1024 * 1024; //5MB 超过5MB要分块上传 + if (fileSize >= shardSize) { + // 超过5MB要分块上传 this.postFileByMul(file); - } - else //普通上传 - { + } //普通上传 + else { this.postFile(file); } } //小文件直接上传 async postFile(file: File) { await new Promise((resolve, reject) => { - this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => { + this.objectsSrv.postFile(this.postFilePath, file).subscribe((data) => { let dataObj = data as any; - let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName; - this.imageUrl = filePath - this.isLoadingSave = false - resolve('success') + let filePath: string = + ObjectsSimpleService.baseUrl + dataObj.objectName; + this.imageUrl = filePath; + this.isLoadingSave = false; + resolve('success'); }); - }) + }); } //大文件分块上传 postFileByMul(file: File) { - this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => { - let dataObj = value as any; - let filePath = dataObj.filePath - this.imageUrl = filePath - this.isLoadingSave = false - }); + this.objectsSrv + .postFile_MultipartUpload(this.postFilePath, file) + .then((value) => { + let dataObj = value as any; + let filePath = dataObj.filePath; + this.imageUrl = filePath; + this.isLoadingSave = false; + }); } - //查看图片 viewImg(url) { - let dom = document.getElementById(`viewerjs`) + let dom = document.getElementById(`viewerjs`); let pObjs = dom.childNodes; - let node = document.createElement("img") - node.style.display = "none"; + let node = document.createElement('img'); + node.style.display = 'none'; node.src = url; - node.id = 'img' - dom.appendChild(node) + node.id = 'img'; + dom.appendChild(node); setTimeout(() => { let viewer = new Viewer(document.getElementById(`viewerjs`), { hidden: () => { dom.removeChild(pObjs[0]); viewer.destroy(); - } + }, }); node.click(); }, 0); } - - isMapLabel: boolean + isMapLabel: boolean; //地图标注位置 - markerPosition: any = { x: 0, y: 0 }//单位坐标 - map: any //地图实例 - isGisTopBox: boolean = false//点击位置按钮 - isGisTopBoxTwo: boolean = false//点击位置按钮 - oldPositionMarker: any //旧位置marker实例 - newPositionMarker: any //新位置marker实例 + markerPosition: any = { x: 0, y: 0 }; //单位坐标 + map: any; //地图实例 + isGisTopBox: boolean = false; //点击位置按钮 + isGisTopBoxTwo: boolean = false; //点击位置按钮 + oldPositionMarker: any; //旧位置marker实例 + newPositionMarker: any; //新位置marker实例 newPositionMarkerContent: any = '
' + ' ' + '
' + - '
' + '
'; newPositionMarkerContentBtn: any = '
' + ' ' + '
|
' + - '
' + '
'; oldPositionMarkerContent: any = '
' + ' ' + '
' + - '
' + '
'; //初始化地图 - searchTitle: any//搜索内容 - placeSearch: any//地址搜索类 + searchTitle: any; //搜索内容 + placeSearch: any; //地址搜索类 search() { this.placeSearch.search(this.searchTitle, (status, result) => { // 搜索成功时,result即是对应的匹配数据 - if (result.info == "OK") { - this.newPositionMarker.setPosition([result.poiList.pois[0].location.lng, result.poiList.pois[0].location.lat]) - this.markerPosition2 = { x: result.poiList.pois[0].location.lng, y: result.poiList.pois[0].location.lat } - this.map.setCenter([result.poiList.pois[0].location.lng, result.poiList.pois[0].location.lat]); //设置地图中心点 + if (result.info == 'OK') { + this.newPositionMarker.setPosition([ + result.poiList.pois[0].location.lng, + result.poiList.pois[0].location.lat, + ]); + this.markerPosition2 = { + x: result.poiList.pois[0].location.lng, + y: result.poiList.pois[0].location.lat, + }; + this.map.setCenter([ + result.poiList.pois[0].location.lng, + result.poiList.pois[0].location.lat, + ]); //设置地图中心点 } else { - alert('查询不到输入地址信息') + alert('查询不到输入地址信息'); } - }) + }); } //初始化地图 - markerPosition2 + markerPosition2; labelGis() { this.map = new AMap.Map('container', { - zoom: 12 - }) + zoom: 12, + }); this.map.on('complete', () => { - this.isGisTopBox = true + this.isGisTopBox = true; }); //输入提示 var autoOptions = { - input: "tipinput" + input: 'tipinput', }; AMap.plugin(['AMap.PlaceSearch', 'AMap.AutoComplete'], () => { var auto = new AMap.AutoComplete(autoOptions); - this.placeSearch = new AMap.PlaceSearch(); //构造地点查询类 - auto.on("select", (e) => { - this.newPositionMarker.setPosition([e.poi.location.lng, e.poi.location.lat]) - this.markerPosition2 = { x: e.poi.location.lng, y: e.poi.location.lat } + this.placeSearch = new AMap.PlaceSearch(); //构造地点查询类 + auto.on('select', (e) => { + this.newPositionMarker.setPosition([ + e.poi.location.lng, + e.poi.location.lat, + ]); + this.markerPosition2 = { x: e.poi.location.lng, y: e.poi.location.lat }; this.map.setCenter([e.poi.location.lng, e.poi.location.lat]); //设置地图中心点 - });//注册监听,当选中某条记录时会触发 + }); //注册监听,当选中某条记录时会触发 }); - if (this.isMapLabel) {//如果已经标注单位坐标 - console.log('已标注单位位置') + if (this.isMapLabel) { + //如果已经标注单位坐标 + console.log('已标注单位位置'); this.map.setCenter([this.olddata.location.x, this.olddata.location.y]); this.oldPositionMarker = new AMap.Marker({ position: [this.olddata.location.x, this.olddata.location.y], content: this.newPositionMarkerContent, - offset: new AMap.Pixel(-34, -36) - }) + offset: new AMap.Pixel(-34, -36), + }); // 将 markers 添加到地图 this.map.add(this.oldPositionMarker); } else { @@ -625,78 +691,90 @@ export class UnitDetailsComponent implements OnInit { //点击位置按钮 setPosition() { - if (this.disableds) { - return + return; } - - this.isGisTopBox = false - this.isGisTopBoxTwo = true - if (this.isMapLabel) {//如果已经标注单位坐标 + this.isGisTopBox = false; + this.isGisTopBoxTwo = true; + if (this.isMapLabel) { + //如果已经标注单位坐标 // console.log('已标注单位位置') if (this.oldPositionMarker) { - this.oldPositionMarker.setContent(this.oldPositionMarkerContent) + this.oldPositionMarker.setContent(this.oldPositionMarkerContent); } if (this.newPositionMarker) { - this.newPositionMarker.setContent(this.oldPositionMarkerContent) + this.newPositionMarker.setContent(this.oldPositionMarkerContent); } this.newPositionMarker = new AMap.Marker({ draggable: true, position: [this.markerPosition.x, this.markerPosition.y], content: this.newPositionMarkerContentBtn, - offset: new AMap.Pixel(-34, -36) + offset: new AMap.Pixel(-34, -36), }); this.map.add(this.newPositionMarker); if (this.markerPosition.x && this.markerPosition.x != 0) { - this.markerPosition2 = { x: this.markerPosition.x, y: this.markerPosition.y } + this.markerPosition2 = { + x: this.markerPosition.x, + y: this.markerPosition.y, + }; } else { - this.markerPosition2 = { x: this.map.getCenter().lng, y: this.map.getCenter().lat } //获取当前地图中心位置 + this.markerPosition2 = { + x: this.map.getCenter().lng, + y: this.map.getCenter().lat, + }; //获取当前地图中心位置 } this.newPositionMarker.on('dragend', (e) => { - let lnglat = this.map.containerToLngLat(e.pixel) - this.markerPosition2 = { x: lnglat.KL, y: lnglat.kT } - }) + let lnglat = this.map.containerToLngLat(e.pixel); + this.markerPosition2 = { x: lnglat.KL, y: lnglat.kT }; + }); this.newPositionMarker.on('dragging', (e) => { - let lnglat = this.map.containerToLngLat(e.pixel) + let lnglat = this.map.containerToLngLat(e.pixel); this.newPositionMarker.setPosition(lnglat); - }) + }); //点击确定 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'), 'click', (event) => { - this.map.clearMap(); - this.isGisTopBox = true - this.isGisTopBoxTwo = false - this.newPositionMarker = new AMap.Marker({ - position: [this.markerPosition2.x, this.markerPosition2.y], - content: this.newPositionMarkerContent, - offset: new AMap.Pixel(-34, -36) - }); - this.markerPosition = this.markerPosition2 - this.map.add(this.newPositionMarker); - }) + this.renderer2.listen( + this.elementRef.nativeElement.querySelector('#setPositionOk'), + 'click', + (event) => { + this.map.clearMap(); + this.isGisTopBox = true; + this.isGisTopBoxTwo = false; + this.newPositionMarker = new AMap.Marker({ + position: [this.markerPosition2.x, this.markerPosition2.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-34, -36), + }); + this.markerPosition = this.markerPosition2; + this.map.add(this.newPositionMarker); + } + ); //点击取消 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'), 'click', (event) => { - this.isGisTopBox = true - this.isGisTopBoxTwo = false - this.map.clearMap(); - this.newPositionMarker = new AMap.Marker({ - position: [this.markerPosition.x, this.markerPosition.y], - content: this.newPositionMarkerContent, - offset: new AMap.Pixel(-34, -36) - }); - this.map.setCenter([this.markerPosition.x, this.markerPosition.y]); //设置地图中心点 - this.map.add(this.newPositionMarker); - }) - + this.renderer2.listen( + this.elementRef.nativeElement.querySelector('#setPositionClose'), + 'click', + (event) => { + this.isGisTopBox = true; + this.isGisTopBoxTwo = false; + this.map.clearMap(); + this.newPositionMarker = new AMap.Marker({ + position: [this.markerPosition.x, this.markerPosition.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-34, -36), + }); + this.map.setCenter([this.markerPosition.x, this.markerPosition.y]); //设置地图中心点 + this.map.add(this.newPositionMarker); + } + ); } else { // console.log('未标注单位位置') if (this.newPositionMarker) { - this.newPositionMarker.setContent(this.oldPositionMarkerContent) + this.newPositionMarker.setContent(this.oldPositionMarkerContent); } - let center + let center; //this.markerPosition---单位坐标 if (this.markerPosition.x && this.markerPosition.x != 0) { - center = [this.markerPosition.x, this.markerPosition.y] + center = [this.markerPosition.x, this.markerPosition.y]; } else { center = this.map.getCenter(); //获取当前地图中心位置 // console.log('获取当前地图中心位置', center) @@ -707,71 +785,84 @@ export class UnitDetailsComponent implements OnInit { draggable: true, position: center, content: this.newPositionMarkerContentBtn, - offset: new AMap.Pixel(-34, -36) + offset: new AMap.Pixel(-34, -36), }); this.map.add(this.newPositionMarker); if (this.markerPosition.x && this.markerPosition.x != 0) { - this.markerPosition2 = { x: this.markerPosition.x, y: this.markerPosition.y } + this.markerPosition2 = { + x: this.markerPosition.x, + y: this.markerPosition.y, + }; } else { - this.markerPosition2 = { x: this.map.getCenter().lng, y: this.map.getCenter().lat } //获取当前地图中心位置 + this.markerPosition2 = { + x: this.map.getCenter().lng, + y: this.map.getCenter().lat, + }; //获取当前地图中心位置 } this.newPositionMarker.on('dragend', (e) => { - let lnglat = this.map.containerToLngLat(e.pixel) - this.markerPosition2 = { x: lnglat.KL, y: lnglat.kT } - }) + let lnglat = this.map.containerToLngLat(e.pixel); + this.markerPosition2 = { x: lnglat.KL, y: lnglat.kT }; + }); this.newPositionMarker.on('dragging', (e) => { - let lnglat = this.map.containerToLngLat(e.pixel) + let lnglat = this.map.containerToLngLat(e.pixel); this.newPositionMarker.setPosition(lnglat); - }) + }); //点击确定 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'), 'click', (event) => { - this.isGisTopBox = true - this.isGisTopBoxTwo = false - this.markerPosition = this.markerPosition2 - this.map.clearMap(); - this.newPositionMarker = new AMap.Marker({ - position: [this.markerPosition.x, this.markerPosition.y], - content: this.newPositionMarkerContent, - offset: new AMap.Pixel(-34, -36) - }); - this.newPositionMarker.setMap(this.map) - }) - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'), 'click', (event) => { - this.map.clearMap(); - this.isGisTopBox = true - this.isGisTopBoxTwo = false - if (this.markerPosition.x && this.markerPosition.x != 0) {//说明之前标过点 + this.renderer2.listen( + this.elementRef.nativeElement.querySelector('#setPositionOk'), + 'click', + (event) => { + this.isGisTopBox = true; + this.isGisTopBoxTwo = false; + this.markerPosition = this.markerPosition2; + this.map.clearMap(); this.newPositionMarker = new AMap.Marker({ position: [this.markerPosition.x, this.markerPosition.y], content: this.newPositionMarkerContent, - offset: new AMap.Pixel(-34, -36) + offset: new AMap.Pixel(-34, -36), }); - this.map.setCenter([this.markerPosition.x, this.markerPosition.y]); //设置地图中心点 - this.map.add(this.newPositionMarker); + this.newPositionMarker.setMap(this.map); + } + ); + this.renderer2.listen( + this.elementRef.nativeElement.querySelector('#setPositionClose'), + 'click', + (event) => { + this.map.clearMap(); + this.isGisTopBox = true; + this.isGisTopBoxTwo = false; + if (this.markerPosition.x && this.markerPosition.x != 0) { + //说明之前标过点 + this.newPositionMarker = new AMap.Marker({ + position: [this.markerPosition.x, this.markerPosition.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-34, -36), + }); + this.map.setCenter([this.markerPosition.x, this.markerPosition.y]); //设置地图中心点 + this.map.add(this.newPositionMarker); + } } - })//取消 + ); //取消 } - } - - listOfData: any[] = []; listOfData2: any[] = []; - exportClick() { - - let keyHtml = '' + let keyHtml = ''; if (this.datas.key.length != 0) { this.datas.key.forEach((item, key) => { - keyHtml += ` + keyHtml += + `

重点部位情况(`+ key + `)

+ style="font-family:宋体; font-size:9pt">重点部位情况(` + + key + + `)

@@ -781,7 +872,9 @@ export class UnitDetailsComponent implements OnInit {

`+ item.data[0].value + `

+ style="font-family:宋体; font-size:9pt">` + + item.data[0].value + + `

@@ -791,7 +884,9 @@ export class UnitDetailsComponent implements OnInit {

`+ item.data[1].value + `

+ style="font-family:宋体; font-size:9pt">` + + item.data[1].value + + `

@@ -801,7 +896,9 @@ export class UnitDetailsComponent implements OnInit {

`+ item.data[2].value + `

+ style="font-family:宋体; font-size:9pt">` + + item.data[2].value + + `

@@ -811,7 +908,9 @@ export class UnitDetailsComponent implements OnInit {

`+ item.data[3].value + `

+ style="font-family:宋体; font-size:9pt">` + + item.data[3].value + + `

@@ -823,19 +922,23 @@ export class UnitDetailsComponent implements OnInit {

`+ item.data[4].value + `

+ style="font-family:宋体; font-size:9pt">` + + item.data[4].value + + `

-` +`; }); } - - let box = ` + let box = + `
@@ -853,7 +956,9 @@ export class UnitDetailsComponent implements OnInit { @@ -884,7 +993,9 @@ export class UnitDetailsComponent implements OnInit { @@ -914,7 +1029,9 @@ export class UnitDetailsComponent implements OnInit { @@ -956,22 +1079,30 @@ export class UnitDetailsComponent implements OnInit { @@ -983,7 +1114,9 @@ export class UnitDetailsComponent implements OnInit { @@ -1004,7 +1137,9 @@ export class UnitDetailsComponent implements OnInit { @@ -1021,7 +1156,9 @@ export class UnitDetailsComponent implements OnInit { @@ -1063,7 +1206,9 @@ export class UnitDetailsComponent implements OnInit { @@ -1086,7 +1233,9 @@ export class UnitDetailsComponent implements OnInit { @@ -1132,7 +1287,9 @@ export class UnitDetailsComponent implements OnInit { @@ -1161,20 +1320,26 @@ export class UnitDetailsComponent implements OnInit { 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">

数量:`+ this.datas.other.listdata[1].data[0].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[1].data[0].value + + `

@@ -1204,20 +1373,26 @@ export class UnitDetailsComponent implements OnInit { 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">

数量:`+ this.datas.other.listdata[2].data[0].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[2].data[0].value + + `

@@ -1247,7 +1426,11 @@ export class UnitDetailsComponent implements OnInit { @@ -1284,7 +1475,9 @@ export class UnitDetailsComponent implements OnInit { - `+ keyHtml + ` + ` + + keyHtml + + ` @@ -1337,42 +1538,50 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.basicInfo.name + `` + + this.datas.basicInfo.name + + `基本情况

`+ this.datas.basicInfo.name + `

+ style="font-family:宋体; font-size:9pt">` + + this.datas.basicInfo.name + + `

@@ -863,7 +968,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.basicInfo.address + ` + style="font-family:宋体; font-size:9pt">` + + this.datas.basicInfo.address + + `

@@ -873,7 +980,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.basicInfo.phone + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.basicInfo.phone + + `

-

`+ this.datas.basicInfo.peoplenum + `

+

` + + this.datas.basicInfo.peoplenum + + `

@@ -893,7 +1004,9 @@ export class UnitDetailsComponent implements OnInit { -

`+ this.datas.basicInfo.buildingheight + `

+

` + + this.datas.basicInfo.buildingheight + + `

@@ -902,7 +1015,9 @@ export class UnitDetailsComponent implements OnInit { -

`+ this.datas.basicInfo.cengshu + `

+

` + + this.datas.basicInfo.cengshu + + `

`+ this.datas.basicInfo.jiegou + `

+ style="font-family:宋体; font-size:9pt">` + + this.datas.basicInfo.jiegou + + `

@@ -924,7 +1041,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.basicInfo.zhandimianji + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.basicInfo.zhandimianji + + `

@@ -934,7 +1053,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.basicInfo.zongmianji + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.basicInfo.zongmianji + + `

@@ -944,7 +1065,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.basicInfo.xingzhi + `

+ style="font-family:宋体; font-size:9pt">` + + this.datas.basicInfo.xingzhi + + `

东:`+ this.datas.basicInfo.pilin.dong + `

+ style="font-family:宋体; font-size:9pt">东:` + + this.datas.basicInfo.pilin.dong + + `

南:`+ this.datas.basicInfo.pilin.nan + `

+ style="font-family:宋体; font-size:9pt">南:` + + this.datas.basicInfo.pilin.nan + + `

西:`+ this.datas.basicInfo.pilin.xi + `

+ style="font-family:宋体; font-size:9pt">西:` + + this.datas.basicInfo.pilin.xi + + `

北:`+ this.datas.basicInfo.pilin.bei + `

+ style="font-family:宋体; font-size:9pt">北:` + + this.datas.basicInfo.pilin.bei + + `

`+ this.datas.basicInfo.luxian + `

+ style="font-family:宋体; font-size:9pt">` + + this.datas.basicInfo.luxian + + `

-

`+ this.datas.ewai.kongzhishiweizhi + `

+

` + + this.datas.ewai.kongzhishiweizhi + + `

`+ this.datas.other.listdata[0].data[0].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[0].data[0].value + + `

@@ -1031,7 +1168,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.other.listdata[0].data[1].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[0].data[1].value + + `

@@ -1041,7 +1180,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.other.listdata[0].data[2].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[0].data[2].value + + `

@@ -1051,7 +1192,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.other.listdata[0].data[3].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[0].data[3].value + + `

`+ this.datas.other.listdata[0].data[4].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[0].data[4].value + + `

@@ -1073,7 +1218,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.other.listdata[0].data[5].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[0].data[5].value + + `

- `+ (this.datas.other.radiodata[0].isHave ? '有' : '无') + ` + ` + + (this.datas.other.radiodata[0].isHave ? '有' : '无') + + `

- `+ (this.datas.other.radiodata[1].isHave ? '有' : '无') + ` + ` + + (this.datas.other.radiodata[1].isHave ? '有' : '无') + + `

- `+ (this.datas.other.radiodata[2].isHave ? '有' : '无') + ` + ` + + (this.datas.other.radiodata[2].isHave ? '有' : '无') + + `

- `+ (this.datas.other.radiodata[3].isHave ? '有' : '无') + ` + ` + + (this.datas.other.radiodata[3].isHave ? '有' : '无') + + `

`+ this.datas.ewai.shiwaishuliang + `` + + this.datas.ewai.shiwaishuliang + + `

`+ this.datas.ewai.shiwaiweizhi + `

+ style="font-family:宋体; font-size:9pt">` + + this.datas.ewai.shiwaiweizhi + + `

扬程:`+ this.datas.other.listdata[1].data[1].value + `` + + this.datas.other.listdata[1].data[1].value + + `m

流量`+ this.datas.other.listdata[1].data[2].value + `` + + this.datas.other.listdata[1].data[2].value + + `L/S

数量:`+ this.datas.other.listdata[1].data[3].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[1].data[3].value + + `

`+ this.datas.other.listdata[1].data[4].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[1].data[4].value + + `

扬程:`+ this.datas.other.listdata[2].data[1].value + `` + + this.datas.other.listdata[2].data[1].value + + `m

流量:`+ this.datas.other.listdata[2].data[2].value + `` + + this.datas.other.listdata[2].data[2].value + + `L/S

数量:`+ this.datas.other.listdata[2].data[3].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[2].data[3].value + + `

`+ this.datas.other.listdata[2].data[4].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[2].data[4].value + + `

-

`+ this.datas.other.listdata[3].data[0].value + ',' + this.datas.other.listdata[3].data[1].value + ` +

` + + this.datas.other.listdata[3].data[0].value + + ',' + + this.datas.other.listdata[3].data[1].value + + `

`+ this.datas.other.listdata[4].data[0].value + ',' + this.datas.other.listdata[4].data[1].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[4].data[0].value + + ',' + + this.datas.other.listdata[4].data[1].value + + `

@@ -1272,7 +1459,11 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.other.listdata[5].data[0].value + ',' + this.datas.other.listdata[5].data[1].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[5].data[0].value + + ',' + + this.datas.other.listdata[5].data[1].value + + `

`+ this.datas.ewai.shineishuliang + `` + + this.datas.ewai.shineishuliang + + `

`+ this.datas.other.listdata[6].data[0].value + ',' + this.datas.other.listdata[6].data[1].value + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.other.listdata[6].data[0].value + + ',' + + this.datas.other.listdata[6].data[1].value + + `

@@ -1310,7 +1509,9 @@ export class UnitDetailsComponent implements OnInit {

`+ this.datas.zhongdiantishi + `

+ style="font-family:'Times New Roman'; font-size:9pt">` + + this.datas.zhongdiantishi + + `

 

` + style="font-family:Calibri; font-size:10.5pt"> 

`; - const htmlString = ` + const htmlString = + ` Document - `+ box + ` + ` + + box + + ` - ` - console.log(htmlString) + `; + console.log(htmlString); const fileData = asBlob(htmlString).then((data: any) => { - saveAs(data, this.datas.basicInfo.name + '基本信息.docx') // 保存为docx文件 - }) - + saveAs(data, this.datas.basicInfo.name + '基本信息.docx'); // 保存为docx文件 + }); } back() { - window.history.back() + window.history.back(); } edit() { + console.log(this.validateForm) + if(this.validateForm.invalid){ + this.message.create('warning', '请填写完整'); + return + } + // return let body = { id: this.id, - usci: this.validateForm.value.code, + // usci: this.validateForm.value.code, organizationId: this.validateForm.value.organizationId, relatedOrganizationId: this.validateForm.value.relatedOrganizationId, buildingTypeId: this.validateForm.value.buildingTypeId, companyLevel: this.validateForm.value.companyLevel, - useNature: this.validateForm.value.useNature, + // useNature: this.validateForm.value.useNature, legalPersonName: this.validateForm.value.legalPersonName, legalPersonPhone: this.validateForm.value.legalPersonPhone, - directorName: this.validateForm.value.principalName, - directorPhone: this.validateForm.value.principalPhone, + // directorName: this.validateForm.value.principalName, + // directorPhone: this.validateForm.value.principalPhone, securityAdministratorName: this.validateForm.value.adminName, securityAdministratorPhone: this.validateForm.value.adminPhone, imageFile: this.imageUrl, @@ -1382,123 +1591,129 @@ export class UnitDetailsComponent implements OnInit { integrity: 0, location: { x: this.markerPosition.x, - y: this.markerPosition.y - } - } + y: this.markerPosition.y, + }, + }; //计算完整度 - body.integrity = this.methodService.getIntegrity(body) + body.integrity = this.methodService.getIntegrity(body); - this.http.patch('/api/Companies/' + this.id, body).subscribe(data => { + this.http.patch('/api/Companies/' + this.id, body).subscribe((data) => { this.message.create('success', '保存成功!'); - this.getCompanies() - }) + this.getCompanies(); + }); } - - - BuildingTypes + BuildingTypes; getBuildingTypes() { this.http.get('/api/BuildingTypes').subscribe((data: any) => { - this.BuildingTypes = data - }) + this.BuildingTypes = data; + }); } - olddata: any + olddata: any; getCompanies() { this.http.get('/api/Companies/' + this.id).subscribe((data: any) => { console.log('当前单位信息', data); - this.olddata = data - if (data.data && data.data != "{}" && !JSON.parse(data.data).KeyParts) { - this.datas = JSON.parse(data.data) + this.olddata = data; + if (data.data && data.data != '{}' && !JSON.parse(data.data).KeyParts) { + this.datas = JSON.parse(data.data); if (!this.datas.ewai) { this.datas.ewai = { - kongzhishiweizhi: "", - shineishuliang: "", - shiwaishuliang: "", - shiwaiweizhi: "" - } + kongzhishiweizhi: '', + shineishuliang: '', + shiwaishuliang: '', + shiwaiweizhi: '', + }; } - }else{ - this.datas.basicInfo.name = data.companyName || '' - this.datas.basicInfo.address = data.address || '' - this.datas.basicInfo.xingzhi = data.useNature || '' + } else { + this.datas.basicInfo.name = data.companyName || ''; + this.datas.basicInfo.address = data.address || ''; + // this.datas.basicInfo.xingzhi = data.useNature || ''; } - this.imageUrl = data.imageFile + this.imageUrl = data.imageFile; console.log('当前单位信息2', this.datas); this.validateForm.patchValue({ - code: data.usci, + // code: data.usci, organizationId: data.organizationId, relatedOrganizationId: data.relatedOrganizationId, buildingTypeId: data.buildingTypeId, - companyLevel: data.companyLevel, - useNature: data.useNature, - + // useNature: data.useNature, legalPersonName: data.legalPersonName, legalPersonPhone: data.legalPersonPhone, - principalName: data.directorName, - principalPhone: data.directorPhone, + // principalName: data.directorName, + // principalPhone: data.directorPhone, adminName: data.securityAdministratorName, adminPhone: data.securityAdministratorPhone, - }) - if (this.olddata.location && (this.olddata.location.x != 0 && this.olddata.location.y != 0)) {//已标注 - this.isMapLabel = true - this.markerPosition = this.olddata.location - } else {//未标注 - this.isMapLabel = false + }); + if ( + this.olddata.location && + this.olddata.location.x != 0 && + this.olddata.location.y != 0 + ) { + //已标注 + this.isMapLabel = true; + this.markerPosition = this.olddata.location; + } else { + //未标注 + this.isMapLabel = false; } - this.labelGis() - }) + this.labelGis(); + }); } - - - nodes: any = [] + nodes: any = []; getAllOrganization() { - let organizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId + let organizationId = JSON.parse( + sessionStorage.getItem('userData') + ).organizationId; let params = { - ContainsChildren: "true", + ContainsChildren: 'true', PageNumber: 1, - PageSize: 9999 - } - this.http.get('/api/Organizations', { - params: params - }).subscribe((data: any) => { - console.log('组织机构', data.items) - data.items.forEach(element => { - if (element.id == organizationId) { - element.parentId = null - } - element.key = element.id - element.title = element.name - element.level == 'squadron' ? element.isLeaf = true : null + PageSize: 9999, + }; + this.http + .get('/api/Organizations', { + params: params, + }) + .subscribe((data: any) => { + console.log('组织机构', data.items); + data.items.forEach((element) => { + if (element.id == organizationId) { + element.parentId = null; + } + element.key = element.id; + element.title = element.name; + element.level == 'squadron' ? (element.isLeaf = true) : null; + }); + this.nodes = [...this.toTree.toTree(data.items)]; }); - this.nodes = [...this.toTree.toTree(data.items)] - }) } - //获得所有大队 - battalionList = [] + battalionList = []; getAllOrganization2() { let params = { - ContainsChildren: "true", + ContainsChildren: 'true', PageNumber: 1, PageSize: 9999, - code: '0000' - } - this.http.get('/api/Organizations', { - params: params - }).subscribe((data: any) => { - data.items.forEach(element => { - element.level == 'battalion' ? this.battalionList.push(element) : null + code: '0000', + }; + this.http + .get('/api/Organizations', { + params: params, + }) + .subscribe((data: any) => { + data.items.forEach((element) => { + element.level == 'battalion' + ? this.battalionList.push(element) + : null; + }); }); - }) } - looklog() { const modal = this.modal.create({ nzTitle: '操作日志', @@ -1509,31 +1724,31 @@ export class UnitDetailsComponent implements OnInit { nzComponentParams: { id: this.id, }, - nzFooter: null + nzFooter: null, }); } - isprintLoading = false + isprintLoading = false; print() { - this.isprintLoading = true + this.isprintLoading = true; Print('#tablebox3', { onStart: () => { - console.log('onStart', this) - this.isprintLoading = false + console.log('onStart', this); + this.isprintLoading = false; }, onEnd: () => { - console.log('onEnd', new Date()) - this.isprintLoading = false - } - }) + console.log('onEnd', new Date()); + this.isprintLoading = false; + }, + }); } download(type) { if (type == 1) { - $("#tablebox4").wordExport('基本信息') + $('#tablebox4').wordExport('基本信息'); } else if (type == 2) { - $("#tablebox").wordExport('演练卡') + $('#tablebox').wordExport('演练卡'); } else if (type == 3) { - $("#tablebox2").wordExport('数字化预案'); + $('#tablebox2').wordExport('数字化预案'); } } } diff --git a/src/app/home/basic-info/unit/unit.component.ts b/src/app/home/basic-info/unit/unit.component.ts index 753cef2..fc4e7e0 100644 --- a/src/app/home/basic-info/unit/unit.component.ts +++ b/src/app/home/basic-info/unit/unit.component.ts @@ -146,14 +146,14 @@ export class UnitComponent implements OnInit { let integrity = this.methodService.getAddIntegrity(instance.validateForm.value) let body = { companyName: instance.validateForm.value.unitname, - directorName: instance.validateForm.value.person, - directorPhone: instance.validateForm.value.phone, + legalPersonName: instance.validateForm.value.person, + legalPersonPhone: instance.validateForm.value.phone, address: instance.validateForm.value.addr, organizationId: instance.validateForm.value.orStation || null, relatedOrganizationId: instance.validateForm.value.orDa || null, buildingTypeId: instance.validateForm.value.unittype || null, companyLevel: instance.validateForm.value.companyLevel, - useNature: instance.validateForm.value.nature, + // useNature: instance.validateForm.value.nature, data: null, integrity: integrity } diff --git a/src/app/home/commonComponents/chat-window/chat-window.component.ts b/src/app/home/commonComponents/chat-window/chat-window.component.ts index 095ca19..2d4c040 100644 --- a/src/app/home/commonComponents/chat-window/chat-window.component.ts +++ b/src/app/home/commonComponents/chat-window/chat-window.component.ts @@ -4,7 +4,6 @@ import signalR from '../../../../signalRChat' import { HttpClient } from '@angular/common/http'; import { StationWeeklyPlanComponent } from '../../task/station-weekly-plan/station-weekly-plan.component'; import { StationTaskExecutionComponent } from '../../task/station-task-execution/station-task-execution.component'; -import { HubConnection } from '@microsoft/signalr'; @Component({ diff --git a/src/app/home/statistic-analysis/home/home.component.ts b/src/app/home/statistic-analysis/home/home.component.ts index a9ef186..c5e6da7 100644 --- a/src/app/home/statistic-analysis/home/home.component.ts +++ b/src/app/home/statistic-analysis/home/home.component.ts @@ -731,6 +731,9 @@ export class HomeComponent implements OnInit { } echartsSetData_taskStatByOrg() { + + console.log() + this.completionOfTaskPie.clear(); this.completionOfTaskBar.clear(); //任务完成情况两个echarts @@ -743,6 +746,8 @@ export class HomeComponent implements OnInit { this.completionOfTaskPie && this.completionOfTaskPie.setOption(this.completionOfTaskPieOption); + + console.log(666,this.statisticalData_taskStatByOrg) let taskBar = task['组织机构数据']; let taskBarx = []; let taskBary1 = []; diff --git a/src/styles.scss b/src/styles.scss index a50185e..7d280c9 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -327,3 +327,13 @@ ul { } + + +#unitInfo{ + .ant-form-item-label > label{ + height: 40px; + } + .ant-form-item-control-input{ + min-height: 40px; + } +} \ No newline at end of file