| 1 |
- import{g as e,ac as t,e as s,I as a,R as l,n as i,k as o,X as r,m as n,w as h,o as c,p as d,q as u,t as p,v as f,a1 as m,B as g,C as y,F as k,z as w,E as x,G as N}from"./index-C9TJPork.js";import{_ as C}from"./u-icon.BNGPST4x.js";import{r as _}from"./uni-app.es.CUt9gedF.js";import{_ as b}from"./uni-nav-bar.BnYAzGxG.js";import{_ as v}from"./u-search.DOsDiA_z.js";import{N as j}from"./index.BeMkBjFo.js";import{t as D}from"./index.B9slfH2V.js";import{_ as I}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.RLS1HIfd.js";import"./resources.DEPsJg7u.js";import"./ly-tree.D703-q15.js";import"./u-popup.7vl_vYde.js";const A=I({components:{NoData:j,treeCollapse:D},data:()=>({showApply:!1,topSearch:80,passwordShow:!1,keyword:"",statusBarHeight:"",userInfo:{systemIds:[]},modelId:"",config:{},fullName:"",childrenData:[]}),computed:{baseURL(){return this.define.baseURL},token:()=>e("token"),report(){return this.define.report},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/apply"})},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<e.length;a++){let s=JSON.parse(e[a].propertyJson);this.$set(e[a],"moduleId",s.moduleId),e[a].children&&Array.isArray(e[a].children)&&t(e[a].children,e[a])}};t(e)},getStatusBarHeight(){let e=this;l({success(t){e.statusBarHeight=t.statusBarHeight}})},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{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(e){if(this.showApply=!1,this.modelId=e.moduleId,1!=e.type){if(2!=e.type){if(3==e.type||9==e.type){if(!this.modelId)return void this.$u.toast("暂无此页面");i({url:"/pages/apply/dynamicModel/index?config="+this.jnpf.base64.encode(JSON.stringify(e)),fail:e=>{this.$u.toast("暂无此页面")}})}if(7==e.type||5==e.type){let t=encodeURIComponent(e.urlAddress)+"&fullName="+e.fullName;return 5==e.type&&(t=encodeURIComponent(`${this.report}/preview.html?id=${e.moduleId}&token=${this.token}&page=1&from=menu`)),e.urlAddress||7!=e.type?void i({url:"/pages/apply/externalLink/index?url="+t+"&fullName="+e.fullName+"&type="+e.type,fail:e=>{this.$u.toast("暂无此页面")}}):void this.$u.toast("暂无此页面")}return 8==e.type?e.urlAddress?void i({url:"/pages/portal/scanPortal/index?id="+e.moduleId+"&portalType=1&fullName="+e.fullName,fail:e=>{this.$u.toast("暂无此页面")}}):void this.$u.toast("暂无此页面"):void 0}i({url:e.urlAddress+"?menuId="+e.id+"&fullName="+e.fullName,fail:e=>{this.$u.toast("暂无此页面")}})}else i({url:"/pages/apply/catalog/index?config="+this.jnpf.base64.encode(JSON.stringify(e)),fail:e=>{this.$u.toast("暂无此页面")}})}}},[["render",function(e,t,s,a,l,i){const j=_(o("u-icon"),C),D=c,I=_(o("uni-nav-bar"),b),A=_(o("u-search"),v),$=N,S=r("NoData"),L=r("treeCollapse");return d(),n(D,{class:"catalog-v"},{default:h((()=>[u(I,{class:"nav",fixed:!0,statusBar:!0,border:!1,height:"44","right-icon":"bars",onClickRight:i.clickRight,"left-icon":"left",onClickLeft:i.back},{default:h((()=>[u(D,{class:"",onClick:i.close,style:{position:"absolute",top:"0",left:"40px",bottom:"0","text-align":"center","line-height":"82rpx",height:"100%",width:"40rpx"}},{default:h((()=>[u(j,{name:"close"})])),_:1},8,["onClick"]),u(D,{class:"nav-left"},{default:h((()=>[u(D,{class:"nav-left-text"},{default:h((()=>[p(f(l.config.fullName),1)])),_:1})])),_:1})])),_:1},8,["onClickRight","onClickLeft"]),u(D,{class:"search-box_sticky",style:m({top:l.topSearch+"rpx"})},{default:h((()=>[u(D,{class:"search-box"},{default:h((()=>[u(A,{placeholder:e.$t("app.apply.pleaseKeyword"),modelValue:l.keyword,"onUpdate:modelValue":t[0]||(t[0]=e=>l.keyword=e),height:"72","show-action":!1,onChange:i.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["placeholder","modelValue","onChange"])])),_:1})])),_:1},8,["style"]),u(D,{class:"workFlow-list"},{default:h((()=>[l.childrenData.length?(d(),n(D,{key:0,class:"part"},{default:h((()=>[u(D,{class:"u-flex u-flex-wrap"},{default:h((()=>[(d(!0),g(k,null,y(l.childrenData,((e,t)=>(d(),n(D,{class:"item u-flex-col u-col-center",key:t,onClick:t=>i.handelClick(e)},{default:h((()=>[u($,{class:x(["u-font-40 item-icon",e.icon]),style:m({background:e.iconBackground||"#008cff"})},null,8,["class","style"]),u($,{class:"u-font-24 u-line-1 item-text"},{default:h((()=>[p(f(e.fullName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})):(d(),n(S,{key:1}))])),_:1}),l.showApply?(d(),n(L,{key:0,show:l.showApply,treeData:i.menuList,onChange:i.handelClick},null,8,["show","treeData","onChange"])):w("",!0)])),_:1})}],["__scopeId","data-v-fc0ab679"]]);export{A as default};
|