2 lines
2.1 KiB
JavaScript
2 lines
2.1 KiB
JavaScript
var _=Object.defineProperty,S=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var b=(t,e,a)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,g=(t,e)=>{for(var a in e||(e={}))z.call(e,a)&&b(t,a,e[a]);if(m)for(var a of m(e))C.call(e,a)&&b(t,a,e[a]);return t},f=(t,e)=>S(t,y(e));var v=(t,e,a)=>new Promise((h,l)=>{var p=r=>{try{c(a.next(r))}catch(i){l(i)}},d=r=>{try{c(a.throw(r))}catch(i){l(i)}},c=r=>r.done?h(r.value):Promise.resolve(r.value).then(p,d);c((a=a.apply(t,e)).next())});import{_ as x}from"./form.vue_vue_type_script_setup_true_lang-BiFHMt8F.js";import{c as L}from"./admin-QtfaJQYK.js";import{n as o,aK as P,ag as I}from"./index-CRmU-Qpi.js";function K(){const t=o(),e=o(!0),a=o([]),h=o(!1),l=o({total:0,pageSize:10,pageSizes:[10,20,50,100],currentPage:1,background:!0}),p=o({search_username:"",search_title:"",search_time:"",search_etime:""}),d=o([{label:"用户名",prop:"search_username",type:"input"},{label:"标题",prop:"search_title",type:"input"},{label:"开始时间",prop:"search_time",type:"date"},{label:"结束时间",prop:"search_etime",type:"date"}]),r=o([{type:"index",index:n=>n+1},{label:"日志时间",prop:"createtime"},{label:"操作类型",prop:"title"},{label:"操作人员",prop:"username"},{label:"IP地址",prop:"ip"},{label:"内容",prop:"url"},{label:"操作",fixed:"right",width:210,slot:"operation"}]),i=n=>v(this,null,function*(){e.value=!0,p.value=g({},n);const{data:s,code:u}=yield L(f(g({},n),{pageNum:l.value.currentPage,pageSize:l.value.pageSize}));u&&(a.value=s.lists,l.value.total=s.totalRow,l.value.currentPage=s.pageNumber),e.value=!1});return{searchForm:p,searchLabel:d,onSearch:i,isShow:h,tableList:a,tableLabel:r,pagination:l,handleSizeChange:n=>{l.value.pageSize=n,i(p.value)},handleCurrentChange:n=>{l.value.currentPage=n,i(p.value)},loading:e,openDialog:(n="新增",s)=>{var u;P({title:`${n}操作日志`,props:{formInline:{id:(u=s==null?void 0:s.id)!=null?u:""}},width:"40%",closeOnClickModal:!1,contentRenderer:()=>I(x,{ref:t,formInline:null})})}}}export{K as useData};
|