import{r as i,P as l}from"./index.DoJnwA7v.js";import"./elementPlus.CqHltQSO.js";import"./vue.1RczIYhx.js";const r="/api/system/login_log/";function a(o){return i({url:r,method:"get",params:o})}function p(o){return i({url:r,method:"post",data:o})}function c(o){return i({url:r+o.id+"/",method:"put",data:o})}function m(o){return i({url:r+o+"/",method:"delete",data:{id:o}})}const b=function({crudExpose:o}){return{crudOptions:{request:{pageRequest:async e=>await a(e),addRequest:async({form:e})=>await p(e),editRequest:async({form:e,row:n})=>(e.id=n.id,await c(e)),delRequest:async({row:e})=>await m(e.id)},actionbar:{buttons:{add:{show:!1}}},table:{border:!1},rowHandle:{fixed:"right",width:100,buttons:{view:{type:"text"},edit:{show:!1},remove:{show:!1}}},columns:{_index:{title:"序号",form:{show:!1},column:{align:"center",width:"70px",columnSetDisabled:!0,formatter:e=>{let n=e.index??1,t=o.crudBinding.value.pagination;return((t.currentPage??1)-1)*t.pageSize+n+1}}},search:{title:"关键词",column:{show:!1},search:{show:!0,component:{props:{clearable:!0},placeholder:"请输入关键词"}},form:{show:!1,component:{props:{clearable:!0}}}},username:{title:"登录用户名",search:{disabled:!1},type:"input",column:{minWidth:120},form:{disabled:!0,component:{placeholder:"请输入登录用户名"}}},ip:{title:"登录ip",search:{disabled:!1},type:"input",column:{minWidth:120},form:{disabled:!0,component:{placeholder:"请输入登录ip"}}},create_datetime:{title:"登录时间",type:"datetime",search:{show:!0,col:{span:8},component:{type:"datetimerange",props:{"start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","picker-options":{shortcuts:[{text:"最近一周",onClick(e){const n=new Date,t=new Date;t.setTime(t.getTime()-3600*1e3*24*7),e.$emit("pick",[t,n])}},{text:"最近一个月",onClick(e){const n=new Date,t=new Date;t.setTime(t.getTime()-3600*1e3*24*30),e.$emit("pick",[t,n])}},{text:"最近三个月",onClick(e){const n=new Date,t=new Date;t.setTime(t.getTime()-3600*1e3*24*90),e.$emit("pick",[t,n])}}]}}},valueResolve(e){const{key:n,value:t}=e;t&&(e.form.create_datetime_after=t[0],e.form.create_datetime_before=t[1])}},column:{minWidth:200},form:{show:!1},viewForm:{show:!0}},isp:{title:"运营商",search:{disabled:!0},disabled:!0,type:"input",column:{minWidth:120},form:{component:{placeholder:"请输入运营商"}}},continent:{title:"大州",type:"input",column:{minWidth:90},form:{disabled:!0,component:{placeholder:"请输入大州"}},component:{props:{color:"auto"}}},country:{title:"国家",type:"input",column:{minWidth:90},form:{component:{placeholder:"请输入国家"}},component:{props:{color:"auto"}}},province:{title:"省份",type:"input",column:{minWidth:80},form:{component:{placeholder:"请输入省份"}},component:{props:{color:"auto"}}},city:{title:"城市",type:"input",column:{minWidth:80},form:{component:{placeholder:"请输入城市"}},component:{props:{color:"auto"}}},district:{title:"县区",key:"",type:"input",column:{minWidth:80},form:{component:{placeholder:"请输入县区"}},component:{props:{color:"auto"}}},area_code:{title:"区域代码",type:"input",column:{minWidth:90},form:{component:{placeholder:"请输入区域代码"}},component:{props:{color:"auto"}}},country_english:{title:"英文全称",type:"input",column:{minWidth:120},form:{component:{placeholder:"请输入英文全称"}},component:{props:{color:"auto"}}},country_code:{title:"简称",type:"input",column:{minWidth:100},form:{component:{placeholder:"请输入简称"}},component:{props:{color:"auto"}}},longitude:{title:"经度",type:"input",disabled:!0,column:{minWidth:100},form:{component:{placeholder:"请输入经度"}},component:{props:{color:"auto"}}},latitude:{title:"纬度",type:"input",disabled:!0,column:{minWidth:100},form:{component:{placeholder:"请输入纬度"}},component:{props:{color:"auto"}}},login_type:{title:"登录类型",type:"dict-select",search:{disabled:!1},dict:l({data:[{label:"普通登录",value:1},{label:"微信扫码登录",value:2}]}),column:{minWidth:120},form:{component:{placeholder:"请选择登录类型"}}},os:{title:"操作系统",type:"input",column:{minWidth:120},form:{component:{placeholder:"请输入操作系统"}}},browser:{title:"浏览器名",type:"input",column:{minWidth:120},form:{component:{placeholder:"请输入浏览器名"}}},agent:{title:"agent信息",disabled:!0,type:"input",column:{minWidth:120},form:{component:{placeholder:"请输入agent信息"}}}}}}};export{b as createCrudOptions};
