|
|
|
/*
|
|
|
|
* @Descripttion:
|
|
|
|
* @version:
|
|
|
|
* @Author: sueRimn
|
|
|
|
* @Date: 2021-05-19 15:50:20
|
|
|
|
* @LastEditors: sueRimn
|
|
|
|
* @LastEditTime: 2021-05-28 17:11:44
|
|
|
|
*/
|
|
|
|
import { Component, Inject, OnInit } from '@angular/core';
|
|
|
|
import { HttpClient } from '@angular/common/http'
|
|
|
|
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-plan-template',
|
|
|
|
templateUrl: './plan-template.component.html',
|
|
|
|
styleUrls: ['./plan-template.component.scss']
|
|
|
|
})
|
|
|
|
export class PlanTemplateComponent implements OnInit {
|
|
|
|
|
|
|
|
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
|
|
|
|
|
|
|
|
ngOnInit(): void {
|
|
|
|
|
|
|
|
}
|
|
|
|
groupPanle=true//分组展开
|
|
|
|
attPanle=true
|
|
|
|
//获取所有单位信息
|
|
|
|
newleftTabledata=[
|
|
|
|
{name:"333",level:3,basicCategoryId:"5e7c49e861550e2754d461ce",unitid: "5e7c8ffba3050b1a840ed4b6",unitname:'高层建筑',group:[]},//{groupName: "单位概况"}
|
|
|
|
{name:"444",level:5,basicCategoryId:"60127efe2757e904e5721d83",unitid: "5e7c9018a3050b1a840ed4b7",unitname:'地下建筑',group:[]}
|
|
|
|
]
|
|
|
|
group=[]
|
|
|
|
getLeftdata(){
|
|
|
|
/* this.http.get("/api/PlanTemplate").subscribe((data:any)=>{
|
|
|
|
this.leftTabledata=data
|
|
|
|
console.log(this.leftTabledata)
|
|
|
|
}) */
|
|
|
|
}
|
|
|
|
//新建预案弹窗
|
|
|
|
addKeyunit(){
|
|
|
|
const config = new MatSnackBarConfig();
|
|
|
|
config.verticalPosition = 'top';
|
|
|
|
config.duration = 3000
|
|
|
|
const dialogRef = this.dialog.open(addPlanname, {//调用open方法打开对话框并且携带参数过去
|
|
|
|
width: '340px',
|
|
|
|
height:'380px',
|
|
|
|
disableClose:true,
|
|
|
|
data:{plandata:this.newleftTabledata}
|
|
|
|
});
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
//console.log(result)
|
|
|
|
if(result!=undefined){
|
|
|
|
this.newleftTabledata.push(result)
|
|
|
|
for(var i=0;i<this.newleftTabledata.length-2;i++){
|
|
|
|
if(this.newleftTabledata[i].name==result.name){
|
|
|
|
this.newleftTabledata.splice(this.newleftTabledata.length-1,1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//console.log(this.newleftTabledata)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//删除预案
|
|
|
|
deletePlan(i){
|
|
|
|
let isTrue = confirm('您确定要删除该条预案吗')
|
|
|
|
if(isTrue){
|
|
|
|
this.newleftTabledata.splice(i,1)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//修改预案名称和级别
|
|
|
|
upPlan(item,i){
|
|
|
|
const dialogRef = this.dialog.open(upPlanname, {//调用open方法打开对话框并且携带参数过去
|
|
|
|
width: '340px',
|
|
|
|
height:'380px',
|
|
|
|
disableClose:true,
|
|
|
|
data:{item:item,plandata:this.newleftTabledata}
|
|
|
|
});
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
if(result!=undefined){
|
|
|
|
this.newleftTabledata[i].name=result.name
|
|
|
|
this.newleftTabledata[i].level=result.level
|
|
|
|
this.newleftTabledata[i].unitid=result.unitid
|
|
|
|
this.newleftTabledata[i].unitname=result.unitname
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//左侧预案模板点击事件
|
|
|
|
planName
|
|
|
|
unitName
|
|
|
|
leftclicki=-1//点了第几个模板
|
|
|
|
planClick(item){
|
|
|
|
//console.log(item)
|
|
|
|
this.planName=item.name
|
|
|
|
this.unitName=item.unitname
|
|
|
|
this.newleftTabledata.forEach((value,index,array)=>{
|
|
|
|
if(array[index].unitname==this.unitName){
|
|
|
|
this.group=array[index].group
|
|
|
|
this.leftclicki=index
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//右侧新增分组点击事件
|
|
|
|
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<array[index].group.length;i++){
|
|
|
|
for(var j=i+1;j<array[index].group.length;j++){
|
|
|
|
if(array[index].group[i].groupName==array[index].group[j].groupName){
|
|
|
|
array[index].group.splice(j,1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.group=array[index].group
|
|
|
|
}
|
|
|
|
//console.log(this.group)
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//console.log(this.newleftTabledata)
|
|
|
|
|
|
|
|
}
|
|
|
|
//删除分组
|
|
|
|
deleteGroup(groupName){
|
|
|
|
//console.log(this.group)
|
|
|
|
let isTrue = confirm('您确定要删除分组吗')
|
|
|
|
if(isTrue){
|
|
|
|
this.group.forEach((element,index,array)=>{
|
|
|
|
if(array[index].groupName==groupName){
|
|
|
|
this.group.splice(index,1)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//新增属性
|
|
|
|
addAttribute(groupName){
|
|
|
|
this.groupPanle=true
|
|
|
|
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(groupName,surveyName){
|
|
|
|
let isTrue = confirm('您确定要删除吗')
|
|
|
|
if(isTrue){
|
|
|
|
this.group.forEach((value,index,array)=>{
|
|
|
|
if (array[index].groupName==groupName) {
|
|
|
|
array[index].attribute.forEach((element,i) => {
|
|
|
|
if(element.surveyName==surveyName){
|
|
|
|
array[index].attribute[i].completed=false
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
console.log(this.newleftTabledata)
|
|
|
|
}
|
|
|
|
//新增属性信息
|
|
|
|
danweiInfTable=[]
|
|
|
|
addAttInfo(surveyName){
|
|
|
|
this.attPanle=true
|
|
|
|
const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去
|
|
|
|
width: '240px',
|
|
|
|
height:'400px',
|
|
|
|
disableClose:true,
|
|
|
|
data:{group:this.group,surveyName:surveyName}
|
|
|
|
});
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
//console.log(result)
|
|
|
|
if(result!=undefined){
|
|
|
|
/* this.group.forEach((value,index,array)=>{
|
|
|
|
if(array[index].groupName=='单位概况'){
|
|
|
|
array[index].attribute=result
|
|
|
|
}
|
|
|
|
}) */
|
|
|
|
this.newleftTabledata[this,this.leftclicki].group.forEach((value,index,array)=>{
|
|
|
|
if(value.groupName=='单位概况'){
|
|
|
|
array[index].attribute.forEach((element,i,attary) => {
|
|
|
|
if(element.surveyName==surveyName){
|
|
|
|
attary[i].attinf=result
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.group=this.newleftTabledata[this,this.leftclicki].group
|
|
|
|
//console.log(this.danweiInfTable)
|
|
|
|
}
|
|
|
|
console.log(this.newleftTabledata)
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
//保存
|
|
|
|
save(){
|
|
|
|
const config = new MatSnackBarConfig();
|
|
|
|
config.verticalPosition = 'top';
|
|
|
|
config.duration = 3000
|
|
|
|
let body={
|
|
|
|
basicCategoryId:this.newleftTabledata[this.leftclicki].basicCategoryId,
|
|
|
|
buildingTypeId:this.newleftTabledata[this.leftclicki].unitid,
|
|
|
|
planCategory:Number(this.newleftTabledata[this.leftclicki].level),
|
|
|
|
data:{}
|
|
|
|
}
|
|
|
|
this.http.post("/api/PlanTemplate",body).subscribe((data:any)=>{
|
|
|
|
this.snackBar.open('创建成功!','确定',config);
|
|
|
|
console.log(data)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//单位基本信息和建筑信息表格
|
|
|
|
displayedColumns: string[] = ['name','level','default','must', 'danwei','operation'];
|
|
|
|
|
|
|
|
}
|
|
|
|
//新建预案
|
|
|
|
@Component({
|
|
|
|
selector: 'addPlanname',
|
|
|
|
templateUrl: './addKeyname.html',
|
|
|
|
styleUrls: ['./addKeyname.scss']
|
|
|
|
})
|
|
|
|
export class addPlanname{
|
|
|
|
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
|
|
|
|
planname//预案名称
|
|
|
|
level//预案级别
|
|
|
|
unitid//单位类型id
|
|
|
|
unitname//单位类型名称
|
|
|
|
allunittype//所有单位信息
|
|
|
|
basicCategoryId
|
|
|
|
ngOnInit(): void {
|
|
|
|
this.getUnittype()
|
|
|
|
}
|
|
|
|
//获取单位类型
|
|
|
|
getUnittype(){
|
|
|
|
this.http.get("/api/BuildingTypes").subscribe((data:any)=>{
|
|
|
|
this.allunittype=data
|
|
|
|
console.log(this.allunittype)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//取消按钮
|
|
|
|
close(){
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
newplan(){
|
|
|
|
this.unitname=document.getElementById('unit').innerText
|
|
|
|
const config = new MatSnackBarConfig();
|
|
|
|
config.verticalPosition = 'top';
|
|
|
|
config.duration = 3000
|
|
|
|
if(this.planname==undefined||this.planname==''){
|
|
|
|
this.snackBar.open('请输入预案名称!','确定',config);
|
|
|
|
}
|
|
|
|
else if(this.level==undefined||this.level==''){
|
|
|
|
this.snackBar.open('请输入预案级别!','确定',config);
|
|
|
|
}else if(this.unitid==undefined||this.unitid==''){
|
|
|
|
this.snackBar.open('请选择单位类型!','确定',config);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
for(var i=0;i<this.data.plandata.length;i++){
|
|
|
|
if(this.data.plandata[i].unitid==this.unitid&&this.data.plandata[i].level==this.level){
|
|
|
|
this.snackBar.open('预案模板重复,请重新建立预案模板!','确定',config);
|
|
|
|
this.planname==''
|
|
|
|
this.level==''
|
|
|
|
this.unitid==''
|
|
|
|
this.unitname==''
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.allunittype.forEach(element => {
|
|
|
|
if(element.id==this.unitid){
|
|
|
|
this.basicCategoryId=element.basicCategoryId
|
|
|
|
}
|
|
|
|
});
|
|
|
|
let planData={
|
|
|
|
name:this.planname,
|
|
|
|
level:this.level,
|
|
|
|
unitid:this.unitid,
|
|
|
|
unitname:this.unitname,
|
|
|
|
basicCategoryId:this.basicCategoryId,
|
|
|
|
group:[]
|
|
|
|
}
|
|
|
|
this.dialogRef.close(planData)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//修改预案名称和级别
|
|
|
|
@Component({
|
|
|
|
selector: 'upPlanname',
|
|
|
|
templateUrl: './upPlan.html',
|
|
|
|
styleUrls: ['./addKeyname.scss']
|
|
|
|
})
|
|
|
|
export class upPlanname{
|
|
|
|
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
|
|
|
|
name=this.data.item.name//预案名称
|
|
|
|
level=this.data.item.level//预案级别
|
|
|
|
unitName=this.data.item.unitname//单位类型
|
|
|
|
unitid=this.data.item.unitid
|
|
|
|
allunittype
|
|
|
|
ngOnInit(): void{
|
|
|
|
this.getUnittype()
|
|
|
|
}
|
|
|
|
//获取单位类型
|
|
|
|
getUnittype(){
|
|
|
|
this.http.get("/api/BuildingTypes").subscribe((data:any)=>{
|
|
|
|
this.allunittype=data
|
|
|
|
//console.log(this.allunittype)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//取消按钮
|
|
|
|
close(){
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
//确定按钮
|
|
|
|
upplan(){
|
|
|
|
this.unitName=document.getElementById('unit').innerText
|
|
|
|
const config = new MatSnackBarConfig();
|
|
|
|
config.verticalPosition = 'top';
|
|
|
|
config.duration = 3000
|
|
|
|
if(this.name==undefined||this.name==''){
|
|
|
|
this.snackBar.open('请输入预案名称!','确定',config);
|
|
|
|
}
|
|
|
|
else if(this.level==undefined||this.level==''){
|
|
|
|
this.snackBar.open('请输入预案级别!','确定',config);
|
|
|
|
}else{
|
|
|
|
for(var i=0;i<this.data.plandata.length;i++){
|
|
|
|
if(this.data.plandata[i].unitid==this.unitid&&this.data.plandata[i].level==this.level){
|
|
|
|
this.snackBar.open('预案模板重复,请重新建立预案模板!','确定',config);
|
|
|
|
this.name==''
|
|
|
|
this.level==''
|
|
|
|
this.unitid==''
|
|
|
|
this.unitName==''
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let planData={
|
|
|
|
name:this.name,
|
|
|
|
level:this.level,
|
|
|
|
unitid:this.unitid,
|
|
|
|
unitname:this.unitName
|
|
|
|
}
|
|
|
|
this.dialogRef.close(planData)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//新增分组
|
|
|
|
@Component({
|
|
|
|
selector: 'addGroup',
|
|
|
|
templateUrl: './addgroup.html',
|
|
|
|
styleUrls: ['./addgroup.scss']
|
|
|
|
})
|
|
|
|
export class addGroup{
|
|
|
|
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@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<this.groupName.length;i++){
|
|
|
|
for(var j=i+1;j<this.groupName.length;j++){
|
|
|
|
if(this.groupName[i]==this.groupName[j]){
|
|
|
|
this.groupName.splice(j,1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.dialogRef.close(this.addgtoup)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//单位概况新增弹窗
|
|
|
|
@Component({
|
|
|
|
selector: 'adddwsurvey',
|
|
|
|
templateUrl: './dwsurvey.html',
|
|
|
|
styleUrls: ['./addgroup.scss']
|
|
|
|
})
|
|
|
|
export class adddwsurvey{
|
|
|
|
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@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<addPlanname>,@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:'-'}
|
|
|
|
]
|
|
|
|
ngOnInit(): void{
|
|
|
|
//console.log(this.data)
|
|
|
|
this.data.group.forEach(element => {
|
|
|
|
if(element.groupName=='单位概况'&&element.attribute!=undefined){
|
|
|
|
element.attribute.forEach(value => {
|
|
|
|
if(this.data.surveyName=='单位基本信息'&&value.attinf!=undefined){
|
|
|
|
this.addAttinf=value.attinf
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//取消按钮
|
|
|
|
close(){
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
//确定按钮
|
|
|
|
defineClick(){
|
|
|
|
this.dialogRef.close(this.addAttinf)
|
|
|
|
}
|
|
|
|
}
|