沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{aV as I,d as R,Q as q,r as s,A,b as G,a1 as H,o as d,c as K,k as e,B as r,a,a2 as U,O as c,P as v,g as w,N as C,F as B,a7 as Q,S as W,T as X,U as Z,V as j,W as J,X as $,Y as ee,Z as ae}from"./index-BP6bNRoi.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as te}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as re}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as oe}from"./formatTime-DwR9f7DP.js";import{d as ne}from"./download-e0EdwhTv.js";import{_ as pe}from"./LoginLogDetail.vue_vue_type_script_setup_true_lang-B66cGgWN.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"./el-descriptions-item-BuMEVwqR.js";const se=R({name:"SystemLoginLog",__name:"index",setup(ie){const D=q(),f=s(!0),b=s(0),x=s([]),o=A({pageNo:1,pageSize:10,username:void 0,userIp:void 0,createTime:[]}),h=s(),g=s(!1),_=async()=>{f.value=!0;try{const l=await(p=o,I.get({url:"/system/login-log/page",params:p}));x.value=l.list,b.value=l.total}finally{f.value=!1}var p},i=()=>{o.pageNo=1,_()},L=()=>{h.value.resetFields(),i()},T=s(),E=async()=>{try{await D.exportConfirm(),g.value=!0;const l=await(p=o,I.download({url:"/system/login-log/export",params:p}));ne.excel(l,"\u767B\u5F55\u65E5\u5FD7.xls")}catch{}finally{g.value=!1}var p};return G(()=>{_()}),(p,l)=>{const V=Q,u=W,M=X,y=Z,m=j,P=J,S=re,n=$,k=te,z=ee,F=le,N=H("hasPermi"),O=ae;return d(),K(B,null,[e(S,null,{default:r(()=>[e(P,{class:"-mb-15px",model:a(o),ref_key:"queryFormRef",ref:h,inline:!0,"label-width":"68px"},{default:r(()=>[e(u,{label:"\u7528\u6237\u540D\u79F0",prop:"username"},{default:r(()=>[e(V,{modelValue:a(o).username,"onUpdate:modelValue":l[0]||(l[0]=t=>a(o).username=t),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u79F0",clearable:"",onKeyup:U(i,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u767B\u5F55\u5730\u5740",prop:"userIp"},{default:r(()=>[e(V,{modelValue:a(o).userIp,"onUpdate:modelValue":l[1]||(l[1]=t=>a(o).userIp=t),placeholder:"\u8BF7\u8F93\u5165\u767B\u5F55\u5730\u5740",clearable:"",onKeyup:U(i,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u767B\u5F55\u65E5\u671F",prop:"createTime"},{default:r(()=>[e(M,{modelValue:a(o).createTime,"onUpdate:modelValue":l[2]||(l[2]=t=>a(o).createTime=t),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),e(u,null,{default:r(()=>[e(m,{onClick:i},{default:r(()=>[e(y,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),e(m,{onClick:L},{default:r(()=>[e(y,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),v((d(),w(m,{type:"success",plain:"",onClick:E,loading:a(g)},{default:r(()=>[e(y,{icon:"ep:download",class:"mr-5px"}),c(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[N,["infra:login-log:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(S,null,{default:r(()=>[v((d(),w(z,{data:a(x)},{default:r(()=>[e(n,{label:"\u65E5\u5FD7\u7F16\u53F7",align:"center",prop:"id"}),e(n,{label:"\u64CD\u4F5C\u7C7B\u578B",align:"center",prop:"logType"},{default:r(t=>[e(k,{type:a(C).SYSTEM_LOGIN_TYPE,value:t.row.logType},null,8,["type","value"])]),_:1}),e(n,{label:"\u7528\u6237\u540D\u79F0",align:"center",prop:"username",width:"180"}),e(n,{label:"\u767B\u5F55\u5730\u5740",align:"center",prop:"userIp",width:"180"}),e(n,{label:"\u6D4F\u89C8\u5668",align:"center",prop:"userAgent"}),e(n,{label:"\u767B\u9646\u7ED3\u679C",align:"center",prop:"result"},{default:r(t=>[e(k,{type:a(C).SYSTEM_LOGIN_RESULT,value:t.row.result},null,8,["type","value"])]),_:1}),e(n,{label:"\u767B\u5F55\u65E5\u671F",align:"center",prop:"createTime",width:"180",formatter:a(oe)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:r(t=>[v((d(),w(m,{link:"",type:"primary",onClick:ue=>{return Y=t.row,void T.value.open(Y);var Y}},{default:r(()=>[c(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[N,["infra:login-log:query"]]])]),_:1})]),_:1},8,["data"])),[[O,a(f)]]),e(F,{total:a(b),page:a(o).pageNo,"onUpdate:page":l[3]||(l[3]=t=>a(o).pageNo=t),limit:a(o).pageSize,"onUpdate:limit":l[4]||(l[4]=t=>a(o).pageSize=t),onPagination:_},null,8,["total","page","limit"])]),_:1}),e(pe,{ref_key:"detailRef",ref:T},null,512)],64)}}});export{se as default};