diff --git a/src/app/ui/plan-template/addKeyname.html b/src/app/ui/plan-template/addKeyname.html index 0252f14..394aab7 100644 --- a/src/app/ui/plan-template/addKeyname.html +++ b/src/app/ui/plan-template/addKeyname.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-20 16:11:57 * @LastEditors: sueRimn - * @LastEditTime: 2021-05-20 17:05:21 + * @LastEditTime: 2021-05-24 09:52:10 -->
@@ -21,13 +21,21 @@
- + Ⅲ级 Ⅳ级 Ⅴ级
+
+ + + + {{unit.name}} + + +
diff --git a/src/app/ui/plan-template/addattinf.html b/src/app/ui/plan-template/addattinf.html new file mode 100644 index 0000000..d0fce90 --- /dev/null +++ b/src/app/ui/plan-template/addattinf.html @@ -0,0 +1,22 @@ + +
+
+ 新增分组 +
+
+
+ {{item.addAttinfName}} +
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/ui/plan-template/addgroup.html b/src/app/ui/plan-template/addgroup.html new file mode 100644 index 0000000..81754bb --- /dev/null +++ b/src/app/ui/plan-template/addgroup.html @@ -0,0 +1,22 @@ + +
+
+ 新增分组 +
+
+
+ {{item.groupName}} +
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/ui/plan-template/addgroup.scss b/src/app/ui/plan-template/addgroup.scss new file mode 100644 index 0000000..b66790c --- /dev/null +++ b/src/app/ui/plan-template/addgroup.scss @@ -0,0 +1,40 @@ +.box{ + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + .top{ + width: 100%; + height: 40px; + text-align: center; + span{ + font-size: 18px; + } + } + .center{ + width: 100%; + height: 75%; + .group{ + height: 35px; + //margin-left: 20px; + .example-margin { + margin: 0 10px; + } + input{ + top: 2px; + } + span{ + margin-left: 8px; + } + } + } + .bottom{ + width: 100%; + margin-top: 40px; + button{ + width: 80px; + height: 36px; + font-size: 16px; + } + } +} \ No newline at end of file diff --git a/src/app/ui/plan-template/dwsurvey.html b/src/app/ui/plan-template/dwsurvey.html new file mode 100644 index 0000000..3607b53 --- /dev/null +++ b/src/app/ui/plan-template/dwsurvey.html @@ -0,0 +1,22 @@ + +
+
+ 新增分组 +
+
+
+ {{item.surveyName}} +
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 1e6fd5d..42d3d2f 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-19 15:50:20 * @LastEditors: sueRimn - * @LastEditTime: 2021-05-21 16:56:26 + * @LastEditTime: 2021-05-26 16:41:51 -->
@@ -36,9 +36,87 @@ {{planName}}
- + +
-
+
+ + + + + +
+ {{item.groupName}} +
+
+ + 编辑 +
+
+ + 删除 +
+ +
+
+
+ + + + +
+
+ {{element.surveyName}} +
+
+ + +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称111类型111默认值111必填111单位111操作 + 删除 +
+
+
+
+
+
+ +
+
diff --git a/src/app/ui/plan-template/plan-template.component.scss b/src/app/ui/plan-template/plan-template.component.scss index ed27896..223dc0b 100644 --- a/src/app/ui/plan-template/plan-template.component.scss +++ b/src/app/ui/plan-template/plan-template.component.scss @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-19 15:50:20 * @LastEditors: sueRimn - * @LastEditTime: 2021-05-21 16:55:49 + * @LastEditTime: 2021-05-26 16:38:06 */ .box{ height: 97%; @@ -127,10 +127,89 @@ width: 50%; height: 100%; button{ - margin-left: 80%; + //margin-left: 70%; margin-top: 5px; } } } + .rightbody{ + width: 100%; + overflow: auto; + .panelhead{ + background-color: #E1F1FF; + height: 50px; + .paneltitle{ + width: 100%; + font-size: 16px; + color: #2196F3; + display: flex; + //justify-content: space-around; + .groupName{ + width: 100px; + } + .addinfo{ + height: 100%; + width: 75px; + margin-left: 75%; + span{ + position: relative; + bottom: 2px; + } + } + .delinfo{ + height: 100%; + width: 75px; + span{ + position: relative; + bottom: 2px; + } + } + .dwgk{ + height: 100%; + width: 100%; + display: flex; + .attname{ + height: 100%; + width: 40%; + span{ + font-size: 16px; + line-height: 50px; + height: 50px; + } + } + .caozuo{ + height: 100%; + width: 60%; + button{ + font-size: 16px; + width: 80px; + height: 34px; + //margin-left: 20%; + float: right; + margin-top: 8px; + } + img{ + position: relative; + bottom: 2px; + } + } + } + + } + } + .table{ + width: 100%; + table{ + width: 100%; + font-size: 16px; + th{ + height: 40px; + font-size: 16px; + text-align: center; + background-color: #F7F8FA; + } + } + } + } } } \ No newline at end of file diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 8d8e95e..d6a2059 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-19 15:50:20 * @LastEditors: sueRimn - * @LastEditTime: 2021-05-21 16:27:07 + * @LastEditTime: 2021-05-26 16:58:15 */ import { Component, Inject, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -25,7 +25,11 @@ export class PlanTemplateComponent implements OnInit { } //获取左侧单位信息 - newleftTabledata=[] + newleftTabledata=[ + {name:"333",level:'Ⅲ级',unitid: "5e7c49e861550e2754d461ce",group:[]},//{groupName: "单位概况"} + {name:"444",level:'Ⅳ级',unitid: "5e7c49e861550e2754d461ce",group:[]} +] + group=[] getLeftdata(){ /* this.http.get("/api/PlanTemplate").subscribe((data:any)=>{ this.leftTabledata=data @@ -39,12 +43,12 @@ export class PlanTemplateComponent implements OnInit { config.duration = 3000 const dialogRef = this.dialog.open(addPlanname, {//调用open方法打开对话框并且携带参数过去 width: '340px', - height:'330px', + height:'380px', disableClose:true, data:{plandata:this.newleftTabledata} }); dialogRef.afterClosed().subscribe(result => { - console.log(result) + //console.log(result) if(result!=undefined){ this.newleftTabledata.push(result) for(var i=0;i{ + if(array[index].name==this.planName){ + this.group=array[index].group + } + }) } + //右侧新增分组点击事件 + addGroupClick(){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + if(this.planName==undefined){ + this.snackBar.open('请选择预案模板!','确定',config); + }else{ + this.newleftTabledata.forEach((value,index,array)=>{ + if(array[index].name==this.planName){ + this.group=array[index].group + } + }) + const dialogRef = this.dialog.open(addGroup, {//调用open方法打开对话框并且携带参数过去 + width: '240px', + height:'590px', + disableClose:true, + data:this.group + }); + dialogRef.afterClosed().subscribe(result => { + //console.log(result,this.newleftTabledata) + this.newleftTabledata.forEach((value,index,array)=>{ + if(array[index].name==this.planName){ + if(result!=undefined){ + result.forEach((valuer,i,rarr) => { + //console.log(valuer) + /* let groupName={ + groupName:valuer + } */ + //添加分组名称 + array[index].group=rarr + + }); + } + //去重 + for(var i=0;i{ + if(array[index].groupName==groupName){ + this.group.splice(index,1) + } + }) + } + } + //新增属性 + addAttribute(groupName){ + if(groupName=='单位概况'){ + const dialogRef = this.dialog.open(adddwsurvey, {//调用open方法打开对话框并且携带参数过去 + width: '240px', + height:'510px', + disableClose:true, + data:this.group + }); + dialogRef.afterClosed().subscribe(result => { + //console.log(result) + if(result!=undefined){ + this.group.forEach((value,index,array)=>{ + if(array[index].groupName=='单位概况'){ + array[index].attribute=result + } + }) + } + //console.log(this.newleftTabledata) + }); + } + } + //删除具体属性 + delAttribute(surveyName){ + + } + //新增属性信息 + addAttInfo(){ + const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去 + width: '240px', + height:'400px', + disableClose:true, + data:this.group + }); + dialogRef.afterClosed().subscribe(result => { + console.log(result) + if(result!=undefined){ + /* this.group.forEach((value,index,array)=>{ + if(array[index].groupName=='单位概况'){ + array[index].attribute=result + } + }) */ + } + console.log(this.newleftTabledata) + }); + + } + //单位基本信息和建筑信息表格 + displayedColumns: string[] = ['name','level','default','must', 'danwei','operation']; } //新建预案 @@ -97,8 +218,17 @@ export class addPlanname{ constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} unitname//预案名称 level//预案级别 + unittype//单位类型 + allunittype//所有单位信息 ngOnInit(): void { - console.log(this.data) + this.getUnittype() + } + //获取单位类型 + getUnittype(){ + this.http.get("/api/BasicCategories").subscribe((data:any)=>{ + this.allunittype=data + //console.log(data) + }) } //取消按钮 close(){ @@ -113,17 +243,23 @@ export class addPlanname{ } else if(this.level==undefined||this.level==''){ this.snackBar.open('请输入预案级别!','确定',config); - }else{ + }else if(this.unittype==undefined||this.unittype==''){ + this.snackBar.open('请选择单位类型!','确定',config); + } + else{ for(var i=0;i,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + addgtoup=[ + {groupName:'单位概况',completed:false},{groupName:'灾情设定',completed:false},{groupName:'力量调集',completed:false}, + {groupName:'组织指挥',completed:false},{groupName:'作战行动',completed:false},{groupName:'社会联动',completed:false}, + {groupName:'勤务保障',completed:false},{groupName:'特别警示',completed:false},{groupName:'辅助决策',completed:false}, + {groupName:'交通水源',completed:false},{groupName:'重点图示',completed:false},{groupName:'预案附件',completed:false} +] + groupName=[] + ngOnInit(): void{ + //console.log(this.data) + /* this.addgtoup.forEach((value,index,array)=>{ + this.data.forEach(element => { + if(element.groupName==array[index].groupName){ + array[index].completed=true + } + }); + }) */ + if(this.data.length>0){ + this.addgtoup=this.data + } + + } + //取消按钮 + close(){ + this.dialogRef.close(); + } + //复选框点击事件 + checkClick(e,item){ + //console.log(e,item) + if (e.checked) { + this.groupName.push(item) + }else { + this.groupName.forEach((value,index,array)=>{ + if(value==item){ + this.groupName.splice(index,1) + } + }) + } + //console.log(this.groupName) + } + //确定提交 + newGroup(){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.addgtoup.forEach((value,index,arraay)=>{ + if(arraay[index].completed){ + this.groupName.push(arraay[index].groupName) + } + }) + for(var i=0;i,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + addwsurvey=[ + {surveyName:'单位基本信息',completed:false},{surveyName:'建筑信息',completed:false},{surveyName:'四周毗邻',completed:false}, + {surveyName:'消防设施',completed:false},{surveyName:'进攻通道',completed:false},{surveyName:'重点部位',completed:false}, + {surveyName:'功能分区',completed:false},{surveyName:'行车路线',completed:false},{surveyName:'千米水源',completed:false},{surveyName:'实景图',completed:false} +] +ngOnInit(): void{ + console.log(this.data) + this.data.forEach(element => { + if(element.groupName=='单位概况'&&element.attribute!=undefined){ + this.addwsurvey=element.attribute + } + }); +} +//取消按钮 +close(){ + this.dialogRef.close(); +} +//确定按钮 +defineClick(){ + this.dialogRef.close(this.addwsurvey) +} +} +//编辑属性信息弹窗 +@Component({ + selector: 'addattinf', + templateUrl: './addattinf.html', + styleUrls: ['./addgroup.scss'] +}) +export class addattinf{ + constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + addAttinf=[ + {addAttinfName:'统一社会信用代码',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'}, + {addAttinfName:'单位类型',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'}, + {addAttinfName:'联系人',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'}, + {addAttinfName:'联系电话',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'}, + {addAttinfName:'辖区中队',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'}, + {addAttinfName:'单位地址',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'}, + {addAttinfName:'单位照片',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'} +] +//取消按钮 +close(){ + this.dialogRef.close(); +} +//确定按钮 +defineClick(){ + this.dialogRef.close(this.addAttinf) +} +} \ No newline at end of file diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index 74adbff..8a165ed 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -87,6 +87,10 @@ import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent} import { PlanTemplateComponent } from './plan-template/plan-template.component' import { addPlanname } from './plan-template/plan-template.component' import { upPlanname } from './plan-template/plan-template.component' +import { addGroup } from './plan-template/plan-template.component' +import { adddwsurvey } from './plan-template/plan-template.component' +import { addattinf } from './plan-template/plan-template.component' + @NgModule({ declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent, IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization, @@ -97,7 +101,7 @@ import { upPlanname } from './plan-template/plan-template.component' addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent, CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent, CreateBuildingPlan,EditBuildingPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding, - EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,Organization, PlanTemplateComponent,addPlanname,upPlanname], + EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,Organization, PlanTemplateComponent,addPlanname,upPlanname,addGroup,adddwsurvey,addattinf], imports: [ CommonModule, diff --git a/src/assets/images/addbai.png b/src/assets/images/addbai.png new file mode 100644 index 0000000..6829a07 Binary files /dev/null and b/src/assets/images/addbai.png differ