沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{aV as V,d as O,Q,J as W,r as c,A as X,b as Z,a1 as $,o as u,c as x,k as e,B as s,a,a2 as I,F as U,i as j,a3 as D,N as S,g as y,O as g,P as z,a7 as G,S as H,$ as L,R as M,U as ee,V as ae,W as le,X as te,Y as se,Z as re}from"./index-CHTXMeh8.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as ne}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as ue}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as C}from"./formatTime-DG99nHw2.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";const pe=O({name:"SystemTokenClient",__name:"index",setup(ie){const _=Q(),{t:N}=W(),m=c(!0),b=c(0),h=c([]),r=X({pageNo:1,pageSize:10,userId:null,userType:void 0,clientId:null}),k=c(),p=async()=>{m.value=!0;try{const t=await(n=r,V.get({url:"/system/oauth2-token/page",params:n}));h.value=t.list,b.value=t.total}finally{m.value=!1}var n},i=()=>{r.pageNo=1,p()},P=()=>{k.value.resetFields(),i()},E=async n=>{try{await _.confirm("\u662F\u5426\u8981\u5F3A\u5236\u9000\u51FA\u7528\u6237"),await(t=>V.delete({url:"/system/oauth2-token/delete?accessToken="+t}))(n),_.success(N("common.success")),await p()}catch{}};return Z(()=>{p()}),(n,t)=>{const T=G,d=H,F=L,R=M,w=ee,f=ae,Y=le,v=ue,o=te,K=ne,q=se,A=oe,B=$("hasPermi"),J=re;return u(),x(U,null,[e(v,null,{default:s(()=>[e(Y,{class:"-mb-15px",model:a(r),ref_key:"queryFormRef",ref:k,inline:!0,"label-width":"90px"},{default:s(()=>[e(d,{label:"\u7528\u6237\u7F16\u53F7",prop:"userId"},{default:s(()=>[e(T,{modelValue:a(r).userId,"onUpdate:modelValue":t[0]||(t[0]=l=>a(r).userId=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7F16\u53F7",clearable:"",onKeyup:I(i,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u7528\u6237\u7C7B\u578B",prop:"userType"},{default:s(()=>[e(R,{modelValue:a(r).userType,"onUpdate:modelValue":t[1]||(t[1]=l=>a(r).userType=l),placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u7C7B\u578B",clearable:"",class:"!w-240px"},{default:s(()=>[(u(!0),x(U,null,j(a(D)(a(S).USER_TYPE),l=>(u(),y(F,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u5BA2\u6237\u7AEF\u7F16\u53F7",prop:"clientId"},{default:s(()=>[e(T,{modelValue:a(r).clientId,"onUpdate:modelValue":t[2]||(t[2]=l=>a(r).clientId=l),placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u7AEF\u7F16\u53F7",clearable:"",onKeyup:I(i,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(d,null,{default:s(()=>[e(f,{onClick:i},{default:s(()=>[e(w,{icon:"ep:search",class:"mr-5px"}),g(" \u641C\u7D22")]),_:1}),e(f,{onClick:P},{default:s(()=>[e(w,{icon:"ep:refresh",class:"mr-5px"}),g(" \u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(v,null,{default:s(()=>[z((u(),y(q,{data:a(h)},{default:s(()=>[e(o,{label:"\u8BBF\u95EE\u4EE4\u724C",align:"center",prop:"accessToken",width:"300"}),e(o,{label:"\u5237\u65B0\u4EE4\u724C",align:"center",prop:"refreshToken",width:"300"}),e(o,{label:"\u7528\u6237\u7F16\u53F7",align:"center",prop:"userId"}),e(o,{label:"\u7528\u6237\u7C7B\u578B",align:"center",prop:"userType"},{default:s(l=>[e(K,{type:a(S).USER_TYPE,value:l.row.userType},null,8,["type","value"])]),_:1}),e(o,{label:"\u8FC7\u671F\u65F6\u95F4",align:"center",prop:"expiresTime",formatter:a(C),width:"180"},null,8,["formatter"]),e(o,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:a(C),width:"180"},null,8,["formatter"]),e(o,{label:"\u64CD\u4F5C",align:"center"},{default:s(l=>[z((u(),y(f,{link:"",type:"danger",onClick:de=>E(l.row.accessToken)},{default:s(()=>[g(" \u5F3A\u9000 ")]),_:2},1032,["onClick"])),[[B,["system:oauth2-token:delete"]]])]),_:1})]),_:1},8,["data"])),[[J,a(m)]]),e(A,{total:a(b),page:a(r).pageNo,"onUpdate:page":t[3]||(t[3]=l=>a(r).pageNo=l),limit:a(r).pageSize,"onUpdate:limit":t[4]||(t[4]=l=>a(r).pageSize=l),onPagination:p},null,8,["total","page","limit"])]),_:1})],64)}}});export{pe as default};