import{a1 as t,T as a,Q as s,q as o,c as e,w as l,i as r,o as i,t as m,C as p,D as n,F as c,v as h,H as f}from"./index-CkphVivT.js";import{_ as d}from"./u-image.DJJ2uSXz.js";import{r as u}from"./uni-app.es.C8y9lRC1.js";import{_ as y}from"./mescroll-body.NFOfuqwC.js";import{p as D}from"./index.DJCiPC6M.js";import{M as g}from"./mescroll-mixins.C6r4Tn2Z.js";import{a as j,g as w}from"./portal.BpTtV5jl.js";import{r as _}from"./resources.DipqUmnN.js";import{_ as b}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-icon.C5WQ1ik_.js";import"./u-tabs.UK9xJXTB.js";import"./u-badge.DNV0lP1w.js";import"./u-line.Dct-z4Nz.js";import"./u-swipe-action.DHe5Oo0K.js";import"./schedule.B2ikVdSp.js";import"./mp-html.B3DPlC6R.js";import"./flowEngine.D5hf3vJ1.js";import"./apply.DnVaPujH.js";const k=b({mixins:[g],components:{portalItem:D},data:()=>({mpPortalUrl:"",id:"",show:!1,formData:[],dataList:[],emptyImg:_.message.nodata,fullName:"",downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:50,time:null},empty:{use:!1},textNoMore:"没有更多数据"},portalType:1,token:""}),onLoad(s){this.fullName=s.fullName,t({title:this.fullName||"门户预览"}),this.id=s.id,this.portalType=s.portalType,a("refresh",(()=>{this.formData=[],this.mescroll.resetUpScroll()}))},methods:{upCallback(t){const a=1==this.portalType?j:w;1!=this.portalType&&this.mescroll.lockDownScroll(!0),a(this.id).then((t=>{let a=t.data.formData?JSON.parse(t.data.formData):{};this.formData=a.layout?JSON.parse(JSON.stringify(a.layout)):[],this.mescroll.endSuccess(this.formData.length),this.formData.length&&this.handelFormData(a)})).catch((()=>{this.mescroll.endSuccess(0),this.mescroll.endErr()}))},handelFormData(t){const a=s=>{s.forEach((s=>{s.allRefresh=t.refresh,s.show=!1,s.visibility&&s.visibility.length&&s.visibility.includes("app")&&(s.show=!0),s.children&&s.children.length&&a(s.children)})),this.key=+new Date};a(this.formData),this.dataList=this.formData.filter((t=>t.show)),this.dataList.length<1&&(this.formData=this.dataList)}}},[["render",function(t,a,D,g,j,w){const _=s("portalItem"),b=r,k=u(o("u-image"),d),x=f,v=u(o("mescroll-body"),y);return i(),e(b,{class:"scan-v"},{default:l((()=>[m(v,{ref:"mescrollRef",onDown:t.downCallback,down:j.downOption,sticky:!0,onUp:w.upCallback,up:j.upOption,bottombar:!1,style:{"min-height":"100%"},onInit:t.mescrollInit},{default:l((()=>[m(b,{class:"portal-v"},{default:l((()=>[j.formData.length?(i(),e(b,{key:0},{default:l((()=>[(i(!0),p(c,null,n(j.formData,((t,a)=>(i(),e(b,{class:"portal-box",key:a},{default:l((()=>[m(_,{item:t,ref_for:!0,ref:"portalItem",portalData:j.formData},null,8,["item","portalData"])])),_:2},1024)))),128))])),_:1})):(i(),e(b,{key:1,class:"portal-v portal-nodata"},{default:l((()=>[m(b,{class:"u-flex-col",style:{"align-items":"center"}},{default:l((()=>[m(k,{width:"280rpx",height:"280rpx",src:j.emptyImg},null,8,["src"]),m(x,{class:"u-m-t-20",style:{color:"#909399"}},{default:l((()=>[h("暂无数据")])),_:1})])),_:1})])),_:1}))])),_:1})])),_:1},8,["onDown","down","onUp","up","onInit"])])),_:1})}],["__scopeId","data-v-26c6642f"]]);export{k as default};