From 7b16816dc26662fa46ca2e41036176701dedb994 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Fri, 10 Dec 2021 18:01:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=99=BB=E5=BD=95children?= =?UTF-8?q?=E8=BF=98=E5=8E=9Fchild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/subnav/main.js | 10 ++++---- src/pages/home/home.js | 8 +++---- src/pages/login/loginform.js | 6 ++--- src/pages/system/account/list/list.js | 31 +++++++++++++++++++++++-- src/pages/system/account/list/list.less | 10 ++++++++ 5 files changed, 51 insertions(+), 14 deletions(-) diff --git a/src/components/subnav/main.js b/src/components/subnav/main.js index 26d64a48..af3b0784 100644 --- a/src/components/subnav/main.js +++ b/src/components/subnav/main.js @@ -21,7 +21,7 @@ export default class topNav extends React.Component{ showlinkmenu(e,item){ let self=this; try{ - item.children.forEach(item=>{ + item.child.forEach(item=>{ if(item.level ===5){ sessionStorage.setItem('pathname2',item.router); throw '终止循环' @@ -30,11 +30,11 @@ export default class topNav extends React.Component{ }catch(e){ } self.setState({'linkshowname':item.title}); - self.setState({'menulinklist':item.children}); + self.setState({'menulinklist':item.child}); // 防止刷新页面,导航签清空 - sessionStorage.setItem('menulinklist',JSON.stringify(item.children)); + sessionStorage.setItem('menulinklist',JSON.stringify(item.child)); sessionStorage.setItem('showflag',true); sessionStorage.setItem('linkshowname',item.title); } @@ -80,7 +80,7 @@ export default class topNav extends React.Component{ { this.state.navlists.map((item,i)=>{ return ( - item.children&&item.children.length>0?this.showlinkmenu(e,item)} >{item.title}:null + item.child&&item.child.length>0?this.showlinkmenu(e,item)} >{item.title}:null ) }) @@ -95,7 +95,7 @@ export default class topNav extends React.Component{
{ this.state.menulinklist.map((item,key)=>{ - return(item.level==5?this.btnfn(item)} className={pathnameBreak==item.router&&item.children.length>=1?'menuactive':''}>{item.title}:null) + return(item.level==5?this.btnfn(item)} className={pathnameBreak==item.router&&item.child.length>=1?'menuactive':''}>{item.title}:null) }) }
数据最后更新时间:{window.timeshow} diff --git a/src/pages/home/home.js b/src/pages/home/home.js index 1b225f38..3c1e4602 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -57,8 +57,8 @@ import keyedit from "../plan/key/edit.js" import accountlist from '../system/account/list/list'; import accountadd from '../system/account/add/add'; -import subaccountlist from '../system/subAccount/list/list'; -import subaccountadd from '../system/subAccount/add/add'; +// import subaccountlist from '../system/subAccount/list/list'; +// import subaccountadd from '../system/subAccount/add/add'; import rolelist from '../system/role/list/list'; import roleadd from '../system/role/add/add'; import station from '../system/station/main'; @@ -380,8 +380,8 @@ export default class App extends Component { - - + {/* + */} diff --git a/src/pages/login/loginform.js b/src/pages/login/loginform.js index dd359e49..30c4bfee 100644 --- a/src/pages/login/loginform.js +++ b/src/pages/login/loginform.js @@ -57,10 +57,10 @@ function FormDom(props) { sessionStorage.setItem('activeMenu',JSON.stringify(response.menu)); try{ menuList.forEach(item=>{ - if(item.children&&item.children.length>0){ - let obj=item.children.filter(item=>item.level==5); + if(item.child&&item.child.length>0){ + let obj=item.child.filter(item=>item.level==5); sessionStorage.setItem('pathname2',obj[0].router); - sessionStorage.setItem('menulinklist',JSON.stringify(item.children)); + sessionStorage.setItem('menulinklist',JSON.stringify(item.child)); if(item.id==16){ sessionStorage.setItem('linkshowname',"营销计划管理"); setTimeout(()=>{ diff --git a/src/pages/system/account/list/list.js b/src/pages/system/account/list/list.js index 9f8f3a02..e5ea0bc5 100644 --- a/src/pages/system/account/list/list.js +++ b/src/pages/system/account/list/list.js @@ -9,6 +9,7 @@ import {getAccountList,handelResponse,getCompany,putAccountStatus,delAccount} fr import Grid from "../../../../components/gird/main.js" import Ipt from "../../../../components/input/main" import Modifypwd from "./modifypwd" +import DelAuth from "./delAuth" import _ from "lodash"; const Column = [ { @@ -74,11 +75,13 @@ export default class acclistDom extends React.Component{ checkedSmall: true, tableHeight:600, visible: false, + delvisible:false, tabList:[{title:"账号列表"}], accList:[], page:1, limit:10, total:0, + deldata:{}, search:'', id:'' } @@ -150,6 +153,7 @@ export default class acclistDom extends React.Component{ //表单删除 delFn(e,row){ let self=this; + // this.setState({delvisible:true,deldata:row}); Sweetalert.confirm({ type:'warning', closeBtn:true, @@ -243,6 +247,13 @@ export default class acclistDom extends React.Component{ setVisible = visible => { this.setState({ visible }); }; + setdelVisible=visible=>{ + this.setState({delvisible:visible}); + } + //删除账号过继权限 + delSubmit(){ + + } //page pageChange(e){ this.setState({page:e}); @@ -329,7 +340,7 @@ componentDidUpdate(prevProps,prevState){ this.editFn(e,rowData)}>编辑 this.delFn(e,rowData)}>删除 this.resetpwd(e,rowData)}>重置密码 - this.subaccount(e,rowData)}>子账号管理 + {/* this.subaccount(e,rowData)}>子账号管理 */}

} }} @@ -348,7 +359,23 @@ componentDidUpdate(prevProps,prevState){ this.setVisible(visible) } id={this.state.id}/> - + {/* 删除账号 */} + this.setdelVisible(false)} + title="确认操作" + footer={ +
+ + +
+ } + > +
+ this.setdelVisible(visible) } id={this.state.id}/> +
+
) } diff --git a/src/pages/system/account/list/list.less b/src/pages/system/account/list/list.less index 016c5ecf..039ebd5c 100644 --- a/src/pages/system/account/list/list.less +++ b/src/pages/system/account/list/list.less @@ -30,3 +30,13 @@ box-sizing: border-box; padding: 24px 0; box-sizing: border-box; } +#delAuth .handover{ + margin-top: 15px; + display: flex; +} +#delAuth .delperson{ + padding: 15px 0 24px; +} +#delAuth .tips{ + color: #313233; +} \ No newline at end of file