mer-tradescreen/yusi/assets/townDetail-dZdkgmWZ.js

4 lines
16 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{i as $,a as w,r as C,j as N,b as h,f as m,s as L,v as G,k as S,h as O,F as b,d as t,_ as D,y as z,z as U,A as F,t as v,n as y,p as P,o as k,l as T,w as j,c as f,e as p,x as V}from"./index-YcrvWpTH.js";import{c as H,e as J,s as Y,a as Q,b as Z,g as K,o as X}from"./api-cxsdgs3-.js";import{i as E,L as u,R as tt,_ as I,a as A,b as et}from"./Remake-_85yyqjh.js";import{_ as M,a as B,b as R}from"./ZHB-8cmnZlCw.js";import{m as ot}from"./mitt-Efd5K_Pa.js";import"./axios-QLjAsgXu.js";const st="/yusi/assets/PHBSJ-60KfLsWy.png",at=t("img",{class:"img-cls",src:st,alt:""},null,-1),it={key:0,class:"user-rank",style:{width:"98%"}},rt={__name:"bottomRight",props:{code:Object},setup(l){const n=$(!0),o=w();H({...o.area}).then(d=>{console.log("===",d),s(e,d.data),s(i,d.data.merchantRankingList)});let a="",r="";const s=(d,_)=>{let g=[];return r=0,_==null||_.forEach((c,x)=>{r+=c.sales,d.data.push([`<div style="line-height:30px; text-align: center;background-image: url('/static/index/PM${x+1<=3?x+1:4}.png');width: 30px;height: 30px;background-size: cover;" >${x+1}</div> `,`<div style='background:red;position:relative'><img src="${c.image||c.mini_banner}" style="width: 30px;height: 30px;position:absolute" alt=""></div>`,`<div style='height:40px;line-height:40px; white-space: nowrap; overflow: hidden;text-overflow: ellipsis;'>${c.store_name||c.mer_name}</div>`,`<div style=' transform: translateY(12px); width: 100%; height: 10px; background-color: #122E3F;overflow: hidden;'> <div style=' width: ${c.store_name?(c.sales/r).toFixed(2)*100:(c.total_sales/a).toFixed(2)*100}%;height: 100%; background: linear-gradient(to right, #4459CC, #53CAE2);transition: width 0.5s ease-in-out;'></div> </div>`,`<div style=' position: relative;line-height:30px;text-align:center' >${c.sales} <span style='font-size:10px'>单</span>
<img src="/static/index/PHBBG.png" style="position: absolute;width: 100%;height: 30px; top:0px;left:0px" alt="">
</div>`])}),g},e=C({oddRowBGC:"#001C2E",evenRowBGC:"#001C2E",columnWidth:[50,50,150,150,100],data:[]}),i=C({oddRowBGC:"#001C2E",evenRowBGC:"#001C2E",columnWidth:[50,50,150,150,100],data:[]});return(d,_)=>{const g=N("dv-scroll-board");return h(),m(b,null,[at,e.data.length?(h(),m("div",it,[L(S(g,{config:e,style:{height:"35vh","margin-left":"1%"}},null,8,["config"]),[[G,n.value]]),L(S(g,{config:i,style:{height:"35vh","margin-left":"1%"}},null,8,["config"]),[[G,!n.value]])])):O("",!0)],64)}}},nt="/yusi/assets/CJYH-ZRv_5mQ-.png",lt=t("img",{class:"img-cls",src:nt,alt:""},null,-1),dt=t("div",{id:"transactionUsers",class:"transactionUsers"},null,-1),ct={__name:"bottomCenter",setup(l){let n=w();J({...n.area}).then(r=>{r.data.forEach(s=>{a.xAxis[0],a.xAxis[0].data.push(s.date.slice(5,s.date.length)),a.series[0].data.push(s.visitUser),a.series[1].data.push(s.orderUser),a.series[2].data.push(s.payOrderUser)}),o("transactionUsers",a)});const o=(r,s)=>{var e=document.getElementById(r),i=E(e);i.setOption(s)},a={color:["#4B5FDB","#583936","#10C1CE"],title:{text:""},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{data:["访客人数","下单人数","支付人数"],textStyle:{color:"white"},icon:"cricle",itemWidth:10,itemHeight:10,itemGap:10,top:"2%"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:[],axisLabel:{fontSize:12,color:"#d1f9fb",rotate:40}}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{type:"dashed",color:"#256980"}}}],series:[{name:"访客人数",type:"line",smooth:!0,lineStyle:{width:0},showSymbol:!1,areaStyle:{opacity:.8,color:new u(0,0,0,1,[{offset:0,color:"#4B5FDB"},{offset:1,color:"#5A649D"}])},emphasis:{focus:"series"},data:[]},{name:"下单人数",type:"line",smooth:!0,lineStyle:{width:0},showSymbol:!1,areaStyle:{opacity:.8,color:new u(0,0,0,1,[{offset:0,color:"#583936"},{offset:1,color:"#8b7042"}])},emphasis:{focus:"series"},data:[]},{name:"支付人数",type:"line",smooth:!0,lineStyle:{width:0},showSymbol:!1,areaStyle:{opacity:.8,color:new u(0,0,0,1,[{offset:0,color:"#10C1CE"},{offset:1,color:"#0294E0"}])},emphasis:{focus:"series"},data:[]}]};return(r,s)=>(h(),m(b,null,[lt,dt],64))}},ht="/yusi/assets/DRDDJE-IapCFgR5.png",W=l=>(z("data-v-f856f713"),l=l(),U(),l),ut=W(()=>t("div",{class:"users center",id:"orderAmount"},null,-1)),pt=W(()=>t("img",{class:"img-cls",src:ht,alt:""},null,-1)),_t={__name:"bottomleft",props:{code:Object},setup(l){const n=l,o=w();Y({...o.area,streetCode:n.code}).then(s=>{s.data.forEach(e=>{a.series[0].data.push(e.yesterdayAmount),a.series[1].data.push(e.todayAmount)}),r("orderAmount",a)});const a=C({color:[new u(0,1,0,0,[{offset:1,color:"#57D3ED"},{offset:0,color:"transparent"}]),new u(0,1,0,0,[{offset:1,color:"#4156C2"},{offset:0,color:"transparent"}])],tooltip:{show:!0,trigger:"axis",axisPointer:{type:"shadow"}},legend:{textStyle:{color:"white"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:["0-4时","4-8时","8-12时","12-16时","16-20时","20-0时"]}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{type:"dashed",color:"#256980"}}}],series:[{name:"昨日订单额",type:"bar",emphasis:{focus:"series"},data:[],backgroundStyle:{color:["red"]}},{name:"今日订单额",type:"bar",emphasis:{focus:"series"},data:[]}]}),r=(s,e)=>{var i=document.getElementById(s),d=E(i);d.setOption(e)};return(s,e)=>(h(),m(b,null,[ut,pt],64))}},yt=D(_t,[["__scopeId","data-v-f856f713"]]),vt="/yusi/assets/SSLL-o8u4gqos.png",mt={class:"product-list"},gt={class:"product",style:{}},ft=P('<div class="bg"><img src="'+I+'" style="width:90%;height:100%;" alt=""><img src="'+A+'" class="product-icon" alt=""><div class="bubble"></div><div class="bubble1"></div><div class="bubble2"></div></div>',1),wt={class:"product-content"},bt=t("div",{style:{"margin-top":"14vh",position:"relative"}},"商 品 总 数",-1),xt=t("div",{style:{"font-size":"10px"}},"NUMBER OF COMMODITIES",-1),Ct=t("img",{src:M,style:{width:"75%",position:"relative","margin-top":"3.7vh"},alt:""},null,-1),St={style:{"margin-top":"2vh",position:"relative"}},Dt={style:{color:"#9DD2E0","font-size":"16px"}},Pt={style:{"margin-top":"1.5vh",display:"flex","justify-content":"space-around"}},Et={style:{"font-size":"9px",position:"relative",display:"flex","align-items":"center"}},$t=t("img",{src:B,style:{width:"1vw",height:"1vw"},alt:""},null,-1),kt={style:{"font-size":"9px",position:"relative",display:"flex","align-items":"center"}},It=t("img",{src:R,style:{width:"1vw",height:"1vw"},alt:""},null,-1),At={class:"product",style:{}},Bt=P('<div class="bg"><img src="'+I+'" style="width:90%;height:100%;" alt=""><img src="'+A+'" class="product-icon" alt=""><div class="bubble"></div><div class="bubble1"></div><div class="bubble2"></div></div>',1),Rt={class:"product-content"},Lt=t("div",{style:{"margin-top":"14vh",position:"relative"}},"新 商 品 总 数",-1),Gt=t("div",{style:{"font-size":"10px"}},"NUMBER OF NEW SHOPS",-1),Nt=t("img",{src:et,style:{width:"75%",position:"relative","margin-top":"3.7vh"},alt:""},null,-1),Ot={style:{"margin-top":"2vh",position:"relative"}},zt={style:{color:"#9DD2E0","font-size":"16px"}},Ut={style:{"margin-top":"1.5vh",display:"flex","justify-content":"space-around"}},Ft={style:{"font-size":"9px",position:"relative",display:"flex","align-items":"center"}},Mt=t("img",{src:B,style:{width:"1vw",height:"1vw"},alt:""},null,-1),Wt={style:{"font-size":"9px",position:"relative",display:"flex","align-items":"center"}},qt=t("img",{src:R,style:{width:"1vw",height:"1vw"},alt:""},null,-1),Tt={class:"product",style:{}},jt=P('<div class="bg"><img src="'+I+'" style="width:90%;height:100%;" alt=""><img src="'+A+'" class="product-icon" alt=""><div class="bubble"></div><div class="bubble1"></div><div class="bubble2"></div></div>',1),Vt={class:"product-content"},Ht=t("div",{style:{"margin-top":"14vh",position:"relative"}},"累 计 店 铺 总 数",-1),Jt=t("div",{style:{"font-size":"10px"}},"ACCUMULATED NUMBERS OF SHOPS",-1),Yt=t("img",{src:M,style:{width:"75%",position:"relative","margin-top":"3.7vh"},alt:""},null,-1),Qt={style:{"margin-top":"2vh",position:"relative"}},Zt={style:{color:"#9DD2E0","font-size":"16px"}},Kt={style:{"margin-top":"1.5vh",display:"flex","justify-content":"space-around"}},Xt={style:{"font-size":"9px",position:"relative",display:"flex","align-items":"center"}},te=t("img",{src:B,style:{width:"1vw",height:"1vw"},alt:""},null,-1),ee={style:{"font-size":"9px",position:"relative",display:"flex","align-items":"center"}},oe=t("img",{src:R,style:{width:"1vw",height:"1vw"},alt:""},null,-1),se={class:"Views"},ae=t("img",{src:vt,style:{width:"100%",height:"100%",position:"absolute"},alt:""},null,-1),ie={class:"view-content"},re={style:{display:"flex","align-items":"center"}},ne=t("span",{style:{"font-size":"18px"}},"实时收款金额:",-1),le={__name:"topCenter",props:{code:Object},setup(l){const n=w(),o=C({totalProductCounInfo:{todayProductCount:0,yestertodayProductCount:0,weeklyProductTotalGrowthRate:6.6842},newProductCountInfo:{todayNewProductCount:0,yestertodayNewProductCount:0,weeklyNewProductTotalGrowthRate:-270},merchantCountInfo:{todayMerchantCount:22,yestertodayMerchantCount:22,weeklyMerchantGrowthRate:.0476}}),a=C({lastWeekRate:-0,today:0,yesterday:7,dayPayPrice:0});Q({...n.area}).then(e=>{for(let i in e.data)o[i]=e.data[i]});const r=()=>{Z({...n.area}).then(e=>{for(let i in e.data)a[i]=e.data[i];ot.emit("header-title",e.data.title)})};r();let s=setInterval(()=>{r()},5e3);return F(()=>{clearInterval(s)}),(e,i)=>(h(),m(b,null,[t("div",mt,[t("div",gt,[ft,t("div",wt,[bt,xt,Ct,t("div",St,[t("span",Dt,v(o.totalProductCounInfo.todayProductCount),1),y(" 件")]),t("div",Pt,[t("div",Et,[$t,y("   昨日数据: "+v(o.totalProductCounInfo.yestertodayProductCount),1)]),t("div",kt,[It,y("   周环比: "+v(o.totalProductCounInfo.weeklyProductTotalGrowthRate)+"% ",1)])])])]),t("div",At,[Bt,t("div",Rt,[Lt,Gt,Nt,t("div",Ot,[t("span",zt,v(o.newProductCountInfo.todayNewProductCount),1),y(" 件")]),t("div",Ut,[t("div",Ft,[Mt,y("   昨日数据: "+v(o.newProductCountInfo.yestertodayNewProductCount),1)]),t("div",Wt,[qt,y("   周环比: "+v(o.newProductCountInfo.weeklyNewProductTotalGrowthRate)+"% ",1)])])])]),t("div",Tt,[jt,t("div",Vt,[Ht,Jt,Yt,t("div",Qt,[t("span",Zt,v(o.merchantCountInfo.todayMerchantCount),1),y(" 间")]),t("div",Kt,[t("div",Xt,[te,y("   昨日数据: "+v(o.merchantCountInfo.yestertodayMerchantCount),1)]),t("div",ee,[oe,y("   周环比: "+v(o.merchantCountInfo.weeklyMerchantGrowthRate)+"% ",1)])])])])]),t("div",se,[ae,t("div",ie,[t("div",re,[ne,S(tt,{num:a.dayPayPrice},null,8,["num"])])])])],64))}},de="/yusi/assets/YHSJ-A58vzEzZ.png",q=l=>(z("data-v-d1a9b448"),l=l(),U(),l),ce=q(()=>t("img",{class:"img-cls",src:de,alt:""},null,-1)),he=q(()=>t("div",{class:"user center",id:"user"},null,-1)),ue={__name:"topLeft",props:{code:Object},setup(l){const n=w(),o=l;K({...n.area,streetCode:o.code}).then(e=>{e.data.forEach(i=>{r.series[0].data.push(i.newUserCount),r.series[1].data.push(i.viewUserCount),r.series[2].data.push(i.totalUserCount)}),s("user",r)});const a=()=>{for(var e=new Date,i=new Array,d=0;d<5;d++){var _=new Date(e);_.setDate(e.getDate()-d);var g=_.getMonth()+1,c=Number(_.getDate());c=c>=10?c:"0"+c;var x=g+"."+c;i.unshift(x)}return i},r={color:[new u(0,1,0,0,[{offset:1,color:"transparent"},{offset:0,color:"#0081C3"}]),new u(0,1,0,0,[{offset:1,color:"transparent"},{offset:0,color:"#3E54BF"}]),new u(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:a()}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{type:"dashed",color:"#256980"}}}],series:[{name:"新增会员数量",type:"bar",emphasis:{focus:"series"},data:[],itemStyle:{borderWidth:1,borderColor:"#384FB4"},backgroundStyle:{color:["red"]}},{name:"访问用户数量",type:"bar",emphasis:{focus:"series"},data:[],itemStyle:{borderWidth:1,borderColor:"#3E54BF"}},{name:"累计会员数量",type:"bar",emphasis:{focus:"series"},data:[],itemStyle:{borderWidth:1,borderColor:"#4EC1DB"}}]},s=(e,i)=>{var d=document.getElementById(e),_=E(d);_.setOption(i)};return k(()=>{}),(e,i)=>(h(),m(b,null,[ce,he],64))}},pe=D(ue,[["__scopeId","data-v-d1a9b448"]]),_e="/yusi/assets/DDSJ-QxPmtLGV.png",ye=P('<img class="img-cls" src="'+_e+'" alt="" data-v-53e74d22><div class="order-data" data-v-53e74d22><div class="tit" data-v-53e74d22><div style="display:flex;align-items:center;" data-v-53e74d22><div class="gradient-circle" data-v-53e74d22></div> 日订单数据 </div><div style="display:flex;align-items:center;" data-v-53e74d22><div class="gradient-circle" data-v-53e74d22></div> 月订单数据 </div></div><div style="width:100%;height:50%;transform:translateY(5vh);" id="orderData" data-v-53e74d22></div><div style="width:100%;height:50%;" id="orderData2" data-v-53e74d22></div></div>',2),ve={__name:"topRight",props:{code:Object},setup(l){const n=w();X({...n.area}).then(s=>{o.series[0].data.push(s.data.orderNum),o.series[0].data.push(s.data.monthOrderNum),a.series[0].data.push(s.data.orderPayNum),a.series[0].data.push(s.data.monthOrderPayNum),r("orderData",o),r("orderData2",a),console.log(45454)});const o={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:!0,lineStyle:{type:"dashed",color:"#256980"}}},yAxis:{type:"category",data:["当日订单数","当月订单数"]},series:[{barWidth:15,barGap:"1000%",barCategoryGap:"100%",data:[],type:"bar",itemStyle:{normal:{color:function(s){var e=[new u(1,0,0,0,[{offset:1,color:"#0298E5"},{offset:0,color:"transparent"}]),new u(1,0,0,0,[{offset:1,color:"#4358C8"},{offset:0,color:"transparent"}])];return e[s.dataIndex]},borderColor:["blue"]},borderWidth:2,borderColor:"red"}}]},a={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:!0,lineStyle:{type:"dashed",color:"#256980"}}},yAxis:{type:"category",data:["当日支付人数","当月支付人数"]},series:[{barWidth:15,barGap:"1000%",barCategoryGap:"100%",data:[],type:"bar",itemStyle:{normal:{color:function(s){var e=[new u(1,0,0,0,[{offset:1,color:"#0298E5"},{offset:0,color:"transparent"}]),new u(1,0,0,0,[{offset:1,color:"#4358C8"},{offset:0,color:"transparent"}])];return e[s.dataIndex]},borderColor:["blue"]},borderWidth:2,borderColor:"red"}}]},r=(s,e)=>{var i=document.getElementById(s),d=E(i);d.setOption(e)};return k(()=>{document.getElementById("orderData").removeAttribute("_echarts_instance_"),document.getElementById("orderData2").removeAttribute("_echarts_instance_")}),(s,e)=>ye}},me=D(ve,[["__scopeId","data-v-53e74d22"]]),ge={key:0,class:"center"},fe={class:"top box"},we={class:"l"},be={class:"c",id:""},xe={class:"r"},Ce={class:"bottom box"},Se={class:"l"},De={class:"c"},Pe={class:"r"},Ee={__name:"townDetail",setup(l){const n=$(!0),o=T(),a=$(1);let r=null;return k(()=>{setTimeout(()=>{n.value=!1},1e3),r=setInterval(()=>{a.value++},1e3*60)}),F(()=>{clearInterval(r)}),(s,e)=>{const i=N("dv-loading");return h(),m(b,null,[n.value?(h(),m("div",ge,[S(i,null,{default:j(()=>[y("Loading...")]),_:1})])):O("",!0),t("div",{style:V({opacity:n.value?0:1})},[t("div",fe,[t("div",we,[(h(),f(pe,{code:p(o).query.code,key:p(o).query.code+a.value},null,8,["code"]))]),t("div",be,[(h(),f(le,{code:p(o).query.code,key:p(o).query.code+a.value},null,8,["code"]))]),t("div",xe,[(h(),f(me,{code:p(o).query.code,key:p(o).query.code+a.value},null,8,["code"]))])]),t("div",Ce,[t("div",Se,[(h(),f(yt,{code:p(o).query.code,key:p(o).query.code+a.value},null,8,["code"]))]),t("div",De,[(h(),f(ct,{key:p(o).query.code+a.value}))]),t("div",Pe,[(h(),f(rt,{code:p(o).query.code,key:p(o).query.code+a.value},null,8,["code"]))])])],4)],64)}}},Le=D(Ee,[["__scopeId","data-v-0058f977"]]);export{Le as default};