import{C as v}from"./CircleNumberChart.919f2108.js";import{f as o}from"./index.2adbb9ac.js";import{n}from"./vueComponentNormalizer.9ef17bb1.js";import{g as f}from"./live-manage.d907c119.js";import{V as m}from"./VListCard.47c5661c.js";import{C as p}from"./index.bb5f1b0a.js";import"./index.f5168bf8.js";var g=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"flex-h"},t._l(t.broadcastData,function(i){return a("div",{key:i.key,staticClass:"chart"},[a("CircleNumberChart",t._b({},"CircleNumberChart",i,!1))],1)}),0)},y=[];const $={components:{CircleNumberChart:v},data(){return{broadcastData:[{key:"count",title:"\u603B\u76F4\u64AD\u6570",value:0},{key:"duration",title:"\u603B\u76F4\u64AD\u65F6\u957F",unit:"\u5206\u949F",value:0},{key:"userCount",title:"\u7D2F\u8BA1\u89C2\u770B\u4EBA\u6570",unit:"\u4EBA",value:0},{key:"avgTime",title:"\u4EBA\u5747\u89C2\u770B\u76F4\u64AD\u65F6\u957F",unit:"\u5206\u949F",value:0}]}},methods:{async findData(){const t=await o("all-broadcast");this.broadcastData.forEach(e=>{e.value=t[e.key]})}},mounted(){this.findData()}},l={};var C=n($,g,y,!1,x,null,null,null);function x(t){for(let e in l)this[e]=l[e]}const k=function(){return C.exports}();var b=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"chart",attrs:{"data-title":"\u76F4\u64AD\u7EC3\u4E60\u6210\u7EE9\u7EDF\u8BA1"}})},D=[];const w={props:{live:{}},watch:{live:{deep:!0,immediate:!0,handler(t){t&&this.$nextTick(()=>{this.findData(t.id)})}}},methods:{async findData(t){this.chart&&this.chart.destroy(),this.chart=new p({container:this.$el,autoFit:!0,height:500,padding:[50,20,50,20]}),this.chart.scale("value",{alias:"\u6210\u7EE9"});const e=await o("detail-score-tower",{noCatch:!0,id:t});e.forEach(a=>{this.chart.annotation().text({position:[a.type,a.value],content:a.value,style:{textAlign:"center"},offsetY:-5}).text({position:[a.type,a.value],style:{textAlign:"center"},offsetY:-12})}),this.chart.data(e),this.chart.axis("type",{tickLine:{alignTick:!1}}),this.chart.axis("value",!1),this.chart.tooltip({showMarkers:!1,title:(a,i)=>i==null?void 0:i.name}),this.chart.interval().position("type*value"),this.chart.interaction("element-active"),this.chart.render()}}},c={};var L=n(w,b,D,!1,S,null,null,null);function S(t){for(let e in c)this[e]=c[e]}const M=function(){return L.exports}();var E=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"chart",attrs:{"data-title":"\u76F4\u64AD\u5728\u7EBF\u89C2\u770B\u4EBA\u6570"}})},F=[];const T={props:{live:{}},watch:{live:{deep:!0,immediate:!0,handler(t){t&&this.$nextTick(()=>{this.findData(t.id)})}}},methods:{async findData(t){var a,i;(i=(a=this.chart)==null?void 0:a.destroy)==null||i.call(a);const e=await o("detail-stu-count-line",{id:t});this.chart=new p({container:this.$el,autoFit:!0,height:500,padding:[60,30,30,30]}),this.chart.data(e),this.chart.tooltip({showCrosshairs:!0,title:(r,s)=>"\u65F6\u95F4\uFF1A"+s.t,itemTpl:`
  <ul class="g2-tooltip-list">
    <li class="g2-tooltip-list-item">
      <span style="background-color:{color};" class="g2-tooltip-marker"></span>
      <span class="g2-tooltip-name">\u4EBA\u6570\uFF1A</span><span class="g2-tooltip-value">{c}\u4EBA</span>
    </li>
  </ul>`}),this.chart.area().position("t*c"),this.chart.line().position("t*c").label("c").tooltip("t*c",(r,s)=>({t:r,c:s})),this.chart.point().position("t*c").tooltip("t*c",(r,s)=>({t:r,c:s})),this.chart.render()}}},u={};var j=n(T,E,F,!1,N,null,null,null);function N(t){for(let e in u)this[e]=u[e]}const A=function(){return j.exports}();var R=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"block",staticStyle:{display:"flex"}},[a("VListCard",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"mr-12",staticStyle:{width:"200px"},attrs:{title:"\u76F4\u64AD\u5217\u8868",dataList:t.liveList,loadMore:t.loadMore},on:{change:t.findChartsData}}),t._l(t.broadcastData,function(i){return a("div",{key:i.key,staticClass:"chart"},[a("CircleNumberChart",t._b({attrs:{value:i.value}},"CircleNumberChart",i,!1))],1)}),a("LiveDetailScoreTower",{attrs:{live:t.live}}),a("LiveDetailStuCountLine",{attrs:{live:t.live}})],2)},z=[];const P={components:{CircleNumberChart:v,VListCard:m,LiveDetailScoreTower:M,LiveDetailStuCountLine:A},data(){return{broadcastData:[{key:"duration",title:"\u76F4\u64AD\u65F6\u957F",unit:"\u5206\u949F",value:0},{key:"count",title:"\u6700\u9AD8\u89C2\u770B\u76F4\u64AD\u4EBA\u6570",value:0}],page_info:{currentPage:1,pageSize:10,total:0},live:null,loading:!1,overload:!1,liveList:[]}},methods:{async findChartsData(t){this.live=t;const e=await o("detail-broadcast",{id:t.id});this.broadcastData.forEach(a=>{a.value=e[a.key]||0})},async loadMore(){if(!(this.loading||this.overload)){this.loading=!0;try{const{data:t}=await f({page:this.page_info.currentPage,pageSize:this.page_info.pageSize});this.liveList.push(...t.data),this.overload=this.liveList.length===t.total,this.page_info.currentPage++}catch{}this.loading=!1}}}},h={};var V=n(P,R,z,!1,Y,null,null,null);function Y(t){for(let e in h)this[e]=h[e]}const B=function(){return V.exports}(),d={AllBroadcast:k,DetailVroadcast:B},I={components:d,render(t){const e=[];return e.push(t(Object.keys(d)[this.$store.statistic_tab_active])),t("div",e)}};let O,q;const _={};var G=n(I,O,q,!1,H,null,null,null);function H(t){for(let e in _)this[e]=_[e]}const tt=function(){return G.exports}();export{tt as default};
