nsec-components
Version:
[效果图](./README.md) | [代码](./README-zh.js)
1 lines • 53 kB
JavaScript
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=28)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("antd")},function(e,t){e.exports=require("moment")},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r,o,i={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),l=function(e,t){return t?t.querySelector(e):document.querySelector(e)},s=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=l.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),c=null,u=0,f=[],p=n(11);function d(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(v(r.parts[a],t))}else{var l=[];for(a=0;a<r.parts.length;a++)l.push(v(r.parts[a],t));i[r.id]={id:r.id,refs:1,parts:l}}}}function h(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}function m(e,t){var n=s(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=f[f.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),f.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=s(e.insertAt.before,n);n.insertBefore(t,o)}}function y(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function b(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return g(t,e.attrs),m(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=c||(c=b(t)),r=k.bind(null,n,a,!1),o=k.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),m(e,t),t}(t),r=T.bind(null,n,t),o=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),r=S.bind(null,n),o=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return d(n,t),function(e){for(var r=[],o=0;o<n.length;o++){var a=n[o];(l=i[a.id]).refs--,r.push(l)}e&&d(h(e,t),t);for(o=0;o<r.length;o++){var l;if(0===(l=r[o]).refs){for(var s=0;s<l.parts.length;s++)l.parts[s]();delete i[l.id]}}}};var x,w=(x=[],function(e,t){return x[e]=t,x.filter(Boolean).join("\n")});function k(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function S(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function T(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=p(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}},function(e,t){e.exports=require("echarts")},function(e,t){e.exports=require("lodash")},function(e,t){e.exports=require("axios")},function(e,t,n){var r=n(10);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".timeLine {\n display: block;\n width: 100%;\n position: absolute;\n left: 0;\n bottom: 2px;\n height: 38px;\n background: rgba(89, 87, 87, 0.4);\n z-index: 1000;\n}\n.timeLine .timeContent {\n width: 100%;\n font-size: 12px;\n margin-left: 80px;\n height: 36px;\n}\n.timeLine .timeContent .timeBlock {\n width: 33.33%;\n height: 36px;\n border-right: 1px solid #ddd;\n float: left;\n text-align: center;\n color: #fff;\n}\n.timeLine .timeContent .timeBlock .scaleText {\n float: left;\n width: 4.165%;\n color: #fff;\n height: 17px;\n line-height: 17px;\n font-size: 12px;\n}\n.timeLine .timeContent .time {\n border-bottom: 0.5px solid hsla(0, 0%, 71%, 0.4);\n height: 18px;\n margin: 0;\n border-bottom: 1px solid #fff;\n}\n.timeLine .timeContent p {\n height: 20px;\n line-height: 20px;\n margin: 0;\n font-size: 15px;\n}\n.timeLine .ck60 {\n width: 40px;\n float: left;\n height: 36px;\n border-right: 1px solid #ddd;\n text-align: center;\n padding: 5px 5px;\n display: inline;\n}\n.timeLine .ck60 img {\n margin-top: 8px;\n margin-left: 5px;\n width: 20px;\n height: 20px;\n}\n.timeLine .ck60 .number {\n font-size: 12px;\n line-height: 30px;\n color: #fff;\n}\n.timeLine .rightDateTent {\n display: inline;\n position: absolute;\n bottom: 0;\n right: 0;\n color: white;\n}\n.timeLine .rightDateTent .rightDate {\n float: right;\n width: 80px;\n height: 36px;\n display: inline;\n padding-left: 10px;\n padding-top: 8px;\n border-right: 1px solid;\n}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".defaultTitle .middleButton {\n position: absolute;\n display: inline;\n left: 40%;\n z-index: 1;\n background: rgba(182, 181, 179, 0.6);\n color: white;\n border-radius: 100px;\n margin-top: 10px;\n font-size: 16px;\n padding-left: 40px;\n padding-right: 40px;\n}\n",""])},function(e,t,n){var r=n(15);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".backgroundHeader {\n height: 50px;\n padding: 13px;\n}\n.backgroundHeader .title {\n font-size: 16px;\n font-weight: 600;\n margin-left: 20px;\n margin-right: 40px;\n}\n",""])},function(e,t,n){var r=n(17);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".floatContent {\n position: absolute;\n border-radius: 10px;\n background: #626262;\n padding: 20px;\n color: #fff;\n opacity: 0.85;\n max-height: 600px;\n overflow: auto;\n}\n.floatContent p {\n margin-bottom: 5px;\n}\n.floatContent td {\n color: #fff;\n}\n",""])},function(e,t,n){var r=n(19);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,"",""])},function(e,t,n){var r=n(21);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".tabsSelect .ant-tabs-content {\n display: none;\n}\n.tabsSelect .ant-tabs-bar {\n margin: 0;\n}\n.tabsSelect .ant-tabs-tab {\n padding: 4px 8px !important;\n margin: 0 10px 0 0;\n}\n",""])},function(e,t,n){var r=n(23);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".lastTimeLine {\n display: block;\n width: 100%;\n position: absolute;\n left: 0;\n bottom: 2px;\n height: 38px;\n background: rgba(89, 87, 87, 0.4);\n z-index: 1000;\n}\n.lastTimeLine .timeContent {\n width: 100%;\n font-size: 12px;\n margin-left: 80px;\n height: 36px;\n}\n.lastTimeLine .timeContent .timeBlock {\n cursor: pointer;\n width: 33.33%;\n height: 36px;\n border-right: 1px solid #ddd;\n float: left;\n text-align: center;\n color: #fff;\n}\n.lastTimeLine .timeContent .timeBlock .scaleText {\n float: left;\n width: 4.165%;\n color: #fff;\n height: 17px;\n line-height: 17px;\n font-size: 12px;\n}\n.lastTimeLine .timeContent .time {\n border-bottom: 0.5px solid hsla(0, 0%, 71%, 0.4);\n height: 18px;\n margin: 0;\n border-bottom: 1px solid #fff;\n}\n.lastTimeLine .timeContent p {\n height: 20px;\n line-height: 20px;\n margin: 0;\n font-size: 15px;\n}\n.lastTimeLine .ck60 {\n width: 40px;\n cursor: pointer;\n float: left;\n height: 36px;\n border-right: 1px solid #ddd;\n text-align: center;\n padding: 5px 5px;\n display: inline;\n}\n.lastTimeLine .ck60 img {\n margin-top: 8px;\n margin-left: 5px;\n width: 20px;\n height: 20px;\n}\n.lastTimeLine .ck60 .number {\n font-size: 12px;\n line-height: 30px;\n color: #fff;\n}\n.lastTimeLine .rightDateTent {\n display: inline;\n position: absolute;\n bottom: 0;\n right: 0;\n color: white;\n}\n.lastTimeLine .rightDateTent .rightDate {\n float: right;\n width: 14.285%;\n height: 36px;\n display: inline;\n border-right: 1px solid;\n text-align: center;\n line-height: 36px;\n cursor: pointer;\n}\n",""])},function(e,t,n){var r=n(25);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".simpleTable {\n width: 100%;\n}\n.simpleTable .ant-input {\n border: 0;\n}\n.simpleTable thead tr {\n text-align: center;\n background-color: #827789;\n color: #fff;\n}\n.simpleTable thead tr th {\n border: 1px solid rgba(37, 33, 40, 0.12);\n font-size: 12px;\n font-weight: 500;\n white-space: nowrap;\n}\n.simpleTable thead tr th .upDown {\n display: inline-grid;\n margin-left: 5px;\n}\n.simpleTable thead tr th .upDown .anticon {\n display: block;\n}\n.simpleTable .defaultThead th {\n padding: 10px 10px;\n}\n.simpleTable .smallThead th {\n padding: 3px 10px;\n}\n.simpleTable tbody {\n overflow: auto;\n}\n.simpleTable tbody td {\n border: 1px solid rgba(37, 33, 40, 0.12);\n font-size: 12px;\n font-weight: 500;\n padding: 10px 10px;\n white-space: nowrap;\n}\n",""])},function(e,t,n){var r=n(27);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".labelButton {\n text-align: center;\n font-size: 14px;\n float: left;\n margin-right: 10px;\n margin-bottom: 5px;\n}\n.labelButton .name {\n height: 20px;\n line-height: 20px;\n color: #dadada;\n}\n.labelButton .value {\n height: 20px;\n line-height: 20px;\n color: #7f878c;\n background: #dce9ed;\n font-size: 10px;\n}\n",""])},function(e,t,n){"use strict";n.r(t);var r=[{key:"aqi",name:"AQI"},{key:"pm25",name:"PM₂.₅"},{key:"pm10",name:"PM₁₀"},{key:"so2",name:"SO₂"},{key:"no2",name:"NO₂"},{key:"o3",name:"O₃"},{key:"co",name:"CO"}];function o(e){var t=[0,50,100,150,200,300,500];return"aqi"===e?t:"pm25"===e?[0,35,75,115,150,250,500]:"pm10"===e?[0,50,150,250,350,420,500]:"so2"===e?[0,50,150,475,800,1600,2100]:"no2"===e?[0,100,200,700,1200,2340,3090]:"co"===e?[0,5,10,35,60,90,120]:"o3"===e?[0,160,200,300,400,800,1e3]:t}var i=n(0),a=n.n(i),l=n(1),s=n.n(l),c=n(2);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=p(this,d(t).call(this,e))).state={collapsed:!1},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,(r=[{key:"callback",value:function(e){this.props.callback&&this.props.callback(e)}},{key:"render",value:function(){var e=this,t=this.props.menuList,n=t&&t.length>0&&t.map((function(e){return a.a.createElement(c.Menu.Item,{key:e.key,name:e.name},a.a.createElement("span",null,e.name))}));return a.a.createElement(c.Menu,{defaultSelectedKeys:["1"],defaultOpenKeys:["sub1"],mode:"inline",theme:"dark",style:{height:"100%"},inlineCollapsed:this.state.collapsed,onSelect:function(t){return e.callback(t)}},n)}}])&&f(n.prototype,r),o&&f(n,o),t}(i.PureComponent);m.propTypes={menuList:s.a.array.isRequired,callback:s.a.func};var y=n(3),b=n.n(y);n(9);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S={1:"1s",2:"2s",3:"3s",4:"4s",5:"5s"},T=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=x(this,w(t).call(this,e))).state={selectedIx:12,pause:!0,time:2e3,forecastTime:"",timeMode:3},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(t,e),n=t,(r=[{key:"componentWillMount",value:function(){this.props.realTime||this.chooseTime({dayIx:0,ix:12})}},{key:"shouldComponentUpdate",value:function(e,t){return t.pause===this.state.pause||t.pause||this.timingHandler(e,t),t.selectedIx===this.state.selectedIx||t.pause||this.timingHandler(e,t),!0}},{key:"timingHandler",value:function(e,t){var n=t.selectedIx,r=t.pause,o=t.time,i=this;r||(n>=79?i.setState({pause:!0}):window.timer=window.setTimeout((function(){var e=i.getForecastTime(n+1,i.props.selectedDay);if(i.setState({selectedIx:n+1,forecastTime:e}),i.props.timingHandler){b.a.locale("zh-cn");var t=b()(e,"YYYYMMDDHH").format("YYYY-MM-DD HH:00:00");i.props.timingHandler({selectedIx:n+1,realTime:t,forecastTime:e})}}),o))}},{key:"componentWillUnmount",value:function(){window.timer&&clearTimeout(window.timer)}},{key:"renderScale",value:function(e){for(var t=this,n=this.props.mode,r=this.state.selectedIx,o=[],i=0;i<24;i++)o.push({ix:i,dayIx:e});return"realTime"===n?o.map((function(e){return a.a.createElement("span",{className:"scaleText",onClick:t.chooseTime.bind(t,e,2===e.dayIx&&parseInt(b()().format("HH"))<e.ix),style:{background:24*e.dayIx+e.ix<=r?"rgb(40,136,212)":"#ddd"}},e.ix)})):o.map((function(e){return a.a.createElement("span",{className:"scaleText",onClick:t.chooseTime.bind(t,e,!1),style:24*e.dayIx+e.ix<=r?{background:"rgb(40,136,212)"}:{}},e.ix)}))}},{key:"chooseTime",value:function(e,t){if(t)c.notification.warning({message:"尚未取到此时数据"});else{var n=24*e.dayIx+e.ix;e.selectedIx=n;var r=this.getForecastTime(n,this.props.selectedDay);e.forecastTime=r,this.setState({selectedIx:n,forecastTime:r,pause:!0}),window.timer&&clearTimeout(window.timer),b.a.locale("zh-cn"),e.realTime=b()(r,"YYYYMMDDHH").format("YYYY-MM-DD HH:00:00"),this.props.changeValue&&this.props.changeValue(e)}}},{key:"getForecastTime",value:function(e,t){t||(t=b()().format("YYYYMMDD"));var n=Math.floor(e/24)+1,r=e%24;return r<10&&(r="0"+r),b()(t).add("day",n).format("YYYYMMDD")+r}},{key:"changeDate",value:function(e){var t=this.state.selectedIx;t=t%24+24*e,this.setState({selectedIx:t})}},{key:"changeStatus",value:function(){window.timer&&clearTimeout(window.timer),this.setState({pause:!this.state.pause})}},{key:"showSlider",value:function(){this.refs.timeSlider.style.display="block"}},{key:"changeSlider",value:function(e){this.setState({time:1e3*e}),this.refs.timeSlider.style.display="none"}},{key:"changeTimeMode",value:function(){3===this.state.timeMode?this.setState({timeMode:7}):this.setState({timeMode:3})}},{key:"chooseDate",value:function(e){b()().add("days",e)}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.bottom,r=e.mode,o=e.timeChangeCheck,i=e.left,l=e.height,s=this.state,u=s.selectedIx,f=s.pause,p=s.timeMode;n||(n=0);var d=t-80,h=80;r&&"home"===r&&(d-=80,h+=80),7===p&&(d-=320);var m={fontSize:24,paddingTop:2,color:"#fff"},y={width:t,bottom:n};return i&&(y.left=i),l&&(y.height=l),a.a.createElement("div",{className:"timeLine",style:y},a.a.createElement("div",{className:"ck60",onClick:this.changeStatus.bind(this)},f?a.a.createElement(c.Icon,{type:"caret-right",style:{fontSize:28,paddingTop:1,color:"#fff",lineHeight:"28px"}}):a.a.createElement(c.Icon,{type:"pause",style:m})),o&&a.a.createElement("div",{className:"ck60"},a.a.createElement(c.Icon,{type:"clock-circle",style:m,onClick:this.showSlider.bind(this)}),a.a.createElement("div",{ref:"timeSlider",style:{height:125,width:45,position:"absolute",display:"none",bottom:65}},a.a.createElement(c.Slider,{vertical:!0,marks:S,min:1,max:5,onAfterChange:this.changeSlider.bind(this)}))),a.a.createElement("div",{className:"ck60",onClick:this.changeTimeMode.bind(this)},a.a.createElement("span",{className:"number"},3===p?"预3":"预7")),a.a.createElement("div",{className:"timeContent",style:{width:d,marginLeft:h}},a.a.createElement("div",{className:"timeBlock"},a.a.createElement("div",{className:"time"},this.renderScale(1)),a.a.createElement("p",{onClick:this.changeDate.bind(this,1),style:Math.floor(u/24)>=1?{background:"rgb(40,136,212)"}:{}},b()().add("days",0).format("MM月DD日"))),a.a.createElement("div",{className:"timeBlock"},a.a.createElement("div",{className:"time"},this.renderScale(2)),a.a.createElement("p",{onClick:this.changeDate.bind(this,2),style:Math.floor(u/24)>=2?{background:"rgb(40,136,212)"}:{}},b()().add("days",1).format("MM月DD日"))),a.a.createElement("div",{className:"timeBlock"},a.a.createElement("div",{className:"time"},this.renderScale(3)),a.a.createElement("p",{onClick:this.changeDate.bind(this,3),style:Math.floor(u/24)>=3?{background:"rgb(40,136,212)"}:{}},b()().add("days",2).format("MM月DD日")))),7===p&&a.a.createElement("div",{className:"rightDateTent"},a.a.createElement("div",{className:"rightDate",onClick:this.chooseDate.bind(this,"6")},b()().add("days",6).format("MM月DD日")),a.a.createElement("div",{className:"rightDate",onClick:this.chooseDate.bind(this,"5")},b()().add("days",5).format("MM月DD日")),a.a.createElement("div",{className:"rightDate",onClick:this.chooseDate.bind(this,"4")},b()().add("days",4).format("MM月DD日")),a.a.createElement("div",{className:"rightDate",onClick:this.chooseDate.bind(this,"3")},b()().add("days",3).format("MM月DD日"))))}}])&&v(n.prototype,r),o&&v(n,o),t}(i.Component);T.proptTypes={selectedDay:s.a.string.isRequired,changeValue:s.a.func.isRequired,timingHandler:s.a.func.isRequired,width:s.a.number.isRequired};n(12);function O(e){var t={background:"rgba(182, 181, 179, 0.6)"};return e.background&&(t.background=e.background),a.a.createElement("div",{className:"defaultTitle"},a.a.createElement("div",{className:"middleButton",style:t},a.a.createElement("span",null,e.title)))}O.propTypes={title:s.a.string.isRequired};var E=n(6);function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=D(this,_(t).call(this,e))).state={},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.showChart(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.showChart(e)}},{key:"showChart",value:function(e){var t=e.titleText,n=e.xData,r=e.seriesName,o=e.seriesData,i=e.rangeData,a=E.init(this.refs.line),l={title:{text:t,left:"center",textStyle:{color:"black",fontSize:14}},tooltip:{trigger:"axis"},grid:{left:"0%",right:"0%",bottom:5,top:"25%",containLabel:!0},toolbox:{show:!0,top:20,right:0,feature:{magicType:{show:!0,type:["line","bar"]}}},xAxis:{type:"category",boundaryGap:!1,data:n||["无数据"]},yAxis:{type:"value"},series:[{name:r||"",type:"line",stack:"总量",data:o||[]}]};i&&i.length>0&&(l.series[0].markLine={silent:!0,data:[{yAxis:i[3]}]},l.series[0].itemStyle={normal:{color:function(e){if(e&&e.value){if(e.value<i[1])return"#02E100";if(e.value>i[1]&&e.value<=i[2])return"rgb(236,218,48)";if(e.value>i[2]&&e.value<=i[3])return"rgb(255,127,0)";if(e.value>i[3]&&e.value<=i[4])return"rgb(252,0,2)";if(e.value>i[4]&&e.value<=i[5])return"rgb(150,0,75)";if(e.value>i[5])return"rgb(127,3,31)"}}}}),console.log("option:::",l),a.setOption(l)}},{key:"render",value:function(){var e=this.props.height;return a.a.createElement("div",{ref:"line",style:{width:"100%",height:e}})}}])&&j(n.prototype,r),o&&j(n,o),t}(i.Component);function R(e){var t={fontSize:16,fontWeight:600,paddingTop:20,paddingBottom:20,textAlign:"center"};return e.textAlign&&(t.textAlign=e.textAlign),(e.padding||0===e.padding)&&(t.padding=e.padding),a.a.createElement("div",{style:t},a.a.createElement("span",null,e.title),e.children)}P.propTypes={xData:s.a.array.isRequired,seriesData:s.a.array.isRequired,seriesName:s.a.string.isRequired,titleText:s.a.string.isRequired,height:s.a.number.isRequired,rangeData:s.a.array},R.propTypes={title:s.a.string.isRequired,textAlign:s.a.string,padding:s.a.number};var L=c.Select.Option;function I(e){var t=e.optionList.map((function(e){return a.a.createElement(L,{key:e.key,value:e.key},e.name)}));return a.a.createElement(c.Select,{defaultValue:e.defaultValue,style:{minWidth:120},onChange:function(t){return function(t){e.onChange&&e.onChange(t)}(t)}},t)}function N(e){var t=e.buttonList.map((function(e){return a.a.createElement(c.Radio.Button,{value:e.key},e.name)}));return a.a.createElement(c.Radio.Group,{defaultValue:e.defaultValue,buttonStyle:"solid",onChange:function(t){return function(t){e.onChange&&e.onChange(t)}(t)}},t)}I.propTypes={optionList:s.a.array.isRequired,onChange:s.a.func,defaultValue:s.a.string},N.propTypes={buttonList:s.a.array.isRequired,onChange:s.a.func,defaultValue:s.a.string};n(14);function q(e){var t={height:50,padding:13,background:e.color};if(e.size&&"big"===e.size&&(t.height=70,t.padding=23),e)return a.a.createElement("div",{className:"backgroundHeader",style:t},a.a.createElement("span",{className:"title"},e.title),e.children)}function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=A(this,B(t).call(this,e))).state={},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.showChart(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.showChart(e)}},{key:"showChart",value:function(e){var t=e.titleText,n=e.xData,r=e.seriesData,o=e.colorList,i=e.yName,a=e.xName,l=e.rangeData,s=e.legendData,c=E.init(this.refs.line),u={title:{text:t,left:0,textStyle:{color:"#fff",fontSize:14}},tooltip:{trigger:"axis"},grid:{left:0,right:55,bottom:5,top:"15%",containLabel:!0},legend:{data:s},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!1,name:a,data:n},yAxis:{type:"value",name:i},series:[]};r&&r.map((function(e){u.series.push({name:e.name,type:"line",smooth:!0,data:e.data})})),o&&o.length>0&&(u.color=o),l&&l.length>0&&(u.series[0].markLine={silent:!0,data:[{yAxis:l[3]}]},u.series[0].itemStyle={normal:{color:function(e){if(e&&e.value){if(e.value<l[1])return"#02E100";if(e.value>l[1]&&e.value<=l[2])return"rgb(236,218,48)";if(e.value>l[2]&&e.value<=l[3])return"rgb(255,127,0)";if(e.value>l[3]&&e.value<=l[4])return"rgb(252,0,2)";if(e.value>l[4]&&e.value<=l[5])return"rgb(150,0,75)";if(e.value>l[5])return"rgb(127,3,31)"}}}}),console.log("option:::",u),c.setOption(u)}},{key:"render",value:function(){var e=this.props.height;return a.a.createElement("div",{ref:"line",style:{width:"100%",height:e}})}}])&&z(n.prototype,r),o&&z(n,o),t}(i.Component);Y.propTypes={xData:s.a.array.isRequired,seriesData:s.a.array.isRequired,legendData:s.a.array.isRequired,height:s.a.number.isRequired,titleText:s.a.string,rangeData:s.a.array,colorList:s.a.array};n(16);function W(e){var t={};return e.top&&(t.top=e.top),e.left&&(t.left=e.left),e.right&&(t.right=e.right),e.bottom&&(t.bottom=e.bottom),e.background&&(t.background=e.background),a.a.createElement("div",{className:"floatContent",style:t},e.children)}function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t){return!t||"object"!==V(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var K=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=G(this,$(t).call(this,e))).state={},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.showChart(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.showChart(e)}},{key:"showChart",value:function(e){var t=e.titleText,n=e.xData,r=e.seriesName,o=e.seriesData,i=e.rangeData,a=e.xName,l=e.yName,s=e.gridBottom,c=E.init(this.refs.bar),u={title:{text:t,left:10,textStyle:{color:"black",fontSize:14}},tooltip:{trigger:"axis"},grid:{left:30,top:40},toolbox:{show:!1,top:20,right:0,feature:{magicType:{show:!0,type:["line","bar"]}}},xAxis:{type:"category",name:a,data:n||["无数据"]},yAxis:{type:"value",name:l},series:[{name:r||"",type:"bar",data:o||[]}]};i&&i.length>0&&(u.series[0].markLine={silent:!0,data:[{yAxis:i[3]}]},u.series[0].itemStyle={normal:{color:function(e){if(e&&e.value){if(e.value<i[1])return"#02E100";if(e.value>i[1]&&e.value<=i[2])return"rgb(236,218,48)";if(e.value>i[2]&&e.value<=i[3])return"rgb(255,127,0)";if(e.value>i[3]&&e.value<=i[4])return"rgb(252,0,2)";if(e.value>i[4]&&e.value<=i[5])return"rgb(150,0,75)";if(e.value>i[5])return"rgb(127,3,31)"}}}}),s&&(u.grid.bottom=s),console.log("option:::",u),c.setOption(u)}},{key:"render",value:function(){var e=this.props.height;return a.a.createElement("div",{ref:"bar",style:{width:"100%",height:e}})}}])&&F(n.prototype,r),o&&F(n,o),t}(i.Component);K.propTypes={xData:s.a.array.isRequired,seriesData:s.a.array.isRequired,height:s.a.number.isRequired,rangeData:s.a.array,seriesName:s.a.string,titleText:s.a.string};var Q=n(7),X=n.n(Q);n(8);function Z(e,t,n,r){for(var o=[],i=0;i<e;i++)o.push(X.a.random(t,n,r));return o}n(18);function ee(e){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ne(e,t){return!t||"object"!==ee(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function re(e){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ie=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=ne(this,re(t).call(this,e))).state={},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(t,e),n=t,(r=[{key:"componentWillMount",value:function(){}},{key:"componentWillReceiveProps",value:function(e){}},{key:"render",value:function(){var e=this.props,t=e.imgUrl,n=e.width,r=e.imgHeight,o=e.imgWidth,i={};return r&&(i.height=r),o&&(i.width=o),a.a.createElement("div",{style:{width:n,margin:"0 auto",textAlign:"center"}},a.a.createElement("img",{src:t,style:i}))}}])&&te(n.prototype,r),o&&te(n,o),t}(i.Component);function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function se(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ce(e){return(ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}ie.propTypes={imgUrl:s.a.string.isRequired,width:s.a.string,imgWidth:s.a.string};var fe=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=se(this,ce(t).call(this,e))).state={},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ue(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.showChart(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.showChart(e)}},{key:"showChart",value:function(e){e.titleText,e.xData,e.seriesName,e.seriesData,e.rangeData,e.xName,e.yName;var t,n,r=e.value,o="#5DD1FA";r&&(n="",(t=r)>=0&&t<=50?n="#02e300":t>50&&t<=100?n="#feff01":t>100&&t<=150?n="#ff7f00":t>150&&t<=200?n="#fe0002":t>200&&t<=300?n="#98004b":t>300&&(n="#7f031f"),o=n);var i=E.init(this.refs.eChartCon),a={value:r,total:500},l={backgroundColor:"#fff",grid:{left:0,bottom:0},series:[{name:"仪表盘",type:"gauge",radius:"100%",splitNumber:10,axisLine:{lineStyle:{color:[[a.value/a.total,o],[1,"#f7f9fc"]],width:7}},axisLabel:{show:!1},axisTick:{show:!1},splitLine:{show:!1},itemStyle:{show:!1},detail:{formatter:function(e){return"".concat(e)},offsetCenter:[0,0],textStyle:{fontSize:"26",fontWeight:"600",color:"black"}},title:{offsetCenter:[0,"70%"],textStyle:{fontSize:"12",fontWeight:"500",color:"black"}},pointer:{show:!1,length:"95%"},data:[{name:"AQI",value:a.value}]}]};console.log("option:::",l),i.setOption(l)}},{key:"render",value:function(){var e=this.props.height;return a.a.createElement("div",{ref:"eChartCon",style:{width:"100%",height:e}})}}])&&le(n.prototype,r),o&&le(n,o),t}(i.Component);fe.propTypes={};n(20);var pe=c.Tabs.TabPane;function de(e){var t={height:40};return e.height&&(t.height=e.height),a.a.createElement(a.a.Fragment,null,a.a.createElement(c.Tabs,{className:"tabsSelect",size:e.size,defaultActiveKey:"1",onChange:function(t){console.log(t),e.onChange&&e.onChange(t)},style:t},e.tabList.map((function(e){return a.a.createElement(pe,{tab:e.name,key:e.key})}))))}function he(e){return a.a.createElement("span",{style:{paddingLeft:15,paddingRight:5}},e.children)}de.propTypes={size:s.a.string.isRequired,tabList:s.a.array.isRequired,onChange:s.a.func};n(22);function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function be(e,t){return!t||"object"!==me(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var xe={1:"1s",2:"2s",3:"3s",4:"4s",5:"5s"},we=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=be(this,ge(t).call(this,e))).state={selectedIx:12,pause:!0,time:2e3,timeMode:3,day:0},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(t,e),n=t,(r=[{key:"componentWillMount",value:function(){this.props.realTime||this.chooseTime({dayIx:0,ix:12})}},{key:"shouldComponentUpdate",value:function(e,t){return t.pause===this.state.pause||t.pause||this.timingHandler(e,t),t.selectedIx===this.state.selectedIx||t.pause||this.timingHandler(e,t),!0}},{key:"timingHandler",value:function(e,t){var n=t.selectedIx,r=t.pause,o=t.time,i=t.timeMode,a=t.day,l=this;r||(n>=71?l.setState({pause:!0}):window.timer=window.setTimeout((function(){3===i?(l.setState({selectedIx:n+1}),l.props.timingHandler&&l.props.timingHandler({selectedIx:n+1})):(l.setState({day:a+1}),l.props.timingHandler&&l.props.timingHandler({day:a+1}))}),o))}},{key:"componentWillUnmount",value:function(){window.timer&&clearTimeout(window.timer)}},{key:"renderScale",value:function(e){for(var t=this,n=this.state.selectedIx,r=[],o=0;o<24;o++)r.push({ix:o,dayIx:e});return r.map((function(e){return a.a.createElement("span",{className:"scaleText",onClick:t.chooseTime.bind(t,e,2===e.dayIx&&parseInt(b()().format("HH"))<e.ix),style:{background:24*e.dayIx+e.ix<=n?"rgb(40,136,212)":"#ddd"}},e.ix)}))}},{key:"chooseTime",value:function(e,t){if(t)c.notification.warning({message:"尚未取到此时数据"});else{var n=24*e.dayIx+e.ix;e.selectedIx=n,window.timer&&clearTimeout(window.timer),this.setState({selectedIx:n,pause:!0}),this.props.changeValue&&this.props.changeValue(e)}}},{key:"changeDate",value:function(e){var t=this.state.selectedIx;t=t%24+24*e,this.setState({selectedIx:t})}},{key:"changeStatus",value:function(){console.log("zzz"),window.timer&&clearTimeout(window.timer),this.setState({pause:!this.state.pause})}},{key:"showSlider",value:function(){this.refs.timeSlider.style.display="block"}},{key:"changeSlider",value:function(e){this.setState({time:1e3*e}),this.refs.timeSlider.style.display="none"}},{key:"changeTimeMode",value:function(){3===this.state.timeMode?this.setState({timeMode:7}):this.setState({timeMode:3})}},{key:"chooseDate",value:function(e){this.props.changeValue&&this.props.changeValue({day:e}),this.setState({day:e})}},{key:"getStyle",value:function(e){return this.state.day>=e?{background:"rgb(40,136,212)"}:{}}},{key:"render",value:function(){var e=this,t=this.props,n=t.width,r=t.bottom,o=t.timeChangeCheck,i=t.left,l=t.height,s=this.state,u=s.selectedIx,f=s.pause,p=s.timeMode;r||(r=0);var d=n-80,h=80;o&&(d-=40,h-=40);var m={fontSize:24,paddingTop:2,color:"#fff"},y={width:n,bottom:r};return i&&(y.left=i),l&&(y.height=l),a.a.createElement("div",{className:"lastTimeLine",style:y},a.a.createElement("div",{className:"ck60",onClick:this.changeStatus.bind(this)},f?a.a.createElement(c.Icon,{type:"caret-right",style:{fontSize:28,paddingTop:1,color:"#fff",lineHeight:"28px"}}):a.a.createElement(c.Icon,{type:"pause",style:m})),o&&a.a.createElement("div",{className:"ck60"},a.a.createElement(c.Icon,{type:"clock-circle",style:m,onClick:this.showSlider.bind(this)}),a.a.createElement("div",{ref:"timeSlider",style:{height:125,width:45,position:"absolute",display:"none",bottom:65}},a.a.createElement(c.Slider,{vertical:!0,marks:xe,min:1,max:5,onAfterChange:this.changeSlider.bind(this)}))),a.a.createElement("div",{className:"ck60",onClick:this.changeTimeMode.bind(this)},a.a.createElement("span",{className:"number"},3===p?"逐时":"逐日")),3===p&&a.a.createElement("div",{className:"timeContent",style:{width:d,marginLeft:h}},[1,2,3].map((function(t){return a.a.createElement("div",{className:"timeBlock"},a.a.createElement("div",{className:"time"},e.renderScale(t-1)),a.a.createElement("p",{onClick:e.changeDate.bind(e,t-1),style:Math.floor(u/24)>=t-1?{background:"rgb(40,136,212)"}:{}},b()().subtract("days",3-t).format("MM月DD日")))}))),7===p&&a.a.createElement("div",{className:"rightDateTent",style:{width:d,marginLeft:h}},[6,5,4,3,2,1,0].map((function(t){return a.a.createElement("div",{className:"rightDate",onClick:e.chooseDate.bind(e,t),style:e.getStyle(t)},b()().subtract("days",6-t).format("MM月DD日"))}))))}}])&&ye(n.prototype,r),o&&ye(n,o),t}(i.Component);function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ee(e,t){return(Ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}we.proptTypes={selectedDay:s.a.string.isRequired,changeValue:s.a.func.isRequired,timingHandler:s.a.func.isRequired,width:s.a.number.isRequired,timeChangeCheck:s.a.boolean};var Ce=function(e){function t(e){var n,r,o,i,l,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=Te(t).call(this,e))||"object"!==ke(o)&&"function"!=typeof o?Oe(r):o,i=Oe(n),l="gisContent",s=a.a.createRef(),l in i?Object.defineProperty(i,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[l]=s,n.state={},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ee(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.height,n=e.src;return a.a.createElement("iframe",{ref:this.gisContent,src:n,style:{width:"100%",height:t,border:0}})}}])&&Se(n.prototype,r),o&&Se(n,o),t}(i.Component);Ce.propTypes={src:s.a.string.isRequired,height:s.a.number.isRequired};n(24);function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _e(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pe(e,t){return(Pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Re=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=_e(this,Me(t).call(this,e))).state={realTbody:n.props.tbody},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pe(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.props.onRef&&this.props.onRef(this.refs.table)}},{key:"componentWillReceiveProps",value:function(e){this.setState({realTbody:e.tbody})}},{key:"sort",value:function(e){var t=this.state.realTbody;t=1===e?t.sort((function(e,t){return e[0]-t[0]})):t.sort((function(e,t){return t[0]-e[0]})),this.setState({realTbody:t})}},{key:"rowClick",value:function(e,t){this.props.rowClick&&this.props.rowClick(e,t)}},{key:"render",value:function(){var e,t=this,n=this.state.realTbody,r=this.props,o=r.showSort,i=r.size,l=r.rowIx;this.props.thead&&(e=a.a.createElement("tr",null,this.props.thead.map((function(e,n){return a.a.createElement("th",{key:e+"_"+n},0===n&&o?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"inline-block",verticalAlign:"middle",marginTop:2}},e),a.a.createElement("div",{className:"upDown"},a.a.createElement(c.Icon,{type:"up",onClick:function(){return t.sort(1)}}),a.a.createElement(c.Icon,{type:"down",onClick:function(){return t.sort(-1)}}))):a.a.createElement(a.a.Fragment,null,e))})))),this.props.theadContent&&(e=this.props.theadContent);var s=function(e){return{background:l===e?"rgb(230,247,255)":"none"}},u=n.map((function(e,n){return a.a.createElement("tr",{key:e+"_"+n,onClick:function(){return t.rowClick(e,n)},style:s(n)},e.map((function(e,t){return a.a.createElement("td",{key:e+"_"+t},e)})))})),f={maxHeight:500};this.props.maxHeight&&(f.maxHeight=this.props.maxHeight);var p="defaultThead";return i&&("small"===i?p="smallThead":"large"===i&&(p="largeThead")),a.a.createElement("table",{className:"simpleTable",ref:"table"},a.a.createElement("thead",{className:p},e),a.a.createElement("tbody",{style:f},u))}}])&&De(n.prototype,r),o&&De(n,o),t}(i.Component);Re.propTypes={tbody:s.a.array.isRequired,thead:s.a.array,theadContent:s.a.object,maxHeight:s.a.number,rowClick:s.a.func};n(26);function Le(e){return(Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ne(e,t){return!t||"object"!==Le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function He(e,t){return(He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ze=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Ne(this,qe(t).call(this,e))).state={},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&He(e,t)}(t,e)