diff --git a/.gitignore b/.gitignore
index 3e1d210d..c53e59b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ yarn-error.log*
test/unit/coverage
test/e2e/reports
selenium-debug.log
+package-lock.json
+.DS_Store
\ No newline at end of file
diff --git a/README.md b/README.md
index 2063d7f0..f470a278 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,8 @@
此项目是 vue + element-ui 构建的后台管理系统,是后台项目[node-elm](https://github.com/bailicangdu/node-elm) 的管理系统,所有的数据都是从服务器实时获取的真实数据,具有真实的注册、登陆、管理数据、权限验证等功能。
+__注:项目预览地址和接口需要使用https访问哦!__
+
# 说明
@@ -17,7 +19,6 @@
> 传送门:[前端项目地址](https://github.com/bailicangdu/vue2-elm) 、 [后台系统地址](https://github.com/bailicangdu/node-elm) 、 [原生APP项目地址](https://github.com/bailicangdu/RN-elm)
-
## 技术栈
vue2 + vuex + vue-router + webpack + ES6/7 + less + element-ui
@@ -31,7 +32,7 @@ git clone https://github.com/bailicangdu/vue2-manage
cd vue2-manage
-npm install
+npm install 或 yarn(推荐)
npm run dev (访问线上后台系统)
@@ -47,20 +48,20 @@ npm run local (访问本地后台系统,需运行node-elm后台系统)
#### (可在后台管理系统添加商铺,食品等数据,并在前端地址查看效果)
-[查看效果请戳这里](http://cangdu.org/manage/)
+[查看效果请戳这里](https://cangdu.org/manage/)
### 前端项目网址
-[前端网址请戳这里](http://cangdu.org:8001/)(请用chrome手机模式预览)
-###### 移动端扫描下方二维码
+[前端网址请戳这里](https://cangdu.org/elm)(请用chrome手机模式预览)
-
+###### 移动端扫描下方二维码
+
# 功能列表
-- [x] 登陆/注销 -- 完成
+- [x] 登陆/注销 -- 完成
- [x] 添加商铺 -- 完成
- [x] 添加商品 -- 完成
- [x] 数据展示 -- 完成
@@ -73,7 +74,7 @@ npm run local (访问本地后台系统,需运行node-elm后台系统)
- [x] 富文本编辑器 -- 完成
-## 部分截图
+# 部分截图
@@ -81,7 +82,7 @@ npm run local (访问本地后台系统,需运行node-elm后台系统)
-
-## License
+# License
[GPL](https://github.com/bailicangdu/vue2-manage/blob/master/COPYING)
+
diff --git a/build/dev-server.js b/build/dev-server.js
index 64737a41..cb982aca 100644
--- a/build/dev-server.js
+++ b/build/dev-server.js
@@ -54,7 +54,7 @@ var context = config.dev.context
switch(process.env.NODE_ENV){
case 'local': var proxypath = 'http://localhost:8001'; break;
- case 'online': var proxypath = 'http://cangdu.org:8001'; break;
+ case 'online': var proxypath = 'http://elm.cangdu.org'; break;
}
var options = {
target: proxypath,
diff --git a/config/index.js b/config/index.js
index d18c684c..95b73a30 100644
--- a/config/index.js
+++ b/config/index.js
@@ -42,6 +42,7 @@ module.exports = {
'/payapi',
'/admin',
'/statis',
+ '/img',
],
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
diff --git a/manage/index.html b/manage/index.html
index 4d717dbf..c0e3efa3 100644
--- a/manage/index.html
+++ b/manage/index.html
@@ -1 +1 @@
-
e&&(e=t[n]);return e},min:function(t){for(var e=1/0,n=0;n o&&y(n,t.substring(o,a)),y(n,i[2],i[1]),o=P.lastIndex}o=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new i(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},i.create=function(t){return new i(t.x,t.y,t.width,t.height)};var u=i;t.exports=u},function(t,e,n){function i(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function r(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function o(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(t,e,n){c.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a=a;l++)s-=a;var u=r(n);return u>s&&(n="",u=0),s=t-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function f(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";var a=r(t,i);if(a<=n)return t;for(var s=0;;s++){if(a<=o||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?p(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;t=t.substr(0,l),a=r(t,i)}return""===t&&(t=e.placeholder),t}function p(t,e,n,i){for(var r=0,o=0,a=t.length;ol)t="",o=[];else if(null!=u)for(var h=d(u-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,p=o.length;c0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;as&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a
":", ")}(o):l(u(o)),c=i.getName(t),d=i.getItemVisual(t,"color");r.isObject(d)&&d.colorStops&&(d=(d.colorStops[0]||{}).color),d=d||"transparent";var g=h(d),v=this.name;return"\0-"===v&&(v=""),v=v?l(v)+(e?": ":"
"):"",e?g+v+a:v+g+(c?l(c)+": "+a:a)},isAnimationEnabled:function(){if(o.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){d(this,"data",f(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var n=this.ecModel,i=v.getColorFromPalette.call(this,t,e);return i||(i=n.getColorFromPalette(t,e)),i},getAxisTooltipData:null,getTooltipPosition:null});r.mixin(_,p.dataFormatMixin),r.mixin(_,v);var b=_;t.exports=b},function(t,e,n){var i=n(223),r=i.set,o=i.get,a={clearColorPalette:function(){r(this,"colorIdx",0),r(this,"colorNameMap",{})},getColorFromPalette:function(t,e){e=e||this;var n=o(e,"colorIdx")||0,i=o(e,"colorNameMap")||r(e,"colorNameMap",{});if(i.hasOwnProperty(t))return i[t];var a=this.get("color",!0)||[];if(a.length){var s=a[n];return t&&(i[t]=s),r(e,"colorIdx",(n+1)%a.length),s}}};t.exports=a},function(t,e,n){function i(t,e,n,i){var o={},s=t[1]-t[0],h=o.interval=l.nice(s/e,!0);null!=n&&h-1;t--){var e=v()((new Date).getTime()-864e5*t).format("YYYY-MM-DD");this.sevenDay.push(e)}this.getSevenData()},computed:{},methods:{initData:function(){var t=this;return h()(a.a.mark(function e(){var i;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=v()().format("YYYY-MM-DD"),l.a.all([n.i(m.D)(i),n.i(m.E)(i),n.i(m.F)(i),n.i(m.x)(),n.i(m.f)(),n.i(m.d)()]).then(function(e){t.userCount=e[0].count,t.orderCount=e[1].count,t.adminCount=e[2].count,t.allUserCount=e[3].count,t.allOrderCount=e[4].count,t.allAdminCount=e[5].count}).catch(function(t){console.log(t)});case 2:case"end":return e.stop()}},e,t)}))()},getSevenData:function(){var t=this;return h()(a.a.mark(function e(){var i,o;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=[[],[],[]],t.sevenDay.forEach(function(t){i[0].push(n.i(m.D)(t)),i[1].push(n.i(m.E)(t)),i[2].push(n.i(m.F)(t))}),o=[].concat(r()(i[0]),r()(i[1]),r()(i[2])),l.a.all(o).then(function(e){var n=[[],[],[]];e.forEach(function(t,e){1==t.status&&n[Math.floor(e/7)].push(t.count)}),t.sevenDate=n}).catch(function(t){console.log(t)});case 4:case"end":return e.stop()}},e,t)}))()}}}},,,,,,,,,,,function(t,e,n){t.exports={default:n(381),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var i=n(377),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&i(n[l-1]);l--);for(;s
"),r&&(o+=c(r),null!=n&&(o+=" : ")),null!=n&&(o+=c(i)),o},getData:function(){return this._data},setData:function(t){this._data=t}});a.mixin(d,l.dataFormatMixin);var f=d;t.exports=f},function(t,e,n){var i=n(207),r=n(206),o=i.extendComponentView({type:"marker",init:function(){this.markerGroupMap=r.createHashMap()},render:function(t,e,n){var i=this.markerGroupMap;i.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var i=t[r];i&&this.renderSeries(t,i,e,n)},this),i.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});t.exports=o},function(t,e,n){function i(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function r(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function o(t,e,n){var i=-1;do{i=Math.max(f.getPrecision(t.get(e,n)),i),t=t.stackedOn}while(t);return i}function a(t,e,n,i,r,a){var s=[],l=c(e,i,t),u=e.indicesOfNearest(i,l,!0)[0];s[r]=e.get(n,u,!0),s[a]=e.get(i,u,!0);var h=o(e,i,u);return h=Math.min(h,20),h>=0&&(s[a]=+s[a].toFixed(h)),s}function s(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!r(e)&&!d.isArray(e.coord)&&i){var o=i.dimensions,a=l(e,n,i,t);if(e=d.clone(e),e.type&&v[e.type]&&a.baseAxis&&a.valueAxis){var s=p(o,a.baseAxis.dim),u=p(o,a.valueAxis.dim);e.coord=v[e.type](n,a.baseDataDim,a.valueDataDim,s,u),e.value=e.coord[u]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],f=0;f<2;f++)if(v[h[f]]){var g=t.coordDimToDataDim(o[f])[0];h[f]=c(n,g,h[f])}e.coord=h}}return e}function l(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(i.dataDimToCoordDim(r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=i.coordDimToDataDim(r.baseAxis.dim)[0]):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=i.coordDimToDataDim(r.baseAxis.dim)[0],r.valueDataDim=i.coordDimToDataDim(r.valueAxis.dim)[0]),r}function u(t,e){return!(t&&t.containData&&e.coord&&!i(e))||t.containData(e.coord)}function h(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function c(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,function(t,e){isNaN(t)||(i+=t,r++)},!0),i/r}return t.getDataExtent(e,!0)["max"===n?1:0]}var d=n(206),f=n(210),p=d.indexOf,g=d.curry,v={min:g(a,"min"),max:g(a,"max"),average:g(a,"average")};e.dataTransform=s,e.getAxisInfo=l,e.dataFilter=u,e.dimValueGetter=h,e.numCalculate=c},function(t,e,n){n(454),n(455),n(460),n(458),n(456),n(457),n(459)},function(t,e,n){var i=n(207),r=n(206),o=n(238),a=i.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){a.superApply(this,"mergeDefaultAndTheme",arguments),r.each(this.option.feature,function(t,e){var n=o.get(e);n&&r.merge(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}}),s=a;t.exports=s},function(t,e,n){function i(t){return 0===t.indexOf("my")}var r=n(207),o=n(206),a=n(226),s=n(238),l=n(208),u=n(222),h=n(251),c=n(275),d=r.extendComponentView({type:"toolbox",render:function(t,e,n,r){function d(o,a){var l,h=x[o],c=x[a],d=v[h],p=new u(d,t,t.ecModel);if(h&&!c){if(i(h))l={model:p,onclick:p.option.onclick,featureName:h};else{var g=s.get(h);if(!g)return;l=new g(p,e,n)}m[h]=l}else{if(!(l=m[c]))return;l.model=p,l.ecModel=e,l.api=n}return!h&&c?void(l.dispose&&l.dispose(e,n)):!p.get("show")||l.unusable?void(l.remove&&l.remove(e,n)):(f(p,l,h),p.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},void(l.render&&l.render(p,e,n,r)))}function f(i,r,a){var s=i.getModel("iconStyle"),u=r.getIcons?r.getIcons():i.get("icon"),h=i.get("title")||{};if("string"==typeof u){var c=u,d=h;u={},h={},u[a]=c,h[a]=d}var f=i.iconPaths={};o.each(u,function(a,u){var c=l.createIcon(a,{},{x:-g/2,y:-g/2,width:g,height:g});c.setStyle(s.getModel("normal").getItemStyle()),c.hoverStyle=s.getModel("emphasis").getItemStyle(),l.setHoverStyle(c),t.get("showTitle")&&(c.__title=h[u],c.on("mouseover",function(){var t=s.getModel("emphasis").getItemStyle();c.setStyle({text:h[u],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){c.setStyle({textFill:null})})),c.trigger(i.get("iconStatus."+u)||"normal"),p.add(c),c.on("click",o.bind(r.onclick,r,e,n,u)),f[u]=c})}var p=this.group;if(p.removeAll(),t.get("show")){var g=+t.get("itemSize"),v=t.get("feature")||{},m=this._features||(this._features={}),x=[];o.each(v,function(t,e){x.push(e)}),new h(this._featureNames||[],x).add(d).update(d).remove(o.curry(d,null)).execute(),this._featureNames=x,c.layout(p,t,n),p.add(c.makeBackground(p.getBoundingRect(),t)),p.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var r=a.getBoundingRect(e,a.makeFont(i)),o=t.position[0]+p.position[0],s=t.position[1]+p.position[1]+g,l=!1;s+r.height>n.getHeight()&&(i.textPosition="top",l=!0);var u=l?-5-r.height:g+8;o+r.width/2>n.getWidth()?(i.textPosition=["100%",u],i.textAlign="right"):o-r.width/2<0&&(i.textPosition=[0,u],i.textAlign="left")}})}},updateView:function(t,e,n,i){o.each(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},updateLayout:function(t,e,n,i){o.each(this._features,function(t){t.updateLayout&&t.updateLayout(t.model,e,n,i)})},remove:function(t,e){o.each(this._features,function(n){n.remove&&n.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){o.each(this._features,function(n){n.dispose&&n.dispose(t,e)})}});t.exports=d},function(t,e,n){function i(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}function r(t){var e=[];return g.each(t,function(t,n){var i=t.categoryAxis,r=t.valueAxis,o=r.dim,a=[" "].concat(g.map(t.series,function(t){return t.name})),s=[i.model.getCategories()];g.each(t.series,function(t){s.push(t.getRawData().mapArray(o,function(t){return t}))});for(var l=[a.join(b)],u=0;u=0)return!0}function u(t){for(var e=t.split(/\n+/g),n=s(e.shift()).split(w),i=[],r=g.map(n,function(t){return{name:t,data:[]}}),o=0;o',p=window.open();p.document.write(f)}else{var g=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(g)}},a.register("saveAsImage",i);var l=i;t.exports=l},function(t,e,n){var i=n(207);n(427),n(463),n(464),i.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),i.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){})},function(t,e,n){function i(t){var e="left "+t+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)";return s.map(p,function(t){return t+"transition:"+e}).join(";")}function r(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),d(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function o(t){var e=[],n=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.getModel("textStyle"),s=t.get("padding");return n&&e.push(i(n)),o&&(h.canvasSupported?e.push("background-Color:"+o):(e.push("background-Color:#"+l.toHex(o)),e.push("filter:alpha(opacity=70)"))),d(["width","color","radius"],function(n){var i="border-"+n,r=f(i),o=t.get(r);null!=o&&e.push(i+":"+o+("color"===n?"":"px"))}),e.push(r(a)),null!=s&&e.push("padding:"+c.normalizeCssArray(s).join("px ")+"px"),e.join(";")+";"}function a(t,e){var n=document.createElement("div"),i=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;u.normalizeEvent(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}var s=n(206),l=n(232),u=n(231),h=n(214),c=n(221),d=s.each,f=c.toCamelCase,p=["","-webkit-","-moz-","-o-"];a.prototype={constructor:a,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+o(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(s.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var g=a;t.exports=g},function(t,e,n){var i=n(207),r=i.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});t.exports=r},function(t,e,n){function i(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(n instanceof y&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new y(n,e,e.ecModel))}return e}function r(t,e){return t.dispatchAction||c.bind(e.dispatchAction,e)}function o(t,e,n,i,r,o,a){var l=s(n),u=l.width,h=l.height;return null!=o&&(t+u+o>i?t-=u+o:t+=o),null!=a&&(e+h+a>r?e-=h+a:e+=a),[t,e]}function a(t,e,n,i,r){var o=s(n),a=o.width,l=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+l,r)-l,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function s(t){var e=t.clientWidth,n=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(t);i&&(e+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),n+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:n}}function l(t,e,n){var i=n[0],r=n[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-5;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+5;break;case"left":o=e.x-i-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+5,a=e.y+l/2-r/2}return[o,a]}function u(t){return"center"===t||"middle"===t}var h=n(207),c=n(206),d=n(214),f=n(462),p=n(221),g=n(210),v=n(208),m=n(347),x=n(225),y=n(222),_=n(348),b=n(230),w=n(349),S=c.bind,M=c.each,T=g.parsePercent,A=new v.Rect({shape:{x:-1,y:-1,width:2,height:2}}),C=h.extendComponentView({type:"tooltip",init:function(t,e){if(!d.node){var n=new f(e.getDom(),e);this._tooltipContent=n}},render:function(t,e,n){if(!d.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");_.register("itemTooltip",this._api,S(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!d.node){var o=r(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var s=A;s.position=[i.x,i.y],s.update(),s.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:s},o)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=m(i,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,position:i.position,target:l.el,event:{}},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},o))}},manuallyHideTip:function(t,e,n,i){var o=this._tooltipContent;this._alwaysShowContent||o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(r(i,n))},_manuallyAxisShowTip:function(t,e,n,r){var o=r.seriesIndex,a=r.dataIndex,s=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=s){var l=e.getSeriesByIndex(o);if(l){var u=l.getData(),t=i([u.getItemModel(a),l,(l.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:r.position}),!0}}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=c.bind(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,r=this._tooltipModel,o=[e.offsetX,e.offsetY],a=[],s=[],l=i([e.tooltipOption,r]);M(t,function(t){M(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,r=[];if(e&&null!=i){var o=w.getValueLabel(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);c.each(t.seriesDataIndices,function(a){var l=n.getSeriesByIndex(a.seriesIndex),u=a.dataIndexInside,h=l&&l.getDataParams(u);h.axisDim=t.axisDim,h.axisIndex=t.axisIndex,h.axisType=t.axisType,h.axisId=t.axisId,h.axisValue=b.getAxisRawValue(e.axis,i),h.axisValueLabel=o,h&&(s.push(h),r.push(l.formatTooltip(u,!0)))});var l=o;a.push((l?p.encodeHTML(l)+"
":"")+r.join("
"))}})},this),a.reverse(),a=a.join("
");var u=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,u,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(l,a,s,Math.random(),o[0],o[1],u)})},_showSeriesItemTooltip:function(t,e,n){var r=this._ecModel,o=e.seriesIndex,a=r.getSeriesByIndex(o),s=e.dataModel||a,l=e.dataIndex,u=e.dataType,h=s.getData(),c=i([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),d=c.get("trigger");if(null==d||"item"===d){var f=s.getDataParams(l,u),p=s.formatTooltip(l,!1,u),g="item_"+s.name+"_"+l;this._showOrMove(c,function(){this._showTooltipContent(c,p,f,g,t.offsetX,t.offsetY,t.position,t.target)}),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var o=new y(i,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,o,a,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,u=t.get("formatter");a=a||t.get("position");var h=e;if(u&&"string"==typeof u)h=p.formatTpl(u,n,!0);else if("function"==typeof u){var c=S(function(e,i){e===this._ticket&&(l.setContent(i),this._updatePosition(t,a,r,o,l,n,s))},this);this._ticket=i,h=u(n,i,c)}l.setContent(h),l.show(t),this._updatePosition(t,a,r,o,l,n,s)}},_updatePosition:function(t,e,n,i,r,s,h){var d=this._api.getWidth(),f=this._api.getHeight();e=e||t.get("position");var p=r.getSize(),g=t.get("align"),v=t.get("verticalAlign"),m=h&&h.getBoundingRect().clone();if(h&&m.applyTransform(h.transform),"function"==typeof e&&(e=e([n,i],s,r.el,m,{viewSize:[d,f],contentSize:p.slice()})),c.isArray(e))n=T(e[0],d),i=T(e[1],f);else if(c.isObject(e)){e.width=p[0],e.height=p[1];var y=x.getLayoutRect(e,{width:d,height:f});n=y.x,i=y.y,g=null,v=null}else if("string"==typeof e&&h){var _=l(e,m,p);n=_[0],i=_[1]}else{var _=o(n,i,r.el,d,f,g?null:20,v?null:20);n=_[0],i=_[1]}if(g&&(n-=u(g)?p[0]/2:"right"===g?p[0]:0),v&&(i-=u(v)?p[1]/2:"bottom"===v?p[1]:0),t.get("confine")){var _=a(n,i,r.el,d,f);n=_[0],i=_[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&M(e,function(e,i){var r=e.dataByAxis||{},o=t[i]||{},a=o.dataByAxis||[];(n&=r.length===a.length)&&M(r,function(t,e){var i=a[e]||{},r=t.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===o.length)&&M(r,function(t,e){var i=o[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){d.node||(this._tooltipContent.hide(),_.unregister("itemTooltip",e))}});t.exports=C},function(t,e,n){var i=n(206),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},o={};o.categoryAxis=i.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},r),o.valueAxis=i.merge({boundaryGap:[0,0],splitNumber:5},r),o.timeAxis=i.defaults({scale:!0,min:"dataMin",max:"dataMax"},o.valueAxis),o.logAxis=i.defaults({scale:!0,logBase:10},o.valueAxis);var a=o;t.exports=a},function(t,e,n){function i(t,e,n,i){r.each(h,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,i){var o=this.layoutMode,s=o?l(e):{},h=i.getTheme();r.merge(e,h.get(a+"Axis")),r.merge(e,this.getDefaultOption()),e.type=n(t,e),o&&u(e,s,o)},defaultOption:r.mergeAll([{},o[a+"Axis"],i],!0)})}),a.registerSubTypeDefaulter(t+"Axis",r.curry(n,t))}var r=n(206),o=n(465),a=n(224),s=n(225),l=s.getLayoutParams,u=s.mergeLayoutParam,h=["value","category","time","log"];t.exports=i},function(t,e,n){var i=n(206),r=n(276),o=function(t,e,n,i,o){r.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom"};o.prototype={constructor:o,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},i.inherits(o,r);var a=o;t.exports=a},function(t,e,n){function i(t){return this._axes[t]}var r=n(206),o=function(t){this._axes={},this._dimList=[],this.name=t||""};o.prototype={constructor:o,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return r.map(this._dimList,i,this)},getAxesByScale:function(t){return t=t.toLowerCase(),r.filter(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;r