import{r as y,d as v}from"./index-mobile-Cdp4yXnt.js";import{a as f}from"./vue-router-D_nWtb8f.js";import{d as _,f as c,w as u,l as g,P as b,Q as C,U as n,x as d}from"./vue-C-_v7KcX.js";import{n as F}from"./echarts-Sg1_iEix.js";import"./pinia-vendor-DqLuw_80.js";import"./vueuse-J27V8FGo.js";import"./axios-Bz4la0P9.js";import"./vant-BNLLsthV.js";import"./vue-i18n-4yY82-Ci.js";import"./element-plus-iuNPLb4-.js";import"./vuedraggable-DV4qFI8a.js";import"./x2js-CcPE71Wh.js";import"./spark-md5-D1K1GNLF.js";import"./bpmn-js-vendor-CwLTIyp_.js";import"./element-plus/icons-vue-Cy7qy6Bt.js";import"./feelin-Bync8taw.js";import"./tiny-svg-DwrM6wVX.js";import"./dragula-jclGFaB5.js";import"./tui-image-editor-vendor-DBxMdFCh.js";import"./fabric-DOAjKBsy.js";import"./postmate-Cq34cWQu.js";import"./panzoom-BXNyZ4BI.js";const D=a=>y({url:"/zxl_pm/product/productstat.svc?cmd=statMonth",method:"get",params:{zxlPrdId:a}}),w=a=>y({url:"/zxl_pm/product/productstat.svc?cmd=statDay",method:"get",params:{zxlPrdId:a}}),A={class:"index-container"},E=_({__name:"index",setup(a){const l=f(),r=c({});let m=null,s=null;const o=c({});let p=null,i=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}),m=document.querySelector(".month-echart"),s=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&&s.setOption(r.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}),p=document.querySelector(".day-echart"),i=d(F(p)),o.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},o.value&&i.setOption(o.value)};return u(()=>r.value,t=>{t&&(r.value&&s.setOption(r.value),s?.resize())}),u(()=>o.value,t=>{t&&(o.value&&i.setOption(o.value),i?.resize())}),g(()=>{h(),x()}),(t,e)=>(C(),b("div",A,[...e[0]||(e[0]=[n("div",{class:"main"},[n("div",{class:"month-echart"}),n("div",{class:"day-echart"})],-1)])]))}}),W=v(E,[["__scopeId","data-v-133addcb"]]);export{W as default};
