Agriculture-front-end/dist/assets/index.f83ec633.js
2023-05-09 18:19:28 +08:00

2 lines
6.6 KiB
JavaScript

import{z as x,_ as te,O as le,r as u,d as i,V as I,o as c,c as K,Q as m,R as P,f as o,e,w as l,j as z,G as ae,H as re,k as _,P as Q,m as h,l as ie,x as se,s as ue}from"./index.75ecb6e9.js";function de(f){return x({url:"/monitor/logininfor/list",method:"get",params:f})}function ce(f){return x({url:"/monitor/logininfor/"+f,method:"delete"})}function pe(f){return x({url:"/monitor/logininfor/unlock/"+f,method:"get"})}function me(){return x({url:"/monitor/logininfor/clean",method:"delete"})}const fe={class:"app-container"},ge=le({name:"Logininfor"}),_e=Object.assign(ge,{setup(f){const{proxy:s}=ue(),{sys_common_status:U}=s.useDict("sys_common_status"),R=u([]),S=u(!0),w=u(!0),L=u([]),$=u(!0),T=u(!0),B=u(""),C=u(0),v=u([]),V=u({prop:"loginTime",order:"descending"}),r=u({pageNum:1,pageSize:10,ipaddr:void 0,userName:void 0,status:void 0,orderByColumn:void 0,isAsc:void 0});function p(){S.value=!0,de(s.addDateRange(r.value,v.value)).then(a=>{R.value=a.rows,C.value=a.total,S.value=!1})}function N(){r.value.pageNum=1,p()}function Y(){v.value=[],s.resetForm("queryRef"),r.value.pageNum=1,s.$refs.logininforRef.sort(V.value.prop,V.value.order)}function q(a){L.value=a.map(n=>n.infoId),T.value=!a.length,$.value=a.length!=1,B.value=a.map(n=>n.userName)}function A(a,n,D){r.value.orderByColumn=a.prop,r.value.isAsc=a.order,p()}function j(a){const n=a.infoId||L.value;s.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BBF\u95EE\u7F16\u53F7\u4E3A"'+n+'"\u7684\u6570\u636E\u9879?').then(function(){return ce(n)}).then(()=>{p(),s.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}function E(){s.$modal.confirm("\u662F\u5426\u786E\u8BA4\u6E05\u7A7A\u6240\u6709\u767B\u5F55\u65E5\u5FD7\u6570\u636E\u9879?").then(function(){return me()}).then(()=>{p(),s.$modal.msgSuccess("\u6E05\u7A7A\u6210\u529F")}).catch(()=>{})}function F(){const a=B.value;s.$modal.confirm('\u662F\u5426\u786E\u8BA4\u89E3\u9501\u7528\u6237"'+a+'"\u6570\u636E\u9879?').then(function(){return pe(a)}).then(()=>{s.$modal.msgSuccess("\u7528\u6237"+a+"\u89E3\u9501\u6210\u529F")}).catch(()=>{})}function M(){s.download("monitor/logininfor/export",{...r.value},`config_${new Date().getTime()}.xlsx`)}return p(),(a,n)=>{const D=i("el-input"),b=i("el-form-item"),O=i("el-option"),G=i("el-select"),H=i("el-date-picker"),g=i("el-button"),J=i("el-form"),y=i("el-col"),W=i("right-toolbar"),X=i("el-row"),d=i("el-table-column"),Z=i("dict-tag"),ee=i("el-table"),oe=i("pagination"),k=I("hasPermi"),ne=I("loading");return c(),K("div",fe,[m(e(J,{model:o(r),ref:"queryRef",inline:!0,"label-width":"68px"},{default:l(()=>[e(b,{label:"\u767B\u5F55\u5730\u5740",prop:"ipaddr"},{default:l(()=>[e(D,{modelValue:o(r).ipaddr,"onUpdate:modelValue":n[0]||(n[0]=t=>o(r).ipaddr=t),placeholder:"\u8BF7\u8F93\u5165\u767B\u5F55\u5730\u5740",clearable:"",style:{width:"240px"},onKeyup:z(N,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(b,{label:"\u7528\u6237\u540D\u79F0",prop:"userName"},{default:l(()=>[e(D,{modelValue:o(r).userName,"onUpdate:modelValue":n[1]||(n[1]=t=>o(r).userName=t),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u79F0",clearable:"",style:{width:"240px"},onKeyup:z(N,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(b,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[e(G,{modelValue:o(r).status,"onUpdate:modelValue":n[2]||(n[2]=t=>o(r).status=t),placeholder:"\u767B\u5F55\u72B6\u6001",clearable:"",style:{width:"240px"}},{default:l(()=>[(c(!0),K(ae,null,re(o(U),t=>(c(),_(O,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(b,{label:"\u767B\u5F55\u65F6\u95F4",style:{width:"308px"}},{default:l(()=>[e(H,{modelValue:o(v),"onUpdate:modelValue":n[3]||(n[3]=t=>Q(v)?v.value=t:null),"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F"},null,8,["modelValue"])]),_:1}),e(b,null,{default:l(()=>[e(g,{type:"primary",icon:"Search",onClick:N},{default:l(()=>[h("\u641C\u7D22")]),_:1}),e(g,{icon:"Refresh",onClick:Y},{default:l(()=>[h("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),[[P,o(w)]]),e(X,{gutter:10,class:"mb8"},{default:l(()=>[e(y,{span:1.5},{default:l(()=>[m((c(),_(g,{type:"danger",plain:"",icon:"Delete",disabled:o(T),onClick:j},{default:l(()=>[h("\u5220\u9664")]),_:1},8,["disabled"])),[[k,["monitor:logininfor:remove"]]])]),_:1},8,["span"]),e(y,{span:1.5},{default:l(()=>[m((c(),_(g,{type:"danger",plain:"",icon:"Delete",onClick:E},{default:l(()=>[h("\u6E05\u7A7A")]),_:1})),[[k,["monitor:logininfor:remove"]]])]),_:1},8,["span"]),e(y,{span:1.5},{default:l(()=>[m((c(),_(g,{type:"primary",plain:"",icon:"Unlock",disabled:o($),onClick:F},{default:l(()=>[h("\u89E3\u9501")]),_:1},8,["disabled"])),[[k,["monitor:logininfor:unlock"]]])]),_:1},8,["span"]),e(y,{span:1.5},{default:l(()=>[m((c(),_(g,{type:"warning",plain:"",icon:"Download",onClick:M},{default:l(()=>[h("\u5BFC\u51FA")]),_:1})),[[k,["monitor:logininfor:export"]]])]),_:1},8,["span"]),e(W,{showSearch:o(w),"onUpdate:showSearch":n[4]||(n[4]=t=>Q(w)?w.value=t:null),onQueryTable:p},null,8,["showSearch"])]),_:1}),m((c(),_(ee,{ref:"logininforRef",data:o(R),onSelectionChange:q,"default-sort":o(V),onSortChange:A},{default:l(()=>[e(d,{type:"selection",width:"55",align:"center"}),e(d,{label:"\u8BBF\u95EE\u7F16\u53F7",align:"center",prop:"infoId"}),e(d,{label:"\u7528\u6237\u540D\u79F0",align:"center",prop:"userName","show-overflow-tooltip":!0,sortable:"custom","sort-orders":["descending","ascending"]}),e(d,{label:"\u5730\u5740",align:"center",prop:"ipaddr","show-overflow-tooltip":!0}),e(d,{label:"\u767B\u5F55\u5730\u70B9",align:"center",prop:"loginLocation","show-overflow-tooltip":!0}),e(d,{label:"\u64CD\u4F5C\u7CFB\u7EDF",align:"center",prop:"os","show-overflow-tooltip":!0}),e(d,{label:"\u6D4F\u89C8\u5668",align:"center",prop:"browser","show-overflow-tooltip":!0}),e(d,{label:"\u767B\u5F55\u72B6\u6001",align:"center",prop:"status"},{default:l(t=>[e(Z,{options:o(U),value:t.row.status},null,8,["options","value"])]),_:1}),e(d,{label:"\u63CF\u8FF0",align:"center",prop:"msg"}),e(d,{label:"\u8BBF\u95EE\u65F6\u95F4",align:"center",prop:"loginTime",sortable:"custom","sort-orders":["descending","ascending"],width:"180"},{default:l(t=>[ie("span",null,se(a.parseTime(t.row.loginTime)),1)]),_:1})]),_:1},8,["data","default-sort"])),[[ne,o(S)]]),m(e(oe,{total:o(C),page:o(r).pageNum,"onUpdate:page":n[5]||(n[5]=t=>o(r).pageNum=t),limit:o(r).pageSize,"onUpdate:limit":n[6]||(n[6]=t=>o(r).pageSize=t),onPagination:p},null,8,["total","page","limit"]),[[P,o(C)>0]])])}}}),ve=te(_e,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/monitor/logininfor/index.vue"]]);export{ve as default};