Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
79238d23
Commit
79238d23
authored
Mar 03, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 引导页添加使用分析入口
parent
11194a89
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
12 deletions
+49
-12
using-icon.png
src/assets/bootPage/using-icon.png
+0
-0
index.js
src/pages/bootpage/index.js
+30
-9
index.less
src/pages/bootpage/index.less
+19
-3
No files found.
src/assets/bootPage/using-icon.png
0 → 100644
View file @
79238d23
This diff was suppressed by a .gitattributes entry.
src/pages/bootpage/index.js
View file @
79238d23
...
...
@@ -14,6 +14,8 @@ import LoginAction from '../user/login/login';
import
styles
from
'./index.less'
;
import
{
useHistory
}
from
'@wisdom-utils/runtime'
;
import
{
initMicroApps
}
from
'@/micro'
;
import
usingIcon
from
'@/assets/bootPage/using-icon.png'
;
import
{
appService
}
from
'@/api'
;
const
industries
=
[
{
name
:
'供水'
,
type
:
'供水'
,
subTitle
:
'WATER SUPPLY'
},
...
...
@@ -58,8 +60,8 @@ const renderIndustries = (config, callback) =>
let
loginAction
=
null
;
const
BootPage
=
props
=>
{
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
hasRole
,
setHasRole
]
=
useState
(
false
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
history
=
useHistory
();
useDocumentTitle
(
...
...
@@ -105,7 +107,7 @@ const BootPage = props => {
useEffect
(()
=>
{
window
.
addEventListener
(
'resize'
,
handleResize
);
loginAction
=
new
LoginAction
(
props
);
loginAction
.
events
.
on
(
'toggleIndustry'
,
async
(
event
)
=>
{
loginAction
.
events
.
on
(
'toggleIndustry'
,
event
=>
{
setLoadding
(
false
);
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
initMicroApps
();
...
...
@@ -126,10 +128,26 @@ const BootPage = props => {
);
const
intl
=
useIntl
();
// const toOMSUsingAnalysis = e => {
// e && e.stopPropagation();
// props.history.push(`/omsUsingAnalysis`);
// }
const
toOMSUsingAnalysis
=
e
=>
{
e
&&
e
.
stopPropagation
();
props
.
history
.
push
(
`/usingAnalysis`
);
};
useEffect
(()
=>
{
appService
.
getUserInfo
({
token
:
props
.
global
.
token
,
subOID
:
'subOID'
,
site
:
'cloud'
,
ignoreSite
:
true
,
})
.
then
(
res
=>
{
const
roles
=
res
&&
!
res
.
errMsg
?
res
.
roles
:
null
;
const
_hasRole
=
roles
&&
Array
.
isArray
(
roles
)
&&
roles
.
filter
(
r
=>
{
return
r
.
name
==
'客户运维管理员'
;
}).
length
;
setHasRole
(
!!
_hasRole
);
});
},
[]);
return
(
<
SecurityLayout
>
...
...
@@ -171,11 +189,14 @@ const BootPage = props => {
<
Spin
spinning
=
{
loadding
}
size
=
"large"
/>
<
/Space
>
<
/div
>
{
/* <div class={styles['cloud-using-anaylysis-btn']}>
<div class="" onClick={toOMSUsingAnalysis}>
{
hasRole
?
(
<
div
className
=
{
styles
.
cloudMonitorBtns
}
>
<
div
class
=
"cloud-using-anaylysis-btn"
onClick
=
{
toOMSUsingAnalysis
}
>
<
img
src
=
{
usingIcon
}
alt
=
""
title
=
"点击查看平台使用监控"
/>
<
span
>
平台使用分析
<
/span
>
<
/div
>
</div> */
}
<
/div
>
)
:
null
}
<
/div
>
<
/SecurityLayout
>
);
...
...
src/pages/bootpage/index.less
View file @
79238d23
...
...
@@ -127,7 +127,7 @@
transform: translate(-50%, -50%);
}
.cloud
-using-anaylysis-btn
{
.cloud
MonitorBtns
{
position: fixed;
height: 120px;
width: 100%;
...
...
@@ -135,11 +135,27 @@
padding: 0 20px;
display: flex;
justify-content: end;
:global {
.cloud-using-anaylysis-btn {
cursor: pointer;
width: 100px;
display: flex;
flex-direction: column;
justify-content: center;
& > img {
width: 50px;
margin: 0 25px;
}
& > span {
color: #fff;
font-size: 20px;
font-size: 14px;
width: 100%;
text-align: center;
}
}
}
}
}
@media screen and (max-width: 1440px) {
...
...
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