index-6cdfc62f.js 5.3 KB

1
  1. import{d as I,n as J,r as p,f as L,B as Q,P as X,o,c as g,i as a,w as l,a as t,Q as E,F as D,k as W,l as i,j as m,C as f,a2 as Z,U as $,H as aa,D as ea,G as ta,I as la,v as ra,J as sa,K as oa,L as _a,M as na,N as ua,_ as ca,__tla as pa}from"./index-b2b3c6c4.js";import{_ as ia,__tla as ma}from"./index-341fc94c.js";import{_ as da,__tla as fa}from"./DictTag-4199ec8d.js";import{_ as ya,__tla as ha}from"./ContentWrap-e91b2b5a.js";import{a as ba,D as M,__tla as wa}from"./dict-7f0cc6d2.js";import{d as ga,__tla as va}from"./formatTime-7e07ce72.js";import{b as ka,d as xa,__tla as Ua}from"./brand-1965037f.js";import Ca,{__tla as Sa}from"./BrandForm-187c0968.js";import{u as Ta,__tla as Va}from"./useMessage-a5edbb0f.js";import{__tla as Da}from"./index-2d76a87c.js";import"./color-6e929987.js";import{__tla as Ma}from"./el-card-bd6e27c9.js";import{__tla as Na}from"./Dialog-70b24cbf.js";import{__tla as Ha}from"./UploadImg-5f639045.js";import{__tla as Pa}from"./index-677601df.js";import{__tla as za}from"./el-image-viewer-b5664270.js";import"./constants-a1da293a.js";let N,Oa=Promise.all([(()=>{try{return pa}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return za}catch{}})()]).then(async()=>{let v;v=["src"],N=ca(I({name:"ProductBrand",__name:"index",setup(Ra){const k=Ta(),{t:H}=J(),y=p(!0),x=p(0),U=p([]),s=L({pageNo:1,pageSize:10,name:void 0,status:void 0,createTime:[]}),C=p(),n=async()=>{y.value=!0;try{const u=await ka(s);U.value=u.list,x.value=u.total}finally{y.value=!1}},h=()=>{n()},P=()=>{C.value.resetFields(),h()},S=p(),T=(u,r)=>{S.value.open(u,r)};return Q(()=>{n()}),(u,r)=>{const z=$,d=aa,O=ea,R=ta,Y=la,b=ra,c=sa,A=oa,V=ya,_=_a,F=da,B=na,K=ia,w=X("hasPermi"),j=ua;return o(),g(D,null,[a(V,null,{default:l(()=>[a(A,{class:"-mb-15px",model:t(s),ref_key:"queryFormRef",ref:C,inline:!0,"label-width":"68px"},{default:l(()=>[a(d,{label:"\u54C1\u724C\u540D\u79F0",prop:"name"},{default:l(()=>[a(z,{modelValue:t(s).name,"onUpdate:modelValue":r[0]||(r[0]=e=>t(s).name=e),placeholder:"\u8BF7\u8F93\u5165\u54C1\u724C\u540D\u79F0",clearable:"",onKeyup:E(h,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(d,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[a(R,{modelValue:t(s).status,"onUpdate:modelValue":r[1]||(r[1]=e=>t(s).status=e),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:l(()=>[(o(!0),g(D,null,W(t(ba)(t(M).COMMON_STATUS),e=>(o(),i(O,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:l(()=>[a(Y,{modelValue:t(s).createTime,"onUpdate:modelValue":r[2]||(r[2]=e=>t(s).createTime=e),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),a(d,null,{default:l(()=>[a(c,{onClick:h},{default:l(()=>[a(b,{icon:"ep:search",class:"mr-5px"}),m(" \u641C\u7D22")]),_:1}),a(c,{onClick:P},{default:l(()=>[a(b,{icon:"ep:refresh",class:"mr-5px"}),m(" \u91CD\u7F6E")]),_:1}),f((o(),i(c,{type:"primary",plain:"",onClick:r[3]||(r[3]=e=>T("create"))},{default:l(()=>[a(b,{icon:"ep:plus",class:"mr-5px"}),m(" \u65B0\u589E ")]),_:1})),[[w,["product:brand:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(V,null,{default:l(()=>[f((o(),i(B,{data:t(U),"row-key":"id","default-expand-all":""},{default:l(()=>[a(_,{label:"\u54C1\u724C\u540D\u79F0",prop:"name",sortable:""}),a(_,{label:"\u54C1\u724C\u56FE\u7247",align:"center",prop:"picUrl"},{default:l(e=>[e.row.picUrl?(o(),g("img",{key:0,src:e.row.picUrl,alt:"\u54C1\u724C\u56FE\u7247",class:"h-30px"},null,8,v)):Z("",!0)]),_:1}),a(_,{label:"\u54C1\u724C\u6392\u5E8F",align:"center",prop:"sort"}),a(_,{label:"\u5F00\u542F\u72B6\u6001",align:"center",prop:"status"},{default:l(e=>[a(F,{type:t(M).COMMON_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),a(_,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(ga)},null,8,["formatter"]),a(_,{label:"\u64CD\u4F5C",align:"center"},{default:l(e=>[f((o(),i(c,{link:"",type:"primary",onClick:q=>T("update",e.row.id)},{default:l(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["product:brand:update"]]]),f((o(),i(c,{link:"",type:"danger",onClick:q=>(async G=>{try{await k.delConfirm(),await xa(G),k.success(H("common.delSuccess")),await n()}catch{}})(e.row.id)},{default:l(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["product:brand:delete"]]])]),_:1})]),_:1},8,["data"])),[[j,t(y)]]),a(K,{total:t(x),page:t(s).pageNo,"onUpdate:page":r[4]||(r[4]=e=>t(s).pageNo=e),limit:t(s).pageSize,"onUpdate:limit":r[5]||(r[5]=e=>t(s).pageSize=e),onPagination:n},null,8,["total","page","limit"])]),_:1}),a(Ca,{ref_key:"formRef",ref:S,onSuccess:n},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/brand/index.vue"]])});export{Oa as __tla,N as default};