2 lines
5.8 KiB
JavaScript
2 lines
5.8 KiB
JavaScript
import{U as N,J as T,K as j,w as z,L as G}from"./element-plus.91c68cc0.js";import{_ as K}from"./index.9d5ebfa3.js";import{e as O,f as q}from"./workbench.ced7354b.js";import{h as C}from"./moment.40bc58bf.js";import{B as J}from"./vue-echarts.fe276ff7.js";import{a as Z}from"./system_store.2fa4ef1a.js";import{d as A,Z as f,r as y,i as H,o as m,c as d,U as u,L as _,a as o,u as s,T as E,a9 as B,K as I,j as Q,R as W,a0 as X,S as b}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.0e5577f4.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./resize-detector.4e96b72b.js";const $={class:"workbench"},ee={class:"mb-6 flex justify-between items-center"},te={class:"flex items-center text-sm"},oe={class:"flex items-center mr-4"},ne={class:"flex flex-wrap"},ae={class:"mr-2"},se={class:"text-info"},re={class:"text-6xl"},ue=A({name:"statistics_user"}),Ie=A({...ue,setup(le){const i=f({store_id:"",date:""}),k=[{text:"\u8FD1\u4E00\u5468",value:()=>{const t=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,t]}},{text:"\u672C\u6708",value:()=>{const t=new Date,e=new Date;return e.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const t=new Date,e=new Date;return e.setMonth(e.getMonth()-1),[e,t]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const t=new Date,e=new Date;return e.setMonth(e.getMonth()-3),[e,t]}}],l=f({xAxis:{type:"category",data:[0],axisLabel:{rotate:45,color:"#333"}},yAxis:{type:"value",name:"\u6570\u91CF",position:"left",axisLabel:{formatter:"{value}"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:["\u8BBF\u95EE\u91CF"]},itemStyle:{color:"red"},tooltip:{trigger:"axis"},series:[{name:"\u8BBF\u95EE\u91CF",data:[0],type:"line",smooth:!0}]}),M=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],D=f([{name:"\u4F59\u989D",type:"now_money",icon:"RectangleCopy",num:0,percent:0},{name:"\u91C7\u8D2D\u6B3E",type:"purchase_funds",icon:"RectangleCopy49",num:0,percent:0},{name:"\u65B0\u589E\u7528\u6237\u6570",type:"newUser",icon:"RectangleCopy53",num:0,percent:0},{name:"\u6210\u4EA4\u7528\u6237\u6570",type:"payPeople",icon:"RectangleCopy5",num:0,percent:0},{name:"\u4F1A\u5458\u6570",type:"rechargePeople",icon:"RectangleCopy59",num:0,percent:0},{name:"\u7D2F\u8BA1\u4F1A\u5458\u6570",type:"cumulativeRechargePeople",icon:"RectangleCopy6",num:0,percent:0},{name:"\u7D2F\u8BA1\u6210\u4EA4\u7528\u6237\u6570",type:"cumulativePayPeople",icon:"RectangleCopy9",num:0,percent:0},{name:"\u7D2F\u8BA1\u7528\u6237",type:"cumulativeUser",icon:"RectangleCopy54",num:0,percent:0}]),v=new Date,x=v.getFullYear(),g=v.getMonth()+1,R=new Date(x,g-1,1),L=new Date(x,g,0),r=y([R,L]),p=()=>{let t="";r.value[0]&&r.value[1]&&(t=C(r.value[0]).format("YYYY/MM/DD")+"-"+C(r.value[1]).format("YYYY/MM/DD")),i.date=t,O(i).then(e=>{D.forEach(n=>{n.num=e[n.type].num,n.percent=e[n.type].percent})}),q(i).then(e=>{l.xAxis.data=[],l.series=[],l.legend.data=e.series.map(n=>n.name),l.xAxis.data=e.xAxis,l.series=e.series.map(n=>({type:"line",smooth:!0,data:n.value,name:n.name}))})},c=y(!1),F=y([]),V=(t="")=>{c.value=!0,Z({name:t,page_size:50}).then(e=>{F.value=e.lists,setTimeout(()=>{c.value=!1},300)}).catch(e=>{setTimeout(()=>{c.value=!1},300)})};return H(()=>{p()}),(t,e)=>{const n=T,Y=j,U=N,P=z,S=K,h=G;return m(),d("div",$,[u(h,{shadow:"never",class:"!border-none"},{default:_(()=>[o("div",ee,[e[4]||(e[4]=o("span",{class:"text-2xl"},"\u7528\u6237\u6982\u51B5",-1)),o("div",te,[o("div",oe,[u(Y,{modelValue:s(i).store_id,"onUpdate:modelValue":e[0]||(e[0]=a=>s(i).store_id=a),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":V,loading:s(c),style:{width:"240px"},onChange:p},{default:_(()=>[(m(!0),d(E,null,B(s(F),a=>(m(),I(n,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),e[3]||(e[3]=o("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1)),u(U,{modelValue:s(r),"onUpdate:modelValue":e[1]||(e[1]=a=>Q(r)?r.value=a:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:k,onChange:p},null,8,["modelValue"]),u(P,{type:"primary",class:"ml-4",onClick:p},{default:_(()=>e[2]||(e[2]=[W("\u67E5\u8BE2")])),_:1})])]),o("div",ne,[(m(!0),d(E,null,B(s(D),(a,w)=>(m(),d("div",{class:"w-1/5 flex mb-6",key:w},[o("div",ae,[o("div",{class:"rounded-full p-2",style:X({"background-color":M[w%8]})},[u(S,{iconName:a.icon,white:"",className:"text-6xl"},null,8,["iconName"])],4)]),o("div",null,[o("div",se,b(a.name),1),o("div",re,b(a.num),1)])]))),128))])]),_:1}),u(h,{shadow:"never",class:"mt-4 !border-none"},{default:_(()=>[o("div",null,[e[5]||(e[5]=o("div",{class:"mb-6 flex justify-between items-center"},[o("span",{class:"text-2xl"},"\u7528\u6237\u8D8B\u52BF")],-1)),u(s(J),{style:{height:"400px"},option:s(l),autoresize:!0},null,8,["option"])])]),_:1})])}}});export{Ie as default};
|