Commit 046e1b3d authored by 邓晓峰's avatar 邓晓峰

feat: 添加平铺菜单布局

parent 9028e768
Pipeline #34235 passed with stages
in 58 minutes 2 seconds
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const proxyURL = 'http://192.168.10.156:8085';
const proxyURL = 'http://192.168.10.150:8023';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: {
......@@ -90,6 +90,16 @@ module.exports = {
'/CityTemp': '/CityTemp',
},
},
'/web4': {
target: proxyURL,
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
pathRewrite: {
'/web4': '/web4',
},
}
},
pre: {
'/CityInterface': {
......
......@@ -50,6 +50,7 @@ module.exports = opts => {
proposal: 'minimal',
},
],
'inline-react-svg',
'@babel/plugin-proposal-do-expressions',
'@babel/plugin-proposal-function-bind',
'@babel/plugin-proposal-logical-assignment-operators',
......
......@@ -250,7 +250,7 @@ module.exports = options => {
.use('file-loader')
.loader(require.resolve('file-loader'))
.options({
name: '/static/[name].[hash:8].[ext]',
name: 'static/[name].[hash:8].[ext]',
esModule: false,
});
......
......@@ -11,7 +11,7 @@
"dependencies": {
"@ant-design/colors": "^5.0.1",
"@ant-design/icons": "^4.0.0",
"@ant-design/pro-layout": "^6.18.1",
"@ant-design/pro-layout": "^6.24.1",
"@ant-design/pro-skeleton": "^1.0.0-beta.2",
"@ant-design/pro-table": "^2.5.3",
"@ant-design/pro-utils": "^1.10.4",
......@@ -52,6 +52,7 @@
"react-redux": "7.0.2",
"react-router-config": "^5.1.1",
"react-router-dom": "5.1.0",
"react-svg": "^14.0.11",
"react-use": "^15.3.4",
"redux": "4.0.1",
"redux-immutable": "^4.0.0",
......@@ -93,6 +94,7 @@
"babel-loader": "8.0.5",
"babel-plugin-dynamic-import-node": "2.2.0",
"babel-plugin-import": "^1.13.0",
"babel-plugin-inline-react-svg": "^2.0.1",
"babel-plugin-lodash": "3.3.4",
"babel-plugin-react-intl": "3.0.1",
"babel-plugin-styled-components": "1.10.0",
......@@ -171,6 +173,7 @@
"raw-loader": "^4.0.2",
"react-app-polyfill": "0.2.2",
"react-error-overlay": "6.0.8",
"react-inlinesvg": "^2.3.0",
"react-refresh": "^0.9.0",
"react-sticky": "^6.0.3",
"react-test-renderer": "16.8.6",
......@@ -308,46 +311,44 @@
}
},
"node_modules/@ant-design/pro-layout": {
"version": "6.19.0",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-layout/-/pro-layout-6.19.0.tgz",
"integrity": "sha1-w/Roy+8cgD4Vkzms7MwWiMfHG2k=",
"version": "6.25.1",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-layout/-/pro-layout-6.25.1.tgz",
"integrity": "sha1-YMKQjyZbB1i5W5p8SV8PYm4OBLQ=",
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^4.0.0",
"@ant-design/pro-provider": "1.4.12",
"@ant-design/pro-utils": "1.17.0",
"@ant-design/pro-provider": "1.4.17",
"@ant-design/pro-utils": "1.24.1",
"@umijs/route-utils": "^1.0.35",
"@umijs/use-params": "^1.0.2",
"classnames": "^2.2.6",
"lodash.merge": "^4.6.2",
"omit.js": "^2.0.2",
"path-to-regexp": "2.4.0",
"rc-resize-observer": "^0.2.1",
"rc-util": "^5.0.6",
"swr": "^0.5.4",
"swr": "^0.5.6",
"unstated-next": "^1.1.0",
"use-json-comparison": "^1.0.3",
"use-media-antd-query": "^1.0.6",
"warning": "^4.0.3"
},
"peerDependencies": {
"antd": "^4.x",
"react": ">=16.9.0"
}
},
"node_modules/@ant-design/pro-layout/node_modules/@ant-design/pro-provider": {
"version": "1.4.12",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.12.tgz",
"integrity": "sha1-OSqrklPugFozybPrPQeLxbyr+30=",
"version": "1.4.17",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.17.tgz",
"integrity": "sha1-Q7vInM7P/ragQRiknf0kecQ6C4U=",
"license": "MIT",
"dependencies": {
"rc-util": "^5.0.1"
}
},
"node_modules/@ant-design/pro-layout/node_modules/@ant-design/pro-utils": {
"version": "1.17.0",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.17.0.tgz",
"integrity": "sha1-qm8rbctcvuQpD2cu4c3JKAyrVdk=",
"dependencies": {
"@ant-design/icons": "^4.3.0",
"@ant-design/pro-provider": "1.4.12",
"classnames": "^2.2.6",
"fast-deep-equal": "^3.1.3",
"moment": "^2.27.0",
"rc-util": "^5.0.6"
},
"peerDependencies": {
"antd": "4.x",
"react": ">=16.9.0"
}
},
"node_modules/@ant-design/pro-layout/node_modules/swr": {
......@@ -421,24 +422,49 @@
}
},
"node_modules/@ant-design/pro-utils": {
"version": "1.10.4",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.10.4.tgz",
"integrity": "sha1-BlFQ/nRzFaaUFjFeGHNSWpVfOoM=",
"version": "1.24.1",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.24.1.tgz",
"integrity": "sha1-OvlEuljcttKxKdxw+AWdREiccXc=",
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^4.3.0",
"@ant-design/pro-provider": "1.4.2",
"@ant-design/pro-provider": "1.4.17",
"classnames": "^2.2.6",
"fast-deep-equal": "^3.1.3",
"lodash.merge": "^4.6.2",
"moment": "^2.27.0",
"rc-util": "^5.0.6"
"rc-util": "^5.0.6",
"react-sortable-hoc": "^2.0.0",
"swr": "^0.5.6"
},
"peerDependencies": {
"antd": "4.x",
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
}
},
"node_modules/@ant-design/pro-utils/node_modules/@ant-design/pro-provider": {
"version": "1.4.2",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.2.tgz",
"integrity": "sha1-WUunbdGtswrplqLfwX1zDSXtQOc=",
"version": "1.4.17",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.17.tgz",
"integrity": "sha1-Q7vInM7P/ragQRiknf0kecQ6C4U=",
"license": "MIT",
"dependencies": {
"rc-util": "^5.0.1"
},
"peerDependencies": {
"antd": "4.x",
"react": ">=16.9.0"
}
},
"node_modules/@ant-design/pro-utils/node_modules/swr": {
"version": "0.5.7",
"resolved": "https://g.civnet.cn:4873/swr/-/swr-0.5.7.tgz",
"integrity": "sha1-u2pWrRxh2nGdGCwRNxmFVNWniqw=",
"license": "MIT",
"dependencies": {
"dequal": "2.0.2"
},
"peerDependencies": {
"react": "^16.11.0 || ^17.0.0"
}
},
"node_modules/@ant-design/react-slick": {
......@@ -3418,6 +3444,39 @@
"defer-to-connect": "^1.0.1"
}
},
"node_modules/@tanem/svg-injector": {
"version": "10.1.4",
"resolved": "https://g.civnet.cn:4873/@tanem%2fsvg-injector/-/svg-injector-10.1.4.tgz",
"integrity": "sha1-NvYOoa2amZNK9GSu2X4TuG6sPYM=",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.15.3",
"content-type": "^1.0.4",
"tslib": "^2.3.1"
}
},
"node_modules/@tanem/svg-injector/node_modules/@babel/runtime": {
"version": "7.15.4",
"resolved": "https://g.civnet.cn:4873/@babel%2fruntime/-/runtime-7.15.4.tgz",
"integrity": "sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=",
"license": "MIT",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@trysound/sax": {
"version": "0.1.1",
"resolved": "https://g.civnet.cn:4873/@trysound%2fsax/-/sax-0.1.1.tgz",
"integrity": "sha1-M0hWQEjnotc5jJNdRmwEFOu2pmk=",
"dev": true,
"license": "ISC",
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/@types/anymatch": {
"version": "1.3.1",
"resolved": "https://g.civnet.cn:4873/@types%2fanymatch/-/anymatch-1.3.1.tgz",
......@@ -3855,9 +3914,10 @@
"dev": true
},
"node_modules/@types/prop-types": {
"version": "15.7.3",
"resolved": "https://g.civnet.cn:4873/@types%2fprop-types/-/prop-types-15.7.3.tgz",
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
"version": "15.7.4",
"resolved": "https://g.civnet.cn:4873/@types%2fprop-types/-/prop-types-15.7.4.tgz",
"integrity": "sha1-/PcgXCXf95Xuea8eMNosl5CAjxE=",
"license": "MIT"
},
"node_modules/@types/q": {
"version": "1.5.4",
......@@ -12382,6 +12442,184 @@
"@babel/runtime": "^7.0.0"
}
},
"node_modules/babel-plugin-inline-react-svg": {
"version": "2.0.1",
"resolved": "https://g.civnet.cn:4873/babel-plugin-inline-react-svg/-/babel-plugin-inline-react-svg-2.0.1.tgz",
"integrity": "sha1-aMnBGdZDqPLXv5OblCU02Jrjrek=",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/parser": "^7.0.0",
"lodash.isplainobject": "^4.0.6",
"resolve": "^1.20.0",
"svgo": "^2.0.3"
},
"engines": {
"node": ">=10.13"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/commander": {
"version": "7.2.0",
"resolved": "https://g.civnet.cn:4873/commander/-/commander-7.2.0.tgz",
"integrity": "sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc=",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 10"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/css-select": {
"version": "4.1.3",
"resolved": "https://g.civnet.cn:4873/css-select/-/css-select-4.1.3.tgz",
"integrity": "sha1-pwRA9wMX8maRGK10/xBeZYSccGc=",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0",
"css-what": "^5.0.0",
"domhandler": "^4.2.0",
"domutils": "^2.6.0",
"nth-check": "^2.0.0"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/css-what": {
"version": "5.0.1",
"resolved": "https://g.civnet.cn:4873/css-what/-/css-what-5.0.1.tgz",
"integrity": "sha1-PvqCATH0ZpqKwkCPnDLnx96fTK0=",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">= 6"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/dom-serializer": {
"version": "1.3.2",
"resolved": "https://g.civnet.cn:4873/dom-serializer/-/dom-serializer-1.3.2.tgz",
"integrity": "sha1-YgZDfTLO767HFhgDIwx6ILwbTZE=",
"dev": true,
"license": "MIT",
"dependencies": {
"domelementtype": "^2.0.1",
"domhandler": "^4.2.0",
"entities": "^2.0.0"
},
"funding": {
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/domelementtype": {
"version": "2.2.0",
"resolved": "https://g.civnet.cn:4873/domelementtype/-/domelementtype-2.2.0.tgz",
"integrity": "sha1-mgtsJ4LtahxzI9QiZxg9+b2LHVc=",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"license": "BSD-2-Clause"
},
"node_modules/babel-plugin-inline-react-svg/node_modules/domhandler": {
"version": "4.2.2",
"resolved": "https://g.civnet.cn:4873/domhandler/-/domhandler-4.2.2.tgz",
"integrity": "sha1-6CXXIdGahrjCAaNSZOImxnjudV8=",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"domelementtype": "^2.2.0"
},
"engines": {
"node": ">= 4"
},
"funding": {
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/domutils": {
"version": "2.8.0",
"resolved": "https://g.civnet.cn:4873/domutils/-/domutils-2.8.0.tgz",
"integrity": "sha1-RDfe9dtuLR9dbuhZvZXKfQIEgTU=",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"dom-serializer": "^1.0.1",
"domelementtype": "^2.2.0",
"domhandler": "^4.2.0"
},
"funding": {
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/entities": {
"version": "2.2.0",
"resolved": "https://g.civnet.cn:4873/entities/-/entities-2.2.0.tgz",
"integrity": "sha1-CY3JDruD2N/6CJ1VJWs1HTTE2lU=",
"dev": true,
"license": "BSD-2-Clause",
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/nth-check": {
"version": "2.0.0",
"resolved": "https://g.civnet.cn:4873/nth-check/-/nth-check-2.0.0.tgz",
"integrity": "sha1-G7T22scAcvwxPoyc0UF7UHTAoSU=",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0"
},
"funding": {
"url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/resolve": {
"version": "1.20.0",
"resolved": "https://g.civnet.cn:4873/resolve/-/resolve-1.20.0.tgz",
"integrity": "sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=",
"dev": true,
"license": "MIT",
"dependencies": {
"is-core-module": "^2.2.0",
"path-parse": "^1.0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/babel-plugin-inline-react-svg/node_modules/svgo": {
"version": "2.5.0",
"resolved": "https://g.civnet.cn:4873/svgo/-/svgo-2.5.0.tgz",
"integrity": "sha1-PJBRtgbYWgL8tZ9FmxmXDSzCyb8=",
"dev": true,
"license": "MIT",
"dependencies": {
"@trysound/sax": "0.1.1",
"colorette": "^1.3.0",
"commander": "^7.2.0",
"css-select": "^4.1.3",
"css-tree": "^1.1.3",
"csso": "^4.2.0",
"stable": "^0.1.8"
},
"bin": {
"svgo": "bin/svgo"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/babel-plugin-istanbul": {
"version": "5.2.0",
"resolved": "https://g.civnet.cn:4873/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz",
......@@ -13889,10 +14127,11 @@
}
},
"node_modules/colorette": {
"version": "1.2.1",
"resolved": "https://g.civnet.cn:4873/colorette/-/colorette-1.2.1.tgz",
"integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==",
"dev": true
"version": "1.3.0",
"resolved": "https://g.civnet.cn:4873/colorette/-/colorette-1.3.0.tgz",
"integrity": "sha1-/0XS8O2yRAadO3cq3rBP7TjQoK8=",
"dev": true,
"license": "MIT"
},
"node_modules/combined-stream": {
"version": "1.0.8",
......@@ -14098,8 +14337,7 @@
"node_modules/content-type": {
"version": "1.0.4",
"resolved": "https://g.civnet.cn:4873/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"dev": true
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"node_modules/conventional-changelog": {
"version": "3.1.24",
......@@ -15233,12 +15471,16 @@
"dev": true
},
"node_modules/css-tree": {
"version": "1.1.2",
"resolved": "https://g.civnet.cn:4873/css-tree/-/css-tree-1.1.2.tgz",
"integrity": "sha1-muOTtdr9fa6KYiR1yux409j717U=",
"version": "1.1.3",
"resolved": "https://g.civnet.cn:4873/css-tree/-/css-tree-1.1.3.tgz",
"integrity": "sha1-60hw+2/XcHMn7JXC/yqwm16NuR0=",
"license": "MIT",
"dependencies": {
"mdn-data": "2.0.14",
"source-map": "^0.6.1"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/css-what": {
......@@ -17712,6 +17954,13 @@
"clone-regexp": "^2.1.0"
}
},
"node_modules/exenv": {
"version": "1.2.2",
"resolved": "https://g.civnet.cn:4873/exenv/-/exenv-1.2.2.tgz",
"integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=",
"dev": true,
"license": "BSD-3-Clause"
},
"node_modules/exif-parser": {
"version": "0.1.12",
"resolved": "https://g.civnet.cn:4873/exif-parser/-/exif-parser-0.1.12.tgz",
......@@ -23588,6 +23837,13 @@
"integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=",
"dev": true
},
"node_modules/lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://g.civnet.cn:4873/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
"dev": true,
"license": "MIT"
},
"node_modules/lodash.kebabcase": {
"version": "4.1.1",
"resolved": "https://g.civnet.cn:4873/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz",
......@@ -23600,6 +23856,12 @@
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
"dev": true
},
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://g.civnet.cn:4873/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo=",
"license": "MIT"
},
"node_modules/lodash.set": {
"version": "4.3.2",
"resolved": "https://g.civnet.cn:4873/lodash.set/-/lodash.set-4.3.2.tgz",
......@@ -29525,6 +29787,16 @@
"resolved": "https://g.civnet.cn:4873/react-fast-compare/-/react-fast-compare-2.0.4.tgz",
"integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw=="
},
"node_modules/react-from-dom": {
"version": "0.6.1",
"resolved": "https://g.civnet.cn:4873/react-from-dom/-/react-from-dom-0.6.1.tgz",
"integrity": "sha1-Z0D1o9eeDDVHA+XAlrj9/g23Gw8=",
"dev": true,
"license": "MIT",
"peerDependencies": {
"react": "^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
"node_modules/react-helmet": {
"version": "6.0.0-beta",
"resolved": "https://g.civnet.cn:4873/react-helmet/-/react-helmet-6.0.0-beta.tgz",
......@@ -29584,6 +29856,20 @@
"csstype": "^2.2.0"
}
},
"node_modules/react-inlinesvg": {
"version": "2.3.0",
"resolved": "https://g.civnet.cn:4873/react-inlinesvg/-/react-inlinesvg-2.3.0.tgz",
"integrity": "sha1-Yig8DOfp0R2BkOw+iViRAiiIMP0=",
"dev": true,
"license": "MIT",
"dependencies": {
"exenv": "^1.2.2",
"react-from-dom": "^0.6.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0"
}
},
"node_modules/react-inspector": {
"version": "2.3.1",
"resolved": "https://g.civnet.cn:4873/react-inspector/-/react-inspector-2.3.1.tgz",
......@@ -29737,6 +30023,22 @@
"shallowequal": "^1.0.1"
}
},
"node_modules/react-sortable-hoc": {
"version": "2.0.0",
"resolved": "https://g.civnet.cn:4873/react-sortable-hoc/-/react-sortable-hoc-2.0.0.tgz",
"integrity": "sha1-9ngNiqS5IqIfPnVK9ULwMmdweLc=",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.2.0",
"invariant": "^2.2.4",
"prop-types": "^15.5.7"
},
"peerDependencies": {
"prop-types": "^15.5.7",
"react": "^16.3.0 || ^17.0.0",
"react-dom": "^16.3.0 || ^17.0.0"
}
},
"node_modules/react-sticky": {
"version": "6.0.3",
"resolved": "https://g.civnet.cn:4873/react-sticky/-/react-sticky-6.0.3.tgz",
......@@ -29747,6 +30049,34 @@
"raf": "^3.3.0"
}
},
"node_modules/react-svg": {
"version": "14.0.11",
"resolved": "https://g.civnet.cn:4873/react-svg/-/react-svg-14.0.11.tgz",
"integrity": "sha1-VcJMpKKt+0jPxX+b8FzD11i6qis=",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.15.3",
"@tanem/svg-injector": "^10.1.3",
"@types/prop-types": "^15.7.4",
"prop-types": "^15.7.2"
},
"peerDependencies": {
"react": "^15.5.4 || ^16.0.0 || ^17.0.0",
"react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0"
}
},
"node_modules/react-svg/node_modules/@babel/runtime": {
"version": "7.15.4",
"resolved": "https://g.civnet.cn:4873/@babel%2fruntime/-/runtime-7.15.4.tgz",
"integrity": "sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=",
"license": "MIT",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/react-syntax-highlighter": {
"version": "15.4.3",
"resolved": "https://g.civnet.cn:4873/react-syntax-highlighter/-/react-syntax-highlighter-15.4.3.tgz",
......@@ -35580,9 +35910,10 @@
}
},
"node_modules/tslib": {
"version": "2.0.3",
"resolved": "https://g.civnet.cn:4873/tslib/-/tslib-2.0.3.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
"version": "2.3.1",
"resolved": "https://g.civnet.cn:4873/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha1-6KM1rdXOrlGqJh0ypJAVjvBC7wE=",
"license": "0BSD"
},
"node_modules/tsutils": {
"version": "3.17.1",
......@@ -38354,21 +38685,22 @@
}
},
"@ant-design/pro-layout": {
"version": "6.19.0",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-layout/-/pro-layout-6.19.0.tgz",
"integrity": "sha1-w/Roy+8cgD4Vkzms7MwWiMfHG2k=",
"version": "6.25.1",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-layout/-/pro-layout-6.25.1.tgz",
"integrity": "sha1-YMKQjyZbB1i5W5p8SV8PYm4OBLQ=",
"requires": {
"@ant-design/icons": "^4.0.0",
"@ant-design/pro-provider": "1.4.12",
"@ant-design/pro-utils": "1.17.0",
"@ant-design/pro-provider": "1.4.17",
"@ant-design/pro-utils": "1.24.1",
"@umijs/route-utils": "^1.0.35",
"@umijs/use-params": "^1.0.2",
"classnames": "^2.2.6",
"lodash.merge": "^4.6.2",
"omit.js": "^2.0.2",
"path-to-regexp": "2.4.0",
"rc-resize-observer": "^0.2.1",
"rc-util": "^5.0.6",
"swr": "^0.5.4",
"swr": "^0.5.6",
"unstated-next": "^1.1.0",
"use-json-comparison": "^1.0.3",
"use-media-antd-query": "^1.0.6",
......@@ -38376,26 +38708,13 @@
},
"dependencies": {
"@ant-design/pro-provider": {
"version": "1.4.12",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.12.tgz",
"integrity": "sha1-OSqrklPugFozybPrPQeLxbyr+30=",
"version": "1.4.17",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.17.tgz",
"integrity": "sha1-Q7vInM7P/ragQRiknf0kecQ6C4U=",
"requires": {
"rc-util": "^5.0.1"
}
},
"@ant-design/pro-utils": {
"version": "1.17.0",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.17.0.tgz",
"integrity": "sha1-qm8rbctcvuQpD2cu4c3JKAyrVdk=",
"requires": {
"@ant-design/icons": "^4.3.0",
"@ant-design/pro-provider": "1.4.12",
"classnames": "^2.2.6",
"fast-deep-equal": "^3.1.3",
"moment": "^2.27.0",
"rc-util": "^5.0.6"
}
},
"swr": {
"version": "0.5.6",
"resolved": "https://g.civnet.cn:4873/swr/-/swr-0.5.6.tgz",
......@@ -38471,25 +38790,35 @@
}
},
"@ant-design/pro-utils": {
"version": "1.10.4",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.10.4.tgz",
"integrity": "sha1-BlFQ/nRzFaaUFjFeGHNSWpVfOoM=",
"version": "1.24.1",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.24.1.tgz",
"integrity": "sha1-OvlEuljcttKxKdxw+AWdREiccXc=",
"requires": {
"@ant-design/icons": "^4.3.0",
"@ant-design/pro-provider": "1.4.2",
"@ant-design/pro-provider": "1.4.17",
"classnames": "^2.2.6",
"fast-deep-equal": "^3.1.3",
"lodash.merge": "^4.6.2",
"moment": "^2.27.0",
"rc-util": "^5.0.6"
"rc-util": "^5.0.6",
"react-sortable-hoc": "^2.0.0",
"swr": "^0.5.6"
},
"dependencies": {
"@ant-design/pro-provider": {
"version": "1.4.2",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.2.tgz",
"integrity": "sha1-WUunbdGtswrplqLfwX1zDSXtQOc=",
"version": "1.4.17",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.17.tgz",
"integrity": "sha1-Q7vInM7P/ragQRiknf0kecQ6C4U=",
"requires": {
"rc-util": "^5.0.1"
}
},
"swr": {
"version": "0.5.7",
"resolved": "https://g.civnet.cn:4873/swr/-/swr-0.5.7.tgz",
"integrity": "sha1-u2pWrRxh2nGdGCwRNxmFVNWniqw=",
"requires": {
"dequal": "2.0.2"
}
}
}
},
......@@ -41541,6 +41870,32 @@
"defer-to-connect": "^1.0.1"
}
},
"@tanem/svg-injector": {
"version": "10.1.4",
"resolved": "https://g.civnet.cn:4873/@tanem%2fsvg-injector/-/svg-injector-10.1.4.tgz",
"integrity": "sha1-NvYOoa2amZNK9GSu2X4TuG6sPYM=",
"requires": {
"@babel/runtime": "^7.15.3",
"content-type": "^1.0.4",
"tslib": "^2.3.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.15.4",
"resolved": "https://g.civnet.cn:4873/@babel%2fruntime/-/runtime-7.15.4.tgz",
"integrity": "sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"@trysound/sax": {
"version": "0.1.1",
"resolved": "https://g.civnet.cn:4873/@trysound%2fsax/-/sax-0.1.1.tgz",
"integrity": "sha1-M0hWQEjnotc5jJNdRmwEFOu2pmk=",
"dev": true
},
"@types/anymatch": {
"version": "1.3.1",
"resolved": "https://g.civnet.cn:4873/@types%2fanymatch/-/anymatch-1.3.1.tgz",
......@@ -41980,9 +42335,9 @@
"dev": true
},
"@types/prop-types": {
"version": "15.7.3",
"resolved": "https://g.civnet.cn:4873/@types%2fprop-types/-/prop-types-15.7.3.tgz",
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
"version": "15.7.4",
"resolved": "https://g.civnet.cn:4873/@types%2fprop-types/-/prop-types-15.7.4.tgz",
"integrity": "sha1-/PcgXCXf95Xuea8eMNosl5CAjxE="
},
"@types/q": {
"version": "1.5.4",
......@@ -50650,6 +51005,123 @@
"@babel/runtime": "^7.0.0"
}
},
"babel-plugin-inline-react-svg": {
"version": "2.0.1",
"resolved": "https://g.civnet.cn:4873/babel-plugin-inline-react-svg/-/babel-plugin-inline-react-svg-2.0.1.tgz",
"integrity": "sha1-aMnBGdZDqPLXv5OblCU02Jrjrek=",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/parser": "^7.0.0",
"lodash.isplainobject": "^4.0.6",
"resolve": "^1.20.0",
"svgo": "^2.0.3"
},
"dependencies": {
"commander": {
"version": "7.2.0",
"resolved": "https://g.civnet.cn:4873/commander/-/commander-7.2.0.tgz",
"integrity": "sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc=",
"dev": true
},
"css-select": {
"version": "4.1.3",
"resolved": "https://g.civnet.cn:4873/css-select/-/css-select-4.1.3.tgz",
"integrity": "sha1-pwRA9wMX8maRGK10/xBeZYSccGc=",
"dev": true,
"requires": {
"boolbase": "^1.0.0",
"css-what": "^5.0.0",
"domhandler": "^4.2.0",
"domutils": "^2.6.0",
"nth-check": "^2.0.0"
}
},
"css-what": {
"version": "5.0.1",
"resolved": "https://g.civnet.cn:4873/css-what/-/css-what-5.0.1.tgz",
"integrity": "sha1-PvqCATH0ZpqKwkCPnDLnx96fTK0=",
"dev": true
},
"dom-serializer": {
"version": "1.3.2",
"resolved": "https://g.civnet.cn:4873/dom-serializer/-/dom-serializer-1.3.2.tgz",
"integrity": "sha1-YgZDfTLO767HFhgDIwx6ILwbTZE=",
"dev": true,
"requires": {
"domelementtype": "^2.0.1",
"domhandler": "^4.2.0",
"entities": "^2.0.0"
}
},
"domelementtype": {
"version": "2.2.0",
"resolved": "https://g.civnet.cn:4873/domelementtype/-/domelementtype-2.2.0.tgz",
"integrity": "sha1-mgtsJ4LtahxzI9QiZxg9+b2LHVc=",
"dev": true
},
"domhandler": {
"version": "4.2.2",
"resolved": "https://g.civnet.cn:4873/domhandler/-/domhandler-4.2.2.tgz",
"integrity": "sha1-6CXXIdGahrjCAaNSZOImxnjudV8=",
"dev": true,
"requires": {
"domelementtype": "^2.2.0"
}
},
"domutils": {
"version": "2.8.0",
"resolved": "https://g.civnet.cn:4873/domutils/-/domutils-2.8.0.tgz",
"integrity": "sha1-RDfe9dtuLR9dbuhZvZXKfQIEgTU=",
"dev": true,
"requires": {
"dom-serializer": "^1.0.1",
"domelementtype": "^2.2.0",
"domhandler": "^4.2.0"
}
},
"entities": {
"version": "2.2.0",
"resolved": "https://g.civnet.cn:4873/entities/-/entities-2.2.0.tgz",
"integrity": "sha1-CY3JDruD2N/6CJ1VJWs1HTTE2lU=",
"dev": true
},
"nth-check": {
"version": "2.0.0",
"resolved": "https://g.civnet.cn:4873/nth-check/-/nth-check-2.0.0.tgz",
"integrity": "sha1-G7T22scAcvwxPoyc0UF7UHTAoSU=",
"dev": true,
"requires": {
"boolbase": "^1.0.0"
}
},
"resolve": {
"version": "1.20.0",
"resolved": "https://g.civnet.cn:4873/resolve/-/resolve-1.20.0.tgz",
"integrity": "sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=",
"dev": true,
"requires": {
"is-core-module": "^2.2.0",
"path-parse": "^1.0.6"
}
},
"svgo": {
"version": "2.5.0",
"resolved": "https://g.civnet.cn:4873/svgo/-/svgo-2.5.0.tgz",
"integrity": "sha1-PJBRtgbYWgL8tZ9FmxmXDSzCyb8=",
"dev": true,
"requires": {
"@trysound/sax": "0.1.1",
"colorette": "^1.3.0",
"commander": "^7.2.0",
"css-select": "^4.1.3",
"css-tree": "^1.1.3",
"csso": "^4.2.0",
"stable": "^0.1.8"
}
}
}
},
"babel-plugin-istanbul": {
"version": "5.2.0",
"resolved": "https://g.civnet.cn:4873/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz",
......@@ -52197,9 +52669,9 @@
}
},
"colorette": {
"version": "1.2.1",
"resolved": "https://g.civnet.cn:4873/colorette/-/colorette-1.2.1.tgz",
"integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==",
"version": "1.3.0",
"resolved": "https://g.civnet.cn:4873/colorette/-/colorette-1.3.0.tgz",
"integrity": "sha1-/0XS8O2yRAadO3cq3rBP7TjQoK8=",
"dev": true
},
"combined-stream": {
......@@ -52410,8 +52882,7 @@
"content-type": {
"version": "1.0.4",
"resolved": "https://g.civnet.cn:4873/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"dev": true
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"conventional-changelog": {
"version": "3.1.24",
......@@ -53581,9 +54052,9 @@
}
},
"css-tree": {
"version": "1.1.2",
"resolved": "https://g.civnet.cn:4873/css-tree/-/css-tree-1.1.2.tgz",
"integrity": "sha1-muOTtdr9fa6KYiR1yux409j717U=",
"version": "1.1.3",
"resolved": "https://g.civnet.cn:4873/css-tree/-/css-tree-1.1.3.tgz",
"integrity": "sha1-60hw+2/XcHMn7JXC/yqwm16NuR0=",
"requires": {
"mdn-data": "2.0.14",
"source-map": "^0.6.1"
......@@ -56134,6 +56605,12 @@
"clone-regexp": "^2.1.0"
}
},
"exenv": {
"version": "1.2.2",
"resolved": "https://g.civnet.cn:4873/exenv/-/exenv-1.2.2.tgz",
"integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=",
"dev": true
},
"exif-parser": {
"version": "0.1.12",
"resolved": "https://g.civnet.cn:4873/exif-parser/-/exif-parser-0.1.12.tgz",
......@@ -62162,6 +62639,12 @@
"integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=",
"dev": true
},
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://g.civnet.cn:4873/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
"dev": true
},
"lodash.kebabcase": {
"version": "4.1.1",
"resolved": "https://g.civnet.cn:4873/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz",
......@@ -62174,6 +62657,11 @@
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
"dev": true
},
"lodash.merge": {
"version": "4.6.2",
"resolved": "https://g.civnet.cn:4873/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo="
},
"lodash.set": {
"version": "4.3.2",
"resolved": "https://g.civnet.cn:4873/lodash.set/-/lodash.set-4.3.2.tgz",
......@@ -68258,6 +68746,13 @@
"resolved": "https://g.civnet.cn:4873/react-fast-compare/-/react-fast-compare-2.0.4.tgz",
"integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw=="
},
"react-from-dom": {
"version": "0.6.1",
"resolved": "https://g.civnet.cn:4873/react-from-dom/-/react-from-dom-0.6.1.tgz",
"integrity": "sha1-Z0D1o9eeDDVHA+XAlrj9/g23Gw8=",
"dev": true,
"requires": {}
},
"react-helmet": {
"version": "6.0.0-beta",
"resolved": "https://g.civnet.cn:4873/react-helmet/-/react-helmet-6.0.0-beta.tgz",
......@@ -68318,6 +68813,16 @@
}
}
},
"react-inlinesvg": {
"version": "2.3.0",
"resolved": "https://g.civnet.cn:4873/react-inlinesvg/-/react-inlinesvg-2.3.0.tgz",
"integrity": "sha1-Yig8DOfp0R2BkOw+iViRAiiIMP0=",
"dev": true,
"requires": {
"exenv": "^1.2.2",
"react-from-dom": "^0.6.0"
}
},
"react-inspector": {
"version": "2.3.1",
"resolved": "https://g.civnet.cn:4873/react-inspector/-/react-inspector-2.3.1.tgz",
......@@ -68477,6 +68982,16 @@
"shallowequal": "^1.0.1"
}
},
"react-sortable-hoc": {
"version": "2.0.0",
"resolved": "https://g.civnet.cn:4873/react-sortable-hoc/-/react-sortable-hoc-2.0.0.tgz",
"integrity": "sha1-9ngNiqS5IqIfPnVK9ULwMmdweLc=",
"requires": {
"@babel/runtime": "^7.2.0",
"invariant": "^2.2.4",
"prop-types": "^15.5.7"
}
},
"react-sticky": {
"version": "6.0.3",
"resolved": "https://g.civnet.cn:4873/react-sticky/-/react-sticky-6.0.3.tgz",
......@@ -68487,6 +69002,27 @@
"raf": "^3.3.0"
}
},
"react-svg": {
"version": "14.0.11",
"resolved": "https://g.civnet.cn:4873/react-svg/-/react-svg-14.0.11.tgz",
"integrity": "sha1-VcJMpKKt+0jPxX+b8FzD11i6qis=",
"requires": {
"@babel/runtime": "^7.15.3",
"@tanem/svg-injector": "^10.1.3",
"@types/prop-types": "^15.7.4",
"prop-types": "^15.7.2"
},
"dependencies": {
"@babel/runtime": {
"version": "7.15.4",
"resolved": "https://g.civnet.cn:4873/@babel%2fruntime/-/runtime-7.15.4.tgz",
"integrity": "sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"react-syntax-highlighter": {
"version": "15.4.3",
"resolved": "https://g.civnet.cn:4873/react-syntax-highlighter/-/react-syntax-highlighter-15.4.3.tgz",
......@@ -74484,9 +75020,9 @@
}
},
"tslib": {
"version": "2.0.3",
"resolved": "https://g.civnet.cn:4873/tslib/-/tslib-2.0.3.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
"version": "2.3.1",
"resolved": "https://g.civnet.cn:4873/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha1-6KM1rdXOrlGqJh0ypJAVjvBC7wE="
},
"tsutils": {
"version": "3.17.1",
......@@ -92,7 +92,7 @@
"dependencies": {
"@ant-design/colors": "^5.0.1",
"@ant-design/icons": "^4.0.0",
"@ant-design/pro-layout": "^6.18.1",
"@ant-design/pro-layout": "^6.24.1",
"@ant-design/pro-skeleton": "^1.0.0-beta.2",
"@ant-design/pro-table": "^2.5.3",
"@ant-design/pro-utils": "^1.10.4",
......@@ -133,6 +133,7 @@
"react-redux": "7.0.2",
"react-router-config": "^5.1.1",
"react-router-dom": "5.1.0",
"react-svg": "^14.0.11",
"react-use": "^15.3.4",
"redux": "4.0.1",
"redux-immutable": "^4.0.0",
......@@ -174,6 +175,7 @@
"babel-loader": "8.0.5",
"babel-plugin-dynamic-import-node": "2.2.0",
"babel-plugin-import": "^1.13.0",
"babel-plugin-inline-react-svg": "^2.0.1",
"babel-plugin-lodash": "3.3.4",
"babel-plugin-react-intl": "3.0.1",
"babel-plugin-styled-components": "1.10.0",
......@@ -252,6 +254,7 @@
"raw-loader": "^4.0.2",
"react-app-polyfill": "0.2.2",
"react-error-overlay": "6.0.8",
"react-inlinesvg": "^2.3.0",
"react-refresh": "^0.9.0",
"react-sticky": "^6.0.3",
"react-test-renderer": "16.8.6",
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
import React, { useState } from 'react';
import { ReactSVG } from 'react-svg'
import { message } from 'antd';
import _, { words } from 'lodash';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { useIntl } from '@/locales/localeExports';
import Icon from '@ant-design/icons';
import { actionCreators } from '../../containers/App/store';
import HeaderSearch from '../HeaderSearch';
import Avatar from './AvatarDropdown';
import styles from './index.less';
import NoticeIconView from './NoticeIconView';
import classNames from 'classnames';
/* eslint-disable */
const orderSvg = () => (
<svg
version="1.1"
x="0px"
y="0px"
width="24px"
height="24px"
viewBox="0 0 24 24"
enableBackground="new 0 0 24 24"
space="preserve"
>
<path
fill="#5F718C"
d="M7.223,13.131c-0.445,0-0.815,0.364-0.815,0.816c0,0.446,0.37,0.816,0.815,0.816
c0.446,0,0.816-0.37,0.816-0.816C8.039,13.495,7.669,13.131,7.223,13.131L7.223,13.131z M7.223,16.574L7.223,16.574
c-0.445,0-0.815,0.371-0.815,0.817c0,0.45,0.37,0.814,0.815,0.814c0.446,0,0.816-0.364,0.816-0.814
C8.039,16.945,7.669,16.574,7.223,16.574L7.223,16.574z M7.223,9.688L7.223,9.688c-0.445,0-0.815,0.366-0.815,0.817
c0,0.445,0.37,0.815,0.815,0.815c0.446,0,0.816-0.37,0.816-0.815C8.039,10.054,7.669,9.688,7.223,9.688L7.223,9.688z M20.469,4.533
L20.469,4.533h-2.246V4.082c0-0.268-0.22-0.48-0.485-0.48h-2.622c-0.138-0.59-0.434-1.1-0.839-1.505
c-0.59-0.591-1.388-0.95-2.28-0.95c-0.884,0-1.677,0.359-2.262,0.95C9.323,2.502,9.022,3.012,8.879,3.602H6.263
c-0.267,0-0.492,0.213-0.492,0.48v0.451H3.548c-0.451,0-0.821,0.363-0.821,0.814v16.688c0,0.452,0.37,0.817,0.821,0.817h16.921
c0.438,0,0.805-0.365,0.805-0.817V5.348C21.273,4.896,20.907,4.533,20.469,4.533L20.469,4.533z M10.671,3.027
c0.405-0.404,0.718-0.653,1.325-0.653c0.614,0,0.933,0.249,1.337,0.653c0.221,0.227,0.158,0.256,0.273,0.574h-3.208
C10.516,3.283,10.44,3.254,10.671,3.027 M7.015,4.822L7.015,4.822h9.982v1.054H7.015 M19.647,21.215L19.647,21.215H4.359V6.158
h1.411v0.451c0,0.267,0.226,0.486,0.492,0.486h11.475c0.266,0,0.485-0.22,0.485-0.486V6.158h1.425V21.215L19.647,21.215z
M16.742,9.765L16.742,9.765H9.659c-0.267,0-0.485,0.468-0.485,0.74c0,0.267,0.219,0.739,0.485,0.739h7.083
c0.277,0,0.491-0.473,0.491-0.739C17.233,10.232,17.02,9.765,16.742,9.765L16.742,9.765z M16.742,16.65L16.742,16.65H9.659
c-0.267,0-0.485,0.468-0.485,0.741c0,0.271,0.219,0.728,0.485,0.728h7.083c0.277,0,0.491-0.457,0.491-0.728
C17.233,17.118,17.02,16.65,16.742,16.65L16.742,16.65z M16.742,13.213L16.742,13.213H9.659c-0.267,0-0.485,0.462-0.485,0.735
c0,0.271,0.219,0.734,0.485,0.734h7.083c0.277,0,0.491-0.464,0.491-0.734C17.233,13.675,17.02,13.213,16.742,13.213L16.742,13.213z"
/>
</svg>
);
const homeSvg = () => (
<svg
version="1.1"
x="0px"
y="0px"
width="24px"
height="24px"
viewBox="0 0 24 24"
enableBackground="new 0 0 24 24"
space="preserve"
>
<path
fill="#5F718C"
d="M23.359,13.561v-1.313L12.057,1.064L0.642,12.247v1.37h2.84v9.318h7.381v-4.935h2.271v4.935h7.385v-9.318
L23.359,13.561z M18.815,11.917v9.319H14.84v-4.935H9.161v4.935H5.185v-9.319H3.311l8.746-8.551l8.577,8.551H18.815z"
/>
</svg>
);
const favitorSvg = () => (
<svg t="1631171489722" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16457" width="24" height="24"><path d="M512 87.806c-234.721 0-424.194 189.474-424.194 424.194s189.474 424.194 424.194 424.194 424.194-189.474 424.194-424.194-189.474-424.194-424.194-424.194zM783.484 442.715l-137.155 100.393c-7.069 5.655-9.899 14.141-7.069 22.624l52.317 161.194c5.655 18.382-15.553 33.935-31.108 22.624l-137.155-100.393c-7.069-5.655-16.967-5.655-24.037 0l-137.155 100.393c-15.553 11.312-36.763-4.242-31.108-22.624l53.731-162.608c2.829-8.484 0-16.967-7.069-22.624l-137.155-100.393c-15.553-11.312-7.069-35.349 11.312-35.349h169.678c8.484 0 16.967-5.655 18.382-14.141l52.317-161.194c5.655-18.382 32.522-18.382 38.177 0l52.317 161.194c2.829 8.484 9.899 14.141 18.382 14.141h169.678c21.21 0 28.278 25.452 12.725 36.763z" p-id="16458" fill="#E3ECFF"></path></svg>);
const OrderIcon = props => <Icon component={orderSvg} {...props} />;
const HomeIcon = props => <Icon component={homeSvg} {...props} />;
const FavitorIcon = props => <Icon component={favitorSvg} {...props}/>
const MESSAGE_BOX_URL =
'product/maintenance/CaseManage/CaseDoingBox/StardCaseDoingBoxView|isDelay=1';
export const getConfig = (widgets, url, key) => {
let widgetconfig = {};
if (widgets) {
// eslint-disable-next-line no-plusplus
for (let i = 0; i < widgets.length; i++) {
const widget = widgets[i];
if (widget && widget[key])
widget[key] = widget[key].replace(/\\/g, '/').trim();
// eslint-disable-next-line eqeqeq
if (widget[key] && url.toLowerCase() === widget[key].toLowerCase()) {
widgetconfig = widget;
break;
} else {
const children = widget.widgets ? widget.widgets : widget.routes;
if (children) {
widgetconfig = getConfig(children, url, key);
if (widgetconfig) {
break;
}
}
}
}
}
return widgetconfig;
};
const GlobalHeaderRight = props => {
const { theme, layout } = props;
const [options, setOptions] = useState([]);
const [currentIndex, setCurrentIndex] = useState(-1);
let className = styles.right;
if (theme === 'dark' && layout === 'top') {
className = `${styles.right} ${styles.dark}`;
}
const intl = useIntl();
const goHome = event => {
event.stopPropagation();
setCurrentIndex(0);
const url = _.isString(props.global.get('homepage'))
? props.global.get('homepage')
: props.global.get('homepage.url');
window.share.event.emit('goHome', `/civbase/civweb4/${url}`);
url ? (
window.share.event.emit('listenerMointer', {
label: '首页',
url: url,
})
) : null;
};
const handleOrder = event => {
event.stopPropagation();
const widgetConfig = getConfig(
props.global.get('widgets').concat(props.global.get('uiwidgets')),
MESSAGE_BOX_URL,
'url',
);
if (Object.keys(widgetConfig).length > 0) {
props.history.push(`/civweb4/${MESSAGE_BOX_URL}`);
setCurrentIndex(2);
} else {
message.warning('对不起,您没有菜单权限!');
}
};
const handlerFavitor = event => {
setCurrentIndex(1);
}
return (
<div className={className}>
<div className={styles.nav}>
<div className={classNames(styles.item, {
[styles.active]: currentIndex === -1
})} onClick={goHome}>
<HomeIcon title={intl.formatMessage({id: 'component.header.icon.home'})} />
<span>首页</span>
</div>
<div className={classNames(styles.item, {
[styles.active]: currentIndex === 1
})} onClick={handlerFavitor}>
<FavitorIcon></FavitorIcon>
<span>常用</span>
</div>
<div className={classNames(styles.item, {
[styles.active]: currentIndex === 2
})}>
<OrderIcon onClick={handleOrder} title={intl.formatMessage({id: 'component.header.icon.order'})} />
<span>工单</span>
</div>
</div>
<NoticeIconView title={intl.formatMessage({id: 'component.header.icon.alarm'})} />
<Avatar menu global={props.global} updateCurrentIndex={props.updateCurrentIndex} updateConfig={props.updateConfig} logout={props.logout}/>
{/* <SelectLang className={styles.action} /> */}
</div>
);
};
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
flatMenu: state.getIn(['global', 'flatMenu']),
menu: state.getIn(['global', 'menu']),
recentKeywords: state.getIn(['global', 'recentKeywords']),
recentVisited: state.getIn(['global', 'recentVisited']),
recentProducts: state.getIn(['global', 'recentProducts']),
});
const mapDispatchToProps = dispatch => ({
updateRecentKeywords(keyword) {
dispatch(actionCreators.updateRecentKeywords(keyword));
},
updateRecentVisited(history) {
dispatch(actionCreators.updateRecentVisited(history));
},
updateRecentProduct(history) {
dispatch(actionCreators.updateRecentProduct(history));
},
clearRecentProduct() {
dispatch(actionCreators.clearRecentProduct());
},
updateCurrentIndex(index) {
dispatch(actionCreators.updateCurrentIndex(index))
},
updateConfig(config) {
dispatch(actionCreators.getConfig(config))
},
updateComplexConfig(config) {
dispatch(actionCreators.updateComplexConfig(config))
},
logout() {
dispatch(actionCreators.logout())
}
});
export default connect(
mapStateToProps,
mapDispatchToProps,
)(withRouter(GlobalHeaderRight));
......@@ -166,6 +166,30 @@
transform: scale(0.88);
}
}
.item {
display: flex;
align-items: center;
justify-content: center;
color: #fff;
height: 100%;
padding: 0 16px;
cursor: pointer;
span:first-child {
margin: 0 8px 0 0!important;
}
span:last-child {
color: #5F718C;
}
&:hover, &.active {
background: rgba(22,133,255, 0.4);
path {
fill: #FFFFFF!important;
}
span:last-child {
color: #fff;
}
}
}
}
.platformModal {
//
......
......@@ -15,7 +15,9 @@ const Categories = props => {
props.onChange && props.onChange(index);
};
return (
<div className={styles['menu-categories']}>
<div className={classNames(styles['menu-categories'], {
[styles['min-cateorites']]: props.mode
})}>
{(props.data || []).map((item, index) => {
const categorieCls = classNames(
styles['categorie-name'],
......
import React, { useState } from 'react';
import classNames from 'classnames';
import styles from './min.less';
const Categories = props => {
const [currentIndex, setCurrentIndex] = useState(props.currentMenuIndex);
const selectCategories = (event, index) => {
event.preventDefault();
event.stopPropagation();
event.nativeEvent.stopImmediatePropagation();
setCurrentIndex(index);
// eslint-disable-next-line no-unused-expressions
props.onChange && props.onChange(index);
};
return (
<div className={classNames(styles['menu-categories'], {
[styles['min-cateorites']]: props.mode
})}>
{(props.data || []).map((item, index) => {
const categorieCls = classNames(
styles['categorie-name'],
styles.btn,
currentIndex === index ? styles.active : '',
);
return (
<div
className={categorieCls}
key={item.name}
onClick={event => selectCategories(event, index)}
>
{/* eslint-disable-next-line jsx-a11y/alt-text */}
<img src={item.extData.icon} />
<span>{item.extData.label}</span>
</div>
);
})}
</div>
);
};
export default Categories;
import React, { useEffect, useRef, useState } from 'react';
import classNames from 'classnames';
import propTypes from 'prop-types';
import KeyCode from 'rc-util/lib/KeyCode';
import Icon, { MenuOutlined } from '@ant-design/icons';
import Categories from './MinCategories';
import styles from './min.less';
// eslint-disable-next-line import/extensions
import { events } from './utils/index.js';
const ThLarge = props => (
<svg viewBox="0 0 1024 1024" version="1.1" width="14" height="14">
<path
d="M592 64h384c26.51 0 48 21.49 48 48v320c0 26.51-21.49 48-48 48H592c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48z m-160 0H48C21.49 64 0 85.49 0 112v320c0 26.51 21.49 48 48 48h384c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zM0 592v320c0 26.51 21.49 48 48 48h384c26.51 0 48-21.49 48-48V592c0-26.51-21.49-48-48-48H48c-26.51 0-48 21.49-48 48z m592 368h384c26.51 0 48-21.49 48-48V592c0-26.51-21.49-48-48-48H592c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48z"
fill="#737f97"
/>
</svg>
);
const ThLargeIcon = props => <Icon component={ThLarge} {...props} />;
const MinPanel = props => {
const getCategories = () => {
let { data } = props;
// eslint-disable-next-line no-prototype-builtins
data = data.filter(item => item.hasOwnProperty('extData'));
return data;
};
const categories = getCategories();
const wcls = categories.length <= 10 ? styles.w110: styles.w210
const panelCls = classNames(
styles.mainPane,
props.visible ? styles.visible : styles.hidden,
wcls
);
const domRef = useRef();
// eslint-disable-next-line no-debugger;
const [currentMenu, setCurrentMenu] = useState(null);
useEffect(() => {
setCurrentMenu(props.data[props.currentMenuIndex]);
}, [props.data, props.currentMenuIndex]);
// eslint-disable-next-line no-underscore-dangle
let _clickEvents = null;
const handleKeyDown = event => {
if (event.keyCode === KeyCode.ESC) {
const { onClose } = props;
event.stopPropagation();
if (onClose) {
onClose(event);
}
}
};
const domFocus = () => {
if (domRef) {
domRef.current.focus();
}
};
const handleDocumentClick = e => {
if (props.visible) {
const node = domRef && domRef.current;
if (
node &&
(node === e.target ||
node.contains(e.target) ||
(e.target !== document &&
!document.documentElement.contains(e.target)))
) {
return;
}
// eslint-disable-next-line no-unused-expressions
props.onClose && props.onClose(e);
}
};
const addDocumentEvents = () => {
if (props.canCloseByOutSideClick) {
_clickEvents = events.on(document, 'click', handleDocumentClick);
}
};
const removeDocumentEvents = () => {
_clickEvents.off();
_clickEvents = null;
};
const selectItem = (event, item) => {
// eslint-disable-next-line no-unused-expressions
props.onSelect && props.onSelect(item);
};
const handleCategories = index => {
setCurrentMenu(props.data[index]);
// eslint-disable-next-line no-unused-expressions
props.onChange && props.onChange(index);
};
useEffect(() => {
if (props.visible) {
domFocus();
}
addDocumentEvents();
return () => removeDocumentEvents();
}, [props.visible]);
return (
<div
className={panelCls}
tabIndex="-1"
onKeyDown={event =>
props.visible && props.keyboard ? handleKeyDown(event) : undefined
}
ref={domRef}
>
<div className={styles.main}>
<div className={styles['main-left']}>
<Categories
mode="mini"
data={categories}
onChange={handleCategories}
currentMenuIndex={props.currentMenuIndex}
/>
</div>
</div>
</div>
);
};
MinPanel.propTypes = {
visible: propTypes.bool,
keyboard: propTypes.bool,
onClose: propTypes.func,
canCloseByOutSideClick: propTypes.bool,
};
MinPanel.defaultProps = {
visible: false,
keyboard: true,
canCloseByOutSideClick: true,
onClose: () => {},
};
export default MinPanel;
......@@ -20,7 +20,7 @@
flex: 1 1 0%;
position: absolute;
z-index: 30;
background-color: rgba(0, 21, 41, 0.94);
background-color: #001529;
min-width: 500px;
max-width: 640px;
overflow: hidden;
......@@ -69,6 +69,10 @@
overflow: hidden auto;
box-sizing: border-box;
.menu-categories {
&.min-cateorites {
position: relative;
top: 46px;
}
.categorie-name {
border-width: 0px 0px 0px 1px;
border-top-style: initial;
......
@import '~antd/es/style/themes/default.less';
@dark-menu-catatories-color: rgba(255, 255, 255, 0.65);
@menu-primary-color: #1685FF;
.mainPane {
position: absolute;
&.hidden {
// display: none;
flex: 1 1 0%;
// position: relative;
z-index: 5;
background-color: rgb(247, 247, 247);
// min-width: 490px;
// max-width: 980px;
width: 0;
overflow: hidden;
transition: all 0.25s cubic-bezier(0, 0, 0.2, 1) 0s;
transform: translateX(-1240px);
}
&.visible {
display: block;
flex: 1;
position: absolute;
z-index: 610;
background-color: rgba(0, 21, 41, 0.98);
min-width: 210px;
max-width: 210px;
overflow: hidden;
height: 100%;
transition: all 0.25s cubic-bezier(0, 0, 0.2, 1) 0s;
}
&.w110 {
min-width: 110px;
max-width: 110px;
}
&.w210 {
min-width: 210px;
max-width: 210px;
}
.header {
width: 100%;
height: 40px;
line-height: 20px;
text-align: center;
padding: 0 0 0 18px;
display: inline-flex;
align-items: center;
&-title {
color: #fff;
padding-left: 12px;
}
.subheader {
color: #fff;
display: flex;
align-items: center;
margin-left: 20px;
:global(.@{ant-prefix}icon-menu) {
color: #737f97;
padding-right: 12px;
}
}
.marks {
position: absolute;
right: 12px;
top: 8px;
}
}
.main {
// padding: 32px 0px 0px 32px;
padding: 0px 0px 0px 4px;
height: 100%;
overflow: hidden;
box-sizing: border-box;
display: flex;
&-left {
// padding-top: 32px;
// width: 125px;
height: 100%;
overflow: hidden auto;
box-sizing: border-box;
.menu-categories {
&.min-cateorites {
position: relative;
top: 48px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.categorie-name {
border-width: 0px 0px 0px 1px;
border-top-style: initial;
border-right-style: initial;
border-bottom-style: initial;
border-top-color: initial;
border-right-color: initial;
border-bottom-color: initial;
border-image: initial;
border-left-style: solid;
border-left-color: rgb(222, 222, 222);
display: flex;
align-items: center;
&.btn {
box-sizing: border-box;
outline: medium;
background: none;
cursor: pointer;
font-family: inherit;
font-size: inherit;
text-decoration: none;
transition: all 0.3s ease-out 0s;
border: 1px solid transparent;
vertical-align: middle;
text-align: left;
color: #555555;
width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 12px 12px;
height: 74px;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 2px;
&:hover {
// border-left: 2px solid @primary-color;
// span {
// color: #fff;
// }
span {
color: @menu-primary-color;
transition: all 0.25s cubic-bezier(0, 0, 0.2, 1) 0s;
}
}
&:hover,
&:link:hover,
&:visited:hover {
color: #273150;
}
}
img {
width: 22px;
height: 22px;
}
span {
// margin-left: 12px;
padding-top: 4px;
color: @dark-menu-catatories-color;
}
&.active {
background-color: rgba(0, 0, 0, 0.2);
// border-left: 2px solid @primary-2;
transition: all 0.25s cubic-bezier(0, 0, 0.2, 1) 0s;
span {
color: @menu-primary-color;
}
}
}
}
}
&-menus {
flex: 1 1 0%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: row;
margin-left: 12px;
&::-webkit-scrollbar {
width: 0px;
height: 0px;
}
&-recentAll {
flex: 1 1 0%;
padding: 0px 32px 32px 0px;
overflow: auto;
&-menu-group {
margin-bottom: 12px;
columns: 120px 3;
column-gap: 12px;
&-items {
display: inline-block;
margin-bottom: 20px;
width: 100%;
break-inside: avoid;
.title {
margin: 0px 0px 8px 0px;
padding: 0px;
height: 30px;
line-height: 30px;
font-size: 12px;
font-weight: 600;
color: #fff;
transition: all 250ms linear 0s;
}
&-menu-item {
position: relative;
transition: all 300ms ease 0s;
display: flex;
align-items: center;
img {
width: 14px;
height: 14px;
}
&-name {
box-sizing: border-box;
outline: medium;
background: none;
cursor: pointer;
font-family: inherit;
font-size: inherit;
text-decoration: none;
transition: all 0.3s ease-out 0s;
border: 1px solid transparent;
vertical-align: middle;
text-align: left;
color: rgba(255, 255, 255, 0.65);
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0px 12px;
height: 32px;
line-height: 30px;
&.pad {
padding: 0px 4px;
}
&:link,
&:visited,
&:hover {
// color: rgb(85, 85, 85);
color: #fff;
}
}
}
}
}
}
}
}
}
......@@ -15,6 +15,10 @@ body,
font-family: 'ZhenyanGB';
src: url("./assets/fonts/ZhenyanGB.ttf");
}
@font-face {
font-family: 'PangMenZhengDaoBiaoTiTi';
src: url("./assets/fonts/PangMenZhengDaoBiaoTiTi.ttf");
}
.colorWeak {
filter: invert(80%);
......@@ -64,7 +68,6 @@ select:-webkit-autofill {
}
}
}
// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
body .ant-design-pro > .ant-layout {
......
......@@ -357,15 +357,6 @@ const BasicLayout = props => {
useEffect(() => {
props.updatePathname(props.location.pathname);
// let path = props.global.homepage ? `/civweb4/${props.global.homepage}` : `/civweb4/?client=${props.global.get('client')}`;
// if(!JSON.parse(sessionStorage.getItem('tabNav'))){
// sessionStorage.setItem('tabNav', JSON.stringify([{title: '首页', key: path, path: path}]))
// setTabRoutesList([{title: '首页', key: path, path: path}]);
// }
// if(!sessionStorage.getItem('tabActiveKey')){
// sessionStorage.setItem('tabActiveKey', path);
// setTabActiveKey(path);
// }
}, []);
const extraRender = menuExtraRender(currentRoutes);
......
@import '~antd/es/style/themes/default.less';
@menu-primary-color: #1685FF;
.basicLayout * {
box-sizing: border-box;
}
.basicLayout {
display: flex;
flex-direction: column;
width: 100%;
min-height: 100%;
.layout-has-slider {
flex-direction: row;
display: flex;
flex: auto;
}
.layoutSlider {
overflow: hidden;
flex: 0 0 100px;
max-width: 100px;
min-width: 100px;
width: 100px;
background-color: @layout-header-background;
&.fixed {
position: fixed!important;
top: 46px;
left: 0;
z-index: 600;
height: 100%;
overflow: auto;
overflow-x: hidden;
box-shadow: 2px 0 8px 0 rgb(29 35 41 / 5%);
}
.sliderMenu {
flex: 1 1 0%; overflow: hidden auto;
ul {
position: relative;
min-height: 100%;
li {
height: 74px;
display: flex;
align-items: center;
text-align: center;
width: 100%;
justify-content: center;
cursor: pointer;
a {
text-align: center;
display: block;
img {
width: 22px;
height: 22px;
opacity: 0.7;
}
span {
display: block;
color: #A9AEB2;
padding-top: 4px;
max-width: 70px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
&:hover {
span {
color: #1685FF;
}
}
&.active {
background: #1685FF;
box-shadow: 0px 1px 0px 0px rgba(238, 238, 238, 0.17);
span {
color: #FFFFFF;
}
}
}
}
.splitLine {
width: 90px;
height: 1px;
border: 1px solid;
border-image: linear-gradient(-90deg, #030000, #FFFFFF, #030000) 10 0;
background: linear-gradient(90deg, #030000 0%, #FFFFFF 50%, #030000 100%);
margin: 0 auto;
position: relative;
top: -4px;
}
}
.layout-slider-childern {
display: flex;
flex-direction: column;
height: 100%;
}
}
.layout {
position: relative;
// display: flex;
flex: auto;
flex-direction: column;
min-height: 0;
background: #f0f2f5;
}
.basicLayout-content {
position: relative;
// margin: 24px 24px 0px 24px;
}
.ant-page-header {
// padding: 4px 16px;
position: fixed; top: 0px; width: 100%; left: 0px; z-index: 999;
// box-shadow: rgb(240, 241, 242) 0px 2px 8px;
box-sizing: border-box;
margin: 0;
color: rgba(0,0,0,.85);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: "tnum","tnum";
position: relative;
// padding: 16px 24px;
height: 46px;
background-color: #0678F5;
// background: url('../assets/basic/图层 998@2x.png') no-repeat center;
background-size: cover;
display: flex;
flex-direction: row;
box-sizing: border-box;
.header {
position: absolute;
width: 100%;
display: flex;
align-items: center;
height: 100%;
padding-left: 17px;
.logo {
display: flex;
align-items: center;
height: 100%;
padding-left: 7px;
img {
width: 48px;
height: 25px;
}
}
.title {
min-width: 200px;
font-size: 26px;
font-weight: 400;
color: #FFFFFF;
opacity: 0.9;
padding-left: 25px;
font-family: PangMenZhengDaoBiaoTiTi;
letter-spacing: 2px;
}
}
}
.menu-item-children {
height: 50px;
background: linear-gradient(0deg, #E5E7E8 0%, #FAFDFF 13%);
box-shadow: rgb(240 241 242) 0px 2px 8px;
position: fixed;
top: 46px;
width: 100%;
z-index: 500;
svg {
path {
fill: #C4CDDB;
box-shadow: 0px 1px 2px 0px rgb(6 0 1 / 50%);
}
}
.menu-item {
float: left;
}
& :global(.ant-tabs-tab) {
display: flex!important;
}
& :global(.ant-tabs-tab-btn) {
display: flex;
position: relative;
align-items: center;
}
// :global .ant-tabs-tab-btn:after {
// position: absolute;
// width: 1px;
// height: 15px;
// border: 1px solid #E4E8F1;
// content: ' ';
// right: -21px;
// top: 5px;
// }
.menu-item-name {
margin-left: 8px;
color: #737983;
}
& :global(.ant-tabs-ink-bar) {
background: @menu-primary-color!important;
}
& :global(.ant-tabs-tab-active) {
color: @menu-primary-color!important;
}
& :global(.ant-tabs-tab-active .panda-pro-layouts-basic-layout-menu-item-name) {
color: @menu-primary-color!important;
}
& :global(.ant-tabs-tab-active svg path) {
fill: @menu-primary-color!important;
}
& :global(.ant-tabs-nav-wrap) {
margin-left: 44px;
}
& :global(.ant-dropdown-trigger) {
display: flex;
align-items: center;
}
& :global(.ant-tabs-top > .ant-tabs-nav, .ant-tabs-bottom > .ant-tabs-nav, .ant-tabs-top > div > .ant-tabs-nav, .ant-tabs-bottom > div > .ant-tabs-nav) {
margin: 0px!important;
}
}
.ant-page-container {
// padding-top: 48px;
margin: -24px -24px 0;
// background-color: #fff;
}
.ant-pro-page-container-warp {
background-color: #fff;
}
.fixedHeader {
position: fixed;
width: 100%;
top:0px;
left: 0px;
height: 46px;
margin: 0px;
padding: 0px;
}
}
& :global {
.ant-dropdown-menu-item {
display: flex;
flex-direction: row;
align-items: center;
padding: 10px 12px!important;
div {
display: flex;
flex-direction: row;
align-items: center;
span:first-child {
width: 3px;
height: 3px;
background: #7A8E9D;
/* position: absolute; */
display: flex;
border-radius: 100%;
}
span:last-child {
padding-left: 10px;
}
}
&:hover {
span:first-child {
background: @menu-primary-color;
}
span:last-child {
color: @menu-primary-color;
}
}
}
.ant-dropdown-menu {
.ant-divider-horizontal{
&:last-child {
display: none;
}
}
}
}
& :global {
.ant-dropdown-custom-menu {
top: 92px!important;
}
}
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import {
Anchor,
Button,
Popover,
Radio,
Result,
Spin,
Tabs,
Divider,
Dropdown,
Menu
} from 'antd';
import Icon from '@ant-design/icons';
import { store } from 'microser-data';
import classNames from 'classnames';
import { ReactSVG } from 'react-svg'
import Cookies from 'js-cookie';
import { dom } from 'kit_utils';
import { connect } from 'react-redux';
import { useMountedState } from 'react-use';
import RightContent from '@/components/GlobalHeader/ExtendRightContent';
import Panel from '@/components/SliderPanel/MinPanel';
import { actionCreators } from '@/containers/App/store';
import Authorized from '@/utils/Authorized';
import {
findPathByLeafId,
getBaseName,
} from '@/utils/utils';
import {
LeftOutlined,
LoadingOutlined,
MenuFoldOutlined,
DownOutlined
} from '@ant-design/icons';
import ProLayout, { getPageTitle, PageContainer } from '@ant-design/pro-layout';
import { getMatchMenu } from '@umijs/route-utils';
// import { renderRoutes } from 'react-router-config';
import { useHistory } from '@wisdom-utils/runtime';
import pkg from '../../package.json';
import SecurityLayout from './SecurityLayout';
import Site from './Site';
import styles from './UserLayout.less';
import layoutStyles from './BasicLayout.less';
import { divide } from 'lodash';
const { layout: defaultSetting } = require('../../config/config');
const { TabPane } = Tabs;
// import Login from '../pages/user/login/login';
const antIcon = <LoadingOutlined style={{ fontSize: 12 }} spin />;
const homeSvg = () => (
<svg t="1631169883330" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2203" width="20" height="20"><path d="M423.9 487H221.7c-34.9 0-63.4-28.4-63.4-63.4V221.5c0-34.9 28.4-63.4 63.4-63.4h202.2c34.9 0 63.4 28.4 63.4 63.4v202.2c-0.1 34.9-28.5 63.3-63.4 63.3z m0-63.3v31.7-31.7zM221.7 221.5v202.2h202.1l0.1-202.2H221.7zM803.1 487H600.9c-34.9 0-63.4-28.4-63.4-63.4V221.5c0-34.9 28.4-63.4 63.4-63.4h202.2c34.9 0 63.4 28.4 63.4 63.4v202.2c0 34.9-28.5 63.3-63.4 63.3z m0-63.3v31.7-31.7zM600.9 221.5v202.2H803l0.1-202.2H600.9zM423.9 865.8H221.7c-34.9 0-63.4-28.4-63.4-63.4V600.3c0-34.9 28.4-63.4 63.4-63.4h202.2c34.9 0 63.4 28.4 63.4 63.4v202.2c-0.1 34.9-28.5 63.3-63.4 63.3z m0-63.3v31.7-31.7zM221.7 600.3v202.2h202.1l0.1-202.2H221.7zM736.9 865.8h-69.7c-71.4 0-129.6-58.1-129.6-129.6v-69.7c0-71.4 58.1-129.6 129.6-129.6h69.7c71.4 0 129.6 58.1 129.6 129.6v69.7c0 71.5-58.2 129.6-129.6 129.6z m-69.8-265.5c-36.5 0-66.2 29.7-66.2 66.2v69.7c0 36.5 29.7 66.2 66.2 66.2h69.7c36.5 0 66.2-29.7 66.2-66.2v-69.7c0-36.5-29.7-66.2-66.2-66.2h-69.7z" fill="#B2B2B2" p-id="2204"></path></svg>
);
const HomeIcon = props => <Icon component={homeSvg} {...props} style={{marginRight: '0px'}}/>;
// const { TabPane } = Tabs;
// const baseURI = isProd
// ? window.location.origin
// : `http://${window.location.hostname}:3020`;
const optionsWith = [
{ label: '按站点', value: 'site' },
{ label: '按城市', value: 'city' },
];
const noMatch = (
<Result
status={403}
title="403"
subTitle="Sorry, you are not authorized to access this page."
extra={<Button type="primary">Go Login</Button>}
/>
);
const renderIcon = (icon, size, alias) => (
<img
src={icon}
style={{ width: `${size}px`, height: `${size}px`, opacity: '0.8' }}
alt=""
/>
);
const menuExtraRender = currentRoutes => {
// eslint-disable-next-line react-hooks/rules-of-hooks
const [toggleSystem, setToggleSystem] = useState(false);
return {
render: ({ collapsed }) => {
if (currentRoutes) {
const iconURL =
currentRoutes && currentRoutes.extData && currentRoutes.extData.icon;
return (
<>
<Spin
spinning={currentRoutes.extData && !currentRoutes.extData.icon}
>
{iconURL && (
<a
style={{ display: 'flex', alignItems: 'center' }}
onClick={() => setToggleSystem(!toggleSystem)}
>
<img
src={iconURL}
style={{ width: '20px', height: '20px' }}
alt=""
/>
<span
style={{
margin: '0 2px 0 7px',
textOverflow: 'ellipsis',
overflow: 'hidden',
whiteSpace: 'nowrap',
color: 'rgba(255, 255, 255, 0.65)',
fontSize: '14px',
}}
>
{currentRoutes && currentRoutes.name}
</span>
<MenuFoldOutlined
style={{ color: '#888', marginLeft: '10px' }}
/>
</a>
)}
</Spin>
</>
);
}
return null;
},
toggleSystem,
onClose: () => setToggleSystem(!toggleSystem),
};
};
const HOT = ['HOT', '县', '市', 'New'];
const StationsItem = (item, action) => {
const changeGroup = (event, data) => {
action.changeGroup && action.changeGroup(event, data);
};
return (
<li
key={item.groupID}
style={{ marginRight: `${item.style.marginRight}px` }}
>
<a
className={classNames(styles.city_select, styles.showTip)}
title={item.city}
index={item.promoteIndex}
style={{ fontSize: '13px' }}
onClick={event => changeGroup(event, item)}
>
{item.groupName}
{item.promoteTip && HOT.includes(item.promoteTip) && (
<div title={`${item.promoteTip}`}>{item.promoteTip}</div>
)}
</a>
</li>
);
};
const Stations = props => {
const data = props.data.stations;
const [targetOffset, setTargetOffset] = useState(undefined);
const cityPane = useRef(null);
const cityContent = useRef(null);
const [defaultTab, setDefaultTab] = useState('site');
useEffect(() => {
setTargetOffset(cityPane.current.clientHeight / 2);
}, []);
const handleClick = (event, link) => {
event.preventDefault();
};
const handleTabChange = event => {
setDefaultTab(event.target.value);
};
return (
<>
<div className={styles.focusStations}>
<ul>
{Array.isArray(data)
? data.map(item => StationsItem(item, props.action))
: null}
</ul>
</div>
<Radio.Group
options={optionsWith}
optionType="button"
buttonStyle="solid"
size="small"
value={defaultTab}
onChange={handleTabChange}
style={{ marginTop: '6px' }}
/>
<div style={{ maxWidth: '520px', position: 'relative' }}>
{defaultTab === 'site' ? (
<div
className={classNames(styles.city_pane, styles.station_container)}
ref={cityPane}
>
<Anchor
affix={false}
onClick={handleClick}
targetOffset={targetOffset}
getContainer={() => cityContent.current}
>
<ul className={styles.py}>
{props.data &&
props.data.siteCityList &&
props.data.siteCityList.letters}
</ul>
<div
className={styles.cityContent}
style={{ height: '335px' }}
ref={cityContent}
>
{props.data &&
props.data.siteCityList &&
props.data.siteCityList.content}
</div>
</Anchor>
</div>
) : (
<div className="city_pane city_container">
{props.data.citySelector}
</div>
)}
<Spin spinning={props.loading} tip="加载中" />
</div>
</>
);
};
const renderTitle = ({
title,
action,
data,
loading,
setLoading,
collapsed,
fixedHeader,
config,
}) => {
// eslint-disable-next-line react-hooks/rules-of-hooks,no-debugger
// eslint-disable-next-line react-hooks/rules-of-hooks
const [visible, setVisible] = useState(false);
const header = document.querySelector('.ant-pro-fixed-header');
let marginLeft = '148px';
const DEFAULT_MIXIN_WIDTH = 48;
if (header && fixedHeader) {
const documentWidth = document.body.clientWidth;
if (documentWidth === header.offsetWidth && !collapsed) {
marginLeft = '148px';
} else {
/* eslint-disable */
const deltWidth = document.body.clientWidth - header.offsetWidth;
marginLeft = collapsed
? '0px'
: deltWidth === DEFAULT_MIXIN_WIDTH
? `100px`
: `${deltWidth}px`;
}
}
let loaded = !!(
(data && !data.stations) ||
(Array.isArray(data.weathers) && data.weathers.length === 0)
);
if (config && config.userInfo && config.userInfo.site === '') {
loaded = false;
}
return (
<>
<span className={styles['header-title']} style={{ marginLeft }}>
{title}123
</span>
<Spin
indicator={antIcon}
spinning={loaded}
size="small"
style={{ marginLeft: '10px' }}
tip="加载中"
wrapperClassName={styles.spinLoadding}
>
<div className={styles.cityContent}>
<Popover
placement="bottomLeft"
trigger="click"
content={
<Stations
data={data}
action={action}
loading={loading}
setLoading={setLoading}
/>
}
arrowPointAtCenter
overlayClassName={styles.stationsWrapper}
onVisibleChange={visible => setVisible(visible)}
>
{Array.isArray(data.stations) && data.stations.length > 0 ? (
<span className={styles.siteName}>
<img src="https://panda-water.cn/web4/assets/images/depart.svg" />
<span>{data.currentStationName}</span>
<img
src="https://panda-water.cn/web4/assets/images/下.svg"
style={{
transform: !visible ? `rotate(0deg)` : `rotate(180deg)`,
}}
/>
</span>
) : null}
</Popover>
{data.weathers && Object.keys(data.weathers).length > 0 ? (
<span
className={styles.weatcher}
style={{
borderLeft:
data.stations.length === 0 ? '0px' : '1px solid #aaaaaa',
}}
>
<img src={data.weathers && data.weathers.icon} />
<span>{data.weathers && data.weathers.text}</span>
</span>
) : null}
</div>
</Spin>
</>
);
};
const BasicLayout = props => {
/* eslint-disable no-unused-vars */
// const [currentRoutes, setCurrentRoutes] = useState([]);
const [collapse, setCollapse] = useState(false);
const [toggleSystem, setToggleSystem] = useState(false);
const [loading, setLoading] = useState(true);
const [cityData, setCityData] = useState({});
const [pageLoading, setPageLoading] = useState(true);
const [siteLoading, setSiteLoading] = useState(false);
const [complexCollapsed, setComplexCollapsed] = useState(false);
const [selectIndex, setSelectIndex] = useState(-1);
const [childrenRoutes, setChildrenRoutes] = useState([])
const [selectedKeys, setSelectedKeys] = useState([])
const isMounted = useMountedState();
const [siteAction, setSiteAction] = useState(
() => new Site(props, setSiteLoading),
);
const history = useHistory();
const currentRoutes = props.route.routes[props.currentMenuIndex];
useEffect(() => {
const initSelectRoute = findPathByLeafId(
`${props.location.pathname}`,
[currentRoutes],
'',
'path',
true,
);
const parentMenuName = initSelectRoute && initSelectRoute.parent.label;
if(parentMenuName) {
let currentChildrenRoute = currentRoutes.routes.find(item => item.name === parentMenuName);
if(!currentChildrenRoute) {
currentChildrenRoute = initSelectRoute
}
let childrenName = currentChildrenRoute ? currentChildrenRoute.name: parentMenuName;
const initSelectIndex = currentRoutes.routes.findIndex(item => item.name === childrenName);
setSelectIndex(initSelectIndex);
currentChildrenRoute && currentChildrenRoute.routes ? setChildrenRoutes(currentChildrenRoute.routes): setChildrenRoutes([currentChildrenRoute])
} else {
setChildrenRoutes([
{
icon: <HomeIcon/>,
path: props.location.pathname,
name: '首页'
}
])
}
}, []);
useEffect(() => {
siteAction.setGlobalConfig(props.global);
if (!Cookies.get('token')) {
history.replace(`/user/login?client=${props.global.get('client')}`);
props.logout();
return;
}
if (
props.global &&
props.global.userInfo &&
props.global.userInfo.token !== null &&
props.global.userInfo.loginName &&
Object.keys(cityData).length === 0
) {
siteAction.getCityStationsForUser().then(res => {
setCityData(res);
});
}
}, [props.global]);
// setChildrenRoutes(currentChildrenRoute)
window.share.event.on('goHome', url => {
setChildrenRoutes([
{
icon: <HomeIcon/>,
path: url,
name: '首页'
}
])
})
const handlerSecond = (item, index) => {
let current = void 0;
if(item && item.routes) {
setChildrenRoutes(item.routes);
current = item.routes[0];
} else{
setChildrenRoutes([item]);
current = item;
}
window.history.pushState(null, '', `/civbase${current.path}`);
setSelectIndex(index);
}
const handleToggleSystem = () => {
setToggleSystem(!toggleSystem);
}
const handleUpdateCurrentIndex = index => {
props.updateCurrentIndex(index);
window.share && window.share.event.emit('trigger:updateMenuIndex', index);
store.set('updateMenuIndex', index);
}
const handleSelectMenuItem = (item) => {
if(item.indexOf('web_console') === -1) {
window.history.pushState(null, '', `/civbase${item}`);
}
}
const handlerSelectMenu = ({ item, key, keyPath, domEvent }) => {
setSelectedKeys([key]);
window.history.pushState(null, '', `/civbase${key}`);
}
const renderChildrenMenu = (route) => {
const routes = (route.routes || []).map(item => {
item.key = item.href;
return item;
});
const menu = (
<Menu onClick={handlerSelectMenu} selectedKeys={selectedKeys}>
{
(routes || []).map((item, index) => {
return (
<>
<Menu.Item key={item.href}>
<div>
<span></span>
<span>{item.name}</span>
</div>
</Menu.Item>
<Divider style={{width: '80%', minWidth: '80%', margin: '0 auto'}}></Divider>
</>
)
})
}
</Menu>
)
return (
<Dropdown overlay={menu} overlayClassName="ant-dropdown-custom-menu">
<div>
<ReactSVG src={route.extData.icon} style={{width: '18px', height: '18px', position: 'relative', top: '-3px'}}/>
<span style={{marginLeft: '8px'}}>{route.name} </span>
<DownOutlined style={{position: 'relative', right: '-10px'}}/>
</div>
</Dropdown>
)
}
return (
<SecurityLayout loading>
{collapse && props.global.loginTemplate === '新春 - 智联.html' ? null : (
props.global.loginTemplate === '新春 - 智联.html' && (
<img
src="https://panda-water.com/web4/assets/images/%E6%96%B0%E5%B9%B4%E4%B8%BB%E9%A2%98/%E6%96%B0%E5%B9%B4%E5%BF%AB%E4%B9%90.gif"
style={{
width: '120px',
position: 'absolute',
bottom: '40px',
zIndex: 500,
left: '12px',
}}
/>)
)}
<div className={layoutStyles.basicLayout}>
<div className={layoutStyles['layout-has-slider']} style={{minHeight: '100%'}}>
<div style={{
width: '100px',
overflow: 'hidden',
flex: '0 0 100px',
maxWidth: '100px',
minWidth: '100px',
transition: 'background-color 0.3s ease 0s, min-width 0.3s ease 0s, max-width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) 0s'
}}></div>
<aside className={`${layoutStyles.layoutSlider} ${layoutStyles.fixed}`}>
<div className={layoutStyles['layout-slider-childern']}>
<div className={layoutStyles.sliderMenu}>
<ul className="menu" style={{minHeight: '0px', marginBottom: '0px'}}>
<li className={classNames('menu-item')} onClick={handleToggleSystem}>
<a>
<img src={currentRoutes && currentRoutes.extData && currentRoutes.extData.icon}/>
<span>{currentRoutes && currentRoutes.name}</span>
</a>
</li>
</ul>
<div className={layoutStyles.splitLine}></div>
<ul className="menu menu-vertical">
{
currentRoutes && (currentRoutes.routes || []).map((item, index) => {
return (
<>
<li className={classNames("menu-item", { [layoutStyles['active']]: index === selectIndex })} onClick={() => handlerSecond(item, index)}>
<a>
<img src={item.extData.icon}/>
<span>{item.name}</span>
</a>
</li>
<Divider style={{border: '1px solid rgb(49, 53, 62, 0.3)', margin: '0 auto', minWidth: '80%', width: '80%'}}/>
</>
)
})
}
</ul>
</div>
</div>
</aside>
<div className={layoutStyles.layout}>
<Panel
visible={toggleSystem}
keyboard
onClose={ () => setToggleSystem(false)}
currentMenuIndex={props.currentMenuIndex}
onChange={index => handleUpdateCurrentIndex(index)}
data={props.route.routes || []}
/>
<div className={layoutStyles['basicLayout-content']}>
<div className={layoutStyles['ant-page-container']} style={{paddingTop: '46px'}}>
<div className={layoutStyles['ant-pro-page-container-warp']}>
<div className={layoutStyles['ant-page-header']} style={{position: 'fixed'}}>
<img src={require('../assets/basic/图层 998@2x.png')} style={{width: '100%'}}/>
<div className={layoutStyles.header}>
<a class={layoutStyles.logo}>
<img src="https://panda-water.com/web4/assets/images/logo/单独图案-白色.svg" alt="logo"/>
</a>
<div className={layoutStyles.title}>智慧水务GCK平台</div>
<RightContent/>
</div>
</div>
</div>
<div className={layoutStyles['menu-item-children']}>
<Tabs defaultActiveKey="1" tabBarGutter={30} onTabClick={(event) => handleSelectMenuItem(event)}>
{childrenRoutes.map((item, index) => (
<>
<TabPane
className="only-last-children"
tab={
<>
{
item.routes ? renderChildrenMenu(item) : (
<>
{
item.icon ? item.icon: <ReactSVG src={item.extData.icon} style={{width: '18px', height: '18px'}}/>
}
<span className={layoutStyles['menu-item-name']}>{item.name}</span>
</>
)
}
</>
}
key={item.path}
disabled={index === 28}>
</TabPane>
</>
))}
</Tabs>
</div>
<div className="ant-pro-grid-content">
<div className="ant-pro-grid-content-children">
<div className="ant-pro-page-container-children-content">
<div id="micro-container" className="subapp-container" style={{height: '92vh', marginTop: '70px', position: 'relative'}}/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</SecurityLayout>
);
};
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
settings: state.getIn(['global', 'defaultSetting']),
collapsed: state.getIn(['global', 'collapsed']),
menu: state.getIn(['global', 'menu']),
currentMenuIndex: state.getIn(['global', 'currentMenuIndex']),
flatMenu: state.getIn(['global', 'flatMenu']),
authValidate: state.getIn(['global', 'authValidate']),
pathname: state.getIn(['global', 'pathname']),
selectedKeys: state.getIn(['global', 'selectedKeys']),
openKeys: state.getIn(['global', 'openKeys']),
complexConfig: state.getIn(['global', 'complexConfig']),
complexPathName: state.getIn(['global', 'complexPathName']),
microMounted: state.getIn(['global', 'microMounted']),
});
const mapDispatchToProps = dispatch => ({
updageSetting(setting) {
dispatch(actionCreators.updageSetting(setting));
},
updateConfig(config) {
dispatch(actionCreators.getConfig(config));
},
updateCurrentIndex(index) {
dispatch(actionCreators.updateCurrentIndex(index));
},
updateCollapsed(collapsed) {
dispatch(actionCreators.updateCollapsed(collapsed));
},
updateAuthValidate(auth) {
dispatch(actionCreators.updateAuthValidate(auth));
},
updatePathname(pathname) {
dispatch(actionCreators.updatePathname(pathname));
},
updateSelectedKeys(keys) {
dispatch(actionCreators.updateSelectedKeys(keys));
},
updateOpenKeys(keys) {
dispatch(actionCreators.updateOpenKeys(keys));
},
updateComplexConfig(config) {
dispatch(actionCreators.updateComplexConfig(config));
},
updateComplexPathName(pathname) {
dispatch(actionCreators.updateComplexPathName(pathname));
},
logout() {
dispatch(actionCreators.logout());
}
});
export default connect(
mapStateToProps,
mapDispatchToProps,
)(BasicLayout);
import LoadingComponent from '@ant-design/pro-layout/es/PageLoading';
import { dynamic } from '@wisdom-utils/runtime';
import BasicLayout from '../layouts/BasicLayout';
import BasicLayout from '../layouts/BasicLayout1';
import UserLayout from '../layouts/UserLayout';
import BootPage from '../pages/bootpage';
import Login from '../pages/user/login';
......
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