moreShopAdmin/dist/admin/assets/index.6cb5382b.js

2 lines
5.1 KiB
JavaScript

import{S as E,w as A,L as w}from"./element-plus.78e68aed.js";import{_ as R}from"./index.6ea3f1c3.js";import{d as b,e as k}from"./workbench.8615f658.js";import{h as _}from"./moment.40bc58bf.js";import{B as M}from"./vue-echarts.01ad0ec2.js";import{d as g,Z as F,r as P,i as L,o as c,c as p,U as r,L as x,a as t,u as i,j as U,R as D,T as Y,a9 as N,a0 as V,S as l,O as S}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.de0baa52.js";import"./lodash.60201f64.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./resize-detector.4e96b72b.js";const T={class:"workbench"},z={class:"mb-6 flex justify-between items-center"},j=t("span",{class:"text-2xl"},"\u7528\u6237\u6982\u51B5",-1),G={class:"flex items-center text-sm"},O=t("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),Z={class:"flex flex-wrap"},q={class:"mr-2"},H={class:"text-info"},I={class:"text-6xl"},J={class:"text-info"},K=g({name:"statistics_user"}),Le=g({...K,setup(Q){const C=[{text:"\u8FD1\u4E00\u5468",value:()=>{const o=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,o]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const o=new Date,e=new Date;return e.setMonth(e.getMonth()-1),[e,o]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const o=new Date,e=new Date;return e.setMonth(e.getMonth()-3),[e,o]}}],s=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}]}),f=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],m=F([{name:"\u8BBF\u5BA2\u6570",type:"people",icon:"RectangleCopy",num:0,percent:0},{name:"\u6D4F\u89C8\u91CF",type:"browse",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:"\u8BBF\u5BA2-\u652F\u4ED8\u8F6C\u6362\u7387",type:"payPercent",icon:"RectangleCopy4",num:0,percent:0},{name:"\u6FC0\u6D3B\u4ED8\u8D39\u4F1A\u5458\u6570",type:"payUser",icon:"RectangleCopy7",num:0,percent:0},{name:"\u5145\u503C\u7528\u6237\u6570",type:"rechargePeople",icon:"RectangleCopy59",num:0,percent:0},{name:"\u5BA2\u5355\u4EF7",type:"payPrice",icon:"RectangleCopy15",num:0,percent:0},{name:"\u7D2F\u8BA1\u7528\u6237",type:"cumulativeUser",icon:"RectangleCopy54",num:0,percent:0},{name:"\u7D2F\u8BA1\u4ED8\u8D39\u4F1A\u5458\u6570",type:"cumulativePayUser",icon:"RectangleCopy7",num:0,percent:0},{name:"\u7D2F\u8BA1\u5145\u503C\u7528\u6237\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}]),a=P(["",""]),d=()=>{let o="";a.value[0]&&a.value[1]&&(o=_(a.value[0]).format("YYYY/MM/DD")+"-"+_(a.value[1]).format("YYYY/MM/DD")),b({date:o}).then(e=>{m.forEach(n=>{n.num=e[n.type].num,n.percent=e[n.type].percent})}),k({date:o}).then(e=>{s.xAxis.data=[],s.series=[],s.legend.data=e.series.map(n=>n.name),s.xAxis.data=e.xAxis,s.series=e.series.map(n=>({type:"line",smooth:!0,data:n.value,name:n.name}))})};return L(()=>{d()}),(o,e)=>{const n=E,h=A,B=R,v=w;return c(),p("div",T,[r(v,{shadow:"never",class:"!border-none"},{default:x(()=>[t("div",z,[j,t("div",G,[O,r(n,{modelValue:i(a),"onUpdate:modelValue":e[0]||(e[0]=u=>U(a)?a.value=u:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:C},null,8,["modelValue"]),r(h,{type:"primary",class:"ml-4",onClick:d},{default:x(()=>[D("\u67E5\u8BE2")]),_:1})])]),t("div",Z,[(c(!0),p(Y,null,N(i(m),(u,y)=>(c(),p("div",{class:"w-1/5 flex mb-6",key:y},[t("div",q,[t("div",{class:"rounded-full p-2",style:V({"background-color":f[y%8]})},[r(B,{iconName:u.icon,white:"",className:"text-6xl"},null,8,["iconName"])],4)]),t("div",null,[t("div",H,l(u.name),1),t("div",I,l(u.num),1),t("div",J,[D("\u73AF\u6BD4\u589E\u957F: "),t("span",{class:S(u.percent>0?"text-success":"text-danger")},l(u.percent)+"%",3)])])]))),128))]),t("div",null,[r(i(M),{style:{height:"400px"},option:i(s),autoresize:!0},null,8,["option"])])]),_:1})])}}});export{Le as default};