import"./index-x1i4PMIF.js";import{u as v}from"./vue-router-CTTnLdLz.js";import{r as y}from"./request-yGlVfSRy.js";import{d as _,b as m,w as p,y as f,M as g,O as i,q as d,N as b}from"./vue-ChXMuCsz.js";import{i as F}from"./echarts-FtuFYcC3.js";import{_ as C}from"./index-sxX6oYqj.js";import"./element-plus-xvP3-5Ws.js";import"./element-plus/icons-vue-2sk4hdpg.js";const D=o=>y({url:"/zxl_pm/product/productstat.svc?cmd=statMonth",method:"get",params:{zxlPrdId:o}}),w=o=>y({url:"/zxl_pm/product/productstat.svc?cmd=statDay",method:"get",params:{zxlPrdId:o}}),A={class:"index-container"},E=_({__name:"index",setup(o){const l=v(),a=m({});let c=null,s=null;const r=m({});let u=null,n=null;const h=async()=>{const t=await D(l.query.productId);t.series=t.series.map(e=>e={type:"line",itemStyle:{normal:{label:{show:!0}}},...e}),c=document.querySelector(".month-echart"),s=d(F(c)),a.value={color:["#4472C5","#ED7C30","#80FF80","#FF8096","#800080","#FFC000","#00B050","#0070C0","#703FDD","#FF00FF","#00FFFF","#FFFF00","#C00000","#008000","#0000FF","#808080"],title:{text:"累计需求变化情况",bottom:"2%",right:"center"},tooltip:{trigger:"axis"},legend:{},toolbox:{show:!0,feature:{}},xAxis:{type:"category",name:"时间",boundaryGap:!1,data:t.XAxis},yAxis:{type:"value",name:"数量",axisLabel:{formatter:"{value}"}},series:t.series},a.value&&s.setOption(a.value)},x=async()=>{const t=await w(l.query.productId);t.series=t.series.map(e=>e={type:"line",itemStyle:{normal:{label:{show:!0}}},...e}),u=document.querySelector(".day-echart"),n=d(F(u)),r.value={color:["#4472C5","#ED7C30","#80FF80","#FF8096","#800080","#FFC000","#00B050","#0070C0","#703FDD","#FF00FF","#00FFFF","#FFFF00","#C00000","#008000","#0000FF","#808080"],title:{text:"每日需求变化情况",bottom:"2%",right:"center"},tooltip:{trigger:"axis"},legend:{},toolbox:{show:!0,feature:{}},xAxis:{type:"category",name:"时间",boundaryGap:!1,data:t.XAxis},yAxis:{type:"value",name:"数量",axisLabel:{formatter:"{value}"}},series:t.series},r.value&&n.setOption(r.value)};return p(()=>a.value,t=>{t&&(a.value&&s.setOption(a.value),s?.resize())}),p(()=>r.value,t=>{t&&(r.value&&n.setOption(r.value),n?.resize())}),f(()=>{h(),x()}),(t,e)=>(b(),g("div",A,[...e[0]||(e[0]=[i("div",{class:"main"},[i("div",{class:"month-echart"}),i("div",{class:"day-echart"})],-1)])]))}}),G=C(E,[["__scopeId","data-v-133addcb"]]);export{G as default};
