index-354e8ddf.js 3.2 KB

1
  1. import{d as J,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 L,_ as M,J as E,V as G,W as H,X as N,Y as O,__tla as Q}from"./index-f65577b8.js";import{_ as Z,__tla as $}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{d as aa,__tla as ea}from"./formatTime-411ed1a1.js";import{g as ta,d as la,__tla as ra}from"./index-273c28c5.js";import{_ as sa,__tla as ca}from"./ProductCategoryForm.vue_vue_type_script_setup_true_lang-7b67f6d7.js";import{h as na}from"./tree-0af4953a.js";import{u as oa,__tla as _a}from"./useMessage-4dbf0ae4.js";import{__tla as ua}from"./el-card-ab53e6aa.js";import{__tla as ma}from"./Dialog-bd3317a7.js";import"./_plugin-vue_export-helper-1b428a4d.js";let P,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()=>{P=J({name:"CrmProductCategory",__name:"index",setup(pa){const x=oa(),{t:V}=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 q=B,v=L,h=M,r=E,D=G,F=Z,m=H,S=N,k=X("hasPermi"),U=O;return c(),Y(z,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: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(F,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:A=>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:A=>(async I=>{try{await x.delConfirm(),await la(I),x.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"])),[[U,l(f)]])]),_:1}),a(sa,{ref_key:"formRef",ref:w,onSuccess:_},null,512)],64)}}})});export{ia as __tla,P as default};