moreShopAdmin/build/admin/assets/index.2a7e83d2.js

2 lines
4.9 KiB
JavaScript
Raw Normal View History

2024-08-23 15:04:43 +08:00
import{U as j,P as S,w as T,b as U,L as z}from"./element-plus.4a7d92a3.js";import{d as R,s as q}from"./workbench.85cc3318.js";import{h as d}from"./moment.40bc58bf.js";import{B as I}from"./vue-echarts.01ad0ec2.js";import{d as b,Z as F,r as _,i as K,o as m,c as h,U as c,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.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.0778bf8b.js";import"./lodash.9dc701ad.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.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 H={class:"workbench"},J={class:"mb-6 flex justify-between items-center"},W=o("span",{class:"text-2xl"},"\u5546\u54C1\u6982\u51B5",-1),X={class:"flex items-center text-sm"},tt=o("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),et={class:"flex flex-wrap"},ot=["onClick"],at={class:"mr-2"},st={class:"rounded-full p-2"},nt={class:"text-info"},rt={class:""},it={class:""},lt={class:"mb-6 flex justify-between items-center"},ut=o("span",{class:"text-2xl"},"\u5546\u54C1\u8D8B\u52BF",-1),ct={key:0,class:"text-2xl",style:{margin:"0 auto","padding-right":"67px"}},mt=b({name:"product"}),Gt=b({...mt,setup(pt){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=_([]),g=_(0),x=_(""),a=F({product_id:"",start_time:"",end_time:"",page_no:1,page_size:10}),p=()=>{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,g.value=e.count})},k=e=>{a.page_no=e,p()},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,x.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(()=>{p()}),(e,t)=>{const r=j,V=T,A=U,P=S,E=z;return m(),h("div",H,[c(E,{shadow:"never",class:"!border-none"},{default:f(()=>[o("div",J,[W,o("div",X,[tt,c(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:p},null,8,["modelValue"]),c(V,{type:"primary",class:"ml-4",onClick:p},{default:f(()=>[Q("\u67E5\u8