| 1 |
- import{g as s,Y as t,Z as e,n as o,k as l,m as a,w as r,o as i,p as n,q as c,B as u,C as p,F as m,t as h,v as d,G as f}from"./index-C9TJPork.js";import{_ as g}from"./u-tabs.CYgabJiD.js";import{r as w}from"./uni-app.es.CUt9gedF.js";import{_}from"./u-search.DOsDiA_z.js";import{_ as k}from"./u-swipe-action.BhRxbaFQ.js";import{_ as b}from"./mescroll-body.DWp9Rb53.js";import{_ as C}from"./u-icon.BNGPST4x.js";import{g as j,a as x,d as y}from"./reportLog.DySdIG5I.js";import{r as I}from"./resources.DEPsJg7u.js";import{M as D}from"./mescroll-mixins.C2YUWJKd.js";import{_ as U}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-badge.BHkDpFBd.js";import"./renderjs.Cg3LvhxW.js";const O=U({mixins:[D],data(){return{downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:20,time:null},empty:{use:!0,icon:I.message.nodata,tip:this.$t("common.noData"),fixed:!0,top:"300rpx"},textNoMore:this.$t("app.apply.noMoreData")},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?j:x)(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,j,x){const y=w(l("u-tabs"),g),I=w(l("u-search"),_),D=i,U=f,O=w(l("u-swipe-action"),k),S=w(l("mescroll-body"),b),T=w(l("u-icon"),C);return n(),a(D,{class:"reportLog-v"},{default:r((()=>[c(S,{ref:"mescrollRef",onInit:s.mescrollInit,onDown:s.downCallback,onUp:x.upCallback,sticky:!0,down:j.downOption,up:j.upOption,bottombar:!1},{default:r((()=>[c(D,{class:"search-box_sticky"},{default:r((()=>[c(y,{list:j.tabsList,current:j.current,onChange:x.change,"is-scroll":!1},null,8,["list","current","onChange"]),c(D,{class:"search-box"},{default:r((()=>[c(I,{placeholder:s.$t("app.apply.pleaseKeyword"),modelValue:j.keyword,"onUpdate:modelValue":t[0]||(t[0]=s=>j.keyword=s),height:"72","show-action":!1,onChange:x.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["placeholder","modelValue","onChange"])])),_:1})])),_:1}),(n(!0),u(m,null,p(j.list,((t,e)=>(n(),a(D,{class:"log-list",key:e},{default:r((()=>[c(O,{index:e,show:t.show,onClick:x.handleClick,onOpen:x.open,options:j.options,onContentClick:s=>x.goDetail(t.id)},{default:r((()=>[c(D,{class:"log-list-txt u-flex-col"},{default:r((()=>[c(D,{class:"u-font-30 u-flex u-m-b-10 log-title"},{default:r((()=>[c(U,{class:"title u-line-1"},{default:r((()=>[h(d(t.title),1)])),_:2},1024),c(U,null,{default:r((()=>[h(d(s.jnpf.toDate(t.creatorTime,"MM-dd")),1)])),_:2},1024)])),_:2},1024),c(U,{class:"u-m-t-10"},{default:r((()=>[h(d(j.userInfo.userName)+"/"+d(j.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(D,{class:"com-addBtn",onClick:t[1]||(t[1]=s=>x.goDetail())},{default:r((()=>[c(T,{name:"plus",size:"48",color:"#fff"})])),_:1})])),_:1})}],["__scopeId","data-v-845f79ba"]]);export{O as default};
|