import{e as f,h as k}from"./auth.a54adaef.js";import{P as y,u as B}from"./index.a44de264.js";import{P as E}from"./index.f84801a7.js";import{_ as V}from"./index.b32171ca.js";import{d as w,r as P,o as $,a as s,aa as x,b as g,c as b,f as e,w as o,ab as z,e as u,t as q,m as d}from"./vendor.d574ef89.js";const A=w({components:{Pagination:y,Popup:E},setup(){const t=P({id:0,name:"",remark:"",create_time:"",num:0}),{pager:l,requestApi:r}=B({callback:f,params:t}),c=m=>{k({id:m}).then(i=>{console.log("res",i),r()}).catch(i=>{console.log("err",i)})};return $(()=>{r()}),{formData:t,apiRoleLists:f,handleDelete:c,pager:l,requestApi:r}}}),N={class:"role"},R=d("\u65B0\u589E\u89D2\u8272"),T={class:"m-t-15"},j={class:"m-t-15"},I=d("\u7F16\u8F91"),L=d("\u5220\u9664"),M={class:"flex row-right"};function S(t,l,r,c,m,i){const p=s("el-button"),_=s("router-link"),a=s("el-table-column"),h=s("popup"),v=s("el-table"),D=s("pagination"),C=s("el-card"),F=x("loading");return g(),b("div",N,[e(C,{shadow:"never"},{default:o(()=>[e(_,{to:"/permission/role/edit"},{default:o(()=>[e(p,{type:"primary",size:"small"},{default:o(()=>[R]),_:1})]),_:1}),z((g(),b("div",T,[u("div",j,[e(v,{data:t.pager.lists,size:"medium"},{default:o(()=>[e(a,{prop:"id",label:"ID"}),e(a,{prop:"name",label:"\u540D\u79F0"}),e(a,{prop:"sort",label:"\u6392\u5E8F"}),e(a,{prop:"remark",label:"\u5907\u6CE8"}),e(a,{prop:"isDisable",label:"\u72B6\u6001"},{default:o(n=>[u("span",null,q(n.row.isDisable==0?"\u542F\u7528":"\u5173\u95ED"),1)]),_:1}),e(a,{prop:"",label:"\u6743\u9650"}),e(a,{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4"}),e(a,{prop:"",label:"\u64CD\u4F5C"},{default:o(({row:n})=>[e(_,{class:"m-r-10",to:{path:"/permission/role/edit",query:{id:n.id}}},{default:o(()=>[e(p,{type:"text",size:"mini"},{default:o(()=>[I]),_:1})]),_:2},1032,["to"]),e(h,{class:"m-r-10 inline",onConfirm:U=>t.handleDelete(n.id)},{trigger:o(()=>[e(p,{type:"text",size:"mini"},{default:o(()=>[L]),_:1})]),_:2},1032,["onConfirm"])]),_:1})]),_:1},8,["data"])]),u("div",M,[e(D,{modelValue:t.pager,"onUpdate:modelValue":l[0]||(l[0]=n=>t.pager=n),layout:"total, prev, pager, next, jumper",onChange:t.requestApi},null,8,["modelValue","onChange"])])])),[[F,t.pager.loading]])]),_:1})])}var Q=V(A,[["render",S]]);export{Q as default};
