Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
5db351f1
Commit
5db351f1
authored
Dec 08, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改用户管理的显示问题
parent
0dad2b7e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
94 deletions
+28
-94
src/index.html
+3
-3
src/modules/root/Header.tsx
+4
-5
src/modules/root/Menu.tsx
+7
-3
src/modules/store-manege/CourseCatalogPage.less
+5
-0
src/modules/store-manege/CourseCatalogPage.tsx
+1
-77
src/store/actions/basicAction.ts
+3
-2
src/store/actions/constants.ts
+3
-1
src/store/reducers/basicReducer.ts
+2
-3
No files found.
src/index.html
View file @
5db351f1
<!--
* @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_1
28twwfsj82
.css"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_1
3iutf1by4j8
.css"
>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
...
...
src/modules/root/Header.tsx
View file @
5db351f1
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 1
6:38:59
* @LastEditTime: 2020-12-08 1
9: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
}
>

{
' '
}

</
span
>
)
:
(
<
span
className=
"icon iconfont cursor ml20 handLike"
onClick=
{
handleMenu
}
>

...
...
src/modules/root/Menu.tsx
View file @
5db351f1
...
...
@@ -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
>
...
...
src/modules/store-manege/CourseCatalogPage.less
View file @
5db351f1
...
...
@@ -22,4 +22,8 @@
color: #5289FA;
line-height: 20px;
}
.empty-child{
color:#666;
font-size:14px;
}
}
\ No newline at end of file
src/modules/store-manege/CourseCatalogPage.tsx
View file @
5db351f1
...
...
@@ -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"
>
...
...
src/store/actions/basicAction.ts
View file @
5db351f1
/*
* @Author: wufan
* @Date: 2020-12-02 10:26:59
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-0
2 14:21:1
7
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-0
8 19:14:3
7
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -35,6 +35,7 @@ const setStoreList = (payload: any) => ({
})
export
{
setStoreGroupPermission
,
setStorePermission
,
...
...
src/store/actions/constants.ts
View file @
5db351f1
...
...
@@ -15,5 +15,6 @@ export {
STORE_GROUP_PERMISSION
,
STORE_PERMISSION
,
STORE_GROUP_LIST
,
STORE_LIST
STORE_LIST
,
}
\ No newline at end of file
src/store/reducers/basicReducer.ts
View file @
5db351f1
/*
* @Author: wufan
* @Date: 2020-12-02 10:27:44
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-0
2 17:41:34
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-0
8 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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment