index-PQfS1a5H.js 2.6 KB

1
  1. var u=(e,l,a)=>new Promise((c,n)=>{var m=t=>{try{r(a.next(t))}catch(o){n(o)}},i=t=>{try{r(a.throw(t))}catch(o){n(o)}},r=t=>t.done?c(t.value):Promise.resolve(t.value).then(m,i);r((a=a.apply(e,l)).next())});import{B as w,u as C}from"./useTable-BvGx2hOb.js";import{T}from"./index-cfTHEGJC.js";import{u as y}from"./index-CXzpB-hr.js";import{O as D,c as k}from"./OauthDrawer-dfzU52PO.js";import{v,_ as O}from"./entry/index-_47knzYp-1731674619279.js";import{g as P,d as S}from"./oauthProvider-BwC74xJI.js";import{P as B}from"./index-BHgb3mr7.js";import{d as I,a9 as s,_ as b,a6 as _,a7 as p,k as d,G as R,a2 as $,a0 as A}from"./vue-B5pbXMv7.js";import"./useForm-Bx3dD47S.js";import"./index-DzmEi_Cz.js";import"./antd-CBeLo_oO.js";import"./tree-DzWyTcw6.js";import"./copyTextToClipboard-wHy60X1A.js";import"./index-CuMkjCMo.js";import"./index-Ck_gyeb3.js";import"./index-CJOsG-Mp.js";import"./index-DkGmfgEA.js";import"./index-CTfnwg9z.js";import"./useWindowSizeFn-CK_IE3dL.js";import"./plugin-C2XGVjF6.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C3HH8-CK.js";import"./sortable.esm-BEDva30o.js";import"./useSortable-YaPA5f_C.js";import"./useContentViewHeight-DIMHQy5d.js";const F=I({name:"OauthManagement",components:{BasicTable:w,OauthDrawer:D,TableAction:T,PageWrapper:B},setup(){const{t:e}=v.useI18n(),[l,{openDrawer:a}]=y(),[c,{reload:n}]=C({title:e("sys.oauth.providerList"),api:P,columns:k,useSearchForm:!1,showTableSetting:!0,bordered:!0,showIndexColumn:!1,actionColumn:{width:30,title:e("common.action"),dataIndex:"action",fixed:void 0}});function m(){a(!0,{isUpdate:!1})}function i(o){a(!0,{record:o,isUpdate:!0})}function r(o){return u(this,null,function*(){(yield S({ids:[o.id]})).code===0&&(yield n())})}function t(){return u(this,null,function*(){yield n()})}return{t:e,registerTable:c,registerDrawer:l,handleCreate:m,handleEdit:i,handleDelete:r,handleSuccess:t}}});function N(e,l,a,c,n,m){const i=s("a-button"),r=s("TableAction"),t=s("BasicTable"),o=s("OauthDrawer"),f=s("PageWrapper");return b(),_(f,null,{default:p(()=>[d(t,{onRegister:e.registerTable},{toolbar:p(()=>[d(i,{type:"primary",onClick:e.handleCreate},{default:p(()=>[R($(e.t("sys.oauth.addProvider")),1)]),_:1},8,["onClick"])]),bodyCell:p(({column:g,record:h})=>[g.key==="action"?(b(),_(r,{key:0,actions:[{label:"编辑",onClick:e.handleEdit.bind(null,h)},{label:"删除",color:"error",popConfirm:{title:e.t("common.deleteConfirm"),placement:"left",confirm:e.handleDelete.bind(null,h)}}]},null,8,["actions"])):A("",!0)]),_:1},8,["onRegister"]),d(o,{onRegister:e.registerDrawer,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])]),_:1})}const le=O(F,[["render",N]]);export{le as default};