2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
import{U as X,L as tt,w as et,c as st,a as ot}from"./element-plus.2c2b06a1.js";import{_ as at}from"./index.11d37b29.js";import{j as nt,k as lt}from"./workbench.f23847e8.js";import{h as J}from"./moment.40bc58bf.js";import{B as v}from"./vue-echarts.01ad0ec2.js";import{d as $,Z as D,r as f,i as it,af as ct,o as b,c as w,U as i,L as y,a as t,S as a,u as s,R as _,j as rt,T as pt,a9 as ut,a0 as dt,Q as _t,O as mt,bl as ht,bk as xt}from"./@vue.18505fe0.js";import{d as ft}from"./index.3ccf3a31.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.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.101084e3.js";import"./pinia.a969beab.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.b0c09b66.js";const p=g=>(ht("data-v-c1856ad7"),g=g(),xt(),g),yt={class:"workbench"},gt={class:"flex"},vt={class:"flex-1 h-[270px]"},Dt=p(()=>t("div",{class:"text-2xl"},"\u4ECA\u65E5\u8BA2\u5355\u91D1\u989D",-1)),bt=p(()=>t("span",{class:"text-[12px]"},"\xA5",-1)),wt={class:"text-2xl"},Ct=p(()=>t("div",{class:"w-[1px] bg-[#ccc] mr-4"},null,-1)),Ft={class:"flex-1 flex"},Et={class:"flex-1"},At={class:"text-1xl"},Bt={class:"ml-2 text-[18px]"},kt={class:"text-[12px]"},St={class:"text-info"},Ot=p(()=>t("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4: ",-1)),Lt={class:"text-success"},Nt={class:"text-1xl"},Rt={class:"ml-2 text-[18px]"},Mt={class:"text-[12px]"},Tt={class:"text-info"},jt=p(()=>t("span",{class:"text-info ml-2"},"\u6708\u73AF\u6BD4: ",-1)),It={class:"text-success"},Yt={class:"flex-1"},Vt={class:"text-1xl"},zt={class:"ml-2 text-[18px]"},Jt={class:"text-[12px]"},$t={class:"text-info"},Gt=p(()=>t("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4: ",-1)),Ut={class:"text-success"},Pt={class:"text-1xl"},Wt={class:"ml-2 text-[18px]"},Qt={class:"text-[12px]"},Zt={class:"text-info"},qt=p(()=>t("span",{class:"text-info ml-2"},"\u6708\u73AF\u6BD4: ",-1)),Ht={class:"text-success"},Kt={class:"mb-6 flex justify-between items-center"},Xt=p(()=>t("span",{class:"text-2xl"},"\u4EA4\u6613\u6982\u51B5",-1)),te={class:"flex items-center text-sm"},ee=p(()=>t("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1)),se={class:"flex flex-wrap"},oe={class:"mr-2"},ae={class:"text-info"},ne={class:"text-6xl mr-2"},le={key:0},ie={class:"text-info"},ce=$({name:"statistics_user"}),re=$({...ce,setup(g){const G=[{text:"\u8FD1\u4E00\u5468",value:()=>{const n=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,n]}},{text:"\u672C\u6708",value:()=>{const n=new Date,e=new Date;return e.setDate(1),n.setMonth(n.getMonth()+1),n.setDate(0),[e,n]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const n=new Date,e=new Date;return e.setMonth(e.getMonth()-1),[e,n]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const n=new Date,e=new Date;return e.setMonth(e.getMonth()-3),[e,n]}}],u=D({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}]}),C={tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:n=>{let e=`<p><b>${n[0].name}\u70B9</b></p>`;return n.forEach(o=>{e+=`<p><span style="display:inline-block;width:8px;height:4px;background-color:${o.color};"></span> ${o.seriesName}: <strong>${o.value}</strong></p>`}),e}},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}}}]},A=f({money:0,series:[]}),F=D(JSON.parse(JSON.stringify(C))),c=f([]),m=D(JSON.parse(JSON.stringify(C))),r=f([]),h=D(JSON.parse(JSON.stringify(C))),U=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],P=f(["RectangleCopy58","RectangleCopy48","RectangleCopy65","RectangleCopy62","RectangleCopy56","RectangleCopy55","RectangleCopy57","RectangleCopy65","RectangleCopy61","RectangleCopy52","RectangleCopy14","RectangleCopy32"]),d=f([new Date,new Date]),E=()=>{let n="";d.value[0]&&d.value[1]&&(n=J(d.value[0]).format("YYYY/MM/DD")+"-"+J(d.value[1]).format("YYYY/MM/DD")),nt({}).then(e=>{A.value={money:e.left.series[0].money,name:e.left.name},F.series[0].data=e.left.series[1].value,F.series[1].data=e.left.series[0].value,c.value=e.right.today.series,r.value=e.right.month,m.xAxis.data=e.right.today.x.map(o=>o),m.series[0].name=e.right.today.series[0].name,m.series[0].data=e.right.today.series[0].value,m.series[1].name=e.right.today.series[1].name,m.series[1].data=e.right.today.series[1].value,h.xAxis.data=Object.keys(e.right.month[0].value).map(o=>o),h.series[0].name=e.right.month[0].name,h.series[0].data=Object.values(e.right.month[0].value).map(o=>o),h.series[1].name=e.right.month[1].name,h.series[1].data=Object.values(e.right.month[1].value).map(o=>o)}),lt({date:n}).then(e=>{u.xAxis.data=[],u.series=[],console.log(e),u.legend.data=Object.values(e.series).map(o=>o.name),u.xAxis.data=e.x,u.series=Object.values(e.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 it(()=>{E()}),(n,e)=>{const o=tt,W=X,Q=et,Z=at,q=ct("Warning"),H=st,K=ot;return b(),w("div",yt,[i(o,{shadow:"never",class:"!border-none"},{default:y(()=>{var l,x,B,k,S,O,L,N,R,M,T,j,I,Y,V,z;return[t("div",gt,[t("div",vt,[Dt,t("div",null,[bt,t("span",wt,a(s(A).money||"0.00"),1)]),i(s(v),{style:{height:"200px"},option:s(F),autoresize:!0},null,8,["option"])]),Ct,t("div",Ft,[t("div",Et,[t("div",At,[_(a((l=s(c)[0])==null?void 0:l.name),1),t("span",Bt,a((x=s(c)[0])==null?void 0:x.now_money),1)]),t("div",kt,[t("span",St,"\u6628\u65E5: "+a((B=s(c)[0])==null?void 0:B.last_money),1),Ot,t("span",Lt,a((k=s(c)[0])==null?void 0:k.rate)+"%",1)]),i(s(v),{style:{height:"160px","margin-bottom":"20px"},option:s(m),autoresize:!0},null,8,["option"]),t("div",Nt,[_(a((S=s(r)[0])==null?void 0:S.name),1),t("span",Rt,a((O=s(r)[0])==null?void 0:O.now_money),1)]),t("div",Mt,[t("span",Tt,"\u4E0A\u6708: "+a((L=s(r)[0])==null?void 0:L.last_money),1),jt,t("span",It,a((N=s(r)[0])==null?void 0:N.rate)+"%",1)])]),t("div",Yt,[t("div",Vt,[_(a((R=s(c)[1])==null?void 0:R.name),1),t("span",zt,a((M=s(c)[1])==null?void 0:M.now_money),1)]),t("div",Jt,[t("span",$t,"\u6628\u65E5: "+a((T=s(c)[1])==null?void 0:T.last_money),1),Gt,t("span",Ut,a((j=s(c)[1])==null?void 0:j.rate)+"%",1)]),i(s(v),{style:{height:"160px","margin-bottom":"20px"},option:s(h),autoresize:!0},null,8,["option"]),t("div",Pt,[_(a((I=s(r)[1])==null?void 0:I.name),1),t("span",Wt,a((Y=s(r)[1])==null?void 0:Y.now_money),1)]),t("div",Qt,[t("span",Zt,"\u4E0A\u6708: "+a((V=s(r)[1])==null?void 0:V.last_money),1),qt,t("span",Ht,a((z=s(r)[1])==null?void 0:z.rate)+"%",1)])])])])]}),_:1}),i(o,{shadow:"never",class:"mt-4 !border-none"},{default:y(()=>[t("div",Kt,[Xt,t("div",te,[ee,i(W,{modelValue:s(d),"onUpdate:modelValue":e[0]||(e[0]=l=>rt(d)?d.value=l:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:G,onChange:E},null,8,["modelValue"]),i(Q,{type:"primary",class:"ml-4",onClick:E},{default:y(()=>[_("\u67E5\u8BE2")]),_:1})])]),t("div",se,[(b(!0),w(pt,null,ut(s(u).series,(l,x)=>(b(),w("div",{class:"w-1/5 flex mb-6",key:x},[t("div",oe,[t("div",{class:"rounded-full p-2",style:dt({"background-color":U[x%4]})},[i(Z,{iconName:s(P)[x],white:"",className:"text-6xl"},null,8,["iconName"])],4)]),t("div",null,[t("div",ae,[_(a(l.name)+" ",1),i(K,{class:"box-item",effect:"dark",content:l.desc,placement:"top-start"},{default:y(()=>[i(H,null,{default:y(()=>[i(q)]),_:1})]),_:2},1032,["content"])]),t("div",null,[t("span",ne,a(l.money),1),l.money>0?(b(),w("span",le,a(l.cash_title),1)):_t("",!0)]),t("div",ie,[_(" \u73AF\u6BD4\u589E\u957F: "),t("span",{class:mt(l.rate>0?"text-success":"text-danger")},a(l.rate)+"%",3)])])]))),128))]),t("div",null,[i(s(v),{style:{height:"400px"},option:s(u),autoresize:!0},null,8,["option"])])]),_:1})])}}});const Ze=ft(re,[["__scopeId","data-v-c1856ad7"]]);export{Ze as default};
|