选煤厂安全管理系统前端代码
houzhongjian
2024-11-25 37b2044f04a09e89f82f8484279b5f06b7194481
1
import{d as Q,Q as X,J as Y,r as m,A as Z,b as $,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-CHTXMeh8.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as ce}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as fe}from"./formatTime-DG99nHw2.js";import{_ as _e,g as ge,d as ye}from"./ClientForm.vue_vue_type_script_setup_true_lang-DFSP3pEM.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";import"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";import"./constants-CuOBQ73z.js";const be=["src"],he=Q({name:"SystemOAuth2Client",__name:"index",setup(ke){const C=X(),{t:R}=Y(),g=m(!0),T=m(0),V=m([]),o=Z({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()},F=()=>{N.value.resetFields(),y()},U=m(),O=(d,s)=>{U.value.open(d,s)};return $(()=>{u()}),(d,s)=>{const P=ee,b=ae,D=le,G=te,h=se,c=oe,W=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(W,{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(G,{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(D,{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:F},{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(R("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};