@xtctwins/tctwins-bimx-engine 0.3.21 → 0.3.22
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 +196 -196
- package/dist/{AnnotationTool-DCHJcLix.mjs → AnnotationTool-CtRhDcPK.mjs} +35 -35
- package/dist/BIMX_Viewer_Lib.es.js +6 -6
- package/dist/BIMX_Viewer_Lib.umd.js +214 -167
- package/dist/{CameraViewTool-CJfs6vWu.mjs → CameraViewTool-CtLUEw0Q.mjs} +38 -38
- package/dist/{CommentTool-mcXTV3bv.mjs → CommentTool-B8fvijhz.mjs} +192 -192
- package/dist/{HiddenTool-BXTqbPUK.mjs → HiddenTool-511eglcE.mjs} +13 -13
- package/dist/{InspectorTool-D6DtUWoh.mjs → InspectorTool-D9Yjs6eH.mjs} +13 -13
- package/dist/{MeasureTool-BZxE7H7U.mjs → MeasureTool-C5Ce0Nef.mjs} +125 -125
- package/dist/{MouseTool-Clt4JeIj.mjs → MouseTool-BJX4hgly.mjs} +8 -8
- package/dist/{NavigateTool-cQshheaw.mjs → NavigateTool-BxOX-2P9.mjs} +8 -8
- package/dist/{OperateTool-C86C-l1z.mjs → OperateTool-DdkSl849.mjs} +61 -58
- package/dist/{RoamTool-DueJxPwv.mjs → RoamTool-CzNcha7A.mjs} +27 -27
- package/dist/ScreenShotTool-_TQ3T0xw.mjs +429 -0
- package/dist/{SectionTool-CKrvJEQ9.mjs → SectionTool-DlUhDw_i.mjs} +70 -70
- package/dist/SettingTool-yhgi_CY0.mjs +1787 -0
- package/dist/StructureTree-CNKrxyeJ.mjs +1685 -0
- package/dist/{alert-D-agI6w6.mjs → alert-B0WoSDD3.mjs} +14 -14
- package/dist/{index-jngVSTsO.mjs → index-D7FcGpin.mjs} +56419 -53825
- package/dist/index.html +17 -17
- package/dist/{panel.vue_vue_type_style_index_0_lang-DfDOwKP2.mjs → panel.vue_vue_type_style_index_0_lang-BG2LZoNF.mjs} +1 -1
- package/dist/style.css +3 -3
- package/dist/{tallPanel-CNORaYkU.mjs → tallPanel-DpEzw_w-.mjs} +12 -12
- package/package.json +85 -85
- package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +38 -10
- package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +37 -9
- package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +5 -7
- package/types/components/BCFComponents/BCFFilter.vue.d.ts +5 -7
- package/types/components/BCFComponents/BCFTool.vue.d.ts +4 -7
- package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +5 -7
- package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +5 -6
- package/types/components/BCFComponents/commentInput.vue.d.ts +36 -10
- package/types/components/BCFComponents/commentsView.vue.d.ts +36 -7
- package/types/components/BCFComponents/dialogPanel.vue.d.ts +5 -8
- package/types/components/BCFComponents/imageView.vue.d.ts +5 -7
- package/types/components/BCFComponents/imageZoomIn.vue.d.ts +5 -6
- package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/AppToolbar.vue.d.ts +18 -1
- package/types/components/BimViewerComponents/CameraViewTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/CommentTool.vue.d.ts +32 -1
- package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/MobileCommentsTool/add.vue.d.ts +6 -8
- package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +4 -5
- package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +2 -2
- package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +270 -1
- package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +291 -7
- package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +5 -6
- package/types/components/BimViewerComponents/MouseTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/SettingTool.vue.d.ts +4 -6
- package/types/components/BimViewerComponents/StructureTree.vue.d.ts +11642 -1
- package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
- package/types/components/BimxViewerComp.vue.d.ts +7 -21
- package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +37 -10
- package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +37 -9
- package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +291 -7
- package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +270 -1
- package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +5 -8
- package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +38 -12
- package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +7 -9
- package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +5 -7
- package/types/components/utilsComponents/alert.vue.d.ts +1 -1
- package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
- package/types/components/utilsComponents/closeButton_dark.vue.d.ts +1 -1
- package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
- package/types/components/utilsComponents/loading.vue.d.ts +1 -1
- package/types/components/utilsComponents/panel.vue.d.ts +8 -2
- package/types/components/utilsComponents/prompt.vue.d.ts +1 -1
- package/types/components/utilsComponents/rectangleButton.vue.d.ts +3 -1
- package/types/components/utilsComponents/tallPanel.vue.d.ts +13 -3
- package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +13 -3
- package/types/pages/BimxViewerEntry.vue.d.ts +4 -66
- package/types/store/toolbars.d.ts +50 -50
- package/types/viewerManager/sectionManager.d.ts +25 -25
- package/dist/01.xtc +0 -0
- package/dist/02.xtc +0 -0
- package/dist/03.xtc +0 -0
- package/dist/ScreenShotTool-DDtQfqF5.mjs +0 -356
- package/dist/SettingTool-CWAOl-yl.mjs +0 -1508
- package/dist/StructureTree-BTqIDob7.mjs +0 -1582
- package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +0 -22
- package/types/components/BimViewerComponents/emptyPage.vue.d.ts +0 -8
- package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +0 -10
- package/types/components/bimxViewer.vue.d.ts +0 -27
- package/types/pages/viewerEntry.vue.d.ts +0 -116
- package/types/tests/cmt.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,196 +1,196 @@
|
|
|
1
|
-
## @xtctwins/tctwins-bimx-engine
|
|
2
|
-
|
|
3
|
-
# xtc 三维文件查看器
|
|
4
|
-
|
|
5
|
-
## 安装相关依赖
|
|
6
|
-
|
|
7
|
-
## UI element-plus
|
|
8
|
-
|
|
9
|
-
<https://www.npmjs.com/package/element-plus>
|
|
10
|
-
|
|
11
|
-
```ssh
|
|
12
|
-
npm i element-plus
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## 事件总线 mitt
|
|
16
|
-
|
|
17
|
-
<https://www.npmjs.com/package/mitt>
|
|
18
|
-
|
|
19
|
-
```ssh
|
|
20
|
-
npm i mitt
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 状态管理 pinia
|
|
24
|
-
|
|
25
|
-
<https://www.npmjs.com/package/pinia>
|
|
26
|
-
|
|
27
|
-
```ssh
|
|
28
|
-
npm i pinia
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## 文件获取 ali-oss
|
|
32
|
-
|
|
33
|
-
<https://www.npmjs.com/package/ali-oss>
|
|
34
|
-
|
|
35
|
-
```ssh
|
|
36
|
-
npm i ali-oss
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
# 安装依赖
|
|
40
|
-
|
|
41
|
-
```ssh
|
|
42
|
-
// 安装依赖
|
|
43
|
-
npm i @xtctwins/tctwins-bimx-engine
|
|
44
|
-
// 引入样式
|
|
45
|
-
import "@xtctwins/tctwins-bimx-engine/dist/style.css";
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
# Example
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
<template>
|
|
52
|
-
<!-- 一个模型 -->
|
|
53
|
-
<!-- :model-buffer 和 :file-path 选一个使用即可-->
|
|
54
|
-
<!-- :model-buffer 是直接传入模型buffer数据-->
|
|
55
|
-
<!-- :file-path 是传入文件下载路径-->
|
|
56
|
-
<BIMXViewer
|
|
57
|
-
v-if="initialzed"
|
|
58
|
-
:load-meta="true"
|
|
59
|
-
:file-path="filePath"
|
|
60
|
-
:nav-cube-size="120"
|
|
61
|
-
:background-color="'#d0d0d0'"
|
|
62
|
-
@emit-handler="EmitHandler" />
|
|
63
|
-
|
|
64
|
-
<!-- 集成模型 -->
|
|
65
|
-
<!-- 请使用-->
|
|
66
|
-
<!--:file-paths="filePaths"-->
|
|
67
|
-
<!--:multi-model="true"-->
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script lang="ts" setup>
|
|
71
|
-
import { onMounted, ref } from "vue";
|
|
72
|
-
import { BIMXViewer } from "@xtctwins/tctwins-bimx-engine";
|
|
73
|
-
import type { EventContent } from "@xtctwins/tctwins-bimx-engine";
|
|
74
|
-
import "@xtctwins/tctwins-bimx-engine/dist/style.css";
|
|
75
|
-
|
|
76
|
-
const initialzed = ref(false);
|
|
77
|
-
const filePath = ref(`https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/test/1公寓幕墙.xtc`);
|
|
78
|
-
const filePaths = [
|
|
79
|
-
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170745913287.xtc",
|
|
80
|
-
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170736552499.xtc",
|
|
81
|
-
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170731500203.xtc"
|
|
82
|
-
];
|
|
83
|
-
const modelBuffer = ref<ArrayBuffer>();
|
|
84
|
-
|
|
85
|
-
onMounted(() => {
|
|
86
|
-
//如果选择直接传入模型modelBuffer,请在获取到buffer后再初始化BIMXViewer
|
|
87
|
-
// getModel(() => {
|
|
88
|
-
// initialzed.value = true;
|
|
89
|
-
// });
|
|
90
|
-
|
|
91
|
-
//如果使用filePath或者filePaths则直接初始化BIMXViewer即可
|
|
92
|
-
initialzed.value = true;
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
//监听引擎传出的事件
|
|
96
|
-
const EmitHandler = (content: EventContent) => {
|
|
97
|
-
console.log(content);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
//xtc模型数据
|
|
101
|
-
const getModel = (callback: () => void) => {
|
|
102
|
-
// 自行填写获取模型文件的内容
|
|
103
|
-
// ...
|
|
104
|
-
// modelBuffer.value = ...
|
|
105
|
-
callback();
|
|
106
|
-
};
|
|
107
|
-
</script>
|
|
108
|
-
|
|
109
|
-
<style>
|
|
110
|
-
#app {
|
|
111
|
-
position: absolute;
|
|
112
|
-
left: 0;
|
|
113
|
-
right: 0;
|
|
114
|
-
top: 0;
|
|
115
|
-
bottom: 0;
|
|
116
|
-
width: 100%;
|
|
117
|
-
height: 100%;
|
|
118
|
-
}
|
|
119
|
-
</style>
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## 其他参数解释
|
|
124
|
-
|
|
125
|
-
### 基础设置
|
|
126
|
-
|
|
127
|
-
是否载入构件属性信息(xts文件),
|
|
128
|
-
如果要载入,在模型xtc文件相同路径下必须有同名xts文件
|
|
129
|
-
|
|
130
|
-
```ssh
|
|
131
|
-
:load-meta="true"
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
是否显示导航盒
|
|
135
|
-
|
|
136
|
-
```ssh
|
|
137
|
-
:showNavCube="true"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
导航盒尺寸
|
|
141
|
-
|
|
142
|
-
```ssh
|
|
143
|
-
:nav-cube-size="120"
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
背景颜色
|
|
147
|
-
|
|
148
|
-
```ssh
|
|
149
|
-
:background-color="#d0d0d0"
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### 功能
|
|
153
|
-
|
|
154
|
-
添加需要的即可
|
|
155
|
-
|
|
156
|
-
```ssh
|
|
157
|
-
inspector
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
inspector - 构建属性面板开启 (需要开启loadMeta)
|
|
161
|
-
|
|
162
|
-
```ssh
|
|
163
|
-
reseta
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
reseta - 重置模型视角
|
|
167
|
-
|
|
168
|
-
## 事件
|
|
169
|
-
|
|
170
|
-
```ssh
|
|
171
|
-
//监听引擎传出的事件
|
|
172
|
-
const EmitHandler = (content: EventContent) => {
|
|
173
|
-
console.log(content);
|
|
174
|
-
};
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
```ts
|
|
178
|
-
//事件内容
|
|
179
|
-
type EventContent = {
|
|
180
|
-
isTool: boolean;
|
|
181
|
-
event_target: ComponentName | "BimXViewer" | "ToolBar";
|
|
182
|
-
event_name: string;
|
|
183
|
-
content: {};
|
|
184
|
-
};
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
事件内容包括:
|
|
188
|
-
|
|
189
|
-
```ssh
|
|
190
|
-
"pickedEntity" - 点击构件
|
|
191
|
-
"pickedNothing" - 点击空白处
|
|
192
|
-
...
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
#####
|
|
1
|
+
## @xtctwins/tctwins-bimx-engine
|
|
2
|
+
|
|
3
|
+
# xtc 三维文件查看器
|
|
4
|
+
|
|
5
|
+
## 安装相关依赖
|
|
6
|
+
|
|
7
|
+
## UI element-plus
|
|
8
|
+
|
|
9
|
+
<https://www.npmjs.com/package/element-plus>
|
|
10
|
+
|
|
11
|
+
```ssh
|
|
12
|
+
npm i element-plus
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 事件总线 mitt
|
|
16
|
+
|
|
17
|
+
<https://www.npmjs.com/package/mitt>
|
|
18
|
+
|
|
19
|
+
```ssh
|
|
20
|
+
npm i mitt
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 状态管理 pinia
|
|
24
|
+
|
|
25
|
+
<https://www.npmjs.com/package/pinia>
|
|
26
|
+
|
|
27
|
+
```ssh
|
|
28
|
+
npm i pinia
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 文件获取 ali-oss
|
|
32
|
+
|
|
33
|
+
<https://www.npmjs.com/package/ali-oss>
|
|
34
|
+
|
|
35
|
+
```ssh
|
|
36
|
+
npm i ali-oss
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
# 安装依赖
|
|
40
|
+
|
|
41
|
+
```ssh
|
|
42
|
+
// 安装依赖
|
|
43
|
+
npm i @xtctwins/tctwins-bimx-engine
|
|
44
|
+
// 引入样式
|
|
45
|
+
import "@xtctwins/tctwins-bimx-engine/dist/style.css";
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
# Example
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
<template>
|
|
52
|
+
<!-- 一个模型 -->
|
|
53
|
+
<!-- :model-buffer 和 :file-path 选一个使用即可-->
|
|
54
|
+
<!-- :model-buffer 是直接传入模型buffer数据-->
|
|
55
|
+
<!-- :file-path 是传入文件下载路径-->
|
|
56
|
+
<BIMXViewer
|
|
57
|
+
v-if="initialzed"
|
|
58
|
+
:load-meta="true"
|
|
59
|
+
:file-path="filePath"
|
|
60
|
+
:nav-cube-size="120"
|
|
61
|
+
:background-color="'#d0d0d0'"
|
|
62
|
+
@emit-handler="EmitHandler" />
|
|
63
|
+
|
|
64
|
+
<!-- 集成模型 -->
|
|
65
|
+
<!-- 请使用-->
|
|
66
|
+
<!--:file-paths="filePaths"-->
|
|
67
|
+
<!--:multi-model="true"-->
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<script lang="ts" setup>
|
|
71
|
+
import { onMounted, ref } from "vue";
|
|
72
|
+
import { BIMXViewer } from "@xtctwins/tctwins-bimx-engine";
|
|
73
|
+
import type { EventContent } from "@xtctwins/tctwins-bimx-engine";
|
|
74
|
+
import "@xtctwins/tctwins-bimx-engine/dist/style.css";
|
|
75
|
+
|
|
76
|
+
const initialzed = ref(false);
|
|
77
|
+
const filePath = ref(`https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/test/1公寓幕墙.xtc`);
|
|
78
|
+
const filePaths = [
|
|
79
|
+
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170745913287.xtc",
|
|
80
|
+
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170736552499.xtc",
|
|
81
|
+
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170731500203.xtc"
|
|
82
|
+
];
|
|
83
|
+
const modelBuffer = ref<ArrayBuffer>();
|
|
84
|
+
|
|
85
|
+
onMounted(() => {
|
|
86
|
+
//如果选择直接传入模型modelBuffer,请在获取到buffer后再初始化BIMXViewer
|
|
87
|
+
// getModel(() => {
|
|
88
|
+
// initialzed.value = true;
|
|
89
|
+
// });
|
|
90
|
+
|
|
91
|
+
//如果使用filePath或者filePaths则直接初始化BIMXViewer即可
|
|
92
|
+
initialzed.value = true;
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
//监听引擎传出的事件
|
|
96
|
+
const EmitHandler = (content: EventContent) => {
|
|
97
|
+
console.log(content);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
//xtc模型数据
|
|
101
|
+
const getModel = (callback: () => void) => {
|
|
102
|
+
// 自行填写获取模型文件的内容
|
|
103
|
+
// ...
|
|
104
|
+
// modelBuffer.value = ...
|
|
105
|
+
callback();
|
|
106
|
+
};
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<style>
|
|
110
|
+
#app {
|
|
111
|
+
position: absolute;
|
|
112
|
+
left: 0;
|
|
113
|
+
right: 0;
|
|
114
|
+
top: 0;
|
|
115
|
+
bottom: 0;
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: 100%;
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 其他参数解释
|
|
124
|
+
|
|
125
|
+
### 基础设置
|
|
126
|
+
|
|
127
|
+
是否载入构件属性信息(xts文件),
|
|
128
|
+
如果要载入,在模型xtc文件相同路径下必须有同名xts文件
|
|
129
|
+
|
|
130
|
+
```ssh
|
|
131
|
+
:load-meta="true"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
是否显示导航盒
|
|
135
|
+
|
|
136
|
+
```ssh
|
|
137
|
+
:showNavCube="true"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
导航盒尺寸
|
|
141
|
+
|
|
142
|
+
```ssh
|
|
143
|
+
:nav-cube-size="120"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
背景颜色
|
|
147
|
+
|
|
148
|
+
```ssh
|
|
149
|
+
:background-color="#d0d0d0"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 功能
|
|
153
|
+
|
|
154
|
+
添加需要的即可
|
|
155
|
+
|
|
156
|
+
```ssh
|
|
157
|
+
inspector
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
inspector - 构建属性面板开启 (需要开启loadMeta)
|
|
161
|
+
|
|
162
|
+
```ssh
|
|
163
|
+
reseta
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
reseta - 重置模型视角
|
|
167
|
+
|
|
168
|
+
## 事件
|
|
169
|
+
|
|
170
|
+
```ssh
|
|
171
|
+
//监听引擎传出的事件
|
|
172
|
+
const EmitHandler = (content: EventContent) => {
|
|
173
|
+
console.log(content);
|
|
174
|
+
};
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
//事件内容
|
|
179
|
+
type EventContent = {
|
|
180
|
+
isTool: boolean;
|
|
181
|
+
event_target: ComponentName | "BimXViewer" | "ToolBar";
|
|
182
|
+
event_name: string;
|
|
183
|
+
content: {};
|
|
184
|
+
};
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
事件内容包括:
|
|
188
|
+
|
|
189
|
+
```ssh
|
|
190
|
+
"pickedEntity" - 点击构件
|
|
191
|
+
"pickedNothing" - 点击空白处
|
|
192
|
+
...
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
##### 测试
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as D } from "./alert-
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
1
|
+
import { _ as D } from "./alert-B0WoSDD3.mjs";
|
|
2
|
+
import { defineComponent as H, ref as b, watch as O, onMounted as q, onBeforeUnmount as F, openBlock as i, createElementBlock as a, unref as n, createCommentVNode as p, createElementVNode as l, normalizeClass as f, Fragment as B, renderList as C, toDisplayString as R, withDirectives as U, createVNode as z, vShow as G } from "vue";
|
|
3
|
+
import { F as j, G as J, H as o, I as v, al as c, P as r, M as K } from "./index-D7FcGpin.mjs";
|
|
4
4
|
const Q = { class: "annotation_component" }, Y = {
|
|
5
5
|
key: 0,
|
|
6
6
|
id: "annotation_toolbar",
|
|
@@ -14,25 +14,25 @@ const Q = { class: "annotation_component" }, Y = {
|
|
|
14
14
|
}, ie = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "mobile_annotation_toolbar"
|
|
17
|
-
}, ae = { class: "anno_toolList" }, se = { class: "label-list" },
|
|
17
|
+
}, ae = { class: "anno_toolList" }, se = { class: "label-list" }, le = ["onClick"], ce = { class: "item-img" }, re = ["src"], _e = { class: "item-name" }, de = /* @__PURE__ */ H({
|
|
18
18
|
__name: "AnnotationTool",
|
|
19
19
|
props: ["componentId"],
|
|
20
20
|
emits: ["uploadImage", "clickAnnotation", "emitHandler"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
|
|
21
|
+
setup(P, { emit: $ }) {
|
|
22
|
+
const y = j(), w = J(), M = $, d = (e) => {
|
|
23
|
+
M("emitHandler", e);
|
|
24
24
|
};
|
|
25
25
|
let T;
|
|
26
|
-
const A =
|
|
26
|
+
const A = b(!0), s = b("");
|
|
27
27
|
let m;
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const S = b(), h = P;
|
|
29
|
+
O(
|
|
30
30
|
() => w.isToolActive(h.componentId),
|
|
31
31
|
(e) => {
|
|
32
32
|
e || (s.value = "");
|
|
33
33
|
}
|
|
34
|
-
),
|
|
35
|
-
|
|
34
|
+
), q(() => {
|
|
35
|
+
S.value = o("annoLimit"), w.setReadyById(h.componentId);
|
|
36
36
|
});
|
|
37
37
|
const x = {
|
|
38
38
|
image: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/image_active.png`,
|
|
@@ -75,20 +75,20 @@ const Q = { class: "annotation_component" }, Y = {
|
|
|
75
75
|
const I = (e) => {
|
|
76
76
|
g(L(e.type));
|
|
77
77
|
};
|
|
78
|
-
v.on("setAnnoStatus", I),
|
|
78
|
+
v.on("setAnnoStatus", I), F(() => {
|
|
79
79
|
v.off("BimViewer", k), v.off("setAnnoStatus", I);
|
|
80
80
|
});
|
|
81
81
|
const L = (e) => {
|
|
82
82
|
if (e === "image")
|
|
83
|
-
return
|
|
83
|
+
return c[0];
|
|
84
84
|
if (e === "record")
|
|
85
|
-
return
|
|
85
|
+
return c[1];
|
|
86
86
|
if (e === "video")
|
|
87
|
-
return
|
|
87
|
+
return c[2];
|
|
88
88
|
if (e === "file")
|
|
89
|
-
return
|
|
89
|
+
return c[3];
|
|
90
90
|
if (e === "text")
|
|
91
|
-
return
|
|
91
|
+
return c[4];
|
|
92
92
|
}, g = (e) => {
|
|
93
93
|
o("editPrivilege") != 1 && (s.value === e.code ? (s.value = "", V(e, !1)) : (s.value = e.code, V(e, !0)));
|
|
94
94
|
}, N = (e) => {
|
|
@@ -110,57 +110,57 @@ const Q = { class: "annotation_component" }, Y = {
|
|
|
110
110
|
const W = D;
|
|
111
111
|
return i(), a("div", Q, [
|
|
112
112
|
n(o)("isMobile") ? (i(), a("div", ie, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
(i(!0), a(B, null, C(n(
|
|
113
|
+
l("div", ae, [
|
|
114
|
+
l("div", se, [
|
|
115
|
+
(i(!0), a(B, null, C(n(c), (t, u) => (i(), a("div", {
|
|
116
116
|
key: u,
|
|
117
117
|
class: f(["label-item", { "label-item-active": s.value === t.code && n(o)("editPrivilege") == 0, noPermission: n(o)("editPrivilege") == 1 }]),
|
|
118
118
|
onClick: (X) => g(t)
|
|
119
119
|
}, [
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
l("div", ce, [
|
|
121
|
+
l("img", {
|
|
122
122
|
class: "label-item-img",
|
|
123
123
|
src: n(r) + `/bim-viewer/annotation/new-icons/bimkk-mobile-anno-${s.value === t.code && n(o)("editPrivilege") == 0 ? t.imgActive : t.img}.svg`,
|
|
124
124
|
alt: ""
|
|
125
125
|
}, null, 8, re),
|
|
126
|
-
|
|
126
|
+
l("div", _e, R(n(y)(t.name)), 1)
|
|
127
127
|
])
|
|
128
|
-
], 10,
|
|
128
|
+
], 10, le))), 128))
|
|
129
129
|
])
|
|
130
130
|
])
|
|
131
131
|
])) : (i(), a("div", Y, [
|
|
132
|
-
n(o)("annotationPos").pos.includes("top") ? (i(), a("div", Z)) :
|
|
133
|
-
|
|
132
|
+
n(o)("annotationPos").pos.includes("top") ? (i(), a("div", Z)) : p("", !0),
|
|
133
|
+
l("div", {
|
|
134
134
|
class: f(["annotation_toolbar_wrapper", { annotation_toolbar_wrapper_disable: n(o)("editPrivilege") == 1 }])
|
|
135
135
|
}, [
|
|
136
|
-
|
|
137
|
-
(i(!0), a(B, null, C(n(
|
|
136
|
+
l("div", ee, [
|
|
137
|
+
(i(!0), a(B, null, C(n(c), (t, u) => (i(), a("button", {
|
|
138
138
|
id: `annotation_tool_btn_${u}`,
|
|
139
139
|
key: u,
|
|
140
140
|
class: f(["annotation_tool_btn", { active: s.value === t.code }]),
|
|
141
141
|
disabled: n(o)("editPrivilege") == 1,
|
|
142
142
|
onClick: (X) => g(t)
|
|
143
143
|
}, [
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
p("", !0),
|
|
145
|
+
l("img", {
|
|
146
146
|
src: `${n(r)}/bim-viewer/action-bars/panno-${s.value !== t.code ? t.img : t.imgActive}.svg`
|
|
147
147
|
}, null, 8, te)
|
|
148
148
|
], 10, ne))), 128))
|
|
149
149
|
])
|
|
150
150
|
], 2),
|
|
151
|
-
n(o)("annotationPos").pos.includes("bottom") ? (i(), a("div", oe)) :
|
|
151
|
+
n(o)("annotationPos").pos.includes("bottom") ? (i(), a("div", oe)) : p("", !0)
|
|
152
152
|
])),
|
|
153
|
-
z(
|
|
153
|
+
U(z(W, {
|
|
154
154
|
"click-handle": () => {
|
|
155
155
|
A.value = !1;
|
|
156
156
|
}
|
|
157
157
|
}, null, 8, ["click-handle"]), [
|
|
158
|
-
[
|
|
158
|
+
[G, A.value && n(o)("editPrivilege") == 0]
|
|
159
159
|
])
|
|
160
160
|
]);
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
}), ge = /* @__PURE__ */ K(de, [["__scopeId", "data-v-
|
|
163
|
+
}), ge = /* @__PURE__ */ K(de, [["__scopeId", "data-v-512207a7"]]);
|
|
164
164
|
export {
|
|
165
165
|
ge as default
|
|
166
166
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aL as e, U as t, aM as o, aN as i, a0 as l, aO as n, aP as I, aQ as r, aR as f, aS as g, aT as C, aU as M, aV as S, O as u } from "./index-D7FcGpin.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as BIMXViewer,
|
|
4
4
|
t as BIMX_CONFIGS,
|
|
@@ -8,10 +8,10 @@ export {
|
|
|
8
8
|
n as bimxMessages,
|
|
9
9
|
I as defaultI18nConfig,
|
|
10
10
|
r as setAllToolClose,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
f as setConfigs,
|
|
12
|
+
g as setGlobalI18n,
|
|
13
|
+
C as setI18nInstance,
|
|
14
14
|
M as setToolStatusById,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
S as setToolStatusBykey,
|
|
16
|
+
u as useLocaleStore
|
|
17
17
|
};
|