"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[17937],{17937:function(e,t,a){a.r(t),a.d(t,{default:function(){return d}});var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"g-pa-md g-bg-white"},[t("div",{staticClass:"native-radio-group"},e._l(e.timeRange,(function(a){return t("label",{key:a.value,staticClass:"native-radio"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.winRateType,expression:"winRateType"}],attrs:{type:"radio"},domProps:{value:a.value,checked:e._q(e.winRateType,a.value)},on:{change:function(t){e.winRateType=a.value}}}),t("span",{staticClass:"native-radio-label"},[e._v(e._s(a.label))])])})),0),t("div",{staticClass:"render-pie"},[t("div",{ref:"starHistory",attrs:{id:"star-history"}})])])},s=[],n=a(73841),r={data(){return{timeRange:[{label:"最近30天",value:30},{label:"最近60天",value:60},{label:"最近90天",value:90}],chartLine:null,winRateType:30,loading:!1}},watch:{winRateType(e){console.log("newVal",e),this.renderChart()}},mounted(){this.initChart(),this.renderChart()},methods:{initChart(){const e=this.$refs.starHistory;console.log("$ele",e),this.chartLine=this.$echarts.init(e,null,{width:"800px",height:"600px"})},renderChart(){this.loading=!0,(0,n.hB)({shopId:this.$route.params.shopId,days:this.winRateType}).then((e=>{if(e){this.loading=!1,console.log("res",e);const t={xAxis:{type:"category",data:e?.map((e=>e.createTimeStr))},yAxis:{type:"value"},series:[{data:e?.map((e=>e.star)),type:"line"}]};this.chartLine.setOption(t)}}))}}},l=r,o=a(81656),h=(0,o.A)(l,i,s,!1,null,"39733663",null),d=h.exports}}]);