2 lines
3.7 KiB
JavaScript
2 lines
3.7 KiB
JavaScript
import{_ as N}from"./index.f9a502e2.js";/* empty css *//* empty css *//* empty css *//* empty css */import{h as S}from"./title.50ffaab5.js";import{g as V}from"./goods.ae28c0ac.js";import{aY as _,x as n,y as l,aA as t,B as i,a$ as a,aG as d,b1 as f,a_ as s,aT as z,b2 as L,bQ as E,bp as K,bk as j,by as q,bN as A,bL as F,bU as G,bj as M,bl as Q,bM as U}from"./arco.c6cced51.js";import"./chart.e0a67bf9.js";import"./vue.6689c566.js";const Y={components:{goods:V,headerTitle:S},data(){return{form:{limit:15,page:1,searchKey:"",type:"",sort:"time",moreBtn:!0},list:[],sort:[{name:"\u6700\u8FD1",type:"time"},{name:"\u70ED\u95E8",type:"view"}],loading:!1,pageParams:{key:""},type:[{name:"\u5168\u90E8",key:0,type:""},{name:"\u56FE\u6587",type:"article",key:1},{name:"\u89C6\u9891",type:"video",key:2},{name:"\u97F3\u9891",type:"audio",key:3},{name:"\u76F4\u64AD",type:"live",key:4},{name:"\u4E13\u680F",type:"column",key:5},{name:"\u6D3B\u52A8",type:"activity",key:6},{name:"\u8003\u8BD5\u7EC3\u4E60",type:"exercises",key:7},{name:"\u4F1A\u5458\u5361",type:"vipcard",key:8}],typeChecked:0}},props:{},computed:{},methods:{typeChange(o){this.form.type=o,this.refresh()},sortChange(o){this.form.sort=o,this.refresh()},getData(){this.loading=!0,this.form.searchKey=this.pageParams.key,this.$request.post("api/goods/goods/index",this.form).then(o=>{var p=this.list;for(var y in o.data)p.push(o.data[y]);this.list=p,o.data.length<this.form.limit?this.form.moreBtn=!1:this.form.moreBtn=!0,this.loading=!1}).catch(o=>{this.loading=!1,this.form.moreBtn=!1,this.$message.warning(o.msg)})},moreData(){this.form.page++,this.getData()},refresh(){this.form.page=1,this.list=[],this.getData()}},watch:{},mounted(){this.pageParams=this.$route.params,this.refresh()}},H=i("b",null,"\u8BFE\u7A0B\u7C7B\u578B",-1),I=i("b",null,"\u6392\u5E8F\u65B9\u5F0F",-1),J={style:{"margin-top":"15px"}},O={style:{width:"100%","text-align":"center"}};function R(o,p,y,W,e,m){const k=_("header-title"),h=E,u=K,g=j,c=q,b=A,x=F,v=_("goods"),C=G,B=M,w=Q,P=U,T=_("suspend");return n(),l("div",null,[t(k,{title:"\u201C"+(e.pageParams.key&&e.pageParams.key!=" "?e.pageParams.key:"\u5168\u90E8")+"\u201D\u7684\u641C\u7D22\u7ED3\u679C",moreShow:!1},null,8,["title"]),i("div",null,[t(c,{size:"large",style:{"margin-top":"15px"}},{default:a(()=>[t(h,null,{default:a(()=>[H]),_:1}),t(g,{onChange:m.typeChange,type:"rounded","default-active-key":e.form.type,"hide-content":!0},{default:a(()=>[(n(!0),l(d,null,f(e.type,(r,D)=>(n(),s(u,{key:r.type,title:r.name},null,8,["title"]))),128))]),_:1},8,["onChange","default-active-key"])]),_:1})]),i("div",null,[t(c,{size:"large",style:{"margin-top":"20px"}},{default:a(()=>[t(h,null,{default:a(()=>[I]),_:1}),t(g,{onChange:m.sortChange,position:"top","default-active-key":e.form.sort,type:"rounded","hide-content":!0},{default:a(()=>[(n(!0),l(d,null,f(e.sort,(r,D)=>(n(),s(u,{key:r.type,title:r.name},null,8,["title"]))),128))]),_:1},8,["onChange","default-active-key"])]),_:1})]),t(P,{loading:e.loading,tip:"\u52A0\u8F7D\u4E2D...",style:{width:"100%","margin-top":"20px"}},{default:a(()=>[e.loading?(n(),s(x,{key:0,animation:!0,style:{"margin-top":"20px"}},{default:a(()=>[t(c,{direction:"vertical",style:{width:"100%"},size:"large"},{default:a(()=>[t(b,{rows:10})]),_:1})]),_:1})):(n(),l(d,{key:1},[i("div",J,[e.list.length>0?(n(),s(v,{key:0,list:e.list},null,8,["list"])):(n(),s(C,{key:1,description:"\u6682\u65E0\u641C\u7D22\u7ED3\u679C"}))]),e.form.moreBtn?(n(),s(w,{key:0,style:{"margin-top":"15px"},bordered:!1},{default:a(()=>[i("div",O,[t(B,{type:"text",onClick:m.moreData},{default:a(()=>[z("\u52A0\u8F7D\u66F4\u591A")]),_:1},8,["onClick"])])]),_:1})):L("",!0)],64))]),_:1},8,["loading"]),t(T)])}const re=N(Y,[["render",R]]);export{re as default};
|