index-legacy.5665ae01.js 15 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML=".ref-image[data-v-6a8000b7]{height:150px;overflow:hidden;border:solid 1px #eee;border-radius:8px}.ref-image img[data-v-6a8000b7]{width:auto;height:150px}.star[data-v-6a8000b7]{position:relative}.xing[data-v-6a8000b7]{position:absolute;top:10px;left:20px;color:red}.ref-image[data-v-f6affa38]{height:150px;overflow:hidden;border:solid 1px #eee;border-radius:8px}.ref-image img[data-v-f6affa38]{width:auto;height:150px}.star[data-v-f6affa38]{position:relative}.xing[data-v-f6affa38]{position:absolute;top:10px;left:20px;color:red}.avatar-dropdown[data-v-6b51fae7]{display:flex;align-content:center;align-items:center;justify-content:center;justify-items:center}.avatar-dropdown .user-avatar[data-v-6b51fae7]{width:40px;height:40px;margin-left:15px;cursor:pointer;border-radius:50%}.avatar-dropdown .user-name[data-v-6b51fae7]{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-6b51fae7]{margin-left:0!important}@media screen and (max-width: 800px){.avatar-dropdown .user-avatar[data-v-6b51fae7]{width:28px;height:28px;margin-left:12px}}.container[data-v-f9505d6c]{min-height:100vh;background:url(/assets/bg-1920.51d60a49.png) center center fixed no-repeat;background-size:cover}.container .container-prop[data-v-f9505d6c]{width:100%;background:linear-gradient(180deg,#eaf4ff 0%,rgba(234,244,255,0) 100%)}.container .container-prop .top-nav[data-v-f9505d6c]{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-f9505d6c]{padding:0 60px;display:flex;height:80px;align-items:center}.container .container-prop .top-nav .nav-title[data-v-f9505d6c]{font-size:18px;font-weight:700;color:#333;flex:1}.container .container-prop .top-nav .logo[data-v-f9505d6c]{display:flex;align-items:center;margin-right:16px}.container .container-prop .top-nav .logo img[data-v-f9505d6c]{width:60px;height:60px}.container .container-prop .top-nav .exit[data-v-f9505d6c]{display:flex;align-items:center}.container .container-prop .content[data-v-f9505d6c]{width:77vw;margin:0 auto;display:flex;flex-wrap:wrap;padding-top:150px}.container .container-prop .content .content-item[data-v-f9505d6c]{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-f9505d6c]{background:url(/assets/icon_1.003cbd4a.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_2[data-v-f9505d6c]{background:url(/assets/icon_2.8c2b5d7b.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_3[data-v-f9505d6c]{background:url(/assets/icon_3.06088efb.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_4[data-v-f9505d6c]{background:url(/assets/icon_4.bfe11a89.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .content-item[data-v-f9505d6c]:nth-child(2n){margin-right:0!important}@media screen and (max-width: 800px){.container[data-v-f9505d6c]{height:100vh}.container .container-prop[data-v-f9505d6c]{height:100vh;width:100%;background:linear-gradient(180deg,#eaf4ff 0%,rgba(234,244,255,0) 100%)}.container .container-prop .top-nav[data-v-f9505d6c]{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-f9505d6c]{font-size:14px;font-weight:700;color:#333;flex:1}.container .container-prop .top-nav .logo[data-v-f9505d6c]{display:flex;align-items:center;margin-right:16px}.container .container-prop .top-nav .logo img[data-v-f9505d6c]{width:32px;height:32px}.container .container-prop .top-nav .exit[data-v-f9505d6c]{display:flex;align-items:center}.container .container-prop .content[data-v-f9505d6c]{width:100%;margin:0 auto;padding:68px 17px 24px}.container .container-prop .content .content-item[data-v-f9505d6c]{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-f9505d6c]{background:url(/assets/icon_1.003cbd4a.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_2[data-v-f9505d6c]{background:url(/assets/icon_2.8c2b5d7b.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_3[data-v-f9505d6c]{background:url(/assets/icon_3.06088efb.png);background-size:100% 100%;background-repeat:no-repeat}.container .container-prop .content .icon_4[data-v-f9505d6c]{background:url(/assets/icon_4.bfe11a89.png);background-size:100% 100%;background-repeat:no-repeat}}\n",document.head.appendChild(e),System.register(["./request-legacy.7c9d50c8.js","./index-legacy.b1b66c39.js"],(function(e){"use strict";var t,a,o,n,i,r,l,s,d,c,p,g,u,m,f,h,v,b;return{setters:[function(e){t=e.a},function(e){a=e._,o=e.E,n=e.b,i=e.o,r=e.e,l=e.w,s=e.f,d=e.g,c=e.c,p=e.h,g=e.t,u=e.i,m=e.F,f=e.j,h=e.p,v=e.k,b=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=>{o.success(e.data.msg)})),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)}))}}},x=d("取 消"),k=d("确 定");var _=a(w,[["render",function(e,t,a,o,d,c){const p=n("el-input"),g=n("el-form-item"),u=n("el-form"),m=n("el-button"),f=n("el-dialog");return i(),r(f,{"append-to-body":"","close-on-click-modal":!1,title:d.title,modelValue:d.dialogFormVisible,"onUpdate:modelValue":t[2]||(t[2]=e=>d.dialogFormVisible=e),width:"40%",onClose:c.close},{footer:l((()=>[s(m,{onClick:c.close},{default:l((()=>[x])),_:1},8,["onClick"]),s(m,{type:"primary",onClick:c.save},{default:l((()=>[k])),_:1},8,["onClick"])])),default:l((()=>[s(u,{ref:"form","label-width":"100px",model:d.form,rules:d.rules},{default:l((()=>[s(g,{label:"新密码:",prop:"password"},{default:l((()=>[s(p,{modelValue:d.form.password,"onUpdate:modelValue":t[0]||(t[0]=e=>d.form.password=e),"show-password":"",type:"password"},null,8,["modelValue"])])),_:1}),s(g,{label:"确认密码:",prop:"sure_pwd"},{default:l((()=>[s(p,{modelValue:d.form.sure_pwd,"onUpdate:modelValue":t[1]||(t[1]=e=>d.form.sure_pwd=e),"show-password":"",type:"password"},null,8,["modelValue"])])),_:1})])),_:1},8,["model","rules"])])),_:1},8,["title","modelValue","onClose"])}],["__scopeId","data-v-6a8000b7"]]);const y={name:"MenuManagementEdit",data:()=>({form:{username:"",name:"",avatar:"",intro:null,age:null,sex:null,phone:null,email:null},rules:{username:[{required:!0,trigger:"blur",message:""}],name:[{required:!0,trigger:"blur",message:"请输入昵称"}]},title:"个人中心",dialogFormVisible:!1,loginId:""}),created(){},methods:{async showEdit(){this.form.id=localStorage.getItem("satoken"),await t.post("/SysUserAcc/getById",{id:this.form.id}).then((e=>{this.form=e.data.data})),this.dialogFormVisible=!0},close(){this.$refs.form.resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("child-event")},save(){this.$refs.form.validate((async e=>{e&&await t.post("/SysUserAcc/update",this.form).then((e=>{o.success(e.data.msg),this.close()}))}))}}},V=d("男"),I=d("女"),C=d("取 消"),L=d("确 定");const S={name:"VabAvatar",components:{changePwd:_,userDetails:a(y,[["render",function(e,t,a,o,d,c){const p=n("el-input"),g=n("el-form-item"),u=n("in-input"),m=n("el-radio"),f=n("el-radio-group"),h=n("el-form"),v=n("el-button"),b=n("el-dialog");return i(),r(b,{"append-to-body":"","close-on-click-modal":!1,title:d.title,modelValue:d.dialogFormVisible,"onUpdate:modelValue":t[8]||(t[8]=e=>d.dialogFormVisible=e),width:"40%",onClose:c.close},{footer:l((()=>[s(v,{onClick:c.close},{default:l((()=>[C])),_:1},8,["onClick"]),s(v,{type:"primary",onClick:c.save},{default:l((()=>[L])),_:1},8,["onClick"])])),default:l((()=>[s(h,{ref:"form","label-width":"100px",model:d.form,rules:d.rules},{default:l((()=>[s(g,{label:"账号:",prop:"username"},{default:l((()=>[s(p,{modelValue:d.form.username,"onUpdate:modelValue":t[0]||(t[0]=e=>d.form.username=e),disabled:""},null,8,["modelValue"])])),_:1}),s(g,{label:"昵称:",prop:"name"},{default:l((()=>[s(p,{modelValue:d.form.name,"onUpdate:modelValue":t[1]||(t[1]=e=>d.form.name=e)},null,8,["modelValue"])])),_:1}),s(u,{type:"img",name:"用户头像:",modelValue:d.form.avatar,"onUpdate:modelValue":t[2]||(t[2]=e=>d.form.avatar=e)},null,8,["modelValue"]),s(g,{label:"性别"},{default:l((()=>[s(f,{modelValue:d.form.sex,"onUpdate:modelValue":t[3]||(t[3]=e=>d.form.sex=e)},{default:l((()=>[s(m,{label:1},{default:l((()=>[V])),_:1}),s(m,{label:2},{default:l((()=>[I])),_:1})])),_:1},8,["modelValue"])])),_:1}),s(g,{label:"年龄"},{default:l((()=>[s(p,{type:"number",modelValue:d.form.age,"onUpdate:modelValue":t[4]||(t[4]=e=>d.form.age=e)},null,8,["modelValue"])])),_:1}),s(g,{label:"手机号",prop:"phone"},{default:l((()=>[s(p,{modelValue:d.form.phone,"onUpdate:modelValue":t[5]||(t[5]=e=>d.form.phone=e)},null,8,["modelValue"])])),_:1}),s(g,{label:"邮箱"},{default:l((()=>[s(p,{modelValue:d.form.email,"onUpdate:modelValue":t[6]||(t[6]=e=>d.form.email=e)},null,8,["modelValue"])])),_:1}),s(g,{label:"简介"},{default:l((()=>[s(p,{modelValue:d.form.intro,"onUpdate:modelValue":t[7]||(t[7]=e=>d.form.intro=e),rows:3,type:"textarea"},null,8,["modelValue"])])),_:1})])),_:1},8,["model","rules"])])),_:1},8,["title","modelValue","onClose"])}],["__scopeId","data-v-f6affa38"]])},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();break;case"user":this.$refs.userDetails.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)}))}}},U={class:"avatar-dropdown"},$={class:"avatar-dropdown"},z={class:"user-name"},F={class:"hidden-xs-only"},E=d(" 个人中心 "),P=d(" 修改密码 "),A=d(" 退出登录 ");const W={name:"Home",components:{VabAvatar:a(S,[["render",function(e,t,a,o,r,d){const u=n("el-avatar"),m=n("el-icon-ArrowDown"),f=n("el-icon"),h=n("el-icon-User"),v=n("el-dropdown-item"),b=n("el-icon-Edit"),w=n("el-icon-Setting"),x=n("el-dropdown-menu"),k=n("el-dropdown"),_=n("changePwd"),y=n("userDetails");return i(),c("div",U,[s(k,{onCommand:d.handleCommand,onVisibleChange:d.handleVisibleChange},{dropdown:l((()=>[s(x,null,{default:l((()=>[s(v,{command:"user"},{default:l((()=>[s(f,{class:"el-icon-edit"},{default:l((()=>[s(h)])),_:1}),E])),_:1}),s(v,{command:"password"},{default:l((()=>[s(f,{class:"el-icon-edit"},{default:l((()=>[s(b)])),_:1}),P])),_:1}),s(v,{command:"logout"},{default:l((()=>[s(f,null,{default:l((()=>[s(w)])),_:1}),A])),_:1})])),_:1})])),default:l((()=>[p("span",$,[s(u,{class:"user-avatar",src:r.avatar},null,8,["src"]),p("div",z,[p("span",F,g(r.username),1),s(f,{class:"el-icon--right",style:{position:"relative",top:"2px"}},{default:l((()=>[s(m)])),_:1})])])])),_:1},8,["onCommand","onVisibleChange"]),s(_,{ref:"changePwd"},null,512),s(y,{ref:"userDetails",onChildEvent:d.getUser},null,8,["onChildEvent"])])}],["__scopeId","data-v-6b51fae7"]])},data:()=>({list:[],webList:[],isLogin:!1,screenWidth:"",settingStore:u()}),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/getListServer",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)}}},j={class:"container"},q={class:"container-prop"},D={class:"top-nav"},M={class:"nav"},T=(e=>(h("data-v-f9505d6c"),e=e(),v(),e))((()=>p("div",{class:"logo"},[p("img",{mode:"widthFix",src:"/assets/logo-bencao.f0d81966.png"})],-1))),G={class:"nav-title"},H={class:"exit"},B={class:"content"},J=["onClick"],K={key:0,class:"icon_1"},N={key:1,class:"icon_2"},O={key:2,class:"icon_3"},Q={key:3,class:"icon_4"};e("default",a(W,[["render",function(e,t,a,o,r,l){const d=n("VabAvatar");return i(),c("div",j,[p("div",q,[p("div",D,[p("div",M,[T,p("div",G,g(r.settingStore.title),1),p("div",H,[s(d)])])]),p("div",B,[(i(!0),c(m,null,f(r.list,((e,t)=>(i(),c("div",{key:t,class:"content-item",onClick:t=>l.skipUrl(e.allowUrl)},[t%4==0?(i(),c("div",K,g(e.name),1)):b("",!0),t%4==1?(i(),c("div",N,g(e.name),1)):b("",!0),t%4==2?(i(),c("div",O,g(e.name),1)):b("",!0),t%4==3?(i(),c("div",Q,g(e.name),1)):b("",!0)],8,J)))),128))])])])}],["__scopeId","data-v-f9505d6c"]]))}}}))}();