fl-web-component 0.1.0 → 1.0.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 +35 -24
- package/dist/fl-web-component.common.js +27308 -65
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/dist/fl-web-component.umd.js +27308 -65
- package/dist/fl-web-component.umd.js.map +1 -1
- package/dist/fl-web-component.umd.min.js +13 -1
- package/dist/fl-web-component.umd.min.js.map +1 -1
- package/package.json +80 -47
- package/packages/components/button/index.vue +16 -12
- package/packages/components/com-card/card-page.vue +102 -0
- package/packages/components/com-card/index.vue +53 -0
- package/packages/components/com-dialogWrapper/Readme.md +53 -0
- package/packages/components/com-dialogWrapper/index.vue +98 -0
- package/packages/components/com-flcanvas/components/bspline.js +91 -0
- package/packages/components/com-flcanvas/components/entityFormatting.js +503 -0
- package/packages/components/com-flcanvas/components/round10.js +24 -0
- package/packages/components/com-flcanvas/index.vue +259 -0
- package/packages/components/com-formDialog/Readme.md +409 -0
- package/packages/components/com-formDialog/index.vue +471 -0
- package/packages/components/com-graphics/index.vue +1073 -0
- package/packages/components/com-graphics/per-control.vue +109 -0
- package/packages/components/com-graphics/pid.vue +168 -0
- package/packages/components/com-page/index.vue +101 -0
- package/packages/components/com-selectTree/Readme.md +17 -0
- package/packages/components/com-selectTree/index.vue +236 -0
- package/packages/components/com-table/column-default.vue +71 -0
- package/packages/components/com-table/column-dynamic.vue +36 -0
- package/packages/components/com-table/column-menu.vue +71 -0
- package/packages/components/com-table/column-slot.vue +53 -0
- package/packages/components/com-table/column.vue +41 -0
- package/packages/components/com-table/config.js +21 -0
- package/packages/components/com-table/index.vue +281 -0
- package/packages/components/com-table/table-page.vue +106 -0
- package/packages/components/com-tabs/index.vue +50 -0
- package/packages/components/com-treeDynamic/Readme.md +271 -0
- package/packages/components/com-treeDynamic/index.vue +207 -0
- package/packages/components/model/api/index.js +59 -67
- package/packages/components/model/api/mock/detecttree.js +38 -38
- package/packages/components/model/api/mock/getmodel-line.js +15830 -79332
- package/packages/components/model/api/mock/init.js +1 -1
- package/packages/components/model/api/mock/pbstree.js +486 -495
- package/packages/components/model/components/TextOverTooltip/index.vue +3 -3
- package/packages/components/model/components/annotation-toolbar.vue +4 -19
- package/packages/components/model/components/check-proofing-model.vue +26 -29
- package/packages/components/model/components/clipping-type.vue +22 -14
- package/packages/components/model/components/com-dialogWrapper/index.vue +22 -25
- package/packages/components/model/components/detect-panel.vue +38 -26
- package/packages/components/model/components/detect-tree.vue +9 -24
- package/packages/components/model/components/firstPer-panel.vue +23 -25
- package/packages/components/model/components/header-button.vue +31 -107
- package/packages/components/model/components/imageViewer/index.vue +34 -35
- package/packages/components/model/components/import-model.vue +127 -127
- package/packages/components/model/components/location-panel.vue +25 -29
- package/packages/components/model/components/measure-type.vue +15 -15
- package/packages/components/model/components/pbs-tree.vue +139 -144
- package/packages/components/model/components/proof-config.vue +2 -10
- package/packages/components/model/components/proof-for-pc.vue +35 -32
- package/packages/components/model/components/proof-history.vue +136 -154
- package/packages/components/model/components/proof-panel-detail.vue +166 -165
- package/packages/components/model/components/proof-panel.vue +281 -205
- package/packages/components/model/components/proof-project-user.vue +13 -50
- package/packages/components/model/components/proof-publish.vue +130 -130
- package/packages/components/model/components/proof-role.vue +93 -124
- package/packages/components/model/components/props-panel.vue +63 -54
- package/packages/components/model/index.vue +3225 -3213
- package/packages/components/model/utils/annotation-tool.js +75 -82
- package/packages/components/model/utils/cursor.js +15 -10
- package/packages/components/model/utils/detect-v1.js +23 -35
- package/packages/components/model/utils/index.js +25 -25
- package/packages/components/model/utils/threejs/measure-angle.js +180 -180
- package/packages/components/model/utils/threejs/measure-area.js +196 -184
- package/packages/components/model/utils/threejs/measure-distance.js +154 -152
- package/packages/components/model/utils/threejs/measure-volume.js +64 -61
- package/patches/camera-controls+2.9.0.patch +63 -0
- package/src/assets/test.png +0 -0
- package/src/assets/worker.glb +0 -0
- package/src/main.js +27 -0
- package/src/utils/flgltf-parser.js +141 -0
- package/src/utils/instance-parser.js +402 -0
- package/src/utils/mock.js +84746 -0
- package/src/utils/threejs/measure-angle.js +240 -0
- package/src/utils/threejs/measure-area.js +249 -0
- package/src/utils/threejs/measure-distance.js +195 -0
- package/packages/index.js +0 -24
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="header-button">
|
|
3
|
-
<el-tooltip
|
|
4
|
-
class="item"
|
|
5
|
-
effect="dark"
|
|
6
|
-
content="返回"
|
|
7
|
-
placement="top-start"
|
|
8
|
-
>
|
|
3
|
+
<el-tooltip class="item" effect="dark" content="返回" placement="top-start">
|
|
9
4
|
<el-button class="back" size="small" @click="$router.go(-1)" icon="el-icon-back"></el-button>
|
|
10
5
|
</el-tooltip>
|
|
11
6
|
<div class="left">
|
|
12
|
-
<el-tooltip
|
|
13
|
-
class="item"
|
|
14
|
-
effect="dark"
|
|
15
|
-
content="PBS树"
|
|
16
|
-
placement="top-start"
|
|
17
|
-
>
|
|
7
|
+
<el-tooltip class="item" effect="dark" content="PBS树" placement="top-start">
|
|
18
8
|
<div
|
|
19
9
|
:class="[
|
|
20
10
|
'btn-item',
|
|
21
11
|
'pbstree',
|
|
22
12
|
btnActived['pbsTree'] ? 'el-button-actived' : '',
|
|
23
|
-
proofingModel ? '' : 'icon-disabeld'
|
|
13
|
+
proofingModel ? '' : 'icon-disabeld',
|
|
24
14
|
]"
|
|
25
15
|
@click="rightOperation('pbsTree')"
|
|
26
16
|
></div>
|
|
27
17
|
</el-tooltip>
|
|
28
18
|
<div class="split-line"></div>
|
|
29
|
-
<el-tooltip
|
|
30
|
-
class="item"
|
|
31
|
-
effect="dark"
|
|
32
|
-
content="属性"
|
|
33
|
-
placement="top-start"
|
|
34
|
-
>
|
|
19
|
+
<el-tooltip class="item" effect="dark" content="属性" placement="top-start">
|
|
35
20
|
<div
|
|
36
21
|
:class="[
|
|
37
22
|
'btn-item',
|
|
@@ -40,41 +25,29 @@
|
|
|
40
25
|
proofingModel ? '' : 'icon-disabeld',
|
|
41
26
|
]"
|
|
42
27
|
@click="rightOperation('property')"
|
|
43
|
-
style="margin-right: 0px
|
|
28
|
+
style="margin-right: 0px"
|
|
44
29
|
></div>
|
|
45
30
|
</el-tooltip>
|
|
46
31
|
</div>
|
|
47
32
|
<div class="left">
|
|
48
|
-
<el-tooltip
|
|
49
|
-
class="item"
|
|
50
|
-
effect="dark"
|
|
51
|
-
content="校审"
|
|
52
|
-
placement="top-start"
|
|
53
|
-
>
|
|
33
|
+
<el-tooltip class="item" effect="dark" content="校审" placement="top-start">
|
|
54
34
|
<div
|
|
55
35
|
:class="[
|
|
56
36
|
'btn-item',
|
|
57
37
|
'proof',
|
|
58
38
|
btnActived['proof'] ? 'el-button-actived' : '',
|
|
59
39
|
proofingModel ? '' : 'icon-disabeld',
|
|
60
|
-
|
|
61
40
|
]"
|
|
62
41
|
@click="rightOperation('proof')"
|
|
63
42
|
></div>
|
|
64
43
|
</el-tooltip>
|
|
65
|
-
<el-tooltip
|
|
66
|
-
class="item"
|
|
67
|
-
effect="dark"
|
|
68
|
-
content="碰撞检查"
|
|
69
|
-
placement="top-start"
|
|
70
|
-
>
|
|
44
|
+
<el-tooltip class="item" effect="dark" content="碰撞检查" placement="top-start">
|
|
71
45
|
<div
|
|
72
46
|
:class="[
|
|
73
47
|
'btn-item',
|
|
74
48
|
'detect',
|
|
75
49
|
btnActived['detect'] ? 'el-button-actived' : '',
|
|
76
50
|
proofingModel ? '' : 'icon-disabeld',
|
|
77
|
-
|
|
78
51
|
]"
|
|
79
52
|
@click="rightOperation('detect')"
|
|
80
53
|
></div>
|
|
@@ -95,17 +68,11 @@
|
|
|
95
68
|
'popover-layout',
|
|
96
69
|
btnActived['clip'] ? 'el-button-actived' : '',
|
|
97
70
|
proofingModel ? '' : 'icon-disabeld',
|
|
98
|
-
|
|
99
71
|
]"
|
|
100
72
|
@click="clickClip('clipping')"
|
|
101
73
|
>
|
|
102
74
|
<div class="popover-container" v-if="openClipping">
|
|
103
|
-
<el-tooltip
|
|
104
|
-
class="item"
|
|
105
|
-
effect="dark"
|
|
106
|
-
content="全局剖切"
|
|
107
|
-
placement="top-start"
|
|
108
|
-
>
|
|
75
|
+
<el-tooltip class="item" effect="dark" content="全局剖切" placement="top-start">
|
|
109
76
|
<div
|
|
110
77
|
:class="[
|
|
111
78
|
'btn-item',
|
|
@@ -132,87 +99,44 @@
|
|
|
132
99
|
'popover-layout',
|
|
133
100
|
btnActived['measure'] ? 'el-button-actived' : '',
|
|
134
101
|
proofingModel ? '' : 'icon-disabeld',
|
|
135
|
-
|
|
136
102
|
]"
|
|
137
103
|
@click="clickMeasure('measure')"
|
|
138
104
|
>
|
|
139
105
|
<div class="popover-container" v-if="openMeasure">
|
|
140
|
-
<el-tooltip
|
|
141
|
-
class="item"
|
|
142
|
-
effect="dark"
|
|
143
|
-
content="长度"
|
|
144
|
-
placement="top-start"
|
|
145
|
-
>
|
|
106
|
+
<el-tooltip class="item" effect="dark" content="长度" placement="top-start">
|
|
146
107
|
<div
|
|
147
|
-
:class="[
|
|
148
|
-
'btn-item',
|
|
149
|
-
'distance',
|
|
150
|
-
btnActived['distance'] ? 'el-button-actived' : '',
|
|
151
|
-
]"
|
|
108
|
+
:class="['btn-item', 'distance', btnActived['distance'] ? 'el-button-actived' : '']"
|
|
152
109
|
@click.stop="rightOperation('distance')"
|
|
153
110
|
></div
|
|
154
111
|
></el-tooltip>
|
|
155
|
-
<el-tooltip
|
|
156
|
-
class="item"
|
|
157
|
-
effect="dark"
|
|
158
|
-
content="面积"
|
|
159
|
-
placement="top-start"
|
|
160
|
-
>
|
|
112
|
+
<el-tooltip class="item" effect="dark" content="面积" placement="top-start">
|
|
161
113
|
<div
|
|
162
|
-
:class="[
|
|
163
|
-
'btn-item',
|
|
164
|
-
'area',
|
|
165
|
-
btnActived['area'] ? 'el-button-actived' : '',
|
|
166
|
-
]"
|
|
114
|
+
:class="['btn-item', 'area', btnActived['area'] ? 'el-button-actived' : '']"
|
|
167
115
|
@click.stop="rightOperation('area')"
|
|
168
116
|
></div
|
|
169
117
|
></el-tooltip>
|
|
170
|
-
<el-tooltip
|
|
171
|
-
class="item"
|
|
172
|
-
effect="dark"
|
|
173
|
-
content="角度"
|
|
174
|
-
placement="top-start"
|
|
175
|
-
>
|
|
118
|
+
<el-tooltip class="item" effect="dark" content="角度" placement="top-start">
|
|
176
119
|
<div
|
|
177
|
-
:class="[
|
|
178
|
-
'btn-item',
|
|
179
|
-
'angle',
|
|
180
|
-
btnActived['angle'] ? 'el-button-actived' : '',
|
|
181
|
-
]"
|
|
120
|
+
:class="['btn-item', 'angle', btnActived['angle'] ? 'el-button-actived' : '']"
|
|
182
121
|
@click.stop="rightOperation('angle')"
|
|
183
122
|
></div
|
|
184
123
|
></el-tooltip>
|
|
185
124
|
</div>
|
|
186
125
|
</div>
|
|
187
126
|
</el-tooltip>
|
|
188
|
-
<el-tooltip
|
|
189
|
-
class="item"
|
|
190
|
-
effect="dark"
|
|
191
|
-
content="批注"
|
|
192
|
-
placement="top-start"
|
|
193
|
-
>
|
|
127
|
+
<el-tooltip class="item" effect="dark" content="批注" placement="top-start">
|
|
194
128
|
<div
|
|
195
|
-
:class="[
|
|
196
|
-
'btn-item',
|
|
197
|
-
'annotate',
|
|
198
|
-
btnActived['annotate'] ? 'el-button-actived' : '',
|
|
199
|
-
]"
|
|
129
|
+
:class="['btn-item', 'annotate', btnActived['annotate'] ? 'el-button-actived' : '']"
|
|
200
130
|
@click="rightOperation('annotate')"
|
|
201
131
|
></div>
|
|
202
132
|
</el-tooltip>
|
|
203
|
-
<el-tooltip
|
|
204
|
-
class="item"
|
|
205
|
-
effect="dark"
|
|
206
|
-
content="第一视角"
|
|
207
|
-
placement="top-start"
|
|
208
|
-
>
|
|
133
|
+
<el-tooltip class="item" effect="dark" content="第一视角" placement="top-start">
|
|
209
134
|
<div
|
|
210
135
|
:class="[
|
|
211
136
|
'btn-item',
|
|
212
137
|
'first-person',
|
|
213
138
|
btnActived['firstPerson'] ? 'el-button-actived' : '',
|
|
214
139
|
proofingModel ? '' : 'icon-disabeld',
|
|
215
|
-
|
|
216
140
|
]"
|
|
217
141
|
@click="rightOperation('first-person')"
|
|
218
142
|
></div>
|
|
@@ -262,10 +186,10 @@ export default {
|
|
|
262
186
|
};
|
|
263
187
|
},
|
|
264
188
|
},
|
|
265
|
-
proofingModel:{
|
|
189
|
+
proofingModel: {
|
|
266
190
|
type: Boolean,
|
|
267
191
|
default: false,
|
|
268
|
-
}
|
|
192
|
+
},
|
|
269
193
|
},
|
|
270
194
|
data() {
|
|
271
195
|
return {
|
|
@@ -308,8 +232,8 @@ export default {
|
|
|
308
232
|
this.rightType = '';
|
|
309
233
|
},
|
|
310
234
|
rightOperation(name) {
|
|
311
|
-
if(!this.proofingModel){
|
|
312
|
-
return
|
|
235
|
+
if (!this.proofingModel) {
|
|
236
|
+
return;
|
|
313
237
|
}
|
|
314
238
|
// this.rightType = this.rightType === name ? '': name
|
|
315
239
|
this.btnActived[name] = !this.btnActived[name];
|
|
@@ -321,26 +245,26 @@ export default {
|
|
|
321
245
|
this.$parent.leftInformation(reveal, conceal);
|
|
322
246
|
},
|
|
323
247
|
clickClip(type) {
|
|
324
|
-
if(!this.proofingModel){
|
|
325
|
-
return
|
|
248
|
+
if (!this.proofingModel) {
|
|
249
|
+
return;
|
|
326
250
|
}
|
|
327
251
|
|
|
328
252
|
type === this.type ? (this.type = '') : (this.type = type);
|
|
329
253
|
this.openClipping = !this.openClipping;
|
|
330
|
-
if(this.openMeasure){
|
|
331
|
-
this.openMeasure = false
|
|
254
|
+
if (this.openMeasure) {
|
|
255
|
+
this.openMeasure = false;
|
|
332
256
|
}
|
|
333
257
|
this.rightOperation(type);
|
|
334
258
|
},
|
|
335
259
|
clickMeasure(type) {
|
|
336
|
-
if(!this.proofingModel){
|
|
337
|
-
return
|
|
260
|
+
if (!this.proofingModel) {
|
|
261
|
+
return;
|
|
338
262
|
}
|
|
339
263
|
|
|
340
264
|
type === this.type ? (this.type = '') : (this.type = type);
|
|
341
265
|
this.openMeasure = !this.openMeasure;
|
|
342
|
-
if(this.openClipping){
|
|
343
|
-
this.openClipping = false
|
|
266
|
+
if (this.openClipping) {
|
|
267
|
+
this.openClipping = false;
|
|
344
268
|
}
|
|
345
269
|
this.rightOperation(type);
|
|
346
270
|
},
|
|
@@ -512,10 +436,10 @@ export default {
|
|
|
512
436
|
.pbstree {
|
|
513
437
|
background-image: url('../../../assets/proof/pbstree@2x.png');
|
|
514
438
|
}
|
|
515
|
-
.icon-disabeld{
|
|
439
|
+
.icon-disabeld {
|
|
516
440
|
cursor: not-allowed;
|
|
517
441
|
}
|
|
518
|
-
.back{
|
|
442
|
+
.back {
|
|
519
443
|
margin: 0 25px 0 10px;
|
|
520
444
|
padding: 12px;
|
|
521
445
|
border: 1px solid #ddd;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<i class="image-icon el-icon-picture-outline"></i>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
|
-
<img v-else :src="imageUrl" ref="image" @wheel="onWheel"/>
|
|
22
|
+
<img v-else :src="imageUrl" ref="image" @wheel="onWheel" />
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
@@ -28,12 +28,12 @@ export default {
|
|
|
28
28
|
props: {
|
|
29
29
|
imageUrl: {
|
|
30
30
|
type: String,
|
|
31
|
-
require: true
|
|
31
|
+
require: true,
|
|
32
32
|
},
|
|
33
33
|
isErrorImage: {
|
|
34
34
|
type: Boolean,
|
|
35
|
-
default: false
|
|
36
|
-
}
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
37
|
},
|
|
38
38
|
data() {
|
|
39
39
|
return {
|
|
@@ -46,53 +46,53 @@ export default {
|
|
|
46
46
|
dragSpeed: 0.3, // 拖拽速度
|
|
47
47
|
zoomSpeed: 0.1, //控制缩放速度
|
|
48
48
|
maxScale: 5, //最大缩放值
|
|
49
|
-
minScale: 0.1 //最小缩放值
|
|
50
|
-
}
|
|
49
|
+
minScale: 0.1, //最小缩放值
|
|
50
|
+
};
|
|
51
51
|
},
|
|
52
52
|
methods: {
|
|
53
53
|
// 鼠标按下事件处理函数
|
|
54
54
|
onMouseDown(e) {
|
|
55
|
-
e.preventDefault()
|
|
56
|
-
this.isDragging = true
|
|
57
|
-
this.startX = e.clientX
|
|
58
|
-
this.startY = e.clientY
|
|
59
|
-
this.$refs.image.style.cursor = 'grabbing'
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
this.isDragging = true;
|
|
57
|
+
this.startX = e.clientX;
|
|
58
|
+
this.startY = e.clientY;
|
|
59
|
+
this.$refs.image.style.cursor = 'grabbing';
|
|
60
60
|
},
|
|
61
61
|
// 鼠标移动事件处理函数
|
|
62
62
|
onMouseMove(e) {
|
|
63
|
-
if (!this.isDragging) return
|
|
64
|
-
const deltaX = (e.clientX - this.startX) * this.dragSpeed
|
|
65
|
-
const deltaY = (e.clientY - this.startY) * this.dragSpeed
|
|
66
|
-
this.translateX += deltaX
|
|
67
|
-
this.translateY += deltaY
|
|
68
|
-
this.$refs.image.style.transform = `scale(${this.currentScale}) translate(${this.translateX}px, ${this.translateY}px)
|
|
69
|
-
this.startX = e.clientX
|
|
70
|
-
this.startY = e.clientY
|
|
63
|
+
if (!this.isDragging) return;
|
|
64
|
+
const deltaX = (e.clientX - this.startX) * this.dragSpeed;
|
|
65
|
+
const deltaY = (e.clientY - this.startY) * this.dragSpeed;
|
|
66
|
+
this.translateX += deltaX;
|
|
67
|
+
this.translateY += deltaY;
|
|
68
|
+
this.$refs.image.style.transform = `scale(${this.currentScale}) translate(${this.translateX}px, ${this.translateY}px)`;
|
|
69
|
+
this.startX = e.clientX;
|
|
70
|
+
this.startY = e.clientY;
|
|
71
71
|
},
|
|
72
72
|
// 鼠标松开事件处理函数
|
|
73
73
|
onMouseUp() {
|
|
74
|
-
this.isDragging = false
|
|
75
|
-
this.$refs.image.style.cursor = 'grab'
|
|
74
|
+
this.isDragging = false;
|
|
75
|
+
this.$refs.image.style.cursor = 'grab';
|
|
76
76
|
},
|
|
77
77
|
// 鼠标滚轮事件处理函数
|
|
78
78
|
onWheel(e) {
|
|
79
|
-
e.preventDefault()
|
|
80
|
-
const delta = e.deltaY > 0 ? -1 : 1
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
const delta = e.deltaY > 0 ? -1 : 1;
|
|
81
81
|
this.currentScale = Math.min(
|
|
82
82
|
this.maxScale,
|
|
83
|
-
Math.max(this.minScale, this.currentScale + delta * this.zoomSpeed)
|
|
84
|
-
)
|
|
85
|
-
this.$refs.image.style.transform = `scale(${this.currentScale}) translate(${this.translateX}px, ${this.translateY}px)
|
|
83
|
+
Math.max(this.minScale, this.currentScale + delta * this.zoomSpeed),
|
|
84
|
+
);
|
|
85
|
+
this.$refs.image.style.transform = `scale(${this.currentScale}) translate(${this.translateX}px, ${this.translateY}px)`;
|
|
86
86
|
},
|
|
87
87
|
// 重置图片缩放和移动
|
|
88
88
|
resetImage() {
|
|
89
|
-
this.currentScale = 1
|
|
90
|
-
this.translateX = 0
|
|
91
|
-
this.translateY = 0
|
|
92
|
-
this.$refs.image.style.transform = 'scale(1) translate(0, 0)'
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
89
|
+
this.currentScale = 1;
|
|
90
|
+
this.translateX = 0;
|
|
91
|
+
this.translateY = 0;
|
|
92
|
+
this.$refs.image.style.transform = 'scale(1) translate(0, 0)';
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
96
|
</script>
|
|
97
97
|
|
|
98
98
|
<style lang="scss" scoped>
|
|
@@ -120,8 +120,7 @@ img {
|
|
|
120
120
|
object-fit: contain !important;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.image-icon{
|
|
123
|
+
.image-icon {
|
|
124
124
|
font-size: 50px;
|
|
125
|
-
|
|
126
125
|
}
|
|
127
126
|
</style>
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="trigger-button">
|
|
4
|
-
<el-tooltip
|
|
5
|
-
class="item"
|
|
6
|
-
effect="dark"
|
|
7
|
-
content="已存在模型和校审数据,不可更换模型"
|
|
8
|
-
placement="top-start"
|
|
9
|
-
:disabled="!disabledBtn"
|
|
10
|
-
>
|
|
11
|
-
<el-button type="text" @click="triggerDialog" :disabled="disabledBtn"
|
|
12
|
-
><i class="pre-img"></i>载入模型</el-button
|
|
13
|
-
>
|
|
14
|
-
</el-tooltip>
|
|
15
|
-
</div>
|
|
16
|
-
<com-dialog
|
|
17
|
-
v-if="dialogVisible"
|
|
18
|
-
dialog-title="载入模型"
|
|
19
|
-
:visible="dialogVisible"
|
|
20
|
-
:popup-width="'25%'"
|
|
21
|
-
@handleClose="handleClose"
|
|
22
|
-
@submitDialogData="submitDialogData"
|
|
23
|
-
>
|
|
24
|
-
<el-form ref="form" :model="dialogForm" :rules="formRules">
|
|
25
|
-
<el-form-item label="链接" prop="url">
|
|
26
|
-
<el-input v-model="dialogForm.url"></el-input>
|
|
27
|
-
</el-form-item>
|
|
28
|
-
</el-form>
|
|
29
|
-
</com-dialog>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
import * as modelApi from '../api/index';
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
name: 'importModel',
|
|
38
|
-
data() {
|
|
39
|
-
return {
|
|
40
|
-
dialogVisible: false,
|
|
41
|
-
dialogForm: {
|
|
42
|
-
url: '',
|
|
43
|
-
},
|
|
44
|
-
formRules: {
|
|
45
|
-
url: [{ required: true, message: '请输入链接', trigger: 'blur' }],
|
|
46
|
-
},
|
|
47
|
-
disabledBtn: true,
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
props: {
|
|
51
|
-
defaultParams: {
|
|
52
|
-
type: Object,
|
|
53
|
-
default() {
|
|
54
|
-
return {};
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
created() {
|
|
59
|
-
this.dialogForm.projectId = this.defaultParams.projectId;
|
|
60
|
-
},
|
|
61
|
-
components: {
|
|
62
|
-
ComDialog: () => import('./com-dialogWrapper'),
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
triggerDialog() {
|
|
66
|
-
this.dialogVisible = !this.dialogVisible;
|
|
67
|
-
},
|
|
68
|
-
/* 弹窗 修改是否让页面显示与隐藏的事件 */
|
|
69
|
-
updateVisible(val) {
|
|
70
|
-
this.dialogVisible = val;
|
|
71
|
-
},
|
|
72
|
-
/* 弹窗 确认 操作 */
|
|
73
|
-
submitDialogData() {
|
|
74
|
-
this.$refs.form.validate((vaild) => {
|
|
75
|
-
if (vaild) {
|
|
76
|
-
modelApi
|
|
77
|
-
.loadProofModel(this.dialogForm)
|
|
78
|
-
.then((res) => {
|
|
79
|
-
if (res.code === 200) {
|
|
80
|
-
this.dialogVisible = false;
|
|
81
|
-
this.$message({ type: 'success', message: '模型载入成功' });
|
|
82
|
-
setTimeout(() => {
|
|
83
|
-
this.$emit('viewVersion', null);
|
|
84
|
-
}, 1000);
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
.catch((err) => {
|
|
88
|
-
console.log(err);
|
|
89
|
-
// this.$message({ type: 'error', message: err.msg })
|
|
90
|
-
});
|
|
91
|
-
} else {
|
|
92
|
-
console.log('error submit');
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
},
|
|
96
|
-
/* 弹窗 关闭 操作 */
|
|
97
|
-
handleClose() {
|
|
98
|
-
this.resetForm();
|
|
99
|
-
this.dialogVisible = false;
|
|
100
|
-
},
|
|
101
|
-
resetForm() {
|
|
102
|
-
this.$refs.form.resetFields();
|
|
103
|
-
},
|
|
104
|
-
ableBtn() {
|
|
105
|
-
this.disabledBtn = false;
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
</script>
|
|
110
|
-
|
|
111
|
-
<style lang="scss" scoped>
|
|
112
|
-
::v-deep .trigger-button {
|
|
113
|
-
span {
|
|
114
|
-
display: flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
color: #2e3136;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.pre-img {
|
|
120
|
-
background-image: url('../../../assets/proof/import_model@2x.png');
|
|
121
|
-
width: 30px;
|
|
122
|
-
height: 30px;
|
|
123
|
-
display: inline-block;
|
|
124
|
-
background-size: cover;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="trigger-button">
|
|
4
|
+
<el-tooltip
|
|
5
|
+
class="item"
|
|
6
|
+
effect="dark"
|
|
7
|
+
content="已存在模型和校审数据,不可更换模型"
|
|
8
|
+
placement="top-start"
|
|
9
|
+
:disabled="!disabledBtn"
|
|
10
|
+
>
|
|
11
|
+
<el-button type="text" @click="triggerDialog" :disabled="disabledBtn"
|
|
12
|
+
><i class="pre-img"></i>载入模型</el-button
|
|
13
|
+
>
|
|
14
|
+
</el-tooltip>
|
|
15
|
+
</div>
|
|
16
|
+
<com-dialog
|
|
17
|
+
v-if="dialogVisible"
|
|
18
|
+
dialog-title="载入模型"
|
|
19
|
+
:visible="dialogVisible"
|
|
20
|
+
:popup-width="'25%'"
|
|
21
|
+
@handleClose="handleClose"
|
|
22
|
+
@submitDialogData="submitDialogData"
|
|
23
|
+
>
|
|
24
|
+
<el-form ref="form" :model="dialogForm" :rules="formRules">
|
|
25
|
+
<el-form-item label="链接" prop="url">
|
|
26
|
+
<el-input v-model="dialogForm.url"></el-input>
|
|
27
|
+
</el-form-item>
|
|
28
|
+
</el-form>
|
|
29
|
+
</com-dialog>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import * as modelApi from '../api/index';
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'importModel',
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
dialogVisible: false,
|
|
41
|
+
dialogForm: {
|
|
42
|
+
url: '',
|
|
43
|
+
},
|
|
44
|
+
formRules: {
|
|
45
|
+
url: [{ required: true, message: '请输入链接', trigger: 'blur' }],
|
|
46
|
+
},
|
|
47
|
+
disabledBtn: true,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
props: {
|
|
51
|
+
defaultParams: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default() {
|
|
54
|
+
return {};
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
created() {
|
|
59
|
+
this.dialogForm.projectId = this.defaultParams.projectId;
|
|
60
|
+
},
|
|
61
|
+
components: {
|
|
62
|
+
ComDialog: () => import('./com-dialogWrapper'),
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
triggerDialog() {
|
|
66
|
+
this.dialogVisible = !this.dialogVisible;
|
|
67
|
+
},
|
|
68
|
+
/* 弹窗 修改是否让页面显示与隐藏的事件 */
|
|
69
|
+
updateVisible(val) {
|
|
70
|
+
this.dialogVisible = val;
|
|
71
|
+
},
|
|
72
|
+
/* 弹窗 确认 操作 */
|
|
73
|
+
submitDialogData() {
|
|
74
|
+
this.$refs.form.validate((vaild) => {
|
|
75
|
+
if (vaild) {
|
|
76
|
+
modelApi
|
|
77
|
+
.loadProofModel(this.dialogForm)
|
|
78
|
+
.then((res) => {
|
|
79
|
+
if (res.code === 200) {
|
|
80
|
+
this.dialogVisible = false;
|
|
81
|
+
this.$message({ type: 'success', message: '模型载入成功' });
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
this.$emit('viewVersion', null);
|
|
84
|
+
}, 1000);
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
.catch((err) => {
|
|
88
|
+
console.log(err);
|
|
89
|
+
// this.$message({ type: 'error', message: err.msg })
|
|
90
|
+
});
|
|
91
|
+
} else {
|
|
92
|
+
console.log('error submit');
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
/* 弹窗 关闭 操作 */
|
|
97
|
+
handleClose() {
|
|
98
|
+
this.resetForm();
|
|
99
|
+
this.dialogVisible = false;
|
|
100
|
+
},
|
|
101
|
+
resetForm() {
|
|
102
|
+
this.$refs.form.resetFields();
|
|
103
|
+
},
|
|
104
|
+
ableBtn() {
|
|
105
|
+
this.disabledBtn = false;
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style lang="scss" scoped>
|
|
112
|
+
::v-deep .trigger-button {
|
|
113
|
+
span {
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
color: #2e3136;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.pre-img {
|
|
120
|
+
background-image: url('../../../assets/proof/import_model@2x.png');
|
|
121
|
+
width: 30px;
|
|
122
|
+
height: 30px;
|
|
123
|
+
display: inline-block;
|
|
124
|
+
background-size: cover;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
</style>
|