index.0d610444.js 6.7 KB

1
  1. var I=Object.defineProperty;var v=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var F=(l,o,e)=>o in l?I(l,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[o]=e,h=(l,o)=>{for(var e in o||(o={}))T.call(o,e)&&F(l,e,o[e]);if(v)for(var e of v(o))N.call(o,e)&&F(l,e,o[e]);return l};var w=(l,o)=>{var e={};for(var n in l)T.call(l,n)&&o.indexOf(n)<0&&(e[n]=l[n]);if(l!=null&&v)for(var n of v(l))o.indexOf(n)<0&&N.call(l,n)&&(e[n]=l[n]);return e};var f=(l,o,e)=>new Promise((n,r)=>{var g=i=>{try{d(e.next(i))}catch(m){r(m)}},s=i=>{try{d(e.throw(i))}catch(m){r(m)}},d=i=>i.done?n(i.value):Promise.resolve(i.value).then(g,s);d((e=e.apply(l,o)).next())});import{P as x}from"./index.c2964e13.js";import{ab as M,d as S,a as C,r as b,i as a,q as P,l as u,a8 as R,a9 as y,a7 as L,k as p,_,p as c,u as E,ai as A,B,ce as q,cf as z,cg as K,aa as O,ch as H}from"./index.fd264fea.js";import{S as V}from"./index.e6fc9d6c.js";import{g as j}from"./dateUtil.134dfe1f.js";import{N as G}from"./Cascader.2d731843.js";import{N as J}from"./TreeSelect.24c89810.js";import"./searchs.b637f0d6.js";import"./dayjs.min.bd923176.js";const Q=l=>M({url:"/cbs-app/sysUserLoginLog/page",method:"post",data:l}),W=S({name:"operation-forms",props:{type:{type:String,default:""}},emits:["close","getList"],setup(l,{emit:o}){const e=C({appId:null,parentId:"",type:"",name:""}),n=b(),r=b(!1),g=()=>f(this,null,function*(){n.value.validate(s=>f(this,null,function*(){if(s)return!1;r.value=!0;try{o("close"),o("getList")}catch(d){}r.value=!1}))});return()=>a("div",{style:"background: #fff; padding-top: 12px"},[a(P,{model:e,ref:n,"label-placement":"left","label-width":"100"},{default:()=>[a(u,{label:"\u5E94\u7528\u5206\u7C7B",path:"appId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E94\u7528\u5206\u7C7B"}]},{default:()=>[a(G,{value:e.appId,"onUpdate:value":s=>e.appId=s,options:[],showPath:!0,allowCheckingNotLoaded:!1,checkStrategy:"child",valueField:"id",labelField:"appName",childrenField:"bizApps",placeholder:"\u8BF7\u9009\u62E9\u5E94\u7528\u5206\u7C7B",expandTrigger:"hover",clearable:!0},null)]}),a(u,{label:"\u4E0A\u7EA7\u83DC\u5355",path:"parentId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u7EA7\u83DC\u5355"}]},{default:()=>[a(J,{value:e.parentId,"onUpdate:value":s=>e.parentId=s,placeholder:"\u8BF7\u9009\u62E9\u4E0A\u7EA7\u83DC\u5355",checkStrategy:"parent",options:[],showPath:!1,keyField:"id",labelField:"name",virtualScroll:!0},null)]}),a(u,{label:"\u83DC\u5355\u7C7B\u578B",path:"type",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u7EA7\u83DC\u5355"}]},{default:()=>[a(R,{value:e.type,"onUpdate:value":s=>e.type=s},{default:()=>[a(y,null,{default:()=>[a(L,{value:!0},{default:()=>[p("\u83DC\u5355")]}),a(L,{value:!1},{default:()=>[p("\u6309\u94AE")]})]})]})]}),a(u,{label:"\u83DC\u5355\u540D\u79F0",path:"name",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0",trigger:["blur","input"]}]},{default:()=>[a(_,{value:e.name,"onUpdate:value":s=>e.name=s,placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0",clearable:!0,maxlength:100},null)]})]}),a(y,{justify:"end"},{default:()=>[a(c,{type:"default",onClick:()=>o("close")},{default:()=>[p("\u53D6\u6D88")]}),a(c,{type:"primary",onClick:()=>g(),loading:r.value},{default:()=>[p("\u4FDD\u5B58")]})]})])}}),ne=S({name:"login-log",setup(){const l=E(),o=A(),e=C({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:"",clientType:"",timer:null},dataList:[],clientTypeList:[{value:"BACKEND",label:"\u540E\u53F0"},{value:"SCHOOL",label:"\u7BA1\u7406\u7AEF"},{value:"TEACHER",label:"\u8001\u5E08\u7AEF"},{value:"STUDENT",label:"\u5B66\u751F\u7AEF"},{value:"REPAIR",label:"\u7EF4\u4FEE\u7AEF"}],visiableMenu:!1}),n=()=>[{title:"\u7528\u6237\u7F16\u53F7",key:"userId"},{title:"\u767B\u5F55\u7528\u6237",key:"nickname"},{title:"\u767B\u5F55\u8D26\u6237",key:"phone"},{title:"\u767B\u5F55\u72B6\u6001",key:"successFlag",render(t){return a(H,{type:t.successFlag?"success":"default"},{default:()=>[t.successFlag?"\u6210\u529F":"\u5931\u8D25"]})}},{title:"\u767B\u5F55IP",key:"loginIp"},{title:"\u767B\u5F55\u65F6\u95F4",key:"loginTime"},{title:"\u767B\u5F55\u5730\u70B9",key:"loginRegion"},{title:"\u64CD\u4F5C",key:"operation",render(t){return a(y,null,{default:()=>[a(c,{type:"primary",text:!0,size:"small",onClick:()=>g()},{default:()=>[p("\u5220\u9664")]})]})}}],r=()=>f(this,null,function*(){e.loading=!0;try{const t=e.searchForm,{timer:D}=t,U=w(t,["timer"]),{data:k}=yield Q(h(h(h({},e.pagination),U),j(e.searchForm.timer,["startTime","endTime"])));e.pagination.pageTotal=Number(k.total),e.dataList=k.rows||[]}catch(D){}e.loading=!1}),g=()=>{o.warning({title:"\u8B66\u544A",content:"\u5220\u9664\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>f(this,null,function*(){try{l.success("\u5220\u9664\u6210\u529F")}catch(t){}})})},s=b(),d=()=>{e.pagination.page=1,r()},i=()=>{var t;(t=s.value)==null||t.submit()},m=()=>{var t;(t=s.value)==null||t.reset()};return B(()=>{r()}),()=>a("div",{class:"system-menu-container"},[a(V,{ref:s,model:e.searchForm,onSubmit:d,saveKey:"loginLog-log",onSetModel:t=>e.searchForm=t},{default:()=>[a(u,{label:"\u5173\u952E\u5B57",path:"keyword"},{default:()=>[a(_,{clearable:!0,value:e.searchForm.keyword,"onUpdate:value":t=>e.searchForm.keyword=t,placeholder:"\u59D3\u540D/\u624B\u673A\u53F7/\u7F16\u53F7"},null)]}),a(u,{label:"\u5BA2\u6237\u7AEF",path:"clientType"},{default:()=>[a(q,{clearable:!0,filterable:!0,value:e.searchForm.clientType,"onUpdate:value":t=>e.searchForm.clientType=t,placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237\u7AEF",options:e.clientTypeList},null)]}),a(u,{path:"time",label:"\u767B\u5F55\u65F6\u95F4"},{default:()=>[a(z,{value:e.searchForm.timer,"onUpdate:value":t=>e.searchForm.timer=t,type:"daterange",clearable:!0},null)]}),a(u,null,{default:()=>[a(y,null,{default:()=>[a(c,{type:"primary",onClick:i},{default:()=>[p("\u641C\u7D22")]}),a(c,{type:"default",onClick:m},{default:()=>[p("\u91CD\u7F6E")]})]})]})]}),a("div",{class:["section-container"]},[a(y,{style:{paddingBottom:"12px"}},{default:()=>[a(c,{type:"primary",onClick:()=>e.visiableMenu=!0},{default:()=>[p("\u6DFB\u52A0\u65E5\u5FD7")]})]}),a(K,{loading:e.loading,columns:n(),data:e.dataList},null),a(x,{page:e.pagination.page,"onUpdate:page":t=>e.pagination.page=t,pageSize:e.pagination.rows,"onUpdate:pageSize":t=>e.pagination.rows=t,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":t=>e.pagination.pageTotal=t,onList:r,sync:!0,saveKey:"loginLog-log"},null)]),a(O,{show:e.visiableMenu,"onUpdate:show":t=>e.visiableMenu=t,preset:"dialog",showIcon:!1,title:"\u6DFB\u52A0\u83DC\u5355",style:{width:"700px"}},{default:()=>[a(W,{onClose:()=>e.visiableMenu=!1,type:"add"},null)]})])}});export{ne as default};