(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aabd2"],{"11fb":function(e,t,a){"use strict";a.r(t);var n=a("7a23");const o={class:"data-designer-chart-instance data-designer-chart-view-map-china",ref:"designerChartViewRef"},c={class:"data-designer-chart-container",ref:"designerChartViewInnerRef"};function r(e,t,a,r,l,i){return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",o,[Object(n["createElementVNode"])("div",c,null,512)],512)}var l=a("7104"),i=a.n(l),s=a("85b1"),u=a("22b4"),b=a("1be7"),d=a("9394"),h=a("3094"),p=a("2da7"),f=a("abd2"),m=a("b25d"),g=a("b37b"),O=a("f95e"),v=a("f04e"),j=a("5a0c"),w=a.n(j),y=a("ffad"),C=a("6fde"),D=a("a955"),T=a("3b20"),R=a("700f");u["a"]([d["a"],h["a"],p["a"],f["a"],m["a"],g["a"],O["a"]]);var E=Object(n["defineComponent"])({props:Object.assign({},T["h"].props),data(){return{engine:R["a"].ECHARTS,chartType:[D["N"].MAP_CHINA]}},mixins:[T["h"]],setup(e,{emit:t}){const a=Object(n["ref"])(),o=Object(n["ref"])(null),c=Object(n["ref"])(null);Object(n["onBeforeMount"])(()=>{b["k"](D["p"])||g(D["p"]).then(e=>{b["r"](D["p"],e)})}),Object(n["onMounted"])(()=>{l()});let r={};function l(){a.value=b["l"](c.value),r={toolbox:{show:!1,orient:"vertical",left:"right",top:"center",feature:{dataView:{readOnly:!1},restore:{},saveAsImage:{}}},visualMap:!1}}let u={};Object(n["watch"])(()=>e.chartData,t=>{t&&a.value&&Object(C["Cc"])(t)&&(Object(T["u"])(t,u)?(p(a.value,t,e.chartDataResult),u=Object(v["U"])(t)):u=Object(v["U"])(t))},{immediate:!0,deep:!0});let d={};function h(t,n){d=Object(v["U"])(e.chartDataResult),a.value||l(),p(a.value,t,n)}function p(t,a,n){if(!Object(T["v"])(a))return;if(!Object(C["Kc"])(a,n.chartData))return;const{scales:o=[],dimensions:c=[],chartStyleObj:l={}}=Object(C["Kb"])(a),{mapStyle:s={},legendStyle:u={}}=l,d=o.length&&c.length&&n.data||[];d.forEach(e=>{if(c.length&&!e.name&&(e.name=e[c[0].chartField.displayName]),o.length&&!e.value&&(e.value=e[o[0].chartField.displayName]||null,Object(C["qc"])(o[0])&&e.value)){o[0].chartField.ttype===v["y"].Time&&(e.value=`${D["Cb"]} ${e.value}`);const t=w()(e.value,[D["fb"].DATETIME,D["fb"].DATE,D["fb"].YEAR]);e.value=t&&t.unix()}});const h=(new i.a.DataView).source(d),p=(new i.a.DataView).source(d).transform({type:"aggregate",fields:["value","value"],operations:["min","max"],as:["valueMin","valueMax"]});r.tooltip={trigger:"item",appendToBody:e.config.chartSwitch!==R["c"].FULL_SCREEN,formatter:e=>e.data||c.length?(Object(C["k"])(c,e),Object(C["Db"])(a,e.data)):""+e.name};let f="";o.length&&(f=o[0].chartField.displayName,o[0].aggType&&o[0].aggType!==D["z"].NONE&&(f+=`(${Object(y["vf"])(D["A"][o[0].aggType])})`));let O=[s.startColor||"#BAE7FF",s.endColor||D["Y"]],j={color:u.fontColor||"#333",fontSize:u.fontSize||12};if(Object(C["Wc"])(e.config)){const t=Object(C["Ub"])(e.config);O=[t.map.startColor,t.map.endColor],j=Object(C["sd"])(e.config,j,"main"),s.hoverColor=t.map.hoverColor}r.visualMap={type:"continuous",show:u.canShow,orient:"horizontal",top:u.planeLocation.includes("TOP")?"top":"bottom",left:u.planeLocation.includes("LEFT")?"left":u.planeLocation.includes("RIGHT")?"right":"center",min:p.rows.length&&p.rows[0].valueMin,max:p.rows.length&&p.rows[0].valueMax,text:["",f],realtime:!1,calculable:!0,inRange:{color:O},textStyle:Object.assign({},j),formatter:e=>Object(C["qc"])(o[0])&&e?w.a.unix(e).format(D["fb"][o[0].chartField.ttype]):e};const E=Object(C["Wb"])(s);r.series=[{type:"map",map:E,top:40,label:Object(C["mb"])(a,e.config),itemStyle:{borderWidth:.5,borderColor:s.lineColor,areaColor:s.backgroundColor},emphasis:{label:{show:!0},itemStyle:{areaColor:s.hoverColor}},select:{label:{show:!0},itemStyle:{areaColor:s.hoverColor}},data:h.rows}],b["k"](E)?m(t,r,a):g(E).then(e=>{b["r"](E,e),m(t,r,a)})}Object(n["watch"])(()=>e.chartDataResult.data,()=>{Object(C["Kc"])(d,e.chartDataResult)||(o.value?h(e.chartData,e.chartDataResult):Object(n["onMounted"])(()=>{h(e.chartData,e.chartDataResult)}))},{immediate:!0,deep:!0});const f=Object(s["a"])(t=>{var a,n;const o=Object(T["w"])(t,null===(a=e.getCurrentDrillDownConfig)||void 0===a?void 0:a.call(e),e.chartData.id);o&&(null===(n=e.pushBreadcrumbEvent)||void 0===n||n.call(e,o)),Object(T["s"])(e.chartData,e.openDomGoto)},500);function m(e,t,a){const n={notMerge:!1,lazyUpdate:!0};e.setOption(t,n),e.setOption(t,n),e.on("click",e=>{const{type:t,seriesType:a,componentSubType:n,componentType:o,data:c}=e;"click"===t&&"map"===a&&"map"===n&&"series"===o&&f(c)})}function g(e){return fetch(`https://pamirs.oss-cn-hangzhou.aliyuncs.com/geov3/full/${e}.json`).then(e=>e.json())}return Object(T["B"])(e,a),{designerChartViewRef:o,designerChartViewInnerRef:c,chart:a}}}),S=a("6b0d"),M=a.n(S);const k=M()(E,[["render",r]]);t["default"]=k}}]);