Files
aiot-platform-ui/apps/web-antd/dist/js/index--ffRP3cd.js
lzh 91cd7adc39
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 9s
chore: build and deploy web-antd
2026-03-27 16:58:19 +08:00

2 lines
4.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var w=Object.defineProperty;var g=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var k=(i,o,e)=>o in i?w(i,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[o]=e,y=(i,o)=>{for(var e in o||(o={}))S.call(o,e)&&k(i,e,o[e]);if(g)for(var e of g(o))D.call(o,e)&&k(i,e,o[e]);return i};var u=(i,o,e)=>new Promise((f,s)=>{var c=t=>{try{l(e.next(t))}catch(a){s(a)}},h=t=>{try{l(e.throw(t))}catch(a){s(a)}},l=t=>t.done?f(t.value):Promise.resolve(t.value).then(c,h);l((e=e.apply(i,o)).next())});import"./vxe-table-Cjhpvy3G.js";import{aq as b,at as I,$ as r,a9 as d}from"./bootstrap-BRzwfS6_.js";import{D as x}from"./dict-enum-CaHgMaDZ.js";import{_}from"./table-action.vue_vue_type_script_setup_true_lang-CeSmlcLg.js";import{_ as O}from"./doc-alert.vue_vue_type_script_setup_true_lang-JpsRIOk2.js";import{_ as v}from"./page.vue_vue_type_script_setup_true_lang-Diz0sWCd.js";import{m as P,b9 as A,ab as N,b2 as W,bJ as m,j as p,u as n,cp as B}from"../jse/index-index-D2yVKoFr.js";import{u as M}from"./use-vxe-grid-C0Xbxzc8.js";import{A as C}from"./icons-CieLeI1V.js";import{v as $}from"./AlertBuilder-DpxbnXOy.js";import"./dict-tag.vue_vue_type_script_setup_true_lang-CXbQugJj.js";import"./index-BNa-GWyF.js";import"./circle-check-big-BX0-4ESp.js";import"./x-B96ous_M.js";function R(i){return b.get("/system/oauth2-token/page",{params:i})}function T(i){return b.delete(`/system/oauth2-token/delete?accessToken=${i}`)}function q(){return[{fieldName:"userId",label:"用户编号",component:"Input",componentProps:{placeholder:"请输入用户编号",allowClear:!0}},{fieldName:"userType",label:"用户类型",component:"Select",componentProps:{options:I(x.USER_TYPE,"number"),placeholder:"请选择用户类型",allowClear:!0}},{fieldName:"clientId",label:"客户端编号",component:"Input",componentProps:{placeholder:"请输入客户端编号",allowClear:!0}}]}function G(){return[{type:"checkbox",width:40},{field:"accessToken",title:"访问令牌",minWidth:300},{field:"refreshToken",title:"刷新令牌",minWidth:300},{field:"userId",title:"用户编号",minWidth:100},{field:"userType",title:"用户类型",minWidth:100,cellRender:{name:"CellDict",props:{type:x.USER_TYPE}}},{field:"clientId",title:"客户端编号",minWidth:120},{field:"expiresTime",title:"过期时间",minWidth:180,formatter:"formatDateTime"},{field:"createTime",title:"创建时间",minWidth:180,formatter:"formatDateTime"},{title:"操作",width:80,fixed:"right",slots:{default:"actions"}}]}const oe=P({__name:"index",setup(i){function o(){l.query()}function e(t){return u(this,null,function*(){const a=d.loading({content:r("ui.actionMessage.deleting",["令牌"]),duration:0});try{yield T(t.accessToken),d.success(r("ui.actionMessage.deleteSuccess",["令牌"])),o()}finally{a()}})}function f(){return u(this,null,function*(){yield $(r("ui.actionMessage.deleteBatchConfirm"));const t=d.loading({content:r("ui.actionMessage.deletingBatch"),duration:0});try{yield T(s.value.join(",")),s.value=[],d.success(r("ui.actionMessage.deleteSuccess")),o()}finally{t()}})}const s=A([]);function c({records:t}){s.value=t.map(a=>a.accessToken)}const[h,l]=M({formOptions:{schema:q()},gridOptions:{columns:G(),height:"auto",keepSource:!0,proxyConfig:{ajax:{query:(E,ae)=>u(null,[E,ae],function*({page:t},a){return yield R(y({pageNo:t.currentPage,pageSize:t.pageSize},a))})}},rowConfig:{keyField:"accessToken",isHover:!0},toolbarConfig:{refresh:!0,search:!0}},gridEvents:{checkboxAll:c,checkboxChange:c}});return(t,a)=>(W(),N(n(v),{"auto-content-height":""},{doc:m(()=>[p(n(O),{title:"OAuth 2.0SSO 单点登录)",url:"https://doc.iocoder.cn/oauth2/"})]),default:m(()=>[p(n(h),{"table-title":"令牌列表"},{"toolbar-tools":m(()=>[p(n(_),{actions:[{label:n(r)("ui.actionTitle.deleteBatch"),type:"primary",danger:!0,icon:n(C).DELETE,auth:["system:oauth2-token:delete"],disabled:n(B)(s.value),onClick:f}]},null,8,["actions"])]),actions:m(({row:E})=>[p(n(_),{actions:[{label:n(r)("common.delete"),type:"link",danger:!0,icon:n(C).DELETE,auth:["system:oauth2-token:delete"],popConfirm:{title:n(r)("ui.actionMessage.deleteConfirm",["令牌"]),confirm:e.bind(null,E)}}]},null,8,["actions"])]),_:1})]),_:1}))}});export{oe as default};