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
67412605
Commit
67412605
authored
Mar 01, 2022
by
李纪文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-cloud' into 'master'
Dev cloud See merge request
!4
parents
de92d486
7e3f6568
Pipeline
#44777
skipped with stages
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
10 deletions
+90
-10
index.js
src/api/index.js
+3
-1
cloud.js
src/api/service/cloud.js
+45
-0
Site.js
src/layouts/Site.js
+6
-5
index.js
src/pages/bootpage/index.js
+18
-1
index.less
src/pages/bootpage/index.less
+14
-0
login.js
src/pages/user/login/login.js
+3
-2
baseLogin.js
src/pages/user/login/template/baseLogin.js
+1
-1
No files found.
src/api/index.js
View file @
67412605
...
...
@@ -5,6 +5,7 @@ import { event } from 'microser-data';
import
{
actionCreators
}
from
'../containers/App/store'
;
import
AppService
from
'./service/base'
;
import
notificationService
from
'./service/notification'
;
import
CloudService
from
'./service/cloud'
;
const
{
warning
}
=
Modal
;
// eslint-disable-next-line no-return-await
instanceRequest
.
reportCodeError
=
true
;
...
...
@@ -74,4 +75,5 @@ instanceRequest.setErrorHandler(error => {
});
const
appService
=
service
(
AppService
);
const
noticeService
=
service
(
notificationService
);
export
{
appService
,
noticeService
};
const
cloudService
=
service
(
CloudService
);
export
{
appService
,
noticeService
,
cloudService
};
src/api/service/cloud.js
0 → 100644
View file @
67412605
import
{
jsonp
,
request
}
from
'@wisdom-utils/utils'
;
import
*
as
constants
from
'../../constants'
;
const
portalURL
=
'CityInterface/rest/Services/Portal.svc'
;
export
const
API
=
{
GET_DATA_DICTIONARY_LIST
:
'/CityInterface/Services/CityServer_WorkFlow/REST/WorkFlowREST.svc/GetDataDictionaryList'
,
// 云平台使用分析
LOGIN_STATISTIC
:
`
${
portalURL
}
/OMManage/LoginStatisticServer`
,
FUNCTIONS_STATISTIC
:
`
${
portalURL
}
/OMManage/FunctionStatisticServer`
,
ENVIROMENT_STATISTIC
:
`
${
portalURL
}
/OMManage/EnviromentStatisticServer`
,
USER_LOGIN_STATISTIC
:
`
${
portalURL
}
/OMManage/UserLoginStatisticServer`
,
};
const
services
=
{
getDataDictionaryList
:
{
url
:
API
.
GET_DATA_DICTIONARY_LIST
,
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
getLoginStatistic
:
{
url
:
API
.
LOGIN_STATISTIC
,
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
getFunctionsStatistic
:
{
url
:
API
.
FUNCTIONS_STATISTIC
,
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
getEnviromentStatistic
:
{
url
:
API
.
ENVIROMENT_STATISTIC
,
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
getUserLoginStatistic
:
{
url
:
API
.
USER_LOGIN_STATISTIC
,
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
};
export
default
services
;
src/layouts/Site.js
View file @
67412605
...
...
@@ -342,11 +342,11 @@ class Site {
self
.
setLoading
(
false
);
// eslint-disable-next-line no-unused-expressions
self
.
props
.
updateCurrentIndex
&&
self
.
props
.
updateCurrentIndex
(
0
);
window
.
history
.
replaceState
(
''
,
''
,
`/
${
self
.
globalConfig
.
homepage
}
`
,
);
//
window.history.replaceState(
//
'',
//
'',
//
`/${self.globalConfig.homepage}`,
//
);
self
.
getCityStationsForUser
().
then
(
res
=>
{
window
.
share
.
event
.
emit
(
'updateSite'
,
res
);
});
...
...
@@ -357,6 +357,7 @@ class Site {
self
.
props
&&
self
.
props
.
updateComplexConfig
&&
self
.
props
.
updateComplexConfig
({});
self
.
props
.
history
&&
self
.
props
.
history
.
push
(
self
.
globalConfig
.
homepage
??
`/?client=
${
self
.
globalConfig
.
client
}
`
);
// window.location.reload();
window
.
share
.
event
.
emit
(
'triggerMicro'
,
this
.
props
.
global
);
});
...
...
src/pages/bootpage/index.js
View file @
67412605
...
...
@@ -12,6 +12,8 @@ import { actionCreators } from '../../containers/App/store';
import
SecurityLayout
from
'../../layouts/SecurityLayout'
;
import
LoginAction
from
'../user/login/login'
;
import
styles
from
'./index.less'
;
import
{
useHistory
}
from
'@wisdom-utils/runtime'
;
import
{
initMicroApps
}
from
'@/micro'
;
const
industries
=
[
{
name
:
'供水'
,
type
:
'供水'
,
subTitle
:
'WATER SUPPLY'
},
...
...
@@ -58,6 +60,7 @@ const BootPage = props => {
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
history
=
useHistory
();
useDocumentTitle
(
{
title
:
defaultSetting
.
title
,
id
:
''
,
pageName
:
'行业切换'
},
props
.
global
.
title
||
defaultSetting
.
title
,
...
...
@@ -77,7 +80,10 @@ const BootPage = props => {
// eslint-disable-next-line no-shadow
loginAction
.
events
.
on
(
'toggleIndustry'
,
event
=>
{
setLoadding
(
false
);
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
// props.history.push(`/?client=${props.global.client}`);
initMicroApps
();
// 加载首页
history
.
push
(
props
.
global
.
homepage
??
`/?client=
${
props
.
global
.
client
}
`
);
window
.
share
.
event
.
emit
(
'triggerMicro'
,
props
.
global
);
props
.
updateCurrentIndex
(
0
);
// window.location.reload();
...
...
@@ -105,6 +111,12 @@ const BootPage = props => {
[],
);
const
intl
=
useIntl
();
// const toOMSUsingAnalysis = e => {
// e && e.stopPropagation();
// props.history.push(`/omsUsingAnalysis`);
// }
return
(
<
SecurityLayout
>
<
div
className
=
{
styles
.
bootPage
}
>
...
...
@@ -145,6 +157,11 @@ const BootPage = props => {
<
Spin
spinning
=
{
loadding
}
size
=
"large"
/>
<
/Space
>
<
/div
>
{
/* <div class={styles['cloud-using-anaylysis-btn']}>
<div class="" onClick={toOMSUsingAnalysis}>
<span>平台使用分析</span>
</div>
</div> */
}
<
/div
>
<
/SecurityLayout
>
);
...
...
src/pages/bootpage/index.less
View file @
67412605
...
...
@@ -126,6 +126,20 @@
left: 50%;
transform: translate(-50%, -50%);
}
.cloud-using-anaylysis-btn {
position: fixed;
height: 120px;
width: 100%;
bottom: 0px;
padding: 0 20px;
display: flex;
justify-content: end;
cursor: pointer;
color: #fff;
font-size: 20px;
}
}
@media screen and (max-width: 1440px) {
...
...
src/pages/user/login/login.js
View file @
67412605
...
...
@@ -227,7 +227,7 @@ class Login {
theme
:
self
.
globalConfig
.
theme
,
menu
:
self
.
globalConfig
.
menu
,
style
:
self
.
globalConfig
.
style
,
homepage
:
homeType
+
'/'
+
(
params
.
getParams
(
'redirect'
)
||
self
.
globalConfig
.
homepage
||
config
.
homepage
),
homepage
:
homeType
+
'/'
+
(
params
.
getParams
(
'redirect'
)
||
config
.
homepage
),
});
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
...
...
@@ -318,7 +318,8 @@ class Login {
return
false
;
}
this
.
handleLoginError
();
Logger
.
log
(
'获取网络配置失败'
);
// Logger.log('获取网络配置失败');
console
.
log
(
'获取网络配置失败'
);
}
})
.
catch
(
error
=>
{
...
...
src/pages/user/login/template/baseLogin.js
View file @
67412605
...
...
@@ -62,7 +62,7 @@ const Login = forwardRef((props, _ref) => {
action
&&
action
.
events
.
on
(
'loginSuccess'
,
event
=>
{
setSubmitting
(
false
);
props
.
updateCurrentIndex
&&
props
.
updateCurrentIndex
(
0
);
props
.
history
.
push
(
`/`
);
//
props.history.push(`/`);
// debugger
// window.share.event.emit('triggerMicro', props.global);
initMicroApps
();
...
...
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