(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-28a0e608"],{"0a70":function(e,a,t){"use strict";t.r(a);var n=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("a-card",{attrs:{size:"small",title:e.group.groupTxt}},[t("a-dropdown",{attrs:{slot:"extra"},slot:"extra"},[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[e._l(e.group.charts,(function(a,n){return[t("a-menu-item",{key:n,on:{click:function(t){return e.handleMenuClick(a.head.code)}}},[e._v(e._s(a.head.name))])]}))],2),t("a-button",{staticClass:"ant-btn-background-ghost",attrs:{type:"primary",size:"small"}},[e._v("详情"),t("a-icon",{attrs:{type:"down"}})],1)],1),t("bar-and-line",{attrs:{barFields:e.barFields,lineFields:e.lineFields,dataSource:e.dataSouce,aliases:e.aliases}})],1)},i=[],r=t("1b56"),l=r["a"],s=t("2877"),o=Object(s["a"])(l,n,i,!1,null,"1807726a",null);a["default"]=o.exports},"1b56":function(module,__webpack_exports__,__webpack_require__){"use strict";var _components_chart_BarAndLine__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("e659");__webpack_exports__["a"]={name:"GroupTemplateCombination",mixins:[],components:{BarAndLine:_components_chart_BarAndLine__WEBPACK_IMPORTED_MODULE_0__["default"]},props:{group:{type:Object,default:{}}},data:function(){return{barType:"",barFields:[],lineFields:[],dataSouce:[],aliases:[]}},mounted:function(){this.getDataSource()},methods:{getDataSource:function(){var e=this;this.dataSouce=[],this.group.charts.forEach((function(a,t){var n=a.head.groupField.split(",");"line"===a.head.graphType?(n.forEach((function(n){e.lineFields.push(n+"line"+t),e.setAliases(a.items,n,"line"+t)})),e.setChartData(a,"line"+t,e.dataSouce)):"bar"===a.head.graphType&&(n.forEach((function(n){e.barFields.push(n+"bar"+t),e.setAliases(a.items,n,"bar"+t)})),e.setChartData(a,"bar"+t,e.dataSouce))}))},setChartData:function(e,a,t){var n;"json"===e.head.dataType&&e.head.cgrSql?n=JSON.parse(data.head.cgrSql.replace(/↵/g,"")):"sql"!==e.head.dataType&&"bean"!==e.head.dataType||!0!==e.head.aggregate?"sql"!==e.head.dataType&&"bean"!==e.head.dataType||!1!==e.head.aggregate||(n=e.data.data):n=e.data.aggregate;var i=e.head.xaxisField;t.length<=0?n.forEach((function(n,r){var l={type:n[i]},s=e.head.groupField.split(",");s.forEach((function(e){l[e+a]=n[e]})),t.push(l)})):n.forEach((function(n,r){if(r>t.length){var l={type:n[i]};t.push(l)}else{var s=e.head.groupField.split(",");s.forEach((function(e){t[r][e+a]=n[e]}))}}))},setAliases:function(e,a,t){var n=this;e.forEach((function(e){e.fieldName===a&&n.aliases.push({field:a+t,alias:e.fieldTxt})}))},handleLineClick:function(e){this.head.extendJs&&this.chartClick("line",e)},chartClick:function chartClick(type,msg){var onClick={};eval(this.head.extendJs),onClick&&onClick[type]&&onClick[type].call(this,msg)},handleMenuClick:function(e){this.$router.push({path:"/online/cggraphreport/chart/"+e})}}}},c917:function(e,a,t){"use strict";t.d(a,"a",(function(){return n}));var n={methods:{handleClick:function(e,a){this.handleEvent("click",e,a)},handleEvent:function(e,a,t){this.$emit(e,a,t)}}}},e659:function(e,a,t){"use strict";t.r(a);var n=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{style:{padding:"0 50px 32px 0"}},[t("h4",{style:{marginBottom:"20px"}},[e._v(e._s(e.title))]),t("v-chart",{attrs:{forceFit:!0,height:e.height,data:e.data,scale:e.scale,padding:e.padding,onClick:e.handleClick}},[t("v-tooltip"),t("v-legend"),t("v-axis"),t("v-bar",{attrs:{position:"type*bar"}}),t("v-line",{attrs:{position:"type*line",color:"#2fc25b",size:3}})],1)],1)},i=[],r=t("c917"),l={name:"BarAndLine",mixins:[r["a"]],props:{title:{type:String,default:""},dataSource:{type:Array,default:function(){return[{type:"10:10",bar:200,line:1e3},{type:"10:15",bar:600,line:1e3},{type:"10:20",bar:200,line:1e3},{type:"10:25",bar:900,line:1e3},{type:"10:30",bar:200,line:1e3},{type:"10:35",bar:200,line:1e3},{type:"10:40",bar:100,line:1e3}]}},height:{type:Number,default:400}},data:function(){return{padding:{top:50,right:50,bottom:100,left:50},scale:[{dataKey:"bar",min:0},{dataKey:"line",min:0}]}},computed:{data:function(){return this.dataSource}}},s=l,o=t("2877"),c=Object(o["a"])(s,n,i,!1,null,null,null);a["default"]=c.exports}}]);