import{K as e,S as t,St as n,T as r,Y as i,ct as a,j as o,vt as s}from"./vue.runtime.esm-bundler-DpGzKKN4.js";import{i as c}from"./vue-router-BU7Z_qXI.js";import{t as l}from"./_plugin-vue_export-helper-CnS4QQza.js";import{n as u}from"./request-CWxGgYu0.js";import{t as d}from"./echarts-Borew-jb.js";var f=e=>u({url:`/zxl_pm/product/productstat.svc?cmd=statMonth`,method:`get`,params:{zxlPrdId:e}}),p=e=>u({url:`/zxl_pm/product/productstat.svc?cmd=statDay`,method:`get`,params:{zxlPrdId:e}}),m={class:`index-container`},h=l(o({__name:`index`,setup(o){let l=c(),u=n({}),h=null,g=null,_=n({}),v=null,y=null,b=async()=>{let e=await f(l.query.productId);e.series=e.series.map(e=>e={type:`line`,itemStyle:{normal:{label:{show:!0}}},...e}),h=document.querySelector(`.month-echart`),g=s(d(h)),u.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:e.XAxis},yAxis:{type:`value`,name:`数量`,axisLabel:{formatter:`{value}`}},series:e.series},u.value&&g.setOption(u.value)},x=async()=>{let e=await p(l.query.productId);e.series=e.series.map(e=>e={type:`line`,itemStyle:{normal:{label:{show:!0}}},...e}),v=document.querySelector(`.day-echart`),y=s(d(v)),_.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:e.XAxis},yAxis:{type:`value`,name:`数量`,axisLabel:{formatter:`{value}`}},series:e.series},_.value&&y.setOption(_.value)};return a(()=>u.value,e=>{e&&(u.value&&g.setOption(u.value),g?.resize())}),a(()=>_.value,e=>{e&&(_.value&&y.setOption(_.value),y?.resize())}),e(()=>{b(),x()}),(e,n)=>(i(),r(`div`,m,[...n[0]||=[t(`div`,{class:`main`},[t(`div`,{class:`month-echart`}),t(`div`,{class:`day-echart`})],-1)]]))}}),[[`__scopeId`,`data-v-133addcb`]]);export{h as default};