12 |
- import{_ as a,W as t,r as e,a as i,o,c as s,w as n,i as r,g as p}from"./index-BAMs4g2N.js";import{_ as l}from"./uni-stat-table.DJpt4M34.js";import{_ as g}from"./uni-pagination.7SrZmsZK.js";import{s as u,p as h}from"./util.BXBhmNoy.js";import{p as c}from"./fieldsMap.CvZ24T3N.js";import"./uni-tooltip.BDlhxQuq.js";const d=a({data:()=>({popupFieldsMap:c,options:{pageSize:20,pageCurrent:1,total:0},query:{error_hash:"",create_time:[]},loading:!1,tableData:[]}),onLoad(a){let{error_hash:t,create_time:e}=a;t&&(e=Number(e),this.query.error_hash=t,this.query.create_time=[e,e+864e5],this.getTableData(u(this.query)))},methods:{changePageCurrent(a){this.options.pageCurrent=a.current,this.getTableData(u(this.query))},changePageSize(a){this.options.pageSize=a,this.options.pageCurrent=1,this.getTableData(u(this.query))},getTableData(a){const{pageCurrent:e}=this.options;this.loading=!0;t.database().collection("uni-stat-error-logs").where(a).orderBy("create_time","desc").skip((e-1)*this.options.pageSize).limit(this.options.pageSize).get({getCount:!0}).then((a=>{const{count:t,data:e}=a.result;this.options.total=t;for(const i of e)i.create_time=h(i.create_time,"dateTime");this.tableData=e})).finally((()=>{this.loading=!1}))}}},[["render",function(a,t,u,h,c,d){const m=e(i("uni-stat-table"),l),f=e(i("uni-pagination"),g),_=r;return o(),s(_,{class:"fix-top-window"},{default:n((()=>[p(_,{class:"uni-container"},{default:n((()=>[p(m,{data:c.tableData,filedsMap:c.popupFieldsMap,loading:c.loading},null,8,["data","filedsMap","loading"]),p(_,{class:"uni-pagination-box"},{default:n((()=>[p(f,{"show-icon":"","show-page-size":"","page-size":c.options.pageSize,current:c.options.pageCurrent,total:c.options.total,onChange:d.changePageCurrent,onPageSizeChange:d.changePageSize},null,8,["page-size","current","total","onChange","onPageSizeChange"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-d581af0c"]]);export{d as default};
|