diff --git a/src/pages/plan/key/detail/list.js b/src/pages/plan/key/detail/list.js index 70770b29..8f0fd5f2 100644 --- a/src/pages/plan/key/detail/list.js +++ b/src/pages/plan/key/detail/list.js @@ -64,11 +64,7 @@ export default class acclist extends React.Component{ } componentDidMount(e){ - let data = { - page:1, - limit:10 - } - this.getKeyCodeList(data); + } componentWillMount(){ this.setState({tableHeight:window.innerHeight-430}); @@ -196,7 +192,6 @@ export default class acclist extends React.Component{ } tabFn(e){ - console.log(e) let status = e > 0 ? e : null if(!status) { @@ -222,8 +217,6 @@ export default class acclist extends React.Component{ key:rowData.key } - - keyUsage(formdata).then((res)=>{ handelResponse(res,(req,msg)=>{ let data = { @@ -277,17 +270,6 @@ export default class acclist extends React.Component{ console.log("当前菜单", cur_nav) sessionStorage.setItem('breaknav',JSON.stringify(cur_nav)); - - // let formdata={ - // key:rowData.key - // } - // getKeyLog(formdata).then((res)=>{ - // handelResponse(res,(req,msg)=>{ - - // },(err)=>{ - // console.log(err) - // }) - // }) } diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index ab9a7403..cbb3d147 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -168,13 +168,6 @@ export default class acclist extends React.Component{ Notify.error("手机号格式不正确") return; } - // if(!emailReg.test(data.email)){ - - // Notify.error("邮箱格式不正确") - // return; - - // } - postKeyEmail(key_id,data).then((res)=>{ @@ -240,7 +233,7 @@ export default class acclist extends React.Component{ } componentDidMount(){ - this.getKeyList(); + // this.getKeyList(); } @@ -336,12 +329,10 @@ export default class acclist extends React.Component{ } this.setState({page:1,limit:10}) + setTimeout(() => { this.getKeyList(); }, 10); - - - } //作废 delFn(){ @@ -387,10 +378,10 @@ export default class acclist extends React.Component{ operation: status ? 4 : 5 } startOrStopKeybatch(row.id,data).then((res)=>{ - handelResponse(res,(req,msg)=>{ - let id = _.findIndex(this.state.distdata,(o)=>{return o.id == row.id}); - this.state.distdata[id].status = status; - this.setState({distdata:this.state.distdata}) + handelResponse(res,(req,msg)=>{ + let id = _.findIndex(this.state.distdata,(o)=>{return o.id == row.id}); + this.state.distdata[id].status = status; + this.setState({distdata:this.state.distdata}) Notify.success(msg); let data = { page:1, @@ -546,7 +537,6 @@ linkTo(row){ componentDidUpdate(prevProps,prevState){ // 参数分别为改变之前的数据状态对象 if(prevState.key_word!=this.state.key_word &&!this.state.key_word){ - this.getKeyList(); }