From 929b9e8f7d5cb2a6519754c5d720f83055458b98 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 5 May 2022 10:35:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../petrol-station-manage.component.html | 1 + .../petrol-station-manage.ts | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html index 8dd9149..282b88a 100644 --- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html +++ b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html @@ -114,6 +114,7 @@ [nzLoading]="tableLoading" [nzPageIndex]="whereObject.pageNum" (nzPageIndexChange)="requestData($event)" + (nzPageSizeChange)="pageSizeChange($event)" [nzScroll]="{ x: '1150px'}"> diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts index c4186a5..e1eaa15 100644 --- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts +++ b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts @@ -10,7 +10,7 @@ import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {TySalesmanService} from '../../../services/ty-salesman.service'; import {TyAgentPriceService} from '../../../services/ty-agent-price.service'; import {GasService} from '../../../services/gas.service'; -import {CommonsService} from "../../../services/commons.service"; +import {CommonsService} from '../../../services/commons.service'; @Component({ selector: 'app-petrol-station-manage', @@ -29,7 +29,9 @@ export class PetrolStationManageComponent implements OnInit { tableLoading = true; searchForm: FormGroup; pageNum: number; - whereObject: any = {}; + whereObject: any = { + pageSize: 10 + }; allChecked = false; checkedData = []; @@ -122,7 +124,6 @@ export class PetrolStationManageComponent implements OnInit { requestData(pageNum) { this.tableLoading = true; this.whereObject['pageNum'] = pageNum; - this.whereObject['pageSize'] = 10; this.tyAgentOilStationService.getOilStationList(this.whereObject, data => { if (data['return_code'] === '000000') { this.dataObject = data['return_data']; @@ -829,7 +830,7 @@ export class PetrolStationManageComponent implements OnInit { } submitOilDisabled(oilStationId: number, oilNo: string) { - this.gasService.disabledOil({ storeId: oilStationId, oilNo: oilNo }, data => { + this.gasService.disabledOil({ storeId: oilStationId, oilNo }, data => { if (data['return_code'] === '000000') { this.modal.success({ nzTitle: '提示', @@ -849,7 +850,7 @@ export class PetrolStationManageComponent implements OnInit { * 油品启用提示 */ showOilEnableConfirm(oilStationId: number, oilNo: string): void { - this.gasService.enableOil({ storeId: oilStationId, oilNo: oilNo }, data => { + this.gasService.enableOil({ storeId: oilStationId, oilNo }, data => { if (data['return_code'] === '000000') { this.modal.success({ nzTitle: '提示', @@ -885,6 +886,11 @@ export class PetrolStationManageComponent implements OnInit { } }); } + + pageSizeChange(pageSize: number) { + this.whereObject.pageSize = pageSize; + this.requestData(1); + } } export class PetrolStationManage {