2 lines
3.7 KiB
JavaScript
2 lines
3.7 KiB
JavaScript
import{_ as S}from"./index.09b7dc2d.js";/* empty css *//* empty css *//* empty css *//* empty css */import{h as N}from"./title.1058fa71.js";import{g as V}from"./goods.77da3c78.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 K,bP as L,bo as E,bj as j,bx as q,bM as A,bK as F,bT as G,bi as M,bk as Y,bL as H}from"./arco.718bb75f.js";import"./chart.031c4a92.js";import"./vue.047ec7e3.js";const I={components:{goods:V,headerTitle:N},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 h in o.data)p.push(o.data[h]);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()}},J=i("b",null,"\u8BFE\u7A0B\u7C7B\u578B",-1),O=i("b",null,"\u6392\u5E8F\u65B9\u5F0F",-1),Q={style:{"margin-top":"15px"}},R={style:{width:"100%","text-align":"center"}};function U(o,p,h,W,e,m){const k=_("header-title"),y=L,u=E,g=j,c=q,x=A,b=F,v=_("goods"),C=G,B=M,w=Y,P=H,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(y,null,{default:a(()=>[J]),_: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(y,null,{default:a(()=>[O]),_: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(b,{key:0,animation:!0,style:{"margin-top":"20px"}},{default:a(()=>[t(c,{direction:"vertical",style:{width:"100%"},size:"large"},{default:a(()=>[t(x,{rows:10})]),_:1})]),_:1})):(n(),l(d,{key:1},[i("div",Q,[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",R,[t(B,{type:"text",onClick:m.moreData},{default:a(()=>[z("\u52A0\u8F7D\u66F4\u591A")]),_:1},8,["onClick"])])]),_:1})):K("",!0)],64))]),_:1},8,["loading"]),t(T)])}const re=S(I,[["render",U]]);export{re as default};
|