| 1 |
- import{b as e,h as t,n as s,o as l,X as r,t as a,p as i,w as o,v as n,x as u,y as c,D as h,E as d,F as m,q as p,H as f,Q as y,I as g,g as k,a2 as w,a as C,B as T}from"./index-P0fyQ2Em.js";import{_ as x}from"./u-search.CSVnMmHg.js";import{r as _}from"./uni-app.es.DOtS5Ldl.js";import{_ as N}from"./index.BuZ8YmVY.js";import{C as b}from"./index.CNpiLv5L.js";import{b as L,c as I}from"./apply.B6q2NDrR.js";import{_ as v}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{_ as j}from"./mescroll-uni.CyN-3Ok3.js";import{r as $}from"./resources.DEPsJg7u.js";import{M as U}from"./mescroll-mixins.C2YUWJKd.js";import"./u-icon.wXcRZHbn.js";import"./u-tabs.DEel8MQB.js";import"./u-badge.CWPuZ-w1.js";import"./u-popup.CXrq2y3n.js";import"./renderjs.BXp1P0Wg.js";const J=v({components:{allCommonFlow:v({components:{CommonTabs:b},data:()=>({keyword:"",category:"",current:0,categoryTree:[],fullName:"",list:[],searchCategoryTree:[]}),created(){e(),this.getFlowUsualList()},methods:{getFlowUsualList(){this.keyword="",L().then((e=>{var s;this.categoryTree=(null==(s=null==e?void 0:e.data)?void 0:s.list)||[],this.searchCategoryTree=JSON.parse(JSON.stringify(this.categoryTree)),this.list=[],this.$nextTick((()=>{var e,t;this.list=(null==(e=this.categoryTree[this.current])?void 0:e.children)||[],this.fullName=null==(t=this.categoryTree[this.current])?void 0:t.fullName})),t()})).catch((()=>{this.categoryTree=[],this.list=[]}))},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{if(!this.keyword)return this.clear();let e=this.searchCategoryTree[this.current].children.filter((e=>e.fullName.includes(this.keyword)));this.$set(this.categoryTree[this.current],"children",e),this.list=this.categoryTree[this.current].children}),300)},clear(){this.getFlowUsualList()},change(e){this.list=this.categoryTree[e].children,this.fullName=this.categoryTree[e].fullName,this.keyword="",this.current=e},Jump(e){const t={id:"",flowId:e.id,opType:"-1"};this.current=0,this.category="",s({url:"/pages/workFlow/flowBefore/index?config="+this.jnpf.base64.encode(JSON.stringify(t))})}}},[["render",function(e,t,s,k,w,C){const T=_(l("u-search"),x),b=p,L=r("CommonTabs"),I=g,v=_(l("JnpfEmpty"),N);return a(),i(b,{class:"workFlow-v"},{default:o((()=>[n(b,{class:"notice-warp"},{default:o((()=>[n(b,{class:"search-box"},{default:o((()=>[n(T,{placeholder:e.$t("app.apply.pleaseKeyword"),modelValue:w.keyword,"onUpdate:modelValue":t[0]||(t[0]=e=>w.keyword=e),height:"72","show-action":!1,onChange:C.search,"bg-color":"#f0f2f6",shape:"square",onClear:C.clear},null,8,["placeholder","modelValue","onChange","onClear"])])),_:1}),n(b,{class:"commonTabs-box"},{default:o((()=>[n(L,{list:w.categoryTree,onChange:C.change,current:w.current,ref:"CommonTabs",isScroll:w.categoryTree.length>=4},null,8,["list","onChange","current","isScroll"])])),_:1})])),_:1}),n(b,{class:"workFlow-list",style:{}},{default:o((()=>[w.list.length?(a(),i(b,{key:0,class:"part"},{default:o((()=>[n(b,{class:"caption u-line-1"},{default:o((()=>[u(c(w.fullName),1)])),_:1}),n(b,{class:"u-flex u-flex-wrap"},{default:o((()=>[(a(!0),h(m,null,d(w.list,((e,t)=>(a(),i(b,{class:"item u-flex-col u-col-center",key:t,onClick:t=>C.Jump(e)},{default:o((()=>[n(I,{class:f(["u-font-40 item-icon",e.icon]),style:y({background:e.iconBackground||"#008cff"})},null,8,["class","style"]),n(I,{class:"u-font-24 u-line-1 item-text"},{default:o((()=>[u(c(e.fullName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})):(a(),i(v,{key:1}))])),_:1})])),_:1})}],["__scopeId","data-v-a04cb625"]]),allCommonMenus:v({mixins:[U],components:{CommonTabs:b},data:()=>({current:0,tabsMenuList:[],menuList:[],downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:50,time:null},empty:{use:!1,icon:$.message.nodata,tip:"暂无数据",fixed:!0,top:"560rpx"},textNoMore:""},keyword:"",userInfo:{systemIds:[]},key:+new Date}),computed:{baseURL(){return this.define.baseURL},token:()=>k("token"),report(){return this.define.report},pcURL(){return this.define.pcURL},hasChildren(){let e=!1;for(let t=0;t<this.menuList.length;t++)if(this.menuList[t].children&&this.menuList[t].children.length){e=!0;break}return e}},created(){w("refresh",(()=>{this.menuList=[],this.current=0,this.mescroll.resetUpScroll()}))},methods:{classifyItem(e){this.change(e)},upCallback(s){let l={keyword:this.keyword,type:2};e({title:"正在加载",mask:!0}),I(l).then((e=>{let s=e.data.list||[];s.length||(this.current=0),this.tabsMenuList=[{fullName:"全部功能"}],this.mescroll.endSuccess(s.length);for(let t=0;t<s.length;t++){let e=s[t].children,l={fullName:s[t].fullName};if(this.tabsMenuList.push(l),Array.isArray(e)&&e.length)for(let t=0;t<e.length;t++){let s="",l="";if(e[t].propertyJson){let r=JSON.parse(e[t].propertyJson);s=r.iconBackgroundColor||"",l=r.moduleId||""}this.$set(e[t],"iconBackground",s),this.$set(e[t],"moduleId",l)}}if(this.list=JSON.parse(JSON.stringify(s)),0===this.current){let e=[{fullName:"全部功能",children:this.jnpf.treeToArray(this.list).filter((e=>!e.hasChildren)),id:0}];this.menuList=e}else this.menuList=this.list;t(),this.key=+new Date,this.mescroll.endSuccess(this.menuList.length,!1)})).catch((()=>{this.mescroll.endSuccess(0),this.mescroll.endErr()}))},change(e){if(this.current=e,this.menuList=this.list,0===this.current){let e=[{fullName:"全部功能",children:this.jnpf.treeToArray(this.list).filter((e=>!e.hasChildren)),id:0}];this.menuList=e}else this.menuList=[this.list[e-1]]},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.list=[],this.menuList=[],this.tabsMenuList=[],this.current=0,this.mescroll.resetUpScroll()}),300)},handleClick(e){let t="";if(2==e.type||11==e.type){if(!e.pageAddress)return void this.$u.toast("暂无此页面");t=e.pageAddress+"?menuId="+e.id+"&fullName="+e.fullName}if(3==e.type||9==e.type){if(!e.moduleId)return void this.$u.toast("暂无此页面");t="/pages/apply/dynamicModel/index?config="+this.jnpf.base64.encode(JSON.stringify(e))}if(7==e.type){if(!e.pageAddress)return void this.$u.toast("暂无此页面");t="/pages/apply/externalLink/index?url="+encodeURIComponent(e.pageAddress)+"&fullName="+e.fullName+"&type="+e.type}if(5==e.type){if(!e.moduleId)return void this.$u.toast("暂无此页面");userInfo=k("userInfo")||{};const s=userInfo.systemCode;t="/pages/apply/externalLink/index?url="+encodeURIComponent(`${this.report}/preview.html?id=${e.moduleId}&token=${this.token}&appCode=${s}&page=1&from=menu`)+"&fullName="+e.fullName+"&type="+e.type}if(10==e.type){if(!e.moduleId)return void this.$u.toast("暂无此页面");t="/pages/apply/externalLink/index?url="+encodeURIComponent(`${this.pcURL}/reportPreview?id=${e.moduleId}&token=${this.token}&from=app`)+"&fullName="+e.fullName+"&type="+e.type}if(8==e.type){if(!e.moduleId)return void this.$u.toast("暂无此页面");t="/pages/portal/scanPortal/index?id="+e.moduleId+"&portalType=1&fullName="+e.fullName}t&&s({url:t,fail:()=>{this.$u.toast("暂无此页面")}})}}},[["render",function(e,t,s,k,w,C){const T=_(l("u-search"),x),b=p,L=r("CommonTabs"),I=g,v=_(l("JnpfEmpty"),N),$=_(l("mescroll-uni"),j);return a(),i(b,{class:"all-apply-v"},{default:o((()=>[n(b,{class:"notice-warp"},{default:o((()=>[n(b,{class:"search-box"},{default:o((()=>[n(T,{placeholder:e.$t("app.apply.pleaseKeyword"),modelValue:w.keyword,"onUpdate:modelValue":t[0]||(t[0]=e=>w.keyword=e),height:"72","show-action":!1,onChange:C.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["placeholder","modelValue","onChange"])])),_:1}),n(b,null,{default:o((()=>[n(L,{list:w.tabsMenuList,onChange:C.change,current:w.current,ref:"CommonTabs"},null,8,["list","onChange","current"])])),_:1})])),_:1}),n($,{onInit:e.mescrollInit,onDown:e.downCallback,onUp:C.upCallback,down:w.downOption,up:w.upOption,top:"220"},{default:o((()=>[n(b,{class:"workFlow-list"},{default:o((()=>[w.menuList.length&&C.hasChildren?(a(!0),h(m,{key:0},d(w.menuList,((e,t)=>(a(),i(b,{class:"part",key:t},{default:o((()=>[n(b,{class:"caption u-line-1"},{default:o((()=>[u(c(e.fullName),1)])),_:2},1024),n(b,{class:"u-flex u-flex-wrap"},{default:o((()=>[(a(!0),h(m,null,d(e.children,((e,t)=>(a(),i(b,{class:"item u-flex-col u-col-center",key:t,onClick:t=>C.handleClick(e)},{default:o((()=>[n(I,{class:f(["u-font-40 item-icon",e.icon]),style:y({background:e.iconBackground||"#008cff"})},null,8,["class","style"]),n(I,{class:"u-font-24 u-line-1 item-text"},{default:o((()=>[u(c(e.fullName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:2},1024)])),_:2},1024)))),128)):(a(),i(v,{key:1}))])),_:1})])),_:1},8,["onInit","onDown","onUp","down","up"])])),_:1})}],["__scopeId","data-v-f4918e7e"]])},data:()=>({type:"1"}),onLoad(e){this.type=(null==e?void 0:e.type)||"1",C({title:"1"==this.type?"收藏审批":"收藏功能"})},methods:{}},[["render",function(e,t,s,l,n,u){const c=r("allCommonFlow"),h=r("allCommonMenus"),d=p;return a(),i(d,{class:"morePage-v"},{default:o((()=>[1==n.type?(a(),i(c,{key:0,ref:"allCommonFlow"},null,512)):T("",!0),2==n.type?(a(),i(h,{key:1,ref:"allCommonMenus"},null,512)):T("",!0)])),_:1})}],["__scopeId","data-v-9a181718"]]);export{J as default};
|