import{d as Q,Q as W,J as X,r as m,A as Y,b as Z,a1 as j,o as r,c as S,k as e,B as l,a as t,a2 as E,F as x,i as A,a3 as H,N as M,g as p,O as i,P as _,C as L,D as v,a7 as ee,S as ae,$ as le,R as te,U as se,V as oe,W as ne,X as re,aD as ie,Y as pe,Z as ue}from"./index-BP6bNRoi.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as ce}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as fe}from"./formatTime-DwR9f7DP.js";import{_ as _e,g as ge,d as ye}from"./ClientForm.vue_vue_type_script_setup_true_lang-Bpw06q1t.js";import"./index-BZESAUPP.js";import"./color-DXkOL5Tu.js";import"./el-card-bU92WWV4.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import"./constants-CuOBQ73z.js";const be=["src"],he=Q({name:"SystemOAuth2Client",__name:"index",setup(ke){const C=W(),{t:F}=X(),g=m(!0),T=m(0),V=m([]),o=Y({pageNo:1,pageSize:10,name:null,status:void 0}),N=m(),u=async()=>{g.value=!0;try{const d=await ge(o);V.value=d.list,T.value=d.total}finally{g.value=!1}},y=()=>{o.pageNo=1,u()},G=()=>{N.value.resetFields(),y()},U=m(),O=(d,s)=>{U.value.open(d,s)};return Z(()=>{u()}),(d,s)=>{const P=ee,b=ae,R=le,D=te,h=se,c=oe,$=ne,z=me,n=re,q=ce,B=ie,I=pe,J=de,k=j("hasPermi"),K=ue;return r(),S(x,null,[e(z,null,{default:l(()=>[e($,{class:"-mb-15px",model:t(o),ref_key:"queryFormRef",ref:N,inline:!0,"label-width":"68px"},{default:l(()=>[e(b,{label:"\u5E94\u7528\u540D",prop:"name"},{default:l(()=>[e(P,{modelValue:t(o).name,"onUpdate:modelValue":s[0]||(s[0]=a=>t(o).name=a),placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D",clearable:"",onKeyup:E(y,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(b,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[e(D,{modelValue:t(o).status,"onUpdate:modelValue":s[1]||(s[1]=a=>t(o).status=a),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:l(()=>[(r(!0),S(x,null,A(t(H)(t(M).COMMON_STATUS),a=>(r(),p(R,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(b,null,{default:l(()=>[e(c,{onClick:y},{default:l(()=>[e(h,{icon:"ep:search",class:"mr-5px"}),i(" \u641C\u7D22")]),_:1}),e(c,{onClick:G},{default:l(()=>[e(h,{icon:"ep:refresh",class:"mr-5px"}),i(" \u91CD\u7F6E")]),_:1}),_((r(),p(c,{plain:"",type:"primary",onClick:s[2]||(s[2]=a=>O("create"))},{default:l(()=>[e(h,{icon:"ep:plus",class:"mr-5px"}),i(" \u65B0\u589E ")]),_:1})),[[k,["system:oauth2-client:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(z,null,{default:l(()=>[_((r(),p(I,{data:t(V)},{default:l(()=>[e(n,{label:"\u5BA2\u6237\u7AEF\u7F16\u53F7",align:"center",prop:"clientId"}),e(n,{label:"\u5BA2\u6237\u7AEF\u5BC6\u94A5",align:"center",prop:"secret"}),e(n,{label:"\u5E94\u7528\u540D",align:"center",prop:"name"}),e(n,{label:"\u5E94\u7528\u56FE\u6807",align:"center",prop:"logo"},{default:l(a=>[L("img",{width:"40px",height:"40px",src:a.row.logo},null,8,be)]),_:1}),e(n,{label:"\u72B6\u6001",align:"center",prop:"status"},{default:l(a=>[e(q,{type:t(M).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(n,{label:"\u8BBF\u95EE\u4EE4\u724C\u7684\u6709\u6548\u671F",align:"center",prop:"accessTokenValiditySeconds"},{default:l(a=>[i(v(a.row.accessTokenValiditySeconds)+" \u79D2",1)]),_:1}),e(n,{label:"\u5237\u65B0\u4EE4\u724C\u7684\u6709\u6548\u671F",align:"center",prop:"refreshTokenValiditySeconds"},{default:l(a=>[i(v(a.row.refreshTokenValiditySeconds)+" \u79D2",1)]),_:1}),e(n,{label:"\u6388\u6743\u7C7B\u578B",align:"center",prop:"authorizedGrantTypes"},{default:l(a=>[(r(!0),S(x,null,A(a.row.authorizedGrantTypes,(w,f)=>(r(),p(B,{"disable-transitions":!0,key:f,index:f,class:"mr-5px"},{default:l(()=>[i(v(w),1)]),_:2},1032,["index"]))),128))]),_:1}),e(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(fe)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:l(a=>[_((r(),p(c,{link:"",type:"primary",onClick:w=>O("update",a.row.id)},{default:l(()=>[i(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[k,["system:oauth2-client:update"]]]),_((r(),p(c,{link:"",type:"danger",onClick:w=>(async f=>{try{await C.delConfirm(),await ye(f),C.success(F("common.delSuccess")),await u()}catch{}})(a.row.id)},{default:l(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["system:oauth2-client:delete"]]])]),_:1})]),_:1},8,["data"])),[[K,t(g)]]),e(J,{total:t(T),page:t(o).pageNo,"onUpdate:page":s[3]||(s[3]=a=>t(o).pageNo=a),limit:t(o).pageSize,"onUpdate:limit":s[4]||(s[4]=a=>t(o).pageSize=a),onPagination:u},null,8,["total","page","limit"])]),_:1}),e(_e,{ref_key:"formRef",ref:U,onSuccess:u},null,512)],64)}}});export{he as default};
|