Agriculture-front-end/dist/assets/index.428efb36.js

2 lines
6.0 KiB
JavaScript
Raw Normal View History

import{Q as e,G as l,r as a,d as o,T as n,o as t,c as r,K as i,M as u,f as s,e as d,w as p,j as c,V as m,W as f,k as g,J as h,n as v,l as b,A as w,v as y}from"./index.e5c8b0d6.js";const _={class:"app-container"},V=l({name:"Logininfor"}),k=Object.assign(V,{setup(l){const{proxy:V}=y(),{sys_common_status:k}=V.useDict("sys_common_status"),x=a([]),S=a(!0),N=a(!0),C=a([]),D=a(!0),U=a(!0),$=a(""),T=a(0),R=a([]),K=a({prop:"loginTime",order:"descending"}),Y=a({pageNum:1,pageSize:10,ipaddr:void 0,userName:void 0,status:void 0,orderByColumn:void 0,isAsc:void 0});function j(){var l;S.value=!0,(l=V.addDateRange(Y.value,R.value),e({url:"/monitor/logininfor/list",method:"get",params:l})).then((e=>{x.value=e.rows,T.value=e.total,S.value=!1}))}function z(){Y.value.pageNum=1,j()}function A(){R.value=[],V.resetForm("queryRef"),Y.value.pageNum=1,V.$refs.logininforRef.sort(K.value.prop,K.value.order)}function I(e){C.value=e.map((e=>e.infoId)),U.value=!e.length,D.value=1!=e.length,$.value=e.map((e=>e.userName))}function M(e,l,a){Y.value.orderByColumn=e.prop,Y.value.isAsc=e.order,j()}function q(l){const a=l.infoId||C.value;V.$modal.confirm('是否确认删除访问编号为"'+a+'"的数据项?').then((function(){return e({url:"/monitor/logininfor/"+a,method:"delete"})})).then((()=>{j(),V.$modal.msgSuccess("删除成功")})).catch((()=>{}))}function B(){V.$modal.confirm("是否确认清空所有登录日志数据项?").then((function(){return e({url:"/monitor/logininfor/clean",method:"delete"})})).then((()=>{j(),V.$modal.msgSuccess("清空成功")})).catch((()=>{}))}function L(){const l=$.value;V.$modal.confirm('是否确认解锁用户"'+l+'"数据项?').then((function(){return e({url:"/monitor/logininfor/unlock/"+l,method:"get"})})).then((()=>{V.$modal.msgSuccess("用户"+l+"解锁成功")})).catch((()=>{}))}function P(){V.download("monitor/logininfor/export",{...Y.value},`config_${(new Date).getTime()}.xlsx`)}return j(),(e,l)=>{const a=o("el-input"),y=o("el-form-item"),V=o("el-option"),C=o("el-select"),$=o("el-date-picker"),Q=o("el-button"),F=o("el-form"),G=o("el-col"),J=o("right-toolbar"),O=o("el-row"),W=o("el-table-column"),E=o("dict-tag"),H=o("el-table"),X=o("pagination"),Z=n("hasPermi"),ee=n("loading");return t(),r("div",_,[i(d(F,{model:s(Y),ref:"queryRef",inline:!0,"label-width":"68px"},{default:p((()=>[d(y,{label:"登录地址",prop:"ipaddr"},{default:p((()=>[d(a,{modelValue:s(Y).ipaddr,"onUpdate:modelValue":l[0]||(l[0]=e=>s(Y).ipaddr=e),placeholder:"请输入登录地址",clearable:"",style:{width:"240px"},onKeyup:c(z,["enter"])},null,8,["modelValue","onKeyup"])])),_:1}),d(y,{label:"用户名称",prop:"userName"},{default:p((()=>[d(a,{modelValue:s(Y).userName,"onUpdate:modelValue":l[1]||(l[1]=e=>s(Y).userName=e),placeholder:"请输入用户名称",clearable:"",style:{width:"240px"},onKeyup:c(z,["enter"])},null,8,["modelValue","onKeyup"])])),_:1}),d(y,{label:"状态",prop:"status"},{default:p((()=>[d(C,{modelValue:s(Y).status,"onUpdate:modelValue":l[2]||(l[2]=e=>s(Y).status=e),placeholder:"登录状态",clearable:"",style:{width:"240px"}},{default:p((()=>[(t(!0),r(m,null,f(s(k),(e=>(t(),g(V,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),d(y,{label:"登录时间",style:{width:"308px"}},{default:p((()=>[d($,{modelValue:s(R),"onUpdate:modelValue":l[3]||(l[3]=e=>h(R)?R.value=e:null),"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])])),_:1}),d(y,null,{default:p((()=>[d(Q,{type:"primary",icon:"Search",onClick:z},{default:p((()=>[v("搜索")])),_:1}),d(Q,{icon:"Refresh",onClick:A},{default:p((()=>[v("重置")])),_:1})])),_:1})])),_:1},8,["model"]),[[u,s(N)]]),d(O,{gutter:10,class:"mb8"},{default:p((()=>[d(G,{span:1.5},{default:p((()=>[i((t(),g(Q,{type:"danger",plain:"",icon:"Delete",disabled:s(U),onClick:q},{default:p((()=>[v("删除")])),_:1},8,["disabled"])),[[Z,["monitor:logininfor:remove"]]])])),_:1},8,["span"]),d(G,{span:1.5},{default:p((()=>[i((t(),g(Q,{type:"dange