import{g as e,a as t,f as s,K as a,Z as i,n as l,o,X as r,p as n,w as d,q as p,t as h,v as c,x as u,y as f,Q as m,D as g,E as y,F as k,B as x,H as w,I as C}from"./index-P0fyQ2Em.js";import{_ as I}from"./u-icon.wXcRZHbn.js";import{r as N}from"./uni-app.es.DOtS5Ldl.js";import{_}from"./uni-nav-bar.CsxVGSV_.js";import{_ as b}from"./u-search.CSVnMmHg.js";import{_ as v}from"./index.BuZ8YmVY.js";import{t as $}from"./index.DQp94JXr.js";import{_ as j}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.RJ8Vh9KU.js";import"./resources.DEPsJg7u.js";import"./ly-tree.DZ8MU_HY.js";import"./u-popup.CXrq2y3n.js";const L=j({components:{treeCollapse:$},data:()=>({showApply:!1,topSearch:80,keyword:"",statusBarHeight:"",userInfo:{systemIds:[]},modelId:"",config:{},fullName:"",childrenData:[]}),computed:{baseURL(){return this.define.baseURL},token:()=>e("token"),report(){return this.define.report},pcURL(){return this.define.pcURL},menuList:()=>e("menuList").filter((e=>"workFlow"!==e.enCode))},onLoad(e){this.config=JSON.parse(this.jnpf.base64.decode(e.config))||{},Array.isArray(this.config.children)&&this.config.children.length&&(this.childrenData=JSON.parse(JSON.stringify(this.config.children))),this.keyword="",this.handleData(this.childrenData),t({title:this.config.fullName}),this.getStatusBarHeight()},methods:{close(){s({url:"/pages/index/index"})},back(){a({delta:1})},clickRight(){this.handleData(this.menuList),this.$nextTick((()=>{this.showApply=!this.showApply}))},handleData(e){const t=(e,s)=>{for(let a=0;a{if(!this.keyword)return this.childrenData=JSON.parse(JSON.stringify(this.config.children));const e=new RegExp(this.keyword,"i");this.childrenData=this.childrenData.filter((t=>e.test(t.fullName)))}),300)},handelClick(t){if(this.showApply=!1,this.modelId=t.moduleId,1==t.type)return void l({url:"/pages/apply/catalog/index?config="+this.jnpf.base64.encode(JSON.stringify(t)),fail:()=>{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 a=userInfo.systemCode;s="/pages/apply/externalLink/index?url="+encodeURIComponent(`${this.report}/preview.html?id=${t.moduleId}&token=${this.token}&appCode=${a}&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("暂无此页面")}})}}},[["render",function(e,t,s,a,i,l){const $=N(o("u-icon"),I),j=p,L=N(o("uni-nav-bar"),_),A=N(o("u-search"),b),D=C,R=N(o("JnpfEmpty"),v),S=r("treeCollapse");return h(),n(j,{class:"catalog-v"},{default:d((()=>[c(L,{class:"nav",fixed:!0,statusBar:!0,border:!1,height:"44","right-icon":"bars",onClickRight:l.clickRight,"left-icon":"left",onClickLeft:l.back},{default:d((()=>[c(j,{class:"",onClick:l.close,style:{position:"absolute",top:"0",left:"40px",bottom:"0","text-align":"center","line-height":"82rpx",height:"100%",width:"40rpx"}},{default:d((()=>[c($,{name:"close"})])),_:1},8,["onClick"]),c(j,{class:"nav-left"},{default:d((()=>[c(j,{class:"nav-left-text"},{default:d((()=>[u(f(i.config.fullName),1)])),_:1})])),_:1})])),_:1},8,["onClickRight","onClickLeft"]),c(j,{class:"search-box_sticky",style:m({top:i.topSearch+"rpx"})},{default:d((()=>[c(j,{class:"search-box"},{default:d((()=>[c(A,{placeholder:e.$t("app.apply.pleaseKeyword"),modelValue:i.keyword,"onUpdate:modelValue":t[0]||(t[0]=e=>i.keyword=e),height:"72","show-action":!1,onChange:l.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["placeholder","modelValue","onChange"])])),_:1})])),_:1},8,["style"]),c(j,{class:"workFlow-list"},{default:d((()=>[i.childrenData.length?(h(),n(j,{key:0,class:"part"},{default:d((()=>[c(j,{class:"u-flex u-flex-wrap"},{default:d((()=>[(h(!0),g(k,null,y(i.childrenData,((e,t)=>(h(),n(j,{class:"item u-flex-col u-col-center",key:t,onClick:t=>l.handelClick(e)},{default:d((()=>[c(D,{class:w(["u-font-40 item-icon",e.icon]),style:m({background:e.iconBackground||"#008cff"})},null,8,["class","style"]),c(D,{class:"u-font-24 u-line-1 item-text"},{default:d((()=>[u(f(e.fullName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})):(h(),n(R,{key:1}))])),_:1}),i.showApply?(h(),n(S,{key:0,show:i.showApply,treeData:l.menuList,onChange:l.handelClick},null,8,["show","treeData","onChange"])):x("",!0)])),_:1})}],["__scopeId","data-v-5626ddb6"]]);export{L as default};