import{b as V,d as N}from"./spellrice.ca3d178e.js";import{_ as P}from"./EditSpellriceDialog.vue_vue_type_script_setup_true_lang.4ac738da.js";import{d as U,r as g,b as B,p as q,c as v,at as I,e as b,f as L,g as l,h as t,i as s,w as T,k as F,m as c,t as D,u as a,q as $,A as j,F as M,y as C,E as O}from"./index.0308b213.js";import"./EditSpellriceGoods.a72c66b0.js";const R={class:"data"},G={class:"operation-container"},H={class:"operation-btn"},J=c("\u6DFB\u52A0\u7279\u4EF7\u6D3B\u52A8"),K={class:"table"},Q={class:"table-operation-btn"},W={class:"top"},X=c("\u7F16\u8F91"),Y=c("\u5220\u9664"),Z={class:"bottom"},ee={class:"pagination"},ie=U({setup(te){const f=g(!1),o=B({page:1,limit:10}),r=B({list:[],count:0}),p=()=>{f.value=!0,V(o).then(i=>{r.list=i.spellrices,r.count=i.count}).finally(()=>{f.value=!1})};p();let n=g(!1),_=g(!1),m=g(0);const x=()=>{m.value=0,_.value=!0,C(()=>{n.value=!0})},k=i=>{m.value=i,_.value=!0,C(()=>{n.value=!0})},y=i=>{N(i).then(()=>{O.success("\u5220\u9664\u62FC\u996D\u6D3B\u52A8\u6210\u529F"),p()})},A=()=>{m.value=0,C(()=>{_.value=!1}),p()};return q(()=>[o.page,o.limit],()=>{p()}),(i,u)=>{const h=v("el-button"),d=v("el-table-column"),E=v("el-table"),S=v("el-pagination"),w=I("loading");return b(),L(M,null,[l("div",R,[l("div",G,[l("div",H,[t(h,{class:"btn",type:"primary",onClick:x},{default:s(()=>[J]),_:1})])]),l("div",K,[T((b(),F(E,{data:a(r).list},{default:s(()=>[t(d,{label:"\u62FC\u996DID",width:"70px",prop:"id"}),t(d,{label:"\u6D3B\u52A8\u4E3B\u9898",prop:"title"}),t(d,{width:"170px",label:"\u6D3B\u52A8\u65E5\u671F"},{default:s(({row:e})=>[c(D(e.starttime+"-"+e.endtime),1)]),_:1}),t(d,{width:"170px",label:"	\u62A2\u8D2D\u65F6\u6BB5"},{default:s(({row:e})=>[c(D(e.starthour+"-"+e.endhour),1)]),_:1}),t(d,{width:"170px",label:"\u72B6\u6001"},{default:s(({row:e})=>[c(D(e.status_cn),1)]),_:1}),t(d,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:s(({row:e})=>[l("div",Q,[l("div",W,[t(h,{size:"small",type:"primary",onClick:z=>k(e.id)},{default:s(()=>[X]),_:2},1032,["onClick"]),t(h,{size:"small",type:"danger",onClick:z=>y(e.id)},{default:s(()=>[Y]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])),[[w,f.value]])])]),l("div",Z,[l("div",ee,[t(S,{currentPage:a(o).page,"onUpdate:currentPage":u[0]||(u[0]=e=>a(o).page=e),"page-size":a(o).limit,"onUpdate:page-size":u[1]||(u[1]=e=>a(o).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a(r).count},null,8,["currentPage","page-size","total"])])]),a(_)?(b(),F(P,{key:0,modelValue:a(n),"onUpdate:modelValue":u[2]||(u[2]=e=>$(n)?n.value=e:n=e),id:a(m),onOnClose:A},null,8,["modelValue","id"])):j("",!0)],64)}}});export{ie as default};
