ss-component-new 1.3.331 → 1.3.332

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.
@@ -20,7 +20,7 @@ const r = o(() => import("./index-YHV9GOn7.js").then((t) => t.i));
20
20
  r.install = (t) => {
21
21
  t.component("ssMenu", r);
22
22
  };
23
- const m = o(() => import("./index-BiyytII6.js"));
23
+ const m = o(() => import("./index-Dh-rGPWx.js"));
24
24
  m.install = (t) => {
25
25
  t.component("ssMenuComponent", m);
26
26
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.3.331",
4
+ "version": "1.3.332",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("./menu-__WRVDPn.cjs"),g=require("./index-DSY_gOa-.cjs"),K=require("./index-CgeLsBKu.cjs"),S=require("vue-router"),M=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),x={key:0},N=o.defineComponent({__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:!1},nodeDev:{type:String,default:""},pageKey:{type:String,default:""},interfaceContent:{type:Array,default:()=>[]},loginContent:{type:Object,default:()=>{}}},emits:["buildContent","openThreeBuild","threeData","setLoginInfo","projectLogin","updateApiUrl"],setup(f,{emit:v}){const C=S.useRouter(),r=s.useLoginState(s.pinia),{loginUserInfo:m}=s.storeToRefs(r),{initSystemInfo:I}=g.useModelManagement(),L=s.useModelComp(s.pinia),{refreshLogin:A}=s.storeToRefs(L),T=s.useMenuState(s.pinia),y=o.ref(!0),_=S.useRoute(),e=f,d=v,B=o.computed(()=>{var t,n;return(e==null?void 0:e.showButton)||((n=(t=m.value)==null?void 0:t.layer)==null?void 0:n.toUpperCase())==="SUPERADMIN"});o.watch(()=>e==null?void 0:e.loginContent,async()=>{var n,i,a,c;y.value=!0;let t=e==null?void 0:e.loginContent;t!=null&&t.account&&(t!=null&&t.password)&&!A.value&&(await K.loginUp(t),status&&(await g.verifyStructureDataToStore(),await C.push("/"),await C.isReady(),await o.nextTick(),await new Promise(u=>setTimeout(u,50)),r.setLogRecordAsync({type:"登录",data:{account:((n=m.value)==null?void 0:n.account)??((i=m.value)==null?void 0:i.账号),userName:((a=m.value)==null?void 0:a.姓名)||((c=m.value)==null?void 0:c.userName)||"未知"}},"/login","login"),T.setHasClickEditComp(!1))),_.path==="/"||!(t!=null&&t.account)||!(t!=null&&t.password)||await o.nextTick(),y.value=!1},{deep:!0,immediate:!0});const D=t=>{d("projectLogin",t)},E=()=>{d("projectLogin","")};o.watch(()=>[e==null?void 0:e.systemKey,e==null?void 0:e.systemInfo],async([t,n])=>{r.setSystemKey(t),t!==""&&sessionStorage.setItem("systemKey",t)},{immediate:!0}),o.watch(()=>e==null?void 0:e.interfaceContent,()=>{var i,a,c,u,h;if(!(e!=null&&e.interfaceContent)||Array.isArray(e==null?void 0:e.interfaceContent)&&((i=e==null?void 0:e.interfaceContent)==null?void 0:i.length)===0)return;let t=(a=e==null?void 0:e.interfaceContent)==null?void 0:a.find(l=>l==null?void 0:l.includes("VITE_API_NEW_URL")),n=(c=e==null?void 0:e.interfaceContent)==null?void 0:c.find(l=>l==null?void 0:l.includes("VITE_FACE_RECOGNITION_API_URL"));n=(u=n==null?void 0:n.split("="))==null?void 0:u[1],n=n==null?void 0:n.trim(),t=(h=t==null?void 0:t.split("="))==null?void 0:h[1],t=t==null?void 0:t.trim(),r.setExtraUrl(n??""),r.setSystemUrl(t??"")},{immediate:!0,deep:!0}),o.onMounted(async()=>{var n,i;let t=await s.getSystemDataApi({});if(((i=(n=t==null?void 0:t.data)==null?void 0:n.result)==null?void 0:i.length)===0){const a=g.formatterTimeStr(Date.now());let c={userName:"admin",password:"123456",platName:"insofworks",platType:"browser",platVersion:"t1",platCreatedAt:a,platUpdatedAt:a};await s.createPlatFormDataApi(c)}e.systemInfo?r.setSystemInfo(e.systemInfo):await I()});const j=()=>{d("buildContent")},k=()=>{d("setLoginInfo")},R=t=>{d("openThreeBuild",t)},U=t=>{d("threeData",t)},b=t=>{d("updateApiUrl",t)},w=()=>{var u;const t=e!=null&&e.windowConfig?(u=e==null?void 0:e.windowConfig)==null?void 0:u.width:window.innerWidth,n=1920,i=16,a=t/n,c=i*a;document.documentElement.style.fontSize=`${c}px`};return o.onMounted(()=>{w(),window.addEventListener("resize",w)}),o.onUnmounted(()=>{window.removeEventListener("resize",w)}),(t,n)=>{const i=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",null,[y.value?(o.openBlock(),o.createElementBlock("div",x)):(o.openBlock(),o.createBlock(i,{key:1,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:B.value,nodeDev:e==null?void 0:e.nodeDev,windowConfig:f.windowConfig,systemInfo:f.systemInfo,"old-systemKey":f.systemKey,onBuildContent:j,onProjectLogin:D,onClearLogin:E,onUpdateApiUrl:b,onOpenThreeBuild:R,pageKey:f.pageKey,onThreeData:U,onSetLoginInfo:k,loginContent:e==null?void 0:e.loginContent},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","systemInfo","old-systemKey","pageKey","loginContent"]))])}}}),O=M._export_sfc(N,[["__scopeId","data-v-cbe824dc"]]);exports.default=O;