Commit 5db351f1 by zhangleyuan

feat:修改用户管理的显示问题

parent 0dad2b7e
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors: 吴文洁
* @LastEditTime: 2020-08-27 10:10:06
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 19:24:27
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
......@@ -25,7 +25,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_128twwfsj82.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_13iutf1by4j8.css">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 16:38:59
* @LastEditTime: 2020-12-08 19:33:46
* @Description:
*/
import React , { useContext, useEffect ,useState}from 'react';
......@@ -23,7 +23,7 @@ import baseImg from '@/common/images/xiaomai-IMG.png';
import logoImg from '@/common/images/logo.png';
const { confirm } = Modal;
function Header(){
const [menuType, setMenuType] = useState(1);
const [menuType, setMenuType] = useState(true);
const ctx: any = useContext(XMContext);
function userMenu() {
return (
......@@ -54,7 +54,7 @@ function Header(){
);
}
function handleMenu(){
setMenuType(!menuType)
};
function toPersonalInfoPage(){
window.RCHistory.push({
......@@ -94,9 +94,8 @@ function Header(){
</div>
{menuType ? (
<span className="icon iconfont cursor ml20 handLike" onClick={handleMenu}>
&#xe83d;{' '}
&#xe83d;
</span>
) : (
<span className="icon iconfont cursor ml20 handLike" onClick={handleMenu}>
&#xe615;
......
......@@ -73,12 +73,16 @@ function Aside(props: any) {
<span style={{ marginRight: 6 }} className="iconfont icon" dangerouslySetInnerHTML={{ __html:item.icon}}></span>
<span>{item.groupName}</span></div>}>
{
item.children.map((item: any, _index: any) => {
return <Menu.Item onClick={() => { toggleMenu(item) }} style={{ marginTop: 0 }} key={item.groupCode + index + _index}>
item.children.map((_item: any, _index: any) => {
if (ctx.xmState.storeUserPermissionList.indexOf(_item.groupCode) === -1) {
return null;
}
return <Menu.Item onClick={() => { toggleMenu(_item) }} style={{ marginTop: 0 }} key={_item.groupCode + index + _index}>
<span className="listType"></span>
<span className="name">{item.groupName}</span>
<span className="name">{_item.groupName}</span>
</Menu.Item>
})
}
</SubMenu>
......
......@@ -22,4 +22,8 @@
color: #5289FA;
line-height: 20px;
}
.empty-child{
color:#666;
font-size:14px;
}
}
\ No newline at end of file
......@@ -128,78 +128,6 @@ function CourseCatalogPage() {
setTotal(res.result.total);
});
}
// function refreshCatalogList(data:any):any{
// let _courseCatalogList:any = [...courseCatalogList];
// const { type} = data;
// switch (type){
// case 'addCatalog':
// const item = {
// categoryName:data.catalogName,
// id:data.id,
// hasSon:false,
// key:data.id,
// type:'parent'
// }
// _courseCatalogList.push(item);
// setTotal(_courseCatalogList.length);
// if(_courseCatalogList.length>10){
// setCourseCatalogList(_courseCatalogList.splice(0,9));
// }else{
// setCourseCatalogList(_courseCatalogList);
// }
// // getCourseCatalogList();
// break;
// case 'editCatalog':
// _courseCatalogList.map((item:any,index:any)=>{
// if(item.id === data.id){
// item.categoryName = data.catalogName
// }
// return item
// });
// setCourseCatalogList(_courseCatalogList)
// break;
// case 'addSecondCatalog':
// const secondItem = {
// categoryName:data.catalogName,
// id:data.id,
// key:data.id
// }
// let _courseCatalogListClone:any = JSON.parse(JSON.stringify(courseCatalogList));
// _courseCatalogListClone.map((item:any,index:any)=>{
// if(item.id === data.parentId){
// if(!item.child){
// item.child=[];
// }
// item.child.push(secondItem)
// }
// return item
// });
// setCourseCatalogList(_courseCatalogListClone)
// break;
// case 'editSecondCatalog':
// const secondEditItem = {
// categoryName:data.catalogName,
// id:data.id,
// key:data.id
// }
// let _courseCatalogListEditClone:any = JSON.parse(JSON.stringify(courseCatalogList));
// _courseCatalogListEditClone.map((item:any,index:any)=>{
// if(item.id === data.parentId){
// if(item.child){
// item.child.map((_item:any,_index:any)=>{
// if(_item.id === data.id){
// _item.categoryName =data.catalogName;
// }
// })
// }
// }
// return item
// });
// break;
// default:
// break;
// }
// }
function handleCatalogListData(listData:any){
listData.map((item:any,index:any) => {
......@@ -228,9 +156,6 @@ function CourseCatalogPage() {
}
setChooseItem(record);
}
// function expandSecondCatalog(expanded:boolean,record:any){
// setParentCatalogId(record.id);
// }
return (
<div className=" page course-catalog-page">
<div className="page-content">
......@@ -256,11 +181,10 @@ function CourseCatalogPage() {
if (record.sonCategoryList.length !== 0){
return <Table columns={parseColumn()} dataSource={record.sonCategoryList} pagination={false} className="child-table"/>
}else{
return <div>还未添加任何子分类</div>;
return <div className="empty-child">还未添加任何子分类</div>;
}
}}
dataSource={courseCatalogList}
// onExpand={(expanded, record)=>expandSecondCatalog(expanded, record)}
/>
</div>
<div className="box-footer">
......
/*
* @Author: wufan
* @Date: 2020-12-02 10:26:59
* @LastEditors: wufan
* @LastEditTime: 2020-12-02 14:21:17
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 19:14:37
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -35,6 +35,7 @@ const setStoreList = (payload: any) => ({
})
export {
setStoreGroupPermission,
setStorePermission,
......
......@@ -15,5 +15,6 @@ export {
STORE_GROUP_PERMISSION,
STORE_PERMISSION,
STORE_GROUP_LIST,
STORE_LIST
STORE_LIST,
}
\ No newline at end of file
/*
* @Author: wufan
* @Date: 2020-12-02 10:27:44
* @LastEditors: wufan
* @LastEditTime: 2020-12-02 17:41:34
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 19:09:48
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -45,7 +45,6 @@ const basicReducer = (state: any, action: any) => {
return Object.assign({}, state, {
storeList,
});
default:
return state;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment