import{_ as N,g as $,d as G}from"./EditTemplateDialog.vue_vue_type_script_setup_true_lang.cbd3eeca.js";import{c as S}from"./browser.d69bddfa.js";import{d as U,b as k,r as v,c as u,e as F,f as L,g as i,h as e,i as l,u as a,k as P,q,A as I,F as M,m as p,N as j,E as h,y,_ as O}from"./index.0308b213.js";import"./useInstance.233fbdde.js";const R={class:"filter-form"},H=p("\u7B5B\u9009"),J={class:"data"},K={class:"operation-container"},Q={class:"operation-btn"},W=p("\u6DFB\u52A0\u6A21\u677F"),X={class:"table-operation-btn"},Y={class:"top"},Z=p("\u590D\u5236\u94FE\u63A5"),ee=p("\u4FEE\u6539"),te=p("\u5220\u9664"),oe={class:"pagination"},ae=U({setup(le){const s=k({page:1,limit:10,keyword:""}),c=k({lists:[],count:0}),_=()=>{$(s).then(n=>{c.lists=n.lists,c.count=n.count})};_();const B=n=>{j.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u8BE5\u6A21\u677F\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{G({id:n}).then(()=>{h.success("\u5220\u9664\u6A21\u677F\u6210\u529F"),_()})})};let d=v(!1),m=v(!1),g=v(0);const E=()=>{g.value=0,m.value=!0,y(()=>{d.value=!0})},T=n=>{g.value=n,m.value=!0,y(()=>{d.value=!0})},A=()=>{g.value=0,y(()=>{m.value=!1}),_()},D=n=>{let o=`store-page/category/category?template_id=${n}`;S.write(o).then(()=>{h({message:"\u590D\u5236\u5730\u5740\u6210\u529F",type:"success"})})};return(n,o)=>{const w=u("el-input"),C=u("el-form-item"),r=u("el-button"),x=u("el-form"),f=u("el-table-column"),V=u("el-table"),z=u("el-pagination");return F(),L(M,null,[i("div",R,[e(x,{"label-width":"10px"},{default:l(()=>[e(C,null,{default:l(()=>[e(w,{modelValue:a(s).keyword,"onUpdate:modelValue":o[0]||(o[0]=t=>a(s).keyword=t),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(C,null,{default:l(()=>[e(r,{type:"primary",onClick:o[1]||(o[1]=t=>_())},{default:l(()=>[H]),_:1})]),_:1})]),_:1})]),i("div",J,[i("div",K,[i("div",Q,[e(r,{class:"btn",type:"warning",onClick:E},{default:l(()=>[W]),_:1})])]),e(V,{data:a(c).lists},{default:l(()=>[e(f,{label:"id",prop:"id"}),e(f,{label:"\u540D\u79F0",prop:"name"}),e(f,{label:"\u64CD\u4F5C",align:"center"},{default:l(t=>[i("div",X,[i("div",Y,[e(r,{type:"primary",onClick:b=>D(t.row.id)},{default:l(()=>[Z]),_:2},1032,["onClick"]),e(r,{type:"primary",onClick:b=>T(t.row.id)},{default:l(()=>[ee]),_:2},1032,["onClick"]),e(r,{type:"danger",onClick:b=>B(t.row.id)},{default:l(()=>[te]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])]),i("div",oe,[e(z,{currentPage:a(s).page,"onUpdate:currentPage":o[2]||(o[2]=t=>a(s).page=t),"page-size":a(s).limit,"onUpdate:page-size":o[3]||(o[3]=t=>a(s).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a(c).count},null,8,["currentPage","page-size","total"])]),a(m)?(F(),P(N,{key:0,modelValue:a(d),"onUpdate:modelValue":o[4]||(o[4]=t=>q(d)?d.value=t:d=t),id:a(g),onOnClose:A},null,8,["modelValue","id"])):I("",!0)],64)}}});const de=O(ae,[["__scopeId","data-v-0bd59ad9"]]);export{de as default};
