2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
import{U as H,L as K,w as X,c as tt,a as et}from"./element-plus.91c68cc0.js";import{_ as st}from"./index.42dc7264.js";import{j as ot,k as at}from"./workbench.705b8562.js";import{h as z}from"./moment.40bc58bf.js";import{B as y}from"./vue-echarts.fe276ff7.js";import{d as J,Z as g,r as f,i as nt,af as lt,o as v,c as D,U as i,L as h,a as e,S as a,u as s,R as d,j as it,T as rt,a9 as ct,a0 as pt,Q as ut,O as dt}from"./@vue.76ce7aa3.js";import{d as mt}from"./index.5347f220.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"./resize-detector.4e96b72b.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.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"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";const xt={class:"workbench"},_t={class:"flex"},ft={class:"flex-1 h-[270px]"},ht={class:"text-2xl"},yt={class:"flex-1 flex"},gt={class:"flex-1"},vt={class:"text-1xl"},Dt={class:"ml-2 text-[18px]"},wt={class:"text-[12px]"},bt={class:"text-info"},Ct={class:"text-success"},Ft={class:"text-1xl"},Et={class:"ml-2 text-[18px]"},At={class:"text-[12px]"},Bt={class:"text-info"},kt={class:"text-success"},Ot={class:"flex-1"},St={class:"text-1xl"},Lt={class:"ml-2 text-[18px]"},Nt={class:"text-[12px]"},Rt={class:"text-info"},Mt={class:"text-success"},Tt={class:"text-1xl"},jt={class:"ml-2 text-[18px]"},Yt={class:"text-[12px]"},Vt={class:"text-info"},zt={class:"text-success"},Jt={class:"mb-6 flex justify-between items-center"},It={class:"flex items-center text-sm"},$t={class:"flex flex-wrap"},Gt={class:"mr-2"},Ut={class:"text-info"},Pt={class:"text-6xl mr-2"},Wt={key:0},Qt={class:"text-info"},Zt=J({name:"statistics_user"}),qt=J({...Zt,setup(Ht){const I=[{text:"\u8FD1\u4E00\u5468",value:()=>{const n=new Date,t=new Date;return t.setDate(t.getDate()-7),[t,n]}},{text:"\u672C\u6708",value:()=>{const n=new Date,t=new Date;return t.setDate(1),n.setMonth(n.getMonth()+1),n.setDate(0),[t,n]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const n=new Date,t=new Date;return t.setMonth(t.getMonth()-1),[t,n]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const n=new Date,t=new Date;return t.setMonth(t.getMonth()-3),[t,n]}}],p=g({xAxis:{type:"category",data:[0],axisLabel:{rotate:45,color:"#333"}},yAxis:{type:"value",name:"\u91D1\u989D",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}]}),w={tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:n=>{let t=`<p><b>${n[0].name}\u70B9</b></p>`;return n.forEach(o=>{t+=`<p><span style="display:inline-block;width:8px;height:4px;background-color:${o.color};"></span> ${o.seriesName}: <strong>${o.value}</strong></p>`}),t}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:["\u6628\u5929","\u4ECA\u5929"],left:"3%",top:"3%"},xAxis:[{type:"category",boundaryGap:!1,axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1},grid:{show:!1}}],yAxis:[{type:"value",show:!1,spliteLine:{show:!1},axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1},grid:{show:!1}}],series:[{name:"\u6628\u5929",type:"line",smooth:!0,symbol:"none",itemStyle:{color:"#ccc"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#ccc"},{offset:.6,color:"#fff"}],global:!1}}},{name:"\u4ECA\u5929",type:"line",smooth:!0,symbol:"none",areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#5B8FF9"},{offset:.6,color:"#fff"}],global:!1}}}]},F=f({money:0,series:[]}),b=g(JSON.parse(JSON.stringify(w))),r=f([]),m=g(JSON.parse(JSON.stringify(w))),c=f([]),x=g(JSON.parse(JSON.stringify(w))),$=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],G=f(["RectangleCopy58","RectangleCopy48","RectangleCopy65","RectangleCopy62","RectangleCopy56","RectangleCopy55","RectangleCopy57","RectangleCopy65","RectangleCopy61","RectangleCopy52","RectangleCopy14","RectangleCopy32"]),u=f([new Date,new Date]),C=()=>{let n="";u.value[0]&&u.value[1]&&(n=z(u.value[0]).format("YYYY/MM/DD")+"-"+z(u.value[1]).format("YYYY/MM/DD")),ot({}).then(t=>{F.value={money:t.left.series[0].money,name:t.left.name},b.series[0].data=t.left.series[1].value,b.series[1].data=t.left.series[0].value,r.value=t.right.today.series,c.value=t.right.month,m.xAxis.data=t.right.today.x.map(o=>o),m.series[0].name=t.right.today.series[0].name,m.series[0].data=t.right.today.series[0].value,m.series[1].name=t.right.today.series[1].name,m.series[1].data=t.right.today.series[1].value,x.xAxis.data=Object.keys(t.right.month[0].value).map(o=>o),x.series[0].name=t.right.month[0].name,x.series[0].data=Object.values(t.right.month[0].value).map(o=>o),x.series[1].name=t.right.month[1].name,x.series[1].data=Object.values(t.right.month[1].value).map(o=>o)}),at({date:n}).then(t=>{p.xAxis.data=[],p.series=[],console.log(t),p.legend.data=Object.values(t.series).map(o=>o.name),p.xAxis.data=t.x,p.series=Object.values(t.series).map(o=>({type:"line",smooth:!0,data:o.value,name:o.name,money:o.money,rate:o.rate,desc:o.desc,cash_title:o.cash_title}))})};return nt(()=>{C()}),(n,t)=>{const o=K,U=H,P=X,W=st,Q=lt("Warning"),Z=tt,q=et;return v(),D("div",xt,[i(o,{shadow:"never",class:"!border-none"},{default:h(()=>{var l,_,E,A,B,k,O,S,L,N,R,M,T,j,Y,V;return[e("div",_t,[e("div",ft,[t[2]||(t[2]=e("div",{class:"text-2xl"},"\u4ECA\u65E5\u8BA2\u5355\u91D1\u989D",-1)),e("div",null,[t[1]||(t[1]=e("span",{class:"text-[12px]"},"\xA5",-1)),e("span",ht,a(s(F).money||"0.00"),1)]),i(s(y),{style:{height:"200px"},option:s(b),autoresize:!0},null,8,["option"])]),t[7]||(t[7]=e("div",{class:"w-[1px] bg-[#ccc] mr-4"},null,-1)),e("div",yt,[e("div",gt,[e("div",vt,[d(a((l=s(r)[0])==null?void 0:l.name),1),e("span",Dt,a((_=s(r)[0])==null?void 0:_.now_money),1)]),e("div",wt,[e("span",bt,"\u6628\u65E5: "+a((E=s(r)[0])==null?void 0:E.last_money),1),t[3]||(t[3]=e("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4: ",-1)),e("span",Ct,a((A=s(r)[0])==null?void 0:A.rate)+"%",1)]),i(s(y),{style:{height:"160px","margin-bottom":"20px"},option:s(m),autoresize:!0},null,8,["option"]),e("div",Ft,[d(a((B=s(c)[0])==null?void 0:B.name),1),e("span",Et,a((k=s(c)[0])==null?void 0:k.now_money),1)]),e("div",At,[e("span",Bt,"\u4E0A\u6708: "+a((O=s(c)[0])==null?void 0:O.last_money),1),t[4]||(t[4]=e("span",{class:"text-info ml-2"},"\u6708\u73AF\u6BD4: ",-1)),e("span",kt,a((S=s(c)[0])==null?void 0:S.rate)+"%",1)])]),e("div",Ot,[e("div",St,[d(a((L=s(r)[1])==null?void 0:L.name),1),e("span",Lt,a((N=s(r)[1])==null?void 0:N.now_money),1)]),e("div",Nt,[e("span",Rt,"\u6628\u65E5: "+a((R=s(r)[1])==null?void 0:R.last_money),1),t[5]||(t[5]=e("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4: ",-1)),e("span",Mt,a((M=s(r)[1])==null?void 0:M.rate)+"%",1)]),i(s(y),{style:{height:"160px","margin-bottom":"20px"},option:s(x),autoresize:!0},null,8,["option"]),e("div",Tt,[d(a((T=s(c)[1])==null?void 0:T.name),1),e("span",jt,a((j=s(c)[1])==null?void 0:j.now_money),1)]),e("div",Yt,[e("span",Vt,"\u4E0A\u6708: "+a((Y=s(c)[1])==null?void 0:Y.last_money),1),t[6]||(t[6]=e("span",{class:"text-info ml-2"},"\u6708\u73AF\u6BD4: ",-1)),e("span",zt,a((V=s(c)[1])==null?void 0:V.rate)+"%",1)])])])])]}),_:1}),i(o,{shadow:"never",class:"mt-4 !border-none"},{default:h(()=>[e("div",Jt,[t[10]||(t[10]=e("span",{class:"text-2xl"},"\u4EA4\u6613\u6982\u51B5",-1)),e("div",It,[t[9]||(t[9]=e("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1)),i(U,{modelValue:s(u),"onUpdate:modelValue":t[0]||(t[0]=l=>it(u)?u.value=l:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:I,onChange:C},null,8,["modelValue"]),i(P,{type:"primary",class:"ml-4",onClick:C},{default:h(()=>t[8]||(t[8]=[d("\u67E5\u8BE2")])),_:1})])]),e("div",$t,[(v(!0),D(rt,null,ct(s(p).series,(l,_)=>(v(),D("div",{class:"w-1/5 flex mb-6",key:_},[e("div",Gt,[e("div",{class:"rounded-full p-2",style:pt({"background-color":$[_%4]})},[i(W,{iconName:s(G)[_],white:"",className:"text-6xl"},null,8,["iconName"])],4)]),e("div",null,[e("div",Ut,[d(a(l.name)+" ",1),i(q,{class:"box-item",effect:"dark",content:l.desc,placement:"top-start"},{default:h(()=>[i(Z,null,{default:h(()=>[i(Q)]),_:1})]),_:2},1032,["content"])]),e("div",null,[e("span",Pt,a(l.money),1),l.money>0?(v(),D("span",Wt,a(l.cash_title),1)):ut("",!0)]),e("div",Qt,[t[11]||(t[11]=d(" \u73AF\u6BD4\u589E\u957F: ")),e("span",{class:dt(l.rate>0?"text-success":"text-danger")},a(l.rate)+"%",3)])])]))),128))]),e("div",null,[i(s(y),{style:{height:"400px"},option:s(p),autoresize:!0},null,8,["option"])])]),_:1})])}}});const je=mt(qt,[["__scopeId","data-v-c1856ad7"]]);export{je as default};
|