Commit 6c9ce0a4 authored by 邓晓峰's avatar 邓晓峰

feat: 集成ARGGIS

parents fc08153e 2c95e174
...@@ -59,8 +59,8 @@ push: ...@@ -59,8 +59,8 @@ push:
- 'git clean -fd' - 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"' - 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"'
- 'git pull origin map' - 'git pull origin map'
- 'git rm -rf "${TARGET_REPO}/civbase"' #- 'git rm -rf "${TARGET_REPO}/civbase"'
- 'git commit -m "chore: clear folder"' #- 'git commit -m "chore: clear folder"'
#- 'git push origin map' #- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civbase" "${TARGET_REPO}/civbase" /S ; - 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civbase" "${TARGET_REPO}/civbase" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}' IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
......
const slash = require('slash2'); const slash = require('slash2');
const proxy = require('./proxy'); const proxy = require('./proxy');
const defaultSetting = require('./defaultSetting'); const defaultSetting = require('./defaultSetting');
const { REACT_APP_ENV } = process.env;
const cesiumBuild = '../node_modules/cesium/Build/Cesium'; const cesiumBuild = '../node_modules/cesium/Build/Cesium';
const pkgName = require('../package.json').name; const pkgName = require('../package.json').name;
// eslint-disable-next-line import/order
const path = require('path');
const { REACT_APP_ENV } = process.env;
const pkgName = require('../package.json').name;
const path = require('path'); const path = require('path');
const CESIUM_BASE_URL = `/${pkgName}`; const CESIUM_BASE_URL = `/${pkgName}`;
module.exports = { module.exports = {
...@@ -33,7 +36,12 @@ module.exports = { ...@@ -33,7 +36,12 @@ module.exports = {
ignoreMomentLocale: true, ignoreMomentLocale: true,
nodeModulesTransform: { nodeModulesTransform: {
type: 'none', type: 'none',
exclude: ['@wisdom-map/arcgismap', 'swagger-ui-react'], exclude: [
// '@wisdom-map/arcgismap',
// '@wisdom-map/arcgismap/lib/arcgisapi',
'swagger-ui-react',
'Cesium'
],
}, },
proxy: proxy[REACT_APP_ENV || 'dev'], proxy: proxy[REACT_APP_ENV || 'dev'],
// openAPI: { // openAPI: {
...@@ -105,5 +113,30 @@ module.exports = { ...@@ -105,5 +113,30 @@ module.exports = {
cesium: path.resolve(__dirname, cesiumBuild), cesium: path.resolve(__dirname, cesiumBuild),
}, },
workerLoader: {}, workerLoader: {},
copy: [
{
from: path.join(pkgName, cesiumBuild, './Workers'),
to: 'Workers',
},
{
from: path.join(pkgName, cesiumBuild, 'Assets'),
to: 'Assets',
},
{
from: path.join(pkgName, cesiumBuild, 'Widgets'),
to: 'Widgets',
},
{
from: path.join(pkgName, cesiumBuild, 'ThirdParty'),
to: 'ThirdParty',
},
],
define: {
CESIUM_BASE_URL: JSON.stringify(CESIUM_BASE_URL).replace(/\"/g, ''),
},
alias: {
cesium: path.resolve(__dirname, cesiumBuild),
},
// esbuild: {} // esbuild: {}
}; };
...@@ -16,10 +16,10 @@ export default { ...@@ -16,10 +16,10 @@ export default {
// activeRule: '/civbase/civ_water', // activeRule: '/civbase/civ_water',
// }, // },
{ {
name: 'civ_pandawork', name: 'civ_configuration',
entry: `//${window.location.hostname}:8081/civ_pandawork`, entry: `//${window.location.hostname}:8080/civ_configuration`,
container: '#micro-container', container: '#micro-container',
activeRule: '/civbase/civ_pandawork', activeRule: '/civbase/civ_configuration',
}, },
{ {
name: 'report', name: 'report',
...@@ -48,6 +48,12 @@ export default { ...@@ -48,6 +48,12 @@ export default {
container: '#micro-container', container: '#micro-container',
activeRule: '/civbase/middleground', activeRule: '/civbase/middleground',
}, },
{
name: 'civ_3d',
entry: `//${window.location.hostname}:12000/civ_3d`,
container: '#micro-container',
activeRule: '/civbase/civ_3d',
},
], ],
prod: [ prod: [
{ {
......
...@@ -20,25 +20,18 @@ module.exports = opts => { ...@@ -20,25 +20,18 @@ module.exports = opts => {
const preset = { const preset = {
presets: [ presets: [
opts.env && [ opts.env && [
'@babel/preset-env', require('@umijs/deps/compiled/babel/preset-env'),
{ {
...mergeConfig(defaultEnvConfig,{}), ...mergeConfig(defaultEnvConfig,{}),
modules: false, modules: false,
...opts.env ...opts.env
}, },
], ],
// opts.react && ['@babel/preset-react'],
// opts.typescript && [
// '@babel/preset-typescript',
// {
// allowNamespaces: true,
// },
// ],
].filter(Boolean), ].filter(Boolean),
plugins: [ plugins: [
['@babel/plugin-proposal-optional-chaining', { loose: false }], ['@babel/plugin-proposal-optional-chaining', { loose: false }],
['@babel/plugin-proposal-nullish-coalescing-operator', { loose: false }], ['@babel/plugin-proposal-nullish-coalescing-operator', { loose: false }],
'@babel/plugin-syntax-top-level-await', require('@umijs/deps/compiled/babel/plugin-syntax-top-level-await').default,
['@babel/plugin-transform-destructuring', { loose: false }], ['@babel/plugin-transform-destructuring', { loose: false }],
// opts.typescript && ['babel-plugin-transform-typescript-metadata'], // opts.typescript && ['babel-plugin-transform-typescript-metadata'],
['@babel/plugin-proposal-decorators', { legacy: true }], ['@babel/plugin-proposal-decorators', { legacy: true }],
...@@ -58,7 +51,7 @@ module.exports = opts => { ...@@ -58,7 +51,7 @@ module.exports = opts => {
'@babel/plugin-syntax-dynamic-import', '@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-react-jsx', '@babel/plugin-transform-react-jsx',
opts.transformRuntime && [ opts.transformRuntime && [
'@babel/plugin-transform-runtime', require('@umijs/deps/compiled/babel/plugin-transform-runtime').default,
{ {
version: require('@babel/runtime/package.json').version, version: require('@babel/runtime/package.json').version,
absoluteRuntime: dirname( absoluteRuntime: dirname(
...@@ -98,10 +91,23 @@ module.exports = opts => { ...@@ -98,10 +91,23 @@ module.exports = opts => {
'@umijs/babel-plugin-import-to-await-require', '@umijs/babel-plugin-import-to-await-require',
opts.importToAwaitRequire, opts.importToAwaitRequire,
], ],
// opts.lockCoreJS3 && [ 'react-activation/babel',
// '@umijs/babel-plugin-lock-core-js-3', opts.lockCoreJS3 && [
// opts.lockCoreJS3, '@umijs/babel-plugin-lock-core-js-3',
// ], opts.lockCoreJS3,
],
opts.noAnonymousDefaultExport && [
require.resolve('@umijs/babel-plugin-no-anonymous-default-export'),
],
[
require('@umijs/deps/compiled/babel/plugin-proposal-record-and-tuple')
.default,
{
syntaxType: 'hash',
polyfillModuleName: '@umijs/deps/reexported/record-tuple-polyfill',
importPolyfill: true,
},
],
].filter(Boolean), ].filter(Boolean),
env: { env: {
production: { production: {
......
...@@ -18,7 +18,7 @@ const TYPE_ALL_EXCLUDE = [ ...@@ -18,7 +18,7 @@ const TYPE_ALL_EXCLUDE = [
'lodash', 'lodash',
'react', 'react',
'react-dom', 'react-dom',
'@wisdom-map/arcgismap' // '@wisdom-map/arcgismap'
]; ];
......
...@@ -215,7 +215,7 @@ module.exports = options => { ...@@ -215,7 +215,7 @@ module.exports = options => {
chainConfig.module chainConfig.module
.rule('js') .rule('js')
.test(/\.(js|mjs|jsx|ts|tsx)$/) .test(/\.(js|mjs|jsx|ts|tsx)$/)
.include.add([cwd, ...(process.env.APP_ROOT ? [process.cwd()] : [])]) .include.add([/node_modules\/@esri/, cwd, ...(process.env.APP_ROOT ? [process.cwd()] : [])])
.end() .end()
.exclude.add(/node_modules/) .exclude.add(/node_modules/)
.add(/\.mfsu/) .add(/\.mfsu/)
......
This diff is collapsed.
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"analyze": "cross-env ANALYZE=1 npm run build", "analyze": "cross-env ANALYZE=1 npm run build",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js", "npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion", "preinstall": "npm run npmcheckversion",
"build": "cross-env NODE_ENV=production node internals/webpack/build.js", "build": "cross-env NODE_ENV=production node --max_old_space_size=4096 internals/webpack/build.js",
"build:clean": "rimraf ./build", "build:clean": "rimraf ./build",
"openapi": "cross-env NODE_ENV=development node server/openapi/run.js", "openapi": "cross-env NODE_ENV=development node server/openapi/run.js",
"start": "cross-env REACT_APP_ENV=dev NODE_ENV=development node --max_old_space_size=8192 server --port=$port", "start": "cross-env REACT_APP_ENV=dev NODE_ENV=development node --max_old_space_size=8192 server --port=$port",
...@@ -90,6 +90,8 @@ ...@@ -90,6 +90,8 @@
"babel-core": "7.0.0-bridge.0" "babel-core": "7.0.0-bridge.0"
}, },
"dependencies": { "dependencies": {
"@esri/calcite-colors": "6.0.3",
"@esri/arcgis-html-sanitizer": "2.9.1",
"@amap/amap-jsapi-loader": "^1.0.1", "@amap/amap-jsapi-loader": "^1.0.1",
"@ant-design/colors": "^5.0.1", "@ant-design/colors": "^5.0.1",
"@ant-design/icons": "^4.0.0", "@ant-design/icons": "^4.0.0",
...@@ -100,9 +102,8 @@ ...@@ -100,9 +102,8 @@
"@ant-design/pro-utils": "^1.10.4", "@ant-design/pro-utils": "^1.10.4",
"@babel/polyfill": "7.4.3", "@babel/polyfill": "7.4.3",
"@babel/runtime": "^7.10.5", "@babel/runtime": "^7.10.5",
"@esri/arcgis-html-sanitizer": "^2.9.1",
"@esri/calcite-colors": "^6.0.3",
"@wisdom-cesium/cesium": "^1.0.64", "@wisdom-cesium/cesium": "^1.0.64",
"@wisdom-components/basictable": "^1.5.16",
"@wisdom-components/empty": "^1.4.1", "@wisdom-components/empty": "^1.4.1",
"@wisdom-map/arcgismap": "^1.0.75-0", "@wisdom-map/arcgismap": "^1.0.75-0",
"@wisdom-map/util": "^1.0.27-0", "@wisdom-map/util": "^1.0.27-0",
...@@ -113,6 +114,8 @@ ...@@ -113,6 +114,8 @@
"antd": "^4.17.4", "antd": "^4.17.4",
"compression": "1.7.4", "compression": "1.7.4",
"connected-react-router": "6.4.0", "connected-react-router": "6.4.0",
"echarts": "^5.3.0",
"echarts-for-react": "^3.0.2",
"fontfaceobserver": "2.1.0", "fontfaceobserver": "2.1.0",
"history": "4.9.0", "history": "4.9.0",
"hoist-non-react-statics": "3.3.0", "hoist-non-react-statics": "3.3.0",
...@@ -261,6 +264,7 @@ ...@@ -261,6 +264,7 @@
"prettier": "1.17.0", "prettier": "1.17.0",
"querystring-browser": "^1.0.4", "querystring-browser": "^1.0.4",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"react-activation": "^0.9.9",
"react-app-polyfill": "0.2.2", "react-app-polyfill": "0.2.2",
"react-error-overlay": "6.0.8", "react-error-overlay": "6.0.8",
"react-inlinesvg": "^2.3.0", "react-inlinesvg": "^2.3.0",
...@@ -289,7 +293,7 @@ ...@@ -289,7 +293,7 @@
"traverse": "^0.6.6", "traverse": "^0.6.6",
"umi-webpack-bundle-analyzer": "3.6.0", "umi-webpack-bundle-analyzer": "3.6.0",
"url-loader": "1.1.2", "url-loader": "1.1.2",
"webpack": "^5.65.0", "webpack": "^5.70.0",
"webpack-chain": "6.5.1", "webpack-chain": "6.5.1",
"webpack-cli": "4.2.0", "webpack-cli": "4.2.0",
"webpack-dev-middleware": "5.3.0", "webpack-dev-middleware": "5.3.0",
......
// 主应用 和 子应用数据传递
import { initGlobalState } from 'qiankun';
export const initialState = {
globalConfig: {},
};
const actions = initGlobalState(initialState);
// action.setGlobalState({key: value}) 更新状态
// actions.onGlobalStateChange((newState, prevStaet) => {}) 监听状态
export default actions;
...@@ -5,6 +5,7 @@ import { event } from 'microser-data'; ...@@ -5,6 +5,7 @@ import { event } from 'microser-data';
import { actionCreators } from '../containers/App/store'; import { actionCreators } from '../containers/App/store';
import AppService from './service/base'; import AppService from './service/base';
import notificationService from './service/notification'; import notificationService from './service/notification';
import CloudService from './service/cloud';
const { warning } = Modal; const { warning } = Modal;
// eslint-disable-next-line no-return-await // eslint-disable-next-line no-return-await
instanceRequest.reportCodeError = true; instanceRequest.reportCodeError = true;
...@@ -74,4 +75,5 @@ instanceRequest.setErrorHandler(error => { ...@@ -74,4 +75,5 @@ instanceRequest.setErrorHandler(error => {
}); });
const appService = service(AppService); const appService = service(AppService);
const noticeService = service(notificationService); const noticeService = service(notificationService);
export { appService, noticeService }; const cloudService = service(CloudService);
export { appService, noticeService, cloudService };
...@@ -3,11 +3,11 @@ import * as constants from '../../constants'; ...@@ -3,11 +3,11 @@ import * as constants from '../../constants';
/** /**
* 兼容老接口 * 兼容老接口
*/ */
const transformGateWay = (url) => { const transformGateWay = url => {
if(!/^(cityinterface|CityInterface|CityServer)/) { if (!/^(cityinterface|CityInterface|CityServer)/) {
return url.replace(/GeteWay/, '') return url.replace(/GeteWay/, '');
} }
} };
export const API = { export const API = {
AUTHORIZATION_TOKEN: '/Identity/AuthorizationToken', AUTHORIZATION_TOKEN: '/Identity/AuthorizationToken',
...@@ -28,7 +28,8 @@ export const API = { ...@@ -28,7 +28,8 @@ export const API = {
process.env.NODE_ENV !== 'production' process.env.NODE_ENV !== 'production'
? '/cityjson?ie=utf-8' ? '/cityjson?ie=utf-8'
: 'https://pv.sohu.com', : 'https://pv.sohu.com',
GET_ALL_GROUPS_INFO_FORUSER: '/CityInterface/rest/Services/Portal.svc/AuthorityManage/GetAllGroupsInfoForUser', GET_ALL_GROUPS_INFO_FORUSER:
'/CityInterface/rest/Services/Portal.svc/AuthorityManage/GetAllGroupsInfoForUser',
GET_WEATHER: '/CityInterface/rest/services/CountyProduct.svc/GetWeather', GET_WEATHER: '/CityInterface/rest/services/CountyProduct.svc/GetWeather',
SEND_MESSAGE_CODE: SEND_MESSAGE_CODE:
'CityInterface/rest/services/portal.svc/SendMessVerificationCode', 'CityInterface/rest/services/portal.svc/SendMessVerificationCode',
...@@ -87,9 +88,10 @@ const services = { ...@@ -87,9 +88,10 @@ const services = {
}, },
getUserInfo: { getUserInfo: {
url: () => { url: () =>
return window.globalConfig && window.globalConfig.hasGateWay? API.GET_GATEWAY_USER_INFO: API.GET_USER_INFO window.globalConfig && window.globalConfig.hasGateWay
}, ? API.GET_GATEWAY_USER_INFO
: API.GET_USER_INFO,
method: constants.REQUEST_METHOD_GET, method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP, type: constants.REQUEST_HTTP,
}, },
...@@ -218,30 +220,31 @@ export const searchAutoCity = keywords => { ...@@ -218,30 +220,31 @@ export const searchAutoCity = keywords => {
return jsonp(url, params, options); return jsonp(url, params, options);
}; };
export const getUserInfo = (params) => { export const getUserInfo = params => {
const url = window.globalConfig && window.globalConfig.hasGateWay? API.GET_GATEWAY_USER_INFO: API.GET_USER_INFO const url =
window.globalConfig && window.globalConfig.hasGateWay
? API.GET_GATEWAY_USER_INFO
: API.GET_USER_INFO;
return request({ return request({
url: url, url,
method: constants.REQUEST_METHOD_GET, method: constants.REQUEST_METHOD_GET,
params: params, params,
// params: param.query, // params: param.query,
}); });
} };
export const getWebSiteConfig = (params) => { export const getWebSiteConfig = params => {
const url = window.globalConfig && const url =
window.globalConfig && window.globalConfig && window.globalConfig && window.globalConfig.hasGateWay
window.globalConfig.hasGateWay ? API.GET_WEB_SITE_CONFIG_GEWAY
? API.GET_WEB_SITE_CONFIG_GEWAY : API.GET_WEB_SITE_CONFIG;
: API.GET_WEB_SITE_CONFIG;
return request({ return request({
url: url, url,
method: constants.REQUEST_METHOD_GET, method: constants.REQUEST_METHOD_GET,
params: params, params,
// params: param.query, // params: param.query,
}); });
} };
// 更新常用页 // 更新常用页
export const savePagePartInfo = param => export const savePagePartInfo = param =>
...@@ -252,5 +255,4 @@ export const savePagePartInfo = param => ...@@ -252,5 +255,4 @@ export const savePagePartInfo = param =>
params: param.query, params: param.query,
}); });
export default services; export default services;
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',
GET_ACCOUNT_PAGELIST: `/CityInterface/Services/CityServer_CaseManage/REST/CaseManageREST.svc/GetAccountPageList`,
// 云平台使用分析
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,
},
getAccountPageList: {
url: API.GET_ACCOUNT_PAGELIST,
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;
This diff was suppressed by a .gitattributes entry.
...@@ -126,15 +126,15 @@ const GlobalHeaderRight = props => { ...@@ -126,15 +126,15 @@ const GlobalHeaderRight = props => {
? props.global.get('homepage') ? props.global.get('homepage')
: props.global.get('homepage.url'); : props.global.get('homepage.url');
if(!props.global.get('home')) { if(!props.global.get('home')) {
url = `civweb4/${url}` url = `civweb4/${url.replace(/^\//, '').replace(/^civweb4\//, '')}`
} }
window.share.event.emit('goHome', `/${url}`); window.share.event.emit('goHome', `/${url}`);
url ? ( // url ? (
window.share.event.emit('listenerMointer', { // window.share.event.emit('listenerMointer', {
label: '首页', // label: '首页',
url: url, // url: url.replace(/^civweb4\//, ''),
}) // })
) : null; // ) : null;
}; };
...@@ -224,10 +224,17 @@ const GlobalHeaderRight = props => { ...@@ -224,10 +224,17 @@ const GlobalHeaderRight = props => {
<HomeIcon title={intl.formatMessage({id: 'component.header.icon.home'})} /> <HomeIcon title={intl.formatMessage({id: 'component.header.icon.home'})} />
<span>首页</span> <span>首页</span>
</div> </div>
<div className={classNames(styles.item)} onClick={handlerFavitor} ref={favitorRef}> {
<FavitorIcon></FavitorIcon> // 云平台去掉常用菜单
<span>常用</span> props.global && props.global.userInfo && props.global.userInfo.Groups && props.global.userInfo.Groups.length
</div> ? null
: (
<div className={classNames(styles.item)} onClick={handlerFavitor} ref={favitorRef}>
<FavitorIcon></FavitorIcon>
<span>常用</span>
</div>
)
}
{/*<div className={classNames(styles.item)} onClick={handlerTheme}>*/} {/*<div className={classNames(styles.item)} onClick={handlerTheme}>*/}
{/* <ThemeIcon/>*/} {/* <ThemeIcon/>*/}
{/* <span>主题</span>*/} {/* <span>主题</span>*/}
......
...@@ -36,6 +36,10 @@ class NoticeIconView extends Component { ...@@ -36,6 +36,10 @@ class NoticeIconView extends Component {
videoMessage: {}, videoMessage: {},
}; };
// this.renderPlatform // this.renderPlatform
try {
window.share && window.share.event && window.share.event.removeAllListeners('reloadNotice');
} catch (error) {
}
this.notifier = new Notifier( this.notifier = new Notifier(
this.props.global.userInfo, this.props.global.userInfo,
this.renderVideo, this.renderVideo,
...@@ -48,6 +52,24 @@ class NoticeIconView extends Component { ...@@ -48,6 +52,24 @@ class NoticeIconView extends Component {
async componentDidMount() { async componentDidMount() {
this.notifier.subscribe(NEW_MESSAGE, this.onNewMessage.bind(this)); this.notifier.subscribe(NEW_MESSAGE, this.onNewMessage.bind(this));
this.notifier.start(); this.notifier.start();
window.share && window.share.event && window.share.event.on('reloadNotice', () => {
try {
// eslint-disable-next-line no-unused-expressions
this.notifier && this.notifier.stop();
} catch (error) {
// eslint-disable-next-line no-empty
} finally {
this.notifier = new Notifier(
this.props.global.userInfo,
this.renderVideo,
this.renderPlatform,
this.renderSysPlatform,
this.props,
);
this.notifier.subscribe(NEW_MESSAGE, this.onNewMessage.bind(this));
this.notifier.start();
}
});
} }
componentWillUnmount() { componentWillUnmount() {
...@@ -57,6 +79,7 @@ class NoticeIconView extends Component { ...@@ -57,6 +79,7 @@ class NoticeIconView extends Component {
} catch (error) { } catch (error) {
// eslint-disable-next-line no-empty // eslint-disable-next-line no-empty
} finally { } finally {
window.share.event.removeAllListeners('reloadNotice');
} }
} }
......
@import '~antd/es/style/themes/default.less';
.view {
position: absolute;
top:0;
right: 0;
bottom: 0;
left: 0;
.loadingBox{
position: absolute;
left: calc(50% - 40px);
top: calc(50% - 23px);
color: @text-color;
}
.mapBox {
width: 100%;
height: 100%;
}
}
...@@ -23,7 +23,7 @@ import { ...@@ -23,7 +23,7 @@ import {
SLIDER_MENU_MODE, SLIDER_MENU_MODE,
VALIDATE_AUTH, VALIDATE_AUTH,
MAP_VIEW, MAP_VIEW,
PD_VIEW PD_VIEW,
} from './constants'; } from './constants';
export function getConfig(data) { export function getConfig(data) {
...@@ -174,8 +174,8 @@ export function updageMapView(data) { ...@@ -174,8 +174,8 @@ export function updageMapView(data) {
export function updatePdCesiumView(data) { export function updatePdCesiumView(data) {
return { return {
type: PD_VIEW, type: PD_VIEW,
data data,
} };
} }
export function logout(data) { export function logout(data) {
...@@ -188,13 +188,12 @@ export function logout(data) { ...@@ -188,13 +188,12 @@ export function logout(data) {
window.globalConfig.token = null; window.globalConfig.token = null;
window.globalConfig.access_token = null; window.globalConfig.access_token = null;
window.globalConfig.apiGatewayDomain = window.location.origin; window.globalConfig.apiGatewayDomain = window.location.origin;
window.globalConfig.baseURI = window.location.origin; window.globalConfig.baseURI = window.location.origin;
window.globalConfig.hasGateWay = false; window.globalConfig.hasGateWay = false;
window.globalConfig.userInfo = null; window.globalConfig.userInfo = null;
// window.globalConfig.hasGateWay = ; // window.globalConfig.hasGateWay = ;
} }
Cookies.set('token', '', { Cookies.set('token', '', {
path: '/', path: '/',
}); });
...@@ -219,7 +218,7 @@ export function logout(data) { ...@@ -219,7 +218,7 @@ export function logout(data) {
data: { data: {
currentMenuIndex: 0, currentMenuIndex: 0,
complexConfig: {}, complexConfig: {},
globalConfig: window.globalConfig globalConfig: window.globalConfig,
}, },
}; };
} }
...@@ -20,4 +20,4 @@ export const COMPLEX_PATHNAME = 'App/COMPLEX_PATHNAME'; ...@@ -20,4 +20,4 @@ export const COMPLEX_PATHNAME = 'App/COMPLEX_PATHNAME';
export const GET_MICRO_MOUNTED_STATUS = 'App/GET_MICRO_MOUNTED_STATUS'; export const GET_MICRO_MOUNTED_STATUS = 'App/GET_MICRO_MOUNTED_STATUS';
export const LOGINOUT = 'App/LOGINOUT'; export const LOGINOUT = 'App/LOGINOUT';
export const MAP_VIEW = 'App/MAP_VIEW'; export const MAP_VIEW = 'App/MAP_VIEW';
export const PD_VIEW = "App/PD_VIEW" export const PD_VIEW = 'App/PD_VIEW';
...@@ -6,8 +6,10 @@ import { store, event } from 'microser-data'; ...@@ -6,8 +6,10 @@ import { store, event } from 'microser-data';
import { Storage } from '@wisdom-utils/utils'; import { Storage } from '@wisdom-utils/utils';
import pkg from '../../../../package.json'; import pkg from '../../../../package.json';
import defaultSetting from '../../../../config/defaultSetting'; import defaultSetting from '../../../../config/defaultSetting';
import generRoutes, { generFlatRoutes } from '../../../utils/routes'; import generRoutes, {
import { transformWidgets } from '../../../utils/routes'; generFlatRoutes,
transformWidgets,
} from '../../../utils/routes';
import { import {
CLEAR_RCENT_KEYWORD, CLEAR_RCENT_KEYWORD,
COMPLEX_CONFIG, COMPLEX_CONFIG,
...@@ -31,7 +33,7 @@ import { ...@@ -31,7 +33,7 @@ import {
SLIDER_MENU_MODE, SLIDER_MENU_MODE,
VALIDATE_AUTH, VALIDATE_AUTH,
MAP_VIEW, MAP_VIEW,
PD_VIEW PD_VIEW,
} from './constants'; } from './constants';
const proxy = require('../../../../config/proxy'); const proxy = require('../../../../config/proxy');
...@@ -72,14 +74,12 @@ export const initialState = fromJS({ ...@@ -72,14 +74,12 @@ export const initialState = fromJS({
complexPathName: null, complexPathName: null,
microMounted: true, microMounted: true,
mapView: null, mapView: null,
pdView: null
}); });
/* eslint-disable default-case, no-param-reassign */ /* eslint-disable default-case, no-param-reassign */
const appReducer = (state = initialState, action) => { const appReducer = (state = initialState, action) => {
switch (action.type) { switch (action.type) {
case GET_CONFIG: case GET_CONFIG:
// eslint-disable-next-line no-debugger // eslint-disable-next-line no-debugger
// eslint-disable-next-line no-underscore-dangle // eslint-disable-next-line no-underscore-dangle
window.__INITIAL_STATE__ = Object.assign( window.__INITIAL_STATE__ = Object.assign(
...@@ -92,7 +92,9 @@ const appReducer = (state = initialState, action) => { ...@@ -92,7 +92,9 @@ const appReducer = (state = initialState, action) => {
env: process.env.NODE_ENV === 'development' ? 'daily' : 'prod', env: process.env.NODE_ENV === 'development' ? 'daily' : 'prod',
}, },
); );
window.arcgisAssetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}/assets`; window.arcgisAssetsPath = `${
window.location.origin
}/${pkg.name.toLocaleLowerCase()}/assets`;
// eslint-disable-next-line global-require,no-underscore-dangle // eslint-disable-next-line global-require,no-underscore-dangle
window.__INITIAL_STATE__.mdi = 'SDI'; window.__INITIAL_STATE__.mdi = 'SDI';
window.__INITIAL_STATE__.menu = 'banner-left'; window.__INITIAL_STATE__.menu = 'banner-left';
...@@ -105,43 +107,50 @@ const appReducer = (state = initialState, action) => { ...@@ -105,43 +107,50 @@ const appReducer = (state = initialState, action) => {
// eslint-disable-next-line no-case-declarations // eslint-disable-next-line no-case-declarations
const { homepage } = window.globalConfig; const { homepage } = window.globalConfig;
const modulePkg = {}; const modulePkg = {};
window.globalConfig && window.globalConfig.products && Array.isArray(window.globalConfig.products) && window.globalConfig.products.map(item => { window.globalConfig &&
modulePkg[item.PackageName] = item; window.globalConfig.products &&
}); Array.isArray(window.globalConfig.products) &&
config.widgets = transformWidgets(config.widgets); window.globalConfig.products.map(item => {
modulePkg[item.PackageName] = item;
});
config.widgets = transformWidgets(config.widgets);
const generMenu = generRoutes(config.widgets || [], null, 0, modulePkg); const generMenu = generRoutes(config.widgets || [], null, 0, modulePkg);
let flatMenu = []; let flatMenu = [];
if(generMenu) { if (generMenu) {
flatMenu = generFlatRoutes(generMenu || [], null, null, modulePkg); flatMenu = generFlatRoutes(generMenu || [], null, null, modulePkg);
} }
const home = flatMenu.find(item => { const home = flatMenu.find(item => {
let path = decodeURI(item.path).split("|"); const path = decodeURI(item.path).split('|');
let currentPath = path[0]; let currentPath = path[0];
if(/^\//.test(currentPath)) { if (/^\//.test(currentPath)) {
currentPath = currentPath.replace(/^\//, ''); currentPath = currentPath.replace(/^\//, '');
} }
return currentPath === decodeURI(homepage) return currentPath === decodeURI(homepage);
}); });
let currentMenuIndex = 0; let currentMenuIndex = 0;
if(home) { if (home) {
const parent = home.level >= 2 ? home.parent.parent: home.level >= 3 ? home.parent.parent.parent: home.parent; const parent =
home.level >= 2
if(parent) { ? home.parent.parent
currentMenuIndex = generMenu.findIndex(item => item.name === parent.label); : home.level >= 3
? home.parent.parent.parent
: home.parent;
if (parent) {
currentMenuIndex = generMenu.findIndex(
item => item.name === parent.label,
);
currentProduct.set('currentMenuIndex', currentMenuIndex); currentProduct.set('currentMenuIndex', currentMenuIndex);
store.set('updateMenuIndex', currentMenuIndex) store.set('updateMenuIndex', currentMenuIndex);
} }
} }
// eslint-disable-next-line no-case-declarations // eslint-disable-next-line no-case-declarations
// eslint-disable-next-line no-case-declarations
window.globalConfig.home = home;
// eslint-disable-next-line no-case-declarations
window.globalConfig.home = home;
Cookies.set('city', Cookies.get('city') || window.globalConfig.client); Cookies.set('city', Cookies.get('city') || window.globalConfig.client);
window.globalConfig = config; window.globalConfig = config;
...@@ -239,7 +248,7 @@ const appReducer = (state = initialState, action) => { ...@@ -239,7 +248,7 @@ const appReducer = (state = initialState, action) => {
return state.merge({ return state.merge({
complexConfig: action.data.complexConfig, complexConfig: action.data.complexConfig,
currentMenuIndex: action.data.currentMenuIndex, currentMenuIndex: action.data.currentMenuIndex,
globalConfig: action.data.globalConfig globalConfig: action.data.globalConfig,
}); });
case MAP_VIEW: case MAP_VIEW:
store.set('view', action.data); store.set('view', action.data);
...@@ -247,10 +256,11 @@ const appReducer = (state = initialState, action) => { ...@@ -247,10 +256,11 @@ const appReducer = (state = initialState, action) => {
mapView: action.data, mapView: action.data,
}); });
case PD_VIEW: case PD_VIEW:
store.set('pdView', action.data) store.set('pdView', action.data);
return state.merge({ return state.merge({
pdView : action.data pdView: action.data,
}) });
default: default:
return state; return state;
} }
......
...@@ -60,10 +60,12 @@ export const initGlobalConfig = () => { ...@@ -60,10 +60,12 @@ export const initGlobalConfig = () => {
} }
}); });
// eslint-disable-next-line react-hooks/rules-of-hooks // eslint-disable-next-line react-hooks/rules-of-hooks
const client = params.getParams('client') || Cookies.get('city') let client = params.getParams('client') || Cookies.get('city')
client = client && client !== 'undefined' ? client : 'city';
appService appService
.queryConfig({ .queryConfig({
client: client || 'city', client: client || 'city',
ignoreSite: true,
}) })
.then(res => { .then(res => {
if (res) { if (res) {
...@@ -71,7 +73,7 @@ export const initGlobalConfig = () => { ...@@ -71,7 +73,7 @@ export const initGlobalConfig = () => {
store.dispatch(actionCreators.getConfig(Object.assign({}))); store.dispatch(actionCreators.getConfig(Object.assign({})));
const data = res; const data = res;
if (!data.client) { if (!data.client) {
data.client = params.getParams('client') || Cookies.get('city'); data.client = client;
} }
// Cookies.set('city', data.client); // Cookies.set('city', data.client);
store.dispatch( store.dispatch(
......
...@@ -35,9 +35,9 @@ import { ReactSVG } from 'react-svg'; ...@@ -35,9 +35,9 @@ import { ReactSVG } from 'react-svg';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Router, Switch, useHistory } from '@wisdom-utils/runtime'; import { Router, Switch, useHistory } from '@wisdom-utils/runtime';
import keepAlive, { KeepAlive } from 'react-activation';
import RightContent from '@/components/GlobalHeader/ExtendRightContent'; import RightContent from '@/components/GlobalHeader/ExtendRightContent';
import Panel from '@/components/SliderPanel/MinPanel'; import Panel from '@/components/SliderPanel/MinPanel';
import CesiumMap from '../pages/cesiumMap';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import CreateBaseMap from '@/pages/map'; import CreateBaseMap from '@/pages/map';
import CesiumMap from '@/pages/cesiumMap'; import CesiumMap from '@/pages/cesiumMap';
...@@ -297,10 +297,18 @@ const BasicLayout = props => { ...@@ -297,10 +297,18 @@ const BasicLayout = props => {
currentChildrenRoute && currentChildrenRoute.routes ? setChildrenRoutes(currentChildrenRoute.routes) : setChildrenRoutes([currentChildrenRoute]); currentChildrenRoute && currentChildrenRoute.routes ? setChildrenRoutes(currentChildrenRoute.routes) : setChildrenRoutes([currentChildrenRoute]);
} else { } else {
let url = props.global && props.global.hasOwnProperty('get') && props.global.get('homepage')
? _.isString(props.global.get('homepage'))
? props.global.get('homepage')
: props.global.get('homepage.url')
: '';
if(!props.global.get('home')) {
url = `civweb4/${url.replace(/^\//, '').replace(/^civweb4\//, '')}`
}
setChildrenRoutes([ setChildrenRoutes([
{ {
icon: <HomeIcon />, icon: <HomeIcon/>,
path: props.location && props.location.pathname, path: `/${url}`,
name: '首页' name: '首页'
} }
]) ])
...@@ -310,27 +318,49 @@ const BasicLayout = props => { ...@@ -310,27 +318,49 @@ const BasicLayout = props => {
useEffect(() => { useEffect(() => {
console.log(props.route.routes); console.log(props.route.routes);
}, [props.currentMenuIndex]); }, [props.currentMenuIndex]);
window.share && window.share.event && window.share.event.on('event:updateCurrentChildrenRoutes', ({ currentPath, currentRoute, selectedIndex }) => {
currentRoute && currentRoute.parent && currentRoute.parent.routes ? setChildrenRoutes(currentRoute.parent.routes) : !currentRoute.parent ? setChildrenRoutes(currentRoute.routes) : setChildrenRoutes([currentRoute]); useEffect(() => {
setSelectIndex(selectedIndex); window.share && window.share.event && window.share.event.on('event:updateCurrentChildrenRoutes', ({currentPath, currentRoute, selectedIndex}) => {
setTabActiveKey(currentPath) currentRoute && currentRoute.parent && currentRoute.parent.routes ? setChildrenRoutes(currentRoute.parent.routes): !currentRoute.parent ? setChildrenRoutes(currentRoute.routes): setChildrenRoutes([currentRoute]);
}); setSelectIndex(selectedIndex);
setTabActiveKey(currentPath)
window.share && window.share.event && window.share.event.on('event:favitor', ({ icon, name, path }) => { });
setChildrenRoutes([
{ window.share && window.share.event && window.share.event.on('event:favitor', ({icon, name, path}) => {
icon: <HomeIcon />, setChildrenRoutes([
path: path, {
name: name icon: <HomeIcon/>,
} path: path,
]) name: name
}) }
])
});
window.share && window.share.event && window.share.event.on('goHome', url => {
setChildrenRoutes([
{
icon: <HomeIcon/>,
path: url,
name: '首页'
}
]);
setTabActiveKey(url);
window.history.pushState(null, '', `/civbase${url}`);
});
return () => {
window.share && window.share.event && window.share.event.removeAllListeners('event:updateCurrentChildrenRoutes');
window.share && window.share.event && window.share.event.removeAllListeners('event:favitor');
window.share && window.share.event && window.share.event.removeAllListeners('goHome');
};
}, []);
useEffect(() => { useEffect(() => {
siteAction.setGlobalConfig(props.global); siteAction.setGlobalConfig(props.global);
if (!Cookies.get('token')) { if (!Cookies.get('token')) {
let client = props.global && props.global.client; let client = props.global && props.global.hasOwnProperty('client') ? props.global.get('client') : null;
client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city'; client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client: 'city';
let generateType = props.global && props.global.hasOwnProperty('get') && props.global.get('generateType'); let generateType = props.global && props.global.hasOwnProperty('get') ? props.global.get('generateType') : null;
generateType = !_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined' ? `&generateType=${generateType}` : ''; generateType = !_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined' ? `&generateType=${generateType}` : '';
history.replace(`/user/login?client=${client}${generateType}`); history.replace(`/user/login?client=${client}${generateType}`);
props.logout(); props.logout();
...@@ -350,21 +380,6 @@ const BasicLayout = props => { ...@@ -350,21 +380,6 @@ const BasicLayout = props => {
}, [props.global]); }, [props.global]);
// setChildrenRoutes(currentChildrenRoute) // setChildrenRoutes(currentChildrenRoute)
window.share.event.on('goHome', url => {
setChildrenRoutes([
{
icon: <HomeIcon />,
path: url,
name: '首页'
}
]);
setTabActiveKey(url);
window.history.pushState(null, '', `/civbase${url}`);
});
/** /**
* web4全屏退出,切换三级菜单高亮 * web4全屏退出,切换三级菜单高亮
*/ */
...@@ -514,7 +529,7 @@ const BasicLayout = props => { ...@@ -514,7 +529,7 @@ const BasicLayout = props => {
setCollapse(!collapse); setCollapse(!collapse);
} }
const logo = props.global && props.global.get('bannerLogo') ? (props.global && _.isFunction(props.global.transformDevAssetsBaseURL) && props.global.transformDevAssetsBaseURL(props.global.get('bannerLogo'))) : defaultSetting.logo; const logo = props.global && _.isFunction(props.global.get) && props.global.get('bannerLogo')? (props.global && _.isFunction(props.global.transformDevAssetsBaseURL) && props.global.transformDevAssetsBaseURL(props.global.get('bannerLogo'))): defaultSetting.logo;
return ( return (
<SecurityLayout loading> <SecurityLayout loading>
...@@ -659,53 +674,52 @@ const BasicLayout = props => { ...@@ -659,53 +674,52 @@ const BasicLayout = props => {
> >
</TabPane> </TabPane>
</> </>
))} ))}
</Tabs> </Tabs>
</div> </div>
<PageContainer style={{ paddingTop: '0px', height: '100%' }}> <PageContainer style={{paddingTop: '0px', height: '100%'}}>
{ {
renderRoutes(props.route.routes) renderRoutes(props.route.routes)
} }
{ {
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null }
} {
{ window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap /> : null
}
window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap /> : null
}
<div id="micro-container" className="subapp-container"> <div id="micro-container" className="subapp-container">
{/* <CreateBaseMap/> */}
{props.children} {props.children}
</div> </div>
{props.children} {props.children}
</PageContainer> </PageContainer>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>) : ( </div>
<PageContainer style={{ paddingTop: '0px', height: '100%' }}> ): (
{ <PageContainer style={{paddingTop: '0px', height: '100%'}}>
renderRoutes(props.route.routes) {
renderRoutes(props.route.routes)
}
{ }
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null {
} window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null
}
{
{
window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap /> : null window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap /> : null
} }
<div id="micro-container" className="subapp-container"> <div id="micro-container" className="subapp-container">
{/*<CreateBaseMap/>*/} {/*<CreateBaseMap/>*/}
{props.children} {props.children}
</div> </div>
</PageContainer> </PageContainer>
) )
} }
</SecurityLayout>); </SecurityLayout>);
}; };
......
...@@ -5,8 +5,8 @@ import { Redirect } from '@wisdom-utils/runtime'; ...@@ -5,8 +5,8 @@ import { Redirect } from '@wisdom-utils/runtime';
import { PageLoading } from '@ant-design/pro-layout'; import { PageLoading } from '@ant-design/pro-layout';
import { event } from 'microser-data'; import { event } from 'microser-data';
import { stringify } from 'querystring'; import { stringify } from 'querystring';
import _ from 'lodash';
import { getBaseName } from '../utils/utils'; import { getBaseName } from '../utils/utils';
import _ from 'lodash';
class SecurityLayout extends React.Component { class SecurityLayout extends React.Component {
state = { state = {
...@@ -27,19 +27,32 @@ class SecurityLayout extends React.Component { ...@@ -27,19 +27,32 @@ class SecurityLayout extends React.Component {
// const queryString = stringify({ // const queryString = stringify({
// redirect: window.location.href, // redirect: window.location.href,
// }); // });
if(_.isNull(global.token) || (global.hasGateWay && _.isNull(global.access_token))) { if (
_.isNull(global.token) ||
(global.hasGateWay && _.isNull(global.access_token))
) {
this.props.updateCurrentIndex && this.props.updateCurrentIndex(0); this.props.updateCurrentIndex && this.props.updateCurrentIndex(0);
let client = global.client || Cookies.get('city'); let client = global.client || Cookies.get('city');
client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client: 'city'; client =
client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client)
? client
: 'city';
// event.emit(?'event:initConfig'); // event.emit(?'event:initConfig');
let generateType = global.generateType; let { generateType } = global;
generateType = !_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined' ? `&generateType=${generateType}` : ''; generateType =
!_.isNull(generateType) &&
!_.isUndefined(generateType) &&
generateType !== 'undefined'
? `&generateType=${generateType}`
: '';
return ( return (
<Redirect to={`/user/login?client=${client}${generateType}`} render={() => window.location.reload()}/> <Redirect
to={`/user/login?client=${client}${generateType}`}
render={() => window.location.reload()}
/>
); );
} }
if ((!isLogin && loading) || !isReady) { if ((!isLogin && loading) || !isReady) {
return <PageLoading />; return <PageLoading />;
} }
......
...@@ -14,6 +14,8 @@ import { appService } from '../api'; ...@@ -14,6 +14,8 @@ import { appService } from '../api';
import CitySelector from '../components/CitySelector'; import CitySelector from '../components/CitySelector';
import Login from '../pages/user/login/login'; import Login from '../pages/user/login/login';
import styles from './UserLayout.less'; import styles from './UserLayout.less';
import { initMicroApps } from '@/micro';
const { Link } = Anchor; const { Link } = Anchor;
...@@ -169,7 +171,7 @@ class Site { ...@@ -169,7 +171,7 @@ class Site {
self.globalConfig.userInfo.groupType = allStation[0].groupType; self.globalConfig.userInfo.groupType = allStation[0].groupType;
} }
} }
if (allStation.length > 1) { if (allStation.length > 0) {
self.currentStationName = arr[arr.length - 1]; self.currentStationName = arr[arr.length - 1];
self.citySelector = self.AvailableofRegionName(projectStation); self.citySelector = self.AvailableofRegionName(projectStation);
self.siteCityList = self.buildCitySelectTemple(projectStation); self.siteCityList = self.buildCitySelectTemple(projectStation);
...@@ -342,11 +344,32 @@ class Site { ...@@ -342,11 +344,32 @@ class Site {
self.setLoading(false); self.setLoading(false);
// eslint-disable-next-line no-unused-expressions // eslint-disable-next-line no-unused-expressions
self.props.updateCurrentIndex && self.props.updateCurrentIndex(0); self.props.updateCurrentIndex && self.props.updateCurrentIndex(0);
window.history.replaceState(
'', initMicroApps();
'',
`/${self.globalConfig.homepage}`, // 切换站点后,重置掉三级菜单
); const homeType = self.globalConfig.homeType || 'civweb4';
const homePath =
self.globalConfig.homepage
? self.globalConfig.homepage.startsWith(homeType)
? self.globalConfig.homepage
: `/${homeType}/${self.globalConfig.homepage}`
: `/${homeType}`;
window.share && window.share.event && window.share.event.emit('event:favitor', {
name: "首页",
path: homePath,
icon: null,
});
// 重新加载订阅消息铃铛
window.share && window.share.event && window.share.event.emit('reloadNotice');
// window.history.replaceState(
// '',
// '',
// `/${self.globalConfig.homepage}`,
// );
self.getCityStationsForUser().then(res => { self.getCityStationsForUser().then(res => {
window.share.event.emit('updateSite', res); window.share.event.emit('updateSite', res);
}); });
...@@ -357,6 +380,7 @@ class Site { ...@@ -357,6 +380,7 @@ class Site {
self.props && self.props &&
self.props.updateComplexConfig && self.props.updateComplexConfig &&
self.props.updateComplexConfig({}); self.props.updateComplexConfig({});
self.props.history && self.props.history.push(self.globalConfig.homepage ? `/${self.globalConfig.homepage}` : `/?client=${self.globalConfig.client}`);
// window.location.reload(); // window.location.reload();
window.share.event.emit('triggerMicro', this.props.global); window.share.event.emit('triggerMicro', this.props.global);
}); });
......
import React from 'react'; import React from 'react';
import { import { Helmet, HelmetProvider } from 'react-helmet-async';
Helmet,
HelmetProvider,
} from 'react-helmet-async';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { getMenuData, getPageTitle } from '@ant-design/pro-layout';
import { renderRoutes } from '../utils/routes'; import { renderRoutes } from '../utils/routes';
import {
getMenuData,
getPageTitle,
} from '@ant-design/pro-layout';
import styles from './UserLayout.less'; import styles from './UserLayout.less';
const UserLayout = props => { const UserLayout = props => {
......
...@@ -3,7 +3,6 @@ import 'kit_logger'; ...@@ -3,7 +3,6 @@ import 'kit_logger';
import _ from 'lodash'; import _ from 'lodash';
import { import {
addGlobalUncaughtErrorHandler, addGlobalUncaughtErrorHandler,
initGlobalState,
registerMicroApps, registerMicroApps,
runAfterFirstMounted, runAfterFirstMounted,
setDefaultMountApp, setDefaultMountApp,
...@@ -17,6 +16,7 @@ import { actionCreators } from './containers/App/store'; ...@@ -17,6 +16,7 @@ import { actionCreators } from './containers/App/store';
import { FILTER_FOLER_REG } from './utils/constants'; import { FILTER_FOLER_REG } from './utils/constants';
import loader from './render'; import loader from './render';
import store from './stores'; import store from './stores';
import actions from './actions';
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const Logger = logger('micro'); const Logger = logger('micro');
...@@ -119,16 +119,9 @@ export const initMicroApps = () => { ...@@ -119,16 +119,9 @@ export const initMicroApps = () => {
}, },
); );
const globalStore = store.getState().toJS(); const globalStore = store.getState().toJS();
const { setGlobalState } = initGlobalState({
// eslint-disable-next-line no-undef
globalConfig: window.globalConfig,
//createStoreage.get('globalConfig'),
global: globalStore.global
});
const globalConfig = window.globalConfig; const globalConfig = window.globalConfig;
globalConfig.homepage = globalConfig.homepage && /civweb4/.test(globalConfig.homepage) ? config.homepage.replace(/civweb4\//, '') : globalConfig.homepage; // globalConfig.homepage = globalConfig.homepage && /civweb4/.test(globalConfig.homepage) ? config.homepage.replace(/civweb4\//, ''): globalConfig.homepage;
console.log(globalConfig); actions.setGlobalState({
setGlobalState({
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
globalConfig: globalConfig, globalConfig: globalConfig,
//createStoreage.get('globalConfig'), //createStoreage.get('globalConfig'),
...@@ -228,7 +221,7 @@ export const defaultApp = () => { ...@@ -228,7 +221,7 @@ export const defaultApp = () => {
// createStoreage.set('init_web4', true) // createStoreage.set('init_web4', true)
// } // }
// let homepage = config.homepage.replace('civweb4/', ''); // let homepage = config.homepage.replace('civweb4/', '');
const url = !config.home ? `/civbase/civweb4/${config.homepage.replace(/^\//, '')}` : `/civbase/${config.homepage.replace(/^\//, '')}`; const url = !config.home ? `/civbase/civweb4/${config.homepage.replace(/^\//, '').replace(/^civweb4\//, '')}` : `/civbase/${config.homepage.replace(/^\//, '')}`;
setDefaultMountApp(url); setDefaultMountApp(url);
// if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true); // if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true);
} }
...@@ -490,6 +483,7 @@ window.app.define('@wisdom-map/arcgismap', require.context('../node_modules/@wis ...@@ -490,6 +483,7 @@ window.app.define('@wisdom-map/arcgismap', require.context('../node_modules/@wis
window.app.define('@ant-design/pro-form', require.context('../node_modules/@ant-design/pro-form/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('classnames', require.context('classnames', true, /^.\/index\.js$/), 'index.js'); window.app.define('classnames', require.context('classnames', true, /^.\/index\.js$/), 'index.js');
window.app.define('@ant-design/icons', require.context('../node_modules/@ant-design/icons/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js'); window.app.define('@ant-design/icons', require.context('../node_modules/@ant-design/icons/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
......
...@@ -12,6 +12,10 @@ import { actionCreators } from '../../containers/App/store'; ...@@ -12,6 +12,10 @@ import { actionCreators } from '../../containers/App/store';
import SecurityLayout from '../../layouts/SecurityLayout'; import SecurityLayout from '../../layouts/SecurityLayout';
import LoginAction from '../user/login/login'; import LoginAction from '../user/login/login';
import styles from './index.less'; 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 = [ const industries = [
{ name: '供水', type: '供水', subTitle: 'WATER SUPPLY' }, { name: '供水', type: '供水', subTitle: 'WATER SUPPLY' },
...@@ -20,8 +24,8 @@ const industries = [ ...@@ -20,8 +24,8 @@ const industries = [
{ name: '能源', type: '能源', subTitle: 'ENERGY SOURCES' }, { name: '能源', type: '能源', subTitle: 'ENERGY SOURCES' },
{ name: '直饮水', type: '直饮水', subTitle: 'DRINGKING WATER' }, { name: '直饮水', type: '直饮水', subTitle: 'DRINGKING WATER' },
// { name: '水资源', type: '水资源', subTitle: 'WATER RESOURCES' }, // { name: '水资源', type: '水资源', subTitle: 'WATER RESOURCES' },
{ name: '熊猫智能实验室', type: '实验室', subTitle: 'PANDA AI. LAB' },
{ name: '大数据', type: '大数据', subTitle: 'BIG DATA' }, { name: '大数据', type: '大数据', subTitle: 'BIG DATA' },
{ name: '熊猫智能实验室', type: '实验室', subTitle: 'PANDA AI. LAB' },
{ name: '项目案例', type: '项目案例', subTitle: 'PROJECT CASE' }, { name: '项目案例', type: '项目案例', subTitle: 'PROJECT CASE' },
]; ];
const renderIndustries = (config, callback) => const renderIndustries = (config, callback) =>
...@@ -54,10 +58,15 @@ const renderIndustries = (config, callback) => ...@@ -54,10 +58,15 @@ const renderIndustries = (config, callback) =>
} }
}); });
// let loginAction = null;
const BootPage = props => { const BootPage = props => {
const [loadding, setLoadding] = useState(false); const [loadding, setLoadding] = useState(false);
const [hasRole, setHasRole] = useState(false);
const [scale, setScale] = useState(1); const [scale, setScale] = useState(1);
const [loginAction, setAction] = useState(
() => new LoginAction(props),
);
const history = useHistory();
useDocumentTitle( useDocumentTitle(
{ title: defaultSetting.title, id: '', pageName: '行业切换' }, { title: defaultSetting.title, id: '', pageName: '行业切换' },
props.global.title || defaultSetting.title, props.global.title || defaultSetting.title,
...@@ -67,21 +76,13 @@ const BootPage = props => { ...@@ -67,21 +76,13 @@ const BootPage = props => {
event.preventDefault(); event.preventDefault();
setLoadding(true); setLoadding(true);
const config = props.global; const config = props.global;
const loginAction = new LoginAction(props); // const loginAction = new LoginAction(props);
config.uiwidgets = []; config.uiwidgets = [];
config.widgets = []; config.widgets = [];
config.allWidgets = []; config.allWidgets = [];
props.instance && props.instance.updateConfig(config); props.instance && props.instance.updateConfig(config);
// props.instance && props.instance.getUserInfoAndConfig('', true, type); // props.instance && props.instance.getUserInfoAndConfig('', true, type);
loginAction.getUserInfoAndConfig('', true, type); loginAction && loginAction.getUserInfoAndConfig('', true, type);
// eslint-disable-next-line no-shadow
loginAction.events.on('toggleIndustry', event => {
setLoadding(false);
props.history.push(`/?client=${props.global.client}`);
window.share.event.emit('triggerMicro', props.global);
props.updateCurrentIndex(0);
// window.location.reload();
});
}, []); }, []);
useEffect(() => { useEffect(() => {
// eslint-disable-next-line no-use-before-define // eslint-disable-next-line no-use-before-define
...@@ -96,15 +97,47 @@ const BootPage = props => { ...@@ -96,15 +97,47 @@ const BootPage = props => {
}; };
useEffect(() => { useEffect(() => {
window.addEventListener('resize', handleResize); window.addEventListener('resize', handleResize);
const handleToggleIndustry = event => {
setLoadding(false);
props.history.push(`/?client=${props.global.client}`);
initMicroApps();
window.share.event.emit('triggerMicro', props.global);
props.updateCurrentIndex(0);
}
loginAction.events.on('toggleIndustry', handleToggleIndustry);
return () => { return () => {
window.removeEventListener('resize', handleResize); window.removeEventListener('resize', handleResize);
loginAction.events.removeListener('toggleIndustry', handleToggleIndustry);
}; };
}); }, []);
const renderIndustr = useMemo( const renderIndustr = useMemo(
() => renderIndustries(props.global, handlePage), () => renderIndustries(props.global, handlePage),
[], [],
); );
const intl = useIntl(); const intl = useIntl();
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 ( return (
<SecurityLayout> <SecurityLayout>
<div className={styles.bootPage}> <div className={styles.bootPage}>
...@@ -145,6 +178,14 @@ const BootPage = props => { ...@@ -145,6 +178,14 @@ const BootPage = props => {
<Spin spinning={loadding} size="large" /> <Spin spinning={loadding} size="large" />
</Space> </Space>
</div> </div>
{hasRole ? (
<div className={styles.cloudMonitorBtns}>
<div class="cloud-using-anaylysis-btn" onClick={toOMSUsingAnalysis}>
<img src={usingIcon} alt="" title="点击查看平台使用监控" />
<span>平台使用分析</span>
</div>
</div>
) : null}
</div> </div>
</SecurityLayout> </SecurityLayout>
); );
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
display: flex; display: flex;
width: 1280px; width: 1280px;
flex-wrap: wrap; flex-wrap: wrap;
list-style: none;
justify-content: center; justify-content: center;
list-style: none;
transition: all .5s ease-out; transition: all .5s ease-out;
overflow: hidden; overflow: hidden;
padding-top: 10px; padding-top: 10px;
...@@ -126,6 +126,36 @@ ...@@ -126,6 +126,36 @@
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.cloudMonitorBtns {
position: fixed;
height: 120px;
width: 100%;
bottom: 0px;
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: 14px;
width: 100%;
text-align: center;
}
}
}
}
} }
@media screen and (max-width: 1440px) { @media screen and (max-width: 1440px) {
......
...@@ -6,9 +6,9 @@ const cesiumMap = props => { ...@@ -6,9 +6,9 @@ const cesiumMap = props => {
const ref = useRef(null) const ref = useRef(null)
const storeRef = useRef(null) const storeRef = useRef(null)
useEffect(() => { useEffect(() => {
if(storeRef.current) return
if(!(props.globalConfig.mapsettings?.areasettings && globalConfig.mapsettings?.basemaps?.length > 0)) return
const mapConfig3d = props.globalConfig?.mapConfig3d const mapConfig3d = props.globalConfig?.mapConfig3d
if(!(props.globalConfig.mapsettings?.areasettings && globalConfig.mapsettings?.basemaps?.length > 0)) return
if(storeRef.current) return
const {widgets} = mapConfig3d const {widgets} = mapConfig3d
const schemes = parseScheme.parseSchemes(mapConfig3d) const schemes = parseScheme.parseSchemes(mapConfig3d)
const schemeData = parseScheme.parseDatas(schemes) const schemeData = parseScheme.parseDatas(schemes)
...@@ -38,4 +38,4 @@ const mapDispatchToProps = dispatch => ({ ...@@ -38,4 +38,4 @@ const mapDispatchToProps = dispatch => ({
} }
}) })
export default connect(mapStateToProps, mapDispatchToProps)(cesiumMap) export default connect(mapStateToProps, mapDispatchToProps)(cesiumMap)
\ No newline at end of file
This diff is collapsed.
@import '~antd/es/style/themes/default.less';
@background-color-container: #f5f5f5;
@border-radius: 2px;
.usingAnalysis {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
background-color: @background-color-container;
:global {
.@{ant-prefix}-spin-nested-loading,
.@{ant-prefix}-spin-container {
height: 100%;
}
.anticon {
vertical-align: 0.125em;
}
.back-btn {
font-size: 16px;
opacity: 0.75;
cursor: pointer;
line-height: 32px;
user-select: none;
.anticon {
transform: translateX(0px);
transition: transform 0.3s;
}
&:hover {
.anticon {
transform: translateX(-4px);
}
}
}
.cua-content {
width: 100%;
height: 100%;
min-width: 1150px;
// padding: 5px 8px;
// 顶部筛选条件
.cua-header {
background-color: #FFF;
border-radius: @border-radius;
padding: 8px;
display: flex;
align-items: center;
gap: 20px;
.filter-item {
min-width: 220px;
.@{ant-prefix}-select {
width: 140px;
}
}
.sub-title {
margin-left: auto;
font-size: 12px;
color: #aaa;
}
}
.counter-list {
margin-top: 4px;
display: flex;
gap: 4px;
.@{ant-prefix}-card {
flex: 1 1;
.@{ant-prefix}-card-body {
padding: 8px;
}
}
}
.cua-main {
height: calc(100% - 136px);
margin-top: 4px;
display: flex;
flex-direction: column;
.cua-main-middle {
flex: 1;
overflow: hidden;
width: 100%;
min-height: 200px;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
gap: 4px;
}
.cua-main-bottom {
flex: none;
height: 50%;
width: 100%;
min-height: 320px;
display: flex;
justify-content: space-between;
gap: 4px;
.cua-customer-view {
padding: 10px;
.table-cell-bold {
font-weight: bold;
}
.@{ant-prefix}-table-thead th {
text-align: center;
}
}
}
.cua-chart-box {
flex: 1;
background-color: #FFF;
padding: 4px 8px 8px 8px;
display: flex;
flex-direction: column;
.cua-chart-header {
flex: none;
display: flex;
align-items: center;
.cua-chart-title {
font-weight: bold;
line-height: 32px;
&::before {
content: "";
display: inline-block;
width: 3px;
height: 14px;
background-color: #1890ff;
vertical-align: -0.125em;
margin-right: 8px;
}
}
.cua-chart-subtitle {
margin-left: auto;
}
}
.cua-chart-content {
flex: 1;
overflow: hidden;
}
&.enviromentusing-chart-box {
.cua-chart-content {
overflow: visible;
}
}
}
}
}
}
}
.login-log-modal {
:global {
.login-log-modal-header {
display: flex;
margin-bottom: 16px;
.@{ant-prefix}-form-item {
margin-bottom: 0;
margin-right: 8px;
}
}
.login-log-modal-content {
height: 500px;
}
}
}
\ No newline at end of file
...@@ -3,7 +3,7 @@ import Iframe from 'react-iframe'; ...@@ -3,7 +3,7 @@ import Iframe from 'react-iframe';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
const ShareFrame = props => { const ShareFrame = props => {
const state = props.location.state || {}; const state = props.location.state || {};
debugger
if (!state.linkUrl) { if (!state.linkUrl) {
return null; return null;
} }
......
...@@ -223,11 +223,18 @@ class Login { ...@@ -223,11 +223,18 @@ class Login {
if (result && result.length > 0) { if (result && result.length > 0) {
const config = result.shift(); const config = result.shift();
const homeType = config.productType || 'civweb4'; const homeType = config.productType || 'civweb4';
// 产品类型和首页路径同时有才行
const homepage =
homeType && (params.getParams('redirect') || config.homepage)
? homeType +
'/' +
(params.getParams('redirect') || config.homepage)
: '';
self.globalConfig = Object.assign(self.globalConfig, config, { self.globalConfig = Object.assign(self.globalConfig, config, {
theme: self.globalConfig.theme, theme: self.globalConfig.theme,
menu: self.globalConfig.menu, menu: self.globalConfig.menu,
style: self.globalConfig.style, style: self.globalConfig.style,
homepage: homeType + '/' + (params.getParams('redirect') || self.globalConfig.homepage || config.homepage), homepage: homepage,
}); });
if(self.globalConfig.hasOwnProperty('webConfig')) { if(self.globalConfig.hasOwnProperty('webConfig')) {
...@@ -255,6 +262,7 @@ class Login { ...@@ -255,6 +262,7 @@ class Login {
// this.events.removeAllListeners('toggleIndustry') // this.events.removeAllListeners('toggleIndustry')
// window.share.event = this.events; // window.share.event = this.events;
if ( if (
self.globalConfig.userInfo &&
self.globalConfig.userInfo.site && self.globalConfig.userInfo.site &&
self.globalConfig.userInfo.site.length > 0 self.globalConfig.userInfo.site.length > 0
) { ) {
...@@ -317,7 +325,8 @@ class Login { ...@@ -317,7 +325,8 @@ class Login {
return false; return false;
} }
this.handleLoginError(); this.handleLoginError();
Logger.log('获取网络配置失败'); // Logger.log('获取网络配置失败');
console.log('获取网络配置失败');
} }
}) })
.catch(error => { .catch(error => {
...@@ -332,7 +341,8 @@ class Login { ...@@ -332,7 +341,8 @@ class Login {
let MAX_BOTTOM = 0; let MAX_BOTTOM = 0;
let isScale = false; let isScale = false;
let widgetIndex = -1; let widgetIndex = -1;
this.globalConfig.uiwidgets && this.globalConfig.uiwidgets.map((item, index) => { this.globalConfig.uiwidgets &&
this.globalConfig.uiwidgets.map((item, index) => {
// eslint-disable-next-line radix // eslint-disable-next-line radix
if (parseInt(item.bottom) > MAX_BOTTOM) { if (parseInt(item.bottom) > MAX_BOTTOM) {
// eslint-disable-next-line radix // eslint-disable-next-line radix
...@@ -347,7 +357,7 @@ class Login { ...@@ -347,7 +357,7 @@ class Login {
widgetIndex = index; widgetIndex = index;
}); });
const { layers } = this.globalConfig.mapsettings; const { layers = [] } = this.globalConfig.mapsettings || {};
if (layers.length === 0) { if (layers.length === 0) {
widgetIndex !== -1 && this.globalConfig.uiwidgets.splice(widgetIndex, 1); widgetIndex !== -1 && this.globalConfig.uiwidgets.splice(widgetIndex, 1);
return Promise.resolve({}); return Promise.resolve({});
...@@ -847,7 +857,6 @@ class Login { ...@@ -847,7 +857,6 @@ class Login {
} }
login(usr, pwd, userPhone, isRememberPWD, mode = SERVICE_APP_LOGIN_MODE.password) { login(usr, pwd, userPhone, isRememberPWD, mode = SERVICE_APP_LOGIN_MODE.password) {
this.events.removeAllListeners('loginError');
const self = this; const self = this;
if(window.globalConfig && window.globalConfig.hasGateWay) { if(window.globalConfig && window.globalConfig.hasGateWay) {
usr = userPhone ? userPhone: usr; usr = userPhone ? userPhone: usr;
......
...@@ -59,27 +59,14 @@ const Login = forwardRef((props, _ref) => { ...@@ -59,27 +59,14 @@ const Login = forwardRef((props, _ref) => {
setSubmitting(true); setSubmitting(true);
props.updateCurrentIndex && props.updateCurrentIndex(-1); props.updateCurrentIndex && props.updateCurrentIndex(-1);
action && action.events.on('loginSuccess', event => {
setSubmitting(false);
props.updateCurrentIndex && props.updateCurrentIndex(0);
props.history.push(`/`);
// debugger
// window.share.event.emit('triggerMicro', props.global);
initMicroApps();
});
action && action.events.on('loginError', event => {
setVisible(false);
setSubmitting(false);
});
action && action.events.on('loginVisible', status => {
setVisible(status);
});
}; };
useEffect(() => { useEffect(() => {
if (props.loginMode === LOGIN_WAY.WeChart) { // if (props.loginMode === LOGIN_WAY.WeChart) {
action && action &&
action.events.on('loginSuccess', event => { action.events.on('loginSuccess', event => {
setSubmitting(false);
props.updateCurrentIndex && props.updateCurrentIndex(0);
props.history.push(`/?client=${props.global.client}`); props.history.push(`/?client=${props.global.client}`);
// window.share.event.emit('triggerMicro', props.global); // window.share.event.emit('triggerMicro', props.global);
initMicroApps(); initMicroApps();
...@@ -89,6 +76,15 @@ const Login = forwardRef((props, _ref) => { ...@@ -89,6 +76,15 @@ const Login = forwardRef((props, _ref) => {
setVisible(false); setVisible(false);
setSubmitting(false); setSubmitting(false);
}); });
action &&
action.events.on('loginVisible', status => {
setVisible(status);
});
// }
return () => {
action && action.events && action.events.removeAllListeners('loginSuccess');
action && action.events && action.events.removeAllListeners('loginError');
action && action.events && action.events.removeAllListeners('loginVisible');
} }
}, [props.loginMode]); }, [props.loginMode]);
......
...@@ -8,6 +8,7 @@ import Iframe from '../pages/iframe'; ...@@ -8,6 +8,7 @@ import Iframe from '../pages/iframe';
import Login from '../pages/user/login'; import Login from '../pages/user/login';
import CommonMenu from '../pages/commonMenu'; import CommonMenu from '../pages/commonMenu';
import NoSecret from '../pages/user/login/noSecret'; import NoSecret from '../pages/user/login/noSecret';
import UsingAnalysis from '../pages/cloudOMS/usingAnalysis';
export const dyRoutes = (routes, layout) => { export const dyRoutes = (routes, layout) => {
// eslint-disable-next-line no-shadow // eslint-disable-next-line no-shadow
...@@ -34,6 +35,10 @@ export const dyRoutes = (routes, layout) => { ...@@ -34,6 +35,10 @@ export const dyRoutes = (routes, layout) => {
path: '/industry', path: '/industry',
component: BootPage, component: BootPage,
}, },
{
path: '/usingAnalysis',
component: UsingAnalysis,
},
{ {
path: '/', path: '/',
component: BasicLayout, component: BasicLayout,
......
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