1 |
- !function(){var e=document.createElement("style");e.innerHTML=".ref-image[data-v-1dbe1c50]{height:150px;overflow:hidden;border:solid 1px #eee;border-radius:8px}.ref-image img[data-v-1dbe1c50]{width:auto;height:150px}.star[data-v-1dbe1c50]{position:relative}.xing[data-v-1dbe1c50]{position:absolute;top:10px;left:20px;color:red}.avatar-dropdown[data-v-410a8bc5]{display:flex;align-content:center;align-items:center;justify-content:center;justify-items:center}.avatar-dropdown .user-avatar[data-v-410a8bc5]{width:40px;height:40px;margin-left:15px;cursor:pointer;border-radius:50%}.avatar-dropdown .user-name[data-v-410a8bc5]{position:relative;display:flex;align-content:center;align-items:center;height:40px;margin-left:6px;line-height:40px;cursor:pointer}.avatar-dropdown .user-name [class*=ri-][data-v-410a8bc5]{margin-left:0!important}@media screen and (max-width: 800px){.avatar-dropdown .user-avatar[data-v-410a8bc5]{width:28px;height:28px;margin-left:12px}}.container[data-v-90f0a0e6]{min-height:100vh;background:url(/assets/bg-1920.51d60a49.png) center center fixed no-repeat;background-size:cover}.container .container-prop[data-v-90f0a0e6]{width:100%;background:linear-gradient(180deg,#eaf4ff 0%,rgba(234,244,255,0) 100%)}.container .container-prop .top-nav[data-v-90f0a0e6]{background:#fff;position:fixed;top:0;left:0;width:100%;height:80px;line-height:80px;min-width:375px}.container .container-prop .top-nav .nav[data-v-90f0a0e6]{padding:0 60px;display:flex;height:80px;align-items:center}.container .container-prop .top-nav .nav-title[data-v-90f0a0e6]{font-size:18px;font-weight:700;color:#333;flex:1}.container .container-prop .top-nav .logo[data-v-90f0a0e6]{display:flex;align-items:center;margin-right:16px}.container .container-prop .top-nav .logo img[data-v-90f0a0e6]{width:60px;height:60px}.container .container-prop .top-nav .exit[data-v-90f0a0e6]{display:flex;align-items:center}.container .container-prop .content[data-v-90f0a0e6]{width:77vw;margin:0 auto;display:flex;flex-wrap:wrap;padding-top:150px}.container .container-prop .content .content-item[data-v-90f0a0e6]{width:35vw;margin-right:7vw;margin-bottom:80px;border-radius:12px;height:12.5vw;overflow:hidden;font-size:38px;font-weight:700;color:#fff;line-height:12.5vw;text-align:center;cursor:pointer}.container .container-prop .content .icon_1[data-v-90f0a0e6]{background:url(/assets/icon_1.003cbd4a.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_2[data-v-90f0a0e6]{background:url(/assets/icon_2.8c2b5d7b.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_3[data-v-90f0a0e6]{background:url(/assets/icon_3.06088efb.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_4[data-v-90f0a0e6]{background:url(/assets/icon_4.bfe11a89.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .content-item[data-v-90f0a0e6]:nth-child(2n){margin-right:0!important}@media screen and (max-width: 800px){.container[data-v-90f0a0e6]{height:100vh}.container .container-prop[data-v-90f0a0e6]{height:100vh;width:100%;background:linear-gradient(180deg,#eaf4ff 0%,rgba(234,244,255,0) 100%)}.container .container-prop .top-nav[data-v-90f0a0e6]{background:#fff;position:fixed;top:0;left:0;width:100%;padding:0 12px;height:44px;line-height:44px;display:flex}.container .container-prop .top-nav .nav-title[data-v-90f0a0e6]{font-size:14px;font-weight:700;color:#333;flex:1}.container .container-prop .top-nav .logo[data-v-90f0a0e6]{display:flex;align-items:center;margin-right:16px}.container .container-prop .top-nav .logo img[data-v-90f0a0e6]{width:32px;height:32px}.container .container-prop .top-nav .exit[data-v-90f0a0e6]{display:flex;align-items:center}.container .container-prop .content[data-v-90f0a0e6]{width:100%;margin:0 auto;padding:68px 17px 24px}.container .container-prop .content .content-item[data-v-90f0a0e6]{width:100%;margin-bottom:20px;border-radius:12px;margin-right:0;height:110px;overflow:hidden;font-size:20px;font-weight:700;color:#fff;line-height:110px;text-align:center;cursor:pointer}.container .container-prop .content .icon_1[data-v-90f0a0e6]{background:url(/assets/icon_1.003cbd4a.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_2[data-v-90f0a0e6]{background:url(/assets/icon_2.8c2b5d7b.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_3[data-v-90f0a0e6]{background:url(/assets/icon_3.06088efb.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_4[data-v-90f0a0e6]{background:url(/assets/icon_4.bfe11a89.png);background-size:100% 100%;background-repeat:no-repeat}}\n",document.head.appendChild(e),System.register(["./request-legacy.37f30abe.js","./index-legacy.129cac73.js"],(function(e){"use strict";var t,a,o,n,i,r,s,d,c,l,p,g,h,u,m,f,v;return{setters:[function(e){t=e.a},function(e){a=e._,o=e.b,n=e.o,i=e.e,r=e.w,s=e.f,d=e.g,c=e.c,l=e.h,p=e.t,g=e.i,h=e.F,u=e.j,m=e.p,f=e.k,v=e.l}],execute:function(){const w={name:"MenuManagementEdit",data:()=>({form:{loginId:"",password:"",sure_pwd:""},surePwd:"",rules:{password:[{required:!0,trigger:"blur",message:"请输入密码"}],sure_pwd:[{required:!0,trigger:"blur",message:"请输入确认密码"}]},title:"",dialogFormVisible:!1}),created(){},methods:{async showEdit(){this.form.loginId=localStorage.getItem("satoken"),this.dialogFormVisible=!0},close(){this.$refs.form.resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1},save(){this.$refs.form.validate((async e=>{if(e){if(this.form.password!==this.form.sure_pwd)return void this.$message.warning("您输入的两次密码不一致,请重新输入");delete this.form.sure_pwd,await t.post("/sso/updatePW",this.form).then((e=>{this.$baseMessage("修改成功","success",!1,"vab-hey-message-success")})),this.close(),await this.logout().catch((e=>{console.error(e)}))}}))},async logout(){await t.post("/sso/logout",{loginId:localStorage.getItem("satoken")}).then((e=>{localStorage.removeItem("loginId"),localStorage.removeItem("satoken"),this.$router.push("/login")})).catch((e=>{console.error(e)}))}}},b=d("取 消"),x=d("确 定");const k={name:"VabAvatar",components:{changePwd:a(w,[["render",function(e,t,a,d,c,l){const p=o("el-input"),g=o("el-form-item"),h=o("el-form"),u=o("el-button"),m=o("el-dialog");return n(),i(m,{"append-to-body":"","close-on-click-modal":!1,title:c.title,modelValue:c.dialogFormVisible,"onUpdate:modelValue":t[2]||(t[2]=e=>c.dialogFormVisible=e),width:"40%",onClose:l.close},{footer:r((()=>[s(u,{onClick:l.close},{default:r((()=>[b])),_:1},8,["onClick"]),s(u,{type:"primary",onClick:l.save},{default:r((()=>[x])),_:1},8,["onClick"])])),default:r((()=>[s(h,{ref:"form","label-width":"100px",model:c.form,rules:c.rules},{default:r((()=>[s(g,{label:"新密码:",prop:"password"},{default:r((()=>[s(p,{modelValue:c.form.password,"onUpdate:modelValue":t[0]||(t[0]=e=>c.form.password=e),"show-password":"",type:"password"},null,8,["modelValue"])])),_:1}),s(g,{label:"确认密码:",prop:"sure_pwd"},{default:r((()=>[s(p,{modelValue:c.form.sure_pwd,"onUpdate:modelValue":t[1]||(t[1]=e=>c.form.sure_pwd=e),"show-password":"",type:"password"},null,8,["modelValue"])])),_:1})])),_:1},8,["model","rules"])])),_:1},8,["title","modelValue","onClose"])}],["__scopeId","data-v-1dbe1c50"]])},data:()=>({active:!1,avatar:"",username:""}),created(){localStorage.getItem("satoken")?this.getUser():this.$router.push("/login")},methods:{handleCommand(e){switch(e){case"logout":this.logout();break;case"password":this.$refs.changePwd.showEdit()}},handleVisibleChange(e){this.active=e},async logout(){await t.post("/sso/logout",{loginId:localStorage.getItem("satoken")}).then((e=>{localStorage.removeItem("loginId"),localStorage.removeItem("satoken"),this.$router.push("/login")})).catch((e=>{console.error(e)}))},async getUser(){this.listLoading=!0,await t.post("/sso/userInfo",{loginId:localStorage.getItem("satoken")}).then((e=>{console.log(e.data,"-----------xvxvxvvxvv");const t=e.data.data;this.username=t.username,this.avatar=t.avatar,this.listLoading=!1})).catch((e=>{console.error(e)}))}}},_={class:"avatar-dropdown"},y={class:"avatar-dropdown"},I={class:"user-name"},L={class:"hidden-xs-only"},V=d(" 修改密码 "),C=d(" 退出登录 ");const S={name:"Home",components:{VabAvatar:a(k,[["render",function(e,t,a,i,d,g){const h=o("el-avatar"),u=o("el-icon-ArrowDown"),m=o("el-icon"),f=o("el-icon-Edit"),v=o("el-dropdown-item"),w=o("el-icon-Setting"),b=o("el-dropdown-menu"),x=o("el-dropdown"),k=o("changePwd");return n(),c("div",_,[s(x,{onCommand:g.handleCommand,onVisibleChange:g.handleVisibleChange},{dropdown:r((()=>[s(b,null,{default:r((()=>[s(v,{command:"password"},{default:r((()=>[s(m,{class:"el-icon-edit"},{default:r((()=>[s(f)])),_:1}),V])),_:1}),s(v,{command:"logout"},{default:r((()=>[s(m,null,{default:r((()=>[s(w)])),_:1}),C])),_:1})])),_:1})])),default:r((()=>[l("span",y,[s(h,{class:"user-avatar",src:d.avatar},null,8,["src"]),l("div",I,[l("span",L,p(d.username),1),s(m,{class:"el-icon--right",style:{position:"relative",top:"2px"}},{default:r((()=>[s(u)])),_:1})])])])),_:1},8,["onCommand","onVisibleChange"]),s(k,{ref:"changePwd"},null,512)])}],["__scopeId","data-v-410a8bc5"]])},data:()=>({list:[],webList:[],isLogin:!1,screenWidth:"",settingStore:g()}),async created(){localStorage.getItem("satoken")?(await this.docheckIsLogin(),this.isLogin?(console.log(this.isLogin,"this.isLoginthis.isLoginthis.isLoginthis.isLogin"),await this.doGetClientLists()):(localStorage.removeItem("loginId"),localStorage.removeItem("satoken"),this.$router.push("/login"))):this.$router.push("/login")},mounted(){this.screenWidth=document.body.clientWidth,window.onresize=()=>(()=>{this.screenWidth=document.body.clientWidth,this.screenWidth>500?this.list=this.webList.filter((e=>0==e.deviceType)):this.list=this.webList.filter((e=>1==e.deviceType))})()},methods:{async docheckIsLogin(){let e={keyword:localStorage.getItem("satoken")};await t.post("/sso/getList",e).then((e=>{console.log(e.data,"-----------xvxvxvvxvv");const t=e.data.data;console.log(t.length,"-----------xvxvxvvxvv"),this.isLogin=!!t.length})).catch((e=>{console.error(e)}))},skipUrl(e){window.open(e+"?loginId="+localStorage.getItem("satoken"),"_blank")},async doGetClientLists(){let e={loginId:localStorage.getItem("satoken")};await t.post("/sso/getClientList",e).then((e=>{console.log(e.data,"-----------cccc");const t=e.data.data;this.list=t,this.webList=t})).catch((e=>{console.error(e)})),console.log(this.IsPhone(),"this.IsPhone()"),this.IsPhone()?this.list=this.webList.filter((e=>1==e.deviceType)):this.list=this.webList.filter((e=>0==e.deviceType))},IsPhone(){var e=navigator.userAgent;return/mobile/i.test(e)}}},z={class:"container"},$={class:"container-prop"},P={class:"top-nav"},F={class:"nav"},U=(e=>(m("data-v-90f0a0e6"),e=e(),f(),e))((()=>l("div",{class:"logo"},[l("img",{mode:"widthFix",src:"/assets/logo-bencao.f0d81966.png"})],-1))),W={class:"nav-title"},j={class:"exit"},A={class:"content"},E=["onClick"],T={key:0,class:"icon_1"},M={key:1,class:"icon_2"},q={key:2,class:"icon_3"},G={key:3,class:"icon_4"};e("default",a(S,[["render",function(e,t,a,i,r,d){const g=o("VabAvatar");return n(),c("div",z,[l("div",$,[l("div",P,[l("div",F,[U,l("div",W,p(r.settingStore.title),1),l("div",j,[s(g)])])]),l("div",A,[(n(!0),c(h,null,u(r.list,((e,t)=>(n(),c("div",{key:t,class:"content-item",onClick:t=>d.skipUrl(e.allowUrl)},[t%4==0?(n(),c("div",T,p(e.name),1)):v("",!0),t%4==1?(n(),c("div",M,p(e.name),1)):v("",!0),t%4==2?(n(),c("div",q,p(e.name),1)):v("",!0),t%4==3?(n(),c("div",G,p(e.name),1)):v("",!0)],8,E)))),128))])])])}],["__scopeId","data-v-90f0a0e6"]]))}}}))}();
|