|
|
@ -8,6 +8,7 @@ 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来安装
|
|
|
|
// 要保存这个docx文件推荐引入file-saver哦,你可以用npm i -D file-saver来安装
|
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
|
|
|
|
declare var AMap: any; |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-unit-details', |
|
|
|
selector: 'app-unit-details', |
|
|
|
templateUrl: './unit-details.component.html', |
|
|
|
templateUrl: './unit-details.component.html', |
|
|
@ -16,10 +17,10 @@ import { saveAs } from 'file-saver' |
|
|
|
|
|
|
|
|
|
|
|
export class UnitDetailsComponent implements OnInit { |
|
|
|
export class UnitDetailsComponent implements OnInit { |
|
|
|
@ViewChild('box') box: ElementRef; |
|
|
|
@ViewChild('box') box: ElementRef; |
|
|
|
constructor(private message:NzMessageService, private router: Router, private toTree: TreeService, private fb: FormBuilder, private http: HttpClient, private renderer: Renderer2, private el: ElementRef) { |
|
|
|
constructor(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) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
disableds=false |
|
|
|
disableds = false |
|
|
|
datas = { |
|
|
|
datas = { |
|
|
|
basicInfo: { |
|
|
|
basicInfo: { |
|
|
|
name: "", |
|
|
|
name: "", |
|
|
@ -37,7 +38,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
west: "", |
|
|
|
west: "", |
|
|
|
north: "", |
|
|
|
north: "", |
|
|
|
routeAndTime: "", |
|
|
|
routeAndTime: "", |
|
|
|
|
|
|
|
positionCoordinates: { x: 0, y: 0 } |
|
|
|
}, |
|
|
|
}, |
|
|
|
facilities: { |
|
|
|
facilities: { |
|
|
|
controlPosition: "", |
|
|
|
controlPosition: "", |
|
|
@ -47,7 +48,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
supplyMode: "", |
|
|
|
supplyMode: "", |
|
|
|
waterSources: "", |
|
|
|
waterSources: "", |
|
|
|
waterSourcesPosition: "", |
|
|
|
waterSourcesPosition: "", |
|
|
|
system:{ |
|
|
|
system: { |
|
|
|
alarm: false, |
|
|
|
alarm: false, |
|
|
|
spray: false, |
|
|
|
spray: false, |
|
|
|
broadcast: false, |
|
|
|
broadcast: false, |
|
|
@ -91,10 +92,9 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
id = "" |
|
|
|
id = "" |
|
|
|
integrity = 0 |
|
|
|
integrity = 0 |
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
console.log(this.router); |
|
|
|
|
|
|
|
this.id = this.router['browserUrlTree'].queryParams.id |
|
|
|
this.id = this.router['browserUrlTree'].queryParams.id |
|
|
|
if(this.router['browserUrlTree'].queryParams.pattern!="edit"){ |
|
|
|
if (this.router['browserUrlTree'].queryParams.pattern != "edit") { |
|
|
|
this.disableds=true |
|
|
|
this.disableds = true |
|
|
|
} |
|
|
|
} |
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
directorName: [null], |
|
|
|
directorName: [null], |
|
|
@ -103,11 +103,228 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
buildingTypeId: [null] |
|
|
|
buildingTypeId: [null] |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(this.validateForm); |
|
|
|
|
|
|
|
this.getAllOrganization() |
|
|
|
this.getAllOrganization() |
|
|
|
this.getCompanies() |
|
|
|
this.getCompanies() |
|
|
|
this.getBuildingTypes() |
|
|
|
this.getBuildingTypes() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isMapLabel: boolean |
|
|
|
|
|
|
|
//地图标注位置
|
|
|
|
|
|
|
|
markerPosition: any = { x: 0, y: 0 }//单位坐标
|
|
|
|
|
|
|
|
map: any //地图实例
|
|
|
|
|
|
|
|
isGisTopBox: boolean = false//点击位置按钮
|
|
|
|
|
|
|
|
isGisTopBoxTwo: boolean = false//点击位置按钮
|
|
|
|
|
|
|
|
oldPositionMarker: any //旧位置marker实例
|
|
|
|
|
|
|
|
newPositionMarker: any //新位置marker实例
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newPositionMarkerContent: any = |
|
|
|
|
|
|
|
'<div class="custom-content-marker">' + |
|
|
|
|
|
|
|
' <img class="positionimg" src="/assets/images/newposition.png">' + |
|
|
|
|
|
|
|
' <div class="btnbox2"></div>' + |
|
|
|
|
|
|
|
'</div>' |
|
|
|
|
|
|
|
newPositionMarkerContentBtn: any = |
|
|
|
|
|
|
|
'<div class="custom-content-marker">' + |
|
|
|
|
|
|
|
' <img class="positionimg" src="/assets/images/newposition.png">' + |
|
|
|
|
|
|
|
' <div class="btnbox"><img id="setPositionOk" src="/assets/images/ok.png"><span>|</span><img id="setPositionClose" src="/assets/images/close.png"></div>' + |
|
|
|
|
|
|
|
'</div>' |
|
|
|
|
|
|
|
oldPositionMarkerContent: any = |
|
|
|
|
|
|
|
'<div class="custom-content-marker">' + |
|
|
|
|
|
|
|
' <img class="positionimg" src="/assets/images/oldposition.png">' + |
|
|
|
|
|
|
|
' <div class="btnbox2"></div>' + |
|
|
|
|
|
|
|
'</div>' |
|
|
|
|
|
|
|
//初始化地图
|
|
|
|
|
|
|
|
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]); //设置地图中心点
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
alert('查询不到输入地址信息') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//初始化地图
|
|
|
|
|
|
|
|
markerPosition2 |
|
|
|
|
|
|
|
labelGis() { |
|
|
|
|
|
|
|
console.log('初始化地图') |
|
|
|
|
|
|
|
this.map = new AMap.Map('container', { |
|
|
|
|
|
|
|
zoom: 12 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.map.on('complete', () => { |
|
|
|
|
|
|
|
this.isGisTopBox = true |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//输入提示
|
|
|
|
|
|
|
|
var autoOptions = { |
|
|
|
|
|
|
|
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.map.setCenter([e.poi.location.lng, e.poi.location.lat]); //设置地图中心点
|
|
|
|
|
|
|
|
});//注册监听,当选中某条记录时会触发
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.isMapLabel) {//如果已经标注单位坐标
|
|
|
|
|
|
|
|
console.log('已标注单位位置') |
|
|
|
|
|
|
|
this.map.setCenter([this.datas.basicInfo.positionCoordinates.x, this.datas.basicInfo.positionCoordinates.y]); |
|
|
|
|
|
|
|
this.oldPositionMarker = new AMap.Marker({ |
|
|
|
|
|
|
|
position: [this.datas.basicInfo.positionCoordinates.x, this.datas.basicInfo.positionCoordinates.y], |
|
|
|
|
|
|
|
content: this.newPositionMarkerContent, |
|
|
|
|
|
|
|
offset: new AMap.Pixel(-34, -36) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// 将 markers 添加到地图
|
|
|
|
|
|
|
|
this.map.add(this.oldPositionMarker); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// console.log('未标注单位位置')
|
|
|
|
|
|
|
|
this.map.setCity('济南'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//点击位置按钮
|
|
|
|
|
|
|
|
setPosition() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.disableds){ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.isGisTopBox = false |
|
|
|
|
|
|
|
this.isGisTopBoxTwo = true |
|
|
|
|
|
|
|
if (this.isMapLabel) {//如果已经标注单位坐标
|
|
|
|
|
|
|
|
// console.log('已标注单位位置')
|
|
|
|
|
|
|
|
if (this.oldPositionMarker) { |
|
|
|
|
|
|
|
this.oldPositionMarker.setContent(this.oldPositionMarkerContent) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.newPositionMarker) { |
|
|
|
|
|
|
|
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) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.map.add(this.newPositionMarker); |
|
|
|
|
|
|
|
if (this.markerPosition.x && this.markerPosition.x != 0) { |
|
|
|
|
|
|
|
this.markerPosition2 = { x: this.markerPosition.x, y: this.markerPosition.y } |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
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 } |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.newPositionMarker.on('dragging', (e) => { |
|
|
|
|
|
|
|
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('#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) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let center |
|
|
|
|
|
|
|
//this.markerPosition---单位坐标
|
|
|
|
|
|
|
|
if (this.markerPosition.x && this.markerPosition.x != 0) { |
|
|
|
|
|
|
|
center = [this.markerPosition.x, this.markerPosition.y] |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
center = this.map.getCenter(); //获取当前地图中心位置
|
|
|
|
|
|
|
|
// console.log('获取当前地图中心位置', center)
|
|
|
|
|
|
|
|
this.map.setCenter(center); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.newPositionMarker = new AMap.Marker({ |
|
|
|
|
|
|
|
draggable: true, |
|
|
|
|
|
|
|
position: center, |
|
|
|
|
|
|
|
content: this.newPositionMarkerContentBtn, |
|
|
|
|
|
|
|
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 } |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
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 } |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.newPositionMarker.on('dragging', (e) => { |
|
|
|
|
|
|
|
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.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[] = []; |
|
|
|
listOfData: any[] = []; |
|
|
|
listOfData2: any[] = []; |
|
|
|
listOfData2: any[] = []; |
|
|
|
|
|
|
|
|
|
|
@ -619,7 +836,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td |
|
|
|
<td |
|
|
|
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:35.45pt"> |
|
|
|
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:35.45pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[0].keyparts+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[0].keyparts + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td colspan="3" |
|
|
|
<td colspan="3" |
|
|
|
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:54.8pt"> |
|
|
|
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:54.8pt"> |
|
|
@ -629,7 +846,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="3" |
|
|
|
<td colspan="3" |
|
|
|
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:42.15pt"> |
|
|
|
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:42.15pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[0].keypartsposition+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[0].keypartsposition + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td colspan="4" |
|
|
|
<td colspan="4" |
|
|
|
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:34.55pt"> |
|
|
|
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:34.55pt"> |
|
|
@ -639,7 +856,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="3" |
|
|
|
<td colspan="3" |
|
|
|
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:43.15pt"> |
|
|
|
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:43.15pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[0].buildingstructure+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[0].buildingstructure + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td colspan="2" |
|
|
|
<td colspan="2" |
|
|
|
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:36.55pt"> |
|
|
|
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:36.55pt"> |
|
|
@ -649,7 +866,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="2" |
|
|
|
<td colspan="2" |
|
|
|
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:65.6pt"> |
|
|
|
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:65.6pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[0].useNature+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[0].useNature + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<tr style="height:31.75pt"> |
|
|
|
<tr style="height:31.75pt"> |
|
|
@ -661,7 +878,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="18" |
|
|
|
<td colspan="18" |
|
|
|
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:1pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.4pt; padding-right:4.9pt; vertical-align:middle; width:377.05pt"> |
|
|
|
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:1pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.4pt; padding-right:4.9pt; vertical-align:middle; width:377.05pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[0].danger+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[0].danger + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<tr style="height:35.1pt"> |
|
|
|
<tr style="height:35.1pt"> |
|
|
@ -678,7 +895,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td |
|
|
|
<td |
|
|
|
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:35.45pt"> |
|
|
|
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:35.45pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[1].keyparts+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[1].keyparts + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td colspan="3" |
|
|
|
<td colspan="3" |
|
|
|
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:54.8pt"> |
|
|
|
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:54.8pt"> |
|
|
@ -688,7 +905,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="3" |
|
|
|
<td colspan="3" |
|
|
|
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:42.15pt"> |
|
|
|
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:42.15pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[1].keypartsposition+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[1].keypartsposition + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td colspan="4" |
|
|
|
<td colspan="4" |
|
|
|
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:34.55pt"> |
|
|
|
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:34.55pt"> |
|
|
@ -698,7 +915,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="3" |
|
|
|
<td colspan="3" |
|
|
|
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:43.15pt"> |
|
|
|
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:43.15pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[1].buildingstructure+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[1].buildingstructure + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td colspan="2" |
|
|
|
<td colspan="2" |
|
|
|
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:36.55pt"> |
|
|
|
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:36.55pt"> |
|
|
@ -708,7 +925,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="2" |
|
|
|
<td colspan="2" |
|
|
|
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:65.6pt"> |
|
|
|
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:65.6pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[1].useNature+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[1].useNature + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<tr style="height:31.75pt"> |
|
|
|
<tr style="height:31.75pt"> |
|
|
@ -720,7 +937,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
<td colspan="18" |
|
|
|
<td colspan="18" |
|
|
|
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:1pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.4pt; padding-right:4.9pt; vertical-align:middle; width:377.05pt"> |
|
|
|
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:1pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.4pt; padding-right:4.9pt; vertical-align:middle; width:377.05pt"> |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
|
|
|
style="font-family:宋体; font-size:9pt">`+this.datas.KeyParts[1].danger+`</span></p> |
|
|
|
style="font-family:宋体; font-size:9pt">`+ this.datas.KeyParts[1].danger + `</span></p> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<tr style="height:56pt"> |
|
|
|
<tr style="height:56pt"> |
|
|
@ -774,7 +991,7 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
</body> |
|
|
|
</body> |
|
|
|
</html>` |
|
|
|
</html>` |
|
|
|
const fileData = asBlob(htmlString).then((data: any) => { |
|
|
|
const fileData = asBlob(htmlString).then((data: any) => { |
|
|
|
saveAs(data, this.datas.basicInfo.name+'基本信息.docx') // 保存为docx文件
|
|
|
|
saveAs(data, this.datas.basicInfo.name + '基本信息.docx') // 保存为docx文件
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -825,9 +1042,12 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let num4=(num+num2+num3-1)/56 |
|
|
|
let num4 = (num + num2 + num3 - 1) / 57 |
|
|
|
this.integrity = Math.floor(num4*100)/100 |
|
|
|
this.integrity = Math.floor(num4 * 100) / 100 |
|
|
|
console.log(num,num2,num3,num4); |
|
|
|
console.log(num, num2, num3, num4); |
|
|
|
|
|
|
|
this.datas.basicInfo.positionCoordinates = { |
|
|
|
|
|
|
|
x: this.markerPosition.x, y: this.markerPosition.y |
|
|
|
|
|
|
|
} |
|
|
|
let body = { |
|
|
|
let body = { |
|
|
|
id: this.id, |
|
|
|
id: this.id, |
|
|
|
companyName: this.datas.basicInfo.name, |
|
|
|
companyName: this.datas.basicInfo.name, |
|
|
@ -839,13 +1059,13 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
useNature: this.datas.basicInfo.nature, |
|
|
|
useNature: this.datas.basicInfo.nature, |
|
|
|
buildingTypeId: this.validateForm.value.buildingTypeId, |
|
|
|
buildingTypeId: this.validateForm.value.buildingTypeId, |
|
|
|
integrity: this.integrity, |
|
|
|
integrity: this.integrity, |
|
|
|
data:JSON.stringify(this.datas) |
|
|
|
data: JSON.stringify(this.datas) |
|
|
|
} |
|
|
|
} |
|
|
|
this.http.patch('/api/Companies/' + this.id, body).subscribe(data => { |
|
|
|
this.http.patch('/api/Companies/' + this.id, body).subscribe(data => { |
|
|
|
console.log(data); |
|
|
|
console.log(data); |
|
|
|
|
|
|
|
|
|
|
|
this.message.create('success', '保存成功!'); |
|
|
|
this.message.create('success', '保存成功!'); |
|
|
|
this.getCompanies() |
|
|
|
this.getCompanies() |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -858,11 +1078,10 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
getCompanies() { |
|
|
|
getCompanies() { |
|
|
|
|
|
|
|
|
|
|
|
this.http.get('/api/Companies/' + this.id).subscribe((data: any) => { |
|
|
|
this.http.get('/api/Companies/' + this.id).subscribe((data: any) => { |
|
|
|
console.log(data); |
|
|
|
console.log(data); |
|
|
|
if(data.data){ |
|
|
|
if (data.data) { |
|
|
|
this.datas=JSON.parse(data.data) |
|
|
|
this.datas = JSON.parse(data.data) |
|
|
|
} |
|
|
|
} |
|
|
|
this.datas.basicInfo.name = data.companyName |
|
|
|
this.datas.basicInfo.name = data.companyName |
|
|
|
this.datas.basicInfo.addr = data.address |
|
|
|
this.datas.basicInfo.addr = data.address |
|
|
@ -876,6 +1095,14 @@ export class UnitDetailsComponent implements OnInit { |
|
|
|
buildingTypeId: data.buildingTypeId |
|
|
|
buildingTypeId: data.buildingTypeId |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.datas.basicInfo.positionCoordinates && (this.datas.basicInfo.positionCoordinates.x != 0 && this.datas.basicInfo.positionCoordinates.y != 0)) {//已标注
|
|
|
|
|
|
|
|
this.isMapLabel = true |
|
|
|
|
|
|
|
this.markerPosition = this.datas.basicInfo.positionCoordinates |
|
|
|
|
|
|
|
} else {//未标注
|
|
|
|
|
|
|
|
this.isMapLabel = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.labelGis() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
nodes: any = [] |
|
|
|
nodes: any = [] |
|
|
|