chunk-4321b6f2.8e7ca565.js 10 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4321b6f2"],{2649:function(t,s,a){},d2fc:function(t,s,a){"use strict";a("2649")},e74b:function(t,s,a){"use strict";a.r(s);a("14d9"),a("e9f5"),a("7d54");var e=a("9ab4"),i=a("1b40"),o=a("22b4"),r=a("4cb5"),l=a("3620"),n=a("f175");const d=t=>n.a.get("/workbench/topGoods50",{params:t}),c=t=>n.a.get("/workbench/topUser50",{params:t});var p=a("3c50"),_=a("4b2a"),g=a("9394"),v=a("ff32"),u=a("bb6f"),f=a("f95e"),h=a("6ddb");o.a([r.a,_.a,f.a,g.a,v.a,u.a,l.a]);let m=class extends i.e{constructor(){super(...arguments),this.visitor={tooltip:{trigger:"axis"},legend:{data:["访客"]},xAxis:{type:"category",data:["周一","周二","周三","周四","周五","周六","周日"],splitLine:{show:!0,interval:"1"}},yAxis:{},series:[{name:"访客",type:"line",stack:"总量",data:[]}]},this.business={tooltip:{trigger:"axis"},legend:{data:["营业额","商品数量","订单数量"]},xAxis:{type:"category",data:["周一","周二","周三","周四","周五","周六","周日"],splitLine:{show:!0,interval:"1"}},yAxis:{type:"value"},series:[{name:"营业额",type:"line",stack:"总量",data:[]},{name:"商品数量",type:"line",stack:"总量",data:[]},{name:"订单数量",type:"line",stack:"总量",data:[]}]},this.indexData={shop_info:{logo:""},today:{today_order_num:"",today_order_amount:"",today_new_user:"",today_visitor:""},pending:{wait_shipped:"",wait_audit:"",wait_reply:"",no_stock_goods:""}},this.pagerTopGoods=new h.a,this.pagerTopUser=new h.a}getWorkbenchIndexData(){var t;this.business.xAxis.data=[],this.business.legend.data=[],(t={},n.a.get("/workbench/index",t)).then(t=>{this.indexData=t,t.business15.list[0].data=t.business15.list[0].data.reverse(),t.visitor15.list[0].data=t.visitor15.list[0].data.reverse(),this.business.xAxis.data=t.business15.date.reverse(),this.visitor.xAxis.data=t.visitor15.date.reverse(),t.business15.list.forEach((t,s)=>{this.business.series[s].data=t.data,this.business.series[s].name=t.name,this.business.legend.data[s]=t.name}),t.visitor15.list.forEach((t,s)=>{this.visitor.series[s].data=t.data,this.visitor.series[s].name=t.name})})}goPage(t){this.$router.push({path:t})}getTopGoods(){this.pagerTopGoods.request({callback:d}).then(t=>{})}getTopUser(){this.pagerTopUser.request({callback:c}).then(t=>{})}created(){this.getWorkbenchIndexData(),this.getTopGoods(),this.getTopUser()}};m=Object(e.a)([Object(i.a)({components:{LsPagination:p.a}})],m);var C=m,x=(a("d2fc"),a("2877")),b=Object(x.a)(C,(function(){var t=this,s=t._self._c;t._self._setupProxy;return s("div",{staticClass:"ls-home"},[s("el-row",{staticClass:"ls-home__top col-stretch",attrs:{gutter:16,type:"flex"}},[s("el-col",{attrs:{span:6}},[s("div",{staticClass:"ls-card ls-top__store"},[s("div",{staticClass:"title weight-500"},[t._v("商城信息")]),s("div",{staticClass:"content"},[s("div",{staticClass:"flex"},[s("el-image",{staticStyle:{width:"58px",height:"58px","border-radius":"50%"},attrs:{fit:"scale-down",src:t.indexData.shop_info.logo}}),s("div",{staticClass:"m-l-20"},[s("div",{staticClass:"store-name sm flex weight-600"},[s("span",[t._v(t._s(t.indexData.shop_info.name))])]),s("div",{staticClass:"store-status m-t-14 flex"},[s("span",{staticClass:"label"},[t._v("版本号:")]),s("span",[t._v("1.0.0")])])])],1),s("div",{staticClass:"store-time m-t-14 flex"})])])]),s("el-col",{attrs:{span:18}},[s("div",{staticClass:"ls-card ls-top__data"},[s("div",{staticClass:"title"},[t._v("今日数据")]),s("div",{staticClass:"content"},[s("el-row",{attrs:{gutter:20}},[s("el-col",{attrs:{span:6}},[s("div",{staticClass:"lighter"},[t._v("营业额(元)")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.today.today_order_amount)+" ")])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"lighter"},[t._v("成交订单(笔)")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.today.today_order_num)+" ")])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"lighter"},[t._v("访客数(人)")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.today.today_visitor)+" ")])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"lighter"},[t._v("新增用户(人)")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.today.today_new_user)+" ")])])],1)],1)])])],1),s("div",{staticClass:"ls-card ls-home_todo m-t-16"},[s("div",{staticClass:"title"},[t._v("待办事项")]),s("div",{staticClass:"content"},[s("el-row",{attrs:{gutter:20}},[s("el-col",{attrs:{span:6}},[s("div",{staticClass:"pointer",on:{click:function(s){return t.goPage("order/order")}}},[s("div",{staticClass:"lighter"},[t._v("待发货订单")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.pending.wait_shipped)+" ")])])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"pointer",on:{click:function(s){return t.goPage("/order/after_sales")}}},[s("div",{staticClass:"lighter"},[t._v("待审核售后申请")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.pending.wait_audit)+" ")])])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"pointer",on:{click:function(s){return t.goPage("/goods/evaluation")}}},[s("div",{staticClass:"lighter"},[t._v("待审核商品评价")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.pending.wait_process)+" ")])])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"pointer",on:{click:function(s){return t.goPage("/goods/lists")}}},[s("div",{staticClass:"lighter"},[t._v("售罄商品")]),s("div",{staticClass:"m-t-8 font-size-30"},[t._v(" "+t._s(t.indexData.pending.no_stock_goods)+" ")])])])],1)],1)]),s("el-row",{staticClass:"ls-home__chart m-t-16",attrs:{gutter:16}},[s("el-col",{attrs:{span:12}},[s("div",{staticClass:"ls-card ls-chart--turnover"},[s("div",{staticClass:"title"},[t._v("近15天营业额(元)")]),s("div",{staticClass:"content"},[s("e-chart",{staticClass:"chart",attrs:{option:t.business}})],1)])]),s("el-col",{attrs:{span:12}},[s("div",{staticClass:"ls-card ls-chart--visitors"},[s("div",{staticClass:"title"},[t._v("近15天访客数(人)")]),s("div",{staticClass:"content"},[s("e-chart",{staticClass:"chart",attrs:{option:t.visitor}})],1)])])],1),s("el-row",{staticClass:"ls-home__rank m-t-16",attrs:{gutter:16}},[s("el-col",{attrs:{span:12}},[s("div",{staticClass:"ls-card"},[s("div",{staticClass:"title"},[t._v("商品销量排行")]),s("div",{staticClass:"content"},[s("el-table",{attrs:{data:t.pagerTopGoods.lists,size:"mini"}},[s("el-table-column",{attrs:{label:"排名","min-width":"70"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.$index+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size==0?s("div",{staticClass:"icon",staticStyle:{background:"#f86056",color:"#fff"}},[t._v(" "+t._s(a.$index+1+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size)+" ")]):t._e(),a.$index+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size==1?s("div",{staticClass:"icon",staticStyle:{background:"#fc8d2e",color:"#fff"}},[t._v(" "+t._s(a.$index+1+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size)+" ")]):t._e(),a.$index+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size==2?s("div",{staticClass:"icon",staticStyle:{background:"#fcbc2e",color:"#fff"}},[t._v(" "+t._s(a.$index+1+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size)+" ")]):t._e(),a.$index+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size>=3?s("div",{staticClass:"icon"},[t._v(" "+t._s(a.$index+1+(t.pagerTopGoods._page-1)*t.pagerTopGoods._size)+" ")]):t._e()]}}])}),s("el-table-column",{attrs:{label:"商品信息","min-width":"300","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[s("div",{staticClass:"flex"},[s("el-image",{staticClass:"flex-none",staticStyle:{width:"34px",height:"34px"},attrs:{src:a.row.image}}),s("div",{staticClass:"m-l-10 line-1"},[t._v(" "+t._s(a.row.name)+" ")])],1)]}}])}),s("el-table-column",{attrs:{prop:"total_num",label:"销量"}}),s("el-table-column",{attrs:{prop:"total_pay_price",label:"销售额"},scopedSlots:t._u([{key:"default",fn:function(s){return[t._v(" ¥"+t._s(s.row.total_pay_price)+" ")]}}])})],1)],1),s("div",{staticClass:"flex row-right m-t-16 row-right"},[s("ls-pagination",{on:{change:t.getTopGoods},model:{value:t.pagerTopGoods,callback:function(s){t.pagerTopGoods=s},expression:"pagerTopGoods"}})],1)])]),s("el-col",{attrs:{span:12}},[s("div",{staticClass:"ls-card"},[s("div",{staticClass:"title"},[t._v("用户购买能力排行")]),s("div",{staticClass:"content"},[s("el-table",{attrs:{data:t.pagerTopUser.lists,size:"mini"}},[s("el-table-column",{attrs:{label:"排名","min-width":"70"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.$index+(t.pagerTopUser._page-1)*t.pagerTopUser._size==0?s("div",{staticClass:"icon",staticStyle:{background:"#f86056",color:"#fff"}},[t._v(" "+t._s(a.$index+1+(t.pagerTopUser._page-1)*t.pagerTopUser._size)+" ")]):t._e(),a.$index+(t.pagerTopUser._page-1)*t.pagerTopUser._size==1?s("div",{staticClass:"icon",staticStyle:{background:"#fc8d2e",color:"#fff"}},[t._v(" "+t._s(a.$index+1+(t.pagerTopUser._page-1)*t.pagerTopUser._size)+" ")]):t._e(),a.$index+(t.pagerTopUser._page-1)*t.pagerTopUser._size==2?s("div",{staticClass:"icon",staticStyle:{background:"#fcbc2e",color:"#fff"}},[t._v(" "+t._s(a.$index+1+(t.pagerTopUser._page-1)*t.pagerTopUser._size)+" ")]):t._e(),a.$index+(t.pagerTopUser._page-1)*t.pagerTopUser._size>=3?s("div",{staticClass:"icon"},[t._v(" "+t._s(a.$index+1+(t.pagerTopUser._page-1)*t.pagerTopUser._size)+" ")]):t._e()]}}])}),s("el-table-column",{attrs:{label:"用户信息","min-width":"300","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[s("div",{staticClass:"flex"},[s("el-image",{staticClass:"flex-none",staticStyle:{width:"34px",height:"34px"},attrs:{src:a.row.avatar}}),s("div",{staticClass:"m-l-10 line-1"},[t._v(" "+t._s(a.row.nickname)+" ")])],1)]}}])}),s("el-table-column",{attrs:{prop:"total_num",label:"成交单数"}}),s("el-table-column",{attrs:{prop:"total_order_amount",label:"消费金额"},scopedSlots:t._u([{key:"default",fn:function(s){return[t._v(" ¥"+t._s(s.row.total_order_amount)+" ")]}}])})],1)],1),s("div",{staticClass:"flex row-right m-t-16 row-right"},[s("ls-pagination",{on:{change:t.getTopUser},model:{value:t.pagerTopUser,callback:function(s){t.pagerTopUser=s},expression:"pagerTopUser"}})],1)])])],1)],1)}),[],!1,null,"1fe8c3ab",null);s.default=b.exports}}]);