ss-component-new 1.1.743 → 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-BbVkFv9b.cjs → index-BLkUDg9-.cjs} +1 -1
- package/dist/{index-Dwi6hmy0.cjs → index-C1c2vlrf.cjs} +1 -1
- package/dist/{index-Chkqskfo.js → index-ChgK1fVm.js} +20 -20
- package/dist/{index-CPWusFs7.js → index-CryPt3m6.js} +1 -1
- package/dist/{index-DvrfOuat.cjs → index-DUMlhhlR.cjs} +1 -1
- package/dist/{index-31shII67.js → index-vpRMBJ9R.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_8bb4b740_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_8bb4b740_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
|
@@ -1 +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-
|
|
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"),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")===""?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-e6e9eff7"]]);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;
|
|
@@ -5,7 +5,7 @@ import { useRouter as ue } from "vue-router";
|
|
|
5
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
|
|
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
9
|
const Ce = {}, Ie = { class: "left-wrap" }, Ee = { class: "left-bg" };
|
|
10
10
|
function ke(_, T) {
|
|
11
11
|
return J(), O("div", Ie, [
|
|
@@ -259,29 +259,29 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
259
259
|
l.value = !1, F(e);
|
|
260
260
|
}, q = (e, t) => {
|
|
261
261
|
l.value = !1, e && F(t);
|
|
262
|
-
}, K = (e) =>
|
|
262
|
+
}, K = (e) => be(e), Y = (e) => {
|
|
263
263
|
let t;
|
|
264
|
-
const s = me(e), n = he(s), i = ve(n),
|
|
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 n, i,
|
|
267
|
+
var n, i, g;
|
|
268
268
|
const s = (t == null ? void 0 : t.userRoles) ?? (t == null ? void 0 : t.角色名称);
|
|
269
269
|
try {
|
|
270
270
|
if (t.layer && ((n = t == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN")
|
|
271
271
|
return "superAdmin";
|
|
272
272
|
if (Array.isArray(s)) {
|
|
273
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])),
|
|
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
277
|
if ((s == null ? void 0 : s.length) > 1) {
|
|
278
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
|
|
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
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),
|
|
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) {
|
|
@@ -300,8 +300,8 @@ 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
|
-
n = H(
|
|
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
306
|
if (n)
|
|
307
307
|
return Array.isArray(n) ? Array.from(n) : n;
|
|
@@ -310,7 +310,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
310
310
|
throw k.error("获取用户权限失败,请联系管理员"), new Error(n);
|
|
311
311
|
}
|
|
312
312
|
}, ee = async (e) => {
|
|
313
|
-
var t, s, n, i,
|
|
313
|
+
var t, s, n, i, g, o, b;
|
|
314
314
|
try {
|
|
315
315
|
let r = [], a, N, P;
|
|
316
316
|
I.value ? P = {
|
|
@@ -328,7 +328,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
328
328
|
key: P
|
|
329
329
|
});
|
|
330
330
|
let D;
|
|
331
|
-
if (sessionStorage.getItem("systemKey") === "" ? D = await Q({
|
|
331
|
+
if (!sessionStorage.getItem("systemKey") || sessionStorage.getItem("systemKey") === "" ? D = await Q({
|
|
332
332
|
key: {
|
|
333
333
|
layer: "superAdmin"
|
|
334
334
|
// systemKey:sessionStorage.getItem('tenantKey')
|
|
@@ -357,14 +357,14 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
357
357
|
};
|
|
358
358
|
}), G = [...re, ...ce];
|
|
359
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 (((
|
|
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) === "禁用")) {
|
|
361
361
|
k.error("该用户已被禁用,请联系管理员"), y.value = !1;
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
364
|
r = await $(a);
|
|
365
365
|
const { privateKey: c } = await d.getModelSecretAsync(a);
|
|
366
366
|
let w;
|
|
367
|
-
if (a.password ? w = ((o = a.layer) == null ? void 0 : o.toUpperCase()) === "SUPERADMIN" ? a.password : Ae(a.password, c) : w = ((
|
|
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
368
|
N = a;
|
|
369
369
|
else
|
|
370
370
|
throw N = null, k.error("输入的密码错误,请重新输入"), y.value = !1, new Error("输入的密码错误,请重新输入");
|
|
@@ -387,7 +387,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
387
387
|
} else
|
|
388
388
|
throw y.value = !1, k.error("该用户不存在,请重新输入"), new Error("该用户不存在,请重新输入");
|
|
389
389
|
}, te = async (e) => {
|
|
390
|
-
var s, n, i,
|
|
390
|
+
var s, n, i, g, o, b, r, a, N;
|
|
391
391
|
const t = await Q({
|
|
392
392
|
key: {
|
|
393
393
|
// pageKey: '/user',
|
|
@@ -395,8 +395,8 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
395
395
|
systemKey: e == null ? void 0 : e.systemKey
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
|
-
if (t.data.code === 200 && (s = t.data) != null && s.result && Array.isArray((n = t.data) == null ? void 0 : n.result) && ((
|
|
399
|
-
const P = (N = (a = (r = (
|
|
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;
|
|
400
400
|
d.setSuperAdminInfo({
|
|
401
401
|
account: P
|
|
402
402
|
});
|
|
@@ -440,11 +440,11 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
440
440
|
A("div", We, [
|
|
441
441
|
f(Se, { class: "login-left-bg" }, {
|
|
442
442
|
img: p(() => {
|
|
443
|
-
var s, n, i,
|
|
443
|
+
var s, n, i, g, o, b;
|
|
444
444
|
return [
|
|
445
445
|
A("div", je, [
|
|
446
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((
|
|
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)
|
|
448
448
|
]),
|
|
449
449
|
t[0] || (t[0] = A("div", { class: "divide-line" }, null, -1))
|
|
450
450
|
];
|
|
@@ -492,7 +492,7 @@ const Ye = { class: "login-wrap" }, Fe = { class: "login-body" }, We = { class:
|
|
|
492
492
|
])
|
|
493
493
|
]));
|
|
494
494
|
}
|
|
495
|
-
}), ca = /* @__PURE__ */ V(He, [["__scopeId", "data-v-
|
|
495
|
+
}), ca = /* @__PURE__ */ V(He, [["__scopeId", "data-v-7adc1dd9"]]);
|
|
496
496
|
export {
|
|
497
497
|
ca as default
|
|
498
498
|
};
|
|
@@ -2,7 +2,7 @@ import { resolveComponent as V, createBlock as ee, openBlock as B, withCtx as f,
|
|
|
2
2
|
import { m as at, a as ot, b as nt } from "./index-qwea9F5R.js";
|
|
3
3
|
import { c as pt, b as Bt } from "./index.vue_vue_type_style_index_0_scoped_c81d0427_lang-DtoSEF10.js";
|
|
4
4
|
import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
import { _ as wt, s as Ue, o as It, c as ft, a as Et, b as kt, d as Qt, g as St, e as vt, f as Rt, h as Ut, i as bt, j as jt } from "./index.vue_vue_type_style_index_0_scoped_8bb4b740_lang-
|
|
5
|
+
import { _ as wt, s as Ue, o as It, c as ft, a as Et, b as kt, d as Qt, g as St, e as vt, f as Rt, h as Ut, i as bt, j as jt } from "./index.vue_vue_type_style_index_0_scoped_8bb4b740_lang-BpLgxvsN.js";
|
|
6
6
|
import { p as ue, s as ce, a as lt, u as xe, c as Ee } from "./index.vue_vue_type_style_index_1_lang-BcbZuvjK.js";
|
|
7
7
|
import { S as de } from "./index-BHtNKL1L.js";
|
|
8
8
|
import { u as He } from "./modelComp-CrN39qNS.js";
|