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
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<div ref="svgDraw" id="konva-container" style="height:100%"></div>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
function downloadPDF(base64, fileName) {
|
|
11
|
+
const blob = base64ToBlob(base64);
|
|
12
|
+
const url = createObjectURL(blob);
|
|
13
|
+
const link = document.createElement('a');
|
|
14
|
+
link.href = url;
|
|
15
|
+
link.download = fileName || 'downloaded_pdf.pdf'; // 设置下载文件名,如果没有提供文件名,则默认为'downloaded_pdf.pdf'
|
|
16
|
+
document.body.appendChild(link); // 添加到DOM树中以便触发下载
|
|
17
|
+
link.click(); // 模拟点击下载
|
|
18
|
+
document.body.removeChild(link); // 下载完成后移除元素
|
|
19
|
+
URL.revokeObjectURL(url); // 释放URL对象
|
|
20
|
+
}
|
|
21
|
+
import Konva from 'konva'
|
|
22
|
+
import DxfParser from "dxf-parser";
|
|
23
|
+
import jsPDF from 'jspdf'
|
|
24
|
+
import { formatEntity, handleFn, centering } from './components/entityFormatting'
|
|
25
|
+
var konvaStage = null, konvaLayer = null;
|
|
26
|
+
var recordLayerConfig = {}
|
|
27
|
+
export default {
|
|
28
|
+
name: "Fl2dcanvas",
|
|
29
|
+
components: {},
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
created() {
|
|
36
|
+
//resize方法
|
|
37
|
+
window.addEventListener('resize', () => {
|
|
38
|
+
if (konvaStage) {
|
|
39
|
+
const obj = document.getElementById('konva-container')
|
|
40
|
+
konvaStage.setWidth(obj.clientWidth)
|
|
41
|
+
konvaStage.setHeight(obj.clientHeight)
|
|
42
|
+
konvaStage._resizeDOM()
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
this.$nextTick(() => {
|
|
48
|
+
console.log(document.getElementById('konva-container'));
|
|
49
|
+
console.log(this.$refs.svgDraw);
|
|
50
|
+
konvaStage = new Konva.Stage({
|
|
51
|
+
className: "stage",
|
|
52
|
+
container: "konva-container",
|
|
53
|
+
width: this.$refs.svgDraw.clientWidth,
|
|
54
|
+
height: this.$refs.svgDraw.clientHeight,
|
|
55
|
+
draggable: true,
|
|
56
|
+
});
|
|
57
|
+
//init layer
|
|
58
|
+
konvaLayer = new Konva.Layer({
|
|
59
|
+
name: "konva-layer",
|
|
60
|
+
x: 0,
|
|
61
|
+
y: 0,
|
|
62
|
+
});
|
|
63
|
+
//设置清晰度
|
|
64
|
+
konvaLayer.getCanvas().setPixelRatio(2);
|
|
65
|
+
konvaStage.add(konvaLayer);
|
|
66
|
+
konvaLayer.draw();
|
|
67
|
+
var scaleBy = 1.5;
|
|
68
|
+
//初始化缩放方法
|
|
69
|
+
konvaStage.on("wheel", (e) => {
|
|
70
|
+
console.log(e)
|
|
71
|
+
e.evt.preventDefault();
|
|
72
|
+
var oldScale = konvaStage.scaleX();
|
|
73
|
+
var pointer = konvaStage.getPointerPosition();
|
|
74
|
+
var mousePointTo = {
|
|
75
|
+
x: (pointer.x - konvaStage.x()) / oldScale,
|
|
76
|
+
y: (pointer.y - konvaStage.y()) / oldScale,
|
|
77
|
+
};
|
|
78
|
+
// how to scale? Zoom in? Or zoom out?
|
|
79
|
+
let direction = e.evt.deltaY > 0 ? -1 : 1;
|
|
80
|
+
if (e.evt.ctrlKey) {
|
|
81
|
+
direction = -direction;
|
|
82
|
+
}
|
|
83
|
+
var newScale = direction > 0 ? oldScale * scaleBy : oldScale / scaleBy;
|
|
84
|
+
this.scaleRatio = Math.ceil(newScale)
|
|
85
|
+
// 判断比例尺百分比
|
|
86
|
+
if (this.scaleRatio <= 1 || this.scaleRatio >= 100) return
|
|
87
|
+
// 设置放大缩小多少倍
|
|
88
|
+
konvaStage.scale({ x: newScale, y: newScale });
|
|
89
|
+
var newPos = {
|
|
90
|
+
x: pointer.x - mousePointTo.x * newScale,
|
|
91
|
+
y: pointer.y - mousePointTo.y * newScale,
|
|
92
|
+
};
|
|
93
|
+
konvaStage.position(newPos);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
//create方法结束
|
|
98
|
+
},
|
|
99
|
+
//销毁方法
|
|
100
|
+
|
|
101
|
+
methods: {
|
|
102
|
+
loadDxf(data){
|
|
103
|
+
const parser = new DxfParser();
|
|
104
|
+
let dxf = parser.parse(data);
|
|
105
|
+
let entities = formatEntity(dxf.entities);
|
|
106
|
+
let layers = dxf.tables.layer.layers;
|
|
107
|
+
//加载图纸
|
|
108
|
+
for (let key in layers) {
|
|
109
|
+
if (entities[key]) {
|
|
110
|
+
let group = [];
|
|
111
|
+
let l = entities[key].length
|
|
112
|
+
let layerConfig = recordLayerConfig[key]
|
|
113
|
+
let configParams = layerConfig && Object.keys(layerConfig).length > 0 ? layerConfig : null
|
|
114
|
+
for (let i = 0; i < l; i++) {
|
|
115
|
+
let type = entities[key][i].type;
|
|
116
|
+
handleFn(type, dxf, entities[key][i], group, key, configParams, konvaLayer, recordLayerConfig)
|
|
117
|
+
}
|
|
118
|
+
if (!konvaLayer) return
|
|
119
|
+
for(let i = 0; i < group.length;i++) {
|
|
120
|
+
let entity = group[i];
|
|
121
|
+
if (entity.type === 'text') {
|
|
122
|
+
if (konvaLayer) konvaLayer.add(entity.obj);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
let customShape = new Konva.Shape({
|
|
128
|
+
x: 0,
|
|
129
|
+
y: 0,
|
|
130
|
+
strokeWidth: 0.2,
|
|
131
|
+
name: key.replace(/\s*/g, ""),
|
|
132
|
+
entityId: key,
|
|
133
|
+
stroke: configParams ? configParams.color : "#000",
|
|
134
|
+
customColor: configParams ? configParams.color : "",
|
|
135
|
+
visible: configParams ? configParams.visible :true,
|
|
136
|
+
sceneFunc (context, shape) {
|
|
137
|
+
context.beginPath();
|
|
138
|
+
for(let i = 0; i < group.length;i++){
|
|
139
|
+
let entity = group[i];
|
|
140
|
+
if(entity.type === 'line'){
|
|
141
|
+
let x1=entity.x1;
|
|
142
|
+
let y1=entity.y1;
|
|
143
|
+
let x2=entity.x2;
|
|
144
|
+
let y2=entity.y2;
|
|
145
|
+
context.moveTo(x1, -parseFloat(y1));
|
|
146
|
+
context.lineTo(x2, -parseFloat(y2));
|
|
147
|
+
}
|
|
148
|
+
if(entity.type === "polyline"){
|
|
149
|
+
let points=entity.points;
|
|
150
|
+
let closed = entity.closed;
|
|
151
|
+
for(let j = 0; j < points.length; j++){
|
|
152
|
+
let index = j % 2;
|
|
153
|
+
if(index === 0){
|
|
154
|
+
let x = points[j];
|
|
155
|
+
let y = points[j+1];
|
|
156
|
+
if(j === 0){
|
|
157
|
+
context.moveTo(x, y);
|
|
158
|
+
}else{
|
|
159
|
+
context.lineTo(x,y);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if(closed) {
|
|
164
|
+
if (j === points.length - 1) {
|
|
165
|
+
context.lineTo(points[0], points[1]);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// context.closePath();
|
|
172
|
+
context.fillStrokeShape(shape);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
if (konvaLayer) konvaLayer.add(customShape);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
//缩放视口
|
|
179
|
+
let scale = 1;
|
|
180
|
+
const boundingRect = konvaLayer.getClientRect();
|
|
181
|
+
let ratio = Number((this.$refs.svgDraw.clientWidth / boundingRect.width).toFixed(1));
|
|
182
|
+
if (ratio > 2) {
|
|
183
|
+
scale = Number((boundingRect.width / boundingRect.height).toFixed(1));
|
|
184
|
+
scale = scale < 2 ? 2 : scale
|
|
185
|
+
}
|
|
186
|
+
konvaStage.scale({
|
|
187
|
+
x: scale,
|
|
188
|
+
y: scale,
|
|
189
|
+
})
|
|
190
|
+
const boundingScale = konvaLayer.getClientRect();
|
|
191
|
+
//平移视口
|
|
192
|
+
const x =
|
|
193
|
+
this.$refs.svgDraw.clientWidth / 2 -
|
|
194
|
+
(Math.ceil(boundingScale.width) / 2 + boundingScale.x / 2);
|
|
195
|
+
const y =
|
|
196
|
+
this.$refs.svgDraw.clientHeight / 2 -
|
|
197
|
+
(Math.ceil(boundingScale.height) / 2 + boundingScale.y);
|
|
198
|
+
konvaStage.setX(x);
|
|
199
|
+
konvaStage.setY(y);
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
},
|
|
205
|
+
toPdf(){
|
|
206
|
+
// get data URL with default settings
|
|
207
|
+
|
|
208
|
+
// open in new window
|
|
209
|
+
konvaLayer.getCanvas().setPixelRatio(1);
|
|
210
|
+
const jpegURL = konvaStage.toDataURL({
|
|
211
|
+
mimeType: 'image/jpeg',
|
|
212
|
+
quality:1.0
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
let pageData=konvaLayer.canvas.toDataURL('image/jpeg', 1.0);
|
|
216
|
+
|
|
217
|
+
console.log(pageData);
|
|
218
|
+
|
|
219
|
+
let img = new Image();
|
|
220
|
+
img.src=jpegURL;
|
|
221
|
+
const pdf = new jsPDF('l', 'px', [konvaStage.width(), konvaStage.height()]);
|
|
222
|
+
|
|
223
|
+
pdf.addImage(
|
|
224
|
+
konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
225
|
+
0,
|
|
226
|
+
0,
|
|
227
|
+
konvaStage.width(),
|
|
228
|
+
konvaStage.height()
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
pdf.save('canvas.pdf');
|
|
232
|
+
// var imgData = canvas.toDataURL('image/png');
|
|
233
|
+
//doc.text("Hello world!", 10, 10);
|
|
234
|
+
//doc.save("a4.pdf");
|
|
235
|
+
},
|
|
236
|
+
clearCache(){
|
|
237
|
+
konvaLayer && konvaLayer.destroyChildren()
|
|
238
|
+
konvaLayer && konvaLayer.destroy()
|
|
239
|
+
konvaLayer && konvaLayer.clear()
|
|
240
|
+
konvaStage && konvaStage.destroy()
|
|
241
|
+
konvaStage && konvaStage.clearCache()
|
|
242
|
+
konvaLayer = null
|
|
243
|
+
konvaStage = null
|
|
244
|
+
},
|
|
245
|
+
beforeDestroy() {
|
|
246
|
+
this.clearCache()
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
</script>
|
|
251
|
+
<style lang="scss" scoped>
|
|
252
|
+
#konva-container {
|
|
253
|
+
z-index: 3;
|
|
254
|
+
width: 100%;
|
|
255
|
+
height: 100%;
|
|
256
|
+
cursor: pointer;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
}
|
|
259
|
+
</style>
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
<!-- 使用方法 样例 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="trigger_dialog">
|
|
4
|
+
<!-- 弹窗 -->
|
|
5
|
+
<el-button type="primary" @click="dialogVisible = true">触发对话框</el-button>
|
|
6
|
+
<DialogWrapper
|
|
7
|
+
v-if="dialogVisible"
|
|
8
|
+
dialog-title="触发对话框"
|
|
9
|
+
:visible.sync="dialogVisible"
|
|
10
|
+
:popup-width="'35%'"
|
|
11
|
+
@handleClose="handleClose"
|
|
12
|
+
@submitDialogData="submitDialogData"
|
|
13
|
+
>
|
|
14
|
+
<FormDialog
|
|
15
|
+
ref="formDialog"
|
|
16
|
+
:form-item-config-arr="formItemConfigArr"
|
|
17
|
+
@handleInputValue="handleInputValue"
|
|
18
|
+
/>
|
|
19
|
+
</DialogWrapper>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
export default {
|
|
25
|
+
name: 'TriggerDialog',
|
|
26
|
+
components: {
|
|
27
|
+
DialogWrapper: () => import('./components/DialogWrapper.vue'),
|
|
28
|
+
FormDialog: () => import('./form-dialog.vue')
|
|
29
|
+
|
|
30
|
+
},
|
|
31
|
+
props: {},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
dialogVisible: false, // 弹框状态
|
|
35
|
+
// 表单项配置
|
|
36
|
+
formItemConfigArr: [{
|
|
37
|
+
label: '选择器: 单选',
|
|
38
|
+
prop: 'SelectorSingleSelection',
|
|
39
|
+
id: 'SelectorSingleSelection',
|
|
40
|
+
itemType: 'SelectorSingleSelection',
|
|
41
|
+
deliveryLevel: '',
|
|
42
|
+
optionArr: [
|
|
43
|
+
{ optionValue: '黄金糕', optionLabel: '黄金糕' },
|
|
44
|
+
{ optionValue: '双皮奶', optionLabel: '双皮奶' },
|
|
45
|
+
{ optionValue: '蚵仔煎', optionLabel: '蚵仔煎' },
|
|
46
|
+
{ optionValue: '龙须面', optionLabel: '龙须面' },
|
|
47
|
+
{ optionValue: '北京烤鸭', optionLabel: '北京烤鸭' }
|
|
48
|
+
]
|
|
49
|
+
}, {
|
|
50
|
+
label: '选择器: 多选',
|
|
51
|
+
prop: 'SelectorMultipleSelection',
|
|
52
|
+
id: 'SelectorMultipleSelection',
|
|
53
|
+
itemType: 'SelectorMultipleSelection',
|
|
54
|
+
deliveryLevel: '',
|
|
55
|
+
optionArr: [
|
|
56
|
+
{ optionValue: '东南', optionLabel: '东南', children: [
|
|
57
|
+
{ optionValue: '上海', optionLabel: '上海', children: [
|
|
58
|
+
{ optionValue: '普陀', optionLabel: '普陀' },
|
|
59
|
+
{ optionValue: '黄埔', optionLabel: '黄埔' },
|
|
60
|
+
{ optionValue: '徐汇', optionLabel: '徐汇' }]
|
|
61
|
+
},
|
|
62
|
+
{ optionValue: '江苏', optionLabel: '江苏', children: [
|
|
63
|
+
{ optionValue: '南京', optionLabel: '南京' },
|
|
64
|
+
{ optionValue: '苏州', optionLabel: '苏州' },
|
|
65
|
+
{ optionValue: '无锡', optionLabel: '无锡' }]
|
|
66
|
+
},
|
|
67
|
+
{ optionValue: '浙江', optionLabel: '浙江', children: [
|
|
68
|
+
{ optionValue: '杭州', optionLabel: '杭州' },
|
|
69
|
+
{ optionValue: '宁波', optionLabel: '宁波' },
|
|
70
|
+
{ optionValue: '嘉兴', optionLabel: '嘉兴' }]
|
|
71
|
+
}]
|
|
72
|
+
},
|
|
73
|
+
{ optionValue: '西北', optionLabel: '西北', children: [
|
|
74
|
+
{ optionValue: '陕西', optionLabel: '陕西', children: [
|
|
75
|
+
{ optionValue: '西安', optionLabel: '西安' },
|
|
76
|
+
{ optionValue: '延安', optionLabel: '延安' }]
|
|
77
|
+
},
|
|
78
|
+
{ optionValue: '新疆维吾尔族自治区', optionLabel: '新疆维吾尔族自治区', children: [
|
|
79
|
+
{ optionValue: '乌鲁木齐', optionLabel: '乌鲁木齐' },
|
|
80
|
+
{ optionValue: '克拉玛依', optionLabel: '克拉玛依' }]
|
|
81
|
+
}]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}, {
|
|
85
|
+
label: '选择器: 树结构',
|
|
86
|
+
prop: 'SelectorTreeStructure',
|
|
87
|
+
id: 'SelectorTreeStructure',
|
|
88
|
+
itemType: 'SelectorTreeStructure',
|
|
89
|
+
deliveryLevel: '',
|
|
90
|
+
optionArr: [
|
|
91
|
+
{
|
|
92
|
+
'id': 16610387558572,
|
|
93
|
+
'deptId': 100,
|
|
94
|
+
'parentId': 0,
|
|
95
|
+
'ancestors': null,
|
|
96
|
+
'deptName': '中科辅龙',
|
|
97
|
+
'parentName': null,
|
|
98
|
+
'children': [
|
|
99
|
+
{
|
|
100
|
+
'id': 16610389432685,
|
|
101
|
+
'deptId': 101,
|
|
102
|
+
'parentId': 100,
|
|
103
|
+
'ancestors': null,
|
|
104
|
+
'deptName': '北京总公司',
|
|
105
|
+
'parentName': null,
|
|
106
|
+
'children': [
|
|
107
|
+
{
|
|
108
|
+
'id': 16610388531515,
|
|
109
|
+
'deptId': 103,
|
|
110
|
+
'parentId': 101,
|
|
111
|
+
'ancestors': null,
|
|
112
|
+
'deptName': '研发部门',
|
|
113
|
+
'parentName': null,
|
|
114
|
+
'children': [
|
|
115
|
+
{
|
|
116
|
+
'id': 16610387615239,
|
|
117
|
+
'deptId': 16610387615239,
|
|
118
|
+
'parentId': 103,
|
|
119
|
+
'ancestors': null,
|
|
120
|
+
'deptName': '系统管理员',
|
|
121
|
+
'parentName': null,
|
|
122
|
+
'children': [],
|
|
123
|
+
'userId': 1,
|
|
124
|
+
'nickName': null
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
'userId': null,
|
|
128
|
+
'nickName': null
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
'id': 16610388036783,
|
|
132
|
+
'deptId': 104,
|
|
133
|
+
'parentId': 101,
|
|
134
|
+
'ancestors': null,
|
|
135
|
+
'deptName': '市场部门',
|
|
136
|
+
'parentName': null,
|
|
137
|
+
'children': [],
|
|
138
|
+
'userId': null,
|
|
139
|
+
'nickName': null
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
'id': 16610388740710,
|
|
143
|
+
'deptId': 105,
|
|
144
|
+
'parentId': 101,
|
|
145
|
+
'ancestors': null,
|
|
146
|
+
'deptName': '测试部门',
|
|
147
|
+
'parentName': null,
|
|
148
|
+
'children': [
|
|
149
|
+
{
|
|
150
|
+
'id': 16610388604617,
|
|
151
|
+
'deptId': 121,
|
|
152
|
+
'parentId': 105,
|
|
153
|
+
'ancestors': null,
|
|
154
|
+
'deptName': '测试部',
|
|
155
|
+
'parentName': null,
|
|
156
|
+
'children': [],
|
|
157
|
+
'userId': null,
|
|
158
|
+
'nickName': null
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
'id': 16610387802667,
|
|
162
|
+
'deptId': 16610387802667,
|
|
163
|
+
'parentId': 105,
|
|
164
|
+
'ancestors': null,
|
|
165
|
+
'deptName': '若依',
|
|
166
|
+
'parentName': null,
|
|
167
|
+
'children': [],
|
|
168
|
+
'userId': 2,
|
|
169
|
+
'nickName': null
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
'id': 16610388008178,
|
|
173
|
+
'deptId': 16610388008178,
|
|
174
|
+
'parentId': 105,
|
|
175
|
+
'ancestors': null,
|
|
176
|
+
'deptName': '赵文莉',
|
|
177
|
+
'parentName': null,
|
|
178
|
+
'children': [],
|
|
179
|
+
'userId': 738512,
|
|
180
|
+
'nickName': null
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
'userId': null,
|
|
184
|
+
'nickName': null
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
'id': 16610389553740,
|
|
188
|
+
'deptId': 106,
|
|
189
|
+
'parentId': 101,
|
|
190
|
+
'ancestors': null,
|
|
191
|
+
'deptName': '财务部门',
|
|
192
|
+
'parentName': null,
|
|
193
|
+
'children': [],
|
|
194
|
+
'userId': null,
|
|
195
|
+
'nickName': null
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
'id': 16610389178321,
|
|
199
|
+
'deptId': 107,
|
|
200
|
+
'parentId': 101,
|
|
201
|
+
'ancestors': null,
|
|
202
|
+
'deptName': '运维部门',
|
|
203
|
+
'parentName': null,
|
|
204
|
+
'children': [],
|
|
205
|
+
'userId': null,
|
|
206
|
+
'nickName': null
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
'userId': null,
|
|
210
|
+
'nickName': null
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
'id': 16610388755966,
|
|
214
|
+
'deptId': 102,
|
|
215
|
+
'parentId': 100,
|
|
216
|
+
'ancestors': null,
|
|
217
|
+
'deptName': '长沙分公司',
|
|
218
|
+
'parentName': null,
|
|
219
|
+
'children': [
|
|
220
|
+
{
|
|
221
|
+
'id': 16610389179839,
|
|
222
|
+
'deptId': 108,
|
|
223
|
+
'parentId': 102,
|
|
224
|
+
'ancestors': null,
|
|
225
|
+
'deptName': '市场部门',
|
|
226
|
+
'parentName': null,
|
|
227
|
+
'children': [],
|
|
228
|
+
'userId': null,
|
|
229
|
+
'nickName': null
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
'id': 16610389330898,
|
|
233
|
+
'deptId': 109,
|
|
234
|
+
'parentId': 102,
|
|
235
|
+
'ancestors': null,
|
|
236
|
+
'deptName': '财务部门',
|
|
237
|
+
'parentName': null,
|
|
238
|
+
'children': [],
|
|
239
|
+
'userId': null,
|
|
240
|
+
'nickName': null
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
'userId': null,
|
|
244
|
+
'nickName': null
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
'id': 16610388015679,
|
|
248
|
+
'deptId': 110,
|
|
249
|
+
'parentId': 100,
|
|
250
|
+
'ancestors': null,
|
|
251
|
+
'deptName': '监理单位',
|
|
252
|
+
'parentName': null,
|
|
253
|
+
'children': [],
|
|
254
|
+
'userId': null,
|
|
255
|
+
'nickName': null
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
'id': 16610388258734,
|
|
259
|
+
'deptId': 16610388258734,
|
|
260
|
+
'parentId': 100,
|
|
261
|
+
'ancestors': null,
|
|
262
|
+
'deptName': '咩咩',
|
|
263
|
+
'parentName': null,
|
|
264
|
+
'children': [],
|
|
265
|
+
'userId': 4,
|
|
266
|
+
'nickName': null
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
'userId': null,
|
|
270
|
+
'nickName': null
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}, {
|
|
274
|
+
label: '选择器: 单时间',
|
|
275
|
+
prop: 'SelectorSingleTime',
|
|
276
|
+
id: 'SelectorSingleTime',
|
|
277
|
+
itemType: 'SelectorSingleTime',
|
|
278
|
+
deliveryLevel: '',
|
|
279
|
+
optionArr: []
|
|
280
|
+
}, {
|
|
281
|
+
label: '选择器: 单日期',
|
|
282
|
+
prop: 'SelectorSingleDate',
|
|
283
|
+
id: 'SelectorSingleDate',
|
|
284
|
+
itemType: 'SelectorSingleDate',
|
|
285
|
+
deliveryLevel: '',
|
|
286
|
+
optionArr: []
|
|
287
|
+
}, {
|
|
288
|
+
label: '选择器: 日期范围长度测试',
|
|
289
|
+
prop: 'SelectorDateRange',
|
|
290
|
+
id: 'SelectorDateRange',
|
|
291
|
+
itemType: 'SelectorDateRange',
|
|
292
|
+
deliveryLevel: 'ESS',
|
|
293
|
+
optionArr: []
|
|
294
|
+
}, {
|
|
295
|
+
label: '多行文本',
|
|
296
|
+
prop: 'MultilineText',
|
|
297
|
+
id: 'MultilineText',
|
|
298
|
+
itemType: 'MultilineText',
|
|
299
|
+
deliveryLevel: '',
|
|
300
|
+
optionArr: []
|
|
301
|
+
}, {
|
|
302
|
+
label: '单选框',
|
|
303
|
+
prop: 'RadioBox',
|
|
304
|
+
id: 'RadioBox',
|
|
305
|
+
itemType: 'RadioBox',
|
|
306
|
+
deliveryLevel: '',
|
|
307
|
+
optionArr: [
|
|
308
|
+
{ optionValue: '单选一', optionLabel: '单选一' },
|
|
309
|
+
{ optionValue: '单选二', optionLabel: '单选二' },
|
|
310
|
+
{ optionValue: '单选三', optionLabel: '单选三' },
|
|
311
|
+
{ optionValue: '单选四', optionLabel: '单选四' },
|
|
312
|
+
{ optionValue: '单选五', optionLabel: '单选五' }
|
|
313
|
+
]
|
|
314
|
+
}, {
|
|
315
|
+
label: '多选框',
|
|
316
|
+
prop: 'MultipleCheckbox',
|
|
317
|
+
id: 'MultipleCheckbox',
|
|
318
|
+
itemType: 'MultipleCheckbox',
|
|
319
|
+
deliveryLevel: 'ESS',
|
|
320
|
+
optionArr: [
|
|
321
|
+
{ optionValue: '复选框A', optionLabel: '复选框A' },
|
|
322
|
+
{ optionValue: '复选框B', optionLabel: '复选框B' },
|
|
323
|
+
{ optionValue: '复选框C', optionLabel: '复选框C' },
|
|
324
|
+
{ optionValue: '复选框D', optionLabel: '复选框D' },
|
|
325
|
+
{ optionValue: '复选框F', optionLabel: '复选框F' }
|
|
326
|
+
]
|
|
327
|
+
}, {
|
|
328
|
+
label: '字符串输入框',
|
|
329
|
+
prop: 'InputString',
|
|
330
|
+
id: 'InputString',
|
|
331
|
+
itemType: 'InputString',
|
|
332
|
+
deliveryLevel: 'ESS',
|
|
333
|
+
optionArr: []
|
|
334
|
+
}, {
|
|
335
|
+
label: '整数输入框',
|
|
336
|
+
prop: 'InputInteger',
|
|
337
|
+
id: 'InputInteger',
|
|
338
|
+
itemType: 'InputInteger',
|
|
339
|
+
deliveryLevel: '',
|
|
340
|
+
optionArr: []
|
|
341
|
+
}, {
|
|
342
|
+
label: '小数输入框',
|
|
343
|
+
prop: 'InputDecimals',
|
|
344
|
+
id: 'InputDecimals',
|
|
345
|
+
itemType: 'InputDecimals',
|
|
346
|
+
deliveryLevel: '',
|
|
347
|
+
optionArr: []
|
|
348
|
+
}, {
|
|
349
|
+
label: '计数器',
|
|
350
|
+
prop: 'CounterFrame',
|
|
351
|
+
id: 'CounterFrame',
|
|
352
|
+
itemType: 'CounterFrame',
|
|
353
|
+
deliveryLevel: '',
|
|
354
|
+
optionArr: []
|
|
355
|
+
}, {
|
|
356
|
+
label: '文件上传',
|
|
357
|
+
prop: 'FileUpload',
|
|
358
|
+
id: 'FileUpload',
|
|
359
|
+
itemType: 'FileUpload',
|
|
360
|
+
deliveryLevel: '',
|
|
361
|
+
optionArr: []
|
|
362
|
+
}, {
|
|
363
|
+
label: '富文本',
|
|
364
|
+
prop: 'RichText',
|
|
365
|
+
id: 'RichText',
|
|
366
|
+
itemType: 'RichText',
|
|
367
|
+
deliveryLevel: '',
|
|
368
|
+
optionArr: []
|
|
369
|
+
}]
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
computed: { },
|
|
373
|
+
watch: {},
|
|
374
|
+
created() {},
|
|
375
|
+
mounted() {},
|
|
376
|
+
methods: {
|
|
377
|
+
/* 弹窗 修改是否让页面显示与隐藏的事件 */
|
|
378
|
+
updateVisible(val) {
|
|
379
|
+
this.dialogVisible = val
|
|
380
|
+
},
|
|
381
|
+
/* 弹窗 确认 操作 */
|
|
382
|
+
submitDialogData() {
|
|
383
|
+
// this.dialogVisible = false
|
|
384
|
+
const formData = this.$refs.formDialog.formInline
|
|
385
|
+
console.log(formData)
|
|
386
|
+
},
|
|
387
|
+
/* 弹窗 关闭 操作 */
|
|
388
|
+
handleClose() {
|
|
389
|
+
this.dialogVisible = false
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
/* 表单操作 */
|
|
393
|
+
handleInputValue(data) {
|
|
394
|
+
console.log(data)
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
</script>
|
|
399
|
+
<style lang="scss" scoped>
|
|
400
|
+
.trigger_dialog {
|
|
401
|
+
box-sizing: border-box;
|
|
402
|
+
width: calc(100% - 32px);
|
|
403
|
+
height: calc(100% - 72px);
|
|
404
|
+
margin: 16px;
|
|
405
|
+
padding: 16px;
|
|
406
|
+
border-radius: 4px;
|
|
407
|
+
background-color: #ccc;
|
|
408
|
+
}
|
|
409
|
+
</style>
|