fl-web-component 1.2.12 → 1.2.13
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 +2 -0
- package/dist/fl-web-component.common.1.js.map +1 -1
- package/dist/fl-web-component.common.2.js.map +1 -1
- package/dist/fl-web-component.common.3.js.map +1 -1
- package/dist/fl-web-component.common.js +129 -86
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/package.json +1 -1
- package/packages/components/com-graphics/index.vue +31 -6
- package/src/utils/flgltf-parser.js +68 -50
- package/src/utils/instance-parser.js +39 -30
- package/packages/components/button/index.vue +0 -26
- package/packages/components/model/api/index.js +0 -421
- package/packages/components/model/api/mock/detecttree.js +0 -58
- package/packages/components/model/api/mock/getmodel-line.js +0 -15834
- package/packages/components/model/api/mock/init.js +0 -1
- package/packages/components/model/api/mock/pbstree.js +0 -826
- package/packages/components/model/api/mock/topology.json +0 -3238
- package/packages/components/model/components/TextOverTooltip/index.vue +0 -84
- package/packages/components/model/components/annotation-toolbar.vue +0 -410
- package/packages/components/model/components/check-proofing-model.vue +0 -39
- package/packages/components/model/components/clipping-type.vue +0 -59
- package/packages/components/model/components/com-dialogWrapper/Readme.md +0 -53
- package/packages/components/model/components/com-dialogWrapper/index.vue +0 -114
- package/packages/components/model/components/detect-panel.vue +0 -339
- package/packages/components/model/components/detect-tree.vue +0 -445
- package/packages/components/model/components/firstPer-panel.vue +0 -109
- package/packages/components/model/components/header-button.vue +0 -470
- package/packages/components/model/components/imageViewer/index.vue +0 -126
- package/packages/components/model/components/import-model.vue +0 -127
- package/packages/components/model/components/location-panel.vue +0 -91
- package/packages/components/model/components/measure-type.vue +0 -59
- package/packages/components/model/components/pbs-tree.vue +0 -497
- package/packages/components/model/components/proof-config.vue +0 -72
- package/packages/components/model/components/proof-for-pc.vue +0 -126
- package/packages/components/model/components/proof-history.vue +0 -300
- package/packages/components/model/components/proof-panel-detail.vue +0 -568
- package/packages/components/model/components/proof-panel.vue +0 -846
- package/packages/components/model/components/proof-project-user.vue +0 -445
- package/packages/components/model/components/proof-publish.vue +0 -130
- package/packages/components/model/components/proof-role.vue +0 -504
- package/packages/components/model/components/props-panel.vue +0 -258
- package/packages/components/model/index.vue +0 -3425
- package/packages/components/model/readme.md +0 -31
- package/packages/components/model/utils/annotation-tool.js +0 -333
- package/packages/components/model/utils/cursor.js +0 -23
- package/packages/components/model/utils/detect-v1.js +0 -329
- package/packages/components/model/utils/index.js +0 -48
- package/packages/components/model/utils/threejs/measure-angle.js +0 -258
- package/packages/components/model/utils/threejs/measure-area.js +0 -281
- package/packages/components/model/utils/threejs/measure-distance.js +0 -209
- package/packages/components/model/utils/threejs/measure-volume.js +0 -97
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tree-box-item-card">
|
|
3
|
-
<!-- @keyup.enter.native="queryPbs" -->
|
|
4
|
-
<!-- @clear="getTree" -->
|
|
5
|
-
<el-input
|
|
6
|
-
placeholder="请输入关键字搜索"
|
|
7
|
-
v-model="filterVal"
|
|
8
|
-
prefix-icon="el-icon-search"
|
|
9
|
-
clearable
|
|
10
|
-
maxlength="30"
|
|
11
|
-
class="input-with-pbs"
|
|
12
|
-
>
|
|
13
|
-
<!-- <i class="el-icon-search el-input__icon search-icon" slot="suffix" @click="queryPbs"> </i> -->
|
|
14
|
-
</el-input>
|
|
15
|
-
|
|
16
|
-
<!-- :render-content="renderContent" -->
|
|
17
|
-
<el-scrollbar class="scrollbar">
|
|
18
|
-
<el-tree
|
|
19
|
-
v-if="treeEmptyText"
|
|
20
|
-
ref="tree"
|
|
21
|
-
:data="treeData"
|
|
22
|
-
show-checkbox
|
|
23
|
-
node-key="id"
|
|
24
|
-
:expand-on-click-node="false"
|
|
25
|
-
:current-node-key="currentKey"
|
|
26
|
-
:props="defaultProps"
|
|
27
|
-
@node-click="handleNodeClick"
|
|
28
|
-
:highlight-current="true"
|
|
29
|
-
:default-expanded-keys="expanded"
|
|
30
|
-
@check="handleCheckChange"
|
|
31
|
-
:filter-node-method="filterNode"
|
|
32
|
-
:check-strictly="true"
|
|
33
|
-
:empty-text="treeEmptyText"
|
|
34
|
-
>
|
|
35
|
-
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
36
|
-
<!-- 自定义节点名称 -->
|
|
37
|
-
<!-- :style="cssNodeLabel" -->
|
|
38
|
-
<text-over-tooltip class="node-label" :content="node.label" :ref-name="node.id">
|
|
39
|
-
<template slot="tooltip-content">
|
|
40
|
-
<slot name="tree-node-label" v-bind="{ node, data }">
|
|
41
|
-
<!-- 自定义节点图标 -->
|
|
42
|
-
<!-- <i
|
|
43
|
-
v-if="data.icon"
|
|
44
|
-
:class="data.icon"
|
|
45
|
-
style="margin-right: 3px"
|
|
46
|
-
/>
|
|
47
|
-
<i
|
|
48
|
-
v-else-if="!node.isLeaf"
|
|
49
|
-
:class="'el-icon-coin'"
|
|
50
|
-
style="margin-right: 3px"
|
|
51
|
-
/> -->
|
|
52
|
-
<span v-html="search(node.label, filterVal)" />
|
|
53
|
-
</slot>
|
|
54
|
-
</template>
|
|
55
|
-
</text-over-tooltip>
|
|
56
|
-
</span>
|
|
57
|
-
</el-tree>
|
|
58
|
-
<el-empty v-else></el-empty>
|
|
59
|
-
</el-scrollbar>
|
|
60
|
-
</div>
|
|
61
|
-
</template>
|
|
62
|
-
<script>
|
|
63
|
-
import { proofInit, getPbsTree, getOriginalPbsTree } from '../api/index';
|
|
64
|
-
import { loading, loadingClose } from '../utils/index';
|
|
65
|
-
import _ from 'lodash';
|
|
66
|
-
import TextOverTooltip from './TextOverTooltip/index.vue';
|
|
67
|
-
|
|
68
|
-
var projectId = null;
|
|
69
|
-
var timeout = null; //防抖时间戳
|
|
70
|
-
var checkedArr = [];
|
|
71
|
-
|
|
72
|
-
let selectedIds = [];
|
|
73
|
-
let allNodes = [];
|
|
74
|
-
const NODE_TYPES = {
|
|
75
|
-
model: 10,
|
|
76
|
-
pbsGrp: 0,
|
|
77
|
-
innerGrp: 1,
|
|
78
|
-
annotation: 11,
|
|
79
|
-
viewer: 12,
|
|
80
|
-
drawing: 13,
|
|
81
|
-
major: 14,
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export default {
|
|
85
|
-
name: 'PbsTree',
|
|
86
|
-
props: {
|
|
87
|
-
folderId: {
|
|
88
|
-
type: String,
|
|
89
|
-
default() {
|
|
90
|
-
return '';
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
projectId: {
|
|
94
|
-
type: String,
|
|
95
|
-
default() {
|
|
96
|
-
return '';
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
version: {
|
|
100
|
-
type: String,
|
|
101
|
-
default: '',
|
|
102
|
-
},
|
|
103
|
-
flag: {
|
|
104
|
-
type: Boolean,
|
|
105
|
-
default() {
|
|
106
|
-
return false;
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
pbsVersion: {
|
|
110
|
-
type: Object,
|
|
111
|
-
default() {
|
|
112
|
-
return {};
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
components: {
|
|
117
|
-
TextOverTooltip,
|
|
118
|
-
},
|
|
119
|
-
destroyed() {
|
|
120
|
-
this.resetData();
|
|
121
|
-
},
|
|
122
|
-
data() {
|
|
123
|
-
return {
|
|
124
|
-
defaultProps: {
|
|
125
|
-
label: 'groupName',
|
|
126
|
-
children: 'child',
|
|
127
|
-
// isLeaf: (data) => {
|
|
128
|
-
// return !data.leaf
|
|
129
|
-
// },
|
|
130
|
-
disabled: (data) => {
|
|
131
|
-
return data.type !== 0;
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
treeData: [],
|
|
135
|
-
treeEmptyText: '',
|
|
136
|
-
currentKey: null,
|
|
137
|
-
expanded: [],
|
|
138
|
-
checkedArr: [],
|
|
139
|
-
node: '',
|
|
140
|
-
filterVal: '',
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
watch: {
|
|
144
|
-
// 监听节点名称变化,进行筛选
|
|
145
|
-
filterVal(val) {
|
|
146
|
-
if (val) {
|
|
147
|
-
this.$refs.tree.filter(val);
|
|
148
|
-
} else {
|
|
149
|
-
// 清空树形搜索,则刷新数据,以使树重回手风琴模式
|
|
150
|
-
this.$refs.tree.filter('');
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
// folderId(val) {
|
|
155
|
-
// if (val) this.getTree()
|
|
156
|
-
// },
|
|
157
|
-
// projectId(val) {
|
|
158
|
-
// if (val) this.getTree()
|
|
159
|
-
// },
|
|
160
|
-
// flag(val) {
|
|
161
|
-
// if (val) this.getTree()
|
|
162
|
-
// },
|
|
163
|
-
},
|
|
164
|
-
created() {},
|
|
165
|
-
methods: {
|
|
166
|
-
// // 搜索
|
|
167
|
-
// queryPbs() {
|
|
168
|
-
// if (!this.filterVal.trim()) {
|
|
169
|
-
// this.$message.warning('请输入位号')
|
|
170
|
-
// return
|
|
171
|
-
// }
|
|
172
|
-
// modelApi.select(this.filterVal.trim(), this.projectId, this.folderId, this.version).then(res => {
|
|
173
|
-
// this.$set(this, 'treeData', Object.freeze(res))
|
|
174
|
-
// this.expanded = this.expandNodes(res)
|
|
175
|
-
// if (res) {
|
|
176
|
-
// this.$nextTick(() => {
|
|
177
|
-
// this.$refs.tree.setCheckedNodes(res)
|
|
178
|
-
// })
|
|
179
|
-
// }
|
|
180
|
-
// }).catch(err => {
|
|
181
|
-
// this.treeData.splice(0)
|
|
182
|
-
// this.$message.warning(err.msg)
|
|
183
|
-
// })
|
|
184
|
-
// },
|
|
185
|
-
expandNodes(data) {
|
|
186
|
-
data.forEach((item) => {
|
|
187
|
-
this.expanded.push(item.nodeId);
|
|
188
|
-
if (item.children) {
|
|
189
|
-
item.children.forEach((childrenItem) => {
|
|
190
|
-
this.expanded.push(childrenItem.nodeId);
|
|
191
|
-
this.expandNodes(childrenItem.children);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
return this.expanded;
|
|
196
|
-
},
|
|
197
|
-
formatTree(data) {
|
|
198
|
-
if (data.type !== 0) {
|
|
199
|
-
data.disabled = true;
|
|
200
|
-
} else {
|
|
201
|
-
data.disabled = false;
|
|
202
|
-
}
|
|
203
|
-
if (data.child) {
|
|
204
|
-
data.child.forEach((childrenItem) => {
|
|
205
|
-
this.formatTree(childrenItem);
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
return data;
|
|
209
|
-
},
|
|
210
|
-
// 获取pbs节点
|
|
211
|
-
getPbsTree(params) {
|
|
212
|
-
this.treeEmptyText = '加载中...';
|
|
213
|
-
|
|
214
|
-
getOriginalPbsTree(params)
|
|
215
|
-
// getPbsTree(params)
|
|
216
|
-
.then((res) => {
|
|
217
|
-
// console.log('getOriginalPbsTree', res)
|
|
218
|
-
// res = this.formatTree(res)
|
|
219
|
-
|
|
220
|
-
if (res) {
|
|
221
|
-
this.treeData = [res];
|
|
222
|
-
this.allNodes = this.getAllNodes([res]);
|
|
223
|
-
}
|
|
224
|
-
})
|
|
225
|
-
.catch(() => {
|
|
226
|
-
console.log('error');
|
|
227
|
-
this.treeData.splice(0);
|
|
228
|
-
})
|
|
229
|
-
.finally(() => {
|
|
230
|
-
loadingClose();
|
|
231
|
-
this.treeEmptyText = '暂无数据';
|
|
232
|
-
});
|
|
233
|
-
},
|
|
234
|
-
getAllNodes(data) {
|
|
235
|
-
const allNodes = [];
|
|
236
|
-
data.forEach((node) => {
|
|
237
|
-
allNodes.push(node);
|
|
238
|
-
if (node.child && node.child.length > 0) {
|
|
239
|
-
allNodes.push(...this.getAllNodes(node.child));
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
return allNodes;
|
|
243
|
-
},
|
|
244
|
-
handleNodeClick(data) {
|
|
245
|
-
this.node = data;
|
|
246
|
-
if (data.type === NODE_TYPES.model) {
|
|
247
|
-
this.getModelIdsByNodeIds(projectId, data.objectId, 'PbsClick');
|
|
248
|
-
}
|
|
249
|
-
// if (data.nodeType === 'Pbs') {
|
|
250
|
-
// 这个有待考究 需不需要传版本数据 data里面没有版本数据的字段
|
|
251
|
-
// this.getModelIdsByNodeIds(projectId, data, 'PbsClick')
|
|
252
|
-
// }
|
|
253
|
-
},
|
|
254
|
-
// 选中节点
|
|
255
|
-
scrollTo(selectNodeId) {
|
|
256
|
-
const node = this.allNodes.find((item) => item.objectId === selectNodeId);
|
|
257
|
-
|
|
258
|
-
if (node?.id) {
|
|
259
|
-
this.$refs.tree.setCurrentKey(node.id);
|
|
260
|
-
this.expanded.push(node.id);
|
|
261
|
-
this.$set(this, 'currentKey', node.id);
|
|
262
|
-
this.$nextTick(() => {
|
|
263
|
-
const ele = document.querySelector('.is-current');
|
|
264
|
-
setTimeout(() => {
|
|
265
|
-
if (ele) {
|
|
266
|
-
ele.scrollIntoView({
|
|
267
|
-
block: 'center',
|
|
268
|
-
behavior: 'instant',
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
}, 400);
|
|
272
|
-
});
|
|
273
|
-
} else {
|
|
274
|
-
this.$message({
|
|
275
|
-
type: 'warning',
|
|
276
|
-
message: '未关联Pbs节点',
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
//获取复选框选中得到的数据
|
|
281
|
-
handleCheckChange(data, node) {
|
|
282
|
-
// type 为0的是组节点 加载模型 10是模型 (定位) 14是专业
|
|
283
|
-
console.log(data, node);
|
|
284
|
-
const tree = this.$refs.tree;
|
|
285
|
-
console.log(tree.getNode(data));
|
|
286
|
-
const currentNode = tree.getNode(data);
|
|
287
|
-
const nodeData = currentNode.data;
|
|
288
|
-
if (currentNode.checked) {
|
|
289
|
-
this.selectAllChildren([nodeData]);
|
|
290
|
-
} else {
|
|
291
|
-
this.invertChildrenSelection([nodeData]);
|
|
292
|
-
}
|
|
293
|
-
// selectedIds = ['100']
|
|
294
|
-
console.log(selectedIds);
|
|
295
|
-
const checkedKeys = selectedIds.map((item) => item.id);
|
|
296
|
-
tree.setCheckedKeys(checkedKeys);
|
|
297
|
-
|
|
298
|
-
if (data.type === NODE_TYPES.pbsGrp) {
|
|
299
|
-
const groupIds = selectedIds.map((item) => item.objectId);
|
|
300
|
-
this.getModelIdsByNodeIds(projectId, groupIds, 'checkChange');
|
|
301
|
-
}
|
|
302
|
-
// clearTimeout(timeout)
|
|
303
|
-
// // 过滤一下数据
|
|
304
|
-
// const checkedKeys = tree.getCheckedKeys();
|
|
305
|
-
// console.log(checkedKeys)
|
|
306
|
-
// // this.filterCheckArr(data)
|
|
307
|
-
// timeout = setTimeout(() => {
|
|
308
|
-
// this.getModelIdsByNodeIds(projectId, checkedKeys, 'checkChange')
|
|
309
|
-
// checkedKeys.splice(0)
|
|
310
|
-
// }, 500)
|
|
311
|
-
},
|
|
312
|
-
filterCheckArr(data) {
|
|
313
|
-
if (data.children.length === 0) {
|
|
314
|
-
checkedArr.push({
|
|
315
|
-
folderId: data.nodeFolderId,
|
|
316
|
-
nodeId: data.nodeId,
|
|
317
|
-
version: this.pbsVersion[data.nodeFolderId],
|
|
318
|
-
});
|
|
319
|
-
} else {
|
|
320
|
-
for (let index = 0; index < data.children.length; index++) {
|
|
321
|
-
this.filterCheckArr(data.children[index]);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
// 获取当前选中的节点中所对应的模型信息集合
|
|
326
|
-
getModelIdsByNodeIds(projectId, nodes, type) {
|
|
327
|
-
// this.$emit('checkChange', nodes)
|
|
328
|
-
type === 'checkChange' && this.$emit('checkChange', nodes);
|
|
329
|
-
type === 'PbsClick' && this.$emit('pbsNodeClick', nodes);
|
|
330
|
-
|
|
331
|
-
// PbsApi.getModelIdsByNodeIds(projectId, parmas).then(res => {
|
|
332
|
-
// // type === 'checkChange' && this.$emit('checkChange', this.formatterMsg(res))
|
|
333
|
-
// // type === 'PbsClick' && this.$emit('PbsNodeClick', res, this.node)
|
|
334
|
-
// this.$emit('PbsNodeClick', res, this.node)
|
|
335
|
-
// }).catch((err) => {
|
|
336
|
-
// this.$message({
|
|
337
|
-
// type: 'warning',
|
|
338
|
-
// message: err.msg
|
|
339
|
-
// })
|
|
340
|
-
// })
|
|
341
|
-
},
|
|
342
|
-
// 整合数据
|
|
343
|
-
formatterMsg(data) {
|
|
344
|
-
//整合数据以对象形式传递,{key:[]},key为titleName,[]是batchId去重后组成的数组
|
|
345
|
-
const batchIdObj = {};
|
|
346
|
-
for (let i = 0; i < data.length; i++) {
|
|
347
|
-
if (data[i].batchIds) {
|
|
348
|
-
let batchIds = JSON.parse(data[i].batchIds);
|
|
349
|
-
for (let index = 0; index < batchIds.length; index++) {
|
|
350
|
-
const element = batchIds[index];
|
|
351
|
-
let modelPiece = element.titleName;
|
|
352
|
-
if (Object.keys(batchIdObj).includes(modelPiece)) {
|
|
353
|
-
!batchIdObj[modelPiece].batchIds.find((item) => item === element.batchId) &&
|
|
354
|
-
batchIdObj[modelPiece].batchIds.push(element.batchId);
|
|
355
|
-
} else {
|
|
356
|
-
batchIdObj[modelPiece] = {
|
|
357
|
-
folderId: '',
|
|
358
|
-
batchIds: [],
|
|
359
|
-
};
|
|
360
|
-
if (!batchIdObj[modelPiece].batchIds.find((item) => item === element.batchId)) {
|
|
361
|
-
batchIdObj[modelPiece].batchIds.push(element.batchId);
|
|
362
|
-
batchIdObj[modelPiece].folderId = data[i].groupId;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
return batchIdObj;
|
|
369
|
-
},
|
|
370
|
-
// 判断节点是否拥有子节点
|
|
371
|
-
hasChildren(data) {
|
|
372
|
-
return data.hasOwnProperty('child') && data.child.length > 0;
|
|
373
|
-
},
|
|
374
|
-
// 选中当前节点的所有子节点
|
|
375
|
-
selectAllChildren(items) {
|
|
376
|
-
const childIds = this.collectChildIdsRecursive(items);
|
|
377
|
-
selectedIds = _.uniqBy([...selectedIds, ...childIds], (item) => item.id);
|
|
378
|
-
},
|
|
379
|
-
// 取消选中当前节点的所有子节点
|
|
380
|
-
invertChildrenSelection(items) {
|
|
381
|
-
const childIds = this.collectChildIdsRecursive(items);
|
|
382
|
-
const ids = childIds.map((childItem) => childItem.id);
|
|
383
|
-
selectedIds = selectedIds.filter((item) => !ids.includes(item.id));
|
|
384
|
-
},
|
|
385
|
-
// 递归收集节点及其子节点的ID
|
|
386
|
-
collectChildIdsRecursive(items, result = []) {
|
|
387
|
-
items.forEach((item) => {
|
|
388
|
-
item.type === NODE_TYPES.pbsGrp && result.push({ objectId: item.objectId, id: item.id });
|
|
389
|
-
if (this.hasChildren(item)) this.collectChildIdsRecursive(item.child, result);
|
|
390
|
-
});
|
|
391
|
-
return result;
|
|
392
|
-
},
|
|
393
|
-
search(val, searchData) {
|
|
394
|
-
const Reg = new RegExp(searchData, 'ig');
|
|
395
|
-
if (val || val === 0) {
|
|
396
|
-
const res = val.toString().replace(Reg, `<span>$&</span>`);
|
|
397
|
-
return res;
|
|
398
|
-
}
|
|
399
|
-
},
|
|
400
|
-
/* 查询节点名 */
|
|
401
|
-
filterNode(value, data, node) {
|
|
402
|
-
// console.log(value);
|
|
403
|
-
// if (!value) return true;
|
|
404
|
-
// 返回:祖先节点、包含搜索结果的节点及其后代节点
|
|
405
|
-
// let parentNode = node.parent,
|
|
406
|
-
// labels = [node.label],
|
|
407
|
-
// level = 1;
|
|
408
|
-
// while (level < node.level) {
|
|
409
|
-
// labels = [...labels, parentNode.label];
|
|
410
|
-
// parentNode = parentNode.parent;
|
|
411
|
-
// level++;
|
|
412
|
-
// }
|
|
413
|
-
// return labels.some((label) => label.indexOf(value) !== -1);
|
|
414
|
-
// 返回:祖先节点、包含搜索结果的节点
|
|
415
|
-
// 不区分大小写
|
|
416
|
-
if (!value) return true;
|
|
417
|
-
let nowVal = data[this.defaultProps.label].toUpperCase();
|
|
418
|
-
return nowVal.indexOf(value.toUpperCase()) !== -1;
|
|
419
|
-
// return node.label.indexOf(value) !== -1;
|
|
420
|
-
},
|
|
421
|
-
resetData() {
|
|
422
|
-
selectedIds = [];
|
|
423
|
-
},
|
|
424
|
-
},
|
|
425
|
-
};
|
|
426
|
-
</script>
|
|
427
|
-
<style lang="scss" scoped>
|
|
428
|
-
::v-deep .el-card__body {
|
|
429
|
-
height: 100%;
|
|
430
|
-
padding: 0;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
::v-deep .el-tree {
|
|
434
|
-
margin-top: 10px;
|
|
435
|
-
height: 100%;
|
|
436
|
-
// color: #fff;
|
|
437
|
-
background: none;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
::v-deep .el-tree__empty-text {
|
|
441
|
-
// color: #fff;
|
|
442
|
-
font-size: 12px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
::v-deep .el-tree-node__content:hover {
|
|
446
|
-
background: rgba(255, 255, 255, 0.7);
|
|
447
|
-
display: inline-block;
|
|
448
|
-
min-width: 100%;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
::v-deep .el-tree-node:focus > .el-tree-node__content {
|
|
452
|
-
background: rgba(255, 255, 255, 0.7);
|
|
453
|
-
display: inline-block;
|
|
454
|
-
min-width: 100%;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.title {
|
|
458
|
-
font-size: 16px;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
::v-deep .el-tree-node > .el-tree-node__children {
|
|
462
|
-
overflow: unset;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
::v-deep .el-tree .is-disabled {
|
|
466
|
-
display: none;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
|
|
470
|
-
background: rgba(255, 255, 255, 0.7);
|
|
471
|
-
display: inline-block;
|
|
472
|
-
min-width: 100%;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content,
|
|
476
|
-
.is-checked .el-tree-node__content {
|
|
477
|
-
color: #148ff3;
|
|
478
|
-
font-weight: bold;
|
|
479
|
-
display: inline-block;
|
|
480
|
-
min-width: 100%;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
::v-deep .el-button--text {
|
|
484
|
-
font-size: 14px;
|
|
485
|
-
color: #2e3136;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
::v-deep .el-tree-node > .el-tree-node__content {
|
|
489
|
-
height: 32px;
|
|
490
|
-
line-height: 32px;
|
|
491
|
-
display: inline-block;
|
|
492
|
-
min-width: 100%;
|
|
493
|
-
}
|
|
494
|
-
::v-deep .scrollbar {
|
|
495
|
-
height: calc(100% - 25px);
|
|
496
|
-
}
|
|
497
|
-
</style>
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="proof-config">
|
|
3
|
-
<ImportModel ref="importModel" :defaultParams="defaultParams" @viewVersion="viewVersion" />
|
|
4
|
-
<ProofHistory ref="proofHistory" @viewVersion="viewVersion" :defaultParams="defaultParams" />
|
|
5
|
-
<ProofProjectUser :defaultParams="defaultParams" />
|
|
6
|
-
<ProofRole :defaultParams="defaultParams" />
|
|
7
|
-
<ProofPublish
|
|
8
|
-
ref="proofPublish"
|
|
9
|
-
:defaultParams="defaultParams"
|
|
10
|
-
@getVersionList="getVersionList"
|
|
11
|
-
@publishVersion="publishVersion"
|
|
12
|
-
/>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import ImportModel from './import-model.vue';
|
|
18
|
-
import ProofHistory from './proof-history.vue';
|
|
19
|
-
import ProofProjectUser from './proof-project-user.vue';
|
|
20
|
-
import ProofPublish from './proof-publish.vue';
|
|
21
|
-
import ProofRole from './proof-role.vue';
|
|
22
|
-
|
|
23
|
-
export default {
|
|
24
|
-
name: 'ProofConfig',
|
|
25
|
-
components: {
|
|
26
|
-
ImportModel,
|
|
27
|
-
ProofHistory,
|
|
28
|
-
ProofProjectUser,
|
|
29
|
-
ProofPublish,
|
|
30
|
-
ProofRole,
|
|
31
|
-
},
|
|
32
|
-
props: {
|
|
33
|
-
defaultParams: {
|
|
34
|
-
type: Object,
|
|
35
|
-
default() {
|
|
36
|
-
return {};
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
methods: {
|
|
41
|
-
viewVersion(item) {
|
|
42
|
-
this.$emit('viewVersion', item);
|
|
43
|
-
},
|
|
44
|
-
openImportModelDialog() {
|
|
45
|
-
this.$refs.importModel.triggerDialog();
|
|
46
|
-
},
|
|
47
|
-
ableImportModelBtn() {
|
|
48
|
-
this.$refs.importModel.ableBtn();
|
|
49
|
-
},
|
|
50
|
-
abledProofPublishBtn() {
|
|
51
|
-
this.$refs.proofPublish.ableBtn();
|
|
52
|
-
},
|
|
53
|
-
getVersionList() {
|
|
54
|
-
this.$refs.proofHistory.getList();
|
|
55
|
-
},
|
|
56
|
-
publishVersion() {
|
|
57
|
-
this.$emit('publishVersion', null);
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<style lang="scss" scoped>
|
|
64
|
-
::v-deep.proof-config {
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
& > div {
|
|
69
|
-
margin-right: 24px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<ProofPanel
|
|
4
|
-
ref="proofPanel"
|
|
5
|
-
:defaultParams="defaultParams"
|
|
6
|
-
@selectRow="handleClickProofList"
|
|
7
|
-
@clickSaveBtn="handleProofSavelBtn"
|
|
8
|
-
/>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { setToken } from '@/utils/auth';
|
|
14
|
-
import * as modelApi from '../api/index';
|
|
15
|
-
import ProofPanel from './proof-panel.vue';
|
|
16
|
-
export default {
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
defaultParams: {
|
|
20
|
-
projectId: '',
|
|
21
|
-
stageId: '',
|
|
22
|
-
client: '',
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
components: {
|
|
27
|
-
ProofPanel,
|
|
28
|
-
},
|
|
29
|
-
created() {
|
|
30
|
-
this.initDefaultParams();
|
|
31
|
-
},
|
|
32
|
-
mounted() {
|
|
33
|
-
this.getData();
|
|
34
|
-
},
|
|
35
|
-
methods: {
|
|
36
|
-
initDefaultParams() {
|
|
37
|
-
this.defaultParams.projectId = this.$route.query.projectId;
|
|
38
|
-
this.defaultParams.stageId = this.$route.query.stageId;
|
|
39
|
-
this.defaultParams.client = this.$route.query.client;
|
|
40
|
-
this.defaultParams.token = this.$route.query.token;
|
|
41
|
-
// this.defaultParams.toProjectId = this.$route.query.toProjectId;
|
|
42
|
-
|
|
43
|
-
if (this.defaultParams.token) {
|
|
44
|
-
setToken(this.defaultParams.token);
|
|
45
|
-
}
|
|
46
|
-
this.getProofProjectId();
|
|
47
|
-
},
|
|
48
|
-
// 获取数据
|
|
49
|
-
getData() {
|
|
50
|
-
if (typeof qt !== 'undefined') {
|
|
51
|
-
let that = this;
|
|
52
|
-
new that.QWebChannel(qt.webChannelTransport, (channel) => {
|
|
53
|
-
// 获取Qt注册的对象,设置到主窗口
|
|
54
|
-
window.webTransport = channel.objects.webTransport;
|
|
55
|
-
// 接收 C++ 发送的消息
|
|
56
|
-
webTransport.SendMessageToWeb.connect((message) => {
|
|
57
|
-
that.dataLoading = true;
|
|
58
|
-
that.paraObj = JSON.parse(message);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
console.error('初始化qwebchannel失败');
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
getProofProjectId() {
|
|
66
|
-
modelApi
|
|
67
|
-
.getProofProjectId({
|
|
68
|
-
toProjectId: this.$route.query.projectId,
|
|
69
|
-
})
|
|
70
|
-
.then((res) => {
|
|
71
|
-
if (res.code === 200) {
|
|
72
|
-
if (res.data !== 0) {
|
|
73
|
-
this.defaultParams.projectId = res.data;
|
|
74
|
-
this.$refs.proofPanel.init();
|
|
75
|
-
} else {
|
|
76
|
-
this.$message({ type: 'error', message: '校审项目不存在' });
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
this.$message({ type: 'error', message: res.msg });
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
.catch((err) => {
|
|
83
|
-
console.log(err);
|
|
84
|
-
// this.$message({ type: 'error', message: err.msg })
|
|
85
|
-
});
|
|
86
|
-
},
|
|
87
|
-
handleProofSavelBtn(data) {
|
|
88
|
-
const postData = {
|
|
89
|
-
...data,
|
|
90
|
-
stageId: this.defaultParams.stageId,
|
|
91
|
-
};
|
|
92
|
-
if (_.isEmpty(data.id)) {
|
|
93
|
-
postData.projectId = this.defaultParams.projectId;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
this.$refs.proofPanel.saveForm(postData);
|
|
97
|
-
},
|
|
98
|
-
handleClickProofList(data) {
|
|
99
|
-
const { position } = data;
|
|
100
|
-
// const { cameraPosition, cameraTarget } = JSON.parse(position);
|
|
101
|
-
|
|
102
|
-
// 向客户端发送数据
|
|
103
|
-
if (typeof qt !== 'undefined') {
|
|
104
|
-
new this.QWebChannel(qt.webChannelTransport, function (channel) {
|
|
105
|
-
// 获取Qt注册的对象,设置到主窗口
|
|
106
|
-
window.webTransport = channel.objects.webTransport;
|
|
107
|
-
webTransport.AcceptWebData(position);
|
|
108
|
-
});
|
|
109
|
-
} else {
|
|
110
|
-
console.error('初始化qwebchannel失败');
|
|
111
|
-
}
|
|
112
|
-
// // 视点
|
|
113
|
-
// this.animateCamera(
|
|
114
|
-
// cameraPosition.x,
|
|
115
|
-
// cameraPosition.y,
|
|
116
|
-
// cameraPosition.z,
|
|
117
|
-
// cameraTarget.x,
|
|
118
|
-
// cameraTarget.y,
|
|
119
|
-
// cameraTarget.z
|
|
120
|
-
// );
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
</script>
|
|
125
|
-
|
|
126
|
-
<style lang="scss" scoped></style>
|