Commit c99279fd by huangqy

适配

parent a01ffe8e
......@@ -10,8 +10,10 @@
"dependencies": {
"@babel/core": "^7.17.7",
"@babel/preset-env": "^7.16.11",
"@jiaminghi/data-view": "^2.7.3",
"@jiaminghi/data-view": "^2.10.0",
"@types/echarts": "^4.4.3",
"autofit.js": "^3.1.0",
"axios": "^0.21.0",
"core-js": "^3.6.4",
"echarts": "^4.6.0",
"vue": "^2.6.11",
......@@ -26,6 +28,8 @@
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.1.2",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
......@@ -1671,9 +1675,9 @@
}
},
"node_modules/@jiaminghi/data-view": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/@jiaminghi/data-view/-/data-view-2.7.3.tgz",
"integrity": "sha512-3dxFJkaGKogUMzAkJBBMOvD9sXGFwHNByyM7IiLBSO8Hb0a5Aa6IQ8cfu+0X2r+irLw2Ty5KDmoarc9GTxfHoQ==",
"version": "2.10.0",
"resolved": "https://registry.npmmirror.com/@jiaminghi/data-view/-/data-view-2.10.0.tgz",
"integrity": "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA==",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/charts": "*"
......@@ -2970,6 +2974,11 @@
"node": ">= 4.5.0"
}
},
"node_modules/autofit.js": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/autofit.js/-/autofit.js-3.1.0.tgz",
"integrity": "sha512-zX/2VbpxdDcgDDCT1A0psuF8Phs8QbmFXstvLkqrrOcv33LQttCh2J6GVs84585+LfMAfacemxRXIidrFXu02g=="
},
"node_modules/autoprefixer": {
"version": "9.7.4",
"resolved": "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fautoprefixer%2Fdownload%2Fautoprefixer-9.7.4.tgz",
......@@ -3006,6 +3015,14 @@
"integrity": "sha1-fjPY99RJs/ZzzXLeuavcVS2+Uo4=",
"dev": true
},
"node_modules/axios": {
"version": "0.21.4",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dependencies": {
"follow-redirects": "^1.14.0"
}
},
"node_modules/babel-eslint": {
"version": "10.1.0",
"resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz?cache=0&sync_timestamp=1582676223200&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-eslint%2Fdownload%2Fbabel-eslint-10.1.0.tgz",
......@@ -4336,6 +4353,15 @@
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
"dev": true
},
"node_modules/copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"dependencies": {
"is-what": "^3.14.1"
}
},
"node_modules/copy-concurrently": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz",
......@@ -6670,25 +6696,16 @@
}
},
"node_modules/follow-redirects": {
"version": "1.10.0",
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.10.0.tgz?cache=0&sync_timestamp=1580082237027&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.10.0.tgz",
"integrity": "sha1-AfUmOu6SHGpU+5Fmfwj0FVzhaes=",
"dev": true,
"dependencies": {
"debug": "^3.0.0"
},
"version": "1.15.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.0.tgz",
"integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==",
"engines": {
"node": ">=4.0"
}
},
"node_modules/follow-redirects/node_modules/debug": {
"version": "3.2.6",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz",
"integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=",
"deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
"dev": true,
"dependencies": {
"ms": "^2.1.1"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/for-in": {
......@@ -8188,6 +8205,19 @@
"node": ">= 4"
}
},
"node_modules/image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==",
"dev": true,
"optional": true,
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/import-cwd": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz",
......@@ -8737,6 +8767,12 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
"node_modules/is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true
},
"node_modules/is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz",
......@@ -8998,6 +9034,81 @@
"node": ">=6"
}
},
"node_modules/less": {
"version": "3.13.1",
"resolved": "https://registry.npmmirror.com/less/-/less-3.13.1.tgz",
"integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==",
"dev": true,
"dependencies": {
"copy-anything": "^2.0.1",
"tslib": "^1.10.0"
},
"bin": {
"lessc": "bin/lessc"
},
"engines": {
"node": ">=6"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"native-request": "^1.0.5",
"source-map": "~0.6.0"
}
},
"node_modules/less-loader": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/less-loader/-/less-loader-5.0.0.tgz",
"integrity": "sha512-bquCU89mO/yWLaUq0Clk7qCsKhsF/TZpJUzETRvJa9KSVEL9SO3ovCvdEHISBhrC81OwC8QSVX7E0bzElZj9cg==",
"dev": true,
"dependencies": {
"clone": "^2.1.1",
"loader-utils": "^1.1.0",
"pify": "^4.0.1"
},
"engines": {
"node": ">= 4.8.0"
},
"peerDependencies": {
"less": "^2.3.1 || ^3.0.0",
"webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
}
},
"node_modules/less-loader/node_modules/clone": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true,
"engines": {
"node": ">=0.8"
}
},
"node_modules/less/node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/less/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/levn": {
"version": "0.3.0",
"resolved": "https://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz",
......@@ -9731,6 +9842,13 @@
"node": ">=0.10.0"
}
},
"node_modules/native-request": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/native-request/-/native-request-1.1.0.tgz",
"integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==",
"dev": true,
"optional": true
},
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz",
......@@ -15935,9 +16053,9 @@
}
},
"@jiaminghi/data-view": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/@jiaminghi/data-view/-/data-view-2.7.3.tgz",
"integrity": "sha512-3dxFJkaGKogUMzAkJBBMOvD9sXGFwHNByyM7IiLBSO8Hb0a5Aa6IQ8cfu+0X2r+irLw2Ty5KDmoarc9GTxfHoQ==",
"version": "2.10.0",
"resolved": "https://registry.npmmirror.com/@jiaminghi/data-view/-/data-view-2.10.0.tgz",
"integrity": "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA==",
"requires": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/charts": "*"
......@@ -17022,6 +17140,11 @@
"integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=",
"dev": true
},
"autofit.js": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/autofit.js/-/autofit.js-3.1.0.tgz",
"integrity": "sha512-zX/2VbpxdDcgDDCT1A0psuF8Phs8QbmFXstvLkqrrOcv33LQttCh2J6GVs84585+LfMAfacemxRXIidrFXu02g=="
},
"autoprefixer": {
"version": "9.7.4",
"resolved": "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fautoprefixer%2Fdownload%2Fautoprefixer-9.7.4.tgz",
......@@ -17049,6 +17172,14 @@
"integrity": "sha1-fjPY99RJs/ZzzXLeuavcVS2+Uo4=",
"dev": true
},
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.14.0"
}
},
"babel-eslint": {
"version": "10.1.0",
"resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz?cache=0&sync_timestamp=1582676223200&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-eslint%2Fdownload%2Fbabel-eslint-10.1.0.tgz",
......@@ -18175,6 +18306,15 @@
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
"dev": true
},
"copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"requires": {
"is-what": "^3.14.1"
}
},
"copy-concurrently": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz",
......@@ -20095,24 +20235,9 @@
}
},
"follow-redirects": {
"version": "1.10.0",
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.10.0.tgz?cache=0&sync_timestamp=1580082237027&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.10.0.tgz",
"integrity": "sha1-AfUmOu6SHGpU+5Fmfwj0FVzhaes=",
"dev": true,
"requires": {
"debug": "^3.0.0"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz",
"integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
}
}
"version": "1.15.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.0.tgz",
"integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ=="
},
"for-in": {
"version": "1.0.2",
......@@ -21382,6 +21507,13 @@
"integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=",
"dev": true
},
"image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==",
"dev": true,
"optional": true
},
"import-cwd": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz",
......@@ -21814,6 +21946,12 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
"is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true
},
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz",
......@@ -22029,6 +22167,58 @@
"invert-kv": "^2.0.0"
}
},
"less": {
"version": "3.13.1",
"resolved": "https://registry.npmmirror.com/less/-/less-3.13.1.tgz",
"integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==",
"dev": true,
"requires": {
"copy-anything": "^2.0.1",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"native-request": "^1.0.5",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
},
"dependencies": {
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true
}
}
},
"less-loader": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/less-loader/-/less-loader-5.0.0.tgz",
"integrity": "sha512-bquCU89mO/yWLaUq0Clk7qCsKhsF/TZpJUzETRvJa9KSVEL9SO3ovCvdEHISBhrC81OwC8QSVX7E0bzElZj9cg==",
"dev": true,
"requires": {
"clone": "^2.1.1",
"loader-utils": "^1.1.0",
"pify": "^4.0.1"
},
"dependencies": {
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true
}
}
},
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz",
......@@ -22648,6 +22838,13 @@
"to-regex": "^3.0.1"
}
},
"native-request": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/native-request/-/native-request-1.1.0.tgz",
"integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==",
"dev": true,
"optional": true
},
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz",
......
......@@ -12,9 +12,10 @@
"@babel/preset-env": "^7.16.11",
"@jiaminghi/data-view": "^2.10.0",
"@types/echarts": "^4.4.3",
"autofit.js": "^3.1.0",
"axios": "^0.21.0",
"core-js": "^3.6.4",
"echarts": "^4.6.0",
"axios": "^0.21.0",
"vue": "^2.6.11",
"vue-awesome": "^4.0.2",
"vue-router": "^3.1.5",
......
......@@ -13,8 +13,14 @@
window._CONFIG['isLTK'] = true
</script>
<script>
// app.vue
// 解决Echarts dataZoom无法识别window触屏设备的bug
window.ontouchstart = (e) => {
e.preventDefault()
}
let s = true
document.onclick = function () {
document.ondblclick = function () {
s = !s
if (s) {
document.body.requestFullscreen()
......@@ -22,7 +28,7 @@
document.exitFullscreen();
}
}
document.onclick()
document.ondblclick()
</script>
</head>
......
......@@ -9,6 +9,9 @@ body {
margin: 0;
}
#app {
width: 100vw;
height: 100vh;
background-color: #03050C;
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
......
#index {
.scale-wrap {
color: #d3d6dd;
background-color: #000000;
width: 100%;
height: 100%;
width: 1920px;
height: 1080px;
overflow: hidden;
.bg {
width: 100%;
height: 100%;
padding: 0.2rem 0.2rem 0 0.2rem;
background-image: url("../assets/pageBg.png");
background-size: cover;
......@@ -20,6 +22,7 @@
}
.host-body {
height: 100%;
.title {
position: relative;
width: 6.25rem;
......
<template>
<div>
<div id="bottomLeftLine" style="width: 8rem;height: 3rem;"></div>
</div>
<div id="bottomLeftLine" style="width: 100%;height: 90%;"></div>
</template>
<script>
......
<template>
<div>
<div id="bottomRightBar" style="width: 9rem;height: 3rem;"></div>
</div>
<div id="bottomRightBar" style="width: 100%;height: 90%;"></div>
</template>
<script>
......@@ -44,6 +42,36 @@ export default {
color: '#fff'
}
},
dataZoom: [
{
show: true,
type: 'slider',
height: 20,//组件高度
realtime: true,
bottom: '32px',
start: data.aisleList[0].length > 10 ? 10 : 0,
end: data.aisleList[0].length > 10 ? 16 : 50,
moveHandleStyle: {
color: '#6680FF',
borderColor: '#6680FF',
shadowColor: '#6680FF',
opacity: 0,
},
emphasis: {
moveHandleStyle: {
color: '#6680FF',
borderColor: '#6680FF',
shadowColor: '#6680FF',
opacity: 1,
},
handleStyle: {
color: '#6680FF',
borderColor: '#6680FF',
shadowColor: '#6680FF',
},
},
}
],
// toolbox: {
// show: true,
// itemSize: 20,
......
<template>
<div>
<div id="centerChartLine" style="width: 5.2rem;height: 3rem;"></div>
</div>
<div id="centerChartLine" style="width: 100%;height: 45%;"></div>
</template>
<script>
......
<!--
* @Author: wei
* @description: 大屏自适应容器组件
* @LastEditTime: 2022-09-09 16:42:40
-->
<template>
<!-- <section class="screen-box" :style="boxStyle"> -->
<div class="screen-wrapper" ref="screenWrapper" :style="wrapperStyle">
<slot></slot>
</div>
<!-- </section> -->
</template>
<script>
/**
* 防抖函数
* @param {T} fn
* @param {number} delay
* @return
*/
function debounce(fn, delay) {
let timer = null;
return function (...args) {
timer = setTimeout(
() => {
typeof fn === "function" && fn.apply(null, args);
clearTimeout(timer);
},
delay > 0 ? delay : 100
);
};
}
export default {
name: "VScaleScreen",
props: {
width: {
type: [String, Number],
default: 1920,
},
height: {
type: [String, Number],
default: 1080,
},
fullScreen: {
type: Boolean,
default: false,
},
autoScale: {
type: [Object, Boolean],
default: true,
},
selfAdaption: {
type: Boolean,
default: true,
},
delay: {
type: Number,
default: 500,
},
boxStyle: {
type: Object,
default: () => ({}),
},
wrapperStyle: {
type: Object,
default: () => ({}),
},
},
data() {
return {
currentWidth: 0,
currentHeight: 0,
originalWidth: 0,
originalHeight: 0,
onResize: null,
observer: null,
};
},
watch: {
selfAdaption(val) {
if (val) {
this.resize();
this.addListener();
} else {
this.clearListener();
this.clearStyle();
}
},
},
computed: {
screenWrapper() {
return this.$refs["screenWrapper"];
},
},
methods: {
initSize() {
return new Promise((resolve, reject) => {
// console.log("初始化样式");
//给父元素设置 overflow:hidden
this.screenWrapper.parentNode.style.overflow = "hidden";
this.screenWrapper.parentNode.scrollLeft = 0;
this.screenWrapper.parentNode.scrollTop = 0;
this.$nextTick(() => {
// region 获取大屏真实尺寸
if (this.width && this.height) {
this.currentWidth = this.width;
this.currentHeight = this.height;
} else {
this.currentWidth = this.screenWrapper.clientWidth;
this.currentHeight = this.screenWrapper.clientHeight;
}
// endregion
// region 获取画布尺寸
if (!this.originalHeight || !this.originalWidth) {
this.originalWidth = window.screen.width;
this.originalHeight = window.screen.height;
}
// endregion
resolve();
});
});
},
updateSize() {
if (this.currentWidth && this.currentHeight) {
this.screenWrapper.style.width = `${this.currentWidth}px`;
this.screenWrapper.style.height = `${this.currentHeight}px`;
} else {
this.screenWrapper.style.width = `${this.originalWidth}px`;
this.screenWrapper.style.height = `${this.originalHeight}px`;
}
},
handleAutoScale(scale) {
if (!this.autoScale) return;
const screenWrapper = this.screenWrapper;
const domWidth = screenWrapper.clientWidth;
const domHeight = screenWrapper.clientHeight;
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
screenWrapper.style.transform = `scale(${scale},${scale}) `;
let mx = Math.max((currentWidth - domWidth * scale) / 2, 0);
let my = Math.max((currentHeight - domHeight * scale) / 2, 0);
if (typeof this.autoScale === "object") {
// @ts-ignore
!this.autoScale.x && (mx = 0);
// @ts-ignore
!this.autoScale.y && (my = 0);
}
// console.log({
// mx,
// my,
// currentWidth,
// currentHeight,
// domWidth,
// domHeight,
// scale,
// });
this.screenWrapper.style.margin = `${my}px ${mx}px`;
},
updateScale() {
const screenWrapper = this.screenWrapper;
// 获取真实视口尺寸
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
// 获取大屏最终的宽高onResize
const realWidth = this.currentWidth || this.originalWidth;
const realHeight = this.currentHeight || this.originalHeight;
// 计算缩放比例
const widthScale = currentWidth / realWidth;
const heightScale = currentHeight / realHeight;
// console.log({currentWidth, currentHeight,realWidth,realHeight});
// 若要铺满全屏,则按照各自比例缩放
if (this.fullScreen) {
screenWrapper.style.transform = `scale(${widthScale},${heightScale})`;
return false;
}
// 按照宽高最小比例进行缩放
const scale = Math.min(widthScale, heightScale);
this.handleAutoScale(scale);
},
initMutationObserver() {
const screenWrapper = this.screenWrapper;
const observer = (this.observer = new MutationObserver(() => {
this.onResize();
}));
observer.observe(screenWrapper, {
attributes: true,
attributeFilter: ["style"],
attributeOldValue: true,
});
},
clearListener() {
window.removeEventListener("resize", this.onResize);
},
addListener() {
window.addEventListener("resize", this.onResize);
},
clearStyle() {
// console.log("清除");
const screenWrapper = this.screenWrapper;
screenWrapper.parentNode.style.overflow = "auto";
screenWrapper.style = "";
},
async resize() {
if (!this.selfAdaption) {
return;
}
await this.initSize();
this.updateSize();
this.updateScale();
},
},
mounted() {
this.onResize = debounce(() => {
this.resize();
}, this.delay);
this.$nextTick(() => {
if (this.selfAdaption) {
this.resize();
this.addListener();
}
});
},
beforeDestroy() {
this.clearListener();
// this.observer.disconnect()
},
};
//
</script>
<style scoped>
.screen-box {
overflow: hidden;
background-size: 100% 100%;
background: #000;
width: 100vw;
height: 100vh;
}
.screen-wrapper {
transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 500ms;
position: relative;
overflow: hidden;
z-index: 100;
transform-origin: left top;
}
</style>
......@@ -7,7 +7,7 @@ let apiBaseUrl = window._CONFIG['domianURL'] || '/'
const request = axios.create({
// API 请求的默认前缀
baseURL: apiBaseUrl,
timeout: 3000 // 请求超时时间
timeout: 30000 // 请求超时时间
})
......
<template>
<div class="bottom-charts">
<div>
<div style="flex:1">
<div class="d-flex pt-2 pl-2">
<span style="color:#5cd9e8">
<icon name="chart-bar"></icon>
......@@ -9,12 +9,10 @@
<span class="fs-xl text mx-2 headerTitle">近一月收发物资统计</span>
</div>
</div>
<div class="bottom-charts-left">
<bottomLeftLine ref="bll"/>
</div>
<bottomLeftLine ref="bll"/>
</div>
<dv-decoration-2 style="height: 3rem;width: 5px;" :reverse="true"/>
<div>
<div style="flex:1;height: 100%;">
<div class="d-flex pt-2 pl-2">
<span style="color:#5cd9e8">
<icon name="chart-bar"></icon>
......@@ -23,9 +21,7 @@
<span class="fs-xl text mx-2 headerTitle">区域垛位状态统计</span>
</div>
</div>
<div class="bottom-charts-right">
<bottomRightBar ref="brb" />
</div>
<bottomRightBar ref="brb" />
</div>
</div>
......
......@@ -9,7 +9,7 @@
<span class="fs-xl text mx-2 headerTitle">发物计划列表</span>
</div>
</div>
<dv-scroll-board :config="config" style="width: 5.1rem;height: 4.44rem;margin-top: 10px;" />
<dv-scroll-board :config="config" style="width: 100%;height: 4.44rem;margin-top: 10px;" />
</div>
</div>
</template>
......@@ -62,7 +62,7 @@ export default {
oddRowBGC: "rgb(15,47,130, 0.5)", //奇数行
evenRowBGC: "rgb(5,19,104, 0.5)", //偶数行
columnWidth: [120, 150,150, 100, 150],
align: ["center"]
align: ["left", "left"]
}
})
}
......
......@@ -9,37 +9,37 @@
<div class="item" style="height: 1.6rem;margin-top: 0.2rem;">
<span style="font-size: 0.3875rem;display: block;">本年度收发总数</span>
<div style="display: flex;">
<span style="font-size: 0.3875rem;margin-top: 55px;display: block;width: 20%;text-align: center;">收物:</span>
<span style="font-size: 0.3875rem;margin-top: 0.7rem;display: block;width: 20%;text-align: center;">收物:</span>
<dv-digital-flop :config="inAmount" style="height:1.625rem;width: 30%" />
<span style="font-size: 0.3875rem;margin-top: 55px;display: block;width: 20%;text-align: center;">发物:</span>
<span style="font-size: 0.3875rem;margin-top: 0.7rem;display: block;width: 20%;text-align: center;">发物:</span>
<dv-digital-flop :config="outAmount" style="height:1.625rem;width: 30%" />
</div>
</div>
</div>
<div class="extra">
<div class="item">
<span style="font-size: 0.3rem;">垛位总数</span>
<span style="margin-left: 38px;color: #03a9f4;font-size: 0.32rem;font-weight: 700;">{{ rackAmount }}</span>
<div class="item" style="height: 100%;display: flex;justify-content: center;align-items: center;">
<div style="height: 100%;width: 50%;">垛位总数</div>
<div style="color: #03a9f4;font-weight: 700;height: 100%;width: 50%;margin-left: 2.5rem;font-size: 0.35rem;">{{ rackAmount }}</div>
</div>
</div>
<div class="down">
<div class="leftNm">
<div class="leftNm" style="flex:0.8">
<div class="item">
<span>工作垛位</span>
<span style="margin-left: 55px;font-size: 0.25rem;color: #03a9f4;">{{ workRackAmount }}</span>
<span style="margin-left: 55px;font-size: 0.35rem;color: #03a9f4;">{{ workRackAmount }}</span>
</div>
<div class="item">
<span>有货垛位</span>
<span style="margin-left: 55px;font-size: 0.25rem;color: #03a9f4;">{{ usedRackAmount }}</span>
<span style="margin-left: 55px;font-size: 0.35rem;color: #03a9f4;">{{ usedRackAmount }}</span>
</div>
<div class="item">
<span>无货垛位</span>
<span style="margin-left: 55px;font-size: 0.25rem;color: #03a9f4;">{{ nullRackAmount }}</span>
<span style="margin-left: 55px;font-size: 0.35rem;color: #03a9f4;">{{ nullRackAmount }}</span>
</div>
</div>
<div class="percent">
<dv-active-ring-chart :config="config" style="width: 3.775rem;height: 3.775rem;margin-left: -20px;margin-top: -45px;" />
<div class="percent" style="flex:1.2">
<dv-active-ring-chart :config="config" style="width: 100%;height: 100%;" />
</div>
</div>
</div>
......@@ -90,7 +90,7 @@ export default {
number: [res.data.stockVo.inAmount],
content: "{nt}件",
style: {
fontSize: 30,
fontSize: 20,
fill: '#3de7c9'
}
}
......@@ -98,7 +98,7 @@ export default {
number: [res.data.stockVo.outAmount],
content: "{nt}件",
style: {
fontSize: 30,
fontSize: 20,
fill: '#3de7c9'
}
}
......@@ -121,9 +121,9 @@ export default {
value: this.nullRackAmount
}
],
lineWidth: 40,
lineWidth: 30,
digitalFlopStyle: {
fontSize: 20
fontSize: 16
},
showOriginValue: true,
animationFrame: 10,
......@@ -154,13 +154,12 @@ export default {
width: 100%;
display: flex;
flex-wrap: wrap;
height: 0.6rem;
.item {
width: 100%;
// height: 15%;
span {
// font-size: 0.25rem;
line-height: 0.6rem;
div {
font-size: 0.3rem;
line-height: 30px;
margin-left: 0.14rem;
}
}
......@@ -168,8 +167,8 @@ export default {
.down {
width: 100%;
display: flex;
height: 2.6rem;
justify-content: space-between;
flex-grow: 1;
.bg-color-black {
border-radius: 0.0625rem;
}
......@@ -178,7 +177,6 @@ export default {
}
}
.leftNm {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
......
......@@ -9,7 +9,7 @@
<span class="fs-xl text mx-2 headerTitle">收物计划列表</span>
</div>
</div>
<dv-scroll-board :config="config" style="width: 5.1rem;height: 4.44rem;margin-top: 10px;" />
<dv-scroll-board :config="config" style="width: 100%;height: 4.44rem;margin-top: 10px;" />
<dv-decoration-2 style="height:10px;" />
</div>
</div>
......@@ -63,7 +63,7 @@ export default {
oddRowBGC: "rgb(15,47,130, 0.5)", //奇数行
evenRowBGC: "rgb(5,19,104, 0.5)", //偶数行
columnWidth: [120, 150,150, 100, 150],
align: ["center"]
align: ["left", "left"]
}
})
}
......
......@@ -15,7 +15,7 @@
<dv-water-level-pond :config="water1" style="width: 1.5rem;height: 1.5rem;margin-left: 30px;" />
</div>
</div>
<div class="percent">
<div class="percent" style="margin-top: 10px;">
<div class="poItem">
<span v-if="currentData && currentData.length > 0">{{ currentData.length == 1 ? currentData[0].name : currentData[1].name}}</span>
</div>
......
......@@ -10,7 +10,7 @@
</div>
</div>
<div class="d-flex jc-center body-box">
<dv-scroll-board :config="config" style="width: 4.6rem;height: 3.2rem"/>
<dv-scroll-board :config="config" style="width: 100%;height: 3.2rem"/>
</div>
</div>
<dv-decoration-2 style="height:10px;" />
......
......@@ -7,7 +7,7 @@
</span>
<span class="fs-xl text mx-2 headerTitle">库内物资排行</span>
</div>
<dv-capsule-chart :config="config" style="width: 4.2rem;height: 3.4rem" />
<dv-capsule-chart :config="config" style="width: 90%;height: 3.4rem" />
</div>
</div>
</template>
......
<template>
<div id="index">
<dv-full-screen-container class="bg">
<dv-loading v-if="loading">加载中...</dv-loading>
<div v-else class="host-body">
<div class="d-flex jc-center">
<dv-decoration-10 style="width:33.3%;height:.0425rem;" :color="['#568aea', '#131E88']"/>
<ScaleScreen
:width="1920"
:height="1080"
:selfAdaption="true"
class="scale-wrap">
<div class="bg">
<dv-loading v-if="loading">Loading...</dv-loading>
<div v-else class="host-body">
<div class="d-flex jc-center">
<dv-decoration-8 :color="['#568aea', '#131E88']" style="width:2.5rem;height:.425rem;" />
<div class="title">
<span class="title-text">{{ storeName }}监控平台</span>
<dv-decoration-10 style="width:33.3%;height:.0425rem;" :color="['#568aea', '#131E88']"/>
<div class="d-flex jc-center">
<dv-decoration-8 :color="['#568aea', '#131E88']" style="width:2.5rem;height:.425rem;" />
<div class="title">
<span class="title-text">{{ storeName }}监控平台</span>
</div>
<dv-decoration-8
:reverse="true"
:color="['#568aea', '#131E88']"
style="width:2.5rem;height:.425rem;"
/>
</div>
<dv-decoration-8
:reverse="true"
:color="['#568aea', '#131E88']"
style="width:2.5rem;height:.425rem;"
/>
<dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" :color="['#568aea', '#131E88']"/>
</div>
<div class="d-flex jc-center">
<dv-decoration-5 style="width: 500px;height: 30px;margin-bottom: 5px;" :color="['#568aea', '#131E88']"/>
</div>
<dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" :color="['#568aea', '#131E88']"/>
</div>
<div class="d-flex jc-center">
<dv-decoration-5 style="width: 500px;height: 30px;margin-bottom: 5px;" :color="['#568aea', '#131E88']"/>
</div>
<dv-border-box-1 class="main-container">
<dv-border-box-10 class="left-chart-container">
<div style="cursor: pointer;font-size: 0.5rem;width: 5.1rem;height: 1.225rem;line-height: 0.645rem; text-align: center;">
<span class="react-before"></span>
<span class="text" style="display: block;">{{dateYear}}</span>
<span class="text" style="display: block;">{{dateDay}}</span>
</div>
<dv-decoration-2 style="height:10px;" />
<centerLeft1 />
<bottomLeft />
</dv-border-box-10>
<div class="right-main-container">
<div class="rmc-top-container">
<dv-border-box-11 title="库内物资">
<center/>
</dv-border-box-11>
<dv-border-box-11 title="库内温湿度">
<centerLeft2/>
</dv-border-box-11>
<div class="rmctc-right-container">
<dv-border-box-10 class="rmctc-chart-1">
<centerRight1 />
<centerRight2 />
</dv-border-box-10>
<dv-border-box-1 class="main-container">
<dv-border-box-10 class="left-chart-container">
<div style="cursor: pointer;font-size: 0.5rem;width: 5.1rem;height: 1.225rem;line-height: 0.645rem; text-align: center;">
<span class="react-before"></span>
<span class="text" style="display: block;">{{dateYear}}</span>
<span class="text" style="display: block;">{{dateDay}}</span>
</div>
</div>
<dv-border-box-10 class="rmc-bottom-container">
<Bottom-Charts />
<dv-decoration-2 style="height:10px;" />
<centerLeft1 />
<bottomLeft />
</dv-border-box-10>
</div>
</dv-border-box-1>
<div class="right-main-container">
<div class="rmc-top-container">
<dv-border-box-11 title="库内物资" style="flex:1">
<center />
</dv-border-box-11>
<dv-border-box-11 title="库内温湿度" style="flex:1">
<centerLeft2/>
</dv-border-box-11>
<div class="rmctc-right-container" style="flex:1">
<dv-border-box-10 class="rmctc-chart-1">
<centerRight1 />
<centerRight2 />
</dv-border-box-10>
</div>
</div>
<dv-border-box-10 class="rmc-bottom-container">
<Bottom-Charts />
</dv-border-box-10>
</div>
</dv-border-box-1>
</div>
</dv-full-screen-container>
</div>
</div>
</ScaleScreen>
</template>
<script>
......@@ -75,7 +79,8 @@ import bottomLeft from "./bottomLeft";
import bottomRight from "./bottomRight";
import BottomCharts from "./BottomCharts"
import centerChartBar from "../components/echart/center/centerChartBar"
import { postAction } from '@/api/manage'
import { postAction,getAction } from '@/api/manage'
import ScaleScreen from '../components/scale-screen/scale-screen.vue'
export default {
data () {
return {
......@@ -83,6 +88,7 @@ export default {
dateDay: null,
dateYear: null,
dateWeek: null,
date: '',
storeName: '',
weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
};
......@@ -96,7 +102,11 @@ export default {
bottomLeft,
bottomRight,
BottomCharts,
centerChartBar
centerChartBar,
ScaleScreen
},
created() {
this.getSysTime()
},
mounted () {
this.timeFn();
......@@ -104,6 +114,11 @@ export default {
this.getStoreName()
},
methods: {
getSysTime() {
getAction('/sys/getTimeNow',{}).then(res => {
this.date = res.data
})
},
getStoreName() {
postAction('/store/list', {}).then(res => {
let storeCode = this.$route.query.storeCode
......@@ -112,10 +127,12 @@ export default {
},
timeFn () {
setInterval(() => {
this.dateDay = formatTime(new Date(), 'HH: mm: ss');
this.dateYear = formatTime(new Date(), 'yyyy-MM-dd');
this.dateWeek = this.weekday[new Date().getDay()];
this.dateDay = formatTime(new Date(this.date), 'HH: mm: ss');
this.dateYear = formatTime(new Date(this.date), 'yyyy-MM-dd');
this.dateWeek = this.weekday[new Date(this.date).getDay()];
this.date = new Date(this.date).getTime() + 1000
}, 1000)
},
cancelLoading () {
setTimeout(() => {
......@@ -142,8 +159,7 @@ export default {
}
.left-chart-container {
width: 24%;
// padding: 10px;
width: 25%;
box-sizing: border-box;
.border-box-content {
......@@ -152,14 +168,17 @@ export default {
}
.right-main-container {
width: 76%;
padding-left: 5px;
width: 75%;
padding-left: 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.rmc-top-container {
height: 68%;
display: flex;
margin-bottom: 20px;
height: 65%;
}
.rmctc-left-container {
......@@ -167,12 +186,13 @@ export default {
}
.rmctc-right-container {
width: 40%;
height: 99%;
// width: 40%;
// height: 99%;
}
.rmc-bottom-container {
height: 30%;
flex-grow: 1;
height: 35%;
}
.rmcc-top-center-container {
display: flex;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论