mer-tradescreen/sss/assets/index-KnJJFOUB.js

4 lines
24 KiB
JavaScript
Raw Normal View History

2024-06-24 14:42:36 +08:00
import{L as O,i as U,R as X,_ as j,a as J,b as Z}from"./Remake-SnwUcttJ.js";import{g as $,a as tt,b as et,c as st,d as ot,e as at,f as nt}from"./api-4xjskPzZ.js";import{r as C,i as M,b as u,f as p,d as t,F as D,g as L,t as v,e as A,n as P,k as E,p as R,j as H,q as F,s as Q,v as K,h as z,o as it,u as lt,a as rt,w as ct,x as dt}from"./index-YMGuLzFR.js";import{_ as Y,a as W,b as T}from"./ZHB-RQRXdCys.js";import"./axios-QLjAsgXu.js";const ht="/sss/assets/PTYHL-qZcXp_Yd.png",ut=t("img",{src:ht,style:{position:"absolute",width:"100%",height:"100%"},alt:""},null,-1),pt=t("div",{class:"user",id:"user"},null,-1),mt={class:"storeNum"},vt=t("div",{class:"tit"},null,-1),gt={class:"townList",style:{color:"white",height:"14.4vh"}},_t=["id"],ft={class:"toenName"},yt={style:{color:"white",display:"flex","justify-content":"center"}},wt=["onClick"],Ct={__name:"topLeft",props:{areaCodes:Object},setup(S){const _=S,o=()=>{for(var h=new Date,b=new Array,s=0;s<5;s++){var l=new Date(h);l.setDate(h.getDate()-s);var N=l.getMonth()+1,k=Number(l.getDate());k=k>=10?k:"0"+k;var c=N+"."+k;b.unshift(c)}return b},a=(h,b)=>{var s=document.getElementById(h),l=U(s);l.setOption(b)};let d={color:[new O(0,1,0,0,[{offset:1,color:"transparent"},{offset:0,color:"#0081C3"}]),new O(0,1,0,0,[{offset:1,color:"transparent"},{offset:0,color:"#3E54BF"}]),new O(0,1,0,0,[{offset:1,color:"transparent"},{offset:0,color:"#4DBFD9"}])],tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{textStyle:{color:"white"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:o()}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{type:"dashed",color:"#256980"}}}],series:[{name:"新增用户数量",type:"bar",emphasis:{focus:"series"},data:[],itemStyle:{borderWidth:1,borderColor:"#384FB4"}},{name:"访问用户数量",type:"bar",emphasis:{focus:"series"},data:[],itemStyle:{borderWidth:1,borderColor:"#3E54BF"}},{name:"累计用户数量",type:"bar",emphasis:{focus:"series"},data:[],itemStyle:{borderWidth:1,borderColor:"#4EC1DB"}}]},n=0,m=h=>({backgroundColor:"#061740",title:{text:"{a|"+h+"}{c|%}",x:"center",y:"center",textStyle:{rich:{a:{fontSize:10,color:"#ffffff",fontWeight:"bold"},c:{fontSize:10,color:"#ffffff",fontWeight:"normal"}}}},series:[{name:"",type:"custom",coordinateSystem:"none",renderItem:function(b,s){return{type:"arc",shape:{cx:s.getWidth()/2,cy:s.getHeight()/2,r:Math.min(s.getWidth(),s.getHeight())/2.3*.65,startAngle:(0+-n)*Math.PI/180,endAngle:(360+-n)*Math.PI/180},style:{stroke:"#0CD3DB",fill:"transparent",lineWidth:.5},silent:!0}},data:[0]},{name:"",type:"pie",radius:["85%","70%"],silent:!0,clockwise:!0,startAngle:90,z:0,zlevel:0,label:{normal:{position:"center"}},data:[{value:h,name:"",itemStyle:{normal:{borderWidth:.5,shadowBlur:20,borderColor:"#4bf3f9",shadowColor:"#9bfeff",color:{colorStops:[{offset:0,color:"#4bf3f9"},{offset:1,color:"#4bf3f9"}]}}}},{value:100-h,name:"",label:{normal:{show:!1}},itemStyle:{normal:{color:"#173164"}}}]}]});const f=C([]),e=(h,b)=>{f.splice(0,f.length),h.forEach(s=>{let l=(s.merchant_count/b).toFixed(2)*100;f.push({name:s.street_name,num:s.merchant_count,option:m(l)})}),f.forEach((s,l)=>{a(`store${l}`,s.option)})};let y=M(0),r=[],g=[];$(_.areaCodes).then(h=>{r=h.data.merchatCountList,g=h.data.merchantTotalCount;let{userCountlist:b}=h.data;b.forEach(s=>{d.series[0].data.push(s.newUserCount),d.series[1].data.push(s.viewUserCount),d.series[2].data.push(s.totalUserCount)}),y.value=Math.ceil(r.length/8),a("user",d),e(r.slice(0,8),g)});const B=h=>{switch(h){case 1:e(r.slice(0,8),g);break;case 2:e(r.slice(8,16),g);break;case 3:e(r.slice(16,24),g);break;case 4:e(r.slice(24,32),g);break}};return(h,b)=>(u(),p(D,null,[ut,pt,t("div",mt,[vt,t("div",gt,[(u(!0),p(D,null,L(f.length||[1,1,1,1,1,1,1,1],(s,l)=>{var N,k;return u(),p("div",{class:"storebox",key:l},[t("div",{class:"store",id:"store"+l},null,8,_t),t("div",ft,[t("div",null,v((N=f[l])==null?void 0:N.name),1),t("div",null,v((k=f[l])==null?void 0:k.num)+"个",1)])])}),128))]),t("div",yt,[(u(!0),p(D,null,L(A(y),(s,l)=>(u(),p("div",{class:"page-num",onCli
<img src="/static/index/PHBBG.png" style="position: absolute;width: 100%;height: 30px; top:0px;left:0px" alt="">
</div>`])}),x},r=C({oddRowBGC:"#001C2E",evenRowBGC:"#001C2E",columnWidth:[50,50,150,150,100],rowNum:4,data:[]}),g=C({oddRowBGC:"#001C2E",evenRowBGC:"#001C2E",columnWidth:[50,50,150,150,100],rowNum:4,data:[]});let B=0,h=c=>({backgroundColor:"#061740",title:{text:"{a|"+c+"}{c|%}",x:"center",y:"center",textStyle:{rich:{a:{fontSize:10,color:"#ffffff",fontWeight:"bold"},c:{fontSize:10,color:"#ffffff",fontWeight:"normal"}}}},series:[{name:"",type:"custom",coordinateSystem:"none",renderItem:function(x,i){return{type:"arc",shape:{cx:i.getWidth()/2,cy:i.getHeight()/2,r:Math.min(i.getWidth(),i.getHeight())/2.3*.65,startAngle:(0+-B)*Math.PI/180,endAngle:(360+-B)*Math.PI/180},style:{stroke:"#0CD3DB",fill:"transparent",lineWidth:.5},silent:!0}},data:[0]},{name:"",type:"pie",radius:["85%","70%"],silent:!0,clockwise:!0,startAngle:90,z:0,zlevel:0,label:{normal:{position:"center"}},data:[{value:c,name:"",itemStyle:{normal:{borderWidth:.5,shadowBlur:20,borderColor:"#4bf3f9",shadowColor:"#9bfeff",color:{colorStops:[{offset:0,color:"#4bf3f9"},{offset:1,color:"#4bf3f9"}]}}}},{value:100-c,name:"",label:{normal:{show:!1}},itemStyle:{normal:{color:"#173164"}}}]}]});const b=(c,x)=>{var i=document.getElementById(c),w=U(i);w.setOption(x)},s=C([]),l=(c,x)=>{s.splice(0,s.length),c.forEach(i=>{let w=parseInt(i.product_count/x*100);s.push({name:i.street_name,num:i.product_count,option:h(w)})}),s.forEach((i,w)=>{b(`stores${w}`,i.option)})};let N=M(0);st(_.areaCodes).then(c=>{d=c.data.productRankingList,a=c.data.merchantRankingList,n=c.data.townProductCountList,f.value=c.data.productRankingTotal,e.value=c.data.townProductCount,m.value=c.data.merchantRankingTotal,r.data=y(d),g.data=y(a),N.value=Math.ceil(n.length/8),l(n.slice(0,8),e.value)});const k=c=>{switch(c){case 1:l(n.slice(0,8),e.value);break;case 2:l(n.slice(8,16),e.value);break;case 3:l(n.slice(16,24),e.value);break;case 4:l(n.slice(24,32),e.value);break}};return(c,x)=>{const i=H("dv-scroll-board");return u(),p(D,null,[ve,r.data.length?(u(),p("div",ge,[t("div",_e,[t("span",{class:F(["btn",{actbtn:o.value}]),onClick:x[0]||(x[0]=w=>o.value=!0)},"",2),t("span",{class:F(["btn",{actbtn:!o.value}]),onClick:x[1]||(x[1]=w=>o.value=!1)},"",2)]),Q(E(i,{config:r,style:{height:"17vh","margin-left":"1%"}},null,8,["config"]),[[K,o.value]]),Q(E(i,{config:g,style:{height:"17vh","margin-left":"1%"}},null,8,["config"]),[[K,!o.value]])])):z("",!0),t("div",fe,[ye,t("div",we,[(u(!0),p(D,null,L(s.length||[1,1,1,1,1,1,1,1],(w,I)=>{var G,q;return u(),p("div",{class:"storebox",key:I},[t("div",{class:"store",id:"stores"+I},null,8,Ce),t("div",be,[t("div",null,v((G=s[I])==null?void 0:G.name),1),t("div",null,v((q=s[I])==null?void 0:q.num)+"",1)])])}),128))]),t("div",xe,[(u(!0),p(D,null,L(A(N),(w,I)=>(u(),p("div",{class:"page-num",onClick:G=>k(I+1)},v(I+1),9,Ae))),256))])])],64)}}},Se="/sss/assets/DDSJ-vhKbv7OH.png",Pe=t("img",{src:Se,style:{position:"absolute",width:"100%",height:"100%"},alt:""},null,-1),Ee=t("div",{style:{height:"5vh"}},null,-1),De={key:0},Ne={__name:"bottomLeft",props:{areaCodes:Object},setup(S){const _=S,o=C({header:["","","","",""],headerSize:"11px",align:["center","center","center","center","center"],headerBGC:"#223B7E",rowNum:10,data:[]});return ot(_.areaCodes).then(a=>{a.data.list.forEach(d=>{o.data.push([d.street_name,d.dayOrderCount,d.dayOrderAmount,d.monthOrderCount,d.monthOrderAmount])})}),(a,d)=>{var m;const n=H("dv-scroll-board");return u(),p(D,null,[Pe,Ee,(m=o.data)!=null&&m.length?(u(),p("div",De,[E(n,{config:o,style:{width:"96%",height:"40vh","margin-left":"2%"}},null,8,["config"])])):z("",!0)],64)}}},Be="/sss/assets/CJYHTJ-YMIneNOY.png",Me=t("img",{src:Be,style:{position:"absolute",width:"100%",height:"100%"},alt:""},null,-1),Ie=t("div",{style:{height:"5vh"}},null,-1),Oe={class:"towns"},Le={class:"town-li act"},ze=["onClick"],He={key:0,id:"transactionUsers",style:{width:"100%",height:"30vh"}},Ge={__name:"bottomCenter",props:{areaCodes:Object},setup(S){const _=S,o=y=>{_.