fl-web-component 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 +24 -0
- package/dist/demo.html +10 -0
- package/dist/fl-web-component.common.js +316 -0
- package/dist/fl-web-component.common.js.map +1 -0
- package/dist/fl-web-component.css +1 -0
- package/dist/fl-web-component.umd.js +326 -0
- package/dist/fl-web-component.umd.js.map +1 -0
- package/dist/fl-web-component.umd.min.js +2 -0
- package/dist/fl-web-component.umd.min.js.map +1 -0
- package/package.json +47 -0
- package/packages/components/button/index.vue +22 -0
- package/packages/components/model/api/index.js +429 -0
- package/packages/components/model/api/mock/detecttree.js +58 -0
- package/packages/components/model/api/mock/getmodel-line.js +79336 -0
- package/packages/components/model/api/mock/init.js +1 -0
- package/packages/components/model/api/mock/pbstree.js +835 -0
- package/packages/components/model/api/mock/topology.json +3238 -0
- package/packages/components/model/components/TextOverTooltip/index.vue +84 -0
- package/packages/components/model/components/annotation-toolbar.vue +425 -0
- package/packages/components/model/components/check-proofing-model.vue +42 -0
- package/packages/components/model/components/clipping-type.vue +51 -0
- package/packages/components/model/components/com-dialogWrapper/Readme.md +53 -0
- package/packages/components/model/components/com-dialogWrapper/index.vue +117 -0
- package/packages/components/model/components/detect-panel.vue +327 -0
- package/packages/components/model/components/detect-tree.vue +460 -0
- package/packages/components/model/components/firstPer-panel.vue +111 -0
- package/packages/components/model/components/header-button.vue +546 -0
- package/packages/components/model/components/imageViewer/index.vue +127 -0
- package/packages/components/model/components/import-model.vue +127 -0
- package/packages/components/model/components/location-panel.vue +95 -0
- package/packages/components/model/components/measure-type.vue +59 -0
- package/packages/components/model/components/pbs-tree.vue +502 -0
- package/packages/components/model/components/proof-config.vue +80 -0
- package/packages/components/model/components/proof-for-pc.vue +123 -0
- package/packages/components/model/components/proof-history.vue +318 -0
- package/packages/components/model/components/proof-panel-detail.vue +567 -0
- package/packages/components/model/components/proof-panel.vue +770 -0
- package/packages/components/model/components/proof-project-user.vue +482 -0
- package/packages/components/model/components/proof-publish.vue +130 -0
- package/packages/components/model/components/proof-role.vue +535 -0
- package/packages/components/model/components/props-panel.vue +249 -0
- package/packages/components/model/index.vue +3413 -0
- package/packages/components/model/readme.md +31 -0
- package/packages/components/model/utils/annotation-tool.js +340 -0
- package/packages/components/model/utils/cursor.js +18 -0
- package/packages/components/model/utils/detect-v1.js +341 -0
- package/packages/components/model/utils/index.js +48 -0
- package/packages/components/model/utils/threejs/measure-angle.js +258 -0
- package/packages/components/model/utils/threejs/measure-area.js +269 -0
- package/packages/components/model/utils/threejs/measure-distance.js +207 -0
- package/packages/components/model/utils/threejs/measure-volume.js +94 -0
- package/packages/index.js +24 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: fengyang9326@163.com
|
|
3
|
+
* @Date: 2024-05-13 10:36:07
|
|
4
|
+
* @LastEditors: fengyang9326@163.com
|
|
5
|
+
* @LastEditTime: 2024-05-20 09:34:46
|
|
6
|
+
* @FilePath: /web/components/com-dialogWrapper/index.vue
|
|
7
|
+
* @Description: 弹窗封装
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<el-dialog
|
|
11
|
+
:visible.sync="dialogVisible"
|
|
12
|
+
:title="dialogTitle"
|
|
13
|
+
:fullscreen="dialogFullScreen"
|
|
14
|
+
:close-on-click-modal="false"
|
|
15
|
+
:before-close="handleClose"
|
|
16
|
+
:width="popupWidth"
|
|
17
|
+
:append-to-body="appendToBody"
|
|
18
|
+
:modal-append-to-body="modalAppendToBody"
|
|
19
|
+
>
|
|
20
|
+
|
|
21
|
+
<!-- 弹窗title -->
|
|
22
|
+
<template slot="title">
|
|
23
|
+
<div class="custom_dialog_header">
|
|
24
|
+
<span class="el_dialog_title">{{ dialogTitle }}</span>
|
|
25
|
+
<div class="custom_dialog_menu" @click="dialogFullScreen = !dialogFullScreen">
|
|
26
|
+
<!-- <svg-icon :icon-class="dialogFullScreen?'exit-fullscreen':'fullscreen'" /> -->
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<!-- 弹窗插槽 -->
|
|
32
|
+
<slot>
|
|
33
|
+
<p>弹框自定义的内容</p>
|
|
34
|
+
</slot>
|
|
35
|
+
|
|
36
|
+
<!-- 弹窗操作 -->
|
|
37
|
+
<div v-if="!footerDisabled" slot="footer" class="dialog-footer">
|
|
38
|
+
<el-button @click="handleClose">取 消</el-button>
|
|
39
|
+
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
|
40
|
+
</div>
|
|
41
|
+
</el-dialog>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
export default {
|
|
46
|
+
name: 'DialogWrapper',
|
|
47
|
+
components: {},
|
|
48
|
+
props: {
|
|
49
|
+
/* 弹窗 title标题 */
|
|
50
|
+
dialogTitle: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: '标题'
|
|
53
|
+
},
|
|
54
|
+
/* 弹窗 width宽度 */
|
|
55
|
+
popupWidth: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: '35%'
|
|
58
|
+
},
|
|
59
|
+
/* 弹窗 显示隐藏状态 */
|
|
60
|
+
visible: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
64
|
+
footerDisabled: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
appendToBody: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true
|
|
71
|
+
},
|
|
72
|
+
modalAppendToBody: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
openDialog: false,
|
|
80
|
+
dialogFullScreen: false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
computed: {
|
|
84
|
+
dialogVisible: {
|
|
85
|
+
get() {
|
|
86
|
+
console.log(this.visible)
|
|
87
|
+
// 初始化数据
|
|
88
|
+
if (this.visible) Object.assign(this.$data, this.$options.data())
|
|
89
|
+
return this.visible
|
|
90
|
+
},
|
|
91
|
+
set(val) {
|
|
92
|
+
// 当visible改变的时候,触发父组件的 updateVisible方法,
|
|
93
|
+
// 在该方法中更改传入子组件的 centerDialogVisible的值
|
|
94
|
+
this.$emit('updateVisible', val)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
watch: {},
|
|
99
|
+
created() {
|
|
100
|
+
console.log('test')
|
|
101
|
+
},
|
|
102
|
+
mounted() {},
|
|
103
|
+
methods: {
|
|
104
|
+
/* 关闭弹窗 */
|
|
105
|
+
handleClose() {
|
|
106
|
+
this.$emit('handleClose')
|
|
107
|
+
},
|
|
108
|
+
/* 弹窗 确认 操作 */
|
|
109
|
+
handleSubmit() {
|
|
110
|
+
this.$emit('submitDialogData')
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</script>
|
|
115
|
+
<style lang="scss" scoped>
|
|
116
|
+
|
|
117
|
+
</style>
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="box-card" style="height: calc(100vh - 134px)">
|
|
3
|
+
<div class="box-title">
|
|
4
|
+
<span class="box-title-desc">碰撞报告</span>
|
|
5
|
+
<i class="el-icon-close box-title-close" style="cursor: pointer" @click="$emit('rightOperation', 'detect')" />
|
|
6
|
+
</div>
|
|
7
|
+
<detect-tree
|
|
8
|
+
v-if="showDetectTree"
|
|
9
|
+
ref="detectTree"
|
|
10
|
+
:treeData="treeData"
|
|
11
|
+
@locate="locate"
|
|
12
|
+
@highlight="highlight"
|
|
13
|
+
/>
|
|
14
|
+
<div class="process-container" v-else>
|
|
15
|
+
<el-progress class="process-percent" type="circle" :percentage="processPercent" :color="processPercentStatus"></el-progress>
|
|
16
|
+
<p v-if="!processCompleted">碰撞报告生成中...</p>
|
|
17
|
+
<div v-else>
|
|
18
|
+
<el-row>
|
|
19
|
+
<el-col>
|
|
20
|
+
<el-button @click="initDetect">重新生成</el-button>
|
|
21
|
+
<el-button @click="viewReport" type="primary">查看报告</el-button>
|
|
22
|
+
</el-col>
|
|
23
|
+
</el-row>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script>
|
|
29
|
+
import * as modelApi from '../api/index';
|
|
30
|
+
import detectTree from './detect-tree.vue';
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'Details',
|
|
34
|
+
components:{
|
|
35
|
+
DetectTree: detectTree,
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
defaultParams: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default() {
|
|
41
|
+
return {};
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
treeData: {
|
|
45
|
+
typeof: Array,
|
|
46
|
+
default() {
|
|
47
|
+
return [];
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
data() {
|
|
52
|
+
return {
|
|
53
|
+
basicData: [],
|
|
54
|
+
propData: [],
|
|
55
|
+
docData: [],
|
|
56
|
+
otherData: [],
|
|
57
|
+
activeNames: ['基本信息'],
|
|
58
|
+
processPercent: 0,
|
|
59
|
+
// treeData: [],
|
|
60
|
+
showDetectTree: false,
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
mounted() {
|
|
64
|
+
this.init({queryParams: {...this.defaultParams, rebuild: 0}}, { contentType: 'application/x-www-form-urlencoded'});
|
|
65
|
+
},
|
|
66
|
+
computed: {
|
|
67
|
+
processPercentStatus(){
|
|
68
|
+
return this.processCompleted ? '#5cb87a' : '';
|
|
69
|
+
},
|
|
70
|
+
processCompleted(){
|
|
71
|
+
return this.processPercent == 100;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
watch: {
|
|
75
|
+
treeData(val) {
|
|
76
|
+
this.processPercent = 100;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
methods: {
|
|
80
|
+
init(params, options) {
|
|
81
|
+
this.processPercent = this.getRandomPercentage();
|
|
82
|
+
// console.log(params)
|
|
83
|
+
// params.queryParams.projectId = +params.queryParams.projectId;
|
|
84
|
+
|
|
85
|
+
this.$emit('getDetectCheckTree');
|
|
86
|
+
// modelApi
|
|
87
|
+
// .getDetectCheckTree(params, options)
|
|
88
|
+
// .then((res) => {
|
|
89
|
+
// // this.treeData = res.data;
|
|
90
|
+
// // this.$emit('setTreeData', res.data);
|
|
91
|
+
// // this.showReportDialog(res);
|
|
92
|
+
// })
|
|
93
|
+
// .catch((err) => {
|
|
94
|
+
// // this.$message({
|
|
95
|
+
// // type: 'error',
|
|
96
|
+
// // message: err.msg,
|
|
97
|
+
// // });
|
|
98
|
+
// })
|
|
99
|
+
// .finally(() => {
|
|
100
|
+
// this.processPercent = 100
|
|
101
|
+
// });
|
|
102
|
+
},
|
|
103
|
+
showReportDialog(treeData) {
|
|
104
|
+
this.$confirm('已完成', '碰撞报告', {
|
|
105
|
+
confirmButtonText: '查看报告',
|
|
106
|
+
cancelButtonText: '重新生成',
|
|
107
|
+
type: 'success',
|
|
108
|
+
distinguishCancelAndClose: true,
|
|
109
|
+
})
|
|
110
|
+
.then((res) => {
|
|
111
|
+
this.$emit('showReport', treeData);
|
|
112
|
+
})
|
|
113
|
+
.catch((action) => {
|
|
114
|
+
action == 'cancel' &&
|
|
115
|
+
this.init(
|
|
116
|
+
{ queryParams: {...this.defaultParams, rebuild: 1} },
|
|
117
|
+
{ contentType: 'application/x-www-form-urlencoded' }
|
|
118
|
+
);
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
initDetect(){
|
|
122
|
+
this.init(
|
|
123
|
+
{ queryParams: {...this.defaultParams, rebuild: 1} },
|
|
124
|
+
{ contentType: 'application/x-www-form-urlencoded' }
|
|
125
|
+
);
|
|
126
|
+
},
|
|
127
|
+
viewReport(){
|
|
128
|
+
this.showDetectTree = true;
|
|
129
|
+
},
|
|
130
|
+
// 生成一个0到100之间的随机整数百分比
|
|
131
|
+
getRandomPercentage() {
|
|
132
|
+
return Math.floor(Math.random() * 100);
|
|
133
|
+
},
|
|
134
|
+
locate(node, data){
|
|
135
|
+
this.$emit('locate', node, data)
|
|
136
|
+
},
|
|
137
|
+
highlight(node, data){
|
|
138
|
+
this.$emit('highlight', node, data)
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
destroyed() {
|
|
142
|
+
window.onresize = null;
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
</script>
|
|
146
|
+
<style lang="scss" scoped>
|
|
147
|
+
.box-title {
|
|
148
|
+
font-size: 16px;
|
|
149
|
+
// color: #fff;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.details-box {
|
|
153
|
+
// position: fixed;
|
|
154
|
+
// height: calc(100% - 200px);
|
|
155
|
+
width: 300px;
|
|
156
|
+
padding: 30px 20px;
|
|
157
|
+
// right: 76px;
|
|
158
|
+
// top: 100px;
|
|
159
|
+
border: none;
|
|
160
|
+
background: #1e1e1e99;
|
|
161
|
+
border-radius: 10px;
|
|
162
|
+
box-sizing: border-box;
|
|
163
|
+
z-index: 10;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.box-card {
|
|
167
|
+
// position: fixed;
|
|
168
|
+
// height: calc(100% - 200px);
|
|
169
|
+
// width: 300px;
|
|
170
|
+
// padding: 30px 20px;
|
|
171
|
+
// right: 76px;
|
|
172
|
+
// top: 100px;
|
|
173
|
+
background: rgba(0, 0, 0, 0);
|
|
174
|
+
border: none;
|
|
175
|
+
// border-radius: 10px;
|
|
176
|
+
// box-sizing: border-box;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
::v-deep .el-card__body {
|
|
180
|
+
height: 100%;
|
|
181
|
+
overflow: auto;
|
|
182
|
+
padding: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.title {
|
|
186
|
+
font-size: 16px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
::v-deep .el-collapse-item__content {
|
|
190
|
+
padding-bottom: 0px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.text {
|
|
194
|
+
font-size: 12px;
|
|
195
|
+
// color: #fff;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.item {
|
|
199
|
+
padding: 5px;
|
|
200
|
+
|
|
201
|
+
span {
|
|
202
|
+
word-break: break-all;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.info-item {
|
|
207
|
+
display: grid;
|
|
208
|
+
grid-template-columns: 55% 45%;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.property-box {
|
|
212
|
+
margin-bottom: 10px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.property-title {
|
|
216
|
+
line-height: 24px;
|
|
217
|
+
font-size: 14px;
|
|
218
|
+
color: #fff;
|
|
219
|
+
border-bottom: 1px solid #fff;
|
|
220
|
+
margin-bottom: 10px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.empty-tips {
|
|
224
|
+
color: #fff;
|
|
225
|
+
text-align: center;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
::v-deep .has-gutter {
|
|
229
|
+
background: rgba(44, 76, 124, 0.2);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
::v-deep .el-collapse {
|
|
233
|
+
border-top: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
::v-deep .el-collapse-item__header {
|
|
237
|
+
height: 36px;
|
|
238
|
+
line-height: 36px;
|
|
239
|
+
background: unset;
|
|
240
|
+
// color: #fff;
|
|
241
|
+
font-size: 14px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
::v-deep .el-collapse-item__wrap {
|
|
245
|
+
background: rgba(30, 30, 30, 0.6);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
::v-deep .el-collapse-item__arrow {
|
|
249
|
+
margin: 0 20px 0 auto;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.collapse-img {
|
|
253
|
+
display: inline-block;
|
|
254
|
+
vertical-align: middle;
|
|
255
|
+
margin-right: 10px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.doc-item {
|
|
259
|
+
display: flex;
|
|
260
|
+
flex-direction: row;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.doc-name {
|
|
264
|
+
flex: 1;
|
|
265
|
+
white-space: nowrap;
|
|
266
|
+
text-overflow: ellipsis;
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.view-doc {
|
|
271
|
+
width: 40px;
|
|
272
|
+
text-align: center;
|
|
273
|
+
color: #3afdff;
|
|
274
|
+
cursor: pointer;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.property-key,
|
|
278
|
+
.property-value {
|
|
279
|
+
word-wrap: break-word;
|
|
280
|
+
word-break: break-all;
|
|
281
|
+
white-space: nowrap;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
text-overflow: ellipsis;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.property-value {
|
|
287
|
+
text-indent: 5px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.box-card {
|
|
291
|
+
padding-top: 0;
|
|
292
|
+
padding-bottom: 0;
|
|
293
|
+
background: #fff;
|
|
294
|
+
width: 360px;
|
|
295
|
+
.box-title{
|
|
296
|
+
display: flex;
|
|
297
|
+
justify-content: space-between;
|
|
298
|
+
align-items: center;
|
|
299
|
+
height: 52px;
|
|
300
|
+
line-height: 52px;
|
|
301
|
+
padding-left: 8px;
|
|
302
|
+
padding-right: 8px;
|
|
303
|
+
border-bottom: 1px solid #dfdfdf;
|
|
304
|
+
.box-title-desc{
|
|
305
|
+
font-size: 14px;
|
|
306
|
+
font-weight: bold;
|
|
307
|
+
}
|
|
308
|
+
.box-title-close{
|
|
309
|
+
font-size: 24px;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
.process-container{
|
|
314
|
+
display: flex;
|
|
315
|
+
flex-direction: column;
|
|
316
|
+
justify-content: center;
|
|
317
|
+
align-items: center;
|
|
318
|
+
height: calc(75% - 54px);
|
|
319
|
+
.process-percent{
|
|
320
|
+
padding: 20px;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
::v-deep .el-progress__text{
|
|
324
|
+
font-size: 32px !important;
|
|
325
|
+
font-weight: bold;
|
|
326
|
+
}
|
|
327
|
+
</style>
|