import{r as y,_ as v}from"./index-design-C8wrC2s6.js";import{a as _}from"./vue-router-3s92ZBQp.js";import{d as f,f as p,w as u,D as g,M as D,O as b,R as n,m as d}from"./vue-BQyCGvUQ.js";import{n as F}from"./echarts-Sg1_iEix.js";import"./svg-icons-register-D2E0-Ytb.js";import"./pinia-vendor-Dca3jG8Z.js";import"./element-plus-DXXGg0hD.js";import"./x2js-CcPE71Wh.js";import"./spark-md5-D1K1GNLF.js";import"./bpmn-js-vendor-CmbY3e_O.js";import"./element-plus/icons-vue-W2FFUolX.js";import"./feelin-BX8uiLPw.js";import"./tiny-svg-DwrM6wVX.js";import"./axios-Bz4la0P9.js";import"./vueuse-DpVqiu7V.js";import"./dragula-CfHszRTf.js";import"./vuedraggable-DggeXcQm.js";import"./tui-image-editor-vendor-DBxMdFCh.js";import"./fabric-Cm_BIpEs.js";import"./qrcode-DgLtAz-0.js";const C=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=f({__name:"index",setup(o){const l=_(),a=p({});let c=null,s=null;const r=p({});let m=null,i=null;const h=async()=>{const t=await C(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}),m=document.querySelector(".day-echart"),i=d(F(m)),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&&i.setOption(r.value)};return u(()=>a.value,t=>{t&&(a.value&&s.setOption(a.value),s?.resize())}),u(()=>r.value,t=>{t&&(r.value&&i.setOption(r.value),i?.resize())}),g(()=>{h(),x()}),(t,e)=>(b(),D("div",A,[...e[0]||(e[0]=[n("div",{class:"main"},[n("div",{class:"month-echart"}),n("div",{class:"day-echart"})],-1)])]))}}),T=v(E,[["__scopeId","data-v-133addcb"]]);export{T as default};
