diff --git a/src/app/home/basic-info/unit-details/unit-details.component.scss b/src/app/home/basic-info/unit-details/unit-details.component.scss
index c71ebb1..4145a16 100644
--- a/src/app/home/basic-info/unit-details/unit-details.component.scss
+++ b/src/app/home/basic-info/unit-details/unit-details.component.scss
@@ -59,16 +59,20 @@
padding-left: 10px;
display: flex;
justify-content: space-between;
- .tabbtn{
+
+ .tabbtn {
display: flex;
- .bule{
+
+ .bule {
cursor: pointer;
color: #000;
}
- .line{
+
+ .line {
margin: 0 10px;
}
- .selected{
+
+ .selected {
color: #2196F3;
}
}
@@ -238,10 +242,11 @@
width: 100%;
margin: 0 auto;
position: relative;
- button{
+
+ button {
position: absolute;
right: 15%;
top: 50px;
}
}
-}
+}
\ No newline at end of file
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 37bf120..5304585 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
@@ -16,6 +16,7 @@ import { NzModalService } from 'ng-zorro-antd/modal';
import { OperationLogComponent } from './operation-log/operation-log.component';
declare var $: any
+declare var Print: any
@Component({
selector: 'app-unit-details',
templateUrl: './unit-details.component.html',
@@ -467,6 +468,7 @@ export class UnitDetailsComponent implements OnInit {
adminPhone: [null]
});
this.getAllOrganization()
+ this.getAllOrganization2()
this.getCompanies()
this.getBuildingTypes()
}
@@ -757,30 +759,74 @@ export class UnitDetailsComponent implements OnInit {
exportClick() {
- let alarm = ""
- let spray = ""
- let broadcast = ""
- let smoke = ""
- if (this.datas.facilities.system.alarm) {
- alarm = "有"
- } else {
- alarm = "无"
- }
- if (this.datas.facilities.system.spray) {
- spray = "有"
- } else {
- spray = "无"
- }
- if (this.datas.facilities.system.broadcast) {
- broadcast = "有"
- } else {
- broadcast = "无"
- }
- if (this.datas.facilities.system.smoke) {
- smoke = "有"
- } else {
- smoke = "无"
+
+ let keyHtml = ''
+
+ if (this.datas.key.length != 0) {
+ this.datas.key.forEach((item, key) => {
+ keyHtml += `
`+ this.datas.basicInfo.addr + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.address + `
|
@@ -835,7 +881,7 @@ export class UnitDetailsComponent implements OnInit {
|
- `+ this.datas.basicInfo.total + `
+ `+ this.datas.basicInfo.peoplenum + `
|
@@ -844,7 +890,7 @@ export class UnitDetailsComponent implements OnInit {
|
- `+ this.datas.basicInfo.height + `
+ `+ this.datas.basicInfo.buildingheight + `
|
@@ -853,7 +899,7 @@ export class UnitDetailsComponent implements OnInit {
|
- `+ this.datas.basicInfo.layer + `
+ `+ this.datas.basicInfo.cengshu + `
|
@@ -865,7 +911,7 @@ export class UnitDetailsComponent implements OnInit {
`+ this.datas.basicInfo.structure + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.jiegou + `
|
@@ -875,7 +921,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.basicInfo.coveredArea + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.basicInfo.zhandimianji + `
|
@@ -885,7 +931,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.basicInfo.builtUpArea + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.basicInfo.zongmianji + `
|
@@ -895,7 +941,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.basicInfo.nature + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.xingzhi + `
|
@@ -907,22 +953,22 @@ export class UnitDetailsComponent implements OnInit {
东:`+ this.datas.basicInfo.east + `
+ style="font-family:宋体; font-size:9pt">东:`+ this.datas.basicInfo.pilin.dong + `
|
南:`+ this.datas.basicInfo.south + `
+ style="font-family:宋体; font-size:9pt">南:`+ this.datas.basicInfo.pilin.nan + `
|
西:`+ this.datas.basicInfo.west + `
+ style="font-family:宋体; font-size:9pt">西:`+ this.datas.basicInfo.pilin.xi + `
|
北:`+ this.datas.basicInfo.north + `
+ style="font-family:宋体; font-size:9pt">北:`+ this.datas.basicInfo.pilin.bei + `
|
@@ -934,7 +980,7 @@ export class UnitDetailsComponent implements OnInit {
`+ this.datas.basicInfo.routeAndTime + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.luxian + `
|
@@ -955,7 +1001,7 @@ export class UnitDetailsComponent implements OnInit {
- `+ this.datas.facilities.controlPosition + `
+ `+ this.datas.ewai.kongzhishiweizhi + `
|
@@ -972,7 +1018,7 @@ export class UnitDetailsComponent implements OnInit {
`+ this.datas.facilities.poolNumbe + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[0].value + `
|
@@ -982,7 +1028,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.facilities.poolPosition + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[1].value + `
|
@@ -992,7 +1038,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.facilities.poolCapacity + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[2].value + `
|
@@ -1002,7 +1048,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.facilities.supplyMode + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[3].value + `
|
@@ -1014,7 +1060,7 @@ export class UnitDetailsComponent implements OnInit {
`+ this.datas.facilities.waterSources + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[4].value + `
|
@@ -1024,7 +1070,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.facilities.waterSourcesPosition + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[5].value + `
|
@@ -1037,7 +1083,7 @@ export class UnitDetailsComponent implements OnInit {
- `+ alarm + `
+ `+ (this.datas.other.radiodata[0].isHave ? '有' : '无') + `
|
- `+ spray + `
+ `+ (this.datas.other.radiodata[1].isHave ? '有' : '无') + `
|
- `+ broadcast + `
+ `+ (this.datas.other.radiodata[2].isHave ? '有' : '无') + `
|
- `+ smoke + `
+ `+ (this.datas.other.radiodata[3].isHave ? '有' : '无') + `
- |
+
`+ this.datas.facilities.hydrantsNumber + ``+ this.datas.ewai.shiwaishuliang + `个
|
`+ this.datas.facilities.hydrantsPosition + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.ewai.shiwaiweizhi + `
|
@@ -1112,20 +1158,20 @@ 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.facilities.pumpNumber + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[1].data[0].value + `
扬程:`+ this.datas.facilities.pumpRange + ``+ this.datas.other.listdata[1].data[1].value + `m
|
流量:`+ this.datas.facilities.pumpFlow + ``+ this.datas.other.listdata[1].data[2].value + `L/S
|
数量:
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[1].data[3].value + `
|
`+ this.datas.facilities.pumpAdapter + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[1].data[4].value + `
|
@@ -1155,20 +1201,20 @@ 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.facilities.SprayPumpNumber + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[2].data[0].value + `
扬程:`+ this.datas.facilities.SprayPumpRange + ``+ this.datas.other.listdata[2].data[1].value + `m
|
流量:`+ this.datas.facilities.SprayPumpFlow + ``+ this.datas.other.listdata[2].data[2].value + `L/S
|
数量:
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[2].data[3].value + `
|
`+ this.datas.facilities.SprayPumpAdapter + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[2].data[4].value + `
|
@@ -1198,7 +1244,7 @@ export class UnitDetailsComponent implements OnInit {
- `+ this.datas.facilities.elevator + `
+ `+ this.datas.other.listdata[3].data[0].value + ',' + this.datas.other.listdata[3].data[1].value + `
|
`+ this.datas.facilities.stairs + `
+ 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 + `
|
@@ -1223,7 +1269,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.facilities.Export + `
+ 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 + `
|
@@ -1235,7 +1281,7 @@ export class UnitDetailsComponent implements OnInit {
`+ this.datas.facilities.indoorHydrant + ``+ this.datas.ewai.shineishuliang + `个
|
`+ this.datas.facilities.standardIndoorHydrant + `
+ 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 + `
|
-
-
- 重点部位情况(一)
- |
-
- 重点部位名称
- |
-
- `+ this.datas.KeyParts[0].keyparts + `
- |
-
- 重点部位所在位置
- |
-
- `+ this.datas.KeyParts[0].keypartsposition + `
- |
-
- 建筑结构
- |
-
- `+ this.datas.KeyParts[0].buildingstructure + `
- |
-
- 使用性质
- |
-
- `+ this.datas.KeyParts[0].useNature + `
- |
-
-
-
- 主要危险性
- |
-
- `+ this.datas.KeyParts[0].danger + `
- |
-
-
-
- 重点部位情况(二)
- |
-
- 重点部位名称
- |
-
- `+ this.datas.KeyParts[1].keyparts + `
- |
-
- 重点部位所在位置
- |
-
- `+ this.datas.KeyParts[1].keypartsposition + `
- |
-
- 建筑结构
- |
-
- `+ this.datas.KeyParts[1].buildingstructure + `
- |
-
- 使用性质
- |
-
- `+ this.datas.KeyParts[1].useNature + `
- |
-
-
-
- 主要危险性
- |
-
- `+ this.datas.KeyParts[1].danger + `
- |
-
+ `+ keyHtml + `
@@ -1378,7 +1307,7 @@ export class UnitDetailsComponent implements OnInit {
|
`+ this.datas.tips + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.zhongdiantishi + `
|
@@ -1408,15 +1337,16 @@ export class UnitDetailsComponent implements OnInit {
style="font-family:Calibri; font-size:10.5pt"> `
const htmlString = `
-
-
-
- Document
-
-
- `+ box + `
-
-`
+
+
+
+ Document
+
+
+ `+ box + `
+
+ `
+ console.log(htmlString)
const fileData = asBlob(htmlString).then((data: any) => {
saveAs(data, this.datas.basicInfo.name + '基本信息.docx') // 保存为docx文件
})
@@ -1472,9 +1402,9 @@ export class UnitDetailsComponent implements OnInit {
// let num4 = (num + num2 + num3 - 1) / 64
let xxx = num3 / 11
-
+
this.integrity = Math.floor(xxx * 100) / 100
- console.log('完整度',this.integrity)
+ console.log('完整度', this.integrity)
let body = {
id: this.id,
usci: this.validateForm.value.code,
@@ -1526,9 +1456,9 @@ export class UnitDetailsComponent implements OnInit {
}
}
}
- this.datas.basicInfo.name = data.companyName
- this.datas.basicInfo.address = data.address
- this.datas.basicInfo.xingzhi = data.useNature
+ // this.datas.basicInfo.name = data.companyName
+ // this.datas.basicInfo.address = data.address
+ // this.datas.basicInfo.xingzhi = data.useNature
this.integrity = data.integrity
this.imageUrl = data.imageFile
console.log('当前单位信息2', this.datas);
@@ -1578,6 +1508,26 @@ export class UnitDetailsComponent implements OnInit {
}
+ //获得所有大队
+ battalionList = []
+ getAllOrganization2() {
+ let params = {
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999,
+ code: '0000'
+ }
+ this.http.get('/api/Organizations', {
+ params: params
+ }).subscribe((data: any) => {
+ console.log('组织机构2222', data.items)
+ data.items.forEach(element => {
+ element.level == 'battalion' ? this.battalionList.push(element) : null
+ });
+ })
+ }
+
+
looklog() {
const modal = this.modal.create({
nzTitle: '操作日志',
@@ -1592,25 +1542,19 @@ export class UnitDetailsComponent implements OnInit {
});
}
+ isprintLoading = false
print() {
- const iframe: any = document.getElementById("iframe1");//获取iframe的window对象
- const iwindow: any = iframe.contentWindow;
- // iwindow.document.body.innerText = "";//先清空iframe原先的内容
- const printhtml: any = window.document.getElementById('tablebox3');
- if (iwindow.document.readyState == "complete") {
- const stylArr: Array = [];
- Object.assign(stylArr, window.document.getElementsByTagName('style'));
- // 内容加上去
- iwindow.document.write(printhtml.innerHTML);
- // 样式加上去
- for (let i = 0; i < stylArr.length; i++) {
- const style = document.createElement('style');
- style.innerHTML = stylArr[i].innerHTML;
- iwindow.document.getElementsByTagName("head")[0].appendChild(style);
+ this.isprintLoading = true
+ Print('#tablebox3', {
+ onStart: () => {
+ console.log('onStart', this)
+ this.isprintLoading = false
+ },
+ onEnd: () => {
+ console.log('onEnd', new Date())
+ this.isprintLoading = false
}
- }
- iwindow.print();
- iwindow.close();
+ })
}
download(type) {
if (type == 1) {
diff --git a/src/app/home/basic-info/unit-edit/unit-edit.component.ts b/src/app/home/basic-info/unit-edit/unit-edit.component.ts
index 42858a9..e3973ed 100644
--- a/src/app/home/basic-info/unit-edit/unit-edit.component.ts
+++ b/src/app/home/basic-info/unit-edit/unit-edit.component.ts
@@ -72,10 +72,9 @@ export class UnitEditComponent implements OnInit {
nodes: any = []
getAllOrganization(){
let params = {
- // OrganizationUnitId: OrganizationUnitId,
- // IsContainsChildren: "true"
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999
}
this.http.get('/api/Organizations', {
params: params
diff --git a/src/app/home/basic-info/unit/unit.component.ts b/src/app/home/basic-info/unit/unit.component.ts
index ee293b4..7f64e7b 100644
--- a/src/app/home/basic-info/unit/unit.component.ts
+++ b/src/app/home/basic-info/unit/unit.component.ts
@@ -36,7 +36,6 @@ export class UnitComponent implements OnInit {
getAllOrganization() {
let organizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
let params = {
- OrganizationId: organizationId || '',
ContainsChildren: "true",
PageNumber: 1,
PageSize: 9999
@@ -159,6 +158,7 @@ export class UnitComponent implements OnInit {
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,
data: null,
integrity: integrity.toFixed(2)
@@ -233,31 +233,73 @@ export class UnitComponent implements OnInit {
this.message.create('warning', '该单位未保存过数据');
return
}
+ let keyHtml = ''
- let alarm = ""
- let spray = ""
- let broadcast = ""
- let smoke = ""
- if (this.datas.facilities.system.alarm) {
- alarm = "有"
- } else {
- alarm = "无"
- }
- if (this.datas.facilities.system.spray) {
- spray = "有"
- } else {
- spray = "无"
- }
- if (this.datas.facilities.system.broadcast) {
- broadcast = "有"
- } else {
- broadcast = "无"
- }
- if (this.datas.facilities.system.smoke) {
- smoke = "有"
- } else {
- smoke = "无"
+ if (this.datas.key.length != 0) {
+ this.datas.key.forEach((item, key) => {
+ keyHtml += `
+
+ 重点部位情况(`+ key + `)
+ |
+
+ 重点部位名称
+ |
+
+ `+ item.data[0].value + `
+ |
+
+ 重点部位所在位置
+ |
+
+ `+ item.data[1].value + `
+ |
+
+ 建筑结构
+ |
+
+ `+ item.data[2].value + `
+ |
+
+ 使用性质
+ |
+
+ `+ item.data[3].value + `
+ |
+
+
+
+ 主要危险性
+ |
+
+ `+ item.data[4].value + `
+ |
+
`
+ });
}
+
+
let box = `
`+ this.datas.basicInfo.addr + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.address + `
|
@@ -312,7 +354,7 @@ export class UnitComponent implements OnInit {
|
- `+ this.datas.basicInfo.total + `
+ `+ this.datas.basicInfo.peoplenum + `
|
@@ -321,7 +363,7 @@ export class UnitComponent implements OnInit {
|
- `+ this.datas.basicInfo.height + `
+ `+ this.datas.basicInfo.buildingheight + `
|
@@ -330,7 +372,7 @@ export class UnitComponent implements OnInit {
|
- `+ this.datas.basicInfo.layer + `
+ `+ this.datas.basicInfo.cengshu + `
|
@@ -342,7 +384,7 @@ export class UnitComponent implements OnInit {
`+ this.datas.basicInfo.structure + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.jiegou + `
|
@@ -352,7 +394,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.basicInfo.coveredArea + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.basicInfo.zhandimianji + `
|
@@ -362,7 +404,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.basicInfo.builtUpArea + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.basicInfo.zongmianji + `
|
@@ -372,7 +414,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.basicInfo.nature + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.xingzhi + `
|
@@ -384,22 +426,22 @@ export class UnitComponent implements OnInit {
东:`+ this.datas.basicInfo.east + `
+ style="font-family:宋体; font-size:9pt">东:`+ this.datas.basicInfo.pilin.dong + `
|
南:`+ this.datas.basicInfo.south + `
+ style="font-family:宋体; font-size:9pt">南:`+ this.datas.basicInfo.pilin.nan + `
|
西:`+ this.datas.basicInfo.west + `
+ style="font-family:宋体; font-size:9pt">西:`+ this.datas.basicInfo.pilin.xi + `
|
北:`+ this.datas.basicInfo.north + `
+ style="font-family:宋体; font-size:9pt">北:`+ this.datas.basicInfo.pilin.bei + `
|
@@ -411,7 +453,7 @@ export class UnitComponent implements OnInit {
`+ this.datas.basicInfo.routeAndTime + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.basicInfo.luxian + `
|
@@ -432,7 +474,7 @@ export class UnitComponent implements OnInit {
- `+ this.datas.facilities.controlPosition + `
+ `+ this.datas.ewai.kongzhishiweizhi + `
|
@@ -449,7 +491,7 @@ export class UnitComponent implements OnInit {
`+ this.datas.facilities.poolNumbe + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[0].value + `
|
@@ -459,7 +501,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.facilities.poolPosition + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[1].value + `
|
@@ -469,7 +511,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.facilities.poolCapacity + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[2].value + `
|
@@ -477,10 +519,10 @@ export class UnitComponent implements OnInit {
style="font-family:宋体; font-size:9pt">补给方式
|
-
- |
+ 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; vertical-align:middle; width:26.15pt">
+ `+ this.datas.other.listdata[0].data[3].value + `
+
`+ this.datas.facilities.waterSources + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[4].value + `
|
@@ -501,7 +543,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.facilities.waterSourcesPosition + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[0].data[5].value + `
|
@@ -514,7 +556,7 @@ export class UnitComponent implements OnInit {
- `+ alarm + `
+ `+ (this.datas.other.radiodata[0].isHave ? '有' : '无') + `
|
- `+ spray + `
+ `+ (this.datas.other.radiodata[1].isHave ? '有' : '无') + `
|
- `+ broadcast + `
+ `+ (this.datas.other.radiodata[2].isHave ? '有' : '无') + `
|
- `+ smoke + `
+ `+ (this.datas.other.radiodata[3].isHave ? '有' : '无') + `
- |
+
`+ this.datas.facilities.hydrantsNumber + ``+ this.datas.ewai.shiwaishuliang + `个
|
`+ this.datas.facilities.hydrantsPosition + `
+ style="font-family:宋体; font-size:9pt">`+ this.datas.ewai.shiwaiweizhi + `
|
@@ -589,20 +631,20 @@ export class UnitComponent 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.facilities.pumpNumber + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[1].data[0].value + `
扬程:`+ this.datas.facilities.pumpRange + ``+ this.datas.other.listdata[1].data[1].value + `m
|
流量:`+ this.datas.facilities.pumpFlow + ``+ this.datas.other.listdata[1].data[2].value + `L/S
|
数量:
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[1].data[3].value + `
|
`+ this.datas.facilities.pumpAdapter + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[1].data[4].value + `
|
@@ -632,20 +674,20 @@ export class UnitComponent 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.facilities.SprayPumpNumber + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[2].data[0].value + `
扬程:`+ this.datas.facilities.SprayPumpRange + ``+ this.datas.other.listdata[2].data[1].value + `m
|
流量:`+ this.datas.facilities.SprayPumpFlow + ``+ this.datas.other.listdata[2].data[2].value + `L/S
|
数量:
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[2].data[3].value + `
|
`+ this.datas.facilities.SprayPumpAdapter + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.other.listdata[2].data[4].value + `
|
@@ -675,7 +717,7 @@ export class UnitComponent implements OnInit {
- `+ this.datas.facilities.elevator + `
+ `+ this.datas.other.listdata[3].data[0].value + ',' + this.datas.other.listdata[3].data[1].value + `
|
`+ this.datas.facilities.stairs + `
+ 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 + `
|
@@ -700,7 +742,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.facilities.Export + `
+ 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 + `
|
@@ -712,7 +754,7 @@ export class UnitComponent implements OnInit {
`+ this.datas.facilities.indoorHydrant + ``+ this.datas.ewai.shineishuliang + `个
|
`+ this.datas.facilities.standardIndoorHydrant + `
+ 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 + `
|
-
-
- 重点部位情况(一)
- |
-
- 重点部位名称
- |
-
- `+ this.datas.KeyParts[0].keyparts + `
- |
-
- 重点部位所在位置
- |
-
- `+ this.datas.KeyParts[0].keypartsposition + `
- |
-
- 建筑结构
- |
-
- `+ this.datas.KeyParts[0].buildingstructure + `
- |
-
- 使用性质
- |
-
- `+ this.datas.KeyParts[0].useNature + `
- |
-
-
-
- 主要危险性
- |
-
- `+ this.datas.KeyParts[0].danger + `
- |
-
-
-
- 重点部位情况(二)
- |
-
- 重点部位名称
- |
-
- `+ this.datas.KeyParts[1].keyparts + `
- |
-
- 重点部位所在位置
- |
-
- `+ this.datas.KeyParts[1].keypartsposition + `
- |
-
- 建筑结构
- |
-
- `+ this.datas.KeyParts[1].buildingstructure + `
- |
-
- 使用性质
- |
-
- `+ this.datas.KeyParts[1].useNature + `
- |
-
-
-
- 主要危险性
- |
-
- `+ this.datas.KeyParts[1].danger + `
- |
-
+ `+ keyHtml + `
@@ -855,7 +780,7 @@ export class UnitComponent implements OnInit {
|
`+ this.datas.tips + `
+ style="font-family:'Times New Roman'; font-size:9pt">`+ this.datas.zhongdiantishi + `
|
@@ -884,6 +809,7 @@ export class UnitComponent implements OnInit {
`
+
const htmlString = `
diff --git a/src/app/home/system-management/or/or.component.ts b/src/app/home/system-management/or/or.component.ts
index f0a57d5..23edeb1 100644
--- a/src/app/home/system-management/or/or.component.ts
+++ b/src/app/home/system-management/or/or.component.ts
@@ -46,8 +46,10 @@ export class OrComponent implements OnInit {
allOrList: any
getAllOrganization() {
let params = {
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999,
+ code:'0000'
}
let organizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
this.http.get('/api/Organizations', {
diff --git a/src/app/home/system-management/user/user.component.html b/src/app/home/system-management/user/user.component.html
index 9190838..780cafa 100644
--- a/src/app/home/system-management/user/user.component.html
+++ b/src/app/home/system-management/user/user.component.html
@@ -6,19 +6,14 @@
+
-
-
-
-
-
-
-
-
+ [(ngModel)]="searchForm.or" [nzDropdownClassName]="'maxHeightTreeSelect'" [nzAllowClear]="false">
+
+
+
+
-
+
{{o.name}}
@@ -121,7 +121,7 @@
-
+
{{o.name}}
diff --git a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
index 630e3ba..f00a379 100644
--- a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
+++ b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
@@ -350,8 +350,9 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
stationData = []
getAllStation() {
let params = {
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999
}
this.http.get('/api/Organizations', {
params: params
diff --git a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html
index 757ec22..f8cc013 100644
--- a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html
+++ b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html
@@ -157,7 +157,7 @@
-
+
{{o.name}}
@@ -176,7 +176,7 @@
-
+
{{o.name}}
diff --git a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts
index c8e815d..8e8af2e 100644
--- a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts
+++ b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts
@@ -133,8 +133,9 @@ export class DaOneselfPlanComponent implements OnInit {
stationData = []
getAllStation() {
let params = {
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999
}
this.http.get('/api/Organizations', {
params: params
diff --git a/src/app/home/task/station-task-apply/apply/apply.component.ts b/src/app/home/task/station-task-apply/apply/apply.component.ts
index c8538b5..e0af0c4 100644
--- a/src/app/home/task/station-task-apply/apply/apply.component.ts
+++ b/src/app/home/task/station-task-apply/apply/apply.component.ts
@@ -46,13 +46,6 @@ export class ApplyComponent implements OnInit {
this.newTree = this.nodes
this.getCompanies()
this.getAllOrganization()
-
- // Promise.all([this.getCompanies(), this.getAllOrganization()])
- // .then((results) => {
- // let arr = [...JSON.parse(JSON.stringify(this.allOrList)), ...JSON.parse(JSON.stringify(this.unitList))]
- // let nodes = [...this.toTree.toTree(arr)]
- // this.unitPopover.nodes = JSON.parse(JSON.stringify(nodes))
- // });
}
@@ -64,8 +57,9 @@ export class ApplyComponent implements OnInit {
async getAllOrganization() {
let params = {
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999
}
return new Promise((resolve, reject) => {
this.http.get('/api/Organizations', {
@@ -78,7 +72,6 @@ export class ApplyComponent implements OnInit {
element.disableCheckbox = true
element.datatype = '机构'
element.level == 'squadron' ? element.disableCheckbox = false : null
-
});
data.items.forEach(element => {
if (element.id == JSON.parse(sessionStorage.getItem('userData')).organizationId) {
@@ -88,7 +81,6 @@ export class ApplyComponent implements OnInit {
this.allOrList = JSON.parse(JSON.stringify(data.items))
this.nodes = [...this.toTree.toTree(JSON.parse(JSON.stringify(data.items)))]
this.unitPopover.nodes = JSON.parse(JSON.stringify(this.nodes))
- console.log(6666, data.items)
resolve(data)
})
})
diff --git a/src/app/home/task/station-task-apply/station-task-apply.component.html b/src/app/home/task/station-task-apply/station-task-apply.component.html
index a343e87..84e9685 100644
--- a/src/app/home/task/station-task-apply/station-task-apply.component.html
+++ b/src/app/home/task/station-task-apply/station-task-apply.component.html
@@ -120,7 +120,7 @@
-
+
{{o.name}}
@@ -138,7 +138,7 @@
-
+
{{o.name}}
diff --git a/src/app/home/task/station-task-apply/station-task-apply.component.ts b/src/app/home/task/station-task-apply/station-task-apply.component.ts
index 1f4760b..bf822a2 100644
--- a/src/app/home/task/station-task-apply/station-task-apply.component.ts
+++ b/src/app/home/task/station-task-apply/station-task-apply.component.ts
@@ -115,8 +115,10 @@ export class StationTaskApplyComponent implements OnInit {
nodes: any = []
async getAllOrganization() {
let params = {
+ ContainsChildren: "true",
PageNumber: 1,
- PageSize: 9999
+ PageSize: 9999,
+ code:'0000'
}
var p = new Promise((resolve, reject) => {
this.http.get('/api/Organizations', {
diff --git a/src/app/home/task/station-task-execution/dist/station-task-execution.component.js b/src/app/home/task/station-task-execution/dist/station-task-execution.component.js
index 20f1583..01743a1 100644
--- a/src/app/home/task/station-task-execution/dist/station-task-execution.component.js
+++ b/src/app/home/task/station-task-execution/dist/station-task-execution.component.js
@@ -155,6 +155,7 @@ var StationTaskExecutionComponent = /** @class */ (function () {
var _this = this;
return __generator(this, function (_a) {
params = {
+ ContainsChildren: "true",
PageNumber: 1,
PageSize: 9999
};
diff --git a/src/app/home/task/station-task-execution/station-task-execution.component.html b/src/app/home/task/station-task-execution/station-task-execution.component.html
index f0703b4..87cfa53 100644
--- a/src/app/home/task/station-task-execution/station-task-execution.component.html
+++ b/src/app/home/task/station-task-execution/station-task-execution.component.html
@@ -126,7 +126,7 @@
-
+
{{o.name}}
@@ -146,7 +146,7 @@
-
+
{{i.name}}
diff --git a/src/app/home/task/station-task-execution/station-task-execution.component.ts b/src/app/home/task/station-task-execution/station-task-execution.component.ts
index d175fbf..9e35966 100644
--- a/src/app/home/task/station-task-execution/station-task-execution.component.ts
+++ b/src/app/home/task/station-task-execution/station-task-execution.component.ts
@@ -140,6 +140,7 @@ export class StationTaskExecutionComponent implements OnInit {
nodes: any = []
async getAllOrganization() {
let params = {
+ ContainsChildren: "true",
PageNumber: 1,
PageSize: 9999
}
diff --git a/src/app/home/task/station-task-execution/task-details/task-details.component.html b/src/app/home/task/station-task-execution/task-details/task-details.component.html
index 0588ada..0c1d1be 100644
--- a/src/app/home/task/station-task-execution/task-details/task-details.component.html
+++ b/src/app/home/task/station-task-execution/task-details/task-details.component.html
@@ -1,6 +1,7 @@
+
diff --git a/src/app/home/task/station-task-execution/task-details/task-details.component.ts b/src/app/home/task/station-task-execution/task-details/task-details.component.ts
index 2444803..a0de0ef 100644
--- a/src/app/home/task/station-task-execution/task-details/task-details.component.ts
+++ b/src/app/home/task/station-task-execution/task-details/task-details.component.ts
@@ -3,6 +3,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MethodService } from 'src/app/service/method.service';
declare var $: any
+declare var Print: any
import Viewer from 'viewerjs';
@Component({
selector: 'app-task-details',
@@ -327,6 +328,22 @@ export class TaskDetailsPagesComponent implements OnInit {
type == 1 ? $("#tablebox").wordExport('演练卡') : $("#tablebox2").wordExport('数字化预案');
}
+ isprintLoading = false
+ print() {
+ this.isprintLoading = true
+ Print('#tablebox3', {
+ onStart: () => {
+ console.log('onStart', this)
+ this.isprintLoading = false
+ },
+ onEnd: () => {
+ console.log('onEnd', new Date())
+ this.isprintLoading = false
+ }
+ })
+ }
+
+
//查看图片
viewImg(url) {
let dom = document.getElementById(`viewerjs`)
diff --git a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html
index 666b978..81082c3 100644
--- a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html
+++ b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html
@@ -200,7 +200,7 @@
-
+
{{o.name}}
@@ -218,7 +218,7 @@
-
+
{{o.name}}
diff --git a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
index 3783140..93927e2 100644
--- a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
+++ b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
@@ -136,8 +136,9 @@ export class StationWeeklyPlanComponent implements OnInit {
allOrList: any
getAllStation() {
let params = {
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999
}
this.http.get('/api/Organizations', {
params: params
diff --git a/src/app/home/task/zhi-audit/zhi-audit.component.ts b/src/app/home/task/zhi-audit/zhi-audit.component.ts
index 88c9349..4663194 100644
--- a/src/app/home/task/zhi-audit/zhi-audit.component.ts
+++ b/src/app/home/task/zhi-audit/zhi-audit.component.ts
@@ -86,8 +86,9 @@ export class ZhiAuditComponent implements OnInit {
nodes
getAllOrganization() {
let params = {
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999
}
this.http.get('/api/Organizations', {
params: params
diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
index 2f86aeb..67e16b1 100644
--- a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
+++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts
@@ -301,8 +301,10 @@ export class ZhiIndicatorsComponent implements OnInit {
nodes
async getAllOrganization() {
let params = {
- ContainsChildren: true,
- pageSize: 9999
+ ContainsChildren: "true",
+ PageNumber: 1,
+ PageSize: 9999,
+ code:'0000'
}
return new Promise((resolve, reject) => {
this.http.get('/api/Organizations', {
diff --git a/src/assets/wordexport/jquery.print.js b/src/assets/wordexport/jquery.print.js
new file mode 100644
index 0000000..e77d016
--- /dev/null
+++ b/src/assets/wordexport/jquery.print.js
@@ -0,0 +1,115 @@
+(function (window, document) {
+ var Print = function (dom, options) {
+ if (!(this instanceof Print)) return new Print(dom, options);
+ this.options = this.extend({
+ noPrint: ".no-print",
+ onStart: function () {},
+ onEnd: function () {}
+ },
+ options
+ );
+ if (typeof dom === "string") {
+ this.dom = document.querySelector(dom);
+ } else {
+ this.dom = dom;
+ }
+ this.init();
+ };
+ Print.prototype = {
+ init: function () {
+ var content = this.getStyle() + this.getHtml();
+ this.writeIframe(content);
+ },
+ extend: function (obj, obj2) {
+ for (var k in obj2) {
+ obj[k] = obj2[k];
+ }
+ return obj;
+ },
+ getStyle: function () {
+ // var str = "",
+ // styles = document.querySelectorAll("style,link");
+ // for (var i = 0; i < styles.length; i++) {
+ // str += styles[i].outerHTML;
+ // }
+ // str +=
+ // "";
+ // return str;
+ },
+ getHtml: function () {
+ var inputs = document.querySelectorAll("input");
+ var textareas = document.querySelectorAll("textarea");
+ var selects = document.querySelectorAll("select");
+ for (var k in inputs) {
+ if (inputs[k].type == "checkbox" || inputs[k].type == "radio") {
+ if (inputs[k].checked == true) {
+ inputs[k].setAttribute("checked", "checked");
+ } else {
+ inputs[k].removeAttribute("checked");
+ }
+ } else if (inputs[k].type == "text") {
+ inputs[k].setAttribute("value", inputs[k].value);
+ }
+ }
+ for (var k2 in textareas) {
+ if (textareas[k2].type == "textarea") {
+ textareas[k2].innerHTML = textareas[k2].value;
+ }
+ }
+ for (var k3 in selects) {
+ if (selects[k3].type == "select-one") {
+ var child = selects[k3].children;
+ for (var i in child) {
+ if (child[i].tagName == "OPTION") {
+ if (child[i].selected == true) {
+ child[i].setAttribute("selected", "selected");
+ } else {
+ child[i].removeAttribute("selected");
+ }
+ }
+ }
+ }
+ }
+ return this.dom.outerHTML;
+ },
+ writeIframe: function (content) {
+ var w,
+ doc,
+ iframe = document.createElement("iframe"),
+ f = document.body.appendChild(iframe);
+ iframe.id = "myIframe";
+ iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
+ w = f.contentWindow || f.contentDocument;
+ doc = f.contentDocument || f.contentWindow.document;
+ doc.open();
+ doc.write(content);
+ doc.close();
+ this.toPrint(w, function () {
+ document.body.removeChild(iframe);
+ });
+ },
+ toPrint: function (w, cb) {
+ var _this = this;
+ w.onload = function () {
+ try {
+ setTimeout(function () {
+ w.focus();
+ typeof _this.options.onStart === "function" &&
+ _this.options.onStart();
+ if (!w.document.execCommand("print", false, null)) {
+ w.print();
+ }
+ typeof _this.options.onEnd === "function" && _this.options.onEnd();
+ w.close();
+ cb && cb();
+ });
+ } catch (err) {
+ console.log("err", err);
+ }
+ };
+ }
+ };
+ window.Print = Print;
+})(window, document);
diff --git a/src/index.html b/src/index.html
index 9313b1f..8ae0972 100644
--- a/src/index.html
+++ b/src/index.html
@@ -13,9 +13,11 @@
+
+