Commit 5db351f1 by zhangleyuan

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

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