index-337ad591.js 4.1 KB

1
  1. import{d as q,P as B,r as m,x as I,b as J,a4 as K,o,c as N,f as a,A as t,a as r,a5 as Q,D as c,k as p,C as d,B as W,F as X,a9 as Y,V as Z,Q as j,J as E,W as G,X as H,Y as L,Z as $,_ as aa,__tla as ta}from"./index-54aa57d8.js";import{_ as ea,__tla as ra}from"./DictTag-638f5ebc.js";import{_ as la,__tla as _a}from"./ContentWrap-260746ab.js";import{D as sa,__tla as oa}from"./dict-573b3b04.js";import{h as ca}from"./tree-0af4953a.js";import{d as na,__tla as ia}from"./formatTime-e6197688.js";import{g as ua,d as ma,__tla as pa}from"./category-25a5e37a.js";import da,{__tla as fa}from"./CategoryForm-e7dbe504.js";import{u as ya,__tla as ha}from"./useMessage-f56cafbb.js";import"./color-6e929987.js";import{__tla as wa}from"./el-card-e7d6628c.js";import{__tla as xa}from"./Dialog-7bb778a5.js";import{__tla as ga}from"./UploadImg-46306ddf.js";import{__tla as ka}from"./index-1a846221.js";import{__tla as ba}from"./el-image-viewer-ec0edec4.js";import"./constants-c811e5ff.js";let S,va=Promise.all([(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return ba}catch{}})()]).then(async()=>{let x;x=["src"],S=aa(q({name:"ProductCategory",__name:"index",setup(Ca){const g=ya(),{t:V}=B(),f=m(!0),k=m([]),n=I({name:void 0}),b=m(),i=async()=>{f.value=!0;try{const u=await ua(n);k.value=ca(u,"id","parentId")}finally{f.value=!1}},y=()=>{i()},A=()=>{b.value.resetFields(),y()},v=m(),C=(u,l)=>{v.value.open(u,l)};return J(()=>{i()}),(u,l)=>{const D=Y,P=Z,h=j,s=E,F=G,U=la,_=H,M=ea,T=L,w=K("hasPermi"),z=$;return o(),N(X,null,[a(U,null,{default:t(()=>[a(F,{class:"-mb-15px",model:r(n),ref_key:"queryFormRef",ref:b,inline:!0,"label-width":"68px"},{default:t(()=>[a(P,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:t(()=>[a(D,{modelValue:r(n).name,"onUpdate:modelValue":l[0]||(l[0]=e=>r(n).name=e),placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",clearable:"",onKeyup:Q(y,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(P,null,{default:t(()=>[a(s,{onClick:y},{default:t(()=>[a(h,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),a(s,{onClick:A},{default:t(()=>[a(h,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),p((o(),d(s,{type:"primary",plain:"",onClick:l[1]||(l[1]=e=>C("create"))},{default:t(()=>[a(h,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E ")]),_:1})),[[w,["product:category:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(U,null,{default:t(()=>[p((o(),d(T,{data:r(k),"row-key":"id","default-expand-all":""},{default:t(()=>[a(_,{label:"\u540D\u79F0","min-width":"240",prop:"name",sortable:""}),a(_,{label:"\u5206\u7C7B\u56FE\u6807",align:"center","min-width":"80",prop:"picUrl"},{default:t(e=>[W("img",{src:e.row.picUrl,alt:"\u79FB\u52A8\u7AEF\u5206\u7C7B\u56FE",class:"h-36px"},null,8,x)]),_:1}),a(_,{label:"\u6392\u5E8F",align:"center","min-width":"150",prop:"sort"}),a(_,{label:"\u72B6\u6001",align:"center","min-width":"150",prop:"status"},{default:t(e=>[a(M,{type:r(sa).COMMON_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),a(_,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:r(na)},null,8,["formatter"]),a(_,{label:"\u64CD\u4F5C",align:"center"},{default:t(e=>[p((o(),d(s,{link:"",type:"primary",onClick:O=>C("update",e.row.id)},{default:t(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["product:category:update"]]]),p((o(),d(s,{link:"",type:"danger",onClick:O=>(async R=>{try{await g.delConfirm(),await ma(R),g.success(V("common.delSuccess")),await i()}catch{}})(e.row.id)},{default:t(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["product:category:delete"]]])]),_:1})]),_:1},8,["data"])),[[z,r(f)]])]),_:1}),a(da,{ref_key:"formRef",ref:v,onSuccess:i},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/category/index.vue"]])});export{va as __tla,S as default};