Commit 67412605 authored by 李纪文's avatar 李纪文

Merge branch 'dev-cloud' into 'master'

Dev cloud See merge request !4
parents de92d486 7e3f6568
Pipeline #44777 skipped with stages
......@@ -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 };
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;
......@@ -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);
});
......
......@@ -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>
);
......
......@@ -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) {
......
......@@ -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 => {
......
......@@ -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();
......
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