(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5fcc42b3"],{9602:function(t,e,o){"use strict";o("f48e")},c434:function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"module-box"},[o("div",{staticClass:"chang-btn",on:{click:function(e){t.isUp=!t.isUp,t.setOption()}}},[t._v("\n "+t._s(t.isUp?"升序▲":"降序▼")+"\n ")]),t._v(" "),o("div",{ref:"cityScore",staticClass:"city-score"})])},n=[],i=o("313e"),a=o.n(i);function s(t){return u(t)||f(t)||l(t)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){if(t){if("string"==typeof t)return p(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?p(t,e):void 0}}function f(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return p(t)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var y=null,m={name:"city-score",data:function(){return{isUp:!0,dataList:[{name:"郑州",score:153},{name:"洛阳",score:153},{name:"南阳",score:243},{name:"信阳",score:53}]}},methods:{setOption:function(){var t=this;if(y){var e=this.dataList.sort((function(e,o){return t.isUp?e.score-o.score:o.score-e.score})),o=e.map((function(t){return t.name})),r=e.map((function(t){return t.score})),n=Math.floor(1.4*Math.max.apply(Math,s(r)));n=e.map((function(){return n})),y.setOption({tooltip:{trigger:"axis"},grid:{right:20,left:50,top:30,bottom:20},xAxis:[{type:"category",axisLine:{lineStyle:{color:"#0D496E"}},axisLabel:{show:!0,textStyle:{fontSize:12,color:"#ADB1B4"}},data:o},{type:"category",show:!1,data:o}],yAxis:{type:"value",splitLine:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,textStyle:{fontSize:12,color:"#ADB1B4"}}},series:[{name:"评分",data:r,type:"pictorialBar",barWidth:48,symbol:"triangle",label:{show:!0,position:"top",textStyle:{fontSize:16,color:"#fff"}},itemStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(30, 231, 231, 0.87)"},{offset:1,color:"rgba(30, 231, 231, 0)"}],global:!1}}},{tooltip:{show:!1},xAxisIndex:1,itemStyle:{color:"rgba(180, 180, 180, 0.2)"},data:n,barWidth:48,emphasis:{itemStyle:{color:{type:"linear",x:0,x2:0,y:0,y2:1,colorStops:[{offset:0,color:"rgba(64, 247, 176, 0.25)"},{offset:1,color:"rgba(17, 34, 64, 0.25)"}]}}},type:"bar"}]})}}},mounted:function(){var t=this;y=a.a.init(this.$refs.cityScore),window.addEventListener("resize",(function(){t.$nextTick((function(){y.resize()}))})),this.setOption()}},d=m,h=(o("9602"),o("2877")),b=Object(h["a"])(d,r,n,!1,null,"132052ec",null);e["default"]=b.exports},f48e:function(t,e,o){}}]);
|