moreShopAdmin/build/admin/assets/index.8f0e96c8.js

2 lines
5.0 KiB
JavaScript
Raw Normal View History

2024-11-15 15:27:25 +08:00
import{U as j,P as S,w as T,b as U,L as z}from"./element-plus.91c68cc0.js";import{d as R,s as q}from"./workbench.e2bba501.js";import{h as d}from"./moment.40bc58bf.js";import{B as I}from"./vue-echarts.fe276ff7.js";import{d as b,Z as F,r as _,i as K,o as p,c as g,U as m,L as f,a as o,u as s,j as O,R as Q,T as Z,a9 as $,S as i,K as G,Q as C}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.e9c2eb26.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 H={class:"workbench"},J={class:"mb-6 flex justify-between items-center"},W={class:"flex items-center text-sm"},X={class:"flex flex-wrap"},tt=["onClick"],et={class:"mr-2"},ot={class:"rounded-full p-2"},at={class:"text-info"},st={class:""},nt={class:""},rt={class:"mb-6 flex justify-between items-center"},it={key:0,class:"text-2xl",style:{margin:"0 auto","padding-right":"67px"}},lt=b({name:"product"}),Gt=b({...lt,setup(ut){const B=[{text:"\u8FD1\u4E00\u5468",value:()=>{const e=new Date,t=new Date;return t.setDate(t.getDate()-7),[t,e]}},{text:"\u672C\u6708",value:()=>{const e=new Date,t=new Date;return t.setDate(1),e.setMonth(e.getMonth()+1),e.setDate(0),[t,e]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const e=new Date,t=new Date;return t.setMonth(t.getMonth()-1),[t,e]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const e=new Date,t=new Date;return t.setMonth(t.getMonth()-3),[t,e]}}],u=F({xAxis:{type:"category",data:[0],axisLabel:{rotate:45,color:"#333"}},yAxis:[{type:"value",name:"\u91D1\u989D",position:"right",axisLabel:{formatter:"{value}"}},{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}]}),v=new Date,D=v.getFullYear(),y=v.getMonth()+1,Y=new Date(D,y-1,1),M=new Date(D,y,0),l=_([Y,M]),w=_([]),x=_(0),h=_(""),a=F({product_id:"",start_time:"",end_time:"",page_no:1,page_size:10}),c=()=>{a.start_time=d(l.value[0]).format("YYYY-MM-DD"),a.end_time=d(l.value[1]).format("YYYY-MM-DD"),R(a).then(e=>{w.value=e.lists,x.value=e.count})},k=e=>{a.page_no=e,c()},L=e=>{a.start_time=d(l.value[0]).format("YYYY-MM-DD"),a.end_time=d(l.value[1]).format("YYYY-MM-DD"),a.product_id=e.product_id,h.value=e.store_name,q(a).then(t=>{u.xAxis.data=[],u.series=[],u.legend.data=t.series.map(r=>r.name),t.xAxis.forEach(r=>{u.xAxis.data.push(r)}),u.series=t.series.map(r=>({type:"line",smooth:!0,data:r.value,name:r.name}))})};return K(()=>{c()}),(e,t)=>{const r=j,V=T,A=U,P=S,E=z;return p(),g("div",H,[m(E,{shadow:"never",class:"!border-none"},{default:f(()=>[o("div",J,[t[3]||(t[3]=o("span",{class:"text-2xl"},"\u5546\u54C1\u6982\u51B5",-1)),o("div",W,[t[2]||(t[2]=o("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1)),m(r,{modelValue:s(l),"onUpdate:modelValue":t[0]||(t[0]=n=>O(l)?l.value=n:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:B,onChange:c},null,8,["modelValue"]),m(V,{type:"primary",class:"ml-4",