diff --git a/web/client/src/layout/actions/global.js b/web/client/src/layout/actions/global.js
index 015d0c5..cf8082d 100644
--- a/web/client/src/layout/actions/global.js
+++ b/web/client/src/layout/actions/global.js
@@ -39,6 +39,8 @@ export function initApiRoot () {
payload: {
apiRoot: res.root,
iotVcmpWeb:res.iotVcmpWeb,
+ pomsMonitor:res.pomsMonitor,
+ dcWeb:res.dcWeb,
}
})
});
diff --git a/web/client/src/layout/reducers/global.js b/web/client/src/layout/reducers/global.js
index 2590521..2b16eef 100644
--- a/web/client/src/layout/reducers/global.js
+++ b/web/client/src/layout/reducers/global.js
@@ -12,6 +12,8 @@ function global (state = {
clientWidth: 1024,
apiRoot: '',
iotVcmpWeb: '',
+ pomsMonitor:'',
+ dcWeb:'',
}, action) {
const payload = action.payload;
switch (action.type) {
@@ -31,7 +33,9 @@ function global (state = {
case INIT_API_ROOT:
return Immutable.fromJS(state).merge({
apiRoot: payload.apiRoot,
- iotVcmpWeb: payload.iotVcmpWeb
+ iotVcmpWeb: payload.iotVcmpWeb,
+ pomsMonitor:payload.pomsMonitor,
+ dcWeb:payload.dcWeb,
}).toJS();
case PEPPROJECTID:
return Immutable.fromJS(state).merge({
diff --git a/web/client/src/sections/facility/containers/monitor.jsx b/web/client/src/sections/facility/containers/monitor.jsx
index 8173c65..6dfa6cf 100644
--- a/web/client/src/sections/facility/containers/monitor.jsx
+++ b/web/client/src/sections/facility/containers/monitor.jsx
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
const Server = (props) => {
- const { dispatch, actions, user, loading, socket } = props
+ const { dispatch, actions, user, loading, socket,pomsMonitor } = props
useEffect(() => {
@@ -16,7 +16,7 @@ const Server = (props) => {
{/*
*/}
{/*
*/}
-
+
>
)
@@ -30,6 +30,7 @@ function mapStateToProps (state) {
// actions: global.actions,
// members: members.data,
// socket: webSocket.socket
+ pomsMonitor:global.pomsMonitor,
};
}
diff --git a/web/client/src/sections/service/containers/reportManagement.jsx b/web/client/src/sections/service/containers/reportManagement.jsx
index c1207d5..23ae6fd 100644
--- a/web/client/src/sections/service/containers/reportManagement.jsx
+++ b/web/client/src/sections/service/containers/reportManagement.jsx
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
const Rest = (props) => {
- const { dispatch, actions, user, loading, socket } = props
+ const { dispatch, actions, user, loading, socket, dcWeb } = props
useEffect(() => {
@@ -13,9 +13,9 @@ const Rest = (props) => {
return (
<>
- {/* style={{height: '100%', width: '100%',margin: '8px 12px', padding: '20px 20px 0px 20px'}} */}
+ {/* style={{height: '100%', width: '100%',margin: '8px 12px', padding: '20px 20px 0px 20px'}} */}
-
+
>
)
@@ -28,7 +28,8 @@ function mapStateToProps (state) {
// user: auth.user,
// actions: global.actions,
// members: members.data,
- // socket: webSocket.socket
+ // socket: webSocket.socket,
+ dcWeb: global.dcWeb,
};
}
diff --git a/web/config.js b/web/config.js
index 2ee97e6..96c67fb 100644
--- a/web/config.js
+++ b/web/config.js
@@ -16,6 +16,9 @@ args.option('apiPomsUrl', 'webapi的URL 外网可访问');
args.option('apiAnxinyunUrl', '安心云 api');
args.option('apiEmisUrl', '企业管理 api');
args.option('iotVcmpWeb', 'IOT 视频服务');
+args.option('pomsMonitor', '运维监控 web');
+args.option('dcWeb', '报表中心web');
+
// 七牛
args.option('qnak', 'qiniuAccessKey');
@@ -30,6 +33,8 @@ const API_POMS_URL = process.env.API_POMS_URL || flags.apiPomsUrl;
const API_EMIS_URL = process.env.API_EMIS_URL || flags.apiEmisUrl;
const API_ANXINYUN_URL = process.env.API_ANXINYUN_URL || flags.apiAnxinyunUrl;
const IOT_VIDEO_WEB = process.env.IOT_VIDEO_WEB || flags.iotVcmpWeb;
+const POMS_MONITOR = process.env.POMS_MONITOR || flags.pomsMonitor;
+const DC_WEB = process.env.DC_WEB || flags.dcWeb;
// 七牛
const ANXINCLOUD_QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
@@ -41,6 +46,7 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA
if (
!API_URL
|| !API_ANXINYUN_URL
+ || !POMS_MONITOR || !DC_WEB
|| !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || !IOT_VIDEO_WEB) {
console.log('缺少启动参数,异常退出');
args.showHelp();
@@ -85,6 +91,8 @@ const product = {
opts: {
apiUrl: API_POMS_URL,
iotVcmpWeb: IOT_VIDEO_WEB,
+ pomsMonitor: POMS_MONITOR,
+ dcWeb: DC_WEB,
staticRoot: './client',
qiniu: {
fetchUrl: '/_file-server',
diff --git a/web/package.json b/web/package.json
index 7e5c214..fdff1bd 100644
--- a/web/package.json
+++ b/web/package.json
@@ -7,7 +7,7 @@
"test": "mocha",
"start-vite": "cross-env NODE_ENV=developmentVite npm run start-params",
"start": "cross-env NODE_ENV=development npm run start-params",
- "start-params": "node server -p 5600 -u http://localhost:4600 --apiPomsUrl http://localhost:4600 --apiAnxinyunUrl http://10.8.30.112:4100 --apiEmisUrl http://10.8.30.112:14000 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-highways4good --qndmn http://rhvqdivo5.hn-bkt.clouddn.com --iotVcmpWeb https://mediaconsole.ngaiot.com",
+ "start-params": "node server -p 5600 -u http://localhost:4600 --apiPomsUrl http://localhost:4600 --apiAnxinyunUrl http://10.8.30.112:4100 --apiEmisUrl http://10.8.30.112:14000 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-highways4good --qndmn http://rhvqdivo5.hn-bkt.clouddn.com --iotVcmpWeb https://mediaconsole.ngaiot.com --pomsMonitor https://monitor.anxinyun.cn --dcWeb https://fsiot-oamss.anxinyun.cn",
"deploy": "export NODE_ENV=production&& npm run build && node server",
"build-dev": "cross-env NODE_ENV=development&&webpack --config webpack.config.js",
"build": "cross-env NODE_ENV=production&&webpack --config webpack.config.prod.js"
diff --git a/web/routes/attachment/index.js b/web/routes/attachment/index.js
index 18621d8..cff0286 100644
--- a/web/routes/attachment/index.js
+++ b/web/routes/attachment/index.js
@@ -19,12 +19,14 @@ module.exports = {
entry: function (app, router, opts) {
const getApiRoot = async function (ctx) {
- const { apiUrl, iotVcmpWeb } = opts;
+ const { apiUrl, iotVcmpWeb, pomsMonitor, dcWeb } = opts;
ctx.status = 200;
ctx.body = {
root: apiUrl,
iotVcmpWeb: iotVcmpWeb,
+ pomsMonitor: pomsMonitor,
+ dcWeb: dcWeb,
};
};