ss-component-new 1.3.384 → 1.3.385

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,9 +1,9 @@
1
- import { defineComponent as z, ref as N, computed as O, watch as y, nextTick as x, onMounted as h, onUnmounted as P, resolveComponent as W, createElementBlock as S, openBlock as C, createBlock as G } from "vue";
2
- import { b as H, p as g, s as v, d as $, a as q, u as J, v as Q } from "./index-OJlYJM1j.js";
1
+ import { defineComponent as z, ref as N, computed as O, watch as f, nextTick as x, onMounted as I, onUnmounted as W, resolveComponent as G, createElementBlock as L, openBlock as C, createBlock as H } from "vue";
2
+ import { b as V, p as g, s as w, d as $, a as q, u as J, v as Q } from "./index-OJlYJM1j.js";
3
3
  import { l as X } from "./index-CKzb7xC4.js";
4
4
  import { useRouter as Y } from "vue-router";
5
5
  import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const V = { key: 0 }, p = /* @__PURE__ */ z({
6
+ const p = { key: 0 }, ee = /* @__PURE__ */ z({
7
7
  __name: "index",
8
8
  props: {
9
9
  windowConfig: {
@@ -58,33 +58,39 @@ const V = { key: 0 }, p = /* @__PURE__ */ z({
58
58
  }
59
59
  }
60
60
  },
61
- emits: ["buildContent", "openThreeBuild", "threeData", "setLoginInfo", "projectLogin", "updateApiUrl", "clearFileContent", "systemContent"],
62
- setup(u, { emit: I }) {
63
- const L = Y(), l = H(g), { loginUserInfo: f } = v(l), { initSystemInfo: _ } = $(), A = q(g), { refreshLogin: B } = v(A), E = J(g), m = N(!0), e = u, o = I, j = O(() => {
61
+ emits: ["buildContent", "openThreeBuild", "threeData", "setLoginInfo", "projectLogin", "updateApiUrl", "clearFileContent", "systemContent", "getMenuPathValue"],
62
+ setup(d, { emit: _ }) {
63
+ const A = Y(), u = V(g), { loginUserInfo: m } = w(u), { initSystemInfo: B } = $(), E = q(g), { refreshLogin: j } = w(E), h = J(g), r = N(!0), { activeMenuPath: v } = w(h), e = d, o = _, M = O(() => {
64
64
  var t, n;
65
- return (e == null ? void 0 : e.showButton) || ((n = (t = f.value) == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
65
+ return (e == null ? void 0 : e.showButton) || ((n = (t = m.value) == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
66
66
  }), D = (t) => {
67
67
  o("systemContent", t);
68
68
  }, T = () => {
69
69
  o("clearFileContent");
70
70
  };
71
- y(
71
+ f(
72
+ () => v.value,
73
+ () => {
74
+ o("getMenuPathValue", v.value);
75
+ },
76
+ { deep: !0, immediate: !0 }
77
+ ), f(
72
78
  () => e == null ? void 0 : e.loginContent,
73
79
  async () => {
74
80
  var n, i, s, c;
75
- m.value = !0;
81
+ r.value = !0;
76
82
  let t = e == null ? void 0 : e.loginContent;
77
- if (t != null && t.account && (t != null && t.password) && !B.value && (await X(t), status)) {
83
+ if (t != null && t.account && (t != null && t.password) && !j.value && (await X(t), status)) {
78
84
  let a = await Q();
79
- o("systemContent", a == null ? void 0 : a.allMenuContents), L.push("/"), l.setLogRecordAsync({
85
+ o("systemContent", a == null ? void 0 : a.allMenuContents), A.push("/"), u.setLogRecordAsync({
80
86
  type: "登录",
81
87
  data: {
82
- account: ((n = f.value) == null ? void 0 : n.account) ?? ((i = f.value) == null ? void 0 : i.账号),
83
- userName: ((s = f.value) == null ? void 0 : s.姓名) || ((c = f.value) == null ? void 0 : c.userName) || "未知"
88
+ account: ((n = m.value) == null ? void 0 : n.account) ?? ((i = m.value) == null ? void 0 : i.账号),
89
+ userName: ((s = m.value) == null ? void 0 : s.姓名) || ((c = m.value) == null ? void 0 : c.userName) || "未知"
84
90
  }
85
- }, "/login", "login"), E.setHasClickEditComp(!1);
91
+ }, "/login", "login"), h.setHasClickEditComp(!1);
86
92
  }
87
- m.value = !1, await x();
93
+ r.value = !1, await x();
88
94
  },
89
95
  { deep: !0, immediate: !0 }
90
96
  );
@@ -93,61 +99,61 @@ const V = { key: 0 }, p = /* @__PURE__ */ z({
93
99
  }, U = () => {
94
100
  o("projectLogin", "");
95
101
  };
96
- y(() => [e == null ? void 0 : e.systemKey, e == null ? void 0 : e.systemInfo], async ([t, n]) => {
97
- l.setSystemKey(t), t !== "" && sessionStorage.setItem("systemKey", t);
98
- }, { immediate: !0 }), y(
102
+ f(() => [e == null ? void 0 : e.systemKey, e == null ? void 0 : e.systemInfo], async ([t, n]) => {
103
+ u.setSystemKey(t), t !== "" && sessionStorage.setItem("systemKey", t);
104
+ }, { immediate: !0 }), f(
99
105
  () => e == null ? void 0 : e.interfaceContent,
100
106
  () => {
101
- var i, s, c, a, w;
107
+ var i, s, c, a, S;
102
108
  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;
103
- let t = (s = e == null ? void 0 : e.interfaceContent) == null ? void 0 : s.find((d) => d == null ? void 0 : d.includes("VITE_API_NEW_URL")), n = (c = e == null ? void 0 : e.interfaceContent) == null ? void 0 : c.find((d) => d == null ? void 0 : d.includes("VITE_FACE_RECOGNITION_API_URL"));
104
- n = (a = n == null ? void 0 : n.split("=")) == null ? void 0 : a[1], n = n == null ? void 0 : n.trim(), t = (w = t == null ? void 0 : t.split("=")) == null ? void 0 : w[1], t = t == null ? void 0 : t.trim(), l.setExtraUrl(n ?? ""), l.setSystemUrl(t ?? "");
109
+ let t = (s = e == null ? void 0 : e.interfaceContent) == null ? void 0 : s.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"));
110
+ n = (a = n == null ? void 0 : n.split("=")) == null ? void 0 : a[1], n = n == null ? void 0 : n.trim(), t = (S = t == null ? void 0 : t.split("=")) == null ? void 0 : S[1], t = t == null ? void 0 : t.trim(), u.setExtraUrl(n ?? ""), u.setSystemUrl(t ?? "");
105
111
  },
106
112
  { immediate: !0, deep: !0 }
107
- ), h(async () => {
108
- e.systemInfo ? l.setSystemInfo(e.systemInfo) : await _();
113
+ ), I(async () => {
114
+ e.systemInfo ? u.setSystemInfo(e.systemInfo) : await B();
109
115
  });
110
116
  const F = () => {
111
117
  o("buildContent");
112
- }, M = () => {
118
+ }, R = () => {
113
119
  o("setLoginInfo");
114
- }, R = (t) => {
120
+ }, k = (t) => {
115
121
  o("openThreeBuild", t);
116
- }, b = (t) => {
122
+ }, P = (t) => {
117
123
  o("threeData", t);
118
- }, k = (t) => {
124
+ }, b = (t) => {
119
125
  o("updateApiUrl", t);
120
- }, r = () => {
126
+ }, y = () => {
121
127
  var a;
122
128
  const t = e != null && e.windowConfig ? (a = e == null ? void 0 : e.windowConfig) == null ? void 0 : a.width : window.innerWidth, n = 1920, i = 16, s = t / n, c = i * s;
123
129
  document.documentElement.style.fontSize = `${c}px`;
124
130
  };
125
- return h(() => {
126
- r(), window.addEventListener("resize", r);
127
- }), P(() => {
128
- window.removeEventListener("resize", r);
131
+ return I(() => {
132
+ y(), window.addEventListener("resize", y);
133
+ }), W(() => {
134
+ window.removeEventListener("resize", y);
129
135
  }), (t, n) => {
130
- const i = W("router-view");
131
- return C(), S("div", null, [
132
- m.value ? (C(), S("div", V)) : (C(), G(i, {
136
+ const i = G("router-view");
137
+ return C(), L("div", null, [
138
+ r.value ? (C(), L("div", p)) : (C(), H(i, {
133
139
  key: 1,
134
140
  mode: e == null ? void 0 : e.mode,
135
141
  content: e == null ? void 0 : e.content,
136
142
  jsonContents: e == null ? void 0 : e.jsonContents,
137
143
  pathContent: e == null ? void 0 : e.pathContent,
138
- showButton: j.value,
144
+ showButton: M.value,
139
145
  nodeDev: e == null ? void 0 : e.nodeDev,
140
- windowConfig: u.windowConfig,
141
- systemInfo: u.systemInfo,
142
- "old-systemKey": u.systemKey,
146
+ windowConfig: d.windowConfig,
147
+ systemInfo: d.systemInfo,
148
+ "old-systemKey": d.systemKey,
143
149
  onBuildContent: F,
144
150
  onProjectLogin: K,
145
151
  onClearLogin: U,
146
- onUpdateApiUrl: k,
147
- onOpenThreeBuild: R,
148
- pageKey: u.pageKey,
149
- onThreeData: b,
150
- onSetLoginInfo: M,
152
+ onUpdateApiUrl: b,
153
+ onOpenThreeBuild: k,
154
+ pageKey: d.pageKey,
155
+ onThreeData: P,
156
+ onSetLoginInfo: R,
151
157
  loginContent: e == null ? void 0 : e.loginContent,
152
158
  onClearFileContent: T,
153
159
  onSystemContent: D
@@ -155,7 +161,7 @@ const V = { key: 0 }, p = /* @__PURE__ */ z({
155
161
  ]);
156
162
  };
157
163
  }
158
- }), ae = /* @__PURE__ */ Z(p, [["__scopeId", "data-v-90db92de"]]);
164
+ }), se = /* @__PURE__ */ Z(ee, [["__scopeId", "data-v-e036c161"]]);
159
165
  export {
160
- ae as default
166
+ se as default
161
167
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),a=require("./index-BUD_iRcK.cjs"),U=require("./index-DEJ3o_Up.cjs"),F=require("vue-router"),P=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),b={key:0},x=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","clearFileContent","systemContent","getMenuPathValue"],setup(f,{emit:v}){const S=F.useRouter(),r=a.useLoginState(a.pinia),{loginUserInfo:m}=a.storeToRefs(r),{initSystemInfo:I}=a.useModelManagement(),L=a.useModelComp(a.pinia),{refreshLogin:_}=a.storeToRefs(L),g=a.useMenuState(a.pinia),y=o.ref(!0),{activeMenuPath:w}=a.storeToRefs(g),e=f,i=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"}),A=t=>{i("systemContent",t)},E=()=>{i("clearFileContent")};o.watch(()=>w.value,()=>{i("getMenuPathValue",w.value)},{deep:!0,immediate:!0}),o.watch(()=>e==null?void 0:e.loginContent,async()=>{var n,s,u,l;y.value=!0;let t=e==null?void 0:e.loginContent;if(t!=null&&t.account&&(t!=null&&t.password)&&!_.value&&(await U.loginUp(t),status)){let c=await a.verifyStructureDataToStore();i("systemContent",c==null?void 0:c.allMenuContents),S.push("/"),r.setLogRecordAsync({type:"登录",data:{account:((n=m.value)==null?void 0:n.account)??((s=m.value)==null?void 0:s.账号),userName:((u=m.value)==null?void 0:u.姓名)||((l=m.value)==null?void 0:l.userName)||"未知"}},"/login","login"),g.setHasClickEditComp(!1)}y.value=!1,await o.nextTick()},{deep:!0,immediate:!0});const M=t=>{i("projectLogin",t)},T=()=>{i("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 s,u,l,c,h;if(!(e!=null&&e.interfaceContent)||Array.isArray(e==null?void 0:e.interfaceContent)&&((s=e==null?void 0:e.interfaceContent)==null?void 0:s.length)===0)return;let t=(u=e==null?void 0:e.interfaceContent)==null?void 0:u.find(d=>d==null?void 0:d.includes("VITE_API_NEW_URL")),n=(l=e==null?void 0:e.interfaceContent)==null?void 0:l.find(d=>d==null?void 0:d.includes("VITE_FACE_RECOGNITION_API_URL"));n=(c=n==null?void 0:n.split("="))==null?void 0:c[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()=>{e.systemInfo?r.setSystemInfo(e.systemInfo):await I()});const j=()=>{i("buildContent")},R=()=>{i("setLoginInfo")},k=t=>{i("openThreeBuild",t)},D=t=>{i("threeData",t)},K=t=>{i("updateApiUrl",t)},C=()=>{var c;const t=e!=null&&e.windowConfig?(c=e==null?void 0:e.windowConfig)==null?void 0:c.width:window.innerWidth,n=1920,s=16,u=t/n,l=s*u;document.documentElement.style.fontSize=`${l}px`};return o.onMounted(()=>{C(),window.addEventListener("resize",C)}),o.onUnmounted(()=>{window.removeEventListener("resize",C)}),(t,n)=>{const s=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",null,[y.value?(o.openBlock(),o.createElementBlock("div",b)):(o.openBlock(),o.createBlock(s,{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:M,onClearLogin:T,onUpdateApiUrl:K,onOpenThreeBuild:k,pageKey:f.pageKey,onThreeData:D,onSetLoginInfo:R,loginContent:e==null?void 0:e.loginContent,onClearFileContent:E,onSystemContent:A},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","systemInfo","old-systemKey","pageKey","loginContent"]))])}}}),O=P._export_sfc(x,[["__scopeId","data-v-e036c161"]]);exports.default=O;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-B9qUQdPf.cjs");const C=require("./index-BpPyaNFa.cjs"),v=require("./index-BUD_iRcK.cjs");require("./index-CRJ8dFCC.cjs");require("./request-Dl8yi2iS.cjs");;/* empty css */const s=require("./ss-component2.cjs"),t=require("./index-RoXicHV9.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-CpVlWVrP.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CR69-jEg.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C93sz4z1.cjs")).then(e=>e.index));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BA7_vyhG.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BELWa90a.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BVaHwt5f.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-n7GfhOVN.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-Dg-07eQL.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-Df7LK7Wh.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=v.useMenuState(),q=[r,i,c,l,m,u,a,h,f],P=e=>{q.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=C.SvgIcon;exports.router=s;exports.default=P;exports.platformApi=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-B9qUQdPf.cjs");const C=require("./index-BpPyaNFa.cjs"),v=require("./index-BUD_iRcK.cjs");require("./index-CRJ8dFCC.cjs");require("./request-Dl8yi2iS.cjs");;/* empty css */const s=require("./ss-component2.cjs"),t=require("./index-RoXicHV9.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-CpVlWVrP.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CR69-jEg.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C93sz4z1.cjs")).then(e=>e.index));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Dud4CfvS.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BELWa90a.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BVaHwt5f.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-n7GfhOVN.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-Dg-07eQL.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-Df7LK7Wh.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=v.useMenuState(),q=[r,i,c,l,m,u,a,h,f],P=e=>{q.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=C.SvgIcon;exports.router=s;exports.default=P;exports.platformApi=T;