ss-component-new 1.3.271 → 1.3.272

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.
@@ -1 +1 @@
1
- "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-BJ-thkmN.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-BJvaTjjk.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-CAKmBDVW.cjs")),children:[{path:"系统配置/站内信",name:"Message",component:async()=>Promise.resolve().then(()=>require("./index-DPIg2S6M.cjs"))},{path:"系统配置/自动生成",name:"Automatic",component:async()=>Promise.resolve().then(()=>require("./index-B2BAJXIH.cjs"))},{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-BefNND7D.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-C8BjMc6z.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-DtfkhNLl.cjs"))},{path:"系统维护/登录日志",name:"LoginLog",component:async()=>Promise.resolve().then(()=>require("./index-DQhZN-1E.cjs"))},{path:"系统维护/操作日志",name:"OperateLog",component:async()=>Promise.resolve().then(()=>require("./index-BxwghYq1.cjs"))},{path:"角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-DlPQUH86.cjs"))},{path:"部门管理",name:"Department",component:async()=>Promise.resolve().then(()=>require("./index-DcljbdLi.cjs"))},{path:"职位管理",name:"Position",component:async()=>Promise.resolve().then(()=>require("./index-B968UBFN.cjs"))},{path:"个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-C-xI7h-Z.cjs"))},{path:"log",name:"log",component:async()=>Promise.resolve().then(()=>require("./index-BTZYJ5oH.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
1
+ "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-BJ-thkmN.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-KVzeEg2l.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-DXRhTwcx.cjs")),children:[{path:"系统配置/站内信",name:"Message",component:async()=>Promise.resolve().then(()=>require("./index-DPIg2S6M.cjs"))},{path:"系统配置/自动生成",name:"Automatic",component:async()=>Promise.resolve().then(()=>require("./index-B2BAJXIH.cjs"))},{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-BefNND7D.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-C8BjMc6z.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-DtfkhNLl.cjs"))},{path:"系统维护/登录日志",name:"LoginLog",component:async()=>Promise.resolve().then(()=>require("./index-DQhZN-1E.cjs"))},{path:"系统维护/操作日志",name:"OperateLog",component:async()=>Promise.resolve().then(()=>require("./index-BxwghYq1.cjs"))},{path:"角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-DlPQUH86.cjs"))},{path:"部门管理",name:"Department",component:async()=>Promise.resolve().then(()=>require("./index-DcljbdLi.cjs"))},{path:"职位管理",name:"Position",component:async()=>Promise.resolve().then(()=>require("./index-B968UBFN.cjs"))},{path:"个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-C-xI7h-Z.cjs"))},{path:"log",name:"log",component:async()=>Promise.resolve().then(()=>require("./index-BTZYJ5oH.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
@@ -8,12 +8,12 @@ const a = [
8
8
  {
9
9
  path: "/login",
10
10
  name: "Login",
11
- component: async () => import("./index-BQZQfdF9.js")
11
+ component: async () => import("./index-DVsmrcKc.js")
12
12
  },
13
13
  {
14
14
  path: "/",
15
15
  name: "Model",
16
- component: async () => import("./index-whFeQHV7.js"),
16
+ component: async () => import("./index-DDKW9761.js"),
17
17
  // component: async ()=>import('@/components/views/model/component/main.vue'),
18
18
  // component: async ()=>import('@/components/views/canvas/index.vue'),
19
19
  // component: async ()=>import('@/components/views/test/index.vue'),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.3.271",
4
+ "version": "1.3.272",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./index-BrkG7uLk.cjs");require("./index-qlM1q9uT.cjs");const M=require("./index-D7kcuKde.cjs"),k=require("./request-BC2w2vGr.cjs"),I=require("vue-router"),D={},K={class:"left-wrap"},O={class:"left-bg"};function U(v,m){return e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",O,[e.renderSlot(v.$slots,"img",{},void 0,!0)])])}const j=L._export_sfc(D,[["render",U],["__scopeId","data-v-9b7ee6c9"]]),T={ACCOUNT:"account",FACE:"face"},H={class:"right-wrap"},P={class:"tab-content"},J={class:"tab-tips"},W={class:"tab-content"},z={class:"tab-tips"},G=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabChange"],setup(v,{emit:m}){const n=e.ref(T.ACCOUNT),t=m,b=()=>{t("clickLogin",n.value)},y=a=>{t("handleTabChange",a)};return(a,l)=>{const s=e.resolveComponent("el-button"),c=e.resolveComponent("el-tab-pane"),f=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",H,[e.createVNode(f,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=d=>n.value=d),class:"right-tabs",onTabChange:y},{default:e.withCtx(()=>[e.createVNode(c,{name:e.unref(T).ACCOUNT},{label:e.withCtx(()=>[e.renderSlot(a.$slots,"tabLabel1",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",P,[e.renderSlot(a.$slots,"tabContent1",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:b},[e.createVNode(s,{loading:v.loading},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"tabButton1",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",J,[e.renderSlot(a.$slots,"tabTips1",{},void 0,!0)])]),_:3},8,["name"]),e.createVNode(c,{name:e.unref(T).FACE},{label:e.withCtx(()=>[e.renderSlot(a.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",W,[e.renderSlot(a.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",z,[e.renderSlot(a.$slots,"tabTips2",{},void 0,!0)])]),_:3},8,["name"])]),_:3},8,["modelValue"])])}}}),Q=L._export_sfc(G,[["__scopeId","data-v-8b1962f0"]]),X={class:"account-wrap"},Y=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(v,{emit:m}){const n=v,t=e.reactive({account:"",password:""}),b=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),y=e.ref(null),a=m;return e.watch(()=>n.isClickLogin,l=>{var s;l&&(n==null?void 0:n.activeTabName)==="account"&&((s=y.value)==null||s.validate(c=>{var f;for(let d in t)t.hasOwnProperty(d)&&(t[d]=(f=t[d])==null?void 0:f.trim());a("handleLoginFormChange",c,c?t:null)}))},{immediate:!0}),e.watch(()=>n.activeTabName,l=>{var s;l==="account"&&((s=y.value)==null||s.resetFields())}),(l,s)=>{const c=e.resolveComponent("svg-icon"),f=e.resolveComponent("el-input"),d=e.resolveComponent("el-form-item"),C=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(C,{model:t,rules:b,ref_key:"formRef",ref:y},{default:e.withCtx(()=>[e.createVNode(d,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(f,{class:"account-input",modelValue:t.account,"onUpdate:modelValue":s[0]||(s[0]=N=>t.account=N),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(c,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(f,{class:"account-input",modelValue:t.password,"onUpdate:modelValue":s[1]||(s[1]=N=>t.password=N),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(c,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),Z=L._export_sfc(Y,[["__scopeId","data-v-48037c0f"]]),ee={class:"account-wrap"},te={class:"video-wrap"},oe=e.defineComponent({__name:"index",props:{systemKey:{default:""},activeTabName:{default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(v,{emit:m}){const n=v,t=m,b=g.useLoginState(g.pinia),{systemInfo:y}=g.storeToRefs(b),a=e.ref(null),l=e.ref(null);let s=!1,c=null;const f=async i=>{if(!i)return;const r=new FormData;r.set("file",i);const h=y.value.plat_id;h&&r.set("systemKey",h),console.log("Face Recognition",h);const w=await M.verifyFaceImage(r),{data:o}=w||{},{account:u,password:p,layer:_}=(o==null?void 0:o.data)||{},E=o==null?void 0:o.msg;if(!u){k.ElMessage.warning(E||"识别失败,请重新识别!");return}t("handleLoginFormChange",!0,{account:u,password:p})},d=()=>{if(!l.value||!a.value)return;const i=l.value,r=i.getContext("2d"),h=a.value;i.width=200,i.height=200;const w=h.videoWidth||640,o=h.videoHeight||480,u=Math.min(200/w,200/o),p=w*u,_=o*u,E=(200-p)/2,S=(200-_)/2;r==null||r.drawImage(h,0,0,w,o,E,S,p,_),i.toBlob(x=>{if(x){const $=new File([x],"face.png",{type:"image/png"});f($)}},"image/png")},C=async()=>{if(!a.value||s)return;const i=a.value;try{if(c=await navigator.mediaDevices.getUserMedia({video:{facingMode:"user"},audio:!1}),i){const r=i;r.srcObject=c,s=!0}}catch{k.ElMessage.warning("摄像头启动失败")}};function N(i){if(i&&(i.getTracks().forEach(r=>r.stop()),a.value)){const r=a.value;r.srcObject=null}}const V=()=>{N(c),s=!1};return e.watch(()=>n.activeTabName,i=>{if(i!==T.FACE){V();return}if(i===T.FACE&&!s){C();return}}),e.onBeforeUnmount(()=>{V()}),(i,r)=>(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("video",{class:"face-video",ref_key:"videoRef",ref:a,id:"v",autoplay:"",playsinline:""},null,512)]),e.createElementVNode("button",{class:"face-screenshot",onClick:d},"人脸识别"),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:l,id:"canvas"},null,512)]))}}),ae=L._export_sfc(oe,[["__scopeId","data-v-8b30c6df"]]);function ne(){const v={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return k.service({url:"/api/sysAuth/login",method:"post",data:v})}const q=g.useLoginState(g.pinia),{isDefaultModel:se}=g.useModelManagement(),ie=async(v,m)=>{var b,y,a,l,s,c,f,d,C,N,V,i,r,h;let n=Object.values(v),t=await g.loginPlatFormDataApi({userName:(b=n==null?void 0:n[0])==null?void 0:b.trim(),password:(y=n==null?void 0:n[1])==null?void 0:y.trim()});if(((a=t==null?void 0:t.data)==null?void 0:a.status)===200&&((s=(l=t==null?void 0:t.data)==null?void 0:l.result)==null?void 0:s.length)<=0&&(t=await g.loginCommonAccount({userName:(c=n==null?void 0:n[0])==null?void 0:c.trim(),password:(f=n==null?void 0:n[1])==null?void 0:f.trim(),path:"系统管理/用户管理",platId:m})),((d=t==null?void 0:t.data)==null?void 0:d.status)===200&&((N=(C=t==null?void 0:t.data)==null?void 0:C.result)==null?void 0:N.length)>0){const o=((i=(V=t==null?void 0:t.data)==null?void 0:V.result)==null?void 0:i.find(p=>se(p)))||((h=(r=t==null?void 0:t.data)==null?void 0:r.result)==null?void 0:h[0]);sessionStorage.setItem("systemKey",m&&m!==""?m:o==null?void 0:o.plat_id);let u=o;return u.plat_id=u.plat_id??m,q.setLoginUserInfo(u),q.setSystemKey(m&&m!==""?m:o==null?void 0:o.plat_id),!0}else return k.ElMessage.error("输入的密码错误,请重新输入"),!1},le={class:"login-wrap"},ce={class:"login-body"},re={class:"login-body-item left"},de={class:"title"},ue={class:"first-level"},me={key:0,class:"logo"},fe=["src"],pe={class:"english-name"},ge={class:"login-body-item right"},_e=e.defineComponent({__name:"index",props:{oldSystemKey:{}},emits:["change"],setup(v,{emit:m}){const n=I.useRouter(),t=g.useMenuState(g.pinia),b=g.useLoginState(g.pinia),{systemKey:y,systemInfo:a,loginUserInfo:l}=g.storeToRefs(b),s=e.computed(()=>{var o;return((o=a.value)==null?void 0:o.logo)||g.logo}),c=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浏览器请使用极速模式"},{name:"刷卡登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),f=e.ref("account"),d=e.ref(!1),C=e.ref(!1),N=()=>{d.value=!0},V=(o,u)=>{d.value=!1,o&&h(u)},i=async()=>{var o,u,p;try{const _=await ne();return((o=_==null?void 0:_.data)==null?void 0:o.code)===200?(sessionStorage.setItem("loginToken",(p=(u=_.data)==null?void 0:u.result)==null?void 0:p.accessToken),!0):!1}catch(_){k.ElMessage.error(_)}return!0},r=async()=>(sessionStorage.setItem("magicToken","123456"),!0);e.onMounted(async()=>{await i()});const h=async o=>{var S,x,$,B,F,A;C.value=!0;let u=[ie(o,(S=a.value)==null?void 0:S.plat_id),i(),r()];const p=await Promise.all(u),_=p==null?void 0:p.every(R=>R);let E=[{id:"1",request_method:"Post",request_url:"/platform/getdata",request_param:JSON.stringify({userName:"hjj",password:"1"}),request_result:"{}",is_delete:!1,request_table:"admin_user",request_type:"login"}];try{await g.pageBatchAddApi({platId:parseInt((x=l==null?void 0:l.value)==null?void 0:x.plat_id),changeContents:[{tableName:"log",tableContents:E}]})}catch{}_?(await g.verifyStructureDataToStore(),n.push("/"),b.setLogRecordAsync({type:"登录",data:{account:(($=l.value)==null?void 0:$.account)??((B=l.value)==null?void 0:B.账号),userName:((F=l.value)==null?void 0:F.姓名)||((A=l.value)==null?void 0:A.userName)||"未知"}},"/login","login"),t.setHasClickEditComp(!1)):C.value=!1},w=o=>{f.value=o,d.value=!1,C.value=!1};return(o,u)=>(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",ce,[e.createElementVNode("div",re,[e.createVNode(j,{class:"login-left-bg"},{img:e.withCtx(()=>{var p,_;return[e.createElementVNode("div",de,[e.createElementVNode("div",ue,[s.value?(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("img",{src:s.value,alt:""},null,8,fe)])):e.createCommentVNode("",!0),e.createElementVNode("div",pe,e.toDisplayString(((p=e.unref(a))==null?void 0:p.EnglishName)||"Insofworks"),1)]),e.createElementVNode("div",null,e.toDisplayString(((_=e.unref(a))==null?void 0:_.chineseName)||"工业软件建模与开发系统"),1)]),u[0]||(u[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",ge,[e.createVNode(Q,{loading:C.value,onClickLogin:N,onHandleTabChange:w},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(Z,{activeTabName:f.value,isClickLogin:d.value,onHandleLoginFormChange:V},null,8,["activeTabName","isClickLogin"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(ae,{systemKey:o.oldSystemKey,activeTabName:f.value,isClickLogin:d.value,onHandleLoginFormChange:V},null,8,["systemKey","activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),ve=L._export_sfc(_e,[["__scopeId","data-v-992a7c9a"]]);exports.default=ve;