| 1 |
- import{g as e,a2 as t,a5 as s,n as l,b as o,h as i,o as a,p as n,w as r,q as d,t as p,v as u,D as c,E as m,F as h,x as f,y,B as k,H as g,Q as x,I as w}from"./index-P0fyQ2Em.js";import{_ as $}from"./u-search.CSVnMmHg.js";import{r as v}from"./uni-app.es.DOtS5Ldl.js";import{_ as I}from"./mescroll-body.CszwJbBy.js";import{d as C,e as N}from"./apply.B6q2NDrR.js";import{r as _}from"./resources.DEPsJg7u.js";import{M as b}from"./mescroll-mixins.C2YUWJKd.js";import{_ as j}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-icon.wXcRZHbn.js";import"./renderjs.BXp1P0Wg.js";const L=j({mixins:[b],data(){return{mescrollTop:0,menuList:[],downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:50,time:null},empty:{use:!0,icon:_.message.nodata,tip:this.$t("common.noData"),fixed:!1,top:"560rpx"},textNoMore:this.$t("app.apply.noMoreData")},keyword:"",fullName:"",key:+new Date,listChild:[]}},computed:{token:()=>e("token"),report(){return this.define.report},pcURL(){return this.define.pcURL}},onShow(){this.keyword="",t("refresh",(()=>{this.menuList=[],this.$nextTick((()=>{this.mescroll.resetUpScroll()}))}))},onUnload(){s("updateUsualList")},methods:{handelClick(t){if(1==t.type)return void C(t.id).then((e=>{this.listChild=e.data||[],this.handleProperty(this.listChild),this.$nextTick((()=>{l({url:"/pages/apply/catalog/index?config="+this.jnpf.base64.encode(JSON.stringify(this.listChild[0])),fail:e=>{this.$u.toast("暂无此页面")}})}))}));let s="";if(2==t.type||11==t.type){if(!t.pageAddress)return void this.$u.toast("暂无此页面");s=t.pageAddress+"?menuId="+t.id+"&fullName="+t.fullName}if(3==t.type||9==t.type){if(!t.moduleId)return void this.$u.toast("暂无此页面");s="/pages/apply/dynamicModel/index?config="+this.jnpf.base64.encode(JSON.stringify(t))}if(7==t.type){if(!t.pageAddress)return void this.$u.toast("暂无此页面");s="/pages/apply/externalLink/index?url="+encodeURIComponent(t.pageAddress)+"&fullName="+t.fullName+"&type="+t.type}if(5==t.type){if(!t.moduleId)return void this.$u.toast("暂无此页面");userInfo=e("userInfo")||{};const l=userInfo.systemCode;s="/pages/apply/externalLink/index?url="+encodeURIComponent(`${this.report}/preview.html?id=${t.moduleId}&token=${this.token}}&appCode=${l}&page=1&from=menu`)+"&fullName="+t.fullName+"&type="+t.type}if(10==t.type){if(!t.moduleId)return void this.$u.toast("暂无此页面");s="/pages/apply/externalLink/index?url="+encodeURIComponent(`${this.pcURL}/reportPreview?id=${t.moduleId}&token=${this.token}&from=app`)+"&fullName="+t.fullName+"&type="+t.type}if(8==t.type){if(!t.moduleId)return void this.$u.toast("暂无此页面");s="/pages/portal/scanPortal/index?id="+t.moduleId+"&portalType=1&fullName="+t.fullName}s&&l({url:s,fail:()=>{this.$u.toast("暂无此页面")}})},upCallback(e){let t={keyword:this.keyword};o({title:"正在加载",mask:!0}),N(t).then((e=>{let t=e.data.list||[];this.mescroll.endSuccess(t.length),this.list=t.filter((e=>e.children&&e.children.length)),this.menuList=this.list,this.handleProperty(this.list),i(),this.key=+new Date,this.mescroll.endSuccess(this.menuList.length,!1)})).catch((()=>{this.mescroll.endSuccess(0),this.mescroll.endErr()}))},handleProperty(e){const t=e=>{e.map((e=>{var s;if(null==e?void 0:e.propertyJson){let t=JSON.parse(e.propertyJson);this.$set(e,"iconBackground",t.iconBackgroundColor||""),this.$set(e,"moduleId",t.moduleId||"")}(null==e?void 0:e.children)&&(null==(s=null==e?void 0:e.children)?void 0:s.length)&&t(e.children)}))};t(e)},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.list=[],this.menuList=[],this.mescroll.resetUpScroll()}),300)}}},[["render",function(e,t,s,l,o,i){const C=v(a("u-search"),$),N=d,_=w,b=v(a("mescroll-body"),I);return p(),n(N,{class:"menu-v"},{default:r((()=>[u(N,{class:"search-box u-m-b-20"},{default:r((()=>[u(C,{placeholder:e.$t("app.apply.pleaseKeyword"),modelValue:o.keyword,"onUpdate:modelValue":t[0]||(t[0]=e=>o.keyword=e),height:"72","show-action":!1,onChange:i.search,"bg-color":"#f0f2f6",shape:"square",style:{width:"100%"}},null,8,["placeholder","modelValue","onChange"])])),_:1}),u(b,{ref:"mescrollRef",onDown:e.downCallback,down:o.downOption,sticky:!1,onUp:i.upCallback,up:o.upOption,bottombar:!1,onInit:e.mescrollInit,top:o.mescrollTop},{default:r((()=>[u(N,{class:"workFlow-list"},{default:r((()=>[(p(!0),c(h,null,m(o.menuList,((e,t)=>(p(),n(N,{class:"part",key:t},{default:r((()=>{var t;return[(null==(t=null==e?void 0:e.children)?void 0:t.length)?(p(),n(N,{key:0,class:"caption u-line-1"},{default:r((()=>[f(y(e.fullName),1)])),_:2},1024)):k("",!0),u(N,{class:"u-flex u-flex-wrap"},{default:r((()=>[(p(!0),c(h,null,m(e.children,((e,t)=>(p(),n(N,{class:"item u-flex-col u-col-center",key:t,onClick:t=>i.handelClick(e)},{default:r((()=>[u(_,{class:g(["u-font-40 item-icon",e.icon]),style:x({background:e.iconBackground||"#008cff"})},null,8,["class","style"]),u(_,{class:"u-font-24 u-line-1 item-text"},{default:r((()=>[f(y(e.fullName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:2},1024)]})),_:2},1024)))),128))])),_:1})])),_:1},8,["onDown","down","onUp","up","onInit","top"])])),_:1})}],["__scopeId","data-v-f64f86ae"]]);export{L as default};
|