master
drfelfel 2020-10-24 09:27:41 +03:30
parent ee1968ed11
commit f733add51a
2 changed files with 18 additions and 4 deletions

View File

@ -18,7 +18,7 @@
<div class="selector" *ngIf="this.uid == 'tvu'">
<mat-form-field appearance="outline">
<mat-label>انتخاب مرکز / دانشگاه</mat-label>
<mat-select [(ngModel)]="namespace" multiple (selectionChange)="subscribe()">
<mat-select [(ngModel)]="namespace" multiple (selectionChange)="subscribe()" [disabled]="exporting">
<mat-optgroup
*ngFor="let group of univeristygroups"
[label]="group.name"
@ -39,15 +39,16 @@
<mat-form-field appearance="outline">
<mat-label>مقطع</mat-label>
<mat-select [(ngModel)]="grade" (selectionChange)="Get($event)">
<mat-select [(ngModel)]="grade" (selectionChange)="Get($event)" [disabled]="exporting">
<mat-option value="کاردانی"> کاردانی </mat-option>
<mat-option value="کارشناسی"> کارشناسی </mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-form-field appearance="outline" >
<mat-label>جستجو بر اساس فیلد</mat-label>
<mat-select
[(ngModel)]="searchBy"
[disabled]="exporting"
(selectionChange)="Get($event, 'search')"
>
<mat-option value="name"> نام </mat-option>
@ -62,6 +63,7 @@
<mat-form-field appearance="outline">
<mat-label>جستجو داوطلب</mat-label>
<input
[disabled]="exporting"
matInput
[(ngModel)]="search"
type="text"
@ -78,6 +80,11 @@
نتایج یافت شده : {{ this.size }}
</p>
<div class="flex-space"></div>
<button mat-raised-button color="green" (click)="exportExcel()" [disabled]="exporting">
<mat-icon>cloud_download</mat-icon>
<span>دریافت خروجی اکسل</span>
</button>
</mat-expansion-panel>
<mat-progress-bar
*ngIf="loading == true"

View File

@ -45,6 +45,7 @@ export class TableComponent implements OnInit {
university: ""
}
limit: number = 10;
exporting: boolean;
constructor(private excel: Excel, private rayconnect: Rayconnect, private cdr: ChangeDetectorRef) { }
ngOnInit(): void {
@ -141,6 +142,12 @@ export class TableComponent implements OnInit {
this.data.data.unshift(data);
}
exportExcel() {
this.exporting = true
console.log(this.size)
}
Get(e, x = "no") {
console.log(e)
@ -207,7 +214,7 @@ export class TableComponent implements OnInit {
if(this.uid == 'tvu'){
if (this.uid == 'tvu') {
Query['namespace'] = this.namespace
}