import{g as s,T as t,U as e,n as o,q as l,c as a,w as i,i as r,o as n,t as c,C as u,D as m,F as h,v as d,x as p,H as f}from"./index-DL8B2Mxu.js";import{_ as g}from"./u-tabs.YLQ0tmbs.js";import{r as _}from"./uni-app.es.BSVEa1f2.js";import{_ as w}from"./u-search.C1fh-wIV.js";import{_ as k}from"./u-swipe-action.BYB6w9Xo.js";import{_ as C}from"./mescroll-body.DoI4hLy1.js";import{_ as b}from"./u-icon.CLOPtL2B.js";import{g as x,a as j,d as y}from"./reportLog.Ba0GZTt5.js";import{r as I}from"./resources.DipqUmnN.js";import{M as U}from"./mescroll-mixins.DNza9FDh.js";import{_ as D}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-badge.B5SA0J9t.js";const T=D({mixins:[U],data:()=>({downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:20,time:null},empty:{use:!0,icon:I.message.nodata,tip:"暂无数据",fixed:!0,top:"300rpx"},textNoMore:"没有更多数据"},current:0,tabsList:[{name:"我发出的"},{name:"我收到的"}],keyword:"",list:[],userInfo:{},options:[{text:"删除",style:{backgroundColor:"#dd524d"}}]}),onLoad(){this.userInfo=s("userInfo")||{},t("refresh",(()=>{this.list=[],this.current=0,this.mescroll.resetUpScroll()}))},onUnload(){e("refresh")},methods:{upCallback(s){let t={currentPage:s.num,pageSize:s.size,keyword:this.keyword};(this.current?x:j)(t,{load:1==s.num}).then((t=>{this.mescroll.endSuccess(t.data.list.length),1==s.num&&(this.list=[]);const e=t.data.list.map((s=>({show:!1,...s})));this.list=this.list.concat(e)})).catch((()=>{this.mescroll.endErr()}))},open(s){this.list[s].show=!0,this.list.map(((t,e)=>{s!=e&&(this.list[e].show=!1)}))},handleClick(s,t){const e=this.list[s];y(e.id).then((t=>{this.$u.toast(t.msg),this.list.splice(s,1),this.list.length||this.mescroll.resetUpScroll()}))},goDetail(s){const t="./form?type="+this.current+(s?"&id="+s:"");o({url:t})},change(s){this.current=s,this.mescroll.resetUpScroll()},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.list=[],this.mescroll.resetUpScroll()}),300)}}},[["render",function(s,t,e,o,x,j){const y=_(l("u-tabs"),g),I=_(l("u-search"),w),U=r,D=f,T=_(l("u-swipe-action"),k),O=_(l("mescroll-body"),C),S=_(l("u-icon"),b);return n(),a(U,{class:"reportLog-v"},{default:i((()=>[c(O,{ref:"mescrollRef",onInit:s.mescrollInit,onDown:s.downCallback,onUp:j.upCallback,sticky:!0,down:x.downOption,up:x.upOption,bottombar:!1},{default:i((()=>[c(U,{class:"search-box_sticky"},{default:i((()=>[c(y,{list:x.tabsList,current:x.current,onChange:j.change,"is-scroll":!1},null,8,["list","current","onChange"]),c(U,{class:"search-box"},{default:i((()=>[c(I,{placeholder:"请输入关键词搜索",modelValue:x.keyword,"onUpdate:modelValue":t[0]||(t[0]=s=>x.keyword=s),height:"72","show-action":!1,onChange:j.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["modelValue","onChange"])])),_:1})])),_:1}),(n(!0),u(h,null,m(x.list,((t,e)=>(n(),a(U,{class:"log-list",key:e},{default:i((()=>[c(T,{index:e,show:t.show,onClick:j.handleClick,onOpen:j.open,options:x.options,onContentClick:s=>j.goDetail(t.id)},{default:i((()=>[c(U,{class:"log-list-txt u-flex-col"},{default:i((()=>[c(U,{class:"u-font-30 u-flex u-m-b-10 log-title"},{default:i((()=>[c(D,{class:"title u-line-1"},{default:i((()=>[d(p(t.title),1)])),_:2},1024),c(D,null,{default:i((()=>[d(p(s.jnpf.toDate(t.creatorTime,"mm-dd")),1)])),_:2},1024)])),_:2},1024),c(D,{class:"u-m-t-10"},{default:i((()=>[d(p(x.userInfo.userName)+"/"+p(x.userInfo.userAccount),1)])),_:1})])),_:2},1024)])),_:2},1032,["index","show","onClick","onOpen","options","onContentClick"])])),_:2},1024)))),128))])),_:1},8,["onInit","onDown","onUp","down","up"]),c(U,{class:"com-addBtn",onClick:t[1]||(t[1]=s=>j.goDetail())},{default:i((()=>[c(S,{name:"plus",size:"60",color:"#fff"})])),_:1})])),_:1})}],["__scopeId","data-v-a5020060"]]);export{T as default};
