import{g as e,W as s,X as t,T as a,_ as l,u as o,j as r,a0 as i,a1 as n,f as u,h as d,n as m,a2 as c,v as h,U as p,d as f,w as g,i as w,o as y,x as b,y as k,z as I,I as _,C as L,V as S,E as x,G as C,F,a3 as N,J as j}from"./index-CuGRD9U9.js";import{_ as U}from"./uni-icons.CByGZdWz.js";import{r as V}from"./uni-app.es.DeOLBu20.js";import{_ as v}from"./uni-nav-bar.BsIjtt6F.js";import{_ as $}from"./u-search.CtldT9xW.js";import{_ as D}from"./u-tabs.BWHfqMyE.js";import{_ as M}from"./mescroll-body.BKFVjOXi.js";import{_ as P}from"./u-input.Bf2tDRiF.js";import{_ as B,a as A}from"./u-form.EI0z7ZzT.js";import{_ as E}from"./u-image._S_7sh-1.js";import{_ as q}from"./u-button.BvcoaXSS.js";import{_ as T}from"./u-popup.NzP8yyOW.js";import{_ as O}from"./u-icon.ujoK7fRU.js";import{g as R,a as H}from"./apply.MleZtHKb.js";import{N as J}from"./noData.BVHPaUnV.js";import{r as z}from"./resources.DipqUmnN.js";import{M as W}from"./mescroll-mixins.BMjLn4UD.js";import{I as G}from"./mixin.D6rrIYsM.js";import{m as X}from"./md5.6s00qotZ.js";import{_ as Z}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-badge.lynPLVtM.js";import"./emitter.DrjJCwnj.js";const K=Z({mixins:[W,G],components:{NoData:J},data(){return{topSearch:80,passwordShow:!1,current:0,usualList:[],tabsMenuList:[{fullName:"全部功能"}],menuList:[],downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:50,time:null},empty:{use:!1,icon:z.message.nodata,tip:"暂无数据",fixed:!1,top:"560rpx"},textNoMore:""},keyword:"",statusBarHeight:"",userInfo:{systemIds:[]},showSelect:!1,selectData:{name:"",id:""},modelId:"",config:{},fullName:"",key:+new Date,imgUrl:"",timestamp:"",dataForm:{oldPassword:"",password:"",repeatPsd:"",code:"",timestamp:""},baseForm:{passwordStrengthLimit:0,passwordLengthMin:!1,passwordLengthMinNumber:0,containsNumbers:!1,includeLowercaseLetters:!1,includeUppercaseLetters:!1,containsCharacters:!1,mandatoryModificationOfInitialPassword:0},rules:{oldPassword:[{required:!0,message:"旧密码不能为空",trigger:"blur"}],password:[{required:!0,validator:(e,s,t)=>{const a=/[0-9]+/,l=/[a-z]+/,o=/[A-Z]+/,r=/\W/;""===s?t(new Error("新密码不能为空")):1==this.baseForm.passwordStrengthLimit?(this.baseForm.passwordLengthMin&&s.length<this.baseForm.passwordLengthMinNumber&&t(new Error("新密码长度不能小于"+this.baseForm.passwordLengthMinNumber+"位")),this.baseForm.containsNumbers&&(a.test(s)||t(new Error("新密码必须包含数字"))),this.baseForm.includeLowercaseLetters&&(l.test(s)||t(new Error("新密码必须包含小写字母"))),this.baseForm.includeUppercaseLetters&&(o.test(s)||t(new Error("新密码必须包含大写字字母"))),this.baseForm.containsCharacters&&(r.test(s)||t(new Error("新密码必须包含字符"))),t()):t()},trigger:"blur"}],repeatPsd:[{required:!0,validator:(e,s,t)=>{""===s?t(new Error("重复密码不能为空")):s!==this.dataForm.password?t(new Error("两次密码输入不一致")):t()},trigger:"blur"}],code:[{required:!0,message:"验证码不能为空",trigger:"blur"}]}}},computed:{baseURL(){return this.define.baseURL},token:()=>e("token"),report(){return this.define.report},hasChildren(){let e=!1;for(let s=0;s<this.menuList.length;s++)if(this.menuList[s].children&&this.menuList[s].children.length){e=!0;break}return e}},watch:{passwordShow(e){e&&this.$nextTick((()=>{this.$refs.dataForm.setRules(this.rules)}))}},onShow(){this.keyword=""},onLoad(){s("updateUsualList",(e=>{this.getUsualList()})),s("refresh",(()=>{this.menuList=[],this.current=0,this.mescroll.resetUpScroll()})),this.getStatusBarHeight(),this.changeCode()},onUnload(){t("updateUsualList")},methods:{getStatusBarHeight(){let e=this;a({success(s){e.statusBarHeight=s.statusBarHeight}})},changeCode(){let e=Math.random();this.timestamp=e,this.imgUrl=`/api/file/ImageCode/${e}`},dataFormSubmit(){this.$refs.dataForm.validate((e=>{if(e){let e={oldPassword:X.md5(this.dataForm.oldPassword),password:X.md5(this.dataForm.password),code:this.dataForm.code,timestamp:this.timestamp};l(e).then((e=>{o().logout().then((()=>{r({url:"/pages/login/index"})}))})).catch((()=>{this.changeImg()}))}}))},initSysList(e){this.userInfo=e,this.userInfo.systemIds&&this.userInfo.systemIds.length&&this.userInfo.systemIds.forEach((e=>{e.id==this.userInfo.appSystemId&&(this.selectData=e)})),i(),n().then((e=>{null==this.userInfo.changePasswordDate&&1==e.data.mandatoryModificationOfInitialPassword&&(this.passwordShow=!0),this.baseForm=e.data}))},getUsualList(){R(2).then((e=>{this.usualList=e.data.list.map((e=>{const s=e.objectData?JSON.parse(e.objectData):{};return{...e,...s}}))}))},upCallback(e){let s={keyword:this.keyword};u({title:"正在加载",mask:!0});o().getCurrentUser().then((e=>{this.initSysList(e),this.getUsualList(),H(s).then((e=>{let s=e.data.list||[];this.tabsMenuList=[{fullName:"全部功能"}],this.mescroll.endSuccess(s.length);for(let t=0;t<s.length;t++){let e=s[t].children,a={fullName:s[t].fullName};if(this.tabsMenuList.push(a),Array.isArray(e)&&e.length)for(let s=0;s<e.length;s++){let t="",a="";if(e[s].propertyJson){let l=JSON.parse(e[s].propertyJson);t=l.iconBackgroundColor||"",a=l.moduleId||""}this.$set(e[s],"iconBackground",t),this.$set(e[s],"moduleId",a)}}this.list=s,this.menuList=s,d(),this.key=+new Date,this.mescroll.endSuccess(this.menuList.length,!1)})).catch((()=>{this.mescroll.endSuccess(0),this.mescroll.endErr()}))}))},change(e){this.current=e,this.fullName=this.tabsMenuList[e].fullName,this.menuList=this.list,this.keyword="",this.current>0&&(this.menuList=[this.list[e-1]])},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.list=[],this.menuList=[],this.mescroll.resetUpScroll()}),300)},moreApp(){m({url:"/pages/workFlow/allApp/index?type=2"})},handelClick(e){if(2!=e.type){if(3==e.type){if(this.modelId=e.moduleId,!e.moduleId)return void this.$u.toast("暂无此页面");m({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 s=encodeURIComponent(e.urlAddress)+"&fullName="+e.fullName;return 5==e.type&&(s=encodeURIComponent(`${this.report}/preview.html?id=${e.moduleId}&token=${this.token}&page=1&from=menu`)),e.urlAddress||7!=e.type?void m({url:"/pages/apply/externalLink/index?url="+s+"&fullName="+e.fullName+"&type="+e.type,fail:e=>{this.$u.toast("暂无此页面")}}):void this.$u.toast("暂无此页面")}return 8==e.type?e.urlAddress?void m({url:"/pages/portal/scanPortal/index?id="+e.moduleId+"&portalType=1&fullName="+e.fullName,fail:e=>{this.$u.toast("暂无此页面")}}):void this.$u.toast("暂无此页面"):void 0}m({url:e.urlAddress+"?menuId="+e.id+"&fullName="+e.fullName,fail:e=>{this.$u.toast("暂无此页面")}})},showSelectBox(){this.userInfo.systemIds.length<=1||(this.showSelect=!this.showSelect)},selectItem(e,s){if(e.id===this.userInfo.appSystemId)return;let t={majorId:e.id,majorType:"System",menuType:1};c(t).then((t=>{200==t.code&&(this.changeSelData(e,s),this.keyword="",this.$u.toast(t.msg),this.mescroll.resetUpScroll())}))},changeSelData(e,s){this.selectData=e,this.userInfo.appSystemId=e.id,this.showSelect=!1}}},[["render",function(e,s,t,a,l,o){const r=w,i=V(h("uni-icons"),U),n=V(h("uni-nav-bar"),v),u=V(h("u-search"),$),d=j,m=V(h("u-tabs"),D),c=p("NoData"),R=V(h("mescroll-body"),M),H=V(h("u-input"),P),J=V(h("u-form-item"),B),z=V(h("u-image"),E),W=V(h("u-button"),q),G=V(h("u-form"),A),X=V(h("u-popup"),T),Z=V(h("u-icon"),O);return y(),f(r,{class:"apply-v"},{default:g((()=>[b(n,{class:"nav",fixed:!0,statusBar:!0,border:!1,height:"44"},{default:g((()=>[b(r,{class:"nav-left",onClick:o.showSelectBox},{default:g((()=>[b(r,{class:"nav-left-text"},{default:g((()=>[k(I(l.selectData.name),1)])),_:1}),l.userInfo.systemIds.length>1?(y(),f(i,{key:0,class:_(["right-icons",{"select-right-icons":l.showSelect}]),type:"down",color:"#000000",size:"14"},null,8,["class"])):L("",!0)])),_:1},8,["onClick"])])),_:1}),b(r,{class:"search-box_sticky",style:S({top:l.topSearch+"rpx"})},{default:g((()=>[b(r,{class:"search-box"},{default:g((()=>[b(u,{placeholder:"请输入关键词搜索",modelValue:l.keyword,"onUpdate:modelValue":s[0]||(s[0]=e=>l.keyword=e),height:"72","show-action":!1,onChange:o.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["modelValue","onChange"])])),_:1})])),_:1},8,["style"]),b(R,{ref:"mescrollRef",onDown:e.downCallback,down:l.downOption,sticky:!0,onUp:o.upCallback,up:l.upOption,bottombar:!1,style:{"min-height":"100%"},onInit:e.mescrollInit},{default:g((()=>[b(r,{class:"common-block"},{default:g((()=>[b(r,{class:"caption"},{default:g((()=>[k("常用功能")])),_:1}),b(r,{class:"u-flex u-flex-wrap"},{default:g((()=>[(y(!0),x(F,null,C(l.usualList,((e,s)=>(y(),f(r,{class:"item u-flex-col u-col-center",key:s,onClick:s=>o.handelClick(e)},{default:g((()=>[b(d,{class:_(["u-font-40 item-icon",e.icon]),style:S({background:e.iconBackground||"#008cff"})},null,8,["class","style"]),b(d,{class:"u-font-24 u-line-1 item-text"},{default:g((()=>[k(I(e.fullName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128)),b(r,{class:"item u-flex-col u-col-center",onClick:o.moreApp},{default:g((()=>[b(d,{class:"u-font-40 item-icon more"},{default:g((()=>[k("+")])),_:1}),b(d,{class:"u-font-24 u-line-1 item-text"},{default:g((()=>[k("添加")])),_:1})])),_:1},8,["onClick"])])),_:1})])),_:1}),b(r,{class:"u-m-b-20"},{default:g((()=>[(y(),f(m,{list:l.tabsMenuList,current:l.current,onChange:o.change,"is-scroll":!0,name:"fullName",key:l.key},null,8,["list","current","onChange"]))])),_:1}),b(r,{class:"workFlow-list"},{default:g((()=>[l.current||!l.current&&o.hasChildren?(y(!0),x(F,{key:0},C(l.menuList,((e,s)=>(y(),f(r,{class:"part",key:s},{default:g((()=>[e.children&&e.children.length>0?(y(),f(r,{key:0},{default:g((()=>[b(r,{class:"caption u-line-1"},{default:g((()=>[k(I(e.fullName),1)])),_:2},1024),b(r,{class:"u-flex u-flex-wrap"},{default:g((()=>[(y(!0),x(F,null,C(e.children,((e,s)=>(y(),f(r,{class:"item u-flex-col u-col-center",key:s,onClick:s=>o.handelClick(e)},{default:g((()=>[b(d,{class:_(["u-font-40 item-icon",e.icon]),style:S({background:e.iconBackground||"#008cff"})},null,8,["class","style"]),b(d,{class:"u-font-24 u-line-1 item-text"},{default:g((()=>[k(I(e.fullName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:2},1024)])),_:2},1024)):L("",!0),!l.current||Array.isArray(e.children)&&e.children.length?L("",!0):(y(),f(c,{key:1}))])),_:2},1024)))),128)):(y(),f(c,{key:1}))])),_:1})])),_:1},8,["onDown","down","onUp","up","onInit"]),b(X,{modelValue:l.passwordShow,"onUpdate:modelValue":s[5]||(s[5]=e=>l.passwordShow=e),mode:"center",length:"auto"},{default:g((()=>[b(r,{class:"jnpf-wrap jnpf-wrap-workflow"},{default:g((()=>[b(G,{model:l.dataForm,rules:l.rules,ref:"dataForm","label-position":"left","label-width":"150","label-align":"left"},{default:g((()=>[b(J,{label:"旧密码",prop:"oldPassword",required:""},{default:g((()=>[b(H,{modelValue:l.dataForm.oldPassword,"onUpdate:modelValue":s[1]||(s[1]=e=>l.dataForm.oldPassword=e),placeholder:"旧密码",type:"password"},null,8,["modelValue"])])),_:1}),b(J,{label:"新密码",prop:"password",required:""},{default:g((()=>[b(H,{modelValue:l.dataForm.password,"onUpdate:modelValue":s[2]||(s[2]=e=>l.dataForm.password=e),placeholder:"新密码",type:"password"},null,8,["modelValue"])])),_:1}),b(J,{label:"重复密码",prop:"repeatPsd",required:""},{default:g((()=>[b(H,{modelValue:l.dataForm.repeatPsd,"onUpdate:modelValue":s[3]||(s[3]=e=>l.dataForm.repeatPsd=e),placeholder:"重复密码",type:"password"},null,8,["modelValue"])])),_:1}),b(J,{label:"验证码",prop:"code",required:""},{default:g((()=>[b(r,{class:"u-flex"},{default:g((()=>[b(H,{modelValue:l.dataForm.code,"onUpdate:modelValue":s[4]||(s[4]=e=>l.dataForm.code=e),placeholder:"验证码"},null,8,["modelValue"]),b(r,{style:{flex:"0.1"}},{default:g((()=>[b(z,{showLoading:!0,src:o.baseURL+l.imgUrl,width:"130px",height:"38px",onClick:o.changeCode},null,8,["src","onClick"])])),_:1})])),_:1})])),_:1}),b(W,{class:"buttom-btn",type:"primary",onClick:N(o.dataFormSubmit,["stop"])},{default:g((()=>[k(I("保存"))])),_:1},8,["onClick"])])),_:1},8,["model","rules"])])),_:1})])),_:1},8,["modelValue"]),b(X,{modelValue:l.showSelect,"onUpdate:modelValue":s[6]||(s[6]=e=>l.showSelect=e),mode:"top",class:"select-box"},{default:g((()=>[b(r,{style:S({"margin-top":l.statusBarHeight+44+"px"})},null,8,["style"]),(y(!0),x(F,null,C(l.userInfo.systemIds,((e,s)=>(y(),f(r,{key:s,class:"select-item",onClick:t=>o.selectItem(e,s)},{default:g((()=>[b(d,{class:_(["u-m-r-12 u-font-40",[e.icon,{currentItem:e.id===l.userInfo.appSystemId}]])},null,8,["class"]),b(d,{class:_(["item-text sysName",{currentItem:e.id===l.userInfo.appSystemId}])},{default:g((()=>[k(I(e.name),1)])),_:2},1032,["class"]),e.id===l.userInfo.appSystemId?(y(),f(Z,{key:0,name:"checkbox-mark ",class:"currentItem"})):L("",!0)])),_:2},1032,["onClick"])))),128))])),_:1},8,["modelValue"])])),_:1})}],["__scopeId","data-v-4d4889ea"]]);export{K as default};
-
zuoliyuan authored59858d0e