ss-component-new 1.3.319 → 1.3.320
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-B6SYyeqE.cjs +1 -0
- package/dist/index-D0w-Hm6j.js +159 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +1 -1
- package/package.json +1 -1
- package/dist/index-BTcgiJQk.cjs +0 -1
- package/dist/index-yewjqcVf.js +0 -150
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),s=require("./menu-FU5yiMy8.cjs"),h=require("./index-aziCJXBJ.cjs"),K=require("./index-CFjmSYEv.cjs"),M=require("vue-router"),U=require("./index-W8p89C7t.cjs"),x=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N={key:0},q=n.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=M.useRouter(),l=s.useLoginState(s.pinia),{loginUserInfo:f}=s.storeToRefs(l),{initSystemInfo:L}=h.useModelManagement(),_=s.useModelComp(s.pinia),{refreshLogin:C}=s.storeToRefs(_),B=s.useMenuState(s.pinia),y=n.ref(!1),w=n.ref(),e=r,u=S,E=n.computed(()=>{var t,o;return(e==null?void 0:e.showButton)||((o=(t=f.value)==null?void 0:t.layer)==null?void 0:o.toUpperCase())==="SUPERADMIN"});n.watch(()=>e==null?void 0:e.loginContent,async()=>{var o,c,i,a;y.value=!0,w.value=U.ElLoading.service({lock:!0,text:"正在网络加载中.....",background:"rgba(0, 0, 0, 0.7)"});let t=e==null?void 0:e.loginContent;t!=null&&t.account&&(t!=null&&t.password)&&!C.value&&(K.loginUp(t),status&&(await h.verifyStructureDataToStore(),I.push("/"),l.setLogRecordAsync({type:"登录",data:{account:((o=f.value)==null?void 0:o.account)??((c=f.value)==null?void 0:c.账号),userName:((i=f.value)==null?void 0:i.姓名)||((a=f.value)==null?void 0:a.userName)||"未知"}},"/login","login"),B.setHasClickEditComp(!1))),w.value.close(),y.value=!1},{deep:!0,immediate:!0});const A=t=>{u("projectLogin",t)},j=()=>{u("projectLogin","")};n.watch(()=>[e==null?void 0:e.systemKey,e==null?void 0:e.systemInfo],async([t,o])=>{l.setSystemKey(t),t!==""&&sessionStorage.setItem("systemKey",t)},{immediate:!0}),n.watch(()=>e==null?void 0:e.interfaceContent,()=>{var c,i,a,m,v;if(!(e!=null&&e.interfaceContent)||Array.isArray(e==null?void 0:e.interfaceContent)&&((c=e==null?void 0:e.interfaceContent)==null?void 0:c.length)===0)return;let t=(i=e==null?void 0:e.interfaceContent)==null?void 0:i.find(d=>d==null?void 0:d.includes("VITE_API_NEW_URL")),o=(a=e==null?void 0:e.interfaceContent)==null?void 0:a.find(d=>d==null?void 0:d.includes("VITE_FACE_RECOGNITION_API_URL"));o=(m=o==null?void 0:o.split("="))==null?void 0:m[1],o=o==null?void 0:o.trim(),t=(v=t==null?void 0:t.split("="))==null?void 0:v[1],t=t==null?void 0:t.trim(),l.setExtraUrl(o??""),l.setSystemUrl(t??"")},{immediate:!0,deep:!0}),n.onMounted(async()=>{e.systemInfo?l.setSystemInfo(e.systemInfo):await L()});const k=()=>{u("buildContent")},T=()=>{u("setLoginInfo")},D=t=>{u("openThreeBuild",t)},R=t=>{u("threeData",t)},b=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,o=1920,c=16,i=t/o,a=c*i;document.documentElement.style.fontSize=`${a}px`};return n.onMounted(()=>{g(),window.addEventListener("resize",g)}),n.onUnmounted(()=>{window.removeEventListener("resize",g)}),(t,o)=>{var i,a;const c=n.resolveComponent("router-view");return n.openBlock(),n.createElementBlock("div",null,[(i=e==null?void 0:e.loginContent)!=null&&i.account&&((a=e==null?void 0:e.loginContent)!=null&&a.password)&&!n.unref(C)&&y.value?(n.openBlock(),n.createElementBlock("div",N)):n.createCommentVNode("",!0),y.value?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(c,{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:E.value,nodeDev:e==null?void 0:e.nodeDev,windowConfig:r.windowConfig,systemInfo:r.systemInfo,"old-systemKey":r.systemKey,onBuildContent:k,onProjectLogin:A,onClearLogin:j,onUpdateApiUrl:b,onOpenThreeBuild:D,pageKey:r.pageKey,onThreeData:R,onSetLoginInfo:T,loginContent:e==null?void 0:e.loginContent},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","systemInfo","old-systemKey","pageKey","loginContent"]))])}}}),O=x._export_sfc(q,[["__scopeId","data-v-ca898177"]]);exports.default=O;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { defineComponent as O, ref as S, computed as x, watch as y, onMounted as I, onUnmounted as F, resolveComponent as P, createElementBlock as L, openBlock as g, createCommentVNode as _, createBlock as W, unref as G } from "vue";
|
|
2
|
+
import { b as H, p as C, s as E, a as $, u as q } from "./menu-B5Ed9tCx.js";
|
|
3
|
+
import { u as J, v as Q } from "./index-C6e8tITh.js";
|
|
4
|
+
import { l as V } from "./index-CjYwnKjV.js";
|
|
5
|
+
import { useRouter as X } from "vue-router";
|
|
6
|
+
import { E as Y } from "./index-C81Qb0f2.js";
|
|
7
|
+
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const p = { key: 0 }, ee = /* @__PURE__ */ O({
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: {
|
|
11
|
+
windowConfig: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => {
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
systemInfo: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => {
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
systemKey: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
pathContent: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
mode: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "view"
|
|
32
|
+
},
|
|
33
|
+
content: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
jsonContents: {
|
|
38
|
+
type: Array,
|
|
39
|
+
default: () => []
|
|
40
|
+
},
|
|
41
|
+
showButton: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
},
|
|
45
|
+
nodeDev: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ""
|
|
48
|
+
},
|
|
49
|
+
pageKey: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
interfaceContent: {
|
|
54
|
+
type: Array,
|
|
55
|
+
default: () => []
|
|
56
|
+
},
|
|
57
|
+
loginContent: {
|
|
58
|
+
type: Object,
|
|
59
|
+
default: () => {
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
emits: ["buildContent", "openThreeBuild", "threeData", "setLoginInfo", "projectLogin", "updateApiUrl"],
|
|
64
|
+
setup(u, { emit: A }) {
|
|
65
|
+
const B = X(), d = H(C), { loginUserInfo: l } = E(d), { initSystemInfo: j } = J(), D = $(C), { refreshLogin: w } = E(D), K = q(C), m = S(!1), v = S(), e = u, s = A, T = x(() => {
|
|
66
|
+
var t, n;
|
|
67
|
+
return (e == null ? void 0 : e.showButton) || ((n = (t = l.value) == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
|
|
68
|
+
});
|
|
69
|
+
y(
|
|
70
|
+
() => e == null ? void 0 : e.loginContent,
|
|
71
|
+
async () => {
|
|
72
|
+
var n, a, o, i;
|
|
73
|
+
m.value = !0, v.value = Y.service({
|
|
74
|
+
lock: !0,
|
|
75
|
+
text: "正在网络加载中.....",
|
|
76
|
+
background: "rgba(0, 0, 0, 0.7)"
|
|
77
|
+
});
|
|
78
|
+
let t = e == null ? void 0 : e.loginContent;
|
|
79
|
+
t != null && t.account && (t != null && t.password) && !w.value && (V(t), status && (await Q(), B.push("/"), d.setLogRecordAsync({
|
|
80
|
+
type: "登录",
|
|
81
|
+
data: {
|
|
82
|
+
account: ((n = l.value) == null ? void 0 : n.account) ?? ((a = l.value) == null ? void 0 : a.账号),
|
|
83
|
+
userName: ((o = l.value) == null ? void 0 : o.姓名) || ((i = l.value) == null ? void 0 : i.userName) || "未知"
|
|
84
|
+
}
|
|
85
|
+
}, "/login", "login"), K.setHasClickEditComp(!1))), v.value.close(), m.value = !1;
|
|
86
|
+
},
|
|
87
|
+
{ deep: !0, immediate: !0 }
|
|
88
|
+
);
|
|
89
|
+
const U = (t) => {
|
|
90
|
+
s("projectLogin", t);
|
|
91
|
+
}, b = () => {
|
|
92
|
+
s("projectLogin", "");
|
|
93
|
+
};
|
|
94
|
+
y(() => [e == null ? void 0 : e.systemKey, e == null ? void 0 : e.systemInfo], async ([t, n]) => {
|
|
95
|
+
d.setSystemKey(t), t !== "" && sessionStorage.setItem("systemKey", t);
|
|
96
|
+
}, { immediate: !0 }), y(
|
|
97
|
+
() => e == null ? void 0 : e.interfaceContent,
|
|
98
|
+
() => {
|
|
99
|
+
var a, o, i, f, h;
|
|
100
|
+
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;
|
|
101
|
+
let t = (o = e == null ? void 0 : e.interfaceContent) == null ? void 0 : o.find((c) => c == null ? void 0 : c.includes("VITE_API_NEW_URL")), n = (i = e == null ? void 0 : e.interfaceContent) == null ? void 0 : i.find((c) => c == null ? void 0 : c.includes("VITE_FACE_RECOGNITION_API_URL"));
|
|
102
|
+
n = (f = n == null ? void 0 : n.split("=")) == null ? void 0 : f[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(), d.setExtraUrl(n ?? ""), d.setSystemUrl(t ?? "");
|
|
103
|
+
},
|
|
104
|
+
{ immediate: !0, deep: !0 }
|
|
105
|
+
), I(async () => {
|
|
106
|
+
e.systemInfo ? d.setSystemInfo(e.systemInfo) : await j();
|
|
107
|
+
});
|
|
108
|
+
const k = () => {
|
|
109
|
+
s("buildContent");
|
|
110
|
+
}, R = () => {
|
|
111
|
+
s("setLoginInfo");
|
|
112
|
+
}, M = (t) => {
|
|
113
|
+
s("openThreeBuild", t);
|
|
114
|
+
}, N = (t) => {
|
|
115
|
+
s("threeData", t);
|
|
116
|
+
}, z = (t) => {
|
|
117
|
+
s("updateApiUrl", t);
|
|
118
|
+
}, r = () => {
|
|
119
|
+
var f;
|
|
120
|
+
const t = e != null && e.windowConfig ? (f = e == null ? void 0 : e.windowConfig) == null ? void 0 : f.width : window.innerWidth, n = 1920, a = 16, o = t / n, i = a * o;
|
|
121
|
+
document.documentElement.style.fontSize = `${i}px`;
|
|
122
|
+
};
|
|
123
|
+
return I(() => {
|
|
124
|
+
r(), window.addEventListener("resize", r);
|
|
125
|
+
}), F(() => {
|
|
126
|
+
window.removeEventListener("resize", r);
|
|
127
|
+
}), (t, n) => {
|
|
128
|
+
var o, i;
|
|
129
|
+
const a = P("router-view");
|
|
130
|
+
return g(), L("div", null, [
|
|
131
|
+
(o = e == null ? void 0 : e.loginContent) != null && o.account && ((i = e == null ? void 0 : e.loginContent) != null && i.password) && !G(w) && m.value ? (g(), L("div", p)) : _("", !0),
|
|
132
|
+
m.value ? _("", !0) : (g(), W(a, {
|
|
133
|
+
key: 1,
|
|
134
|
+
mode: e == null ? void 0 : e.mode,
|
|
135
|
+
content: e == null ? void 0 : e.content,
|
|
136
|
+
jsonContents: e == null ? void 0 : e.jsonContents,
|
|
137
|
+
pathContent: e == null ? void 0 : e.pathContent,
|
|
138
|
+
showButton: T.value,
|
|
139
|
+
nodeDev: e == null ? void 0 : e.nodeDev,
|
|
140
|
+
windowConfig: u.windowConfig,
|
|
141
|
+
systemInfo: u.systemInfo,
|
|
142
|
+
"old-systemKey": u.systemKey,
|
|
143
|
+
onBuildContent: k,
|
|
144
|
+
onProjectLogin: U,
|
|
145
|
+
onClearLogin: b,
|
|
146
|
+
onUpdateApiUrl: z,
|
|
147
|
+
onOpenThreeBuild: M,
|
|
148
|
+
pageKey: u.pageKey,
|
|
149
|
+
onThreeData: N,
|
|
150
|
+
onSetLoginInfo: R,
|
|
151
|
+
loginContent: e == null ? void 0 : e.loginContent
|
|
152
|
+
}, null, 8, ["mode", "content", "jsonContents", "pathContent", "showButton", "nodeDev", "windowConfig", "systemInfo", "old-systemKey", "pageKey", "loginContent"]))
|
|
153
|
+
]);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}), de = /* @__PURE__ */ Z(ee, [["__scopeId", "data-v-ca898177"]]);
|
|
157
|
+
export {
|
|
158
|
+
de as default
|
|
159
|
+
};
|
package/dist/ss-component.cjs
CHANGED
|
@@ -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-B1YdRpLC.cjs");const C=require("./index-BpPyaNFa.cjs");require("./dayjs.min-CKeZNApM.cjs");require("./index-Bi3chwDQ.cjs");const q=require("./menu-FU5yiMy8.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-vQ17tgzX.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BfoNwJYn.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-kCIwjtpa.cjs")).then(e=>e.index));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-
|
|
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-B1YdRpLC.cjs");const C=require("./index-BpPyaNFa.cjs");require("./dayjs.min-CKeZNApM.cjs");require("./index-Bi3chwDQ.cjs");const q=require("./menu-FU5yiMy8.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-vQ17tgzX.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BfoNwJYn.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-kCIwjtpa.cjs")).then(e=>e.index));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B6SYyeqE.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BS1qv-TP.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-BuytoK__.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-B0JqdXMa.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-BfyPonp9.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;
|