pages-workFlow-flowCopy-index.Cn3oID8c.js 2.34 KB
import{M as s,v as e,G as t,d as o,w as a,i as r,o as i,e as l}from"./index-C0ioWTxp.js";import{_ as n}from"./u-search.DL7NocP_.js";import{r as c}from"./uni-app.es.BJUZsD-t.js";import{_ as p}from"./mescroll-body.CZz03_6c.js";import{r as u}from"./resources.DipqUmnN.js";import{f as m}from"./flowBefore.C195NtbJ.js";import{M as h}from"./mescroll-mixins.BldZscRg.js";import{f as d}from"./flowList.Bq2HX-SK.js";import{_ as f}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-icon.C9UHn92m.js";import"./u-tag.Bc2WbYzE.js";const w=f({components:{flowlist:d},mixins:[h],data:()=>({keyword:"",opType:3,list:[],downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:20,time:null},empty:{use:!0,icon:u.message.nodata,tip:"暂无数据",fixed:!0,top:"300rpx"},textNoMore:"没有更多数据"}}),onShow(){s("refresh",(()=>{this.list=[],this.mescroll.resetUpScroll()}))},methods:{upCallback(s){let e={currentPage:s.num,pageSize:s.size,keyword:this.keyword};m(this.opType,e,{load:1==s.num}).then((e=>{this.mescroll.endSuccess(e.data.list.length),1==s.num&&(this.list=[]);const t=e.data.list.map((s=>({flowStatus:this.getFlowStatus(s.status),...s})));this.list=this.list.concat(t)})).catch((()=>{this.mescroll.endErr()}))},getFlowStatus(s){let e;switch(s){case 0:e=u.status.submit;break;case 1:default:e=u.status.review;break;case 2:e=u.status.reviewAdopt;break;case 3:e=u.status.reviewRefuse;break;case 4:case 7:e=u.status.reviewUndo;break;case 5:e=u.status.reviewStop}return e},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.list=[],this.mescroll.resetUpScroll()}),300)}}},[["render",function(s,u,m,h,d,f){const w=c(e("u-search"),n),y=r,k=t("flowlist"),b=c(e("mescroll-body"),p);return i(),o(y,{class:"flowCopy-v"},{default:a((()=>[l(b,{ref:"mescrollRef",onInit:s.mescrollInit,onDown:s.downCallback,onUp:f.upCallback,sticky:!0,down:d.downOption,up:d.upOption},{default:a((()=>[l(y,{class:"search-box search-box_sticky"},{default:a((()=>[l(w,{placeholder:"请输入关键词搜索",modelValue:d.keyword,"onUpdate:modelValue":u[0]||(u[0]=s=>d.keyword=s),height:"72","show-action":!1,onChange:f.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["modelValue","onChange"])])),_:1}),l(k,{list:d.list,opType:d.opType},null,8,["list","opType"])])),_:1},8,["onInit","onDown","onUp","down","up"])])),_:1})}],["__scopeId","data-v-ac8a441e"]]);export{w as default};