index-03d1356d.js 3.3 KB

1
  1. import{d as q,h as A,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 B,V as E,A as M,j as W,C as J,D as L,G as N,H as O,I as X,_ as Y,__tla as Z}from"./index-6d7b82ba.js";import{_ as $,__tla as aa}from"./ContentWrap-1ba5c8ca.js";import{d as ea,__tla as ta}from"./formatTime-d24faf41.js";import{g as la,d as ra,__tla as ca}from"./index-7af0c63f.js";import na,{__tla as sa}from"./ProductCategoryForm-4c02bb8e.js";import{h as oa}from"./tree-0af4953a.js";import{u as _a,__tla as ua}from"./useMessage-be161634.js";import{__tla as ma}from"./ContentWrap.vue_vue_type_script_setup_true_lang-68bb15fa.js";import{__tla as ia}from"./el-card-1a4b93b1.js";import{__tla as da}from"./Dialog-78181bae.js";let R,pa=Promise.all([(()=>{try{return Z}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=Y(q({name:"CrmProductCategory",__name:"index",setup(fa){const w=_a(),{t:z}=A(),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 P=E,v=M,h=W,r=J,D=L,V=$,m=N,G=O,x=Q("hasPermi"),I=X;return n(),T(B,null,[a(V,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(P,{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(G,{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:S=>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:S=>(async j=>{try{await w.delConfirm(),await ra(j),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"])),[[I,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};