Browse Source

[修改]自定义表格类型编辑列数为0问题修改

tangshan
陈敬瑜 3 years ago
parent
commit
e5c6b6297f
  1. 11
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  2. 6
      src/app/plan-management/create-plan-online-five/updatal.html
  3. 2
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

11
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

@ -2199,8 +2199,8 @@ export class updataHl{
} }
level//类型 level//类型
headName=this.data.headName//表头名称 headName=this.data.headName//表头名称
lieNumber=this.data.tableth[0].length//最小列数 lieNumber=this.data.tableth[0].length//最小列数 this.data.zdy!=undefined?0:
hNumber=this.data.tableth.length//行数 hNumber=this.data.tableth.length//行数this.data.zdy!=undefined?0:
//取消按钮 //取消按钮
close(){ close(){
this.dialogRef.close(); this.dialogRef.close();
@ -2218,7 +2218,7 @@ export class updataHl{
} }
//确定按钮 //确定按钮
newdisaster(){ newdisaster(){
console.log(this.data) console.log(this.lieNumber,this.hNumber)
let result={ let result={
lieNumber:this.level==2? this.lieNumber:this.data.tableth.length, lieNumber:this.level==2? this.lieNumber:this.data.tableth.length,
hNumber:this.hNumber hNumber:this.hNumber
@ -2234,7 +2234,10 @@ export class updataHl{
this.snackBar.open('列数不许为空,并且列数大于0!','确定',config); this.snackBar.open('列数不许为空,并且列数大于0!','确定',config);
}else if(this.level==2&& (this.hNumber==undefined||this.hNumber=='')){ }else if(this.level==2&& (this.hNumber==undefined||this.hNumber=='')){
this.snackBar.open('行数不许为空,并且行数大于0!!','确定',config); this.snackBar.open('行数不许为空,并且行数大于0!!','确定',config);
}else{ }else if(this.level==1&& this.data.tableth.length<=0){
this.snackBar.open('列数不许为空,并且列数大于0!','确定',config);
}
else{
this.dialogRef.close(result); this.dialogRef.close(result);
} }

6
src/app/plan-management/create-plan-online-five/updatal.html

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

2
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -1880,7 +1880,7 @@ export class wenbenUpload{
console.log(this.data) console.log(this.data)
window.setTimeout(()=>{ window.setTimeout(()=>{
this.dialogRef.close(); this.dialogRef.close();
},7500) },8000)
} }
src=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.src); src=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.src);
} }

Loading…
Cancel
Save