index-00e1492f.js 3.3 KB

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