Browse Source

[修改]选择按钮选择问题

tangshan
陈敬瑜 3 years ago
parent
commit
69250b2e20
  1. 2
      src/app/ui/plan-template/plan-template.component.html
  2. 15
      src/app/ui/plan-template/plan-template.component.ts
  3. 6
      src/app/ui/plan-template/updatal.html

2
src/app/ui/plan-template/plan-template.component.html

@ -92,7 +92,7 @@
<div class="caozuo">
<button mat-raised-button color="#ECF6FF" (click)='delAttribute(item.groupName,element.surveyName)'><img src="../../../assets/images/deletehui.png"> 删除</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addAttInfo(element.surveyName,suri)'
*ngIf="item.groupName=='单位概况'&&(element.surveyName!='四周毗邻'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区')"><img src="../../../assets/images/updatabai.png"> 编辑</button>
*ngIf="item.groupName=='单位概况'&&(element.surveyName!='四周毗邻'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区')&&element.zdy==undefined"><img src="../../../assets/images/updatabai.png"> 编辑</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addAttInfo(element.surveyName,suri)'
*ngIf="element.zdy!=undefined"><img src="../../../assets/images/addbai.png"> 新建</button>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 15px;left: 1px;margin-right: 5px;float: right;" (click)='zaiDown(zi,suri)'>

15
src/app/ui/plan-template/plan-template.component.ts

@ -1484,10 +1484,11 @@ export class adddwsurvey{
]
ngOnInit(): void{
console.log(this.data)
this.data=JSON.parse(JSON.stringify(this.data))
this.data.forEach(element => {
if(element.groupName=='单位概况'&&element.attribute!=undefined){
//this.addwsurvey=element.attribute
element.attribute.forEach((datavalue,index,dataarr) => {
this.addwsurvey=element.attribute
/* element.attribute.forEach((datavalue,index,dataarr) => {
this.addwsurvey.forEach((value,i,arr)=>{
if(dataarr[index].surveyName==arr[i].surveyName){
if(dataarr[index].completed==true&&arr[i].completed==false){
@ -1495,9 +1496,10 @@ ngOnInit(): void{
}
}
})
});
}); */
}
});
console.log(this.addwsurvey)
}
//取消按钮
close(){
@ -1695,7 +1697,12 @@ export class zdydisaster{
this.snackBar.open('请选择类型!','确定',config);
}else if(this.headName==undefined||this.headName==''){
this.snackBar.open('请输入表头名称!','确定',config);
}else{
}else if(this.lieNumber==0||this.lieNumber==undefined){
this.snackBar.open('请输入列数!','确定',config);
}else if(this.hNumber==0||this.hNumber==undefined){
this.snackBar.open('请输入行数!','确定',config);
}
else{
let tree={
json:[],
name: ''

6
src/app/ui/plan-template/updatal.html

@ -12,19 +12,19 @@
<div class="queryField" *ngIf="level==1||level==undefined">
<label style="margin-right: 10px;">列数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required min="0">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required min="0" required>
</mat-form-field>
</div>
<div class="queryField" *ngIf="level==2">
<label style="margin-right: 10px;">列数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth[0].length" autocomplete="off" required min="0">
<input matInput type="number" [(ngModel)]="data.tableth[0].length" autocomplete="off" required min="1" required>
</mat-form-field>
</div>
<div class="queryField" *ngIf="level==2">
<label style="margin-right: 10px;">行数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required min="0">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required min="1" required>
</mat-form-field>
</div>
<div class="bottom">

Loading…
Cancel
Save