@xtctwins/tctwins-bimx-engine 0.1.0
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/README.md +1 -0
- package/dist/AnnotationTool-j9uTpTri.mjs +181 -0
- package/dist/BIMX_Viewer_Lib.es.js +8 -0
- package/dist/BIMX_Viewer_Lib.umd.js +90165 -0
- package/dist/CommentTool-BLrsulc_.mjs +186 -0
- package/dist/InspectorTool-BouA94us.mjs +166 -0
- package/dist/MeasureTool-CbYIFTPr.mjs +1468 -0
- package/dist/RoamTool-CXZPca_M.mjs +43 -0
- package/dist/ScreenShotTool-BiNcu9RZ.mjs +368 -0
- package/dist/SectionTool-DogiOv1d.mjs +466 -0
- package/dist/SettingTool-ClISeAhW.mjs +1261 -0
- package/dist/StructureTree-CmsIBbBk.mjs +1415 -0
- package/dist/closeButton.vue_vue_type_style_index_0_scope_true_lang-CBPVV86B.mjs +52 -0
- package/dist/const-DeAig7Pj.mjs +202 -0
- package/dist/debounce-B430Iy_D.mjs +80 -0
- package/dist/el-checkbox-id3wFY0e.mjs +479 -0
- package/dist/el-input-BW5rElpS.mjs +559 -0
- package/dist/el-scrollbar-La242VUu.mjs +34 -0
- package/dist/favicon.ico +0 -0
- package/dist/icon-DZm1Csdm.mjs +193 -0
- package/dist/index-3StVDuUH.mjs +115680 -0
- package/dist/index-BgjjA9sB.mjs +502 -0
- package/dist/index-L-tY1Gou.mjs +286 -0
- package/dist/index.html +17 -0
- package/dist/style.css +1 -0
- package/dist/use-form-item-DkYURTpK.mjs +105 -0
- package/package.json +67 -0
- package/types/BIMX_Viewer_Initial/viewerInitial.d.ts +16 -0
- package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +10 -0
- package/types/components/BimViewerComponents/CommentTool.vue.d.ts +14 -0
- package/types/components/BimViewerComponents/InspectorTool.vue.d.ts +14 -0
- package/types/components/BimViewerComponents/MeasureTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/RoamTool.vue.d.ts +8 -0
- package/types/components/BimViewerComponents/ScreenShotTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/SectionTool.vue.d.ts +6 -0
- package/types/components/BimViewerComponents/SettingTool.vue.d.ts +6 -0
- package/types/components/BimViewerComponents/StructureTree.vue.d.ts +6 -0
- package/types/components/BimViewerComponents/Toolbar.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/emptyPage.vue.d.ts +8 -0
- package/types/components/BimX_Viewer.vue.d.ts +7 -0
- package/types/components/index.d.ts +4 -0
- package/types/components/types.d.ts +1 -0
- package/types/components/utilsComponents/closeButton.vue.d.ts +41 -0
- package/types/index.d.ts +9 -0
- package/types/main.d.ts +1 -0
- package/types/pages/mainView.vue.d.ts +7 -0
- package/types/router/index.d.ts +2 -0
- package/types/services/request/config.d.ts +13 -0
- package/types/store/components.d.ts +6 -0
- package/types/store/const.d.ts +200 -0
- package/types/store/ifcPropertyReflect.d.ts +1 -0
- package/types/store/toolbars.d.ts +96 -0
- package/types/utils/OSSHelper.d.ts +5 -0
- package/types/utils/eventBus.d.ts +2 -0
- package/types/utils/roles.d.ts +1 -0
- package/types/utils/splitType.d.ts +3 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @xtctwins/tctwins-bimx-engine
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { defineComponent as V, ref as c, onMounted as A, openBlock as C, createElementBlock as k, createElementVNode as t, normalizeClass as b, unref as o, pushScopeId as y, popScopeId as W } from "vue";
|
|
2
|
+
import { k as w, O as e, l as X } from "./index-3StVDuUH.mjs";
|
|
3
|
+
const B = (f) => (y("data-v-a8db1610"), f = f(), W(), f), $ = { class: "annotation_component" }, L = {
|
|
4
|
+
class: "annotation_toolbar",
|
|
5
|
+
id: "annotation_toolbar"
|
|
6
|
+
}, E = { class: "annotation_toolbar_wrapper" }, S = { class: "annotation_toolbar_group" }, O = { class: "annotation_tool_btn_momeber" }, R = ["src"], z = ["src"], F = { class: "annotation_tool_btn_momeber" }, N = ["src"], P = ["src"], U = { class: "annotation_tool_btn_momeber" }, j = ["src"], q = ["src"], D = { class: "annotation_tool_btn_momeber" }, G = ["src"], H = ["src"], J = { class: "annotation_tool_btn_momeber" }, K = ["src"], Q = ["src"], Y = /* @__PURE__ */ B(() => /* @__PURE__ */ t("div", { class: "tollbar_trangle" }, null, -1)), Z = { style: { display: "none" } }, tt = /* @__PURE__ */ B(() => /* @__PURE__ */ t("div", { id: "move_icon" }, null, -1)), nt = ["src"], ot = ["src"], et = ["src"], it = ["src"], at = ["src"], st = ["src"], lt = /* @__PURE__ */ V({
|
|
7
|
+
__name: "AnnotationTool",
|
|
8
|
+
emits: ["annotationPanelControl", "uploadImage", "clickAnnotation"],
|
|
9
|
+
setup(f, { emit: ct }) {
|
|
10
|
+
let l;
|
|
11
|
+
const u = c(), p = c();
|
|
12
|
+
let _;
|
|
13
|
+
const m = c(), d = c("很抱歉,普通用户图片标注只能标注1个"), v = c(), a = c("");
|
|
14
|
+
let T;
|
|
15
|
+
const h = c(), g = c({
|
|
16
|
+
file: !0,
|
|
17
|
+
image: !0,
|
|
18
|
+
record: !1,
|
|
19
|
+
text: !0,
|
|
20
|
+
video: !1
|
|
21
|
+
});
|
|
22
|
+
A(() => {
|
|
23
|
+
}), w.on("sendFileId", (n) => {
|
|
24
|
+
h.value = n, h.value, h.value, l && s(!1), a.value = "";
|
|
25
|
+
}), w.on("BimViewer", () => {
|
|
26
|
+
l = window.BimViewer.annotationTool, T = window.BimViewer.eventTrigger, T.on("createAnnotation", (n) => {
|
|
27
|
+
console.log("newAnno", n), _ = l.currentAnnotation;
|
|
28
|
+
});
|
|
29
|
+
}), document.addEventListener("mousedown", (n) => {
|
|
30
|
+
if (n.target.classList.contains("deleteAnnotation"))
|
|
31
|
+
n.target.getAttribute("annotationId");
|
|
32
|
+
else if (n.target.classList.contains("addContent"))
|
|
33
|
+
n.target.getAttribute("annotationid");
|
|
34
|
+
else if (n.target.classList.contains("annotation-marker")) {
|
|
35
|
+
const { id: i } = n.target;
|
|
36
|
+
if (_) {
|
|
37
|
+
const { id: r } = _, I = document.getElementById(r);
|
|
38
|
+
I && (I.style.borderColor = "transparent");
|
|
39
|
+
}
|
|
40
|
+
for (let r = 0; r < u.value.length; r++)
|
|
41
|
+
u.value[r].id.toString() === i && (_ = u.value[r], l.currentAnnotation = _);
|
|
42
|
+
n.target.style.borderColor = "#fff", p.value = _.id, w.emit("clickAnnotation", p.value), setTimeout(() => {
|
|
43
|
+
M();
|
|
44
|
+
}, 300);
|
|
45
|
+
} else if (n.target.classList.contains("annotation_tool_btn")) {
|
|
46
|
+
const i = n.target.getAttribute("buttonType");
|
|
47
|
+
a.value === i ? a.value = "" : (x(i), a.value = i);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const M = () => {
|
|
51
|
+
let n = 0;
|
|
52
|
+
for (let i = 0; i < u.value.length; i++)
|
|
53
|
+
if (u.value[i].id === p.value) {
|
|
54
|
+
n = i + 1;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
if (n >= 5) {
|
|
58
|
+
const i = document.getElementById("contentList");
|
|
59
|
+
i == null || i.scrollTo(0, n * 300);
|
|
60
|
+
}
|
|
61
|
+
}, s = (n) => {
|
|
62
|
+
l.setEnabled(n);
|
|
63
|
+
}, x = (n) => {
|
|
64
|
+
n === "image" ? g.value.image ? (s(!0), l.setCurrentType(n)) : (d.value = "很抱歉,普通用户图片标注只能标注1个", v.value = "快去开通会员增加标注数量吧~", m.value.openMask(), s(!1)) : n === "record" ? g.value.record ? (s(!0), l.setCurrentType(n)) : (d.value = "很抱歉,语音标注需开通会员!", v.value = "", m.value.openMask(), s(!1)) : n === "video" ? g.value.video ? (s(!0), l.setCurrentType(n)) : (d.value = "很抱歉,视频标注需开通会员!", v.value = "", m.value.openMask(), s(!1)) : n === "file" ? g.value.file ? (s(!0), l.setCurrentType(n)) : (d.value = "很抱歉,普通用户文本标注只能标注1个", v.value = "快去开通会员增加标注数量吧~", m.value.openMask(), s(!1)) : n === "text" && (g.value.text ? (s(!0), l.setCurrentType(n)) : (d.value = "很抱歉,普通用户文字标注只能标注1个", v.value = "快去开通会员增加标注数量吧~", m.value.openMask(), s(!1)));
|
|
65
|
+
};
|
|
66
|
+
return (n, i) => (C(), k("div", $, [
|
|
67
|
+
t("div", L, [
|
|
68
|
+
t("div", E, [
|
|
69
|
+
t("div", S, [
|
|
70
|
+
t("button", {
|
|
71
|
+
buttonType: "image",
|
|
72
|
+
class: b(["annotation_tool_btn", { active: a.value === "image" }]),
|
|
73
|
+
id: "annotation_tool_btn_image"
|
|
74
|
+
}, [
|
|
75
|
+
t("div", O, [
|
|
76
|
+
t("img", {
|
|
77
|
+
src: o(e) + "/member-images/open-member-icon.png",
|
|
78
|
+
alt: ""
|
|
79
|
+
}, null, 8, R)
|
|
80
|
+
]),
|
|
81
|
+
t("img", {
|
|
82
|
+
src: `${o(e)}/BIMX_Website/main/mainView/function_icon/annotation_icons/${a.value !== "image" ? "image" : "image_active"}.png`
|
|
83
|
+
}, null, 8, z)
|
|
84
|
+
], 2),
|
|
85
|
+
t("button", {
|
|
86
|
+
buttonType: "record",
|
|
87
|
+
class: b(["annotation_tool_btn", { active: a.value === "record" }]),
|
|
88
|
+
id: "annotation_tool_btn_record"
|
|
89
|
+
}, [
|
|
90
|
+
t("div", F, [
|
|
91
|
+
t("img", {
|
|
92
|
+
src: o(e) + "/member-images/open-member-icon.png",
|
|
93
|
+
alt: ""
|
|
94
|
+
}, null, 8, N)
|
|
95
|
+
]),
|
|
96
|
+
t("img", {
|
|
97
|
+
src: `${o(e)}/BIMX_Website/main/mainView/function_icon/annotation_icons/${a.value !== "record" ? "record" : "record_active"}.png`
|
|
98
|
+
}, null, 8, P)
|
|
99
|
+
], 2),
|
|
100
|
+
t("button", {
|
|
101
|
+
buttonType: "video",
|
|
102
|
+
class: b(["annotation_tool_btn", { active: a.value === "video" }]),
|
|
103
|
+
id: "annotation_tool_btn_video"
|
|
104
|
+
}, [
|
|
105
|
+
t("div", U, [
|
|
106
|
+
t("img", {
|
|
107
|
+
src: o(e) + "/member-images/open-member-icon.png",
|
|
108
|
+
alt: ""
|
|
109
|
+
}, null, 8, j)
|
|
110
|
+
]),
|
|
111
|
+
t("img", {
|
|
112
|
+
src: `${o(e)}/BIMX_Website/main/mainView/function_icon/annotation_icons/${a.value !== "video" ? "video" : "video_active"}.png`
|
|
113
|
+
}, null, 8, q)
|
|
114
|
+
], 2),
|
|
115
|
+
t("button", {
|
|
116
|
+
buttonType: "file",
|
|
117
|
+
class: b(["annotation_tool_btn", { active: a.value === "file" }]),
|
|
118
|
+
id: "annotation_tool_btn_file"
|
|
119
|
+
}, [
|
|
120
|
+
t("div", D, [
|
|
121
|
+
t("img", {
|
|
122
|
+
src: o(e) + "/member-images/open-member-icon.png",
|
|
123
|
+
alt: ""
|
|
124
|
+
}, null, 8, G)
|
|
125
|
+
]),
|
|
126
|
+
t("img", {
|
|
127
|
+
src: `${o(e)}/BIMX_Website/main/mainView/function_icon/annotation_icons/${a.value !== "file" ? "file" : "file_active"}.png`
|
|
128
|
+
}, null, 8, H)
|
|
129
|
+
], 2),
|
|
130
|
+
t("button", {
|
|
131
|
+
buttonType: "text",
|
|
132
|
+
class: b(["annotation_tool_btn", { active: a.value === "text" }]),
|
|
133
|
+
id: "annotation_tool_btn_text"
|
|
134
|
+
}, [
|
|
135
|
+
t("div", J, [
|
|
136
|
+
t("img", {
|
|
137
|
+
src: o(e) + "/member-images/open-member-icon.png",
|
|
138
|
+
alt: ""
|
|
139
|
+
}, null, 8, K)
|
|
140
|
+
]),
|
|
141
|
+
t("img", {
|
|
142
|
+
src: `${o(e)}/BIMX_Website/main/mainView/function_icon/annotation_icons/${a.value !== "text" ? "text" : "text_active"}.png`
|
|
143
|
+
}, null, 8, Q)
|
|
144
|
+
], 2)
|
|
145
|
+
])
|
|
146
|
+
]),
|
|
147
|
+
Y
|
|
148
|
+
]),
|
|
149
|
+
t("div", Z, [
|
|
150
|
+
tt,
|
|
151
|
+
t("img", {
|
|
152
|
+
id: "annotation_tool_btn_img_image",
|
|
153
|
+
src: o(e) + "/BIMX_Website/main/mainView/function_icon/annotation_icons/image_active.png"
|
|
154
|
+
}, null, 8, nt),
|
|
155
|
+
t("img", {
|
|
156
|
+
id: "annotation_tool_btn_img_record",
|
|
157
|
+
src: o(e) + "/BIMX_Website/main/mainView/function_icon/annotation_icons/record_active.png"
|
|
158
|
+
}, null, 8, ot),
|
|
159
|
+
t("img", {
|
|
160
|
+
id: "annotation_tool_btn_img_video",
|
|
161
|
+
src: o(e) + "/BIMX_Website/main/mainView/function_icon/annotation_icons/video_active.png"
|
|
162
|
+
}, null, 8, et),
|
|
163
|
+
t("img", {
|
|
164
|
+
id: "annotation_tool_btn_img_file",
|
|
165
|
+
src: o(e) + "/BIMX_Website/main/mainView/function_icon/annotation_icons/file_active.png"
|
|
166
|
+
}, null, 8, it),
|
|
167
|
+
t("img", {
|
|
168
|
+
id: "annotation_tool_btn_img_text",
|
|
169
|
+
src: o(e) + "/BIMX_Website/main/mainView/function_icon/annotation_icons/text_active.png"
|
|
170
|
+
}, null, 8, at),
|
|
171
|
+
t("img", {
|
|
172
|
+
id: "upload_image",
|
|
173
|
+
src: o(e) + "/BIMX_Website/main/mainView/function_icon/annotation_icons/upload.png"
|
|
174
|
+
}, null, 8, st)
|
|
175
|
+
])
|
|
176
|
+
]));
|
|
177
|
+
}
|
|
178
|
+
}), ut = /* @__PURE__ */ X(lt, [["__scopeId", "data-v-a8db1610"]]);
|
|
179
|
+
export {
|
|
180
|
+
ut as default
|
|
181
|
+
};
|