1 |
- import{d as I,P as K,r as i,x as T,b as W,a3 as X,o as c,c as Y,f as a,A as e,a as l,a4 as j,D as n,k as p,C as d,F as z,a8 as B,U as H,_ as M,J as E,V as G,W as L,X as N,Y as O,__tla as Q}from"./index-1f518666.js";import{_ as Z,__tla as $}from"./ContentWrap.vue_vue_type_script_setup_true_lang-a4de6de9.js";import{d as aa,__tla as ea}from"./formatTime-a4909bb5.js";import{g as ta,d as la,__tla as ra}from"./index-217479ad.js";import{_ as sa,__tla as ca}from"./ProductCategoryForm.vue_vue_type_script_setup_true_lang-35a6196b.js";import{h as na}from"./tree-0af4953a.js";import{u as oa,__tla as _a}from"./useMessage-633c11d2.js";import{__tla as ua}from"./el-card-955661ed.js";import{__tla as ma}from"./Dialog-4c960d8c.js";import"./_plugin-vue_export-helper-1b428a4d.js";let V,ia=Promise.all([(()=>{try{return Q}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})()]).then(async()=>{V=I({name:"CrmProductCategory",__name:"index",setup(pa){const x=oa(),{t:F}=K(),f=i(!0),C=i([]),o=T({name:null}),g=i(),_=async()=>{f.value=!0;try{const u=await ta(o);C.value=na(u,"id","parentId")}finally{f.value=!1}},y=()=>{_()},R=()=>{g.value.resetFields(),y()},w=i(),b=(u,t)=>{w.value.open(u,t)};return W(()=>{_()}),(u,t)=>{const D=B,v=H,h=M,r=E,J=G,P=Z,m=L,S=N,k=X("hasPermi"),U=O;return c(),Y(z,null,[a(P,null,{default:e(()=>[a(J,{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(D,{modelValue:l(o).name,"onUpdate:modelValue":t[0]||(t[0]=s=>l(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:j(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:R},{default:e(()=>[a(h,{icon:"ep:refresh",class:"mr-5px"}),n(" \u91CD\u7F6E")]),_:1}),p((c(),d(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})),[[k,["crm:product-category:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(P,null,{default:e(()=>[p((c(),d(S,{data:l(C),"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(aa),width:"180px"},null,8,["formatter"]),a(m,{label:"\u64CD\u4F5C",align:"center"},{default:e(s=>[p((c(),d(r,{link:"",type:"primary",onClick:q=>b("update",s.row.id)},{default:e(()=>[n(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:update"]]]),p((c(),d(r,{link:"",type:"danger",onClick:q=>(async A=>{try{await x.delConfirm(),await la(A),x.success(F("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:e(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:delete"]]])]),_:1})]),_:1},8,["data"])),[[U,l(f)]])]),_:1}),a(sa,{ref_key:"formRef",ref:w,onSuccess:_},null,512)],64)}}})});export{ia as __tla,V as default};
|