ss-component-new 1.3.326 → 1.3.328

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,8 +1,8 @@
1
- import { defineComponent as M, ref as z, computed as O, watch as y, nextTick as x, onMounted as S, onUnmounted as F, resolveComponent as P, createElementBlock as v, openBlock as g, createCommentVNode as I, createBlock as W, unref as G } from "vue";
2
- import { b as H, p as C, s as L, a as V, u as $, g as q, d as J } from "./menu-BRhQwt8l.js";
1
+ import { defineComponent as M, ref as z, computed as O, watch as y, nextTick as x, onMounted as v, onUnmounted as F, resolveComponent as P, createElementBlock as S, openBlock as C, createBlock as W } from "vue";
2
+ import { b as G, p as g, s as I, a as H, u as $, g as q, d as J } from "./menu-BRhQwt8l.js";
3
3
  import { u as Q, v as X, f as Y } from "./index-iBPVokNX.js";
4
4
  import { l as Z } from "./index-DwFvAU1D.js";
5
- import { useRouter as p } from "vue-router";
5
+ import { useRouter as p, useRoute as V } from "vue-router";
6
6
  import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const te = { key: 0 }, ne = /* @__PURE__ */ M({
8
8
  __name: "index",
@@ -60,24 +60,24 @@ const te = { key: 0 }, ne = /* @__PURE__ */ M({
60
60
  }
61
61
  },
62
62
  emits: ["buildContent", "openThreeBuild", "threeData", "setLoginInfo", "projectLogin", "updateApiUrl"],
63
- setup(l, { emit: A }) {
64
- const _ = p(), c = H(C), { loginUserInfo: u } = L(c), { initSystemInfo: D } = Q(), T = V(C), { refreshLogin: w } = L(T), B = $(C), f = z(!0), e = l, s = A, E = O(() => {
63
+ setup(u, { emit: L }) {
64
+ const A = p(), c = G(g), { loginUserInfo: l } = I(c), { initSystemInfo: _ } = Q(), D = H(g), { refreshLogin: w } = I(D), T = $(g), f = z(!0), B = V(), e = u, s = L, E = O(() => {
65
65
  var t, n;
66
- return (e == null ? void 0 : e.showButton) || ((n = (t = u.value) == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
66
+ return (e == null ? void 0 : e.showButton) || ((n = (t = l.value) == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
67
67
  });
68
68
  y(
69
69
  () => e == null ? void 0 : e.loginContent,
70
70
  async () => {
71
- var n, a, o, i;
71
+ var n, o, a, i;
72
72
  f.value = !0;
73
73
  let t = e == null ? void 0 : e.loginContent;
74
- t != null && t.account && (t != null && t.password) && !w.value && (await Z(t), status && (await X(), _.push("/"), c.setLogRecordAsync({
74
+ t != null && t.account && (t != null && t.password) && !w.value && (await Z(t), status && (await X(), A.push("/"), c.setLogRecordAsync({
75
75
  type: "登录",
76
76
  data: {
77
- account: ((n = u.value) == null ? void 0 : n.account) ?? ((a = u.value) == null ? void 0 : a.账号),
78
- userName: ((o = u.value) == null ? void 0 : o.姓名) || ((i = u.value) == null ? void 0 : i.userName) || "未知"
77
+ account: ((n = l.value) == null ? void 0 : n.account) ?? ((o = l.value) == null ? void 0 : o.账号),
78
+ userName: ((a = l.value) == null ? void 0 : a.姓名) || ((i = l.value) == null ? void 0 : i.userName) || "未知"
79
79
  }
80
- }, "/login", "login"), B.setHasClickEditComp(!1))), f.value = !1, x();
80
+ }, "/login", "login"), T.setHasClickEditComp(!1))), B.path === "/" || !(t != null && t.account && (t != null && t.password) && !w.value) || await x(), f.value = !1;
81
81
  },
82
82
  { deep: !0, immediate: !0 }
83
83
  );
@@ -91,54 +91,52 @@ const te = { key: 0 }, ne = /* @__PURE__ */ M({
91
91
  }, { immediate: !0 }), y(
92
92
  () => e == null ? void 0 : e.interfaceContent,
93
93
  () => {
94
- var a, o, i, m, h;
95
- if (!(e != null && e.interfaceContent) || Array.isArray(e == null ? void 0 : e.interfaceContent) && ((a = e == null ? void 0 : e.interfaceContent) == null ? void 0 : a.length) === 0) return;
96
- let t = (o = e == null ? void 0 : e.interfaceContent) == null ? void 0 : o.find((d) => d == null ? void 0 : d.includes("VITE_API_NEW_URL")), n = (i = e == null ? void 0 : e.interfaceContent) == null ? void 0 : i.find((d) => d == null ? void 0 : d.includes("VITE_FACE_RECOGNITION_API_URL"));
94
+ var o, a, i, m, h;
95
+ if (!(e != null && e.interfaceContent) || Array.isArray(e == null ? void 0 : e.interfaceContent) && ((o = e == null ? void 0 : e.interfaceContent) == null ? void 0 : o.length) === 0) return;
96
+ let t = (a = e == null ? void 0 : e.interfaceContent) == null ? void 0 : a.find((d) => d == null ? void 0 : d.includes("VITE_API_NEW_URL")), n = (i = e == null ? void 0 : e.interfaceContent) == null ? void 0 : i.find((d) => d == null ? void 0 : d.includes("VITE_FACE_RECOGNITION_API_URL"));
97
97
  n = (m = n == null ? void 0 : n.split("=")) == null ? void 0 : m[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(), c.setExtraUrl(n ?? ""), c.setSystemUrl(t ?? "");
98
98
  },
99
99
  { immediate: !0, deep: !0 }
100
- ), S(async () => {
101
- var n, a;
100
+ ), v(async () => {
101
+ var n, o;
102
102
  let t = await q({});
103
- if (((a = (n = t == null ? void 0 : t.data) == null ? void 0 : n.result) == null ? void 0 : a.length) === 0) {
104
- const o = Y(Date.now());
103
+ if (((o = (n = t == null ? void 0 : t.data) == null ? void 0 : n.result) == null ? void 0 : o.length) === 0) {
104
+ const a = Y(Date.now());
105
105
  await J({
106
106
  userName: "admin",
107
107
  password: "123456",
108
108
  platName: "insofworks",
109
109
  platType: "browser",
110
110
  platVersion: "t1",
111
- platCreatedAt: o,
112
- platUpdatedAt: o
111
+ platCreatedAt: a,
112
+ platUpdatedAt: a
113
113
  });
114
114
  }
115
- e.systemInfo ? c.setSystemInfo(e.systemInfo) : await D();
115
+ e.systemInfo ? c.setSystemInfo(e.systemInfo) : await _();
116
116
  });
117
117
  const K = () => {
118
118
  s("buildContent");
119
- }, N = () => {
119
+ }, R = () => {
120
120
  s("setLoginInfo");
121
- }, b = (t) => {
122
- s("openThreeBuild", t);
123
121
  }, k = (t) => {
122
+ s("openThreeBuild", t);
123
+ }, N = (t) => {
124
124
  s("threeData", t);
125
- }, R = (t) => {
125
+ }, b = (t) => {
126
126
  s("updateApiUrl", t);
127
127
  }, r = () => {
128
128
  var m;
129
- const t = e != null && e.windowConfig ? (m = e == null ? void 0 : e.windowConfig) == null ? void 0 : m.width : window.innerWidth, n = 1920, a = 16, o = t / n, i = a * o;
129
+ const t = e != null && e.windowConfig ? (m = e == null ? void 0 : e.windowConfig) == null ? void 0 : m.width : window.innerWidth, n = 1920, o = 16, a = t / n, i = o * a;
130
130
  document.documentElement.style.fontSize = `${i}px`;
131
131
  };
132
- return S(() => {
132
+ return v(() => {
133
133
  r(), window.addEventListener("resize", r);
134
134
  }), F(() => {
135
135
  window.removeEventListener("resize", r);
136
136
  }), (t, n) => {
137
- var o, i;
138
- const a = P("router-view");
139
- return g(), v("div", null, [
140
- (o = e == null ? void 0 : e.loginContent) != null && o.account && ((i = e == null ? void 0 : e.loginContent) != null && i.password) && !G(w) && f.value ? (g(), v("div", te)) : I("", !0),
141
- f.value ? I("", !0) : (g(), W(a, {
137
+ const o = P("router-view");
138
+ return C(), S("div", null, [
139
+ f.value ? (C(), S("div", te)) : (C(), W(o, {
142
140
  key: 1,
143
141
  mode: e == null ? void 0 : e.mode,
144
142
  content: e == null ? void 0 : e.content,
@@ -146,23 +144,23 @@ const te = { key: 0 }, ne = /* @__PURE__ */ M({
146
144
  pathContent: e == null ? void 0 : e.pathContent,
147
145
  showButton: E.value,
148
146
  nodeDev: e == null ? void 0 : e.nodeDev,
149
- windowConfig: l.windowConfig,
150
- systemInfo: l.systemInfo,
151
- "old-systemKey": l.systemKey,
147
+ windowConfig: u.windowConfig,
148
+ systemInfo: u.systemInfo,
149
+ "old-systemKey": u.systemKey,
152
150
  onBuildContent: K,
153
151
  onProjectLogin: j,
154
152
  onClearLogin: U,
155
- onUpdateApiUrl: R,
156
- onOpenThreeBuild: b,
157
- pageKey: l.pageKey,
158
- onThreeData: k,
159
- onSetLoginInfo: N,
153
+ onUpdateApiUrl: b,
154
+ onOpenThreeBuild: k,
155
+ pageKey: u.pageKey,
156
+ onThreeData: N,
157
+ onSetLoginInfo: R,
160
158
  loginContent: e == null ? void 0 : e.loginContent
161
159
  }, null, 8, ["mode", "content", "jsonContents", "pathContent", "showButton", "nodeDev", "windowConfig", "systemInfo", "old-systemKey", "pageKey", "loginContent"]))
162
160
  ]);
163
161
  };
164
162
  }
165
- }), le = /* @__PURE__ */ ee(ne, [["__scopeId", "data-v-93bae600"]]);
163
+ }), ue = /* @__PURE__ */ ee(ne, [["__scopeId", "data-v-856e9674"]]);
166
164
  export {
167
- le as default
165
+ ue as default
168
166
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("./menu-__WRVDPn.cjs"),w=require("./index-DSY_gOa-.cjs"),M=require("./index-CgeLsBKu.cjs"),v=require("vue-router"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N={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"],setup(r,{emit:S}){const I=v.useRouter(),l=s.useLoginState(s.pinia),{loginUserInfo:f}=s.storeToRefs(l),{initSystemInfo:L}=w.useModelManagement(),A=s.useModelComp(s.pinia),{refreshLogin:C}=s.storeToRefs(A),_=s.useMenuState(s.pinia),y=o.ref(!0),B=v.useRoute(),e=r,u=S,T=o.computed(()=>{var t,n;return(e==null?void 0:e.showButton)||((n=(t=f.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)&&!C.value&&(await M.loginUp(t),status&&(await w.verifyStructureDataToStore(),I.push("/"),l.setLogRecordAsync({type:"登录",data:{account:((n=f.value)==null?void 0:n.account)??((i=f.value)==null?void 0:i.账号),userName:((a=f.value)==null?void 0:a.姓名)||((c=f.value)==null?void 0:c.userName)||"未知"}},"/login","login"),_.setHasClickEditComp(!1))),B.path==="/"||!(t!=null&&t.account&&(t!=null&&t.password)&&!C.value)||await o.nextTick(),y.value=!1},{deep:!0,immediate:!0});const D=t=>{u("projectLogin",t)},E=()=>{u("projectLogin","")};o.watch(()=>[e==null?void 0:e.systemKey,e==null?void 0:e.systemInfo],async([t,n])=>{l.setSystemKey(t),t!==""&&sessionStorage.setItem("systemKey",t)},{immediate:!0}),o.watch(()=>e==null?void 0:e.interfaceContent,()=>{var i,a,c,m,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(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"));n=(m=n==null?void 0:n.split("="))==null?void 0:m[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(),l.setExtraUrl(n??""),l.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=w.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?l.setSystemInfo(e.systemInfo):await L()});const j=()=>{u("buildContent")},k=()=>{u("setLoginInfo")},R=t=>{u("openThreeBuild",t)},U=t=>{u("threeData",t)},K=t=>{u("updateApiUrl",t)},g=()=>{var m;const t=e!=null&&e.windowConfig?(m=e==null?void 0:e.windowConfig)==null?void 0:m.width:window.innerWidth,n=1920,i=16,a=t/n,c=i*a;document.documentElement.style.fontSize=`${c}px`};return o.onMounted(()=>{g(),window.addEventListener("resize",g)}),o.onUnmounted(()=>{window.removeEventListener("resize",g)}),(t,n)=>{const i=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",null,[y.value?(o.openBlock(),o.createElementBlock("div",N)):(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:T.value,nodeDev:e==null?void 0:e.nodeDev,windowConfig:r.windowConfig,systemInfo:r.systemInfo,"old-systemKey":r.systemKey,onBuildContent:j,onProjectLogin:D,onClearLogin:E,onUpdateApiUrl:K,onOpenThreeBuild:R,pageKey:r.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=b._export_sfc(x,[["__scopeId","data-v-856e9674"]]);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-q3DGLIIs.cjs");const C=require("./index-BpPyaNFa.cjs");require("./dayjs.min-DVo59XIL.cjs");require("./index-lSSjgCKI.cjs");const q=require("./menu-__WRVDPn.cjs");require("./request-BC2w2vGr.cjs");;/* empty css */const s=require("./ss-component2.cjs"),t=require("./index-RoXicHV9.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-BideAELp.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-FTqf_S3u.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CvQ7eB-s.cjs")).then(e=>e.index));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BiHTzoZU.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B9uydKfA.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-DMo9-VrK.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-BAdqELon.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-C7e-tZfB.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=q.useMenuState(),v=[r,i,c,l,m,u,a,h,f],P=e=>{v.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-q3DGLIIs.cjs");const C=require("./index-BpPyaNFa.cjs");require("./dayjs.min-DVo59XIL.cjs");require("./index-lSSjgCKI.cjs");const q=require("./menu-__WRVDPn.cjs");require("./request-BC2w2vGr.cjs");;/* empty css */const s=require("./ss-component2.cjs"),t=require("./index-RoXicHV9.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-BideAELp.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-FTqf_S3u.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CvQ7eB-s.cjs")).then(e=>e.index));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-awWsblzO.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B9uydKfA.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-DMo9-VrK.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-BAdqELon.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-C7e-tZfB.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=q.useMenuState(),v=[r,i,c,l,m,u,a,h,f],P=e=>{v.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;