import{_ as V}from"./EditDegreeDialog.vue_vue_type_script_setup_true_lang.dbb734cd.js";import{l as N,b as P}from"./degree.24566a4c.js";import{d as T,a6 as U,r as l,b as h,p as q,c as m,at as I,e as b,f as M,g as a,h as n,i as d,w as $,u as e,k as y,q as j,A as L,F as O,m as x,y as C,N as R,E as G,_ as H}from"./index.0308b213.js";const J={class:"data"},K={class:"operation-container"},Q={class:"operation-btn"},S=x("\u6DFB\u52A0"),W={class:"table"},X={class:"table-operation-btn"},Y={class:"top"},Z=x("\u7F16\u8F91"),ee=x("\u5220\u9664"),te={class:"bottom"},ae={class:"pagination"},se=T({setup(oe){U();let g=l(!1);const s=h({page:1,limit:10,keywords:""});h({store:[]});const c=h({list:[],count:0});l([]);const r=()=>{g.value=!0,N(s).then(o=>{c.list=o.list,c.count=o.count,g.value=!1})};r(),l(!1),l(!1),q(()=>[s.page,s.limit],()=>{r()});let i=l(!1),_=l(!1),p=l(0);const E=()=>{p.value=0,_.value=!0,C(()=>{i.value=!0})},k=o=>{p.value=o,_.value=!0,C(()=>{i.value=!0})},B=()=>{p.value=0,C(()=>{_.value=!1}),r()},D=o=>{R.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{P({id:o}).then(()=>{G({message:"\u5220\u9664\u6210\u529F",type:"success"}),r()})}).catch(()=>{})};return(o,u)=>{const f=m("el-button"),v=m("el-table-column"),F=m("el-table"),A=m("el-pagination"),w=I("loading");return b(),M(O,null,[a("div",J,[a("div",K,[a("div",Q,[n(f,{class:"btn",type:"primary",onClick:E},{default:d(()=>[S]),_:1})])]),a("div",W,[$((b(),y(F,{data:e(c).list},{default:d(()=>[n(v,{label:"\u7B49\u7EA7",prop:"title"}),n(v,{label:"\u5E8F\u53F7",prop:"value"}),n(v,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:d(({row:t})=>[a("div",X,[a("div",Y,[n(f,{size:"small",type:"primary",onClick:z=>k(t.id)},{default:d(()=>[Z]),_:2},1032,["onClick"]),n(f,{size:"small",type:"danger",onClick:z=>D(t.id)},{default:d(()=>[ee]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])),[[w,e(g)]])])]),a("div",te,[a("div",ae,[n(A,{currentPage:e(s).page,"onUpdate:currentPage":u[0]||(u[0]=t=>e(s).page=t),"page-size":e(s).limit,"onUpdate:page-size":u[1]||(u[1]=t=>e(s).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e(c).count},null,8,["currentPage","page-size","total"])])]),e(_)?(b(),y(V,{key:0,modelValue:e(i),"onUpdate:modelValue":u[2]||(u[2]=t=>j(i)?i.value=t:i=t),id:e(p),onOnClose:B},null,8,["modelValue","id"])):L("",!0)],64)}}});const ue=H(se,[["__scopeId","data-v-f5fd58da"]]);export{ue as default};
