diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.ts
index f387012..44a1941 100644
--- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts
+++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts
@@ -424,7 +424,7 @@ export class GisLabelingComponent implements OnInit {
-
delete
-
+
+
@@ -721,6 +721,7 @@
opacity: 1;
height: 40px;
line-height: 40px;">{{itemunit.name}}
+
{{element.surveyName}}
+ (click)='unitadd(element.surveyName,uniti,elei)' *ngIf="pattern == 'edit'">
+
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
index f5573d9..7ab6a1d 100644
--- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
+++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
@@ -744,6 +744,13 @@
height: 40px;
line-height: 40px;
}
+ img{
+ cursor: pointer;
+ float: right;
+ position: relative;
+ top: 10px;
+ right: 10px;
+ }
}
.unitbody {
height: 100%;
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
index 01bf697..90442c8 100644
--- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
+++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
@@ -20,6 +20,7 @@ import { TreeService } from '../../http-interceptors/tree.service'
import Viewer from 'viewerjs';
import { async } from 'rxjs/internal/scheduler/async';
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
+import { adddwsurvey, addGroup } from '@src/app/ui/plan-template/plan-template.component';
declare var $: any
@Component({
selector: 'app-create-plan-online-five',
@@ -57,13 +58,18 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
planLevel: string//预案级别
blockyl = true
zaixianDr=false
+ haveNew=false
ngOnInit(): void {
+ this.haveNew=this.route.snapshot.queryParams.haveNew
+ console.log(this.route.snapshot.queryParams.wordChange)
this.planLevel = this.route.snapshot.queryParams.planCategory
if (this.route.snapshot.queryParams.pattern == 'false') {
this.pattern = 'look'
this.blockyl = false
- this.clickTitleItem('单位概况')
+ this.selectedItem='单位概况'
+ //this.clickTitleItem(this.planTemplateData[1])
} else {
+ this.selectedItem='封面'
this.pattern = 'edit'
}
this.getUnitData()
@@ -159,11 +165,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
data.items.forEach(element => {
if (element.id == this.route.snapshot.queryParams.companyId) {
this.unitData = element
- if((this.unitData.buildingTypes[0].name=='高层建筑'||this.unitData.buildingTypes[0].name=='居民小区'||this.unitData.buildingTypes[0].name=='厂房'
- ||this.unitData.buildingTypes[0].name=='商市场'||this.unitData.buildingTypes[0].name=='医院'||this.unitData.buildingTypes[0].name=='学校'
- ||this.unitData.buildingTypes[0].name=='宾馆'||this.unitData.buildingTypes[0].name=='娱乐场所'||this.unitData.buildingTypes[0].name=='餐饮业'
- ||this.unitData.buildingTypes[0].name=='影剧院'||this.unitData.buildingTypes[0].name=='展览建筑'||this.unitData.buildingTypes[0].name=='养老院'
- ||this.unitData.buildingTypes[0].name=='会议中心'||this.unitData.buildingTypes[0].name=='储罐类'||this.unitData.buildingTypes[0].name=='化工生产')&&this.planLevel=='5'){
+ if(this.planLevel=='5'){
this.zaixianDr=true
}
//console.log('单位列表信息', this.unitData)
@@ -235,7 +237,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
this.buData = JSON.parse(JSON.stringify(this.buData))
- console.log(this.buData)
this.buData[0].forEach((pvalue, pindex, parr) => {
if (parr[pindex].length > 0) {
parr[pindex].forEach((nval, nindex, narr) => {
@@ -354,13 +355,29 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
let index = this.getArrayIndex(this.planTemplateData,'单位概况')
this.planTemplateData[index].building.forEach(element => {
if(element.body[0].completed){
- element.body[0].attinf[0].value = element.body[0].attinf[0].olddata = this.unitData.usci
+ element.body[0].attinf.forEach((arrval,atti,attarr) => {
+ if(arrval.propertyName=='统一社会信用代码'){
+ arrval.value=arrval.olddata=this.unitData.usci
+ }else if(arrval.propertyName=='单位类型'){
+ arrval.value=arrval.olddata=this.unitData.buildingTypes[0].name
+ }else if(arrval.propertyName=='联系人'){
+ arrval.value=arrval.olddata=this.unitData.contacts
+ }else if(arrval.propertyName=='联系电话'){
+ arrval.value=arrval.olddata=this.unitData.phone
+ }else if(arrval.propertyName=='辖区中队'){
+ arrval.value=arrval.olddata=this.unitData.organizationName
+ }else if(arrval.propertyName=='单位地址'){
+ arrval.value=arrval.olddata=this.unitData.address
+ }
+ });
+ /* element.body[0].attinf[0].value = element.body[0].attinf[0].olddata = this.unitData.usci
element.body[0].attinf[1].value = element.body[0].attinf[1].olddata = this.unitData.buildingTypes[0].name
element.body[0].attinf[2].value = element.body[0].attinf[2].olddata = this.unitData.contacts
element.body[0].attinf[3].value = element.body[0].attinf[3].olddata = this.unitData.phone
element.body[0].attinf[4].value = element.body[0].attinf[4].olddata = this.unitData.organizationName
- element.body[0].attinf[5].value = element.body[0].attinf[5].olddata = this.unitData.address
- if (element.body[1].attinf != undefined) {
+ element.body[0].attinf[5].value = element.body[0].attinf[5].olddata = this.unitData.address */
+
+ if (element.body.length>1&&element.body[1].attinf != undefined) {
element.body[1].attinf.forEach(eBuild => {
this.buildZong.forEach(oldBuild => {
if (oldBuild.buildingBasicGroups.length > 0) {
@@ -375,8 +392,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
});
-
-
console.log(this.planTemplateData)
} else if (this.selectedItem == '预案附件') {
this.getTwoDPlanList()
@@ -457,7 +472,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
//console.log(this.buildingsData)
if (this.planTemplateData[index].building == undefined) {
this.planTemplateData[index].building = []
- if (this.planTemplateData[index].attribute[1].attinf != undefined) {
+ /* if (this.planTemplateData[index].attribute[1].attinf != undefined) {
this.planTemplateData[index].attribute[1].attinf.forEach(pData => {
this.buildingsData.forEach((bDara, bi, bArr) => {
if (bDara.buildingBasicGroups.length > 0) {
@@ -467,7 +482,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
})
});
- }
+ } */
for (var i = 0; i < this.buildDataName.length; i++) {
if (i == 0) {
@@ -547,92 +562,142 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
planTemplateData: any
//获得模板信息
- getTemplateData() {
- this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => {
- //console.log('预案内容', data)
- this.planTemplateData = JSON.parse(data.webTextData).filter(item =>
- item.completed == true
- )
- //console.log(this.planTemplateData)
- if (this.planTemplateData[0].groupName != '封面') {
- let obj = {
- completed: true,
- groupName: "封面",
- attribute: {
- planNumber: '',
- planName: this.route.snapshot.queryParams.planName,
- objName: this.unitData.name,
- unitNature: this.unitData.buildingTypes[0].name,
- planLevel: '',
- disasterType: '火灾',
- fireproofingLevel: '',
- fireproofingAdminister: this.unitData.organizationName,
- putOutFireAdminister: '',
- producer: {
- name: '',
- duty: ''
- },
- verifier: {
- name: '',
- duty: ''
- },
- auditTime: ''
- }
- }
- this.planTemplateData.unshift(obj)
- }
- else if (this.planTemplateData[0].groupName == '封面') {
- this.planTemplateData[0].attribute.objName = this.unitData.name
+ danweInfo={
+ //若选择自定义,默认三条信息
+ attribute:[
+ {
+ attinf:[
+ {completed: true,olddata: "",propertyName: "联系人",propertyType: 0,propertyValue: "",value: ""},
+ {completed: true,olddata: "",propertyName: "联系电话",propertyType: 0,propertyValue: "",value: ""},
+ {completed: true,olddata: "",propertyName: "单位地址",propertyType: 0,propertyValue: "",value: ""}
+ ],
+ completed: true,
+ surveyName: "单位基本信息"
}
- this.planTemplateData.forEach(element => {
- if (element.groupName == '重点图示') {
- if (!element.attribute) {
- element.attribute = [{ name: '', imgArr: [] }]
- }
- }
- if (element.groupName == '交通水源') {
- if (!element.attribute) {
- element.attribute = [{ name: '', imgArr: [] }]
- }
- }
- if (element.groupName == '预案附件') {
- if (!element.attribute) {
- element.attribute = [{ name: '', imgArr: [] }]
+ ],
+ completed: true,
+ groupName: "单位概况"
+ }
+ getTemplateData() {
+ this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => {
+ console.log('预案内容', data)
+ if(this.route.snapshot.queryParams.haveNew!=undefined&&data.webTextData==null){
+ this.planTemplateData=[]
+ let obj = {
+ completed: true,
+ groupName: "封面",
+ attribute: {
+ planNumber: '',
+ planName: this.route.snapshot.queryParams.planName,
+ objName: this.unitData.name,
+ unitNature: this.unitData.buildingTypes[0].name,
+ planLevel: '',
+ disasterType: '火灾',
+ fireproofingLevel: '',
+ fireproofingAdminister: this.unitData.organizationName,
+ putOutFireAdminister: '',
+ producer: {
+ name: '',
+ duty: ''
+ },
+ verifier: {
+ name: '',
+ duty: ''
+ },
+ auditTime: ''
+ }
}
- }
- if (element.groupName == '处置要点') {
- if (!element.attribute) {
- element.attribute = [{ name: '', content: '' }]
+ this.planTemplateData.unshift(obj)
+ this.planTemplateData.push(this.danweInfo)
+ this.planTemplateData.push({completed: true,groupName: '新建'})
+ console.log(this.planTemplateData)
+ }else if(data.webTextData!=null){
+ this.planTemplateData = JSON.parse(data.webTextData).filter(item =>
+ item.completed == true
+ )
+ //this.planTemplateData=JSON.parse(data.webTextData)
+ console.log(this.planTemplateData)
+ if (this.planTemplateData[0].groupName != '封面') {
+ let obj = {
+ completed: true,
+ groupName: "封面",
+ attribute: {
+ planNumber: '',
+ planName: this.route.snapshot.queryParams.planName,
+ objName: this.unitData.name,
+ unitNature: this.unitData.buildingTypes[0].name,
+ planLevel: '',
+ disasterType: '火灾',
+ fireproofingLevel: '',
+ fireproofingAdminister: this.unitData.organizationName,
+ putOutFireAdminister: '',
+ producer: {
+ name: '',
+ duty: ''
+ },
+ verifier: {
+ name: '',
+ duty: ''
+ },
+ auditTime: ''
+ }
+ }
+ this.planTemplateData.unshift(obj)
}
- }
- if (element.groupName == '特别警示') {
- if (!element.attribute) {
- element.attribute = [{ name: '特别警示', content: '' }]
+ else if (this.planTemplateData[0].groupName == '封面') {
+ this.planTemplateData[0].attribute.objName = this.unitData.name
}
- }
- if(element.groupName=='三位概况'){
- this.clickTitleItem('单位概况')
- }
- });
- if(this.planLevel=='4'){
- this.planTemplateData.push({completed: true,groupName: '新建'})
- }
- this.planTemplateData.forEach(element => {
- if(element.attribute!=undefined){
- /* element.attribute.forEach((item,index,value) => {
- if(value[index].level!=undefined&&value[index].level==1){
- value[index].lieNumber=value[index].tableth.length
+ this.planTemplateData.forEach(element => {
+ if (element.groupName == '重点图示') {
+ if (!element.attribute) {
+ element.attribute = [{ name: '', imgArr: [] }]
+ }
}
- }); */
- for(let i=0;i {
+ if(element.attribute!=undefined){
+ /* element.attribute.forEach((item,index,value) => {
+ if(value[index].level!=undefined&&value[index].level==1){
+ value[index].lieNumber=value[index].tableth.length
+ }
+ }); */
+ for(let i=0;i{
console.log(data)
if(data==null){
@@ -1724,11 +1799,15 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.fileData.forEach((value,index,array) => {
if(value.groupName=='交通水源'||value.groupName=='重点图示'){
value.attribute.forEach(element => {
- element.imgArr[0]=element.imgArr[0].slice(25,element.imgArr[0].length)
+ if(element.imgArr!=undefined&&element.imgArr.length>0){
+ element.imgArr[0]=element.imgArr[0].slice(25,element.imgArr[0].length)
+ }
+
});
}
this.planTemplateData.forEach((pvalue,pindex,parr) => {
if(parr[1].building==undefined){
+ this.planTemplateData[index].building = []
if(array[index].groupName==parr[pindex].groupName){
parr[pindex].attribute=array[index].attribute
}
@@ -1740,7 +1819,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
}
});
-
+
});
//console.log(this.fileData)
this.snackBar.open('解析成功!', '确定', config);
@@ -1788,6 +1867,47 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
console.log(this.planTemplateData)
});
}
+ //单位概况自定义新增数据
+ unitZdyaaa(){
+ let list=[]
+ let index = this.getArrayIndex(this.planTemplateData,'单位概况')
+ const dialogRef = this.dialog.open(adddwsurvey, {//调用open方法打开对话框并且携带参数过去
+ width: '240px',
+ height:'420px',
+ disableClose:true,
+ data:this.planTemplateData
+ });
+ dialogRef.afterClosed().subscribe(result => {
+ console.log(result)
+ if(result!=undefined){
+ if(result.length>this.planTemplateData.length){
+ result.forEach((valuer,i,rarr) => {
+ let temp=0
+ this.planTemplateData[index].attribute.forEach((group,gi,garr) => {
+ if(valuer.surveyName==group.surveyName){
+ temp++
+ }
+ })
+ if(temp==0){
+ //将缺少的填上
+ this.planTemplateData[index].attribute.push(valuer)
+ }
+ });
+ }
+ result.forEach((valuer,i,rarr) => {
+ this.planTemplateData[index].attribute.forEach((group,gi,garr) => {
+ if(garr[gi].surveyName==rarr[i].surveyName){
+ garr[gi].completed=rarr[i].completed
+ }
+ });
+ })
+ this.planTemplateData[index].building[this.clicki].body=this.planTemplateData[index].attribute
+ }
+
+ console.log(this.planTemplateData)
+ })
+
+ }
}
@@ -2000,4 +2120,5 @@ export class updataHl{
}
this.dialogRef.close(result);
}
-}
\ No newline at end of file
+}
+
diff --git a/src/app/plan-management/entry-plan-look/AddPlanone.html b/src/app/plan-management/entry-plan-look/AddPlanone.html
index b6b0e40..084ca02 100644
--- a/src/app/plan-management/entry-plan-look/AddPlanone.html
+++ b/src/app/plan-management/entry-plan-look/AddPlanone.html
@@ -62,9 +62,13 @@
(已上传)
- 在线编制
- 在线编制预案
+ 模板在线编制
+
+
+ 自定义在线编制
+
+
diff --git a/src/app/plan-management/entry-plan-look/changeUrl.html b/src/app/plan-management/entry-plan-look/changeUrl.html
new file mode 100644
index 0000000..2b8d301
--- /dev/null
+++ b/src/app/plan-management/entry-plan-look/changeUrl.html
@@ -0,0 +1,16 @@
+
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html
index 64f92cd..aad55ac 100644
--- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html
+++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html
@@ -7,6 +7,9 @@
* @LastEditTime: 2021-08-24 14:01:03
-->
+
+
+