import{s as p}from"./index-a6ee13d3.js";import{E as b,a as y}from"./element-plus-91d6d961.js";import{H as l,_ as v,i as x,ah as e,o as w,c as g,V as t,P as a,a as R,T as B}from"./@vue-6dabbe94.js";import{_ as D}from"./_plugin-vue_export-helper-c27b6911.js";import"./pinia-b6f74250.js";import"./vue-router-c1461dfc.js";import"./vue-i18n-b3581196.js";import"./@intlify-ea47d1db.js";import"./source-map-7d7e1c08.js";import"./vue-b1ba6f14.js";import"./js-cookie-edb2da2a.js";import"./@element-plus-64e6e14a.js";import"./nprogress-08a53ce8.js";import"./axios-4a70c6fc.js";import"./qs-c5b6dbf2.js";import"./side-channel-394f276c.js";import"./get-intrinsic-bd2830fd.js";import"./has-symbols-e8f3ca0e.js";import"./has-proto-f7d0b240.js";import"./function-bind-22e7ee79.js";import"./has-26d28e02.js";import"./call-bind-e5c1c8b0.js";import"./object-inspect-8fd4bade.js";import"./mitt-f7ef348c.js";import"./vue-grid-layout-ec2a62c3.js";import"./lodash-es-9851428c.js";import"./@vueuse-e129c873.js";import"./@popperjs-c75af06c.js";import"./@ctrl-f8748455.js";import"./dayjs-f6fdf7b4.js";import"./async-validator-dee29e8b.js";import"./memoize-one-297ddbcb.js";import"./escape-html-b8998962.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-880a26aa.js";function T(){return{getResList(o){return p({url:"/admin/resource/list",method:"get",params:o})},syncRes(o){return p({url:"/admin/resource/sync",method:"post",params:o})}}}const C={class:"system-user-container"},E={class:"system-role-search mb15"},N=l({name:"systemRes"}),P=l({...N,setup(o){const n=T(),s=v({tableData:{data:[],loading:!1}}),m=()=>{b.confirm("此操作将覆盖所有资源数据, 是否继续?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n.syncRes().then(()=>{i(),y.success("同步成功")})}).catch(()=>{})},i=()=>{n.getResList(s.tableData.param).then(c=>{s.tableData.data=c.data}).catch(()=>{})};return x(()=>{i()}),(c,V)=>{const _=e("ele-Plus"),d=e("el-icon"),u=e("el-button"),r=e("el-table-column"),f=e("el-table"),h=e("el-card");return w(),g("div",C,[t(h,{shadow:"hover"},{default:a(()=>[R("div",E,[t(u,{onClick:m,class:"mt15",size:"default",type:"primary"},{default:a(()=>[t(d,null,{default:a(()=>[t(_)]),_:1}),B("同步资源")]),_:1})]),t(f,{data:s.tableData.data,stripe:"",style:{width:"100%"}},{default:a(()=>[t(r,{prop:"resourceName",label:"资源名称","show-overflow-tooltip":""}),t(r,{prop:"resourcePath",label:"权限标识","show-overflow-tooltip":""}),t(r,{prop:"created",label:"同步时间","show-overflow-tooltip":""})]),_:1},8,["data"])]),_:1})])}}});const dt=D(P,[["__scopeId","data-v-a26a93dc"]]);export{dt as default};
