ss-component-new 1.3.325 → 1.3.327
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,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as M, ref as z, computed as O, watch as y, onMounted as S, onUnmounted as F, resolveComponent as P, createElementBlock as v, openBlock as g, createCommentVNode as I, createBlock as
|
|
2
|
-
import { b as
|
|
3
|
-
import { u as
|
|
4
|
-
import { l as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { _ as
|
|
7
|
-
const
|
|
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";
|
|
3
|
+
import { u as Q, v as X, f as Y } from "./index-iBPVokNX.js";
|
|
4
|
+
import { l as Z } from "./index-DwFvAU1D.js";
|
|
5
|
+
import { useRouter as p } from "vue-router";
|
|
6
|
+
import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const te = { key: 0 }, ne = /* @__PURE__ */ M({
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
windowConfig: {
|
|
@@ -61,7 +61,7 @@ const ee = { key: 0 }, te = /* @__PURE__ */ M({
|
|
|
61
61
|
},
|
|
62
62
|
emits: ["buildContent", "openThreeBuild", "threeData", "setLoginInfo", "projectLogin", "updateApiUrl"],
|
|
63
63
|
setup(l, { emit: A }) {
|
|
64
|
-
const _ =
|
|
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(() => {
|
|
65
65
|
var t, n;
|
|
66
66
|
return (e == null ? void 0 : e.showButton) || ((n = (t = u.value) == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
|
|
67
67
|
});
|
|
@@ -71,13 +71,13 @@ const ee = { key: 0 }, te = /* @__PURE__ */ M({
|
|
|
71
71
|
var n, a, o, 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
|
|
74
|
+
t != null && t.account && (t != null && t.password) && !w.value && (await Z(t), status && (await X(), _.push("/"), c.setLogRecordAsync({
|
|
75
75
|
type: "登录",
|
|
76
76
|
data: {
|
|
77
77
|
account: ((n = u.value) == null ? void 0 : n.account) ?? ((a = u.value) == null ? void 0 : a.账号),
|
|
78
78
|
userName: ((o = u.value) == null ? void 0 : o.姓名) || ((i = u.value) == null ? void 0 : i.userName) || "未知"
|
|
79
79
|
}
|
|
80
|
-
}, "/login", "login"),
|
|
80
|
+
}, "/login", "login"), B.setHasClickEditComp(!1))), f.value = !1, await x();
|
|
81
81
|
},
|
|
82
82
|
{ deep: !0, immediate: !0 }
|
|
83
83
|
);
|
|
@@ -99,10 +99,10 @@ const ee = { key: 0 }, te = /* @__PURE__ */ M({
|
|
|
99
99
|
{ immediate: !0, deep: !0 }
|
|
100
100
|
), S(async () => {
|
|
101
101
|
var n, a;
|
|
102
|
-
let t = await
|
|
102
|
+
let t = await q({});
|
|
103
103
|
if (((a = (n = t == null ? void 0 : t.data) == null ? void 0 : n.result) == null ? void 0 : a.length) === 0) {
|
|
104
|
-
const o =
|
|
105
|
-
await
|
|
104
|
+
const o = Y(Date.now());
|
|
105
|
+
await J({
|
|
106
106
|
userName: "admin",
|
|
107
107
|
password: "123456",
|
|
108
108
|
platName: "insofworks",
|
|
@@ -118,11 +118,11 @@ const ee = { key: 0 }, te = /* @__PURE__ */ M({
|
|
|
118
118
|
s("buildContent");
|
|
119
119
|
}, N = () => {
|
|
120
120
|
s("setLoginInfo");
|
|
121
|
-
},
|
|
121
|
+
}, k = (t) => {
|
|
122
122
|
s("openThreeBuild", t);
|
|
123
|
-
},
|
|
123
|
+
}, R = (t) => {
|
|
124
124
|
s("threeData", t);
|
|
125
|
-
},
|
|
125
|
+
}, b = (t) => {
|
|
126
126
|
s("updateApiUrl", t);
|
|
127
127
|
}, r = () => {
|
|
128
128
|
var m;
|
|
@@ -137,14 +137,14 @@ const ee = { key: 0 }, te = /* @__PURE__ */ M({
|
|
|
137
137
|
var o, i;
|
|
138
138
|
const a = P("router-view");
|
|
139
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) && !
|
|
141
|
-
f.value ? I("", !0) : (g(),
|
|
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, {
|
|
142
142
|
key: 1,
|
|
143
143
|
mode: e == null ? void 0 : e.mode,
|
|
144
144
|
content: e == null ? void 0 : e.content,
|
|
145
145
|
jsonContents: e == null ? void 0 : e.jsonContents,
|
|
146
146
|
pathContent: e == null ? void 0 : e.pathContent,
|
|
147
|
-
showButton:
|
|
147
|
+
showButton: E.value,
|
|
148
148
|
nodeDev: e == null ? void 0 : e.nodeDev,
|
|
149
149
|
windowConfig: l.windowConfig,
|
|
150
150
|
systemInfo: l.systemInfo,
|
|
@@ -152,17 +152,17 @@ const ee = { key: 0 }, te = /* @__PURE__ */ M({
|
|
|
152
152
|
onBuildContent: K,
|
|
153
153
|
onProjectLogin: j,
|
|
154
154
|
onClearLogin: U,
|
|
155
|
-
onUpdateApiUrl:
|
|
156
|
-
onOpenThreeBuild:
|
|
155
|
+
onUpdateApiUrl: b,
|
|
156
|
+
onOpenThreeBuild: k,
|
|
157
157
|
pageKey: l.pageKey,
|
|
158
|
-
onThreeData:
|
|
158
|
+
onThreeData: R,
|
|
159
159
|
onSetLoginInfo: N,
|
|
160
160
|
loginContent: e == null ? void 0 : e.loginContent
|
|
161
161
|
}, null, 8, ["mode", "content", "jsonContents", "pathContent", "showButton", "nodeDev", "windowConfig", "systemInfo", "old-systemKey", "pageKey", "loginContent"]))
|
|
162
162
|
]);
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
}),
|
|
165
|
+
}), le = /* @__PURE__ */ ee(ne, [["__scopeId", "data-v-40f2f38a"]]);
|
|
166
166
|
export {
|
|
167
|
-
|
|
167
|
+
le as default
|
|
168
168
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("./menu-__WRVDPn.cjs"),C=require("./index-DSY_gOa-.cjs"),R=require("./index-CgeLsBKu.cjs"),U=require("vue-router"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},b=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 v=U.useRouter(),l=c.useLoginState(c.pinia),{loginUserInfo:f}=c.storeToRefs(l),{initSystemInfo:I}=C.useModelManagement(),L=c.useModelComp(c.pinia),{refreshLogin:w}=c.storeToRefs(L),A=c.useMenuState(c.pinia),y=o.ref(!0),e=r,u=S,_=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,a,i,s;y.value=!0;let t=e==null?void 0:e.loginContent;t!=null&&t.account&&(t!=null&&t.password)&&!w.value&&(await R.loginUp(t),status&&(await C.verifyStructureDataToStore(),v.push("/"),l.setLogRecordAsync({type:"登录",data:{account:((n=f.value)==null?void 0:n.account)??((a=f.value)==null?void 0:a.账号),userName:((i=f.value)==null?void 0:i.姓名)||((s=f.value)==null?void 0:s.userName)||"未知"}},"/login","login"),A.setHasClickEditComp(!1))),y.value=!1,await o.nextTick()},{deep:!0,immediate:!0});const B=t=>{u("projectLogin",t)},T=()=>{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 a,i,s,m,h;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;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")),n=(s=e==null?void 0:e.interfaceContent)==null?void 0:s.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,a;let t=await c.getSystemDataApi({});if(((a=(n=t==null?void 0:t.data)==null?void 0:n.result)==null?void 0:a.length)===0){const i=C.formatterTimeStr(Date.now());let s={userName:"admin",password:"123456",platName:"insofworks",platType:"browser",platVersion:"t1",platCreatedAt:i,platUpdatedAt:i};await c.createPlatFormDataApi(s)}e.systemInfo?l.setSystemInfo(e.systemInfo):await I()});const D=()=>{u("buildContent")},E=()=>{u("setLoginInfo")},j=t=>{u("openThreeBuild",t)},k=t=>{u("threeData",t)},N=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,a=16,i=t/n,s=a*i;document.documentElement.style.fontSize=`${s}px`};return o.onMounted(()=>{g(),window.addEventListener("resize",g)}),o.onUnmounted(()=>{window.removeEventListener("resize",g)}),(t,n)=>{var i,s;const a=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",null,[(i=e==null?void 0:e.loginContent)!=null&&i.account&&((s=e==null?void 0:e.loginContent)!=null&&s.password)&&!o.unref(w)&&y.value?(o.openBlock(),o.createElementBlock("div",M)):o.createCommentVNode("",!0),y.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(a,{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:_.value,nodeDev:e==null?void 0:e.nodeDev,windowConfig:r.windowConfig,systemInfo:r.systemInfo,"old-systemKey":r.systemKey,onBuildContent:D,onProjectLogin:B,onClearLogin:T,onUpdateApiUrl:N,onOpenThreeBuild:j,pageKey:r.pageKey,onThreeData:k,onSetLoginInfo:E,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(b,[["__scopeId","data-v-40f2f38a"]]);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-WkQaf_Q3.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;
|