Commit e0d095f9 by zhaochengxiang

新增订购品规top10以及上季度趋势图功能

parent 5d1c5833
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
pc:http://localhost:3000/dashboard/3350a29b8fedcfebe3a40e4d12358626 pc:http://localhost:3000/dashboard/3350a29b8fedcfebe3a40e4d12358626
mobile:http://localhost:3000/m/dashboard/3350a29b8fedcfebe3a40e4d12358626 mobile:http://localhost:3000/m/dashboard/3350a29b8fedcfebe3a40e4d12358626
用户id加密方式 AES(加密模式ECB 填充pkcs7padding 密码A930F2C3ACEA7B5B 偏移量B54480C3A296C334)+hex 参考链接:http://tool.chacuo.net/cryptaes 用户id加密方式 AES(加密模式CBC 填充pkcs7padding 密码A930F2C3ACEA7B5B 偏移量B54480C3A296C334)+hex 参考链接:http://tool.chacuo.net/cryptaes
{
"files": {
"main.css": "/static/css/main.50b27b36.chunk.css",
"main.js": "/static/js/main.81045cbd.chunk.js",
"main.js.map": "/static/js/main.81045cbd.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.0667f4b6.js",
"runtime-main.js.map": "/static/js/runtime-main.0667f4b6.js.map",
"static/js/2.de16eafa.chunk.js": "/static/js/2.de16eafa.chunk.js",
"static/js/2.de16eafa.chunk.js.map": "/static/js/2.de16eafa.chunk.js.map",
"static/css/3.29c1ed91.chunk.css": "/static/css/3.29c1ed91.chunk.css",
"static/js/3.ef582e55.chunk.js": "/static/js/3.ef582e55.chunk.js",
"static/js/3.ef582e55.chunk.js.map": "/static/js/3.ef582e55.chunk.js.map",
"static/css/4.d33dd312.chunk.css": "/static/css/4.d33dd312.chunk.css",
"static/js/4.13cfb0bb.chunk.js": "/static/js/4.13cfb0bb.chunk.js",
"static/js/4.13cfb0bb.chunk.js.map": "/static/js/4.13cfb0bb.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.9106251bc04bba4b45625df14181e1ac.js": "/precache-manifest.9106251bc04bba4b45625df14181e1ac.js",
"service-worker.js": "/service-worker.js",
"static/css/3.29c1ed91.chunk.css.map": "/static/css/3.29c1ed91.chunk.css.map",
"static/css/4.d33dd312.chunk.css.map": "/static/css/4.d33dd312.chunk.css.map",
"static/css/main.50b27b36.chunk.css.map": "/static/css/main.50b27b36.chunk.css.map",
"static/js/2.de16eafa.chunk.js.LICENSE.txt": "/static/js/2.de16eafa.chunk.js.LICENSE.txt",
"static/js/3.ef582e55.chunk.js.LICENSE.txt": "/static/js/3.ef582e55.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.0667f4b6.js",
"static/css/3.29c1ed91.chunk.css",
"static/js/3.ef582e55.chunk.js",
"static/css/main.50b27b36.chunk.css",
"static/js/main.81045cbd.chunk.js"
]
}
\ No newline at end of file
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><link href="/static/css/3.29c1ed91.chunk.css" rel="stylesheet"><link href="/static/css/main.50b27b36.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{4:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{2:"31d6cfe0",4:"d33dd312"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(f=u[c]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===n||l===a))return t()}var s=document.getElementsByTagName("style");for(c=0;c<s.length;c++){var f;if((l=(f=s[c]).getAttribute("data-href"))===n||l===a)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],p.parentNode.removeChild(p),r(u)},p.href=a,document.getElementsByTagName("head")[0].appendChild(p)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{2:"de16eafa",4:"13cfb0bb"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(s);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var s=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonphnyc-portrait"]=this["webpackJsonphnyc-portrait"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var f=l;r()}([])</script><script src="/static/js/3.ef582e55.chunk.js"></script><script src="/static/js/main.81045cbd.chunk.js"></script></body></html>
\ No newline at end of file
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "96708130117b8258465b557428c9f755",
"url": "/index.html"
},
{
"revision": "0f5c10ce249551017bd6",
"url": "/static/css/3.29c1ed91.chunk.css"
},
{
"revision": "6f27bed45fdcd7e8169f",
"url": "/static/css/4.d33dd312.chunk.css"
},
{
"revision": "9586ce7a43e9ba1572a6",
"url": "/static/css/main.50b27b36.chunk.css"
},
{
"revision": "a0ccb270ac0fefdb09dd",
"url": "/static/js/2.de16eafa.chunk.js"
},
{
"revision": "f8f0f7c00c9785d1098652d0e8c22958",
"url": "/static/js/2.de16eafa.chunk.js.LICENSE.txt"
},
{
"revision": "0f5c10ce249551017bd6",
"url": "/static/js/3.ef582e55.chunk.js"
},
{
"revision": "5ac48c47bb3912b14c2d8de4f56d5ae8",
"url": "/static/js/3.ef582e55.chunk.js.LICENSE.txt"
},
{
"revision": "6f27bed45fdcd7e8169f",
"url": "/static/js/4.13cfb0bb.chunk.js"
},
{
"revision": "9586ce7a43e9ba1572a6",
"url": "/static/js/main.81045cbd.chunk.js"
},
{
"revision": "717d752c11ac08dc28d6",
"url": "/static/js/runtime-main.0667f4b6.js"
}
]);
\ No newline at end of file
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
importScripts(
"/precache-manifest.9106251bc04bba4b45625df14181e1ac.js"
);
self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});
workbox.core.clientsClaim();
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {
blacklist: [/^\/_/,/\/[^\/?]+\.[^\/]+$/],
});
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
.levelContent{height:40px;display:flex;align-items:center}.levelContent span{text-align:center;width:100%;font-weight:700;font-size:50px;margin-bottom:0}.degreeContent{height:235px;overflow:auto}.radarContent{height:326px}.infoContentItem{padding:20px;font-size:.9rem}
/*# sourceMappingURL=4.d33dd312.chunk.css.map */
\ No newline at end of file
{"version":3,"sources":["Dashboard.css"],"names":[],"mappings":"AAAA,cACE,WAAY,CACZ,YAAa,CACb,kBACF,CAEA,mBACE,iBAAkB,CAClB,UAAW,CACX,eAAiB,CACjB,cAAe,CACf,eACF,CAEA,eACE,YAAa,CACb,aACF,CAEA,cACE,YACF,CAEA,iBACE,YAAa,CACb,eACF","file":"4.d33dd312.chunk.css","sourcesContent":[".levelContent {\n height: 40px;\n display: flex;\n align-items: center;\n}\n\n.levelContent span {\n text-align: center;\n width: 100%;\n font-weight: bold;\n font-size: 50px;\n margin-bottom: 0;\n}\n\n.degreeContent {\n height: 235px;\n overflow: auto;\n}\n\n.radarContent {\n height: 326px;\n}\n\n.infoContentItem {\n padding: 20px;\n font-size:.9rem;\n}"]}
\ No newline at end of file
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#eee}#root,body,html{height:100%}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.text-primary{color:#4091b0!important}.border-bottom{border-bottom-width:1px;border-bottom-style:solid}.border-light{border-color:#eee}.ant-layout{background:#eee}.ant-card{border-radius:10px}
/*# sourceMappingURL=main.50b27b36.chunk.css.map */
\ No newline at end of file
{"version":3,"sources":["index.css","mixins.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCAAkC,CAClC,qBACF,CAEA,gBAGE,WACF,CAEA,KACE,yEAEF,CCnBA,cACE,uBACF,CAEA,eACE,uBAAwB,CACxB,yBACF,CAEA,cACE,iBACF,CAEA,YACE,eACF,CAEA,UACE,kBACF","file":"main.50b27b36.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-color: #eee;\n}\n\nhtml,\nbody,\n#root {\n height: 100%;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".text-primary {\n color: #4091b0 !important;\n}\n\n.border-bottom {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n}\n\n.border-light {\n border-color: #eeeeee;\n}\n\n.ant-layout {\n background: #eee;\n}\n\n.ant-card {\n border-radius: 10px;\n}\n"]}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
/*! Conditions:: INITIAL */
/*! Production:: $accept : expression $end */
/*! Production:: css_value : ANGLE */
/*! Production:: css_value : CHS */
/*! Production:: css_value : EMS */
/*! Production:: css_value : EXS */
/*! Production:: css_value : FREQ */
/*! Production:: css_value : LENGTH */
/*! Production:: css_value : PERCENTAGE */
/*! Production:: css_value : REMS */
/*! Production:: css_value : RES */
/*! Production:: css_value : SUB css_value */
/*! Production:: css_value : TIME */
/*! Production:: css_value : VHS */
/*! Production:: css_value : VMAXS */
/*! Production:: css_value : VMINS */
/*! Production:: css_value : VWS */
/*! Production:: css_variable : CSS_VAR */
/*! Production:: expression : math_expression EOF */
/*! Production:: math_expression : LPAREN math_expression RPAREN */
/*! Production:: math_expression : NESTED_CALC LPAREN math_expression RPAREN */
/*! Production:: math_expression : SUB PREFIX SUB NESTED_CALC LPAREN math_expression RPAREN */
/*! Production:: math_expression : css_value */
/*! Production:: math_expression : css_variable */
/*! Production:: math_expression : math_expression ADD math_expression */
/*! Production:: math_expression : math_expression DIV math_expression */
/*! Production:: math_expression : math_expression MUL math_expression */
/*! Production:: math_expression : math_expression SUB math_expression */
/*! Production:: math_expression : value */
/*! Production:: value : NUMBER */
/*! Production:: value : SUB NUMBER */
/*! Rule:: $ */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)% */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)Hz\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ch\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)cm\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)deg\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpcm\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpi\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dppx\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)em\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ex\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)grad\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)in\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)kHz\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)mm\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ms\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pc\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pt\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)px\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rad\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rem\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)s\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)turn\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vh\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmax\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmin\b */
/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vw\b */
/*! Rule:: ([a-z]+) */
/*! Rule:: (calc) */
/*! Rule:: (var\([^\)]*\)) */
/*! Rule:: - */
/*! Rule:: \( */
/*! Rule:: \) */
/*! Rule:: \* */
/*! Rule:: \+ */
/*! Rule:: \/ */
/*! Rule:: \s+ */
/*! decimal.js-light v2.5.0 https://github.com/MikeMcl/decimal.js-light/LICENCE */
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/** @license React v0.19.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
This source diff could not be displayed because it is too large. You can view the blob instead.
(this["webpackJsonphnyc-portrait"]=this["webpackJsonphnyc-portrait"]||[]).push([[0],{167:function(e,n,t){e.exports=t(378)},373:function(e,n,t){},374:function(e,n,t){},378:function(e,n,t){"use strict";t.r(n);t(168),t(169),t(170),t(171),t(172),t(173),t(174),t(175),t(176),t(177),t(178),t(179),t(180),t(181),t(182),t(183),t(184),t(185),t(186),t(187),t(188),t(189),t(190),t(191),t(192),t(193),t(194),t(67),t(195),t(196),t(197),t(198),t(199),t(200),t(201),t(202),t(203),t(204),t(205),t(206),t(207),t(208),t(209),t(211),t(213),t(214),t(215),t(216),t(217),t(218),t(219),t(220),t(221),t(222),t(223),t(224),t(226),t(227),t(228),t(229),t(230),t(231),t(232),t(233),t(234),t(235),t(236),t(237),t(239),t(240),t(241),t(242),t(243),t(244),t(246),t(248),t(250),t(251),t(252),t(253),t(254),t(255),t(256),t(257),t(258),t(259),t(260),t(261),t(262),t(263),t(264),t(265),t(266),t(267),t(268),t(269),t(271),t(272),t(275),t(276),t(277),t(279),t(280),t(281),t(282),t(283),t(284),t(285),t(286),t(287),t(288),t(289),t(148),t(290),t(291),t(292),t(293),t(294),t(295),t(296),t(151),t(297),t(298),t(299),t(300),t(301),t(302),t(303),t(304),t(305),t(306),t(307),t(308),t(309),t(310),t(311),t(312),t(313),t(314),t(315),t(316),t(317),t(318),t(319),t(320),t(321),t(322),t(324),t(325),t(326),t(327),t(328),t(329),t(330),t(331),t(332),t(333),t(334),t(335),t(336),t(337),t(338),t(339),t(340),t(341),t(342),t(343),t(344),t(345),t(346),t(347),t(348),t(349),t(350),t(351),t(352),t(353),t(354),t(355),t(356),t(357),t(358),t(359),t(360),t(361),t(362),t(363),t(366),t(159),t(367);var a=t(1),o=t.n(a),r=t(108),c=t.n(r),i=t(107),l=t(163);t(372),t(373),t(374),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var s=Object(a.lazy)((function(){return Promise.all([t.e(2),t.e(4)]).then(t.bind(null,1664))})),u=o.a.createElement(i.a,{locale:l.a},o.a.createElement(a.Suspense,{fallback:o.a.createElement("div",{className:"text-center"},"\u6b63\u5728\u52a0\u8f7d\u754c\u9762...")},o.a.createElement(s,null)));c.a.render(u,document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[167,1,3]]]);
//# sourceMappingURL=main.81045cbd.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["serviceWorker.js","index.js"],"names":["Boolean","window","location","hostname","match","App","lazy","app","locale","zh_CN","fallback","className","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister"],"mappings":"6kDAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DCNN,IAAMC,EAAMC,gBAAK,kBAAM,wDACjBC,EACJ,kBAAC,IAAD,CAAgBC,OAAQC,KACtB,kBAAC,WAAD,CAAUC,SAAU,yBAAKC,UAAU,eAAf,4CAClB,kBAACN,EAAD,QAKNO,IAASC,OAAON,EAAKO,SAASC,eAAe,SD8GvC,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMC,MAAK,SAAAC,GACjCA,EAAaC,kB","file":"static/js/main.81045cbd.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import \"core-js/stable\";\nimport \"regenerator-runtime/runtime\";\nimport React, { Suspense, lazy } from \"react\"\nimport ReactDOM from 'react-dom';\nimport { ConfigProvider } from 'antd';\nimport zh_CN from 'antd/es/locale-provider/zh_CN';\nimport 'antd/dist/antd.css';\nimport './index.css';\nimport './mixins.css';\n\nimport * as serviceWorker from './serviceWorker';\n\nconst App = lazy(() => import(\"./App\"));\nconst app = (\n <ConfigProvider locale={zh_CN}>\n <Suspense fallback={<div className=\"text-center\">正在加载界面...</div>}>\n <App />\n </Suspense>\n </ConfigProvider>\n);\n\nReactDOM.render(app, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}
\ No newline at end of file
!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{4:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{2:"31d6cfe0",4:"d33dd312"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(f=u[c]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===n||l===a))return t()}var s=document.getElementsByTagName("style");for(c=0;c<s.length;c++){var f;if((l=(f=s[c]).getAttribute("data-href"))===n||l===a)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],p.parentNode.removeChild(p),r(u)},p.href=a,document.getElementsByTagName("head")[0].appendChild(p)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{2:"de16eafa",4:"13cfb0bb"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(s);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var s=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonphnyc-portrait"]=this["webpackJsonphnyc-portrait"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var f=l;r()}([]);
//# sourceMappingURL=runtime-main.0667f4b6.js.map
\ No newline at end of file
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
"@testing-library/user-event": "^7.1.2", "@testing-library/user-event": "^7.1.2",
"antd": "^3.26.0", "antd": "^3.26.0",
"axios": "^0.19.0", "axios": "^0.19.0",
"babel-polyfill": "^6.26.0",
"bizcharts": "^3.5.6", "bizcharts": "^3.5.6",
"crypto-js": "^4.0.0", "crypto-js": "^4.0.0",
"md5": "^2.2.1", "md5": "^2.2.1",
...@@ -18,7 +17,8 @@ ...@@ -18,7 +17,8 @@
"react-router-dom": "^5.0.1", "react-router-dom": "^5.0.1",
"react-scripts": "^3.4.0", "react-scripts": "^3.4.0",
"recharts": "^2.0.0-beta.1", "recharts": "^2.0.0-beta.1",
"echarts": "^4.6.0" "echarts": "^4.6.0",
"core-js": "^3.4.2"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
......
import "babel-polyfill"; import "core-js/stable";
import "regenerator-runtime/runtime";
import React, { Suspense, lazy } from "react" import React, { Suspense, lazy } from "react"
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { ConfigProvider } from 'antd'; import { ConfigProvider } from 'antd';
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
.degreeContent { .degreeContent {
height: 230px; height: 235px;
overflow: auto; overflow: auto;
} }
......
...@@ -7,7 +7,7 @@ import Basic from './Radar.recharts'; ...@@ -7,7 +7,7 @@ import Basic from './Radar.recharts';
import Pie from './Pie'; import Pie from './Pie';
import Line from './Line'; import Line from './Line';
import './Dashboard.css'; import './Dashboard.css';
import { Layout, Row, Col, Card, Spin, Divider, Table, Select } from 'antd'; import { Layout, Row, Col, Card, Spin, Divider, Table, Select, Empty } from 'antd';
const { Content } = Layout; const { Content } = Layout;
const { Option } = Select; const { Option } = Select;
...@@ -21,8 +21,12 @@ class Dashboard extends Component { ...@@ -21,8 +21,12 @@ class Dashboard extends Component {
"appSecret":"09E9E259FF6BF30C5F93EC56DA634E59", "appSecret":"09E9E259FF6BF30C5F93EC56DA634E59",
loading: false, loading: false,
loadingOrder: false, loadingOrder: false,
loadingTrend: false,
data: null, data: null,
orderData: null, orderData: [],
trendData: [],
curTrendData: {},
curTrendKey: '0',
columns: [ columns: [
{ {
title: '标签名称', title: '标签名称',
...@@ -168,7 +172,7 @@ class Dashboard extends Component { ...@@ -168,7 +172,7 @@ class Dashboard extends Component {
} }
componentDidMount() { componentDidMount() {
const { appid, appSecret } = this.state; const { appid, appSecret, curTrendKey } = this.state;
const _decryptId = this.props.match.params.id; const _decryptId = this.props.match.params.id;
...@@ -193,12 +197,11 @@ class Dashboard extends Component { ...@@ -193,12 +197,11 @@ class Dashboard extends Component {
}.bind(this)); }.bind(this));
}); });
let lastDay = this.getLastDay();
this.setState({ loadingOrder: true}, () => { this.setState({ loadingOrder: true}, () => {
PostJSON("/data/json/queryByCriteria",{ payload: { PostJSON("/data/json/queryByCriteria",{ payload: {
"userName":"root", "userName":"root",
"tableModelId":"5e9024e4ed72724be6c0bbe1", "tableModelId":"5e967f53ed72724be6c0bbe8",
"whereCriterias":[{"operator":"eq","parameter":"dt","values":[lastDay]},{"operator":"eq","parameter":"lic_no","values":[_custId],"relation":"and"}], "whereCriterias":[{"operator":"eq","parameter":"lic_no","values":[_custId]}],
"orderByCriterias":[{"order":"DESC","parameter":"order_num"}], "orderByCriterias":[{"order":"DESC","parameter":"order_num"}],
"pageNo":"1", "pageNo":"1",
"pageSize":"10" "pageSize":"10"
...@@ -206,6 +209,21 @@ class Dashboard extends Component { ...@@ -206,6 +209,21 @@ class Dashboard extends Component {
this.setState({ loadingOrder: false, orderData: data.data||[] }); this.setState({ loadingOrder: false, orderData: data.data||[] });
}.bind(this)); }.bind(this));
}); });
this.setState({ loadingTrend: true}, () => {
PostJSON("/data/json/queryByCriteria",{ payload: {
"userName":"root",
"tableModelId":"5e967f53ed72724be6c0bbe6",
"whereCriterias":[{"operator":"eq","parameter":"lic_no","values":[_custId]}],
"orderByCriterias":[{"order":"DESC","parameter":"dt"}],
"pageNo":"1",
"pageSize":"3"
}}).then(function(data) {
this.setState({ loadingTrend: false, trendData: (data.data||[]).reverse() },() => {
this.handleTrendChange(curTrendKey);
});
}.bind(this));
});
} }
getNowTime = () => { getNowTime = () => {
...@@ -220,22 +238,6 @@ class Dashboard extends Component { ...@@ -220,22 +238,6 @@ class Dashboard extends Component {
return `${this.year}${this.month}${this.hour}${this.minute}${this.second}${this.milliSeconds}`; return `${this.year}${this.month}${this.hour}${this.minute}${this.second}${this.milliSeconds}`;
} }
getLastDay = () => {
var nowdays = new Date();
var year = nowdays.getFullYear();
var month = nowdays.getMonth();
if(month === 0) {
month = 12;
year = year-1;
}
if (month < 10) {
month = "0" + month;
}
var myDate = new Date(year, month, 0);
return (year + "-" + month + "-" + myDate.getDate());
}
custCredit = data => { custCredit = data => {
var level = 0; var level = 0;
...@@ -249,29 +251,6 @@ class Dashboard extends Component { ...@@ -249,29 +251,6 @@ class Dashboard extends Component {
return (level>2)?`${level}A`:'B'; return (level>2)?`${level}A`:'B';
} }
custStatusMapper = status => {
if (status === null) return '';
if (status === '01') return '新增';
if (status === '02') return '有效';
if (status === '03') return '暂停';
if (status === '04') return '无效';
return '';
}
custAreaMapper = area => {
if (area === null) return '';
if (area === '01') return '工业区';
if (area === '02') return '居民区(村)';
if (area === '03') return '旅客中转区';
if (area === '04') return '学区';
if (area === '05') return '娱乐(旅游)区';
if (area === '06') return '政务(商务)区';
if (area === '11') return '商业(集贸)区';
if (area === '90') return '其他';
return '';
}
curDimensionConvert = (data, dimension) => { curDimensionConvert = (data, dimension) => {
var validateDimension = []; var validateDimension = [];
dimension.map(item=>{ dimension.map(item=>{
...@@ -300,11 +279,30 @@ class Dashboard extends Component { ...@@ -300,11 +279,30 @@ class Dashboard extends Component {
} }
handleTrendChange = (value) => { handleTrendChange = (value) => {
const { trendData } = this.state;
let xAxis = [];
let series = [];
trendData&&trendData.map((item,index) => {
xAxis.push(item.dt);
if (value === '0') {
series.push(item.month_order_s||'');
} else if (value === '1') {
series.push(item.once_order_num||'');
} else if (value === '2') {
series.push(item.out_pro_wgt||'');
} else if (value === '3') {
series.push(item.month_utilization_rate||'');
}
return item;
})
this.setState({ curTrendData:{xAxis:xAxis,series:series}, curTrendKey: value });
} }
render() { render() {
const { data, curDegree ,curDimension, loading, columns, loadingOrder, orderData } = this.state; const { data, curDegree ,curDimension, loading, columns, loadingOrder, orderData, curTrendData, curTrendKey, loadingTrend, trendData } = this.state;
return ( return (
<React.Fragment> <React.Fragment>
<Layout> <Layout>
...@@ -422,22 +420,28 @@ class Dashboard extends Component { ...@@ -422,22 +420,28 @@ class Dashboard extends Component {
<Card bordered={false} style={{marginBottom: '10px'}}> <Card bordered={false} style={{marginBottom: '10px'}}>
<h3 className="ant-typography text-primary">订购品规TOP10</h3> <h3 className="ant-typography text-primary">订购品规TOP10</h3>
<Spin spinning={loadingOrder}> <Spin spinning={loadingOrder}>
{ <div style={{ width: '100%', height: '325px', display: 'flex', alignItems: 'center',justifyContent: 'center' }}>
orderData&&<Pie data={orderData} /> { orderData.length===0&&<Empty />}
} { orderData.length!==0&&<Pie data={orderData} /> }
</div>
</Spin> </Spin>
</Card> </Card>
<Card bordered={false}> <Card bordered={false}>
<div style={{display: 'flex',justifyContent: 'space-between'}}> <div style={{display: 'flex',justifyContent: 'space-between'}}>
<h3 className="ant-typography text-primary">上季度走势图</h3> <h3 className="ant-typography text-primary">上季度走势图</h3>
<Select defaultValue="0" style={{ width: 120 }} onChange={this.handleTrendChange}> <Select defaultValue={curTrendKey} style={{ width: 120 }} onChange={this.handleTrendChange}>
<Option value="0">订购数</Option> <Option value="0">次均订购</Option>
<Option value="1">结构</Option> <Option value="1">结构</Option>
<Option value="2">省外烟比例</Option> <Option value="2">省外烟比例</Option>
<Option value="3">月供总量使用率</Option> <Option value="3">月供总量使用率</Option>
</Select> </Select>
</div> </div>
<Line /> <Spin spinning={loadingTrend}>
<div style={{ width: '100%', height: '325px', display: 'flex', alignItems: 'center',justifyContent: 'center' }}>
{ trendData.length===0&&<Empty />}
{ trendData.length!==0&&<Line data={curTrendData} /> }
</div>
</Spin>
</Card> </Card>
</Col> </Col>
</Row> </Row>
......
...@@ -4,12 +4,29 @@ import echarts from "echarts"; ...@@ -4,12 +4,29 @@ import echarts from "echarts";
class Line extends Component { class Line extends Component {
componentDidMount() { componentDidMount() {
// const { data } = this.props; this.setChartOption();
let xAxis = ['一月份订购数量','二月份订购数量','三月份订购数量']; window.addEventListener("resize", this.onWindowResize);
let series = [1000,800,1300]; this.onWindowResize();
}
componentDidUpdate(prevProps, prevState) {
this.setChartOption();
}
componentWillUnmount() {
window.removeEventListener("resize", this.onWindowResize);
}
onWindowResize = () => {
var myChart = echarts.init(document.getElementById('line')); var myChart = echarts.init(document.getElementById('line'));
myChart.resize();
};
setChartOption= () => {
const { data } = this.props;
var myChart = echarts.init(document.getElementById('line'));
myChart.setOption({ myChart.setOption({
animation: true, animation: true,
legend: { legend: {
...@@ -47,7 +64,7 @@ class Line extends Component { ...@@ -47,7 +64,7 @@ class Line extends Component {
color: '#b7b7b7' color: '#b7b7b7'
} }
}, },
data: xAxis data: data.xAxis||[]
}], }],
yAxis: { yAxis: {
type: 'value', type: 'value',
...@@ -85,22 +102,18 @@ class Line extends Component { ...@@ -85,22 +102,18 @@ class Line extends Component {
borderWidth: 1 borderWidth: 1
}, },
smooth: false, smooth: false,
data: series, data: data.series||[],
areaStyle: {} areaStyle: {}
} }
], ],
}); });
window.addEventListener("resize", () => {
myChart.resize();
});
} }
render() { render() {
return ( return (
<React.Fragment> <React.Fragment>
<div id={"line"} style={{ width: '100%', height: '300px' }}></div> <div id={"line"} style={{ width: '100%', height: '325px' }}>
</div>
</React.Fragment> </React.Fragment>
); );
} }
......
...@@ -9,11 +9,11 @@ class Pie extends Component { ...@@ -9,11 +9,11 @@ class Pie extends Component {
let legendData = [], pieData = []; let legendData = [], pieData = [];
data.map((item,i) =>{ data.map((item,i) =>{
legendData.push({ legendData.push({
name: item.item_name, name: item.ITEM_NAME,
}); });
pieData.push({ pieData.push({
value: item.order_num, value: item.ORDER_NUM,
name: item.item_name, name: item.ITEM_NAME,
}); });
return item; return item;
...@@ -69,15 +69,23 @@ class Pie extends Component { ...@@ -69,15 +69,23 @@ class Pie extends Component {
] ]
}); });
window.addEventListener("resize", () => { window.addEventListener("resize", this.onWindowResize);
myChart.resize(); this.onWindowResize();
}); }
componentWillUnmount() {
window.removeEventListener("resize", this.onWindowResize);
} }
onWindowResize = () => {
var myChart = echarts.init(document.getElementById('pie'));
myChart.resize();
};
render() { render() {
return ( return (
<React.Fragment> <React.Fragment>
<div id='pie' style={{ width: '100%', height: '200px' }}></div> <div id='pie' style={{ width: '100%', height: '325px' }}></div>
</React.Fragment> </React.Fragment>
); );
} }
......
...@@ -7,7 +7,7 @@ import Basic from './Radar.recharts'; ...@@ -7,7 +7,7 @@ import Basic from './Radar.recharts';
import Pie from './Pie'; import Pie from './Pie';
import Line from './Line'; import Line from './Line';
import './Dashboard.css'; import './Dashboard.css';
import { Layout, Row, Col, Card, Spin, Divider, Table, Select } from 'antd'; import { Layout, Row, Col, Card, Spin, Divider, Table, Select, Empty } from 'antd';
const { Content } = Layout; const { Content } = Layout;
const { Option } = Select; const { Option } = Select;
...@@ -21,8 +21,12 @@ class mDashboard extends Component { ...@@ -21,8 +21,12 @@ class mDashboard extends Component {
"appSecret":"09E9E259FF6BF30C5F93EC56DA634E59", "appSecret":"09E9E259FF6BF30C5F93EC56DA634E59",
loading: false, loading: false,
loadingOrder: false, loadingOrder: false,
loadingTrend: false,
data: null, data: null,
orderData: null, orderData: [],
trendData: [],
curTrendData: {},
curTrendKey: '0',
columns: [ columns: [
{ {
title: '标签名称', title: '标签名称',
...@@ -168,7 +172,7 @@ class mDashboard extends Component { ...@@ -168,7 +172,7 @@ class mDashboard extends Component {
} }
componentDidMount() { componentDidMount() {
const { appid, appSecret } = this.state; const { appid, appSecret, curTrendKey } = this.state;
const _decryptId = this.props.match.params.id; const _decryptId = this.props.match.params.id;
...@@ -193,12 +197,11 @@ class mDashboard extends Component { ...@@ -193,12 +197,11 @@ class mDashboard extends Component {
}.bind(this)); }.bind(this));
}); });
let lastDay = this.getLastDay();
this.setState({ loadingOrder: true}, () => { this.setState({ loadingOrder: true}, () => {
PostJSON("/data/json/queryByCriteria",{ payload: { PostJSON("/data/json/queryByCriteria",{ payload: {
"userName":"root", "userName":"root",
"tableModelId":"5e9024e4ed72724be6c0bbe1", "tableModelId":"5e967f53ed72724be6c0bbe8",
"whereCriterias":[{"operator":"eq","parameter":"dt","values":[lastDay]},{"operator":"eq","parameter":"lic_no","values":[_custId],"relation":"and"}], "whereCriterias":[{"operator":"eq","parameter":"lic_no","values":[_custId]}],
"orderByCriterias":[{"order":"DESC","parameter":"order_num"}], "orderByCriterias":[{"order":"DESC","parameter":"order_num"}],
"pageNo":"1", "pageNo":"1",
"pageSize":"10" "pageSize":"10"
...@@ -206,6 +209,21 @@ class mDashboard extends Component { ...@@ -206,6 +209,21 @@ class mDashboard extends Component {
this.setState({ loadingOrder: false, orderData: data.data||[] }); this.setState({ loadingOrder: false, orderData: data.data||[] });
}.bind(this)); }.bind(this));
}); });
this.setState({ loadingTrend: true}, () => {
PostJSON("/data/json/queryByCriteria",{ payload: {
"userName":"root",
"tableModelId":"5e967f53ed72724be6c0bbe6",
"whereCriterias":[{"operator":"eq","parameter":"lic_no","values":[_custId]}],
"orderByCriterias":[{"order":"DESC","parameter":"dt"}],
"pageNo":"1",
"pageSize":"3"
}}).then(function(data) {
this.setState({ loadingTrend: false, trendData: (data.data||[]).reverse() },() => {
this.handleTrendChange(curTrendKey);
});
}.bind(this));
});
} }
getNowTime = () => { getNowTime = () => {
...@@ -220,22 +238,6 @@ class mDashboard extends Component { ...@@ -220,22 +238,6 @@ class mDashboard extends Component {
return `${this.year}${this.month}${this.hour}${this.minute}${this.second}${this.milliSeconds}`; return `${this.year}${this.month}${this.hour}${this.minute}${this.second}${this.milliSeconds}`;
} }
getLastDay = () => {
var nowdays = new Date();
var year = nowdays.getFullYear();
var month = nowdays.getMonth();
if(month === 0) {
month = 12;
year = year-1;
}
if (month < 10) {
month = "0" + month;
}
var myDate = new Date(year, month, 0);
return (year + "-" + month + "-" + myDate.getDate());
}
custCredit = data => { custCredit = data => {
var level = 0; var level = 0;
...@@ -249,29 +251,6 @@ class mDashboard extends Component { ...@@ -249,29 +251,6 @@ class mDashboard extends Component {
return (level>2)?`${level}A`:'B'; return (level>2)?`${level}A`:'B';
} }
custStatusMapper = status => {
if (status === null) return '';
if (status === '01') return '新增';
if (status === '02') return '有效';
if (status === '03') return '暂停';
if (status === '04') return '无效';
return '';
}
custAreaMapper = area => {
if (area === null) return '';
if (area === '01') return '工业区';
if (area === '02') return '居民区(村)';
if (area === '03') return '旅客中转区';
if (area === '04') return '学区';
if (area === '05') return '娱乐(旅游)区';
if (area === '06') return '政务(商务)区';
if (area === '11') return '商业(集贸)区';
if (area === '90') return '其他';
return '';
}
curDimensionConvert = (data, dimension) => { curDimensionConvert = (data, dimension) => {
var validateDimension = []; var validateDimension = [];
dimension.map(item=>{ dimension.map(item=>{
...@@ -300,11 +279,30 @@ class mDashboard extends Component { ...@@ -300,11 +279,30 @@ class mDashboard extends Component {
} }
handleTrendChange = (value) => { handleTrendChange = (value) => {
const { trendData } = this.state;
let xAxis = [];
let series = [];
trendData&&trendData.map((item,index) => {
xAxis.push(item.dt);
if (value === '0') {
series.push(item.month_order_s||'');
} else if (value === '1') {
series.push(item.once_order_num||'');
} else if (value === '2') {
series.push(item.out_pro_wgt||'');
} else if (value === '3') {
series.push(item.month_utilization_rate||'');
}
return item;
})
this.setState({ curTrendData:{xAxis:xAxis,series:series}, curTrendKey: value });
} }
render() { render() {
const { data, curDegree ,curDimension, loading, columns, loadingOrder, orderData } = this.state; const { data, curDegree ,curDimension, loading, columns, loadingOrder, orderData, curTrendData, curTrendKey, loadingTrend, trendData } = this.state;
return ( return (
<React.Fragment> <React.Fragment>
<Layout> <Layout>
...@@ -423,9 +421,8 @@ class mDashboard extends Component { ...@@ -423,9 +421,8 @@ class mDashboard extends Component {
<Card bordered={false} style={{marginBottom: '10px'}}> <Card bordered={false} style={{marginBottom: '10px'}}>
<h3 className="ant-typography text-primary">订购品规TOP10</h3> <h3 className="ant-typography text-primary">订购品规TOP10</h3>
<Spin spinning={loadingOrder}> <Spin spinning={loadingOrder}>
{ { orderData.length===0&&<div style={{ width: '100%', height: '325px', display: 'flex', alignItems: 'center',justifyContent: 'center' }}><Empty /></div> }
orderData&&<Pie data={orderData} /> { orderData.length!==0&&<Pie data={orderData} /> }
}
</Spin> </Spin>
</Card> </Card>
</Row> </Row>
...@@ -433,14 +430,17 @@ class mDashboard extends Component { ...@@ -433,14 +430,17 @@ class mDashboard extends Component {
<Card bordered={false}> <Card bordered={false}>
<div style={{display: 'flex',justifyContent: 'space-between'}}> <div style={{display: 'flex',justifyContent: 'space-between'}}>
<h3 className="ant-typography text-primary">上季度走势图</h3> <h3 className="ant-typography text-primary">上季度走势图</h3>
<Select defaultValue="0" style={{ width: 120 }} onChange={this.handleTrendChange}> <Select defaultValue={curTrendKey} style={{ width: 120 }} onChange={this.handleTrendChange}>
<Option value="0">订购数量</Option> <Option value="0">订购数量</Option>
<Option value="1">订购结构</Option> <Option value="1">订购结构</Option>
<Option value="2">省外烟比例</Option> <Option value="2">省外烟比例</Option>
<Option value="3">月供总量使用率</Option> <Option value="3">月供总量使用率</Option>
</Select> </Select>
</div> </div>
<Line /> <Spin spinning={loadingTrend}>
{ trendData.length===0&&<div style={{ width: '100%', height: '325px', display: 'flex', alignItems: 'center',justifyContent: 'center' }}><Empty /></div> }
{ trendData.length!==0&&<Line data={curTrendData} /> }
</Spin>
</Card> </Card>
</Row> </Row>
</Content> </Content>
......
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