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,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>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-row :style="style" ref="markPanel" class="mark-panel">
|
|
3
|
+
<el-card>
|
|
4
|
+
<div slot="header">
|
|
5
|
+
<span>新增人员定位</span>
|
|
6
|
+
<el-button type="text" style="float: right; padding: 0" @click="cancel">
|
|
7
|
+
<i class="el-icon-close"></i>
|
|
8
|
+
</el-button>
|
|
9
|
+
</div>
|
|
10
|
+
<el-form ref="form" :model="form" :rules="rules" label-width="50px">
|
|
11
|
+
<el-form-item label="姓名" prop="userName">
|
|
12
|
+
<el-input type="text" v-model="form.userName" maxlength="50" show-word-limit></el-input>
|
|
13
|
+
</el-form-item>
|
|
14
|
+
<el-form-item label="编号" prop="userCode">
|
|
15
|
+
<el-input type="text" v-model="form.userCode" maxlength="50" show-word-limit></el-input>
|
|
16
|
+
</el-form-item>
|
|
17
|
+
<el-form-item class="create-btn">
|
|
18
|
+
<el-button size="small" @click="cancel">取消</el-button>
|
|
19
|
+
<el-button type="primary" size="small" @click="sure">确定</el-button>
|
|
20
|
+
</el-form-item>
|
|
21
|
+
</el-form>
|
|
22
|
+
</el-card>
|
|
23
|
+
</el-row>
|
|
24
|
+
</template>
|
|
25
|
+
<script>
|
|
26
|
+
export default {
|
|
27
|
+
name: 'LocationPanel',
|
|
28
|
+
props: {
|
|
29
|
+
position: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default() {
|
|
32
|
+
return {
|
|
33
|
+
left: 0,
|
|
34
|
+
top: 0
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
form: {
|
|
42
|
+
userName: '',
|
|
43
|
+
userCode: '',
|
|
44
|
+
},
|
|
45
|
+
style: `position: fixed; top: ${this.position.top}px; left: ${this.position.left}px;`,
|
|
46
|
+
rules: {
|
|
47
|
+
userName: [
|
|
48
|
+
{ required: true, message: '请输入人员姓名', trigger: 'blur' },
|
|
49
|
+
],
|
|
50
|
+
userCode: [
|
|
51
|
+
{ required: true, message: '请输入人员编码', trigger: 'blur' },
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
watch: {
|
|
57
|
+
position(val) {
|
|
58
|
+
this.$refs.markPanel.$el.style.top = `${val.top}px`
|
|
59
|
+
this.$refs.markPanel.$el.style.left = `${val.left}px`
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
cancel() {
|
|
64
|
+
this.$emit('cancel')
|
|
65
|
+
},
|
|
66
|
+
sure(data) {
|
|
67
|
+
this.$refs['form'].validate((valid) => {
|
|
68
|
+
if (valid) {
|
|
69
|
+
this.$emit('sureLocation', this.form)
|
|
70
|
+
} else {
|
|
71
|
+
return false
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
resetForm() {
|
|
76
|
+
this.$refs['form'].resetFields()
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
81
|
+
<style lang="scss" scoped>
|
|
82
|
+
.mark-panel{
|
|
83
|
+
transition: all 1s;
|
|
84
|
+
}
|
|
85
|
+
::v-deep .el-card__header{
|
|
86
|
+
padding: 10px 20px;
|
|
87
|
+
}
|
|
88
|
+
::v-deep .el-input__inner{
|
|
89
|
+
height: 30px;
|
|
90
|
+
line-height: 30px;
|
|
91
|
+
}
|
|
92
|
+
::v-deep .icon-select .el-input__inner{
|
|
93
|
+
color: rgba(255,255, 255, 0);
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="measure-type action-box">
|
|
3
|
+
<div
|
|
4
|
+
v-for="item of measureList"
|
|
5
|
+
:key="item.id"
|
|
6
|
+
:class="[active === item.id ? 'active' : 'unactive', 'btn-item']"
|
|
7
|
+
@click="measureType(item.id)"
|
|
8
|
+
>
|
|
9
|
+
<span class="span-txt">{{item.name}}</span>
|
|
10
|
+
<img :src="item.imgUrl" :alt="item.name" class="btn-bg">
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
name: 'MeasureType',
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
active: null,
|
|
20
|
+
measureList: [
|
|
21
|
+
{ name: '距离测量', id: 'distance', imgUrl: require('@/assets/distance.png') },
|
|
22
|
+
{ name: '面积测量', id: 'area', imgUrl: require('@/assets/area.png') },
|
|
23
|
+
{ name: '角度测量', id: 'angle', imgUrl: require('@/assets/angle.png') },
|
|
24
|
+
// { name: '体积测量', id: 'volume', imgUrl: require('@/assets/area.png') }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
measureType(type) {
|
|
30
|
+
this.$set(this, 'active', type)
|
|
31
|
+
this.$emit('measure', type)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
<style scoped>
|
|
37
|
+
.measure-type{
|
|
38
|
+
height: 45px;
|
|
39
|
+
}
|
|
40
|
+
.btn-item{
|
|
41
|
+
height: 45px;
|
|
42
|
+
line-height: 45px;
|
|
43
|
+
padding: 0 10px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
.btn-bg{
|
|
47
|
+
display: inline-block;
|
|
48
|
+
vertical-align: middle;
|
|
49
|
+
}
|
|
50
|
+
.active{
|
|
51
|
+
background: rgba(255, 255, 255, 0.5);
|
|
52
|
+
}
|
|
53
|
+
.unactive{
|
|
54
|
+
color: #fff;
|
|
55
|
+
}
|
|
56
|
+
.span-txt{
|
|
57
|
+
padding-right: 5px;
|
|
58
|
+
}
|
|
59
|
+
</style>
|