index-b054f788.js 3.2 KB

1
  1. import{d as q,n as z,r as m,f as B,B as I,P as J,o as n,c as L,i as a,w as e,a as l,Q as M,j as c,C as d,l as p,F as N,U as Q,H as T,v as W,J as X,K as A,L as E,M as G,N as O,_ as Y,__tla as Z}from"./index-af173888.js";import{_ as $,__tla as aa}from"./ContentWrap-b959c1be.js";import{d as ea,__tla as ta}from"./formatTime-8a6f6c49.js";import{g as la,d as ra,__tla as sa}from"./index-c747ab6b.js";import na,{__tla as ca}from"./ProductCategoryForm-15cd1463.js";import{h as oa}from"./tree-02f455f9.js";import{u as _a,__tla as ua}from"./useMessage-170c1b43.js";import{__tla as ia}from"./el-card-178b9654.js";import{__tla as ma}from"./Dialog-987c90a1.js";let V,da=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ma}catch{}})()]).then(async()=>{V=Y(q({name:"CrmProductCategory",__name:"index",setup(pa){const w=_a(),{t:F}=z(),f=m(!0),x=m([]),o=B({name:null}),g=m(),_=async()=>{f.value=!0;try{const u=await la(o);x.value=oa(u,"id","parentId")}finally{f.value=!1}},y=()=>{_()},H=()=>{g.value.resetFields(),y()},C=m(),b=(u,t)=>{C.value.open(u,t)};return I(()=>{_()}),(u,t)=>{const R=Q,v=T,h=W,r=X,U=A,P=$,i=E,D=G,k=J("hasPermi"),K=O;return n(),L(N,null,[a(P,null,{default:e(()=>[a(U,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:g,inline:!0,"label-width":"68px"},{default:e(()=>[a(v,{label:"\u540D\u79F0",prop:"name"},{default:e(()=>[a(R,{modelValue:l(o).name,"onUpdate:modelValue":t[0]||(t[0]=s=>l(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:M(y,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,null,{default:e(()=>[a(r,{onClick:y},{default:e(()=>[a(h,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),a(r,{onClick:H},{default:e(()=>[a(h,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),d((n(),p(r,{type:"primary",plain:"",onClick:t[1]||(t[1]=s=>b("create"))},{default:e(()=>[a(h,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E ")]),_:1})),[[k,["crm:product-category:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(P,null,{default:e(()=>[d((n(),p(D,{data:l(x),"row-key":"id","default-expand-all":""},{default:e(()=>[a(i,{label:"\u5206\u7C7B\u7F16\u53F7",align:"center",prop:"id"}),a(i,{label:"\u5206\u7C7B\u540D\u79F0",align:"center",prop:"name"}),a(i,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:l(ea),width:"180px"},null,8,["formatter"]),a(i,{label:"\u64CD\u4F5C",align:"center"},{default:e(s=>[d((n(),p(r,{link:"",type:"primary",onClick:S=>b("update",s.row.id)},{default:e(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:update"]]]),d((n(),p(r,{link:"",type:"danger",onClick:S=>(async j=>{try{await w.delConfirm(),await ra(j),w.success(F("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:e(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:delete"]]])]),_:1})]),_:1},8,["data"])),[[K,l(f)]])]),_:1}),a(na,{ref_key:"formRef",ref:C,onSuccess:_},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/crm/product/category/index.vue"]])});export{da as __tla,V as default};