agilebuilder-ui 1.1.41 → 1.1.42
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/lib/{401-deb6f978.js → 401-89fd25ba.js} +1 -1
- package/lib/{404-ca0b33ee.js → 404-4264aeb1.js} +1 -1
- package/lib/{iframe-page-eb39ba95.js → iframe-page-4a8dcdbb.js} +1 -1
- package/lib/{index-a36c91b2.js → index-50fdf8ae.js} +4630 -4580
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +85 -85
- package/lib/{tab-content-iframe-index-094835e7.js → tab-content-iframe-index-16207fb9.js} +1 -1
- package/lib/{tab-content-index-92b24462.js → tab-content-index-8ae8c396.js} +1 -1
- package/lib/{tache-subprocess-history-0d32337a.js → tache-subprocess-history-110e29f2.js} +1 -1
- package/package.json +1 -1
- package/packages/fs-preview/src/fs-preview.vue +38 -29
- package/packages/fs-upload-new/src/fs-button-upload.vue +34 -1
- package/packages/fs-upload-new/src/fs-drag-upload.vue +43 -2
- package/packages/fs-upload-new/src/fs-preview-new.vue +6 -4
- package/packages/super-grid/src/custom-formatter.js +16 -10
- package/packages/super-grid/src/dynamic-input.vue +7 -2
- package/packages/super-grid/src/normal-column.vue +8 -4
- package/packages/super-grid/src/search-form-advancedQuery.vue +1 -1
- package/packages/super-grid/src/search-form-item.vue +23 -23
- package/packages/super-grid/src/search-form-open.vue +164 -158
- package/packages/super-grid/src/super-grid-service.js +141 -153
- package/packages/super-grid/src/super-grid.vue +43 -14
- package/packages/super-nine-grid/src/search-form.vue +465 -659
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +515 -539
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +24 -44
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +626 -665
- package/src/utils/permission.js +86 -9
|
@@ -1,85 +1,84 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
style="
|
|
2
|
+
<div>
|
|
3
|
+
<el-container style="height: 395px">
|
|
4
|
+
<el-aside width="430px">
|
|
5
|
+
<el-container style="height: 390px">
|
|
6
|
+
<el-header style="text-align: right; font-size: 12px; height: 35px">
|
|
7
|
+
<el-autocomplete
|
|
8
|
+
v-model="filterText"
|
|
9
|
+
:fetch-suggestions="querySearch"
|
|
10
|
+
:placeholder="$t('departmentUserTree.pleaseEnterUserInformation')"
|
|
11
|
+
:trigger-on-focus="false"
|
|
12
|
+
class="inline-input inline-input-custom"
|
|
13
|
+
select-when-unmatched
|
|
14
|
+
size="default"
|
|
15
|
+
@select="handleSelect"
|
|
16
|
+
@keyup.enter="clickSearch"
|
|
17
|
+
>
|
|
18
|
+
<template v-slot:append>
|
|
19
|
+
<el-button :icon="ElIconSearch" @click="clickSearch" />
|
|
20
|
+
</template>
|
|
21
|
+
</el-autocomplete>
|
|
22
|
+
</el-header>
|
|
23
|
+
<el-main style="padding: 10px">
|
|
24
|
+
<div
|
|
25
|
+
v-if="!searchValue"
|
|
26
|
+
style="padding-top: 5px; overflow: auto; width: auto; display: inline-block !important"
|
|
27
|
+
>
|
|
28
|
+
<el-tree
|
|
29
|
+
ref="workgroupUserTree"
|
|
30
|
+
:filter-node-method="filterNode"
|
|
31
|
+
:load="loadNode"
|
|
32
|
+
:props="defaultProps"
|
|
33
|
+
:show-checkbox="multiple"
|
|
34
|
+
lazy
|
|
35
|
+
node-key="nodeId"
|
|
36
|
+
@check="handleCheckNode"
|
|
37
|
+
@node-click="handleNodeClick"
|
|
38
|
+
>
|
|
39
|
+
<template #default="{ node, data }">
|
|
40
|
+
<span>
|
|
41
|
+
<el-icon>
|
|
42
|
+
<Menu v-if="node.data.id === -1" />
|
|
43
|
+
<Calendar v-else />
|
|
44
|
+
</el-icon>
|
|
45
|
+
<span
|
|
46
|
+
:class="
|
|
47
|
+
data.nodeType && data.nodeType === 'USER' && searchValue && filterUserVal(data, searchValue)
|
|
48
|
+
? 'searchResult'
|
|
49
|
+
: ''
|
|
50
|
+
"
|
|
51
|
+
:title="node.label"
|
|
52
|
+
>
|
|
53
|
+
{{ node.label }}
|
|
54
|
+
</span>
|
|
55
|
+
</span>
|
|
56
|
+
</template>
|
|
57
|
+
</el-tree>
|
|
58
|
+
</div>
|
|
59
|
+
<div v-if="searchValue && searchValue.length > 0" style="height: 100%; overflow: hidden">
|
|
60
|
+
<workgroup-user-result
|
|
61
|
+
ref="workgroupUserResult"
|
|
62
|
+
:grid-data="searchResult"
|
|
63
|
+
:height="height"
|
|
64
|
+
:is-search-result="true"
|
|
65
|
+
:multiple="multiple"
|
|
66
|
+
:select-result="selectResult"
|
|
67
|
+
@addWorkgroupUser="addWorkgroupUser"
|
|
68
|
+
@resultRowDblclick="resultRowDblclick"
|
|
69
|
+
@selectResult="getSelectWorkgroupUser"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</el-main>
|
|
73
|
+
</el-container>
|
|
74
|
+
</el-aside>
|
|
75
|
+
<el-container v-if="multiple">
|
|
76
|
+
<el-aside width="2px">
|
|
77
|
+
<table
|
|
78
|
+
border="1px"
|
|
79
|
+
cellpadding="0"
|
|
80
|
+
cellspacing="0"
|
|
81
|
+
style="
|
|
83
82
|
height: 100%;
|
|
84
83
|
border-left-style: solid;
|
|
85
84
|
border-bottom-style: none;
|
|
@@ -87,606 +86,568 @@
|
|
|
87
86
|
border-top-style: none;
|
|
88
87
|
border-left-color: #cccccc;
|
|
89
88
|
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
</el-container>
|
|
110
|
-
</div>
|
|
89
|
+
/>
|
|
90
|
+
</el-aside>
|
|
91
|
+
<el-main style="padding: 10px">
|
|
92
|
+
<div style="text-align: left; font-size: 16px">{{ $t('departmentUserTree.selectedPeople') }}::</div>
|
|
93
|
+
<div :style="'padding-top: 5px;height:90%;overflow: hidden;'">
|
|
94
|
+
<workgroup-user-result
|
|
95
|
+
:grid-data="selectResult"
|
|
96
|
+
:height="height"
|
|
97
|
+
:is-search-result="false"
|
|
98
|
+
:multiple="multiple"
|
|
99
|
+
@removeWorkgroupUser="removeWorkgroupUser"
|
|
100
|
+
@resultRowDblclick="resultRowDblclick"
|
|
101
|
+
@selectResult="getSelectWorkgroupUser"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
</el-main>
|
|
105
|
+
</el-container>
|
|
106
|
+
</el-container>
|
|
107
|
+
</div>
|
|
111
108
|
</template>
|
|
112
109
|
|
|
113
110
|
<script>
|
|
114
|
-
import {Search as ElIconSearch} from '@element-plus/icons-vue'
|
|
115
|
-
import {$emit} from '../../utils/gogocodeTransfer'
|
|
111
|
+
import { Search as ElIconSearch } from '@element-plus/icons-vue'
|
|
112
|
+
import { $emit } from '../../utils/gogocodeTransfer'
|
|
116
113
|
import localStorage from '../../../src/utils/local-storage'
|
|
117
114
|
import utils from '../../utils/utils'
|
|
118
115
|
import workgroupTreeInlineService from './workgroup-tree-inline-service'
|
|
119
116
|
import WorkgroupUserResult from './search-result.vue'
|
|
120
117
|
|
|
121
118
|
export default {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
// className = 'Menu'
|
|
646
|
-
// } else {
|
|
647
|
-
// // 表示是工作组节点
|
|
648
|
-
// className = 'Date'
|
|
649
|
-
// }
|
|
650
|
-
// if (
|
|
651
|
-
// data.nodeType &&
|
|
652
|
-
// data.nodeType === 'USER' &&
|
|
653
|
-
// this.searchValue &&
|
|
654
|
-
// this.filterUserVal(data, this.searchValue)
|
|
655
|
-
// ) {
|
|
656
|
-
// // 如果是查询条件
|
|
657
|
-
// return h(
|
|
658
|
-
// 'span',
|
|
659
|
-
// h('el-icon', h(className)),
|
|
660
|
-
// h('span', {class: searchResult, title: node.label}, node.label)
|
|
661
|
-
// )
|
|
662
|
-
// // return `<span>
|
|
663
|
-
// // <i class={className}></i>
|
|
664
|
-
// // <span class="searchResult" title={node.label}>
|
|
665
|
-
// // {node.label}
|
|
666
|
-
// // </span>
|
|
667
|
-
// // </span>`
|
|
668
|
-
// }
|
|
669
|
-
// return h(
|
|
670
|
-
// 'span',
|
|
671
|
-
// h('el-icon', h(className)),
|
|
672
|
-
// h('span', {title: node.label}, node.label)
|
|
673
|
-
// )
|
|
674
|
-
// // return `<span>
|
|
675
|
-
// // <i class={className}></i>
|
|
676
|
-
// // <span title={node.label}>{node.label}</span>
|
|
677
|
-
// // </span>`
|
|
678
|
-
// },
|
|
679
|
-
},
|
|
680
|
-
emits: ['result'],
|
|
119
|
+
data() {
|
|
120
|
+
return {
|
|
121
|
+
filterText: '',
|
|
122
|
+
defaultProps: {
|
|
123
|
+
id: 'id',
|
|
124
|
+
label: 'name',
|
|
125
|
+
children: 'children',
|
|
126
|
+
isLeaf: 'leaf'
|
|
127
|
+
},
|
|
128
|
+
searchParam: {
|
|
129
|
+
userField: null,
|
|
130
|
+
searchValue: null,
|
|
131
|
+
treeType: 'MAN_GROUP_TREE',
|
|
132
|
+
departmentInfo: null
|
|
133
|
+
},
|
|
134
|
+
// 当前租户内是否包含分支机构。获得当前选中部门名称时,如果有分支,则需要将分支名称返回给用户,例如:部门1(分支1)
|
|
135
|
+
containBranch: false,
|
|
136
|
+
// 公司节点的id
|
|
137
|
+
tenantNodeId: -1,
|
|
138
|
+
// 用于保存所有查询出的节点id
|
|
139
|
+
allSearchNodeIds: [],
|
|
140
|
+
// 用于保存allSearchNodeIds中所有已加载子节点的id集合
|
|
141
|
+
allExpandNodeIds: [],
|
|
142
|
+
isClickNode: false,
|
|
143
|
+
// 查询的备选值
|
|
144
|
+
restaurants: [],
|
|
145
|
+
// 查询条件
|
|
146
|
+
searchValue: null,
|
|
147
|
+
// 工作组的查询结果
|
|
148
|
+
searchResult: [],
|
|
149
|
+
// 工作组的选中结果
|
|
150
|
+
selectResult: [],
|
|
151
|
+
searchStoreKey: 'searchWorkgroupUser',
|
|
152
|
+
// 单选时,选择的用户信息
|
|
153
|
+
selectNodeInfo: null,
|
|
154
|
+
// 公司根节点信息
|
|
155
|
+
tenantInfo: {},
|
|
156
|
+
ElIconSearch
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
name: 'InlineWorkgroupUserTree',
|
|
160
|
+
components: {
|
|
161
|
+
WorkgroupUserResult
|
|
162
|
+
},
|
|
163
|
+
props: {
|
|
164
|
+
// 是否是多选树,默认是true
|
|
165
|
+
multiple: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: true
|
|
168
|
+
},
|
|
169
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
170
|
+
branchInfo: {
|
|
171
|
+
type: Array,
|
|
172
|
+
default: null
|
|
173
|
+
},
|
|
174
|
+
// 多选用户树时,已选择用户id或登录名集合,多个之间以逗号隔开
|
|
175
|
+
selectUserInfo: {
|
|
176
|
+
type: [String, Number],
|
|
177
|
+
default: null
|
|
178
|
+
},
|
|
179
|
+
// 移除用户时,用户属性名称:id、loginName、email、telephone,默认是loginName
|
|
180
|
+
searchField: {
|
|
181
|
+
type: String,
|
|
182
|
+
default: 'loginName'
|
|
183
|
+
},
|
|
184
|
+
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
185
|
+
separator: {
|
|
186
|
+
type: String,
|
|
187
|
+
default: ','
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
computed: {},
|
|
191
|
+
watch: {
|
|
192
|
+
filterText(val) {
|
|
193
|
+
if (!val) {
|
|
194
|
+
this.searchValue = val
|
|
195
|
+
// 清空查询内容时,重新加载整个树
|
|
196
|
+
this.loadWorkgroup(this.tenantNodeId, this.tenantNodeId + '')
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
created() {
|
|
201
|
+
if (this.multiple) {
|
|
202
|
+
this.initSelectUsers(this.searchField, this.selectUserInfo, this.separator).then((users) => {
|
|
203
|
+
if (users) {
|
|
204
|
+
this.selectResult = users
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
mounted() {
|
|
210
|
+
var searchWorkgroup = localStorage.getObject(this.searchStoreKey)
|
|
211
|
+
if (searchWorkgroup) {
|
|
212
|
+
this.restaurants = searchWorkgroup
|
|
213
|
+
} else {
|
|
214
|
+
this.restaurants = []
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
methods: {
|
|
218
|
+
...utils,
|
|
219
|
+
...workgroupTreeInlineService,
|
|
220
|
+
// 将查询结果中指定工作组添加到已选择工作组集合中
|
|
221
|
+
addWorkgroupUser(index, workgroup) {
|
|
222
|
+
const containWorkgroups = this.selectResult.filter(this.filterWorkgroup(workgroup))
|
|
223
|
+
if (containWorkgroups && containWorkgroups.length === 0) {
|
|
224
|
+
this.selectResult.push(workgroup)
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
filterWorkgroup(queryWorkgroup) {
|
|
228
|
+
return (workgroup) => {
|
|
229
|
+
return workgroup.id === queryWorkgroup.id
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
removeWorkgroupUser(index, workgroup) {
|
|
233
|
+
if (this.$refs.workgroupUserTree) {
|
|
234
|
+
// 通过查询结果添加的工作组,在返回到组织结构树时,也选中了该工作组,在移除该工作组时,需要去掉复选框的选中状态
|
|
235
|
+
const checkedKeys = this.$refs.workgroupUserTree.getCheckedKeys()
|
|
236
|
+
const currentCheckedWorkgroupNodeIds = checkedKeys.filter(this.filterUserNode(workgroup))
|
|
237
|
+
if (currentCheckedWorkgroupNodeIds.length > 0) {
|
|
238
|
+
// 表示当前工作组是选中的状态,需要去掉
|
|
239
|
+
currentCheckedWorkgroupNodeIds.forEach((workgroupNodeId) => {
|
|
240
|
+
this.$refs.workgroupUserTree.setChecked(workgroupNodeId, false)
|
|
241
|
+
})
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
this.selectResult = this.removeRow(this.selectResult, workgroup)
|
|
245
|
+
if (!this.selectResult || this.selectResult.length === 0) {
|
|
246
|
+
// 已选结果面板没有内容,则左侧树节点也不要有选中节点了
|
|
247
|
+
if (this.$refs.workgroupUserTree) {
|
|
248
|
+
this.$refs.workgroupUserTree.setCheckedKeys([])
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
getSelectWorkgroupUser(workgroup) {
|
|
253
|
+
this.packageSelectResult(workgroup)
|
|
254
|
+
},
|
|
255
|
+
resultRowDblclick(workgroup) {
|
|
256
|
+
this.packageSelectResult(workgroup)
|
|
257
|
+
$emit(this, 'result', this.selectNodeInfo)
|
|
258
|
+
},
|
|
259
|
+
packageSelectResult(user) {
|
|
260
|
+
user.tenantCode = this.tenantInfo.code
|
|
261
|
+
user.tenantName = this.tenantInfo.tenantName
|
|
262
|
+
let name = user.name
|
|
263
|
+
if (user.enName && user.enName.trim() !== '') {
|
|
264
|
+
name = name + '(' + user.enName + ')'
|
|
265
|
+
}
|
|
266
|
+
const selectNodeInfo = {
|
|
267
|
+
id: user.id,
|
|
268
|
+
name: name,
|
|
269
|
+
loginName: user.loginName,
|
|
270
|
+
email: user.email,
|
|
271
|
+
telephone: user.telephone,
|
|
272
|
+
containBranch: this.containBranch,
|
|
273
|
+
user: user,
|
|
274
|
+
enName: user.enName,
|
|
275
|
+
subCompanyName: user.subCompanyName
|
|
276
|
+
}
|
|
277
|
+
// 表示是勾选单选按钮或 选中树节点
|
|
278
|
+
this.selectNodeInfo = selectNodeInfo
|
|
279
|
+
},
|
|
280
|
+
handleSelect(item) {
|
|
281
|
+
this.handleSelectUtil(item, localStorage)
|
|
282
|
+
},
|
|
283
|
+
search(value) {
|
|
284
|
+
this.searchValue = value
|
|
285
|
+
// let mySearchValue = value
|
|
286
|
+
// if (mySearchValue) {
|
|
287
|
+
// mySearchValue = mySearchValue.trim()
|
|
288
|
+
// }
|
|
289
|
+
// this.searchParam.searchValue = mySearchValue
|
|
290
|
+
// this.searchParam.departmentInfo = this.branchInfo
|
|
291
|
+
// // this.searchParam.userField = this.searchField
|
|
292
|
+
// // 后台查询部门,并拼接树节点
|
|
293
|
+
// this.filterAppendNodes(value)
|
|
294
|
+
this.$refs.workgroupUserTree.filter(value)
|
|
295
|
+
},
|
|
296
|
+
// 点击查询按钮调用的方法
|
|
297
|
+
clickSearch() {
|
|
298
|
+
this.storeSeachValue(localStorage, this.searchStoreKey, this.filterText)
|
|
299
|
+
this.search(this.filterText)
|
|
300
|
+
},
|
|
301
|
+
filterNode(value, data, node) {
|
|
302
|
+
if (!value) {
|
|
303
|
+
return true
|
|
304
|
+
} else {
|
|
305
|
+
if (data.nodeType && data.nodeType === 'USER') {
|
|
306
|
+
// data.data是用户的所有数据
|
|
307
|
+
const user = JSON.parse(data.data)
|
|
308
|
+
return this.filterUserVal(user, value)
|
|
309
|
+
} else {
|
|
310
|
+
// 表示不是用户节点
|
|
311
|
+
return false
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
filterUserVal(user, searchVal) {
|
|
316
|
+
const searchFields = ['name', 'loginName', 'email', 'telephone', 'jobNumber', 'honorificName']
|
|
317
|
+
let isHasVal = false
|
|
318
|
+
for (let i = 0; i < searchFields.length; i++) {
|
|
319
|
+
const searchField = searchFields[i]
|
|
320
|
+
const userValue = user[searchField]
|
|
321
|
+
if (
|
|
322
|
+
userValue.indexOf(searchVal) !== -1 ||
|
|
323
|
+
(searchField === 'name' && user['enName'] && user['enName'].indexOf(searchVal) !== -1)
|
|
324
|
+
) {
|
|
325
|
+
isHasVal = true
|
|
326
|
+
} else {
|
|
327
|
+
isHasVal = false
|
|
328
|
+
break
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return isHasVal
|
|
332
|
+
},
|
|
333
|
+
// 点击复选框时处理
|
|
334
|
+
handleCheckNode(data, checkObj) {
|
|
335
|
+
if (checkObj.checkedKeys.indexOf(data.nodeId) > -1) {
|
|
336
|
+
// 表示正选中data节点
|
|
337
|
+
this.checkedNode(data, false)
|
|
338
|
+
} else {
|
|
339
|
+
// 表示正取消选中data节点,同时要取消其子节点的选中状态
|
|
340
|
+
this.cancelCheckedNode(data)
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
// 选中当前节点及其子节点
|
|
344
|
+
checkedNodeAndChildren(data) {
|
|
345
|
+
// 取消选中状态时,保持节点是展开的状态,不要折叠
|
|
346
|
+
this.$refs.workgroupUserTree.store.nodesMap[data.nodeId].expanded = true
|
|
347
|
+
// 获得所有应该选中的节点
|
|
348
|
+
this.$refs.workgroupUserTree.setChecked(data.nodeId, true)
|
|
349
|
+
const children = data.children
|
|
350
|
+
if (children) {
|
|
351
|
+
// 递归设置子子节点的选中状态
|
|
352
|
+
children.forEach((nodeData) => {
|
|
353
|
+
this.checkedNodeAndChildren(nodeData)
|
|
354
|
+
this.selectResult.push(JSON.parse(nodeData.data))
|
|
355
|
+
})
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
// 取消节点选中状态时
|
|
359
|
+
cancelCheckedNode(data) {
|
|
360
|
+
if (data.id === this.tenantNodeId) {
|
|
361
|
+
// 表示取消公司节点的选中状态,即取消所有节点的勾选状态
|
|
362
|
+
this.$refs.workgroupUserTree.setCheckedKeys([])
|
|
363
|
+
} else if (data.nodeType && data.nodeType === 'WORKGROUP') {
|
|
364
|
+
this.cancelCheckedUserNodesWithWorkgroup(data)
|
|
365
|
+
} else {
|
|
366
|
+
this.selectResult = this.removeRow(this.selectResult, JSON.parse(data.data))
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
// 选中了根节点公司节点时,选中所有工作组
|
|
370
|
+
checkedAllWorkgroups(root) {
|
|
371
|
+
const children = root.children
|
|
372
|
+
if (children) {
|
|
373
|
+
children.forEach((workgroupNode) => {
|
|
374
|
+
this.$refs.workgroupUserTree.setChecked(workgroupNode.nodeId, true)
|
|
375
|
+
})
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
// 取消指定工作组下的用户节点的选中状态
|
|
379
|
+
cancelCheckedUserNodesWithWorkgroup(workgroupData) {
|
|
380
|
+
const children = workgroupData.children
|
|
381
|
+
if (children) {
|
|
382
|
+
children.forEach((userNode) => {
|
|
383
|
+
this.$refs.workgroupUserTree.setChecked(userNode.nodeId, false)
|
|
384
|
+
this.selectResult = this.removeRow(this.selectResult, JSON.parse(userNode.data))
|
|
385
|
+
})
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
handleNodeClick(data, node, nodeTree) {
|
|
389
|
+
if (this.multiple) {
|
|
390
|
+
// 多选部门树时,处理点击节点事件
|
|
391
|
+
this.clickNodeWhenMultiple(data)
|
|
392
|
+
}
|
|
393
|
+
this.selectSingleNode(data, false)
|
|
394
|
+
},
|
|
395
|
+
selectSingleNode(data, isClickOkBtn) {
|
|
396
|
+
if (this.isUserNode(data) && !this.multiple) {
|
|
397
|
+
// 点击的是工作组节点,并且是单选树时,点击部门节点直接关闭弹框
|
|
398
|
+
const user = JSON.parse(data.data)
|
|
399
|
+
user.tenantCode = this.tenantInfo.code
|
|
400
|
+
user.tenantName = this.tenantInfo.tenantName
|
|
401
|
+
let name = user.name
|
|
402
|
+
if (user.enName && user.enName.trim() !== '') {
|
|
403
|
+
name = name + '(' + user.enName + ')'
|
|
404
|
+
}
|
|
405
|
+
const selectNodeInfo = {
|
|
406
|
+
id: user.id,
|
|
407
|
+
name: name,
|
|
408
|
+
loginName: user.loginName,
|
|
409
|
+
email: user.email,
|
|
410
|
+
telephone: user.telephone,
|
|
411
|
+
containBranch: this.containBranch,
|
|
412
|
+
user: user,
|
|
413
|
+
enName: user.enName,
|
|
414
|
+
subCompanyName: user.subCompanyName
|
|
415
|
+
}
|
|
416
|
+
this.selectNodeInfo = selectNodeInfo
|
|
417
|
+
if (isClickOkBtn === true) {
|
|
418
|
+
// 点击确定按钮时才需要调result回调事件,关闭弹框
|
|
419
|
+
$emit(this, 'result', selectNodeInfo)
|
|
420
|
+
console.log('3=====setSelectNodeInfo=====', selectNodeInfo)
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
// 多选树时,点击节点处理复选框的选中状态
|
|
425
|
+
clickNodeWhenMultiple(data) {
|
|
426
|
+
var checkedKeys = []
|
|
427
|
+
if (this.$refs.workgroupUserTree) {
|
|
428
|
+
checkedKeys = this.$refs.workgroupUserTree.getCheckedKeys()
|
|
429
|
+
}
|
|
430
|
+
// 取消选中状态时,保持节点是展开的状态,不要折叠
|
|
431
|
+
this.$refs.workgroupUserTree.store.nodesMap[data.nodeId].expanded = true
|
|
432
|
+
if (checkedKeys.indexOf(data.nodeId) > -1) {
|
|
433
|
+
// 表示当前节点是选中状态,则需要取消其选中状态
|
|
434
|
+
// 取消当前节点的勾选状态
|
|
435
|
+
this.$refs.workgroupUserTree.setChecked(data.nodeId, false)
|
|
436
|
+
this.cancelCheckedNode(data)
|
|
437
|
+
} else {
|
|
438
|
+
// 表示当前节点不是选中的状态,需要勾选该节点
|
|
439
|
+
this.$refs.workgroupUserTree.setChecked(data.nodeId, true)
|
|
440
|
+
this.checkedNode(data, true)
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
isUserNode(data) {
|
|
444
|
+
// 当前节点不是公司节点,也不是分支机构节点,表示是部门节点
|
|
445
|
+
return data.id !== this.tenantNodeId && data.nodeType && data.nodeType === 'USER'
|
|
446
|
+
},
|
|
447
|
+
singleSetValue() {
|
|
448
|
+
let showTip = false
|
|
449
|
+
if (this.searchValue) {
|
|
450
|
+
console.log('this.selectNodeInfo', this.selectNodeInfo)
|
|
451
|
+
if (this.selectNodeInfo) {
|
|
452
|
+
$emit(this, 'result', this.selectNodeInfo)
|
|
453
|
+
} else {
|
|
454
|
+
showTip = true
|
|
455
|
+
}
|
|
456
|
+
} else {
|
|
457
|
+
const data = this.$refs.workgroupUserTree.getCurrentNode()
|
|
458
|
+
if (data && data !== null && this.isUserNode(data)) {
|
|
459
|
+
this.selectSingleNode(data, true)
|
|
460
|
+
} else {
|
|
461
|
+
showTip = true
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
this.showTip(showTip)
|
|
465
|
+
},
|
|
466
|
+
multipleSetValue() {
|
|
467
|
+
let showTip = false
|
|
468
|
+
// 选中的用户结果
|
|
469
|
+
var selectNodeInfo = {
|
|
470
|
+
userIds: [],
|
|
471
|
+
userNames: [],
|
|
472
|
+
loginNames: [],
|
|
473
|
+
emails: [],
|
|
474
|
+
telephones: [],
|
|
475
|
+
users: []
|
|
476
|
+
}
|
|
477
|
+
if (this.searchValue) {
|
|
478
|
+
if (this.selectResult.length > 0) {
|
|
479
|
+
this.selectResult.forEach((workgroupData) => {
|
|
480
|
+
this.addSelectedUserInfo(selectNodeInfo, workgroupData)
|
|
481
|
+
})
|
|
482
|
+
$emit(this, 'result', selectNodeInfo)
|
|
483
|
+
} else {
|
|
484
|
+
showTip = true
|
|
485
|
+
}
|
|
486
|
+
} else {
|
|
487
|
+
var parentIds = []
|
|
488
|
+
var nodes = this.$refs.workgroupUserTree.getCheckedNodes()
|
|
489
|
+
if (nodes) {
|
|
490
|
+
if (nodes.length === 0) {
|
|
491
|
+
// 没有选择任何节点
|
|
492
|
+
showTip = true
|
|
493
|
+
} else {
|
|
494
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
495
|
+
var node = nodes[i]
|
|
496
|
+
if (this.isSelectTenantNode(node.id)) {
|
|
497
|
+
// 表示选择了所有工作组人员
|
|
498
|
+
selectNodeInfo.userIds = []
|
|
499
|
+
selectNodeInfo.userNames = []
|
|
500
|
+
selectNodeInfo.userIds.push(node.id)
|
|
501
|
+
selectNodeInfo.userNames.push('所有工作组人员')
|
|
502
|
+
break
|
|
503
|
+
} else if (node.id !== this.tenantNodeId) {
|
|
504
|
+
// 不是公司根节点
|
|
505
|
+
if (node.leaf) {
|
|
506
|
+
// 如果是叶子节点
|
|
507
|
+
if (this.isUserNode(node)) {
|
|
508
|
+
const user = JSON.parse(node.data)
|
|
509
|
+
this.addSelectedUserInfo(selectNodeInfo, user)
|
|
510
|
+
}
|
|
511
|
+
} else {
|
|
512
|
+
// 表示是工作组节点,且该节点下存在用户
|
|
513
|
+
const userDatas = node.children
|
|
514
|
+
if (userDatas && userDatas.length > 0) {
|
|
515
|
+
// 表示已展开过该工作组
|
|
516
|
+
userDatas.forEach((userData) => {
|
|
517
|
+
const user = JSON.parse(userData.data)
|
|
518
|
+
this.addSelectedUserInfo(selectNodeInfo, user)
|
|
519
|
+
})
|
|
520
|
+
} else {
|
|
521
|
+
// 表示没有展开过该节点,需要去后台获得该工作组下的人员信息
|
|
522
|
+
parentIds.push(node.id)
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
if (parentIds.length > 0) {
|
|
528
|
+
// 表示选中的工作组节点未展开过,则需要去后台查询获得这些工作组下的人员集合
|
|
529
|
+
this.getAllSelectedWorkgroupUsers(parentIds, selectNodeInfo)
|
|
530
|
+
showTip = false
|
|
531
|
+
} else {
|
|
532
|
+
if (selectNodeInfo.userIds.length > 0) {
|
|
533
|
+
$emit(this, 'result', selectNodeInfo)
|
|
534
|
+
console.log('1=====setSelectNodeInfo=====', selectNodeInfo)
|
|
535
|
+
} else {
|
|
536
|
+
showTip = true
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
} else {
|
|
541
|
+
showTip = true
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
this.showTip(showTip)
|
|
545
|
+
},
|
|
546
|
+
showTip(showTip) {
|
|
547
|
+
// 是否需要显示提示框,默认不显示
|
|
548
|
+
if (showTip) {
|
|
549
|
+
this.$alert(this.$t('imatrixUIMessage.pleaseSelectPersonnel'), this.$t('imatrixUIMessage.tips'), {
|
|
550
|
+
confirmButtonText: this.$t('imatrixUIPublicModel.sure')
|
|
551
|
+
})
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
selectWorkgroupUser() {
|
|
555
|
+
if (this.multiple) {
|
|
556
|
+
this.multipleSetValue()
|
|
557
|
+
} else {
|
|
558
|
+
this.singleSetValue()
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
// 是否选中了公司节点
|
|
562
|
+
isSelectTenantNode(dataId) {
|
|
563
|
+
return dataId === this.tenantNodeId && (!this.branchInfo || this.branchInfo.length === 0)
|
|
564
|
+
},
|
|
565
|
+
// 将选中的部门节点添加到结果集合中
|
|
566
|
+
addSelectedUserInfo(result, user) {
|
|
567
|
+
const filterResult = result.userIds.filter(this.filterUserId(user))
|
|
568
|
+
if (filterResult.length === 0) {
|
|
569
|
+
let name = user.name
|
|
570
|
+
if (user.enName && user.enName !== '') {
|
|
571
|
+
name = name + '(' + user.enName + ')'
|
|
572
|
+
}
|
|
573
|
+
// if (this.containBranch && user.subCompanyName) {
|
|
574
|
+
// // 如果包含分支机构,则拼接分支机构名称
|
|
575
|
+
// name = name + '(' + user.subCompanyName + ')'
|
|
576
|
+
// }
|
|
577
|
+
user.tenantCode = this.tenantInfo.code
|
|
578
|
+
user.tenantName = this.tenantInfo.tenantName
|
|
579
|
+
result.containBranch = this.containBranch
|
|
580
|
+
result.users.push(user)
|
|
581
|
+
result.userIds.push(user.id)
|
|
582
|
+
result.loginNames.push(user.loginName)
|
|
583
|
+
result.userNames.push(name)
|
|
584
|
+
result.emails.push(user.email)
|
|
585
|
+
result.telephones.push(user.telephone)
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
filterUserId(queryWorkgroup) {
|
|
589
|
+
return (workgroupNodeId) => {
|
|
590
|
+
return workgroupNodeId === queryWorkgroup.id
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
filterUserNode(queryUser) {
|
|
594
|
+
return (userNodeId) => {
|
|
595
|
+
// 用户节点的id的分隔符,USER~departmentId~userId
|
|
596
|
+
const nodeIdSeparator = '~'
|
|
597
|
+
const userId = userNodeId.substring(userNodeId.lastIndexOf(nodeIdSeparator) + 1)
|
|
598
|
+
return userId === queryUser.id + ''
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
// 给节点添加自定义图标
|
|
602
|
+
// renderContent(h, {node, data, store}) {
|
|
603
|
+
// var className
|
|
604
|
+
// if (node.data.id === -1) {
|
|
605
|
+
// // node.id ===-1表示公司节点,node.branch表示是分支机构节点
|
|
606
|
+
// className = 'Menu'
|
|
607
|
+
// } else {
|
|
608
|
+
// // 表示是工作组节点
|
|
609
|
+
// className = 'Date'
|
|
610
|
+
// }
|
|
611
|
+
// if (
|
|
612
|
+
// data.nodeType &&
|
|
613
|
+
// data.nodeType === 'USER' &&
|
|
614
|
+
// this.searchValue &&
|
|
615
|
+
// this.filterUserVal(data, this.searchValue)
|
|
616
|
+
// ) {
|
|
617
|
+
// // 如果是查询条件
|
|
618
|
+
// return h(
|
|
619
|
+
// 'span',
|
|
620
|
+
// h('el-icon', h(className)),
|
|
621
|
+
// h('span', {class: searchResult, title: node.label}, node.label)
|
|
622
|
+
// )
|
|
623
|
+
// // return `<span>
|
|
624
|
+
// // <i class={className}></i>
|
|
625
|
+
// // <span class="searchResult" title={node.label}>
|
|
626
|
+
// // {node.label}
|
|
627
|
+
// // </span>
|
|
628
|
+
// // </span>`
|
|
629
|
+
// }
|
|
630
|
+
// return h(
|
|
631
|
+
// 'span',
|
|
632
|
+
// h('el-icon', h(className)),
|
|
633
|
+
// h('span', {title: node.label}, node.label)
|
|
634
|
+
// )
|
|
635
|
+
// // return `<span>
|
|
636
|
+
// // <i class={className}></i>
|
|
637
|
+
// // <span title={node.label}>{node.label}</span>
|
|
638
|
+
// // </span>`
|
|
639
|
+
// },
|
|
640
|
+
},
|
|
641
|
+
emits: ['result']
|
|
681
642
|
}
|
|
682
643
|
</script>
|
|
683
644
|
|
|
684
645
|
<style>
|
|
685
646
|
.searchResult {
|
|
686
|
-
|
|
647
|
+
color: red;
|
|
687
648
|
}
|
|
688
649
|
|
|
689
650
|
.inline-input-custom {
|
|
690
|
-
|
|
651
|
+
width: 90%;
|
|
691
652
|
}
|
|
692
653
|
</style>
|