import{_ as k}from"./index.76a66f15.js";import{a$ as u,C as c,D as g,b1 as T,b2 as e,aJ as t,aG as O,b4 as L,aV as i,b3 as f,E as m,b5 as E,bB as q,bs as S,by as P,bt as V,bx as I,c8 as N,bS as B,bU as A,bV as z,bL as R}from"./arco.f3c60d68.js";import{f as j}from"./filter-time-form.b15a940a.js";import"./chart.a626c034.js";import"./vue.7d1f2b31.js";/* empty css */const G={components:{},data(){return{data:[],loading:!1}},props:{},watch:{},computed:{},mounted(){this.getData()},methods:{getData(){this.loading=!0,this.$request.post("admin/data/goods/total",this.timeFilter).then(o=>{this.data=o.data,this.loading=!1}).catch(o=>{this.loading=!1})}}};const U={class:"goods-data-box"},W={class:"goods-data-row"},J=["src"];function H(o,a,r,_,n,h){const p=q,l=S,d=P,s=V,y=u("icon-info-circle"),v=I,x=N,b=B,D=A;return c(),g("div",U,[n.loading?(c(),T(d,{key:0,animation:!0},{default:e(()=>[t(l,{direction:"vertical",style:{width:"100%"},size:"large"},{default:e(()=>[t(p,{rows:7})]),_:1})]),_:1})):(c(!0),g(O,{key:1},L(n.data,($,F)=>(c(),g("div",W,[t(s,{heading:6,style:{width:"100px","padding-left":"20px"}},{default:e(()=>[i(f(o.$t("data.goods."+F)),1)]),_:2},1024),t(D,{gutter:[40,10],style:{flex:"1"}},{default:e(()=>[(c(!0),g(O,null,L($,(w,C)=>(c(),T(b,{span:4},{default:e(()=>[t(l,{size:10},{default:e(()=>[m("img",{src:"/assets/vue/assets/images/data/goods/"+C+".png",style:{width:"50px",height:"50px"}},null,8,J),t(l,{direction:"vertical",fill:"",size:4},{default:e(()=>[t(l,{size:3},{default:e(()=>[t(s,{type:"secondary"},{default:e(()=>[i(f(o.$t("data.goods."+C)),1)]),_:2},1024),w.tip?(c(),T(v,{key:0},{content:e(()=>[...a[0]||(a[0]=[])]),default:e(()=>[t(y)]),_:1})):E("",!0)]),_:2},1024),t(x,{heading:6},{default:e(()=>[i(f(w),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),256))]),_:2},1024)]))),256))])}const K=k(G,[["render",H],["__scopeId","data-v-63a1c85f"]]),M={components:{},data(){return{columns:[{title:"\u6392\u540D",slotName:"rank",align:"center",width:70},{title:"\u5546\u54C1\u540D\u79F0",slotName:"goods",align:"center"},{title:"\u5546\u54C1\u8BBF\u5BA2\u6570(UV)",dataIndex:"visitor_count",align:"center"},{title:"\u652F\u4ED8\u8F6C\u5316\u7387",dataIndex:"pay_rate",align:"center"}],data:[],tableLoading:!1}},props:{timeFilter:{type:[Object,Array],default:()=>[]}},watch:{timeFilter:{deep:!0,handler(o,a){this.getData()}}},computed:{},mounted(){this.getData()},methods:{getData(){this.tableLoading=!0,this.$request.post("admin/data/goods/visiterRank",this.timeFilter).then(o=>{this.tableLoading=!1,this.data=o.data}).catch(o=>{this.$message.error(o.msg)})}}};function Q(o,a,r,_,n,h){const p=u("course-item"),l=z;return c(),g("div",null,[t(l,{bordered:{wrapper:!1},pagination:!1,style:{width:"100%"},columns:n.columns,data:n.data},{rank:e(({rowIndex:d})=>[i(f(d+1),1)]),goods:e(({rowIndex:d,record:s})=>[t(p,{name:s.name,type:s.type,cover:s.cover},null,8,["name","type","cover"])]),_:1},8,["columns","data"])])}const X=k(M,[["render",Q]]),Y={components:{},data(){return{columns:[{title:"\u6392\u540D",slotName:"rank",align:"center",width:70},{title:"\u5546\u54C1\u540D\u79F0",slotName:"goods",align:"center"},{title:"\u652F\u4ED8\u4EBA\u6570",dataIndex:"user_count",align:"center"},{title:"\u652F\u4ED8\u91D1\u989D",dataIndex:"price_sum",align:"center",render:({record:o})=>"\xA5"+o.price_sum}],data:[],tableLoading:!1}},props:{timeFilter:{type:[Object,Array],default:()=>[]}},watch:{timeFilter:{deep:!0,handler(o,a){this.getData()}}},computed:{},mounted(){this.getData()},methods:{getData(){this.tableLoading=!0,this.$request.post("admin/data/goods/orderRank",this.timeFilter).then(o=>{this.tableLoading=!1,this.data=o.data}).catch(o=>{this.$message.error(o.msg)})}}};function Z(o,a,r,_,n,h){const p=u("course-item"),l=z;return c(),g("div",null,[t(l,{bordered:{wrapper:!1},pagination:!1,style:{width:"100%"},columns:n.columns,data:n.data},{rank:e(({rowIndex:d})=>[i(f(d+1),1)]),goods:e(({rowIndex:d,record:s})=>[t(p,{name:s.name,type:s.type,cover:s.cover},null,8,["name","type","cover"])]),_:1},8,["columns","data"])])}const tt=k(Y,[["render",Z]]);const et={components:{filterTimeForm:j,goodsVisiterTop:X,goodsOrderTop:tt,goodsTotal:K},data(){return{timeFilter:{unit:"date",time:this.$format.getDate()},structureChartOption:{},orderChartOption:{},linkColumns:[{title:"\u6392\u540D",dataIndex:"name"},{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"price"},{title:"\u652F\u4ED8\u4EBA\u6570",slotName:"link"},{title:"\u652F\u4ED8\u91D1\u989D",slotName:"status"}]}},methods:{filterOk(o){this.timeFilter=o},getData(){this.loading=!0,this.$request.post("admin/data/study/getStatistics",{time:this.timeType,user_id:this.userId}).then(o=>{this.loading=!1,this.data=o.data;var a={tooltip:{trigger:"axis"},yAxis:{type:"value"},xAxis:{type:"category",boundaryGap:!1,data:[]},legend:{data:[]},categories:[],series:[]},r={time:{name:"\u652F\u4ED8\u91D1\u989D(\u5143)",type:"line",data:[]},course:{name:"\u652F\u4ED8\u4EBA\u6570",type:"line",data:[]},user:{name:"\u5BA2\u5355\u4EF7(\u5143)",type:"line",stack:"Total",data:[]},user3:{name:"\u4E0B\u5355\u4EBA\u6570",type:"line",stack:"Total",data:[]},user2:{name:"\u4E0B\u5355\u91D1\u989D(\u5143)",type:"line",stack:"Total",data:[]},user1:{name:"\u5E97\u94FA\u8BBF\u5BA2\u6570",type:"line",stack:"Total",data:[]}};for(var _ in o.data.log){a.xAxis.data.push(_),a.categories.push(_);for(var n in r)o.data.log[_].hasOwnProperty(n)&&(a.legend.data.push(r[n].name),r[n].data.push(o.data.log[_][n]))}for(var n in r)r[n].data&&a.series.push(r[n]);a.title={text:"\u4EA4\u6613\u8D8B\u52BF",textStyle:{fontSize:14,fontStyle:"normal",fontWeight:"normal",color:"#333"}},this.structureChartOption={title:{text:"\u5706\u73AF\u56FE\u7684\u4F8B\u5B50",left:"center",top:"center",textStyle:{fontSize:14,fontStyle:"normal",fontWeight:"normal",color:"#333"}},tooltip:{trigger:"item"},legend:{top:"0%",left:"center"},series:[{type:"pie",avoidLabelOverlap:!1,label:{show:!1,position:"center"},labelLine:{show:!1},data:[{value:335,name:"\u8001\u6210\u4EA4\u7528\u6237\u652F\u4ED8\u91D1\u989D"},{value:234,name:"\u65B0\u6210\u4EA4\u7528\u6237\u652F\u4ED8\u91D1\u989D"}],radius:["40%","70%"]}]},this.orderChartOption=a})}},mounted(){this.getData()}},at={class:"container"},ot={class:"card-header-bar"},nt={class:"card-title"},st={class:"card-header-bar"},it={class:"card-title"},rt={class:"time-filter"};function lt(o,a,r,_,n,h){const p=N,l=u("goods-total"),d=R,s=u("filter-time-form"),y=V,v=u("icon-info-circle"),x=I,b=S,D=u("goods-visiter-top"),$=B,F=u("goods-order-top"),w=A;return c(),g("div",at,[t(d,{class:"general-card",bordered:!1},{title:e(()=>[m("div",ot,[m("div",nt,[t(p,{heading:6},{default:e(()=>[...a[0]||(a[0]=[i(" \u5546\u54C1\u603B\u89C8 ",-1)])]),_:1})]),a[1]||(a[1]=m("div",{class:"time-filter"},null,-1))])]),default:e(()=>[t(l)]),_:1}),t(d,{class:"general-card",bordered:!1,style:{"margin-top":"15px"}},{title:e(()=>[m("div",st,[m("div",it,[t(p,{heading:6},{default:e(()=>[...a[2]||(a[2]=[i(" \u5546\u54C1\u6392\u884C ",-1)])]),_:1})]),m("div",rt,[t(s,{onOk:h.filterOk},null,8,["onOk"])])])]),default:e(()=>[t(w,{class:"grid-demo",gutter:12},{default:e(()=>[t($,{span:12},{default:e(()=>[t(b,{style:{"margin-bottom":"10px"}},{default:e(()=>[t(y,null,{default:e(()=>[...a[3]||(a[3]=[i(" \u8BBF\u5BA2\u699CTOP5\u5546\u54C1 ",-1)])]),_:1}),t(x,null,{content:e(()=>[...a[4]||(a[4]=[i(" \u7B5B\u9009\u65F6\u95F4\u5185\uFF0C\u5E97\u94FA\u5185\u8BBF\u5BA2\u6570\u6700\u9AD85\u4E2A\u5546\u54C1\uFF08\u5305\u62EC\u514D\u8D39\u548C\u4ED8\u8D39\u7684\u5168\u90E8\u5546\u54C1\uFF09\u3002\u8F6C\u5316\u7387\uFF1A\u652F\u4ED8\u4EBA\u6570/\u8BBF\u5BA2\u6570 ",-1)])]),default:e(()=>[t(v)]),_:1})]),_:1}),t(D,{"time-filter":n.timeFilter},null,8,["time-filter"])]),_:1}),t($,{span:12},{default:e(()=>[t(b,{style:{"margin-bottom":"10px"}},{default:e(()=>[t(y,null,{default:e(()=>[...a[5]||(a[5]=[i(" \u652F\u4ED8\u699CTOP5\u5546\u54C1 ",-1)])]),_:1}),t(x,null,{content:e(()=>[...a[6]||(a[6]=[i(" \u7B5B\u9009\u65F6\u95F4\u5185\uFF0C\u5E97\u94FA\u5185\u652F\u4ED8\u91D1\u989D\u6700\u591A\u76845\u4E2A\u5546\u54C1\uFF08\u5305\u62EC\u514D\u8D39\u548C\u4ED8\u8D39\u7684\u5168\u90E8\u5546\u54C1\uFF09 ",-1)])]),default:e(()=>[t(v)]),_:1})]),_:1}),t(F,{"time-filter":n.timeFilter},null,8,["time-filter"])]),_:1})]),_:1})]),_:1})])}const gt=k(et,[["render",lt],["__scopeId","data-v-9a6497fa"]]);export{gt as default};