Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sass-admin
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
hqzhdj_app
sass-admin
Commits
81886e11
Commit
81886e11
authored
Sep 05, 2024
by
王禹桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: bug图标隐藏
parent
2564c2d0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
25 deletions
+32
-25
src/common/Layout/Header/index.js
+4
-1
src/pages/Dashboard/index.js
+1
-1
src/pages/Login/index.jsx
+2
-2
src/pages/MunuNav/index.jsx
+25
-21
No files found.
src/common/Layout/Header/index.js
View file @
81886e11
...
@@ -86,7 +86,10 @@ class Header extends PureComponent {
...
@@ -86,7 +86,10 @@ class Header extends PureComponent {
<
/div
>
<
/div
>
)}
)}
<
div
className
=
{
styles
.
logo
}
>
<
div
className
=
{
styles
.
logo
}
>
<
img
className
=
{
styles
.
image
}
src
=
{
nav
.
logo
?
nav
.
logo
:
""
}
/
>
<
img
className
=
{
styles
.
image
}
src
=
{
nav
.
logo
?
nav
.
logo
:
headerLogo
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
rightContainer
}
>
<
div
className
=
{
styles
.
rightContainer
}
>
...
...
src/pages/Dashboard/index.js
View file @
81886e11
...
@@ -1167,7 +1167,7 @@ class homePage extends Component {
...
@@ -1167,7 +1167,7 @@ class homePage extends Component {
this
.
props
.
logoSiteList
.
data
.
logo
this
.
props
.
logoSiteList
.
data
.
logo
?
this
.
props
.
logoSiteList
.
data
&&
?
this
.
props
.
logoSiteList
.
data
&&
this
.
props
.
logoSiteList
.
data
.
logo
this
.
props
.
logoSiteList
.
data
.
logo
:
""
:
defaultLogo
}
}
/
>
/
>
{
/* bug-11957-jmy 图片盖住了文字*/
}
{
/* bug-11957-jmy 图片盖住了文字*/
}
...
...
src/pages/Login/index.jsx
View file @
81886e11
...
@@ -207,12 +207,12 @@ class Login extends React.Component {
...
@@ -207,12 +207,12 @@ class Login extends React.Component {
>
>
<
div
className=
{
style
.
top
}
>
<
div
className=
{
style
.
top
}
>
<
div
className=
{
style
.
left
}
>
<
div
className=
{
style
.
left
}
>
{
companySiteCode
===
shenWanHongYuanCode
?
null
:
(
{
/* {
companySiteCode === shenWanHongYuanCode ? null : (
<img
<img
src={require("./imgages/logo1.png")}
src={require("./imgages/logo1.png")}
style={{ height: "30px", width: "92px", marginRight: "13px" }}
style={{ height: "30px", width: "92px", marginRight: "13px" }}
/>
/>
)
}
)}
*/
}
企业学习平台管理后台
企业学习平台管理后台
</
div
>
</
div
>
{
/* 暂时注释 2期上 */
}
{
/* 暂时注释 2期上 */
}
...
...
src/pages/MunuNav/index.jsx
View file @
81886e11
...
@@ -73,8 +73,6 @@ class Head extends React.PureComponent {
...
@@ -73,8 +73,6 @@ class Head extends React.PureComponent {
collapsed
,
collapsed
,
});
});
});
});
};
};
render
()
{
render
()
{
let
pathnames
=
getPathname
();
let
pathnames
=
getPathname
();
...
@@ -89,7 +87,7 @@ class Head extends React.PureComponent {
...
@@ -89,7 +87,7 @@ class Head extends React.PureComponent {
companyCode
,
companyCode
,
match
,
match
,
history
,
history
,
toAssToken
toAssToken
,
}
=
this
.
props
;
}
=
this
.
props
;
const
{
collapsed
}
=
this
.
state
;
const
{
collapsed
}
=
this
.
state
;
const
{
onCollapseChange
}
=
this
;
const
{
onCollapseChange
}
=
this
;
...
@@ -125,7 +123,7 @@ class Head extends React.PureComponent {
...
@@ -125,7 +123,7 @@ class Head extends React.PureComponent {
username
:
null
,
username
:
null
,
fixed
:
true
,
fixed
:
true
,
onToAss
()
{
onToAss
()
{
toAssToken
()
toAssToken
()
;
},
},
onSignOut
()
{
onSignOut
()
{
dispatch
({
type
:
"app/signOut"
});
dispatch
({
type
:
"app/signOut"
});
...
@@ -138,7 +136,7 @@ class Head extends React.PureComponent {
...
@@ -138,7 +136,7 @@ class Head extends React.PureComponent {
},
},
onMenuClick
()
{
onMenuClick
()
{
cookie
.
remove
(
"token"
,
""
);
cookie
.
remove
(
"token"
,
""
);
sessionStorage
.
clear
(
"mgtk"
)
sessionStorage
.
clear
(
"mgtk"
)
;
history
.
push
(
`
${
match
.
url
}
/login`
);
history
.
push
(
`
${
match
.
url
}
/login`
);
},
},
};
};
...
@@ -150,12 +148,22 @@ class Head extends React.PureComponent {
...
@@ -150,12 +148,22 @@ class Head extends React.PureComponent {
<
div
<
div
className=
{
styles
.
container
}
className=
{
styles
.
container
}
// style={{ paddingTop: pathnames.includes("homepage")!=true ? 132 : 60 }}
// style={{ paddingTop: pathnames.includes("homepage")!=true ? 132 : 60 }}
style=
{
{
paddingTop
:
pathnames
.
includes
(
"homepage"
)
!=
true
?
64
:
64
}
}
style=
{
{
paddingTop
:
pathnames
.
includes
(
"homepage"
)
!=
true
?
64
:
64
,
}
}
id=
"primaryLayout"
id=
"primaryLayout"
>
>
<
Header
{
...
headerProps
}
/>
<
Header
{
...
headerProps
}
/>
{
/*{!pathnames.includes("homepage")&&<Breadcrumb collapsed={collapsed}/>}*/
}
{
/*{!pathnames.includes("homepage")&&<Breadcrumb collapsed={collapsed}/>}*/
}
<
Content
className=
{
!
pathnames
.
includes
(
"homepage"
)
?
styles
.
content
:
styles
.
contentnopadding
}
>
{
children
}
</
Content
>
<
Content
className=
{
!
pathnames
.
includes
(
"homepage"
)
?
styles
.
content
:
styles
.
contentnopadding
}
>
{
children
}
</
Content
>
{
/* {footerVisible && <GlobalFooter className={styles.footer} copyright={copyright} />} liyuan */
}
{
/* {footerVisible && <GlobalFooter className={styles.footer} copyright={copyright} />} liyuan */
}
</
div
>
</
div
>
...
@@ -165,8 +173,6 @@ class Head extends React.PureComponent {
...
@@ -165,8 +173,6 @@ class Head extends React.PureComponent {
}
}
}
}
function
mapStateToProps
(
state
,
ownProps
)
{
function
mapStateToProps
(
state
,
ownProps
)
{
const
{
login
}
=
state
;
const
{
login
}
=
state
;
...
@@ -178,13 +184,13 @@ function mapStateToProps(state, ownProps) {
...
@@ -178,13 +184,13 @@ function mapStateToProps(state, ownProps) {
let
nav
=
{};
let
nav
=
{};
let
menuList
=
[];
let
menuList
=
[];
if
(
login
.
siteData
&&
login
.
siteData
.
length
>
0
)
{
if
(
login
.
siteData
&&
login
.
siteData
.
length
>
0
)
{
debugger
;
// 根据后台返回每个站点目录
// 根据后台返回每个站点目录
nav
=
login
.
siteData
.
filter
(
item
=>
siteCode
===
item
.
siteCode
)[
0
];
nav
=
login
.
siteData
.
filter
(
item
=>
siteCode
===
item
.
siteCode
)[
0
];
// 数据整合渲染menu
// 数据整合渲染menu
nav
.
menus
.
map
((
item
,
index
)
=>
{
nav
.
menus
.
map
((
item
,
index
)
=>
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
node
.
url
=
''
item
.
node
.
url
=
""
;
}
}
// 一级菜单
// 一级菜单
menuList
.
push
({
menuList
.
push
({
...
@@ -192,36 +198,34 @@ function mapStateToProps(state, ownProps) {
...
@@ -192,36 +198,34 @@ function mapStateToProps(state, ownProps) {
name
:
item
.
name
,
name
:
item
.
name
,
icon
:
item
.
node
.
icon
,
icon
:
item
.
node
.
icon
,
// activeIcon: item.node.activeIcon,
// activeIcon: item.node.activeIcon,
menuType
:
item
.
node
.
menuType
menuType
:
item
.
node
.
menuType
,
});
});
//
//
// 二级菜单
// 二级菜单
item
.
children
.
map
((
chilid
,
childIndex
)
=>
{
item
.
children
.
map
((
chilid
,
childIndex
)
=>
{
if
(
chilid
.
children
.
length
>
0
)
{
if
(
chilid
.
children
.
length
>
0
)
{
chilid
.
node
.
url
=
''
chilid
.
node
.
url
=
""
;
}
}
menuList
.
push
({
menuList
.
push
({
id
:
index
+
100000000
+
""
+
(
childIndex
+
1
),
id
:
index
+
100000000
+
""
+
(
childIndex
+
1
),
menuParentId
:
index
+
100000
+
""
,
menuParentId
:
index
+
100000
+
""
,
name
:
chilid
.
name
,
name
:
chilid
.
name
,
icon
:
""
,
icon
:
""
,
url
:
chilid
.
node
.
url
||
''
,
url
:
chilid
.
node
.
url
||
""
,
menuType
:
chilid
.
node
.
menuType
menuType
:
chilid
.
node
.
menuType
,
});
});
// 三级菜单
// 三级菜单
chilid
.
children
&&
chilid
.
children
.
map
((
grandson
,
grandsonIndex
)
=>
{
chilid
.
children
&&
chilid
.
children
.
map
((
grandson
,
grandsonIndex
)
=>
{
menuList
.
push
({
menuList
.
push
({
id
:
index
+
1
+
""
+
(
childIndex
+
1
)
+
(
grandsonIndex
+
1
),
id
:
index
+
1
+
""
+
(
childIndex
+
1
)
+
(
grandsonIndex
+
1
),
menuParentId
:
index
+
100000000
+
""
+
(
childIndex
+
1
),
menuParentId
:
index
+
100000000
+
""
+
(
childIndex
+
1
),
name
:
grandson
.
name
,
name
:
grandson
.
name
,
icon
:
""
,
icon
:
""
,
url
:
grandson
.
node
.
url
||
''
,
url
:
grandson
.
node
.
url
||
""
,
menuType
:
grandson
.
node
.
menuType
menuType
:
grandson
.
node
.
menuType
,
});
});
});
});
});
});
...
...
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