Browse Source

fix

master
drfelfel 1 year ago
parent
commit
64f4338eba
2 changed files with 25 additions and 14 deletions
  1. +2
    -0
      src/routes/panel/volunteer/table/table.component.html
  2. +23
    -14
      src/routes/panel/volunteer/table/table.component.ts

+ 2
- 0
src/routes/panel/volunteer/table/table.component.html View File

@ -20,6 +20,8 @@
<mat-option value="lastname"> نام خانوادگی </mat-option>
<mat-option value="nationalcode"> کد ملی </mat-option>
<mat-option value="major"> رشته </mat-option>
<mat-option value="step"> مرحله </mat-option>
<mat-option value="militaryserviceStatus"> نظام وظیفه </mat-option>
</mat-select>

+ 23
- 14
src/routes/panel/volunteer/table/table.component.ts View File

@ -23,7 +23,7 @@ export class TableComponent implements OnInit {
public filters = {
university: ""
}
limit: number = 0;
limit: number = 10;
constructor(private excel: Excel, private rayconnect: Rayconnect, private cdr: ChangeDetectorRef) { }
ngOnInit(): void {
@ -53,7 +53,7 @@ export class TableComponent implements OnInit {
}
this.data.connect().next(rendered)
this.data.connect().next(rendered)
}));
@ -75,8 +75,8 @@ export class TableComponent implements OnInit {
info: {
method: "GET",
data: {
page: 0,
limit: 10
page: (this.page ),
limit: this.limit
}
}
})
@ -95,8 +95,8 @@ export class TableComponent implements OnInit {
info: {
method: 'SUB',
data: {
page: 0,
limit: 10
page: (this.page),
limit: this.limit
}
}
}).then(res => {
@ -110,27 +110,36 @@ export class TableComponent implements OnInit {
Get(e, x = "no") {
console.log(e)
let Query = {}
if (e.pageIndex) {
this.page = (e.pageIndex + 1)
if (e.pageIndex != undefined) {
this.page = e.pageIndex
this.limit = e.pageSize
}
Query = {
page: this.page,
limit: this.limit
}
if (x == 'search') {
this.page = 0;
this.limit = 10;
Query['search'] = this.search
Query['searchBy'] = this.searchBy
}
Query = {
page: (this.page),
limit: this.limit,
search: this.search,
searchBy: this.searchBy
}
console.log(Query)
this.rayconnect.RequestBack({
scope: 'kateb',

Loading…
Cancel
Save