1 |
- import{d as I,P as K,r as m,x as Q,b as T,a4 as U,o as c,c as W,f as a,A as e,a as l,a5 as X,D as n,k as d,C as p,F as Y,a9 as j,V as B,Q as M,J as Z,W as E,X as G,Y as H,Z as L,_ as N,__tla as O}from"./index-f6fb8e95.js";import{_ as $,__tla as aa}from"./ContentWrap-96bb70ec.js";import{d as ea,__tla as ta}from"./formatTime-ddd96ac8.js";import{g as la,d as ra,__tla as sa}from"./index-e72c58b9.js";import ca,{__tla as na}from"./ProductCategoryForm-a32f044e.js";import{h as oa}from"./tree-0af4953a.js";import{u as _a,__tla as ua}from"./useMessage-3b767a67.js";import{__tla as ia}from"./el-card-8db16709.js";import{__tla as ma}from"./Dialog-ac2b0e4e.js";let P,da=Promise.all([(()=>{try{return O}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ma}catch{}})()]).then(async()=>{P=N(I({name:"CrmProductCategory",__name:"index",setup(pa){const k=_a(),{t:V}=K(),f=m(!0),w=m([]),o=Q({name:null}),g=m(),_=async()=>{f.value=!0;try{const u=await la(o);w.value=oa(u,"id","parentId")}finally{f.value=!1}},y=()=>{_()},z=()=>{g.value.resetFields(),y()},C=m(),b=(u,t)=>{C.value.open(u,t)};return T(()=>{_()}),(u,t)=>{const q=j,v=B,h=M,r=Z,D=E,F=$,i=G,J=H,x=U("hasPermi"),R=L;return c(),W(Y,null,[a(F,null,{default:e(()=>[a(D,{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(q,{modelValue:l(o).name,"onUpdate:modelValue":t[0]||(t[0]=s=>l(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:X(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"}),n(" \u641C\u7D22")]),_:1}),a(r,{onClick:z},{default:e(()=>[a(h,{icon:"ep:refresh",class:"mr-5px"}),n(" \u91CD\u7F6E")]),_:1}),d((c(),p(r,{type:"primary",plain:"",onClick:t[1]||(t[1]=s=>b("create"))},{default:e(()=>[a(h,{icon:"ep:plus",class:"mr-5px"}),n(" \u65B0\u589E ")]),_:1})),[[x,["crm:product-category:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(F,null,{default:e(()=>[d((c(),p(J,{data:l(w),"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((c(),p(r,{link:"",type:"primary",onClick:S=>b("update",s.row.id)},{default:e(()=>[n(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[x,["crm:product-category:update"]]]),d((c(),p(r,{link:"",type:"danger",onClick:S=>(async A=>{try{await k.delConfirm(),await ra(A),k.success(V("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:e(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["crm:product-category:delete"]]])]),_:1})]),_:1},8,["data"])),[[R,l(f)]])]),_:1}),a(ca,{ref_key:"formRef",ref:C,onSuccess:_},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/crm/product/category/index.vue"]])});export{da as __tla,P as default};
|