import{s as t,a2 as s,X as o,o as a,p as e,w as i,q as r,t as l,v as n,D as m,E as p,F as h}from"./index-P0fyQ2Em.js";import{_ as d}from"./index.BuZ8YmVY.js";import{r as f}from"./uni-app.es.DOtS5Ldl.js";import{_ as c}from"./mescroll-body.CszwJbBy.js";import{p as u}from"./index.BKbDh3D5.js";import{M as D}from"./mescroll-mixins.C2YUWJKd.js";import{a as j}from"./portal.BblJR1cW.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./resources.DEPsJg7u.js";import"./renderjs.BXp1P0Wg.js";import"./u-tabs.DEel8MQB.js";import"./u-badge.CWPuZ-w1.js";import"./u-line.D-FzmOwL.js";import"./u-image.RNxpLaRU.js";import"./u-icon.wXcRZHbn.js";import"./mp-html.DI6DI7Ml.js";import"./flowEngine.Ke7vpfzj.js";import"./u-time-line.q7UXLQNV.js";const b=y({mixins:[D],components:{portalItem:u},data(){return{id:"",show:!1,formData:[],dataList:[],downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:50,time:null},empty:{use:!1},textNoMore:this.$t("app.apply.noMoreData")}}},onLoad(o){t("token",o.token),this.id=o.id,s("refresh",(()=>{this.formData=[],this.mescroll.resetUpScroll()}))},methods:{upCallback(t){this.mescroll.lockDownScroll(!0),j(this.id).then((t=>{let s=t.data.formData?JSON.parse(t.data.formData):{};this.formData=s.layout?JSON.parse(JSON.stringify(s.layout)):[],this.mescroll.endSuccess(this.formData.length),this.formData.length&&this.handelFormData(s)})).catch((()=>{this.mescroll.endSuccess(0),this.mescroll.endErr()}))},handelFormData(t){const s=o=>{o.forEach((o=>{o.allRefresh=t.refresh,o.show=!1,o.visibility&&o.visibility.length&&o.visibility.includes("app")&&(o.show=!0),o.children&&o.children.length&&s(o.children)})),this.key=+new Date};s(this.formData),this.dataList=this.formData.filter((t=>t.show)),this.dataList.length<1&&(this.formData=this.dataList)}}},[["render",function(t,s,u,D,j,y){const b=o("portalItem"),w=r,g=f(a("JnpfEmpty"),d),_=f(a("mescroll-body"),c);return l(),e(w,{class:"scan-v"},{default:i((()=>[n(_,{ref:"mescrollRef",onDown:t.downCallback,down:j.downOption,sticky:!0,onUp:y.upCallback,up:j.upOption,bottombar:!1,style:{"min-height":"100%"},onInit:t.mescrollInit},{default:i((()=>[n(w,{class:"portal-v"},{default:i((()=>[j.formData.length?(l(),e(w,{key:0},{default:i((()=>[(l(!0),m(h,null,p(j.formData,((t,s)=>(l(),e(w,{class:"portal-box",key:s},{default:i((()=>[n(b,{item:t,ref_for:!0,ref:"portalItem"},null,8,["item"])])),_:2},1024)))),128))])),_:1})):(l(),e(g,{key:1}))])),_:1})])),_:1},8,["onDown","down","onUp","up","onInit"])])),_:1})}],["__scopeId","data-v-ebbb6d3f"]]);export{b as default};