ss-component-new 1.1.742 → 1.1.744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-BLkUDg9-.cjs +1 -0
- package/dist/{index-D5r-9e8N.cjs → index-C1c2vlrf.cjs} +1 -1
- package/dist/{index-BcVfoBWY.js → index-ChgK1fVm.js} +131 -125
- package/dist/{index-Bxd155-g.js → index-CryPt3m6.js} +3 -3
- package/dist/{index-CbvJGzNQ.cjs → index-DUMlhhlR.cjs} +1 -1
- package/dist/{index-erHTEnTe.js → index-vpRMBJ9R.js} +12 -12
- package/dist/{index.vue_vue_type_style_index_0_scoped_c5e0115b_lang-Au5fVfKN.js → index.vue_vue_type_style_index_0_scoped_8bb4b740_lang-BpLgxvsN.js} +232 -218
- package/dist/{index.vue_vue_type_style_index_0_scoped_c5e0115b_lang-CN2oYxtZ.cjs → index.vue_vue_type_style_index_0_scoped_8bb4b740_lang-PODk4bXU.cjs} +4 -4
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +1 -1
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +2 -2
- package/package.json +1 -1
- package/dist/index-D5gg08d3.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");require("./index-DLzfn6r-.cjs");const h=require("./index.vue_vue_type_style_index_1_lang-BH0_LUL8.cjs");require("./array-B43Itsl4.cjs");const C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./index.vue_vue_type_style_index_0_scoped_c81d0427_lang--PhJifi0.cjs");require("./index.vue_vue_type_style_index_0_scoped_8bb4b740_lang-PODk4bXU.cjs");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cnqkd37w.cjs");require("./index-BKUqLOwQ.cjs");require("./STLLoader-BxpEhvEg.cjs");require("./index-DZiy-zVX.cjs");require("./index-WyEFC8on.cjs");require("vue-router");require("./index-A3XI5bPW.cjs");const S={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},systemInfo:{type:Object,default:()=>{}},systemKey:{type:String,default:""},pathContent:{type:String,default:""},mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},nodeDev:{type:String,default:""},pageKey:{type:String,default:""}},emits:["buildContent","openThreeBuild","threeData"],setup(o,{emit:c}){const e=o,i=c,d=h.useLoginState();n.watch(()=>e==null?void 0:e.systemKey,t=>{d.setSystemKey(t),t!==""&&sessionStorage.setItem("systemKey",t)},{immediate:!0}),n.watch(()=>e==null?void 0:e.systemInfo,t=>{d.setSystemInfo(t)},{immediate:!0});const l=()=>{i("buildContent")},y=()=>{i("setLoginInfo")},f=t=>{i("openThreeBuild",t)},m=t=>{i("threeData",t)},s=()=>{var r;const t=e!=null&&e.windowConfig?(r=e==null?void 0:e.windowConfig)==null?void 0:r.width:window.innerWidth,a=1920,u=16,g=t/a,w=u*g;document.documentElement.style.fontSize=`${w}px`};return n.onMounted(()=>{s(),window.addEventListener("resize",s)}),(t,a)=>{const u=n.resolveComponent("router-view");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(u,{mode:e==null?void 0:e.mode,content:e==null?void 0:e.content,jsonContents:e==null?void 0:e.jsonContents,pathContent:e==null?void 0:e.pathContent,showButton:e==null?void 0:e.showButton,nodeDev:e==null?void 0:e.nodeDev,windowConfig:o.windowConfig,systemInfo:o.systemInfo,"old-systemKey":o.systemKey,onBuildContent:l,onOpenThreeBuild:f,pageKey:o.pageKey,onThreeData:m,onSetLoginInfo:y},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","systemInfo","old-systemKey","pageKey"])])}}},v=C._export_sfc(S,[["__scopeId","data-v-40fecf54"]]);exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=require("./index.vue_vue_type_style_index_1_lang-BH0_LUL8.cjs"),F=require("vue-router"),m=require("./index-BKUqLOwQ.cjs"),W=require("./index-A3XI5bPW.cjs"),H=require("./crypto-CRbcEKIz.cjs"),k=require("./index-Dp2hVs-k.cjs"),z={},ee={class:"left-wrap"},te={class:"left-bg"};function ae(v,E){return e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.renderSlot(v.$slots,"img",{},void 0,!0)])])}const ne=T._export_sfc(z,[["render",ae],["__scopeId","data-v-9b7ee6c9"]]),oe={class:"right-wrap"},re={class:"right-title"},se={class:"right-content"},ce={class:"tab-content"},le={class:"tab-tips"},ie=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(v,{emit:E}){const b=e.ref("account"),u=E,C=()=>{u("clickLogin",b.value)},A=()=>{u("handleTabClick",b.value)};return(p,h)=>{const i=e.resolveComponent("el-button"),f=e.resolveComponent("el-tab-pane"),w=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",re,[e.renderSlot(p.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",se,[e.createVNode(w,{modelValue:b.value,"onUpdate:modelValue":h[0]||(h[0]=I=>b.value=I),class:"right-tabs",onTabClick:A},{default:e.withCtx(()=>[e.createVNode(f,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(p.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.renderSlot(p.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:C},[e.createVNode(i,{loading:v.loading},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"tabButton2",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",le,[e.renderSlot(p.$slots,"tabTips2",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])])}}}),de=T._export_sfc(ie,[["__scopeId","data-v-3ebcb6e2"]]),ue={class:"account-wrap"},pe=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(v,{emit:E}){const b=v,u=e.reactive({account:"",password:""}),C=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),A=e.ref(null),p=E;return e.watch(()=>b.isClickLogin,h=>{var i;h&&((i=A.value)==null||i.validate(f=>{p("handleLoginFormChange",f,f?u:null)}))},{immediate:!0}),e.watch(()=>b.activeTabName,h=>{var i;h&&((i=A.value)==null||i.resetFields())}),(h,i)=>{const f=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-input"),I=e.resolveComponent("el-form-item"),K=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(K,{model:u,rules:C,ref_key:"formRef",ref:A},{default:e.withCtx(()=>[e.createVNode(I,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:u.account,"onUpdate:modelValue":i[0]||(i[0]=N=>u.account=N),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(f,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(I,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:u.password,"onUpdate:modelValue":i[1]||(i[1]=N=>u.password=N),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(f,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),fe=T._export_sfc(pe,[["__scopeId","data-v-b023e8c1"]]),ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",Ae={class:"card-wrap"},he={class:"card-icon card"},me={class:"card-input"},be={class:"card-icon info"},ve=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(v,{emit:E}){const b=v,u=e.ref(""),C=E,A=p=>{C("handleCardInput",p)};return e.watch(()=>b.activeTabName,p=>{p&&(u.value="")}),(p,h)=>{const i=e.resolveComponent("el-image"),f=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",he,[e.createVNode(i,{src:e.unref(ye),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",me,[e.createVNode(f,{modelValue:u.value,"onUpdate:modelValue":h[0]||(h[0]=w=>u.value=w),onChange:A,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",be,[e.createVNode(i,{src:e.unref(ge),fit:"contain"},null,8,["src"])])])}}}),_e=T._export_sfc(ve,[["__scopeId","data-v-23f91251"]]);function Ce(){const v={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return m.service({url:"/api/sysAuth/login",method:"post",data:v})}const we={class:"login-wrap"},Ee={class:"login-body"},Ne={class:"login-body-item left"},Se={class:"title"},ke={class:"login-body-item right"},Ie=e.defineComponent({__name:"index",emits:["change"],setup(v,{emit:E}){const b=F.useRouter(),u=M.useLoginState(M.pinia),{systemKey:C,systemInfo:A}=M.storeToRefs(u),p=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"刷卡登录",btnLabel:"请刷卡登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"用户名登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),h=e.ref(""),i=e.ref(!1),f=e.ref(!1),w=()=>{i.value=!0},I=t=>{i.value=!1,L(t)},K=(t,n)=>{i.value=!1,t&&L(n)},N=t=>k.getFirstArrayProperty(t),U=t=>{let n;const o=k.convertArrayToTree(t),r=k.addPathToTree(o),d=k.getLeafNodesRecursive(r),y=k.groupByField(d,"parentPath");return n=k.handleRowAuthorityRender(y),n},Q=(t,n)=>{var r,d,y;const o=(n==null?void 0:n.userRoles)??(n==null?void 0:n.角色名称);try{if(n.layer&&((r=n==null?void 0:n.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(o)){if((o==null?void 0:o.length)===1){const s=t==null?void 0:t.find(a=>(a==null?void 0:a.roleName)===(o==null?void 0:o[0])||a.角色名称===(o==null?void 0:o[0])),g=N(s),c=U(s==null?void 0:s[g]);return s&&c&&Array.isArray(c)?s?c==null?void 0:c.flatMap(a=>a.checkedButtons):[]:[]}if((o==null?void 0:o.length)>1){let s=t==null?void 0:t.filter(a=>o==null?void 0:o.includes(a.roleName||(a==null?void 0:a.角色名称)));const g=N(s==null?void 0:s[0]),c=(y=(d=s==null?void 0:s.map(a=>Array.isArray(a==null?void 0:a[g])?a==null?void 0:a[g]:[]))==null?void 0:d.flat())==null?void 0:y.flatMap(a=>a.checkedButtons);return(c==null?void 0:c.length)===0?m.ElMessage.error("该用户没有权限,请联系管理员"):new Set(c)}}if(typeof o=="string"){const s=t==null?void 0:t.find(a=>(a==null?void 0:a.roleName)===o||(a==null?void 0:a.角色名称)===o),g=N(s),c=U(s==null?void 0:s[g]);return s&&c&&Array.isArray(c)?s?c==null?void 0:c.flatMap(a=>a.checkedButtons):[]:[]}}catch(s){throw new Error(s)}},q=async t=>{var n,o;try{let r=[];const d=await m.getInsofDataApi({key:{systemKey:t==null?void 0:t.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(d.data.code===200){const y=(o=(n=d.data)==null?void 0:n.result)==null?void 0:o.map(s=>s.value.tableData);r=Q(y,t)}if(r)return Array.isArray(r)?Array.from(r):r;throw m.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(r){throw m.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(r)}},O=async t=>{var n,o,r,d,y,s,g;try{let c=[],a,S,x;C.value?x={pageKey:"系统管理/用户管理",type:"data",systemKey:C.value}:x={pageKey:"系统管理/用户管理",type:"data"};const R=await m.getInsofDataApi({key:x}),D=await m.getInsofDataApi({key:{layer:"superAdmin"}});if(R.data.code===200&&D.data.code===200){const $=(o=(n=D.data)==null?void 0:n.result)==null?void 0:o.map(l=>{var _,V;return{...l.value.tableData,layer:(_=l.key)==null?void 0:_.layer,systemKey:(V=l==null?void 0:l.key)==null?void 0:V.systemKey,id:l.id}}),j=(d=(r=R.data)==null?void 0:r.result)==null?void 0:d.map(l=>{var _,V;return{...l.value.tableData,layer:(_=l.key)==null?void 0:_.layer,systemKey:(V=l==null?void 0:l.key)==null?void 0:V.systemKey,id:l.id}}),B=[...$,...j];if(a=B==null?void 0:B.find(l=>(l==null?void 0:l.account)===(t==null?void 0:t.account)||(l==null?void 0:l.账号)===(t==null?void 0:t.account)),a){if(((y=a.layer)==null?void 0:y.toUpperCase())!=="SUPERADMIN"&&(!(a!=null&&a.状态)||(a==null?void 0:a.状态)==="禁用"||(a==null?void 0:a.status)==="禁用")){m.ElMessage.error("该用户已被禁用,请联系管理员"),f.value=!1;return}c=await q(a);const{privateKey:l}=await u.getModelSecretAsync(a);let _;if(a.password?_=((s=a.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN"?a.password:H.decryptData(a.password,l):_=((g=a.layer)==null?void 0:g.toUpperCase())==="SUPERADMIN"?a.password:k.resetPassword,(t==null?void 0:t.password)===_)S=a;else throw S=null,m.ElMessage.error("输入的密码错误,请重新输入"),f.value=!1,new Error("输入的密码错误,请重新输入")}}return S&&c?{matchedUser:S,userAuthority:c}:void 0}catch(c){throw new Error(c)}},J=async t=>{var o,r;const n=await O(t);if(n!=null&&n.matchedUser){u.setLoginUserInfo(n.matchedUser),sessionStorage.setItem("authority",JSON.stringify(n.userAuthority));const d=((r=(o=n.matchedUser)==null?void 0:o.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(d)),await X(n.matchedUser),!0}else throw f.value=!1,m.ElMessage.error("该用户不存在,请重新输入"),new Error("该用户不存在,请重新输入")},X=async t=>{var o,r,d,y,s,g,c,a,S;const n=await m.getInsofDataApi({key:{layer:"superAdmin",systemKey:t==null?void 0:t.systemKey}});if(n.data.code===200&&(o=n.data)!=null&&o.result&&Array.isArray((r=n.data)==null?void 0:r.result)&&((y=(d=n.data)==null?void 0:d.result)==null?void 0:y.length)>0){const x=(S=(a=(c=(g=(s=n.data)==null?void 0:s.result)==null?void 0:g[0])==null?void 0:c.value)==null?void 0:a.tableData)==null?void 0:S.account;u.setSuperAdminInfo({account:x})}},G=async()=>{var t,n,o;try{const r=await Ce();return((t=r==null?void 0:r.data)==null?void 0:t.code)===200?(sessionStorage.setItem("loginToken",(o=(n=r.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(r){m.ElMessage.error(r)}},Z=async()=>{var t,n,o;try{const r=await m.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((t=r==null?void 0:r.data)==null?void 0:t.code)===200?(sessionStorage.setItem("magicToken",(o=(n=r.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(r){m.ElMessage.error(r)}},L=async t=>{f.value=!0;let n=[J(t),G(),Z()];const o=await Promise.all(n);(o==null?void 0:o.every(d=>d))&&(W.verifyStructureDataToStore(),b.push("/"),u.setLogRecordAsync({type:"登录",data:{account:t==null?void 0:t.account}},"/login","login"))},Y=t=>{h.value=t,i.value=!1,f.value=!1},P=t=>/^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(t);return(t,n)=>(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",Ee,[e.createElementVNode("div",Ne,[e.createVNode(ne,{class:"login-left-bg"},{img:e.withCtx(()=>{var o,r,d,y,s,g;return[e.createElementVNode("div",Se,[e.createElementVNode("div",null,e.toDisplayString((o=e.unref(A))!=null&&o.EnglishName&&P((r=e.unref(A))==null?void 0:r.EnglishName)?(d=e.unref(A))==null?void 0:d.EnglishName:"INSOFWORKS"),1),e.createElementVNode("div",null,e.toDisplayString((y=e.unref(A))!=null&&y.chineseName&&P((s=e.unref(A))==null?void 0:s.chineseName)?(g=e.unref(A))==null?void 0:g.chineseName:"工业软件集成开发平台"),1)]),n[0]||(n[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",ke,[e.createVNode(de,{loading:f.value,onClickLogin:w,onHandleTabClick:Y},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(_e,{activeTabName:h.value,onHandleCardInput:I},null,8,["activeTabName"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(fe,{activeTabName:h.value,isClickLogin:i.value,onHandleLoginFormChange:K},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),xe=T._export_sfc(Ie,[["__scopeId","data-v-0a51bb7c"]]);exports.default=xe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=require("./index.vue_vue_type_style_index_1_lang-BH0_LUL8.cjs"),F=require("vue-router"),m=require("./index-BKUqLOwQ.cjs"),W=require("./index-A3XI5bPW.cjs"),H=require("./crypto-CRbcEKIz.cjs"),k=require("./index-Dp2hVs-k.cjs"),z={},ee={class:"left-wrap"},te={class:"left-bg"};function ae(v,E){return e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.renderSlot(v.$slots,"img",{},void 0,!0)])])}const ne=T._export_sfc(z,[["render",ae],["__scopeId","data-v-9b7ee6c9"]]),oe={class:"right-wrap"},se={class:"right-title"},re={class:"right-content"},ce={class:"tab-content"},le={class:"tab-tips"},ie=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(v,{emit:E}){const b=e.ref("account"),u=E,C=()=>{u("clickLogin",b.value)},A=()=>{u("handleTabClick",b.value)};return(p,h)=>{const i=e.resolveComponent("el-button"),f=e.resolveComponent("el-tab-pane"),w=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",se,[e.renderSlot(p.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",re,[e.createVNode(w,{modelValue:b.value,"onUpdate:modelValue":h[0]||(h[0]=I=>b.value=I),class:"right-tabs",onTabClick:A},{default:e.withCtx(()=>[e.createVNode(f,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(p.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.renderSlot(p.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:C},[e.createVNode(i,{loading:v.loading},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"tabButton2",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",le,[e.renderSlot(p.$slots,"tabTips2",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])])}}}),de=T._export_sfc(ie,[["__scopeId","data-v-3ebcb6e2"]]),ue={class:"account-wrap"},pe=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(v,{emit:E}){const b=v,u=e.reactive({account:"",password:""}),C=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),A=e.ref(null),p=E;return e.watch(()=>b.isClickLogin,h=>{var i;h&&((i=A.value)==null||i.validate(f=>{p("handleLoginFormChange",f,f?u:null)}))},{immediate:!0}),e.watch(()=>b.activeTabName,h=>{var i;h&&((i=A.value)==null||i.resetFields())}),(h,i)=>{const f=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-input"),I=e.resolveComponent("el-form-item"),B=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(B,{model:u,rules:C,ref_key:"formRef",ref:A},{default:e.withCtx(()=>[e.createVNode(I,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:u.account,"onUpdate:modelValue":i[0]||(i[0]=N=>u.account=N),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(f,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(I,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:u.password,"onUpdate:modelValue":i[1]||(i[1]=N=>u.password=N),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(f,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),fe=T._export_sfc(pe,[["__scopeId","data-v-b023e8c1"]]),ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",me={class:"card-wrap"},Ae={class:"card-icon card"},he={class:"card-input"},be={class:"card-icon info"},ve=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(v,{emit:E}){const b=v,u=e.ref(""),C=E,A=p=>{C("handleCardInput",p)};return e.watch(()=>b.activeTabName,p=>{p&&(u.value="")}),(p,h)=>{const i=e.resolveComponent("el-image"),f=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",Ae,[e.createVNode(i,{src:e.unref(ye),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",he,[e.createVNode(f,{modelValue:u.value,"onUpdate:modelValue":h[0]||(h[0]=w=>u.value=w),onChange:A,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",be,[e.createVNode(i,{src:e.unref(ge),fit:"contain"},null,8,["src"])])])}}}),_e=T._export_sfc(ve,[["__scopeId","data-v-23f91251"]]);function Ce(){const v={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return m.service({url:"/api/sysAuth/login",method:"post",data:v})}const we={class:"login-wrap"},Ee={class:"login-body"},Ne={class:"login-body-item left"},Se={class:"title"},ke={class:"login-body-item right"},Ie=e.defineComponent({__name:"index",emits:["change"],setup(v,{emit:E}){const b=F.useRouter(),u=U.useLoginState(U.pinia),{systemKey:C,systemInfo:A}=U.storeToRefs(u),p=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"刷卡登录",btnLabel:"请刷卡登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"用户名登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),h=e.ref(""),i=e.ref(!1),f=e.ref(!1),w=()=>{i.value=!0},I=t=>{i.value=!1,P(t)},B=(t,n)=>{i.value=!1,t&&P(n)},N=t=>k.getFirstArrayProperty(t),L=t=>{let n;const o=k.convertArrayToTree(t),s=k.addPathToTree(o),d=k.getLeafNodesRecursive(s),y=k.groupByField(d,"parentPath");return n=k.handleRowAuthorityRender(y),n},Q=(t,n)=>{var s,d,y;const o=(n==null?void 0:n.userRoles)??(n==null?void 0:n.角色名称);try{if(n.layer&&((s=n==null?void 0:n.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(o)){if((o==null?void 0:o.length)===1){const r=t==null?void 0:t.find(a=>(a==null?void 0:a.roleName)===(o==null?void 0:o[0])||a.角色名称===(o==null?void 0:o[0])),g=N(r),c=L(r==null?void 0:r[g]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(a=>a.checkedButtons):[]:[]}if((o==null?void 0:o.length)>1){let r=t==null?void 0:t.filter(a=>o==null?void 0:o.includes(a.roleName||(a==null?void 0:a.角色名称)));const g=N(r==null?void 0:r[0]),c=(y=(d=r==null?void 0:r.map(a=>Array.isArray(a==null?void 0:a[g])?a==null?void 0:a[g]:[]))==null?void 0:d.flat())==null?void 0:y.flatMap(a=>a.checkedButtons);return(c==null?void 0:c.length)===0?m.ElMessage.error("该用户没有权限,请联系管理员"):new Set(c)}}if(typeof o=="string"){const r=t==null?void 0:t.find(a=>(a==null?void 0:a.roleName)===o||(a==null?void 0:a.角色名称)===o),g=N(r),c=L(r==null?void 0:r[g]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(a=>a.checkedButtons):[]:[]}}catch(r){throw new Error(r)}},q=async t=>{var n,o;try{let s=[];const d=await m.getInsofDataApi({key:{systemKey:t==null?void 0:t.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(d.data.code===200){const y=(o=(n=d.data)==null?void 0:n.result)==null?void 0:o.map(r=>r.value.tableData);s=Q(y,t)}if(s)return Array.isArray(s)?Array.from(s):s;throw m.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(s){throw m.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(s)}},O=async t=>{var n,o,s,d,y,r,g;try{let c=[],a,S,x;C.value?x={pageKey:"系统管理/用户管理",type:"data",systemKey:C.value}:x={pageKey:"系统管理/用户管理",type:"data"};const D=await m.getInsofDataApi({key:x});let K;if(!sessionStorage.getItem("systemKey")||sessionStorage.getItem("systemKey")===""?K=await m.getInsofDataApi({key:{layer:"superAdmin"}}):K=await m.getInsofDataApi({key:{layer:"superAdmin",systemKey:sessionStorage.getItem("systemKey")}}),D.data.code===200&&K.data.code===200){const $=(o=(n=K.data)==null?void 0:n.result)==null?void 0:o.map(l=>{var _,V;return{...l.value.tableData,layer:(_=l.key)==null?void 0:_.layer,systemKey:(V=l==null?void 0:l.key)==null?void 0:V.systemKey,id:l.id}}),j=(d=(s=D.data)==null?void 0:s.result)==null?void 0:d.map(l=>{var _,V;return{...l.value.tableData,layer:(_=l.key)==null?void 0:_.layer,systemKey:(V=l==null?void 0:l.key)==null?void 0:V.systemKey,id:l.id}}),M=[...$,...j];if(a=M==null?void 0:M.find(l=>(l==null?void 0:l.account)===(t==null?void 0:t.account)||(l==null?void 0:l.账号)===(t==null?void 0:t.account)),a){if(((y=a.layer)==null?void 0:y.toUpperCase())!=="SUPERADMIN"&&(!(a!=null&&a.状态)||(a==null?void 0:a.状态)==="禁用"||(a==null?void 0:a.status)==="禁用")){m.ElMessage.error("该用户已被禁用,请联系管理员"),f.value=!1;return}c=await q(a);const{privateKey:l}=await u.getModelSecretAsync(a);let _;if(a.password?_=((r=a.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN"?a.password:H.decryptData(a.password,l):_=((g=a.layer)==null?void 0:g.toUpperCase())==="SUPERADMIN"?a.password:k.resetPassword,(t==null?void 0:t.password)===_)S=a;else throw S=null,m.ElMessage.error("输入的密码错误,请重新输入"),f.value=!1,new Error("输入的密码错误,请重新输入")}}return S&&c?{matchedUser:S,userAuthority:c}:void 0}catch(c){throw new Error(c)}},J=async t=>{var o,s;const n=await O(t);if(n!=null&&n.matchedUser){u.setLoginUserInfo(n.matchedUser),sessionStorage.setItem("authority",JSON.stringify(n.userAuthority));const d=((s=(o=n.matchedUser)==null?void 0:o.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(d)),await X(n.matchedUser),!0}else throw f.value=!1,m.ElMessage.error("该用户不存在,请重新输入"),new Error("该用户不存在,请重新输入")},X=async t=>{var o,s,d,y,r,g,c,a,S;const n=await m.getInsofDataApi({key:{layer:"superAdmin",systemKey:t==null?void 0:t.systemKey}});if(n.data.code===200&&(o=n.data)!=null&&o.result&&Array.isArray((s=n.data)==null?void 0:s.result)&&((y=(d=n.data)==null?void 0:d.result)==null?void 0:y.length)>0){const x=(S=(a=(c=(g=(r=n.data)==null?void 0:r.result)==null?void 0:g[0])==null?void 0:c.value)==null?void 0:a.tableData)==null?void 0:S.account;u.setSuperAdminInfo({account:x})}},G=async()=>{var t,n,o;try{const s=await Ce();return((t=s==null?void 0:s.data)==null?void 0:t.code)===200?(sessionStorage.setItem("loginToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){m.ElMessage.error(s)}},Z=async()=>{var t,n,o;try{const s=await m.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((t=s==null?void 0:s.data)==null?void 0:t.code)===200?(sessionStorage.setItem("magicToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){m.ElMessage.error(s)}},P=async t=>{f.value=!0;let n=[J(t),G(),Z()];const o=await Promise.all(n);(o==null?void 0:o.every(d=>d))&&(W.verifyStructureDataToStore(),b.push("/"),u.setLogRecordAsync({type:"登录",data:{account:t==null?void 0:t.account}},"/login","login"))},Y=t=>{h.value=t,i.value=!1,f.value=!1},R=t=>/^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(t);return(t,n)=>(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",Ee,[e.createElementVNode("div",Ne,[e.createVNode(ne,{class:"login-left-bg"},{img:e.withCtx(()=>{var o,s,d,y,r,g;return[e.createElementVNode("div",Se,[e.createElementVNode("div",null,e.toDisplayString((o=e.unref(A))!=null&&o.EnglishName&&R((s=e.unref(A))==null?void 0:s.EnglishName)?(d=e.unref(A))==null?void 0:d.EnglishName:"INSOFWORKS"),1),e.createElementVNode("div",null,e.toDisplayString((y=e.unref(A))!=null&&y.chineseName&&R((r=e.unref(A))==null?void 0:r.chineseName)?(g=e.unref(A))==null?void 0:g.chineseName:"工业软件集成开发平台"),1)]),n[0]||(n[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",ke,[e.createVNode(de,{loading:f.value,onClickLogin:w,onHandleTabClick:Y},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(_e,{activeTabName:h.value,onHandleCardInput:I},null,8,["activeTabName"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(fe,{activeTabName:h.value,isClickLogin:i.value,onHandleLoginFormChange:B},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),xe=T._export_sfc(Ie,[["__scopeId","data-v-7adc1dd9"]]);exports.default=xe;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { createElementBlock as O, openBlock as J, createElementVNode as A, renderSlot as M, defineComponent as X, ref as B, resolveComponent as C, createVNode as f, withCtx as p, reactive as z, watch as Z, unref as S, toDisplayString as U, createTextVNode as R } from "vue";
|
|
2
|
+
import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
import { a as le, p as ie, s as de } from "./index.vue_vue_type_style_index_1_lang-BcbZuvjK.js";
|
|
4
4
|
import { useRouter as ue } from "vue-router";
|
|
5
|
-
import { s as pe, E as k, a as fe, g as
|
|
5
|
+
import { s as pe, E as k, a as fe, g as Q } from "./index-DHX6rKjz.js";
|
|
6
6
|
import { v as ye } from "./index-2JPI_qsa.js";
|
|
7
7
|
import { d as Ae } from "./crypto-BRyGpjGR.js";
|
|
8
|
-
import { r as
|
|
9
|
-
const Ce = {},
|
|
8
|
+
import { r as ge, g as be, c as me, a as he, b as ve, d as _e, h as we } from "./index-DmDpkK7Q.js";
|
|
9
|
+
const Ce = {}, Ie = { class: "left-wrap" }, Ee = { class: "left-bg" };
|
|
10
10
|
function ke(_, T) {
|
|
11
|
-
return
|
|
12
|
-
A("div",
|
|
11
|
+
return J(), O("div", Ie, [
|
|
12
|
+
A("div", Ee, [
|
|
13
13
|
M(_.$slots, "img", {}, void 0, !0)
|
|
14
14
|
])
|
|
15
15
|
]);
|
|
16
16
|
}
|
|
17
|
-
const Se = /* @__PURE__ */
|
|
17
|
+
const Se = /* @__PURE__ */ V(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9"]]), Te = { class: "right-wrap" }, Ke = { class: "right-title" }, Ne = { class: "right-content" }, Ue = { class: "tab-content" }, Be = { class: "tab-tips" }, Le = /* @__PURE__ */ X({
|
|
18
18
|
__name: "index",
|
|
19
19
|
props: {
|
|
20
20
|
tabList: {
|
|
@@ -28,23 +28,23 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
28
28
|
},
|
|
29
29
|
emits: ["clickLogin", "handleTabClick"],
|
|
30
30
|
setup(_, { emit: T }) {
|
|
31
|
-
const v = B("account"), d = T,
|
|
31
|
+
const v = B("account"), d = T, I = () => {
|
|
32
32
|
d("clickLogin", v.value);
|
|
33
|
-
},
|
|
33
|
+
}, m = () => {
|
|
34
34
|
d("handleTabClick", v.value);
|
|
35
35
|
};
|
|
36
|
-
return (u,
|
|
37
|
-
const l = C("el-button"), y = C("el-tab-pane"),
|
|
38
|
-
return
|
|
39
|
-
A("div",
|
|
36
|
+
return (u, h) => {
|
|
37
|
+
const l = C("el-button"), y = C("el-tab-pane"), E = C("el-tabs");
|
|
38
|
+
return J(), O("div", Te, [
|
|
39
|
+
A("div", Ke, [
|
|
40
40
|
M(u.$slots, "title", {}, void 0, !0)
|
|
41
41
|
]),
|
|
42
|
-
A("div",
|
|
43
|
-
f(
|
|
42
|
+
A("div", Ne, [
|
|
43
|
+
f(E, {
|
|
44
44
|
modelValue: v.value,
|
|
45
|
-
"onUpdate:modelValue":
|
|
45
|
+
"onUpdate:modelValue": h[0] || (h[0] = (L) => v.value = L),
|
|
46
46
|
class: "right-tabs",
|
|
47
|
-
onTabClick:
|
|
47
|
+
onTabClick: m
|
|
48
48
|
}, {
|
|
49
49
|
default: p(() => [
|
|
50
50
|
f(y, { name: "account" }, {
|
|
@@ -57,7 +57,7 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
57
57
|
]),
|
|
58
58
|
A("div", {
|
|
59
59
|
class: "tab-button special",
|
|
60
|
-
onClick:
|
|
60
|
+
onClick: I
|
|
61
61
|
}, [
|
|
62
62
|
f(l, { loading: _.loading }, {
|
|
63
63
|
default: p(() => [
|
|
@@ -79,7 +79,7 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
79
79
|
]);
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
}), Me = /* @__PURE__ */
|
|
82
|
+
}), Me = /* @__PURE__ */ V(Le, [["__scopeId", "data-v-3ebcb6e2"]]), Pe = { class: "account-wrap" }, xe = /* @__PURE__ */ X({
|
|
83
83
|
__name: "index",
|
|
84
84
|
props: {
|
|
85
85
|
activeTabName: {
|
|
@@ -96,32 +96,32 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
96
96
|
const v = _, d = z({
|
|
97
97
|
account: "",
|
|
98
98
|
password: ""
|
|
99
|
-
}),
|
|
99
|
+
}), I = z({
|
|
100
100
|
account: [
|
|
101
101
|
{ required: !0, message: "请输入账号", trigger: "blur" }
|
|
102
102
|
],
|
|
103
103
|
password: [
|
|
104
104
|
{ required: !0, message: "请输入密码", trigger: "blur" }
|
|
105
105
|
]
|
|
106
|
-
}),
|
|
107
|
-
return
|
|
106
|
+
}), m = B(null), u = T;
|
|
107
|
+
return Z(() => v.isClickLogin, (h) => {
|
|
108
108
|
var l;
|
|
109
|
-
|
|
109
|
+
h && ((l = m.value) == null || l.validate((y) => {
|
|
110
110
|
u("handleLoginFormChange", y, y ? d : null);
|
|
111
111
|
}));
|
|
112
112
|
}, {
|
|
113
113
|
immediate: !0
|
|
114
|
-
}),
|
|
114
|
+
}), Z(() => v.activeTabName, (h) => {
|
|
115
115
|
var l;
|
|
116
|
-
|
|
117
|
-
}), (
|
|
118
|
-
const y = C("svg-icon"),
|
|
119
|
-
return
|
|
120
|
-
f(
|
|
116
|
+
h && ((l = m.value) == null || l.resetFields());
|
|
117
|
+
}), (h, l) => {
|
|
118
|
+
const y = C("svg-icon"), E = C("el-input"), L = C("el-form-item"), q = C("el-form");
|
|
119
|
+
return J(), O("div", Pe, [
|
|
120
|
+
f(q, {
|
|
121
121
|
model: d,
|
|
122
|
-
rules:
|
|
122
|
+
rules: I,
|
|
123
123
|
ref_key: "formRef",
|
|
124
|
-
ref:
|
|
124
|
+
ref: m
|
|
125
125
|
}, {
|
|
126
126
|
default: p(() => [
|
|
127
127
|
f(L, {
|
|
@@ -129,9 +129,9 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
129
129
|
prop: "account"
|
|
130
130
|
}, {
|
|
131
131
|
default: p(() => [
|
|
132
|
-
f(
|
|
132
|
+
f(E, {
|
|
133
133
|
modelValue: d.account,
|
|
134
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
134
|
+
"onUpdate:modelValue": l[0] || (l[0] = (K) => d.account = K),
|
|
135
135
|
placeholder: "请输入账号",
|
|
136
136
|
clearable: ""
|
|
137
137
|
}, {
|
|
@@ -151,9 +151,9 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
151
151
|
prop: "password"
|
|
152
152
|
}, {
|
|
153
153
|
default: p(() => [
|
|
154
|
-
f(
|
|
154
|
+
f(E, {
|
|
155
155
|
modelValue: d.password,
|
|
156
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
156
|
+
"onUpdate:modelValue": l[1] || (l[1] = (K) => d.password = K),
|
|
157
157
|
type: "password",
|
|
158
158
|
placeholder: "请输入密码",
|
|
159
159
|
"show-password": "",
|
|
@@ -176,7 +176,7 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
176
176
|
]);
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
}), Re = /* @__PURE__ */
|
|
179
|
+
}), Re = /* @__PURE__ */ V(xe, [["__scopeId", "data-v-b023e8c1"]]), Qe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC", Oe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC", Je = { class: "card-wrap" }, Ve = { class: "card-icon card" }, De = { class: "card-input" }, Xe = { class: "card-icon info" }, qe = /* @__PURE__ */ X({
|
|
180
180
|
__name: "index",
|
|
181
181
|
props: {
|
|
182
182
|
activeTabName: {
|
|
@@ -186,14 +186,14 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
186
186
|
},
|
|
187
187
|
emits: ["handleCardInput"],
|
|
188
188
|
setup(_, { emit: T }) {
|
|
189
|
-
const v = _, d = B(""),
|
|
190
|
-
|
|
189
|
+
const v = _, d = B(""), I = T, m = (u) => {
|
|
190
|
+
I("handleCardInput", u);
|
|
191
191
|
};
|
|
192
|
-
return
|
|
192
|
+
return Z(() => v.activeTabName, (u) => {
|
|
193
193
|
u && (d.value = "");
|
|
194
|
-
}), (u,
|
|
194
|
+
}), (u, h) => {
|
|
195
195
|
const l = C("el-image"), y = C("el-input");
|
|
196
|
-
return
|
|
196
|
+
return J(), O("div", Je, [
|
|
197
197
|
A("div", Ve, [
|
|
198
198
|
f(l, {
|
|
199
199
|
src: S(Qe),
|
|
@@ -203,8 +203,8 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
203
203
|
A("div", De, [
|
|
204
204
|
f(y, {
|
|
205
205
|
modelValue: d.value,
|
|
206
|
-
"onUpdate:modelValue":
|
|
207
|
-
onChange:
|
|
206
|
+
"onUpdate:modelValue": h[0] || (h[0] = (E) => d.value = E),
|
|
207
|
+
onChange: m,
|
|
208
208
|
clearable: ""
|
|
209
209
|
}, null, 8, ["modelValue"])
|
|
210
210
|
]),
|
|
@@ -217,7 +217,7 @@ const Se = /* @__PURE__ */ J(Ce, [["render", ke], ["__scopeId", "data-v-9b7ee6c9
|
|
|
217
217
|
]);
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
}), Ge = /* @__PURE__ */
|
|
220
|
+
}), Ge = /* @__PURE__ */ V(qe, [["__scopeId", "data-v-23f91251"]]);
|
|
221
221
|
function Ze() {
|
|
222
222
|
return pe({
|
|
223
223
|
url: "/api/sysAuth/login",
|
|
@@ -231,11 +231,11 @@ function Ze() {
|
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
|
-
const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class: "login-body-item left" }, je = { class: "title" }, ze = { class: "login-body-item right" }, He = /* @__PURE__ */
|
|
234
|
+
const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class: "login-body-item left" }, je = { class: "title" }, ze = { class: "login-body-item right" }, He = /* @__PURE__ */ X({
|
|
235
235
|
__name: "index",
|
|
236
236
|
emits: ["change"],
|
|
237
237
|
setup(_, { emit: T }) {
|
|
238
|
-
const v = ue(), d = le(ie), { systemKey:
|
|
238
|
+
const v = ue(), d = le(ie), { systemKey: I, systemInfo: m } = de(d), u = B({
|
|
239
239
|
// sysCTitle: 'INSOFWORKS',
|
|
240
240
|
sysCTitle: "",
|
|
241
241
|
sysETitle: "",
|
|
@@ -253,45 +253,45 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
253
253
|
tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
|
|
254
254
|
}
|
|
255
255
|
]
|
|
256
|
-
}),
|
|
256
|
+
}), h = B(""), l = B(!1), y = B(!1), E = () => {
|
|
257
257
|
l.value = !0;
|
|
258
258
|
}, L = (e) => {
|
|
259
|
-
l.value = !1,
|
|
260
|
-
},
|
|
261
|
-
l.value = !1, e &&
|
|
262
|
-
},
|
|
259
|
+
l.value = !1, F(e);
|
|
260
|
+
}, q = (e, t) => {
|
|
261
|
+
l.value = !1, e && F(t);
|
|
262
|
+
}, K = (e) => be(e), Y = (e) => {
|
|
263
263
|
let t;
|
|
264
|
-
const
|
|
265
|
-
return t = we(
|
|
264
|
+
const s = me(e), n = he(s), i = ve(n), g = _e(i, "parentPath");
|
|
265
|
+
return t = we(g), t;
|
|
266
266
|
}, H = (e, t) => {
|
|
267
|
-
var
|
|
268
|
-
const
|
|
267
|
+
var n, i, g;
|
|
268
|
+
const s = (t == null ? void 0 : t.userRoles) ?? (t == null ? void 0 : t.角色名称);
|
|
269
269
|
try {
|
|
270
|
-
if (t.layer && ((
|
|
270
|
+
if (t.layer && ((n = t == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN")
|
|
271
271
|
return "superAdmin";
|
|
272
|
-
if (Array.isArray(
|
|
273
|
-
if ((
|
|
274
|
-
const o = e == null ? void 0 : e.find((a) => (a == null ? void 0 : a.roleName) === (
|
|
272
|
+
if (Array.isArray(s)) {
|
|
273
|
+
if ((s == null ? void 0 : s.length) === 1) {
|
|
274
|
+
const o = e == null ? void 0 : e.find((a) => (a == null ? void 0 : a.roleName) === (s == null ? void 0 : s[0]) || a.角色名称 === (s == null ? void 0 : s[0])), b = K(o), r = Y(o == null ? void 0 : o[b]);
|
|
275
275
|
return o && r && Array.isArray(r) ? o ? r == null ? void 0 : r.flatMap((a) => a.checkedButtons) : [] : [];
|
|
276
276
|
}
|
|
277
|
-
if ((
|
|
278
|
-
let o = e == null ? void 0 : e.filter((a) =>
|
|
279
|
-
const
|
|
277
|
+
if ((s == null ? void 0 : s.length) > 1) {
|
|
278
|
+
let o = e == null ? void 0 : e.filter((a) => s == null ? void 0 : s.includes(a.roleName || (a == null ? void 0 : a.角色名称)));
|
|
279
|
+
const b = K(o == null ? void 0 : o[0]), r = (g = (i = o == null ? void 0 : o.map((a) => Array.isArray(a == null ? void 0 : a[b]) ? a == null ? void 0 : a[b] : [])) == null ? void 0 : i.flat()) == null ? void 0 : g.flatMap((a) => a.checkedButtons);
|
|
280
280
|
return (r == null ? void 0 : r.length) === 0 ? k.error("该用户没有权限,请联系管理员") : new Set(r);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
if (typeof
|
|
284
|
-
const o = e == null ? void 0 : e.find((a) => (a == null ? void 0 : a.roleName) ===
|
|
283
|
+
if (typeof s == "string") {
|
|
284
|
+
const o = e == null ? void 0 : e.find((a) => (a == null ? void 0 : a.roleName) === s || (a == null ? void 0 : a.角色名称) === s), b = K(o), r = Y(o == null ? void 0 : o[b]);
|
|
285
285
|
return o && r && Array.isArray(r) ? o ? r == null ? void 0 : r.flatMap((a) => a.checkedButtons) : [] : [];
|
|
286
286
|
}
|
|
287
287
|
} catch (o) {
|
|
288
288
|
throw new Error(o);
|
|
289
289
|
}
|
|
290
290
|
}, $ = async (e) => {
|
|
291
|
-
var t,
|
|
291
|
+
var t, s;
|
|
292
292
|
try {
|
|
293
|
-
let
|
|
294
|
-
const i = await
|
|
293
|
+
let n = [];
|
|
294
|
+
const i = await Q({
|
|
295
295
|
key: {
|
|
296
296
|
systemKey: e == null ? void 0 : e.systemKey,
|
|
297
297
|
// pageKey: '/系统管理/角色管理',
|
|
@@ -300,40 +300,46 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
302
|
if (i.data.code === 200) {
|
|
303
|
-
const
|
|
304
|
-
|
|
303
|
+
const g = (s = (t = i.data) == null ? void 0 : t.result) == null ? void 0 : s.map((o) => o.value.tableData);
|
|
304
|
+
n = H(g, e);
|
|
305
305
|
}
|
|
306
|
-
if (
|
|
307
|
-
return Array.isArray(
|
|
306
|
+
if (n)
|
|
307
|
+
return Array.isArray(n) ? Array.from(n) : n;
|
|
308
308
|
throw k.error("获取用户权限失败,请联系管理员"), new Error("获取用户权限失败,请联系管理员");
|
|
309
|
-
} catch (
|
|
310
|
-
throw k.error("获取用户权限失败,请联系管理员"), new Error(
|
|
309
|
+
} catch (n) {
|
|
310
|
+
throw k.error("获取用户权限失败,请联系管理员"), new Error(n);
|
|
311
311
|
}
|
|
312
312
|
}, ee = async (e) => {
|
|
313
|
-
var t,
|
|
313
|
+
var t, s, n, i, g, o, b;
|
|
314
314
|
try {
|
|
315
|
-
let r = [], a,
|
|
316
|
-
|
|
315
|
+
let r = [], a, N, P;
|
|
316
|
+
I.value ? P = {
|
|
317
317
|
// pageKey: '/系统管理/用户管理',
|
|
318
318
|
pageKey: "系统管理/用户管理",
|
|
319
319
|
type: "data",
|
|
320
320
|
// 通过electron传递的值获取模型key,解决多账号导入同一模型,账号名重复权限失败问题
|
|
321
|
-
systemKey:
|
|
321
|
+
systemKey: I.value
|
|
322
322
|
} : P = {
|
|
323
323
|
// pageKey: '/系统管理/用户管理',
|
|
324
324
|
pageKey: "系统管理/用户管理",
|
|
325
325
|
type: "data"
|
|
326
326
|
};
|
|
327
|
-
const
|
|
327
|
+
const j = await Q({
|
|
328
328
|
key: P
|
|
329
|
-
})
|
|
329
|
+
});
|
|
330
|
+
let D;
|
|
331
|
+
if (!sessionStorage.getItem("systemKey") || sessionStorage.getItem("systemKey") === "" ? D = await Q({
|
|
330
332
|
key: {
|
|
331
333
|
layer: "superAdmin"
|
|
332
334
|
// systemKey:sessionStorage.getItem('tenantKey')
|
|
333
335
|
}
|
|
334
|
-
})
|
|
335
|
-
|
|
336
|
-
|
|
336
|
+
}) : D = await Q({
|
|
337
|
+
key: {
|
|
338
|
+
layer: "superAdmin",
|
|
339
|
+
systemKey: sessionStorage.getItem("systemKey")
|
|
340
|
+
}
|
|
341
|
+
}), j.data.code === 200 && D.data.code === 200) {
|
|
342
|
+
const re = (s = (t = D.data) == null ? void 0 : t.result) == null ? void 0 : s.map((c) => {
|
|
337
343
|
var w, x;
|
|
338
344
|
return {
|
|
339
345
|
...c.value.tableData,
|
|
@@ -341,7 +347,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
341
347
|
systemKey: (x = c == null ? void 0 : c.key) == null ? void 0 : x.systemKey,
|
|
342
348
|
id: c.id
|
|
343
349
|
};
|
|
344
|
-
}), ce = (i = (
|
|
350
|
+
}), ce = (i = (n = j.data) == null ? void 0 : n.result) == null ? void 0 : i.map((c) => {
|
|
345
351
|
var w, x;
|
|
346
352
|
return {
|
|
347
353
|
...c.value.tableData,
|
|
@@ -349,96 +355,96 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
349
355
|
systemKey: (x = c == null ? void 0 : c.key) == null ? void 0 : x.systemKey,
|
|
350
356
|
id: c.id
|
|
351
357
|
};
|
|
352
|
-
}),
|
|
353
|
-
if (a =
|
|
354
|
-
if (((
|
|
358
|
+
}), G = [...re, ...ce];
|
|
359
|
+
if (a = G == null ? void 0 : G.find((c) => (c == null ? void 0 : c.account) === (e == null ? void 0 : e.account) || (c == null ? void 0 : c.账号) === (e == null ? void 0 : e.account)), a) {
|
|
360
|
+
if (((g = a.layer) == null ? void 0 : g.toUpperCase()) !== "SUPERADMIN" && (!(a != null && a.状态) || (a == null ? void 0 : a.状态) === "禁用" || (a == null ? void 0 : a.status) === "禁用")) {
|
|
355
361
|
k.error("该用户已被禁用,请联系管理员"), y.value = !1;
|
|
356
362
|
return;
|
|
357
363
|
}
|
|
358
364
|
r = await $(a);
|
|
359
365
|
const { privateKey: c } = await d.getModelSecretAsync(a);
|
|
360
366
|
let w;
|
|
361
|
-
if (a.password ? w = ((o = a.layer) == null ? void 0 : o.toUpperCase()) === "SUPERADMIN" ? a.password : Ae(a.password, c) : w = ((
|
|
362
|
-
|
|
367
|
+
if (a.password ? w = ((o = a.layer) == null ? void 0 : o.toUpperCase()) === "SUPERADMIN" ? a.password : Ae(a.password, c) : w = ((b = a.layer) == null ? void 0 : b.toUpperCase()) === "SUPERADMIN" ? a.password : ge, (e == null ? void 0 : e.password) === w)
|
|
368
|
+
N = a;
|
|
363
369
|
else
|
|
364
|
-
throw
|
|
370
|
+
throw N = null, k.error("输入的密码错误,请重新输入"), y.value = !1, new Error("输入的密码错误,请重新输入");
|
|
365
371
|
}
|
|
366
372
|
}
|
|
367
|
-
return
|
|
368
|
-
matchedUser:
|
|
373
|
+
return N && r ? {
|
|
374
|
+
matchedUser: N,
|
|
369
375
|
userAuthority: r
|
|
370
376
|
} : void 0;
|
|
371
377
|
} catch (r) {
|
|
372
378
|
throw new Error(r);
|
|
373
379
|
}
|
|
374
380
|
}, ae = async (e) => {
|
|
375
|
-
var
|
|
381
|
+
var s, n;
|
|
376
382
|
const t = await ee(e);
|
|
377
383
|
if (t != null && t.matchedUser) {
|
|
378
384
|
d.setLoginUserInfo(t.matchedUser), sessionStorage.setItem("authority", JSON.stringify(t.userAuthority));
|
|
379
|
-
const i = ((
|
|
385
|
+
const i = ((n = (s = t.matchedUser) == null ? void 0 : s.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
|
|
380
386
|
return sessionStorage.setItem("isSuperAdmin", JSON.stringify(i)), await te(t.matchedUser), !0;
|
|
381
387
|
} else
|
|
382
388
|
throw y.value = !1, k.error("该用户不存在,请重新输入"), new Error("该用户不存在,请重新输入");
|
|
383
389
|
}, te = async (e) => {
|
|
384
|
-
var
|
|
385
|
-
const t = await
|
|
390
|
+
var s, n, i, g, o, b, r, a, N;
|
|
391
|
+
const t = await Q({
|
|
386
392
|
key: {
|
|
387
393
|
// pageKey: '/user',
|
|
388
394
|
layer: "superAdmin",
|
|
389
395
|
systemKey: e == null ? void 0 : e.systemKey
|
|
390
396
|
}
|
|
391
397
|
});
|
|
392
|
-
if (t.data.code === 200 && (
|
|
393
|
-
const P = (
|
|
398
|
+
if (t.data.code === 200 && (s = t.data) != null && s.result && Array.isArray((n = t.data) == null ? void 0 : n.result) && ((g = (i = t.data) == null ? void 0 : i.result) == null ? void 0 : g.length) > 0) {
|
|
399
|
+
const P = (N = (a = (r = (b = (o = t.data) == null ? void 0 : o.result) == null ? void 0 : b[0]) == null ? void 0 : r.value) == null ? void 0 : a.tableData) == null ? void 0 : N.account;
|
|
394
400
|
d.setSuperAdminInfo({
|
|
395
401
|
account: P
|
|
396
402
|
});
|
|
397
403
|
}
|
|
398
|
-
},
|
|
399
|
-
var e, t,
|
|
404
|
+
}, se = async () => {
|
|
405
|
+
var e, t, s;
|
|
400
406
|
try {
|
|
401
|
-
const
|
|
402
|
-
return ((e =
|
|
403
|
-
} catch (
|
|
404
|
-
k.error(
|
|
407
|
+
const n = await Ze();
|
|
408
|
+
return ((e = n == null ? void 0 : n.data) == null ? void 0 : e.code) === 200 ? (sessionStorage.setItem("loginToken", (s = (t = n.data) == null ? void 0 : t.result) == null ? void 0 : s.accessToken), !0) : !1;
|
|
409
|
+
} catch (n) {
|
|
410
|
+
k.error(n);
|
|
405
411
|
}
|
|
406
|
-
},
|
|
407
|
-
var e, t,
|
|
412
|
+
}, ne = async () => {
|
|
413
|
+
var e, t, s;
|
|
408
414
|
try {
|
|
409
|
-
const
|
|
415
|
+
const n = await fe.post("http://139.196.154.85:20024/api/sysAuth/login", {
|
|
410
416
|
account: "superadmin",
|
|
411
417
|
password: "9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",
|
|
412
418
|
codeId: 0,
|
|
413
419
|
code: ""
|
|
414
420
|
});
|
|
415
|
-
return ((e =
|
|
416
|
-
} catch (
|
|
417
|
-
k.error(
|
|
421
|
+
return ((e = n == null ? void 0 : n.data) == null ? void 0 : e.code) === 200 ? (sessionStorage.setItem("magicToken", (s = (t = n.data) == null ? void 0 : t.result) == null ? void 0 : s.accessToken), !0) : !1;
|
|
422
|
+
} catch (n) {
|
|
423
|
+
k.error(n);
|
|
418
424
|
}
|
|
419
|
-
},
|
|
425
|
+
}, F = async (e) => {
|
|
420
426
|
y.value = !0;
|
|
421
|
-
let t = [ae(e),
|
|
422
|
-
const
|
|
423
|
-
(
|
|
427
|
+
let t = [ae(e), se(), ne()];
|
|
428
|
+
const s = await Promise.all(t);
|
|
429
|
+
(s == null ? void 0 : s.every((i) => i)) && (ye(), v.push("/"), d.setLogRecordAsync({
|
|
424
430
|
type: "登录",
|
|
425
431
|
data: {
|
|
426
432
|
account: e == null ? void 0 : e.account
|
|
427
433
|
}
|
|
428
434
|
}, "/login", "login"));
|
|
429
435
|
}, oe = (e) => {
|
|
430
|
-
|
|
431
|
-
},
|
|
432
|
-
return (e, t) => (
|
|
436
|
+
h.value = e, l.value = !1, y.value = !1;
|
|
437
|
+
}, W = (e) => /^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(e);
|
|
438
|
+
return (e, t) => (J(), O("div", Ye, [
|
|
433
439
|
A("div", Fe, [
|
|
434
440
|
A("div", We, [
|
|
435
441
|
f(Se, { class: "login-left-bg" }, {
|
|
436
442
|
img: p(() => {
|
|
437
|
-
var
|
|
443
|
+
var s, n, i, g, o, b;
|
|
438
444
|
return [
|
|
439
445
|
A("div", je, [
|
|
440
|
-
A("div", null, U((
|
|
441
|
-
A("div", null, U((
|
|
446
|
+
A("div", null, U((s = S(m)) != null && s.EnglishName && W((n = S(m)) == null ? void 0 : n.EnglishName) ? (i = S(m)) == null ? void 0 : i.EnglishName : "INSOFWORKS"), 1),
|
|
447
|
+
A("div", null, U((g = S(m)) != null && g.chineseName && W((o = S(m)) == null ? void 0 : o.chineseName) ? (b = S(m)) == null ? void 0 : b.chineseName : "工业软件集成开发平台"), 1)
|
|
442
448
|
]),
|
|
443
449
|
t[0] || (t[0] = A("div", { class: "divide-line" }, null, -1))
|
|
444
450
|
];
|
|
@@ -449,7 +455,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
449
455
|
A("div", ze, [
|
|
450
456
|
f(Me, {
|
|
451
457
|
loading: y.value,
|
|
452
|
-
onClickLogin:
|
|
458
|
+
onClickLogin: E,
|
|
453
459
|
onHandleTabClick: oe
|
|
454
460
|
}, {
|
|
455
461
|
title: p(() => [
|
|
@@ -460,7 +466,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
460
466
|
]),
|
|
461
467
|
tabContent1: p(() => [
|
|
462
468
|
f(Ge, {
|
|
463
|
-
activeTabName:
|
|
469
|
+
activeTabName: h.value,
|
|
464
470
|
onHandleCardInput: L
|
|
465
471
|
}, null, 8, ["activeTabName"])
|
|
466
472
|
]),
|
|
@@ -472,9 +478,9 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
472
478
|
]),
|
|
473
479
|
tabContent2: p(() => [
|
|
474
480
|
f(Re, {
|
|
475
|
-
activeTabName:
|
|
481
|
+
activeTabName: h.value,
|
|
476
482
|
isClickLogin: l.value,
|
|
477
|
-
onHandleLoginFormChange:
|
|
483
|
+
onHandleLoginFormChange: q
|
|
478
484
|
}, null, 8, ["activeTabName", "isClickLogin"])
|
|
479
485
|
]),
|
|
480
486
|
tabButton2: p(() => [
|
|
@@ -486,7 +492,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
486
492
|
])
|
|
487
493
|
]));
|
|
488
494
|
}
|
|
489
|
-
}), ca = /* @__PURE__ */
|
|
495
|
+
}), ca = /* @__PURE__ */ V(He, [["__scopeId", "data-v-7adc1dd9"]]);
|
|
490
496
|
export {
|
|
491
497
|
ca as default
|
|
492
498
|
};
|