ss-component-new 1.2.57 → 1.2.59
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/animationData-CEkMmPAJ.js +111 -0
- package/dist/animationData-FLuoH13j.cjs +1 -0
- package/dist/{iconfont-Du5a0yIR.js → iconfont-Dp3iGl32.js} +318 -244
- package/dist/iconfont-ji7A-_XJ.cjs +1 -0
- package/dist/icons/svg/CopyAddMenu.svg +1 -0
- package/dist/icons/svg/DeleteMenu.svg +1 -0
- package/dist/icons/svg/FixedMenu.svg +1 -0
- package/dist/icons/svg//345/273/272/346/250/241/345/210/206/346/236/220.svg +1 -0
- package/dist/icons/svg//347/256/227/346/263/225.svg +1 -1
- package/dist/{index-BMMCYEsB.js → index--qwZeW47.js} +1 -1
- package/dist/{index-DtlFU8RR.cjs → index-B1U77nyf.cjs} +1 -1
- package/dist/index-BEfSpHE6.js +17 -0
- package/dist/{index-CEkY4nFt.js → index-BFHCLxvz.js} +1 -1
- package/dist/index-BN4opOSk.cjs +1 -0
- package/dist/{index-B55haWsS.js → index-BNES2eKm.js} +1 -1
- package/dist/{index-kXlrQUA8.js → index-BTwRUubF.js} +2 -2
- package/dist/{index-DmfzZIKw.cjs → index-BYIlecoJ.cjs} +1 -1
- package/dist/{index-D0NMKMU8.cjs → index-BgwYXT31.cjs} +1 -1
- package/dist/{index-hL7adbcf.js → index-BiUFu7a_.js} +1500 -1636
- package/dist/{index-DYopbovE.js → index-BooTgcW2.js} +1633 -1632
- package/dist/{index-CJVA_tHw.cjs → index-BxEjroD6.cjs} +1 -1
- package/dist/index-C14Eek69.js +32 -0
- package/dist/index-C8IFPtAJ.js +12233 -0
- package/dist/index-C9C84gkB.cjs +1 -0
- package/dist/{index-BO7R6DCb.cjs → index-CDW8XzWT.cjs} +1 -1
- package/dist/index-CHzlphv9.cjs +1 -0
- package/dist/{index-vrO7i-BX.cjs → index-CWG2zhJZ.cjs} +1 -1
- package/dist/{index-DURGsNBh.js → index-ChyicQIl.js} +1 -1
- package/dist/index-D57Bv8co.cjs +1 -0
- package/dist/{index-BPiXU1VF.js → index-DAJoy_Z5.js} +1 -1
- package/dist/{index-DhbAgrix.cjs → index-DIpWkFjh.cjs} +1 -1
- package/dist/index-DLU6Qv3w.cjs +15 -0
- package/dist/{index-BQWUpvXk.js → index-DN40xEbb.js} +2 -2
- package/dist/{index-HsZY-XbO.js → index-DNs7ujiq.js} +1 -1
- package/dist/{index-C8x2JQx7.cjs → index-DXGiAs1G.cjs} +1 -1
- package/dist/{index-D3cFqWf8.js → index-DZQjq0ZR.js} +1 -1
- package/dist/index-DkNldOC0.cjs +1 -0
- package/dist/{index-CgHWXZbW.cjs → index-DuamAhUi.cjs} +1 -1
- package/dist/index-DvgAOa6m.js +2858 -0
- package/dist/{index-By-PfzqJ.js → index-FUWILZwY.js} +16 -16
- package/dist/{index-C9QGZutp.cjs → index-JXXdn01K.cjs} +1 -1
- package/dist/{index-Du-GlV8c.cjs → index-LVKvj2hU.cjs} +1 -1
- package/dist/{index-D2vsFTnY.js → index-OLQpbvuS.js} +6 -6
- package/dist/{index-JGSZNtiO.js → index-YoJfAd5X.js} +1 -1
- package/dist/{index-BgLb2tvo.js → index-bcbWOGXs.js} +3 -3
- package/dist/{index-cOj9uZ5B.cjs → index-gcSJbApQ.cjs} +1 -1
- package/dist/index-lP-_9Gsb.cjs +1 -0
- package/dist/index-qDBAJZN2.cjs +1 -0
- package/dist/{index-GShz2NEi.js → index-rPWz6KHn.js} +2 -2
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bff2sYnQ.cjs +37 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DkxmFS5P.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D6uh0ooh.js} +10026 -10039
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-DlyCfLDJ.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-Dt5lXvbN.js +195 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-BEmLh6pe.js → index.vue_vue_type_style_index_1_lang-BUhvhTqt.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Dsas9C9w.cjs → index.vue_vue_type_style_index_1_lang-DDYxgdQk.cjs} +1 -1
- package/dist/{main-B59ixZA7.js → main-ChUyYPuq.js} +2 -2
- package/dist/{main-B3gx12Xo.cjs → main-D-bdppOV.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-CxRJigCx.cjs → threeModel-CDFo3As-.cjs} +1 -1
- package/dist/{threeModel-ardn7Q2K.js → threeModel-DcuAlWjb.js} +2 -2
- package/dist/{threePreview-L8T-JdQL.js → threePreview-DhMkG1np.js} +350 -380
- package/dist/threePreview-q4R-oAs6.cjs +1 -0
- package/dist/threeSceneView-CAsVH82L.cjs +5 -0
- package/dist/threeSceneView-Dav7AGkH.js +1288 -0
- package/dist/threeSceneViewForCPMPIP-9__8NGa5.cjs +5 -0
- package/dist/threeSceneViewForCPMPIP-DxFYivgN.js +599 -0
- package/dist/threeTrackPathView-B7yrSLKq.cjs +370 -0
- package/dist/{threeTrackPathView-gTDb6Ckq.js → threeTrackPathView-DXCMl3aZ.js} +307 -376
- package/dist/{xlsx-ByPOQ6N_.js → threeViewerHost-BNnzz6WM.js} +4414 -4032
- package/dist/threeViewerHost-D70yS3z2.cjs +104 -0
- package/dist/{workpieceTreePanel-GlMrvoGI.js → workpieceTreePanel-CCbVIIlm.js} +92 -101
- package/dist/workpieceTreePanel-KdP9UaVe.cjs +1 -0
- package/package.json +1 -1
- package/public/icons/svg/CopyAddMenu.svg +1 -0
- package/public/icons/svg/DeleteMenu.svg +1 -0
- package/public/icons/svg/FixedMenu.svg +1 -0
- package/public/icons/svg//345/273/272/346/250/241/345/210/206/346/236/220.svg +1 -0
- package/public/icons/svg//347/256/227/346/263/225.svg +1 -1
- package/dist/animationData-CSjRG83z.cjs +0 -1
- package/dist/animationData-DgukZCiZ.js +0 -69
- package/dist/dataUtil-Bg8jgTaT.js +0 -52
- package/dist/dataUtil-CflXOlIl.cjs +0 -1
- package/dist/fileUtil-CVIZ039M.js +0 -99
- package/dist/fileUtil-DugRTZPB.cjs +0 -1
- package/dist/iconfont-BUDQryy4.cjs +0 -1
- package/dist/index-BAkz3vaY.js +0 -12229
- package/dist/index-BE76NHis.js +0 -2848
- package/dist/index-CXGkiovm.cjs +0 -1
- package/dist/index-CaV-J52G.cjs +0 -1
- package/dist/index-D4y4pCNq.cjs +0 -1
- package/dist/index-DKQuP1UM.cjs +0 -1
- package/dist/index-DhPNGzbc.cjs +0 -1
- package/dist/index-fw0RZg-d.cjs +0 -15
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-til9urRl.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_0_scoped_92477073_lang-5Hi_RNl1.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_92477073_lang-DIFWhOl8.js +0 -212
- package/dist/threePreview-5-O-sZIc.cjs +0 -1
- package/dist/threeSceneView-BYl4rYgi.js +0 -1369
- package/dist/threeSceneView-igg9HZ8X.cjs +0 -5
- package/dist/threeSceneViewForCPMPIP-C-o-rOZ9.js +0 -662
- package/dist/threeSceneViewForCPMPIP-DfPj5iau.cjs +0 -5
- package/dist/threeTrackPathView-CgjLFXmL.cjs +0 -370
- package/dist/threeViewerHost-DvAkN_z-.js +0 -322
- package/dist/threeViewerHost-PGblwq3d.cjs +0 -1
- package/dist/workpieceTreePanel-Cr4nTOQE.cjs +0 -1
- package/dist/xlsx-BPHygxEf.cjs +0 -104
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
import { computed as _, defineComponent as Y, defineAsyncComponent as S, ref as B, watch as q, createElementBlock as O, openBlock as y, normalizeClass as J, createElementVNode as K, createBlock as P, createCommentVNode as L, renderSlot as p, unref as D, withCtx as T } from "vue";
|
|
2
|
-
import { a as A, c3 as Q, p as N, s as H } from "./index-DsSA-OiE.js";
|
|
3
|
-
import { u as z } from "./index-Ce_gZ72y.js";
|
|
4
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BZPnZF-N.js";
|
|
5
|
-
import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
function ue(l) {
|
|
7
|
-
const m = sessionStorage.getItem("loginToken") ?? "123456";
|
|
8
|
-
return A({
|
|
9
|
-
url: "/api/sysFile/uploadFile",
|
|
10
|
-
method: "post",
|
|
11
|
-
data: l,
|
|
12
|
-
headers: {
|
|
13
|
-
Authorization: m,
|
|
14
|
-
"Content-Type": "multipart/form-data"
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function Z(l) {
|
|
19
|
-
const m = sessionStorage.getItem("loginToken") ?? "123456";
|
|
20
|
-
return A({
|
|
21
|
-
url: "/api/sysFile/downloadFile",
|
|
22
|
-
method: "post",
|
|
23
|
-
data: l,
|
|
24
|
-
headers: {
|
|
25
|
-
Authorization: m,
|
|
26
|
-
Accept: "application/octet-stream"
|
|
27
|
-
// 明确要求返回二进制流
|
|
28
|
-
},
|
|
29
|
-
responseType: "blob"
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function me(l) {
|
|
33
|
-
const m = sessionStorage.getItem("loginToken") ?? "123456";
|
|
34
|
-
return A({
|
|
35
|
-
url: "/api/sysFile/uploadFiles",
|
|
36
|
-
method: "post",
|
|
37
|
-
data: l,
|
|
38
|
-
headers: {
|
|
39
|
-
Authorization: m,
|
|
40
|
-
"Content-Type": "multipart/form-data"
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
const x = Q("threeState", {
|
|
45
|
-
state: () => ({
|
|
46
|
-
data: {
|
|
47
|
-
extension: "",
|
|
48
|
-
// 当url为blobUrl时,需以此作为判断依据
|
|
49
|
-
url: [],
|
|
50
|
-
data: {},
|
|
51
|
-
isThreeScene: !0
|
|
52
|
-
}
|
|
53
|
-
}),
|
|
54
|
-
actions: {
|
|
55
|
-
setData(l) {
|
|
56
|
-
this.data = l;
|
|
57
|
-
},
|
|
58
|
-
getData() {
|
|
59
|
-
return this.data;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
function ee() {
|
|
64
|
-
const l = z(N), { platform: m } = H(l), v = x(N), k = _(() => {
|
|
65
|
-
var t;
|
|
66
|
-
return (t = v == null ? void 0 : v.data) == null ? void 0 : t.extension;
|
|
67
|
-
}), f = ["uv", "cpt", "cyd"], E = ["urdf"], o = ["obj", "stl"], r = [...f, ...E, ...o], U = (t) => {
|
|
68
|
-
if (!g())
|
|
69
|
-
throw new Error("不是三维系统");
|
|
70
|
-
v.setData(t);
|
|
71
|
-
}, d = () => v.getData(), g = () => m.value === "three", c = (t) => {
|
|
72
|
-
const s = t == null ? void 0 : t.toLowerCase(), i = s == null ? void 0 : s.lastIndexOf(".");
|
|
73
|
-
let h = s;
|
|
74
|
-
return i >= 0 && (h = h == null ? void 0 : h.slice(i + 1)), h;
|
|
75
|
-
}, F = (t) => {
|
|
76
|
-
if (!t)
|
|
77
|
-
return !1;
|
|
78
|
-
const s = c(t);
|
|
79
|
-
return r == null ? void 0 : r.includes(s);
|
|
80
|
-
};
|
|
81
|
-
return {
|
|
82
|
-
getData: d,
|
|
83
|
-
setData: U,
|
|
84
|
-
isThreeSystem: g,
|
|
85
|
-
isUrdf: (t) => {
|
|
86
|
-
if (!t)
|
|
87
|
-
return !1;
|
|
88
|
-
const s = c(t);
|
|
89
|
-
return E == null ? void 0 : E.includes(s);
|
|
90
|
-
},
|
|
91
|
-
isGeneralFile: (t) => {
|
|
92
|
-
if (!t)
|
|
93
|
-
return !1;
|
|
94
|
-
const s = c(t);
|
|
95
|
-
return o == null ? void 0 : o.includes(s);
|
|
96
|
-
},
|
|
97
|
-
isTrackPathFile: (t) => {
|
|
98
|
-
if (!t)
|
|
99
|
-
return !1;
|
|
100
|
-
const s = c(t);
|
|
101
|
-
return f == null ? void 0 : f.includes(s);
|
|
102
|
-
},
|
|
103
|
-
isThreeFile: F,
|
|
104
|
-
isUseBackdrop: (t) => g() && F(t),
|
|
105
|
-
initTrackFileType: (t) => {
|
|
106
|
-
if (!t)
|
|
107
|
-
return {
|
|
108
|
-
isCpt: !1,
|
|
109
|
-
isCyd: !1,
|
|
110
|
-
isUv: !1
|
|
111
|
-
};
|
|
112
|
-
const s = c(t), i = f == null ? void 0 : f.find((R) => R === s);
|
|
113
|
-
return {
|
|
114
|
-
isCpt: i === "cpt",
|
|
115
|
-
isCyd: i === "cyd",
|
|
116
|
-
isUv: i === "uv"
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
getFileExtension: c,
|
|
120
|
-
extraExtension: k
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
const te = { class: "top-menu" }, ne = {
|
|
124
|
-
key: 4,
|
|
125
|
-
class: "loading"
|
|
126
|
-
}, re = /* @__PURE__ */ Y({
|
|
127
|
-
__name: "threeViewerHost",
|
|
128
|
-
props: {
|
|
129
|
-
fileUrls: { default: () => [] },
|
|
130
|
-
host: { default: "inline" },
|
|
131
|
-
extension: {},
|
|
132
|
-
animationData: { default: () => ({}) },
|
|
133
|
-
width: { default: "100%" },
|
|
134
|
-
height: { default: "100%" },
|
|
135
|
-
threeData: {},
|
|
136
|
-
componentType: {}
|
|
137
|
-
},
|
|
138
|
-
emits: ["getThreeData"],
|
|
139
|
-
setup(l, { emit: m }) {
|
|
140
|
-
const v = S(() => import("./threeSceneView-BYl4rYgi.js")), k = S(() => import("./threePreview-L8T-JdQL.js")), f = S(() => import("./threeTrackPathView-gTDb6Ckq.js")), E = S(() => import("./threeSceneViewForCPMPIP-C-o-rOZ9.js")), o = {
|
|
141
|
-
ROBOT_SCENE: "robot",
|
|
142
|
-
// 机器人场景
|
|
143
|
-
LATHE_SCENE: "latheScene",
|
|
144
|
-
// 机床场景
|
|
145
|
-
CPMPIP_SCENE: "cpmpip",
|
|
146
|
-
// 重大专项场景
|
|
147
|
-
PREVIEW: "preview"
|
|
148
|
-
// 预览模式
|
|
149
|
-
}, r = l, U = z(N), { platName: d } = H(U), { isGeneralFile: g, isUrdf: c, isTrackPathFile: F, extraExtension: $ } = ee(), w = _(() => (r == null ? void 0 : r.extension) || $.value), I = _(() => {
|
|
150
|
-
var e, n;
|
|
151
|
-
return (n = (e = r == null ? void 0 : r.threeData) == null ? void 0 : e.data) == null ? void 0 : n.trackFileType;
|
|
152
|
-
}), C = _(() => {
|
|
153
|
-
var n;
|
|
154
|
-
if (r.componentType)
|
|
155
|
-
switch (r.componentType) {
|
|
156
|
-
case "robot":
|
|
157
|
-
return o.ROBOT_SCENE;
|
|
158
|
-
case "latheScene":
|
|
159
|
-
return o.LATHE_SCENE;
|
|
160
|
-
case "cpmpip":
|
|
161
|
-
return o.CPMPIP_SCENE;
|
|
162
|
-
case "preview":
|
|
163
|
-
return o.PREVIEW;
|
|
164
|
-
}
|
|
165
|
-
const e = (n = r == null ? void 0 : r.fileUrls) == null ? void 0 : n[0];
|
|
166
|
-
return g(e) ? o.PREVIEW : (d == null ? void 0 : d.value) === "CPMPIP" && (c(e) || c(w.value)) ? o.CPMPIP_SCENE : (d == null ? void 0 : d.value) === "SFRTubeBend" && (c(e) || c(w.value)) ? o.ROBOT_SCENE : F(w.value) && I.value ? o.LATHE_SCENE : o.PREVIEW;
|
|
167
|
-
}), V = m, t = B([]), s = B(!1);
|
|
168
|
-
function i(e) {
|
|
169
|
-
try {
|
|
170
|
-
const n = new URL(e).pathname, u = n.substring(n.lastIndexOf("/") + 1);
|
|
171
|
-
return decodeURIComponent(u);
|
|
172
|
-
} catch (n) {
|
|
173
|
-
return console.error("无法解析URL以提取文件名:", e, n), "未知文件名";
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
async function h(e) {
|
|
177
|
-
let n, u;
|
|
178
|
-
if (/^https?:\/\//.test(e))
|
|
179
|
-
try {
|
|
180
|
-
const a = await fetch(e);
|
|
181
|
-
if (!a.ok)
|
|
182
|
-
throw new Error(`下载文件失败: ${a.statusText} (URL: ${e})`);
|
|
183
|
-
n = await a.blob(), u = i(e);
|
|
184
|
-
} catch (a) {
|
|
185
|
-
throw console.error("使用 fetch 下载文件时出错:", a), a;
|
|
186
|
-
}
|
|
187
|
-
else
|
|
188
|
-
try {
|
|
189
|
-
const a = await Z({ url: e });
|
|
190
|
-
if (a.status !== 200)
|
|
191
|
-
throw new Error(`下载失败: ${a.status}`);
|
|
192
|
-
const b = a.headers["content-disposition"];
|
|
193
|
-
u = R(b) || "无文件名", n = a.data;
|
|
194
|
-
} catch (a) {
|
|
195
|
-
throw console.error("通过 API 下载文件时出错:", a), a;
|
|
196
|
-
}
|
|
197
|
-
return new File([n], u, { type: n.type });
|
|
198
|
-
}
|
|
199
|
-
function R(e) {
|
|
200
|
-
if (!e) return;
|
|
201
|
-
const n = e.match(/filename\*\s*=\s*([^;]+)/i);
|
|
202
|
-
if (n) {
|
|
203
|
-
let a = n[1].trim();
|
|
204
|
-
a = a.replace(/^"(.*)"$/, "$1");
|
|
205
|
-
const b = a.split("''");
|
|
206
|
-
if (b.length === 2) {
|
|
207
|
-
const j = b[0].toUpperCase(), M = b[1];
|
|
208
|
-
try {
|
|
209
|
-
if (j === "UTF-8")
|
|
210
|
-
return decodeURIComponent(M);
|
|
211
|
-
} catch {
|
|
212
|
-
}
|
|
213
|
-
return M;
|
|
214
|
-
}
|
|
215
|
-
try {
|
|
216
|
-
return decodeURIComponent(a);
|
|
217
|
-
} catch {
|
|
218
|
-
return a;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
const u = e.match(/filename\s*=\s*("?)([^";]+)\1/i);
|
|
222
|
-
if (u)
|
|
223
|
-
return u[2].trim();
|
|
224
|
-
}
|
|
225
|
-
async function W(e) {
|
|
226
|
-
if (!e || !e.length) {
|
|
227
|
-
t.value = [];
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
s.value = !0;
|
|
231
|
-
try {
|
|
232
|
-
const n = await Promise.all(e.map((u) => h(u)));
|
|
233
|
-
t.value = n;
|
|
234
|
-
} catch (n) {
|
|
235
|
-
console.error("文件下载时发生错误:", n), t.value = [];
|
|
236
|
-
} finally {
|
|
237
|
-
s.value = !1;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
const G = () => {
|
|
241
|
-
V("getThreeData");
|
|
242
|
-
};
|
|
243
|
-
return q(
|
|
244
|
-
() => r.fileUrls,
|
|
245
|
-
async (e) => {
|
|
246
|
-
await W(e ?? []);
|
|
247
|
-
},
|
|
248
|
-
{ immediate: !0, deep: !0 }
|
|
249
|
-
), (e, n) => (y(), O("div", {
|
|
250
|
-
class: J([r.host === "electron" ? "mv-electron" : "mv-inline", "three-platform"])
|
|
251
|
-
}, [
|
|
252
|
-
K("div", te, [
|
|
253
|
-
p(e.$slots, "top-menu", {}, void 0, !0)
|
|
254
|
-
]),
|
|
255
|
-
C.value === o.ROBOT_SCENE ? (y(), P(D(v), {
|
|
256
|
-
key: 0,
|
|
257
|
-
"file-blobs": t.value,
|
|
258
|
-
"animation-data": e.animationData,
|
|
259
|
-
onGetThreeData: G,
|
|
260
|
-
threeData: r.threeData
|
|
261
|
-
}, {
|
|
262
|
-
"button-left": T(() => [
|
|
263
|
-
p(e.$slots, "management-menu", {}, void 0, !0)
|
|
264
|
-
]),
|
|
265
|
-
"button-right": T(() => [
|
|
266
|
-
p(e.$slots, "management-page", {}, void 0, !0)
|
|
267
|
-
]),
|
|
268
|
-
_: 3
|
|
269
|
-
}, 8, ["file-blobs", "animation-data", "threeData"])) : C.value === o.LATHE_SCENE ? (y(), P(D(f), {
|
|
270
|
-
key: 1,
|
|
271
|
-
fileUrls: e.fileUrls,
|
|
272
|
-
threeData: r.threeData,
|
|
273
|
-
trackFileType: I.value
|
|
274
|
-
}, {
|
|
275
|
-
"button-left": T(() => [
|
|
276
|
-
p(e.$slots, "management-menu", {}, void 0, !0)
|
|
277
|
-
]),
|
|
278
|
-
"button-right": T(() => [
|
|
279
|
-
p(e.$slots, "management-page", {}, void 0, !0)
|
|
280
|
-
]),
|
|
281
|
-
_: 3
|
|
282
|
-
}, 8, ["fileUrls", "threeData", "trackFileType"])) : C.value === o.CPMPIP_SCENE ? (y(), P(D(E), {
|
|
283
|
-
key: 2,
|
|
284
|
-
"file-blobs": t.value,
|
|
285
|
-
threeData: r.threeData
|
|
286
|
-
}, {
|
|
287
|
-
"button-left": T(() => [
|
|
288
|
-
p(e.$slots, "management-menu", {}, void 0, !0)
|
|
289
|
-
]),
|
|
290
|
-
"button-right": T(() => [
|
|
291
|
-
p(e.$slots, "management-page", {}, void 0, !0)
|
|
292
|
-
]),
|
|
293
|
-
_: 3
|
|
294
|
-
}, 8, ["file-blobs", "threeData"])) : C.value === o.PREVIEW ? (y(), P(D(k), {
|
|
295
|
-
key: 3,
|
|
296
|
-
"file-blobs": t.value,
|
|
297
|
-
"animation-data": e.animationData
|
|
298
|
-
}, {
|
|
299
|
-
"button-left": T(() => [
|
|
300
|
-
p(e.$slots, "management-menu", {}, void 0, !0)
|
|
301
|
-
]),
|
|
302
|
-
"button-right": T(() => [
|
|
303
|
-
p(e.$slots, "management-page", {}, void 0, !0)
|
|
304
|
-
]),
|
|
305
|
-
_: 3
|
|
306
|
-
}, 8, ["file-blobs", "animation-data"])) : L("", !0),
|
|
307
|
-
s.value ? (y(), O("div", ne, " 文件下载中,请稍候... ")) : L("", !0)
|
|
308
|
-
], 2));
|
|
309
|
-
}
|
|
310
|
-
}), ae = /* @__PURE__ */ X(re, [["__scopeId", "data-v-a4f0efb1"]]), fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
311
|
-
__proto__: null,
|
|
312
|
-
default: ae
|
|
313
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
314
|
-
export {
|
|
315
|
-
ae as T,
|
|
316
|
-
x as a,
|
|
317
|
-
ee as b,
|
|
318
|
-
me as c,
|
|
319
|
-
Z as d,
|
|
320
|
-
fe as t,
|
|
321
|
-
ue as u
|
|
322
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),f=require("./index-C8qRkCgn.cjs"),A=require("./index-CX2C-kjD.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs");const H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function O(c){const m=sessionStorage.getItem("loginToken")??"123456";return f.service({url:"/api/sysFile/uploadFile",method:"post",data:c,headers:{Authorization:m,"Content-Type":"multipart/form-data"}})}function B(c){const m=sessionStorage.getItem("loginToken")??"123456";return f.service({url:"/api/sysFile/downloadFile",method:"post",data:c,headers:{Authorization:m,Accept:"application/octet-stream"},responseType:"blob"})}function q(c){const m=sessionStorage.getItem("loginToken")??"123456";return f.service({url:"/api/sysFile/uploadFiles",method:"post",data:c,headers:{Authorization:m,"Content-Type":"multipart/form-data"}})}const I=f.defineStore("threeState",{state:()=>({data:{extension:"",url:[],data:{},isThreeScene:!0}}),actions:{setData(c){this.data=c},getData(){return this.data}}});function R(){const c=A.useMenuState(f.pinia),{platform:m}=f.storeToRefs(c),v=I(f.pinia),b=e.computed(()=>{var n;return(n=v==null?void 0:v.data)==null?void 0:n.extension}),p=["uv","cpt","cyd"],y=["urdf"],s=["obj","stl"],o=[...p,...y,...s],F=n=>{if(!C())throw new Error("不是三维系统");v.setData(n)},h=()=>v.getData(),C=()=>m.value==="three",u=n=>{const i=n==null?void 0:n.toLowerCase(),l=i==null?void 0:i.lastIndexOf(".");let T=i;return l>=0&&(T=T==null?void 0:T.slice(l+1)),T},g=n=>{if(!n)return!1;const i=u(n);return o==null?void 0:o.includes(i)};return{getData:h,setData:F,isThreeSystem:C,isUrdf:n=>{if(!n)return!1;const i=u(n);return y==null?void 0:y.includes(i)},isGeneralFile:n=>{if(!n)return!1;const i=u(n);return s==null?void 0:s.includes(i)},isTrackPathFile:n=>{if(!n)return!1;const i=u(n);return p==null?void 0:p.includes(i)},isThreeFile:g,isUseBackdrop:n=>C()&&g(n),initTrackFileType:n=>{if(!n)return{isCpt:!1,isCyd:!1,isUv:!1};const i=u(n),l=p==null?void 0:p.find(k=>k===i);return{isCpt:l==="cpt",isCyd:l==="cyd",isUv:l==="uv"}},getFileExtension:u,extraExtension:b}}const L={class:"top-menu"},x={key:4,class:"loading"},z=e.defineComponent({__name:"threeViewerHost",props:{fileUrls:{default:()=>[]},host:{default:"inline"},extension:{},animationData:{default:()=>({})},width:{default:"100%"},height:{default:"100%"},threeData:{},componentType:{}},emits:["getThreeData"],setup(c,{emit:m}){const v=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-igg9HZ8X.cjs"))),b=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-5-O-sZIc.cjs"))),p=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-CgjLFXmL.cjs"))),y=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-DfPj5iau.cjs"))),s={ROBOT_SCENE:"robot",LATHE_SCENE:"latheScene",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},o=c,F=A.useMenuState(f.pinia),{platName:h}=f.storeToRefs(F),{isGeneralFile:C,isUrdf:u,isTrackPathFile:g,extraExtension:D}=R(),w=e.computed(()=>(o==null?void 0:o.extension)||D.value),P=e.computed(()=>{var t,r;return(r=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:r.trackFileType}),E=e.computed(()=>{var r;if(o.componentType)switch(o.componentType){case"robot":return s.ROBOT_SCENE;case"latheScene":return s.LATHE_SCENE;case"cpmpip":return s.CPMPIP_SCENE;case"preview":return s.PREVIEW}const t=(r=o==null?void 0:o.fileUrls)==null?void 0:r[0];return C(t)?s.PREVIEW:(h==null?void 0:h.value)==="CPMPIP"&&(u(t)||u(w.value))?s.CPMPIP_SCENE:(h==null?void 0:h.value)==="SFRTubeBend"&&(u(t)||u(w.value))?s.ROBOT_SCENE:g(w.value)&&P.value?s.LATHE_SCENE:s.PREVIEW}),_=m,n=e.ref([]),i=e.ref(!1);function l(t){try{const r=new URL(t).pathname,d=r.substring(r.lastIndexOf("/")+1);return decodeURIComponent(d)}catch(r){return console.error("无法解析URL以提取文件名:",t,r),"未知文件名"}}async function T(t){let r,d;if(/^https?:\/\//.test(t))try{const a=await fetch(t);if(!a.ok)throw new Error(`下载文件失败: ${a.statusText} (URL: ${t})`);r=await a.blob(),d=l(t)}catch(a){throw console.error("使用 fetch 下载文件时出错:",a),a}else try{const a=await B({url:t});if(a.status!==200)throw new Error(`下载失败: ${a.status}`);const S=a.headers["content-disposition"];d=k(S)||"无文件名",r=a.data}catch(a){throw console.error("通过 API 下载文件时出错:",a),a}return new File([r],d,{type:r.type})}function k(t){if(!t)return;const r=t.match(/filename\*\s*=\s*([^;]+)/i);if(r){let a=r[1].trim();a=a.replace(/^"(.*)"$/,"$1");const S=a.split("''");if(S.length===2){const M=S[0].toUpperCase(),U=S[1];try{if(M==="UTF-8")return decodeURIComponent(U)}catch{}return U}try{return decodeURIComponent(a)}catch{return a}}const d=t.match(/filename\s*=\s*("?)([^";]+)\1/i);if(d)return d[2].trim()}async function N(t){if(!t||!t.length){n.value=[];return}i.value=!0;try{const r=await Promise.all(t.map(d=>T(d)));n.value=r}catch(r){console.error("文件下载时发生错误:",r),n.value=[]}finally{i.value=!1}}const $=()=>{_("getThreeData")};return e.watch(()=>o.fileUrls,async t=>{await N(t??[])},{immediate:!0,deep:!0}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.host==="electron"?"mv-electron":"mv-inline","three-platform"])},[e.createElementVNode("div",L,[e.renderSlot(t.$slots,"top-menu",{},void 0,!0)]),E.value===s.ROBOT_SCENE?(e.openBlock(),e.createBlock(e.unref(v),{key:0,"file-blobs":n.value,"animation-data":t.animationData,onGetThreeData:$,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data","threeData"])):E.value===s.LATHE_SCENE?(e.openBlock(),e.createBlock(e.unref(p),{key:1,fileUrls:t.fileUrls,threeData:o.threeData,trackFileType:P.value},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileUrls","threeData","trackFileType"])):E.value===s.CPMPIP_SCENE?(e.openBlock(),e.createBlock(e.unref(y),{key:2,"file-blobs":n.value,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","threeData"])):E.value===s.PREVIEW?(e.openBlock(),e.createBlock(e.unref(b),{key:3,"file-blobs":n.value,"animation-data":t.animationData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",x," 文件下载中,请稍候... ")):e.createCommentVNode("",!0)],2))}}),V=H._export_sfc(z,[["__scopeId","data-v-a4f0efb1"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:V},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=V;exports.downloadAvatarApi=B;exports.threeViewerHost=W;exports.uploadAmountApi=q;exports.uploadFile=O;exports.useThreeState=I;exports.useThreeSystem=R;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var te=Object.defineProperty;var oe=(b,n,o)=>n in b?te(b,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):b[n]=o;var j=(b,n,o)=>oe(b,typeof n!="symbol"?n+"":n,o);const se=require("./index.vue_vue_type_style_index_1_lang-Dsas9C9w.cjs"),U=require("./MTLLoader-BlLfoBce.cjs"),C=require("./fileUtil-DugRTZPB.cjs"),R=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs"),e=require("vue"),D=require("./iconfont-BUDQryy4.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function ne(b){const{mtlUrl:n,manager:o,resourcePath:l,onLoad:m,onProgress:i,onError:w}=b,p=new U.MTLLoader(o);return l&&p.setResourcePath(l),p.load(n,m,i,w),p}function re(b){const{objUrl:n,manager:o,materials:l,onLoad:m,onProgress:i,onError:w}=b,p=new U.OBJLoader(o);return l&&p.setMaterials(l),p.load(n,m,i,w),p}function ae(b){const{manager:n,baseFolderUrl:o,onFileProgress:l}=b,m=new se.URDFLoader(n);return m.packages=i=>`${o.endsWith("/")?o:o+"/"}${i}/`,m.loadMeshCb=(i,w,p)=>{const g=(()=>{const E=i.split("?")[0].split("#")[0],c=E.lastIndexOf(".");return c>=0?E.slice(c+1).toLowerCase():void 0})();switch(g){case"obj":{const E=(()=>{try{return new URL(".",i).toString()}catch{const a=i.lastIndexOf("/");return a>=0?i.slice(0,a+1):i}})(),c=(()=>{var d;return(((d=i.split("/").pop())==null?void 0:d.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),f=`${E}${c}.mtl`,h=a=>{re({objUrl:i,manager:w,materials:a,onLoad:d=>p(d),onProgress:d=>l==null?void 0:l(i,d==null?void 0:d.loaded,d==null?void 0:d.total),onError:d=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 OBJ 模型: ${i}`,d),p(new R.Group)}})};ne({mtlUrl:f,manager:w,resourcePath:E,onLoad:a=>{try{a.preload()}catch{}h(a)},onProgress:a=>l==null?void 0:l(f,a==null?void 0:a.loaded,a==null?void 0:a.total),onError:a=>{console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${f}。将尝试无材质加载。`),h(void 0)}});break}case"stl":{new U.STLLoader(w).load(i,c=>{const f=new R.MeshPhongMaterial({color:12303291,shininess:30}),h=new R.Mesh(c,f);h.castShadow=!0,h.receiveShadow=!0,p(h)},c=>l==null?void 0:l(i,c==null?void 0:c.loaded,c==null?void 0:c.total),c=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 STL 模型: ${i}`,c),p(new R.Group)});break}default:console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${g} (路径: ${i})`),p(new R.Group)}},m}function ce(b,n,o,l){return{loadSceneFromFile:i=>new Promise((w,p)=>{o.value=!0,l.value="正在初始化 URDF 加载器...";let g=0,E=0,c=null;const f=new R.LoadingManager;f.onStart=(a,d,V)=>{g=V||0,E=d||0,l.value=g>0?`开始下载资源: 0 / ${g}`:"开始下载资源...",o.value=!0},f.onProgress=(a,d,V)=>{E=d,g=V;const L=`正在加载 ${d} / ${V} 个文件: ${C.getFilenameFromUrl(a)}`;l.value=L,d===V&&(l.value="资源加载完成,正在处理模型...",setTimeout(()=>{if(c){c.updateMatrixWorld(!0);const v=new R.Box3().setFromObject(c);v.isEmpty()&&console.warn("模型加载完成,但所有可视化网格均加载失败,模型将不可见。"),c.userData.boundingBox=v,c.traverse(u=>{u.isMesh&&(u.castShadow=!0,u.receiveShadow=!0)}),w(c)}else p(new Error("URDF 文件本身加载失败。"));l.value="模型加载完成",setTimeout(()=>{l.value==="模型加载完成"&&(o.value=!1,l.value="")},500)},100))},f.onError=a=>{console.warn(`LoadingManager 报告一个资源加载失败: ${a}。加载流程将继续。`)};const h=(a,d,V)=>{const L=C.getFilenameFromUrl(a);let v;V&&V>0?v=`${L}(${C.formatBytes(d)} / ${C.formatBytes(V)})`:d&&d>0?v=`${L}(已下载 ${C.formatBytes(d)})`:v=`${L}`,l.value=`正在下载第 ${E+1} / ${g} 个文件: ${v}`};try{const a=URL.createObjectURL(i);ae({manager:f,baseFolderUrl:ie,onFileProgress:h}).load(a,V=>{c=V},void 0,V=>{console.error(`加载 URDF 文件 (${i.name}) 时发生致命错误:`,V),l.value="URDF 文件解析失败",o.value=!1,p(new Error(`加载 URDF 文件失败: ${i.name}`))})}catch(a){console.error("初始化 URDF 加载时发生致命错误:",a),l.value="模型加载失败",o.value=!1,p(a)}})}}function de(b,n,o,l=["URDFVisual"]){let m=null;const i=e.ref(null),w=new R.Raycaster,p=new R.Vector2,g=new Map;function E(){o.value.forEach(v=>{v.traverse(u=>{l!=null&&l.includes(u.type)&&g.set(u.id,{obj:u,axis:u.axis||new R.Vector3(1,0,0),limits:u.limits})})})}function c(v){i.value&&i.value.obj.traverse(u=>{var t;u.material&&((t=u.material.emissive)==null||t.set(0))}),i.value=v,v.obj.traverse(u=>{var t;u.material&&((t=u.material.emissive)==null||t.set(65280))})}function f(v){const u=b.value.getBoundingClientRect();p.x=(v.clientX-u.left)/u.width*2-1,p.y=-((v.clientY-u.top)/u.height)*2+1,w.setFromCamera(p,m);const t=w.intersectObjects(o.value,!0);if(t.length===0)return;let s=t[0].object,_=null;for(;s;){if(g.has(s.id)){_=g.get(s.id);break}s=s.parent}_&&c(_)}function h(){b.value&&b.value.removeEventListener("click",f,!1)}function a(){const{scene:v,camera:u}=n();m=u,E(),b.value&&b.value.addEventListener("click",f,!1)}function d(v){i.value&&(i.value.obj.visible=v)}function V(v){var s;const{axis:u,value:t}=v;D.updateObjectPosition((s=i.value)==null?void 0:s.obj,u,t)}function L(v){var s;const{axis:u,value:t}=v;D.updateObjectRotation((s=i.value)==null?void 0:s.obj,u,t)}return{initRaycaster:a,dispose:h,selectedObject3D:i,setSelectedObjVisible:d,updatePosition:V,updateRotation:L}}const ue={SINGLE:"单机",DOUBLE:"双机"},me={ROBOT:1,PIPECOMPARSION:2};class pe{constructor(n){j(this,"robot");j(this,"movableJoints");this.robot=n,this.movableJoints=this.getMovableJoints()}getMovableJoints(){return Object.values(this.robot.joints).filter(n=>n.jointType!=="fixed")}getMovableJointNames(){return this.movableJoints.map(n=>n.name)}setJointAngle(n,o){const l=this.robot.joints[n];if(!l||l.jointType==="fixed")return console.warn(`关节 ${n} 不存在或不可动`),!1;if(l.limit){const m=Math.max(l.limit.lower,Math.min(l.limit.upper,o));m!==o&&console.warn(`关节 ${n} 角度被限制在 [${l.limit.lower}, ${l.limit.upper}]`),l.setJointValue(m)}else l.setJointValue(o);return!0}setJointAngles(n){Object.entries(n).forEach(([o,l])=>{typeof l=="number"&&!isNaN(l)&&this.setJointAngle(o,l)})}getCurrentJointStates(){const n={};return this.movableJoints.forEach(o=>{n[o.name]=o.angle||0}),n}resetToZero(){this.movableJoints.forEach(n=>{n.setJointValue(0)})}getJointLimits(n){const o=this.robot.joints[n];return!o||!o.limit?null:{lower:o.limit.lower,upper:o.limit.upper}}async animateToState(n,o=1e3,l){const m=this.getCurrentJointStates(),i=Date.now();return new Promise(w=>{const p=()=>{const g=Date.now()-i,E=Math.min(g/o,1),c=this.easeInOutCubic(E),f={};Object.keys(n).forEach(h=>{const a=m[h]||0,d=n[h];f[h]=a+(d-a)*c}),this.setJointAngles(f),l&&l(E),E<1?requestAnimationFrame(p):w()};p()})}easeInOutCubic(n){return n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2}async playSequence(n,o=1e3,l){for(let m=0;m<n.length;m++)await this.animateToState(n[m],o,i=>{l&&l(m,i)})}}const ve={class:"panel-content"},fe={class:"obj"},be={key:0,class:"obj-base"},_e=["title"],we=["title"],Ee={key:1},he={class:"obj-position"},Ve={class:"coord-item"},ge={class:"coord-item"},ye={class:"coord-item"},Ne={class:"obj-rotation"},Le={class:"coord-item"},Re={class:"coord-item"},Se={class:"coord-item"},Ce={class:"world"},je={class:"coord-line"},De={class:"coord-text"},Ue={class:"world-position-item"},Me={class:"world-position-item"},Fe={class:"world-position-item"},$e={class:"coord-line"},Oe={class:"coord-text"},xe={class:"world-rotation-item"},Je={class:"world-rotation-item"},Te={class:"world-rotation-item"},ke=e.defineComponent({__name:"workpieceTreePanel",props:{model:{},maxExpandCount:{default:10},expandStrategy:{default:"breadth"}},emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(b,{emit:n}){const o=b,l=n,m=e.ref([]),i=e.ref({}),w=(t,s=0)=>{const _=[];return Array.isArray(t)&&(t==null?void 0:t.length)>0&&t.forEach(r=>{if(!(r!=null&&r.isMesh)){const y={name:r==null?void 0:r.name,label:(r==null?void 0:r.name)||(r==null?void 0:r.type),show:!0,level:s+1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:w(r==null?void 0:r.children,s+1),path:r==null?void 0:r.name};_.push(y)}}),_},p=t=>t?[{name:t==null?void 0:t.name,label:(t==null?void 0:t.name)||(t==null?void 0:t.type),show:!0,level:1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:w(t==null?void 0:t.children,1),path:t==null?void 0:t.name}]:[],g=(t,s)=>{const _=[],r=[...t];for(;r.length>0&&_.length<s;){const y=r.shift();y.children&&y.children.length>0&&(_.push(y.id),r.push(...y.children))}return _},E=(t,s)=>{const _=[];return t.forEach(r=>{if(r.children&&r.children.length>0){_.push(r.id);const y=r.children.filter(S=>S.children&&S.children.length>0).slice(0,s).map(S=>S.id);_.push(...y)}}),_.slice(0,s+1)};e.computed(()=>!m.value||m.value.length===0?[]:o.expandStrategy==="firstLevel"?E(m.value,o.maxExpandCount):g(m.value,o.maxExpandCount));const c=t=>t?parseFloat(t.toFixed(3)):0,f=t=>t?parseFloat(t.toFixed(1)):0,h=(t,s)=>{l("updatePosition",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},a=(t,s)=>{l("updateRotation",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},d=t=>{l("visibleChange",t)},V=e.computed(()=>o!=null&&o.model?p(o.model):[]),L=e.computed(()=>{var t,s;return((t=o==null?void 0:o.model)==null?void 0:t.name)||((s=o==null?void 0:o.model)==null?void 0:s.type)}),v=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.type}),u=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.visible});return e.watch(()=>o.model,()=>{o.model&&(i.value=D.getObject3DData(o.model))},{deep:!0,immediate:!0}),e.watch(V,t=>{m.value=JSON.parse(JSON.stringify(t))},{immediate:!0}),(t,s)=>{var S,M,F,$,O,x,J,T,k,P,B,z,I,A,q,W,G,X,Y,Z,K,H,Q,ee;const _=e.resolveComponent("el-divider"),r=e.resolveComponent("el-switch"),y=e.resolveComponent("el-input-number");return e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(_,null,{default:e.withCtx(()=>s[6]||(s[6]=[e.createTextVNode("对象")])),_:1,__:[6]}),e.createElementVNode("div",fe,[o.model?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",{class:"obj-name",title:L.value},e.toDisplayString(L.value),9,_e),e.createElementVNode("div",{class:"obj-type",title:v.value},"["+e.toDisplayString(v.value)+"]",9,we)])):(e.openBlock(),e.createElementBlock("div",Ee,"空")),e.createVNode(r,{"model-value":u.value,onChange:d},null,8,["model-value"])]),e.createVNode(_,null,{default:e.withCtx(()=>s[7]||(s[7]=[e.createTextVNode("相对位置")])),_:1,__:[7]}),e.createElementVNode("div",he,[e.createElementVNode("div",Ve,[s[8]||(s[8]=e.createElementVNode("span",{class:"axis-label"},"X",-1)),e.createVNode(y,{"model-value":c((M=(S=i.value)==null?void 0:S.position)==null?void 0:M.x),onChange:s[0]||(s[0]=N=>h(N,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",ge,[s[9]||(s[9]=e.createElementVNode("span",{class:"axis-label"},"Y",-1)),e.createVNode(y,{"model-value":c(($=(F=i.value)==null?void 0:F.position)==null?void 0:$.y),onChange:s[1]||(s[1]=N=>h(N,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",ye,[s[10]||(s[10]=e.createElementVNode("span",{class:"axis-label"},"Z",-1)),e.createVNode(y,{"model-value":c((x=(O=i.value)==null?void 0:O.position)==null?void 0:x.z),onChange:s[2]||(s[2]=N=>h(N,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(_,null,{default:e.withCtx(()=>s[11]||(s[11]=[e.createTextVNode("相对旋转")])),_:1,__:[11]}),e.createElementVNode("div",Ne,[e.createElementVNode("div",Le,[s[12]||(s[12]=e.createElementVNode("span",{class:"axis-label"},"X°",-1)),e.createVNode(y,{"model-value":f((T=(J=i.value)==null?void 0:J.rotation)==null?void 0:T.x),onChange:s[3]||(s[3]=N=>a(N,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Re,[s[13]||(s[13]=e.createElementVNode("span",{class:"axis-label"},"Y°",-1)),e.createVNode(y,{"model-value":f((P=(k=i.value)==null?void 0:k.rotation)==null?void 0:P.y),onChange:s[4]||(s[4]=N=>a(N,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Se,[s[14]||(s[14]=e.createElementVNode("span",{class:"axis-label"},"Z°",-1)),e.createVNode(y,{"model-value":f((z=(B=i.value)==null?void 0:B.rotation)==null?void 0:z.z),onChange:s[5]||(s[5]=N=>a(N,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(_,null,{default:e.withCtx(()=>s[15]||(s[15]=[e.createTextVNode("世界信息")])),_:1,__:[15]}),e.createElementVNode("div",Ce,[e.createElementVNode("div",je,[s[16]||(s[16]=e.createElementVNode("span",{class:"coord-label"},"世界位置:",-1)),e.createElementVNode("span",De,[e.createElementVNode("div",Ue,e.toDisplayString(c((A=(I=i.value)==null?void 0:I.worldPosition)==null?void 0:A.x))+", ",1),e.createElementVNode("div",Me,e.toDisplayString(c((W=(q=i.value)==null?void 0:q.worldPosition)==null?void 0:W.y))+", ",1),e.createElementVNode("div",Fe,e.toDisplayString(c((X=(G=i.value)==null?void 0:G.worldPosition)==null?void 0:X.z)),1)])]),e.createElementVNode("div",$e,[s[17]||(s[17]=e.createElementVNode("span",{class:"coord-label"},"世界旋转:",-1)),e.createElementVNode("span",Oe,[e.createElementVNode("div",xe,e.toDisplayString(f((Z=(Y=i.value)==null?void 0:Y.worldRotation)==null?void 0:Z.x))+"°, ",1),e.createElementVNode("div",Je,e.toDisplayString(f((H=(K=i.value)==null?void 0:K.worldRotation)==null?void 0:H.y))+"°, ",1),e.createElementVNode("div",Te,e.toDisplayString(f((ee=(Q=i.value)==null?void 0:Q.worldRotation)==null?void 0:ee.z))+"° ",1)])])])])}}}),Pe=le._export_sfc(ke,[["__scopeId","data-v-00d48931"]]);exports.URDFRobotController=pe;exports.WorkpieceTreePanel=Pe;exports.robotMode=ue;exports.sceneType=me;exports.useRaycaster=de;exports.useUrdfLoader=ce;
|