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 n,D as p,F as c,v as h,H as f}from"./index-DL8B2Mxu.js";import{_ as d}from"./u-image.HgEtCXEr.js";import{r as u}from"./uni-app.es.BSVEa1f2.js";import{_ as y}from"./mescroll-body.DoI4hLy1.js";import{p as D}from"./index.BKS2bywI.js";import{M as g}from"./mescroll-mixins.DNza9FDh.js";import{a as j,g as w}from"./portal.CZm82Udl.js";import{r as _}from"./resources.DipqUmnN.js";import{_ as b}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-icon.CLOPtL2B.js";import"./u-tabs.YLQ0tmbs.js";import"./u-badge.B5SA0J9t.js";import"./u-line.Dv-HC5jX.js";import"./u-swipe-action.BYB6w9Xo.js";import"./schedule.BciDUoXN.js";import"./mp-html.BLGMDPJW.js";import"./flowEngine.BUKhPj-S.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),n(c,null,p(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};
