index-168dff37.js 3.3 KB

1
  1. import{d as q,h as z,r as i,e as A,l as G,Q as K,o as c,c as Q,f as a,w as e,a as r,R as T,n,x as d,v as p,F as X,V as E,A as M,j as W,C as B,D as J,G as L,H as N,I as O,_ as Y,__tla as Z}from"./index-11e4820e.js";import{_ as $,__tla as aa}from"./ContentWrap-694014d4.js";import{d as ea,__tla as ta}from"./formatTime-f6a2c881.js";import{g as ra,d as la,__tla as sa}from"./index-c2aa12da.js";import ca,{__tla as na}from"./ProductCategoryForm-5e25e340.js";import{h as oa}from"./tree-0af4953a.js";import{u as _a,__tla as ua}from"./useMessage-06ddf735.js";import{__tla as ma}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as ia}from"./el-card-919c14be.js";import{__tla as da}from"./Dialog-bbfaf85c.js";let P,pa=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return da}catch{}})()]).then(async()=>{P=Y(q({name:"CrmProductCategory",__name:"index",setup(fa){const w=_a(),{t:V}=z(),f=i(!0),x=i([]),o=A({name:null}),g=i(),_=async()=>{f.value=!0;try{const u=await ra(o);x.value=oa(u,"id","parentId")}finally{f.value=!1}},y=()=>{_()},F=()=>{g.value.resetFields(),y()},C=i(),b=(u,t)=>{C.value.open(u,t)};return G(()=>{_()}),(u,t)=>{const H=E,v=M,h=W,l=B,I=J,R=$,m=L,D=N,k=K("hasPermi"),S=O;return c(),Q(X,null,[a(R,null,{default:e(()=>[a(I,{class:"-mb-15px",model:r(o),ref_key:"queryFormRef",ref:g,inline:!0,"label-width":"68px"},{default:e(()=>[a(v,{label:"\u540D\u79F0",prop:"name"},{default:e(()=>[a(H,{modelValue:r(o).name,"onUpdate:modelValue":t[0]||(t[0]=s=>r(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:T(y,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,null,{default:e(()=>[a(l,{onClick:y},{default:e(()=>[a(h,{icon:"ep:search",class:"mr-5px"}),n(" \u641C\u7D22")]),_:1}),a(l,{onClick:F},{default:e(()=>[a(h,{icon:"ep:refresh",class:"mr-5px"}),n(" \u91CD\u7F6E")]),_:1}),d((c(),p(l,{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})),[[k,["crm:product-category:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(R,null,{default:e(()=>[d((c(),p(D,{data:r(x),"row-key":"id","default-expand-all":""},{default:e(()=>[a(m,{label:"\u5206\u7C7B\u7F16\u53F7",align:"center",prop:"id"}),a(m,{label:"\u5206\u7C7B\u540D\u79F0",align:"center",prop:"name"}),a(m,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:r(ea),width:"180px"},null,8,["formatter"]),a(m,{label:"\u64CD\u4F5C",align:"center"},{default:e(s=>[d((c(),p(l,{link:"",type:"primary",onClick:U=>b("update",s.row.id)},{default:e(()=>[n(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:update"]]]),d((c(),p(l,{link:"",type:"danger",onClick:U=>(async j=>{try{await w.delConfirm(),await la(j),w.success(V("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:e(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:delete"]]])]),_:1})]),_:1},8,["data"])),[[S,r(f)]])]),_:1}),a(ca,{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{pa as __tla,P as default};