ss-component-new 1.3.334 → 1.3.335
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-JyB5Squs.js → index-Bj-oKOA2.js} +29 -29
- package/dist/index-CgNlGWth.cjs +1 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +1 -1
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -8
- package/package.json +1 -1
- package/dist/index-DzcE8g4h.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { b as J, p as C, s as
|
|
1
|
+
import { defineComponent as O, ref as M, computed as z, watch as g, nextTick as P, onMounted as S, onUnmounted as x, resolveComponent as F, createElementBlock as v, openBlock as w, createBlock as W } from "vue";
|
|
2
|
+
import { b as J, p as C, s as I, a as G, u as H, g as $, d as p } from "./menu-BRhQwt8l.js";
|
|
3
3
|
import { u as q, v as Q, f as X } from "./index-iBPVokNX.js";
|
|
4
4
|
import { l as Y } from "./index-DwFvAU1D.js";
|
|
5
5
|
import { useRouter as Z, useRoute as V } from "vue-router";
|
|
6
6
|
import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const te = { key: 0 }, ne = /* @__PURE__ */
|
|
7
|
+
const te = { key: 0 }, ne = /* @__PURE__ */ O({
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
windowConfig: {
|
|
@@ -60,44 +60,44 @@ const te = { key: 0 }, ne = /* @__PURE__ */ M({
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
emits: ["buildContent", "openThreeBuild", "threeData", "setLoginInfo", "projectLogin", "updateApiUrl"],
|
|
63
|
-
setup(l, { emit:
|
|
64
|
-
const
|
|
63
|
+
setup(l, { emit: L }) {
|
|
64
|
+
const A = Z(), u = J(C), { loginUserInfo: f } = I(u), { initSystemInfo: _ } = q(), T = G(C), { refreshLogin: D } = I(T), B = H(C), m = M(!0), r = V(), e = l, s = L, E = z(() => {
|
|
65
65
|
var t, n;
|
|
66
66
|
return (e == null ? void 0 : e.showButton) || ((n = (t = f.value) == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
|
|
67
67
|
});
|
|
68
|
-
|
|
68
|
+
g(
|
|
69
69
|
() => e == null ? void 0 : e.loginContent,
|
|
70
70
|
async () => {
|
|
71
71
|
var n, o, a, i;
|
|
72
72
|
m.value = !0;
|
|
73
73
|
let t = e == null ? void 0 : e.loginContent;
|
|
74
|
-
t != null && t.account && (t != null && t.password) && !
|
|
74
|
+
t != null && t.account && (t != null && t.password) && !D.value && (await Y(t), status && (await Q(), await A.push("/"), await new Promise((d) => setTimeout(d, 50)), u.setLogRecordAsync({
|
|
75
75
|
type: "登录",
|
|
76
76
|
data: {
|
|
77
77
|
account: ((n = f.value) == null ? void 0 : n.account) ?? ((o = f.value) == null ? void 0 : o.账号),
|
|
78
78
|
userName: ((a = f.value) == null ? void 0 : a.姓名) || ((i = f.value) == null ? void 0 : i.userName) || "未知"
|
|
79
79
|
}
|
|
80
|
-
}, "/login", "login"),
|
|
80
|
+
}, "/login", "login"), B.setHasClickEditComp(!1))), console.log(232, JSON.stringify(r.path), JSON.stringify(m.value)), r.path === "/" || !(t != null && t.account) || !(t != null && t.password) || r.path === "/" ? m.value = !1 : await P();
|
|
81
81
|
},
|
|
82
82
|
{ deep: !0, immediate: !0 }
|
|
83
83
|
);
|
|
84
|
-
const
|
|
84
|
+
const j = (t) => {
|
|
85
85
|
s("projectLogin", t);
|
|
86
|
-
},
|
|
86
|
+
}, N = () => {
|
|
87
87
|
s("projectLogin", "");
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
g(() => [e == null ? void 0 : e.systemKey, e == null ? void 0 : e.systemInfo], async ([t, n]) => {
|
|
90
90
|
u.setSystemKey(t), t !== "" && sessionStorage.setItem("systemKey", t);
|
|
91
|
-
}, { immediate: !0 }),
|
|
91
|
+
}, { immediate: !0 }), g(
|
|
92
92
|
() => e == null ? void 0 : e.interfaceContent,
|
|
93
93
|
() => {
|
|
94
|
-
var o, a, i, d,
|
|
94
|
+
var o, a, i, d, h;
|
|
95
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
96
|
let t = (a = e == null ? void 0 : e.interfaceContent) == null ? void 0 : a.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"));
|
|
97
|
-
n = (d = n == null ? void 0 : n.split("=")) == null ? void 0 : d[1], n = n == null ? void 0 : n.trim(), t = (
|
|
97
|
+
n = (d = n == null ? void 0 : n.split("=")) == null ? void 0 : d[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(), u.setExtraUrl(n ?? ""), u.setSystemUrl(t ?? "");
|
|
98
98
|
},
|
|
99
99
|
{ immediate: !0, deep: !0 }
|
|
100
|
-
),
|
|
100
|
+
), S(async () => {
|
|
101
101
|
var n, o;
|
|
102
102
|
let t = await $({});
|
|
103
103
|
if (((o = (n = t == null ? void 0 : t.data) == null ? void 0 : n.result) == null ? void 0 : o.length) === 0) {
|
|
@@ -112,55 +112,55 @@ const te = { key: 0 }, ne = /* @__PURE__ */ M({
|
|
|
112
112
|
platUpdatedAt: a
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
e.systemInfo ? u.setSystemInfo(e.systemInfo) : await
|
|
115
|
+
e.systemInfo ? u.setSystemInfo(e.systemInfo) : await _();
|
|
116
116
|
});
|
|
117
117
|
const U = () => {
|
|
118
118
|
s("buildContent");
|
|
119
119
|
}, K = () => {
|
|
120
120
|
s("setLoginInfo");
|
|
121
|
-
},
|
|
121
|
+
}, R = (t) => {
|
|
122
122
|
s("openThreeBuild", t);
|
|
123
|
-
},
|
|
123
|
+
}, b = (t) => {
|
|
124
124
|
s("threeData", t);
|
|
125
|
-
},
|
|
125
|
+
}, k = (t) => {
|
|
126
126
|
s("updateApiUrl", t);
|
|
127
127
|
}, y = () => {
|
|
128
128
|
var d;
|
|
129
129
|
const t = e != null && e.windowConfig ? (d = e == null ? void 0 : e.windowConfig) == null ? void 0 : d.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
|
|
132
|
+
return S(() => {
|
|
133
133
|
y(), window.addEventListener("resize", y);
|
|
134
134
|
}), x(() => {
|
|
135
135
|
window.removeEventListener("resize", y);
|
|
136
136
|
}), (t, n) => {
|
|
137
137
|
const o = F("router-view");
|
|
138
|
-
return
|
|
139
|
-
m.value ? (
|
|
138
|
+
return w(), v("div", null, [
|
|
139
|
+
m.value ? (w(), v("div", te)) : (w(), W(o, {
|
|
140
140
|
key: 1,
|
|
141
141
|
mode: e == null ? void 0 : e.mode,
|
|
142
142
|
content: e == null ? void 0 : e.content,
|
|
143
143
|
jsonContents: e == null ? void 0 : e.jsonContents,
|
|
144
144
|
pathContent: e == null ? void 0 : e.pathContent,
|
|
145
|
-
showButton:
|
|
145
|
+
showButton: E.value,
|
|
146
146
|
nodeDev: e == null ? void 0 : e.nodeDev,
|
|
147
147
|
windowConfig: l.windowConfig,
|
|
148
148
|
systemInfo: l.systemInfo,
|
|
149
149
|
"old-systemKey": l.systemKey,
|
|
150
150
|
onBuildContent: U,
|
|
151
|
-
onProjectLogin:
|
|
152
|
-
onClearLogin:
|
|
153
|
-
onUpdateApiUrl:
|
|
154
|
-
onOpenThreeBuild:
|
|
151
|
+
onProjectLogin: j,
|
|
152
|
+
onClearLogin: N,
|
|
153
|
+
onUpdateApiUrl: k,
|
|
154
|
+
onOpenThreeBuild: R,
|
|
155
155
|
pageKey: l.pageKey,
|
|
156
|
-
onThreeData:
|
|
156
|
+
onThreeData: b,
|
|
157
157
|
onSetLoginInfo: K,
|
|
158
158
|
loginContent: e == null ? void 0 : e.loginContent
|
|
159
159
|
}, null, 8, ["mode", "content", "jsonContents", "pathContent", "showButton", "nodeDev", "windowConfig", "systemInfo", "old-systemKey", "pageKey", "loginContent"]))
|
|
160
160
|
]);
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
}), ue = /* @__PURE__ */ ee(ne, [["__scopeId", "data-v-
|
|
163
|
+
}), ue = /* @__PURE__ */ ee(ne, [["__scopeId", "data-v-d494b9df"]]);
|
|
164
164
|
export {
|
|
165
165
|
ue as default
|
|
166
166
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("./menu-__WRVDPn.cjs"),C=require("./index-DSY_gOa-.cjs"),b=require("./index-CgeLsBKu.cjs"),S=require("vue-router"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},O=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 I=S.useRouter(),r=s.useLoginState(s.pinia),{loginUserInfo:m}=s.storeToRefs(r),{initSystemInfo:L}=C.useModelManagement(),A=s.useModelComp(s.pinia),{refreshLogin:_}=s.storeToRefs(A),T=s.useMenuState(s.pinia),y=o.ref(!0),g=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)&&!_.value&&(await b.loginUp(t),status&&(await C.verifyStructureDataToStore(),await I.push("/"),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))),console.log(232,JSON.stringify(g.path),JSON.stringify(y.value)),g.path==="/"||!(t!=null&&t.account)||!(t!=null&&t.password)||g.path==="/"?y.value=!1:await o.nextTick()},{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=C.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 L()});const j=()=>{d("buildContent")},k=()=>{d("setLoginInfo")},R=t=>{d("openThreeBuild",t)},N=t=>{d("threeData",t)},U=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",M)):(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:U,onOpenThreeBuild:R,pageKey:f.pageKey,onThreeData:N,onSetLoginInfo:k,loginContent:e==null?void 0:e.loginContent},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","systemInfo","old-systemKey","pageKey","loginContent"]))])}}}),x=K._export_sfc(O,[["__scopeId","data-v-d494b9df"]]);exports.default=x;
|
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-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-
|
|
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-CgNlGWth.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;
|