集团子公司首页区分

This commit is contained in:
yunkexin 2025-09-22 11:10:28 +08:00
parent f7c8fceb8d
commit ff304ac4d3
7 changed files with 2340 additions and 26 deletions

127
package-lock.json generated
View File

@ -50,6 +50,7 @@
"react-loadable": "5.5.0",
"react-orgchart": "^1.0.5",
"react-resizable": "^1.10.1",
"react-router-dom": "^5.2.0",
"react-to-print": "^2.0.0-alpha-2",
"react-umeditor": "1.0.12",
"react-websocket": "2.0.1",
@ -7411,6 +7412,22 @@
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
"hasInstallScript": true
},
"node_modules/dva/node_modules/react-router-dom": {
"version": "4.3.1",
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
"dependencies": {
"history": "^4.7.2",
"invariant": "^2.2.4",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.1",
"react-router": "^4.3.1",
"warning": "^4.0.1"
},
"peerDependencies": {
"react": ">=15"
}
},
"node_modules/ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
@ -15845,6 +15862,20 @@
"dom-walk": "^0.1.0"
}
},
"node_modules/mini-create-react-context": {
"version": "0.4.1",
"resolved": "https://registry.npmmirror.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
"integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"dependencies": {
"@babel/runtime": "^7.12.1",
"tiny-warning": "^1.0.3"
},
"peerDependencies": {
"prop-types": "^15.0.0",
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
"node_modules/mini-store": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mini-store/-/mini-store-2.0.0.tgz",
@ -20932,17 +20963,37 @@
}
},
"node_modules/react-router-dom": {
"version": "4.3.1",
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
"license": "MIT",
"version": "5.2.0",
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-5.2.0.tgz",
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
"dependencies": {
"history": "^4.7.2",
"invariant": "^2.2.4",
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.1",
"react-router": "^4.3.1",
"warning": "^4.0.1"
"prop-types": "^15.6.2",
"react-router": "5.2.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
},
"peerDependencies": {
"react": ">=15"
}
},
"node_modules/react-router-dom/node_modules/react-router": {
"version": "5.2.0",
"resolved": "https://registry.npmmirror.com/react-router/-/react-router-5.2.0.tgz",
"integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==",
"dependencies": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1",
"mini-create-react-context": "^0.4.0",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.6.2",
"react-is": "^16.6.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
},
"peerDependencies": {
"react": ">=15"
@ -32253,6 +32304,19 @@
"version": "2.6.12",
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
},
"react-router-dom": {
"version": "4.3.1",
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
"requires": {
"history": "^4.7.2",
"invariant": "^2.2.4",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.1",
"react-router": "^4.3.1",
"warning": "^4.0.1"
}
}
}
},
@ -38796,6 +38860,15 @@
"dom-walk": "^0.1.0"
}
},
"mini-create-react-context": {
"version": "0.4.1",
"resolved": "https://registry.npmmirror.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
"integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
"requires": {
"@babel/runtime": "^7.12.1",
"tiny-warning": "^1.0.3"
}
},
"mini-store": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mini-store/-/mini-store-2.0.0.tgz",
@ -42741,16 +42814,36 @@
}
},
"react-router-dom": {
"version": "4.3.1",
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-4.3.1.tgz",
"integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==",
"version": "5.2.0",
"resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-5.2.0.tgz",
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
"requires": {
"history": "^4.7.2",
"invariant": "^2.2.4",
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.1",
"react-router": "^4.3.1",
"warning": "^4.0.1"
"prop-types": "^15.6.2",
"react-router": "5.2.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
},
"dependencies": {
"react-router": {
"version": "5.2.0",
"resolved": "https://registry.npmmirror.com/react-router/-/react-router-5.2.0.tgz",
"integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==",
"requires": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1",
"mini-create-react-context": "^0.4.0",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.6.2",
"react-is": "^16.6.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
}
}
}
},
"react-router-redux": {

View File

@ -51,6 +51,7 @@
"react-loadable": "5.5.0",
"react-orgchart": "^1.0.5",
"react-resizable": "^1.10.1",
"react-router-dom": "^5.2.0",
"react-to-print": "^2.0.0-alpha-2",
"react-umeditor": "1.0.12",
"react-websocket": "2.0.1",

View File

@ -7,6 +7,10 @@ export default [
name: 'HOME',
value: '/home'
},
{
name: 'GROUPHOME',
value: '/grouphome'
},
{
name: 'MAIN',
value: '/main/:menuId'

View File

@ -4,6 +4,7 @@ import { Router, Route, Switch } from 'dva/router'
import MainLayout from './layout/Main'
import Login from './routes/Login'
import Home from './routes/Home'
import GroupHome from './routes/GroupHome'
import Main from './routes/Main'
import Backend from './routes/Backend'
import HomeMobileNew from './routes/HomeMobileNew'
@ -19,6 +20,7 @@ function RouterConfig ({ history }) {
<Switch>
<Route path={$consts['ROUTE/LOGIN']} component={Login} />
<Route path={$consts['ROUTE/HOME']} component={Home} />
<Route path={$consts['ROUTE/GROUPHOME']} component={GroupHome} />
<Route path={$consts['ROUTE/MAIN']} component={Main} />
<Route path={$consts['ROUTE/BACKEND']} component={Backend} />
{/* <Route path={$consts['ROUTE/HomeMobileNew']} component={HomeMobileNew} /> */}

2171
src/routes/GroupHome.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -87,6 +87,7 @@ const contentStyle = {
background: "#364d79",
};
class Home extends React.Component {
constructor(props) {
super(props);
@ -207,6 +208,11 @@ class Home extends React.Component {
}
componentDidMount() {
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000') {
this.props.history.replace('/grouphome')
// props.history.push({ pathname: "/grouphome" });
}
if (window.navigator.userAgent.indexOf("Windows") < 1) {
window.location.replace(config.guideH5Host);
openNotificationMobile("bottomRight");
@ -1386,9 +1392,9 @@ class Home extends React.Component {
? "尾矿库"
: this.state.mineType == 10
? "选矿厂"
:this.state.mineType == 31
? "职能口": this.state.mineType == 32?"非金属"
: "露天矿";
: this.state.mineType == 31
? "职能口" : this.state.mineType == 32 ? "非金属"
: "露天矿";
if (formCode == "BI054_HOMEDETAIL") {
titleTemp += "安全检查次数统计近12月";
} else if (formCode == "BI055_HOMEDETAIL") {

View File

@ -992,7 +992,7 @@
"pirates" "^4.0.0"
"source-map-support" "^0.5.16"
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.18.3", "@babel/runtime@^7.4.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.18.3", "@babel/runtime@^7.4.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3":
"integrity" "sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g=="
"resolved" "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.1.tgz"
"version" "7.23.1"
@ -6047,7 +6047,7 @@
"resolved" "https://registry.npmmirror.com/highlight-words-core/-/highlight-words-core-1.2.2.tgz"
"version" "1.2.2"
"history@^4.6.3", "history@^4.7.2":
"history@^4.6.3", "history@^4.7.2", "history@^4.9.0":
"integrity" "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew=="
"resolved" "https://registry.npmmirror.com/history/-/history-4.10.1.tgz"
"version" "4.10.1"
@ -6088,7 +6088,7 @@
"resolved" "https://registry.npmmirror.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz"
"version" "2.5.5"
"hoist-non-react-statics@^3.3.0":
"hoist-non-react-statics@^3.1.0", "hoist-non-react-statics@^3.3.0":
"integrity" "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw=="
"resolved" "https://registry.npmmirror.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz"
"version" "3.3.2"
@ -8382,6 +8382,14 @@
dependencies:
"dom-walk" "^0.1.0"
"mini-create-react-context@^0.4.0":
"integrity" "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ=="
"resolved" "https://registry.npmmirror.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz"
"version" "0.4.1"
dependencies:
"@babel/runtime" "^7.12.1"
"tiny-warning" "^1.0.3"
"mini-store@^2.0.0":
"integrity" "sha512-EG0CuwpQmX+XL4QVS0kxNwHW5ftSbhygu1qxQH0pipugjnPkbvkalCdQbEihMwtQY6d3MTN+MS0q+aurs+RfLQ=="
"resolved" "https://registry.npmjs.org/mini-store/-/mini-store-2.0.0.tgz"
@ -10647,7 +10655,7 @@
"memoize-one" "^4.0.0"
"prop-types" "^15.5.8"
"react-is@^16.12.0", "react-is@^16.7.0", "react-is@^16.8.1", "react-is@^16.8.6", "react-is@^16.9.0":
"react-is@^16.12.0", "react-is@^16.6.0", "react-is@^16.7.0", "react-is@^16.8.1", "react-is@^16.8.6", "react-is@^16.9.0":
"integrity" "sha1-LMD+D7p0LZf9UnxCoTvsTusGJBw="
"version" "16.12.0"
@ -10713,6 +10721,19 @@
"react-router" "^4.3.1"
"warning" "^4.0.1"
"react-router-dom@^5.2.0":
"integrity" "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA=="
"resolved" "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-5.2.0.tgz"
"version" "5.2.0"
dependencies:
"@babel/runtime" "^7.1.2"
"history" "^4.9.0"
"loose-envify" "^1.3.1"
"prop-types" "^15.6.2"
"react-router" "5.2.0"
"tiny-invariant" "^1.0.2"
"tiny-warning" "^1.0.0"
"react-router-redux@5.0.0-alpha.9":
"integrity" "sha512-euSgNIANnRXr4GydIuwA7RZCefrLQzIw5WdXspS8NPYbV+FxrKSS9MKG7U9vb6vsKHONnA4VxrVNWfnMUnUQAw=="
"resolved" "https://registry.npmmirror.com/react-router-redux/-/react-router-redux-5.0.0-alpha.9.tgz"
@ -10735,6 +10756,22 @@
"prop-types" "^15.6.1"
"warning" "^4.0.1"
"react-router@5.2.0":
"integrity" "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw=="
"resolved" "https://registry.npmmirror.com/react-router/-/react-router-5.2.0.tgz"
"version" "5.2.0"
dependencies:
"@babel/runtime" "^7.1.2"
"history" "^4.9.0"
"hoist-non-react-statics" "^3.1.0"
"loose-envify" "^1.3.1"
"mini-create-react-context" "^0.4.0"
"path-to-regexp" "^1.7.0"
"prop-types" "^15.6.2"
"react-is" "^16.6.0"
"tiny-invariant" "^1.0.2"
"tiny-warning" "^1.0.0"
"react-slick@~0.25.2":
"integrity" "sha512-8MNH/NFX/R7zF6W/w+FS5VXNyDusF+XDW1OU0SzODEU7wqYB+ZTGAiNJ++zVNAVqCAHdyCybScaUB+FCZOmBBw=="
"resolved" "https://registry.npmjs.org/react-slick/-/react-slick-0.25.2.tgz"
@ -10780,7 +10817,7 @@
"resolved" "https://registry.npmmirror.com/react-websocket/-/react-websocket-2.0.1.tgz"
"version" "2.0.1"
"react@*", "react@^0.14 || ^15.0.0 || ^16.0.0-alpha", "react@^0.14.0 || ^15.0.0 || ^16.0.0", "react@^0.14.0 || ^15.0.0 || ^16.0.0-0", "react@^0.14.0 || ^15.0.0 || ^16.0.0-beta || ^16.0.0", "react@^0.14.0 || ^15.0.0-0 || ^16.0.0", "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0", "react@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0", "react@^0.14.0 || ^15.0.1 || ^16.0.0", "react@^15.0.0 || ^16.0.0", "react@^16.0.0", "react@^16.0.0-0", "react@^16.3.0", "react@^16.6.3", "react@^16.8.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@>= 16.3", "react@>=0.13.2 || ^0.14 || ^15.0.0 || >=16.0.0", "react@>=15", "react@>=15.0.0", "react@>=15.x", "react@>=16.0.0", "react@>=16.9.0", "react@>0.14.5", "react@0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0", "react@0.14.x || 15.x || 16.x", "react@15.x || ^16.0.0-0", "react@16.8.2", "react@16.x":
"react@*", "react@^0.14 || ^15.0.0 || ^16.0.0-alpha", "react@^0.14.0 || ^15.0.0 || ^16.0.0", "react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "react@^0.14.0 || ^15.0.0 || ^16.0.0-0", "react@^0.14.0 || ^15.0.0 || ^16.0.0-beta || ^16.0.0", "react@^0.14.0 || ^15.0.0-0 || ^16.0.0", "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0", "react@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0", "react@^0.14.0 || ^15.0.1 || ^16.0.0", "react@^15.0.0 || ^16.0.0", "react@^16.0.0", "react@^16.0.0-0", "react@^16.3.0", "react@^16.6.3", "react@^16.8.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@>= 16.3", "react@>=0.13.2 || ^0.14 || ^15.0.0 || >=16.0.0", "react@>=15", "react@>=15.0.0", "react@>=15.x", "react@>=16.0.0", "react@>=16.9.0", "react@>0.14.5", "react@0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0", "react@0.14.x || 15.x || 16.x", "react@15.x || ^16.0.0-0", "react@16.8.2", "react@16.x":
"integrity" "sha512-aB2ctx9uQ9vo09HVknqv3DGRpI7OIGJhCx3Bt0QqoRluEjHSaObJl+nG12GDdYH6sTgE7YiPJ6ZUyMx9kICdXw=="
"resolved" "https://registry.npmmirror.com/react/-/react-16.8.2.tgz"
"version" "16.8.2"
@ -12503,7 +12540,7 @@
"integrity" "sha1-s/mziDXjakHIQ6OwkHpaezdV3nM="
"version" "1.0.6"
"tiny-warning@^1.0.0":
"tiny-warning@^1.0.0", "tiny-warning@^1.0.3":
"integrity" "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
"resolved" "https://registry.npmmirror.com/tiny-warning/-/tiny-warning-1.0.3.tgz"
"version" "1.0.3"