From 5869602c227989f824cf05000cedc956bd7a3c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E7=BA=A2=E6=A2=85?= <1924913374@qq.com> Date: Fri, 20 May 2022 17:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=90=A5=E9=94=80=E7=B3=BB?= =?UTF-8?q?=E7=BB=9Fkey=E7=A0=81=E5=88=97=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/key/detail/list.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/plan/key/detail/list.js b/src/pages/plan/key/detail/list.js index 6d38ed88..e8b91fd2 100644 --- a/src/pages/plan/key/detail/list.js +++ b/src/pages/plan/key/detail/list.js @@ -112,6 +112,7 @@ export default class acclist extends React.Component { //分页 onPageChange(e) { this.setState({ page: e }); + setTimeout(() => { this.getpageFn(); }, 0); @@ -149,9 +150,13 @@ export default class acclist extends React.Component { let data = { page: this.state.page, limit: this.state.limit, - key: this.state.key, }; + console.log(155,this.state.status); + let status = this.state.status > 0 ? this.state.status : null; + if (status) { + data.status=status; + } this.getKeyCodeList(data); } @@ -208,6 +213,7 @@ export default class acclist extends React.Component { } iptsureFn(e) { + let status = this.state.status > 0 ? this.state.status : null; this.setState({ page: 1 }); this.setState({ limit: 10 }); let data = { @@ -215,6 +221,9 @@ export default class acclist extends React.Component { limit: 10, key: this.state.search, }; + if (status) { + data.status=status; + } this.getKeyCodeList(data); } @@ -234,10 +243,7 @@ export default class acclist extends React.Component { tabFn(e) { let status = e > 0 ? e : null; - if (!status) { this.setState({ status: e }); - } - this.setState({ search: "" }); this.setState({ page: 1 }); this.setState({ limit: 10 });