import{f as u,s as P,o as R,b as S,a2 as E,a9 as M,aa as a,a4 as o,k as t,G as s,u as i,m as y,A as c}from"./vue-Dl1fzmsf.js";import{b as N}from"./index-sUMRYBhU.js";import{_ as O}from"./index-C-JhWVfG.js";import{ak as V,e as $,M as A,D as F,az as z,aA as G,aB as I,ab as L}from"./antd-vtmm7CAy.js";import"./vec2-4Cx-bOHg.js";const U={class:"salesCardExtra"},j={class:"salesTypeRadio"},q={__name:"proportion-sales",props:{loading:{type:Boolean,default:!1}},setup(g){const l=u("all"),m=u(),x=u(),v=u();function C(n){l.value=n.target.value}const _=P([]);function p(n,e){const r=new N(n,{appendPadding:10,data:e,angleField:"y",colorField:"x",radius:1,innerRadius:.6,label:{type:"spider",formatter:d=>`${d.x}: ${d.y.toLocaleString()}`},legend:!1,interactions:[{type:"element-selected"},{type:"element-active"}],statistic:{title:{content:"销售额"}}});r.render(),_.value.push(r)}const T=[{x:"家用电器",y:4544},{x:"食用酒水",y:3321},{x:"个护健康",y:3113},{x:"服饰箱包",y:2341},{x:"母婴产品",y:1231},{x:"其他",y:1231}],b=[{x:"家用电器",y:244},{x:"食用酒水",y:321},{x:"个护健康",y:311},{x:"服饰箱包",y:41},{x:"母婴产品",y:121},{x:"其他",y:111}],k=[{x:"家用电器",y:99},{x:"食用酒水",y:188},{x:"个护健康",y:344},{x:"服饰箱包",y:255},{x:"其他",y:65}];return R(()=>{p(m.value,T),p(x.value,b),p(v.value,k)}),S(()=>{_.value.forEach(n=>{var e;(e=n==null?void 0:n.destroy)==null||e.call(n)}),_.value=[]}),(n,e)=>{const r=$,d=A,w=F,f=z,D=G,B=I,h=L;return E(),M(h,{loading:g.loading,class:"salesCard",bordered:!1,title:"销售额类别占比",style:{height:"100%"}},{extra:a(()=>[o("div",U,[t(w,{placement:"bottomRight"},{overlay:a(()=>[t(d,null,{default:a(()=>[t(r,null,{default:a(()=>e[0]||(e[0]=[s("操作一")])),_:1}),t(r,null,{default:a(()=>e[1]||(e[1]=[s("操作二")])),_:1})]),_:1})]),default:a(()=>[t(i(V))]),_:1}),o("div",j,[t(D,{value:i(l),onChange:C},{default:a(()=>[t(f,{value:"all"},{default:a(()=>e[2]||(e[2]=[s(" 全部渠道 ")])),_:1}),t(f,{value:"online"},{default:a(()=>e[3]||(e[3]=[s(" 线上 ")])),_:1}),t(f,{value:"stores"},{default:a(()=>e[4]||(e[4]=[s(" 门店 ")])),_:1})]),_:1},8,["value"])])])]),default:a(()=>[o("div",null,[t(B,null,{default:a(()=>e[5]||(e[5]=[s("销售额")])),_:1}),y(o("div",{ref_key:"pieContainer1",ref:m},null,512),[[c,i(l)==="all"]]),y(o("div",{ref_key:"pieContainer2",ref:x},null,512),[[c,i(l)==="online"]]),y(o("div",{ref_key:"pieContainer3",ref:v},null,512),[[c,i(l)==="stores"]])])]),_:1},8,["loading"])}}},X=O(q,[["__scopeId","data-v-19053afe"]]);export{X as default};
