three-trees-ui 1.0.12 → 1.0.14
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/three-trees-ui.common.js +468 -1011
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +468 -1011
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/CustomDialog/src/customDialog.vue +165 -454
- package/packages/CustomDialog/src/customMobileDialog.vue +155 -456
- package/packages/CustomDialog/src/main.vue +8 -147
- package/packages/DimensionSelector/src/main.vue +0 -2
- package/packages/Tree/src/main.vue +2 -7
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:before-close="dialogCancel"
|
|
8
8
|
append-to-body
|
|
9
9
|
top="6vh"
|
|
10
|
-
width="
|
|
10
|
+
width="60%"
|
|
11
11
|
@opened="afterOpen"
|
|
12
12
|
>
|
|
13
13
|
<el-container :style="style" style="overflow: auto">
|
|
@@ -39,32 +39,27 @@
|
|
|
39
39
|
direction="vertical"
|
|
40
40
|
></el-divider>
|
|
41
41
|
<el-container>
|
|
42
|
-
<!-- 查询条件 -->
|
|
43
42
|
<el-header v-if="querysShow" class="middle-header">
|
|
44
43
|
<div
|
|
45
44
|
v-for="(condition, index) in conditionBind"
|
|
46
45
|
:key="index"
|
|
47
46
|
class="search-item"
|
|
48
47
|
>
|
|
49
|
-
<p
|
|
50
|
-
|
|
51
|
-
<div
|
|
52
|
-
v-if="condition.controllerType == '1'"
|
|
53
|
-
class="search-item_main"
|
|
54
|
-
>
|
|
48
|
+
<p style="font-size: 14px">{{ condition.comment }}:</p>
|
|
49
|
+
<div v-if="condition.controllerType == '1'">
|
|
55
50
|
<el-input
|
|
56
51
|
v-model="queryParams[index][condition.field]"
|
|
57
52
|
size="small"
|
|
53
|
+
style="width: 180px; padding: 10px 0; margin: 0 5px 0 5px"
|
|
58
54
|
clearable
|
|
59
55
|
:placeholder="placeholders[index]"
|
|
60
56
|
prefix-icon="el-icon-search"
|
|
61
57
|
@keyup.enter.native="searchEnterFun"
|
|
62
58
|
></el-input>
|
|
63
59
|
</div>
|
|
64
|
-
<!-- 单选按钮 -->
|
|
65
60
|
<div
|
|
66
61
|
v-if="condition.controllerType == '2'"
|
|
67
|
-
|
|
62
|
+
style="margin-right: 10px"
|
|
68
63
|
>
|
|
69
64
|
<el-radio
|
|
70
65
|
v-for="(itemR, $index1) in condition.config.options"
|
|
@@ -75,31 +70,38 @@
|
|
|
75
70
|
{{ itemR.value }}
|
|
76
71
|
</el-radio>
|
|
77
72
|
</div>
|
|
78
|
-
<!-- 下拉框 -->
|
|
79
73
|
<div
|
|
80
|
-
class="search-item_main"
|
|
81
74
|
v-if="condition.controllerType == '3'"
|
|
75
|
+
style="margin-right: 10px"
|
|
82
76
|
>
|
|
83
|
-
<!-- 静态选项 -->
|
|
84
77
|
<ht-select
|
|
85
78
|
v-if="condition.config.choiceType == 'static'"
|
|
86
79
|
v-model="queryParams[index][condition.field]"
|
|
87
80
|
:placeholder="quickSearch"
|
|
88
|
-
:multiple="condition.config.multiple"
|
|
89
81
|
:options="condition.config.options"
|
|
90
82
|
></ht-select>
|
|
91
|
-
|
|
92
|
-
<ht-dictionary
|
|
83
|
+
<eip-select-dia
|
|
93
84
|
v-else
|
|
94
|
-
v-model="queryParams[
|
|
95
|
-
:
|
|
96
|
-
:
|
|
97
|
-
|
|
85
|
+
v-model="queryParams[condition.field]"
|
|
86
|
+
:placeholder="quickSearch"
|
|
87
|
+
:ganged="{
|
|
88
|
+
alias: condition.config.customQuery.alias,
|
|
89
|
+
valueBind: condition.config.customQuery.valueBind,
|
|
90
|
+
noInit: '',
|
|
91
|
+
labelBind: condition.config.customQuery.labelBind,
|
|
92
|
+
gangedBind: '{}',
|
|
93
|
+
bind: condition.config.bind,
|
|
94
|
+
}"
|
|
95
|
+
:multiple="false"
|
|
96
|
+
:filterable="false"
|
|
97
|
+
:allow-create="false"
|
|
98
|
+
:selectlist="[]"
|
|
99
|
+
:query-params="queryParams"
|
|
100
|
+
></eip-select-dia>
|
|
98
101
|
</div>
|
|
99
|
-
<!-- 标签 -->
|
|
100
102
|
<div
|
|
101
103
|
v-if="condition.controllerType == '4'"
|
|
102
|
-
|
|
104
|
+
style="margin-right: 10px"
|
|
103
105
|
>
|
|
104
106
|
<eip-tag
|
|
105
107
|
v-model="queryParams[index][condition.field]"
|
|
@@ -109,124 +111,6 @@
|
|
|
109
111
|
:expand="condition.config.expand"
|
|
110
112
|
></eip-tag>
|
|
111
113
|
</div>
|
|
112
|
-
<!-- 日期 -->
|
|
113
|
-
<div
|
|
114
|
-
v-if="condition.controllerType == '6'"
|
|
115
|
-
class="search-item_main"
|
|
116
|
-
>
|
|
117
|
-
<!-- 根据日期的条件类型来判断展示单个日期还是日期范围 -->
|
|
118
|
-
<div
|
|
119
|
-
v-if="condition.condition == 'BETWEEN'"
|
|
120
|
-
class="search-item_date"
|
|
121
|
-
>
|
|
122
|
-
<ht-date
|
|
123
|
-
v-model="queryParams[index].startDate"
|
|
124
|
-
:format="condition.config.inputFormat"
|
|
125
|
-
:valueFormat="condition.config.inputFormat"
|
|
126
|
-
></ht-date>
|
|
127
|
-
至
|
|
128
|
-
<ht-date
|
|
129
|
-
v-model="queryParams[index].endDate"
|
|
130
|
-
:format="condition.config.inputFormat"
|
|
131
|
-
:valueFormat="condition.config.inputFormat"
|
|
132
|
-
></ht-date>
|
|
133
|
-
</div>
|
|
134
|
-
<ht-date
|
|
135
|
-
v-model="queryParams[index][condition.field]"
|
|
136
|
-
v-else
|
|
137
|
-
:format="condition.config.inputFormat"
|
|
138
|
-
:valueFormat="condition.config.inputFormat"
|
|
139
|
-
></ht-date>
|
|
140
|
-
</div>
|
|
141
|
-
<!-- 选择器 -->
|
|
142
|
-
<div
|
|
143
|
-
v-if="condition.controllerType == '7'"
|
|
144
|
-
class="search-item_main"
|
|
145
|
-
>
|
|
146
|
-
<ht-user-selector-input
|
|
147
|
-
v-model="queryParams[index].selectName"
|
|
148
|
-
v-if="condition.config.alias == 'user'"
|
|
149
|
-
append-to-body
|
|
150
|
-
@change="
|
|
151
|
-
(data) => {
|
|
152
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
153
|
-
}
|
|
154
|
-
"
|
|
155
|
-
></ht-user-selector-input>
|
|
156
|
-
<ht-org-selector-input
|
|
157
|
-
v-model="queryParams[index].selectName"
|
|
158
|
-
v-if="condition.config.alias == 'org'"
|
|
159
|
-
append-to-body
|
|
160
|
-
@change="
|
|
161
|
-
(data) => {
|
|
162
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
163
|
-
}
|
|
164
|
-
"
|
|
165
|
-
></ht-org-selector-input>
|
|
166
|
-
<ht-role-selector-input
|
|
167
|
-
v-model="queryParams[index].selectName"
|
|
168
|
-
v-if="condition.config.alias == 'role'"
|
|
169
|
-
append-to-body
|
|
170
|
-
@change="
|
|
171
|
-
(data) => {
|
|
172
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
173
|
-
}
|
|
174
|
-
"
|
|
175
|
-
></ht-role-selector-input>
|
|
176
|
-
<ht-job-selector-input
|
|
177
|
-
v-model="queryParams[index].selectName"
|
|
178
|
-
v-if="condition.config.alias == 'job'"
|
|
179
|
-
append-to-body
|
|
180
|
-
@change="
|
|
181
|
-
(data) => {
|
|
182
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
183
|
-
}
|
|
184
|
-
"
|
|
185
|
-
></ht-job-selector-input>
|
|
186
|
-
<ht-post-selector-input
|
|
187
|
-
v-model="queryParams[index].selectName"
|
|
188
|
-
v-if="condition.config.alias == 'post'"
|
|
189
|
-
append-to-body
|
|
190
|
-
@change="
|
|
191
|
-
(data) => {
|
|
192
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
193
|
-
}
|
|
194
|
-
"
|
|
195
|
-
></ht-post-selector-input>
|
|
196
|
-
<ht-dimension-selector-input
|
|
197
|
-
v-model="queryParams[index].selectName"
|
|
198
|
-
v-if="condition.config.alias == 'dimension'"
|
|
199
|
-
append-to-body
|
|
200
|
-
@change="
|
|
201
|
-
(data) => {
|
|
202
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
203
|
-
}
|
|
204
|
-
"
|
|
205
|
-
></ht-dimension-selector-input>
|
|
206
|
-
</div>
|
|
207
|
-
<!-- 对话框 -->
|
|
208
|
-
<div
|
|
209
|
-
v-if="condition.controllerType == '5'"
|
|
210
|
-
class="search-item_main"
|
|
211
|
-
>
|
|
212
|
-
<ht-custom-dialog
|
|
213
|
-
v-model="queryParams[index][condition.field]"
|
|
214
|
-
:model-name="condition.config.keyBind"
|
|
215
|
-
dialogType="search"
|
|
216
|
-
:custdialog="{
|
|
217
|
-
name: '请选择',
|
|
218
|
-
icon: '',
|
|
219
|
-
custDialog: {
|
|
220
|
-
selectNum: 1,
|
|
221
|
-
conditions: [],
|
|
222
|
-
mappingConf: [],
|
|
223
|
-
custQueryJson: [],
|
|
224
|
-
alias: condition.config.alias,
|
|
225
|
-
type: 'custDialog',
|
|
226
|
-
},
|
|
227
|
-
}"
|
|
228
|
-
></ht-custom-dialog>
|
|
229
|
-
</div>
|
|
230
114
|
</div>
|
|
231
115
|
<div
|
|
232
116
|
v-if="conditionBind && conditionBind.length > 0"
|
|
@@ -290,11 +174,12 @@
|
|
|
290
174
|
label="序号"
|
|
291
175
|
></el-table-column>
|
|
292
176
|
<el-table-column
|
|
293
|
-
v-for="field in
|
|
177
|
+
v-for="field in displayfield"
|
|
294
178
|
:key="field.field"
|
|
179
|
+
:show-overflow-tooltip="true"
|
|
295
180
|
:prop="field.field"
|
|
296
181
|
:label="field.comment"
|
|
297
|
-
|
|
182
|
+
style="width: 100%"
|
|
298
183
|
></el-table-column>
|
|
299
184
|
</el-table>
|
|
300
185
|
</el-main>
|
|
@@ -443,13 +328,9 @@
|
|
|
443
328
|
type: Boolean,
|
|
444
329
|
default: false,
|
|
445
330
|
},
|
|
446
|
-
dialogConfig: Object,
|
|
447
|
-
dialogType: String,
|
|
448
331
|
},
|
|
449
332
|
data() {
|
|
450
333
|
return {
|
|
451
|
-
startDate: '', // 日期控件
|
|
452
|
-
endDate: '', // 日期控件
|
|
453
334
|
tableHeight: 350,
|
|
454
335
|
isEditInputShow: false,
|
|
455
336
|
customValue: '',
|
|
@@ -521,24 +402,6 @@
|
|
|
521
402
|
}
|
|
522
403
|
return []
|
|
523
404
|
},
|
|
524
|
-
jumpParamKey() {
|
|
525
|
-
return this.dialogConfig && this.dialogConfig.jumpParamKey
|
|
526
|
-
? this.dialogConfig.jumpParamKey
|
|
527
|
-
: ''
|
|
528
|
-
},
|
|
529
|
-
// 是否保存成跳转url参数
|
|
530
|
-
isHaveJumpUrl() {
|
|
531
|
-
return (
|
|
532
|
-
this.dialogConfig &&
|
|
533
|
-
((this.isMobile && this.dialogConfig.mobileUrl) ||
|
|
534
|
-
(!this.isMobile && this.dialogConfig.pcUrl))
|
|
535
|
-
)
|
|
536
|
-
},
|
|
537
|
-
sortDisplayfield() {
|
|
538
|
-
return this.displayfield.sort((a, b) => {
|
|
539
|
-
return a.sort > b.sort ? 1 : -1
|
|
540
|
-
})
|
|
541
|
-
},
|
|
542
405
|
},
|
|
543
406
|
watch: {
|
|
544
407
|
dialogData: {
|
|
@@ -575,156 +438,143 @@
|
|
|
575
438
|
})
|
|
576
439
|
},
|
|
577
440
|
methods: {
|
|
578
|
-
// 获取已选择的选择器数据id
|
|
579
|
-
getSelectId(data) {
|
|
580
|
-
if (!data || !data.length) {
|
|
581
|
-
return ''
|
|
582
|
-
}
|
|
583
|
-
let ids = []
|
|
584
|
-
data.forEach((item) => {
|
|
585
|
-
ids.push(item.id)
|
|
586
|
-
})
|
|
587
|
-
return ids.join(',')
|
|
588
|
-
},
|
|
589
441
|
showDialog(isMounted = false) {
|
|
442
|
+
const this_ = this
|
|
590
443
|
this.fixedParams = {}
|
|
591
|
-
// 如果已存在配置信息就不去请求配置信息 直接初始化数据
|
|
592
|
-
if (this.dialogConfig) {
|
|
593
|
-
this.initDialog(this.dialogConfig, isMounted)
|
|
594
|
-
return
|
|
595
|
-
}
|
|
596
444
|
var alias = this.custdialog.custDialog.alias
|
|
597
445
|
this.$requestConfig
|
|
598
446
|
.getCustomDialogByAlias(alias)
|
|
599
447
|
.then((customDialog) => {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
initDialog(customDialog, isMounted) {
|
|
604
|
-
let alias = this.custdialog.custDialog.alias
|
|
605
|
-
const this_ = this
|
|
606
|
-
if (!customDialog || !customDialog.alias) {
|
|
607
|
-
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
608
|
-
return
|
|
609
|
-
}
|
|
610
|
-
if (customDialog.style == 1) {
|
|
611
|
-
var displaylist = JSON.parse(customDialog.displayfield)
|
|
612
|
-
this_.nodeKey = displaylist.id
|
|
613
|
-
}
|
|
614
|
-
if (customDialog.needPage && customDialog.requestType === 'POST') {
|
|
615
|
-
let obj = {}
|
|
616
|
-
this.getLastKeyByPath(obj, customDialog.pageKey, 1)
|
|
617
|
-
this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
|
|
618
|
-
this.getLastKeyByPath(obj, customDialog.totalKey, true)
|
|
619
|
-
const exp = utils.parseExp(customDialog.dataParam, obj, true)
|
|
620
|
-
if (exp) {
|
|
621
|
-
const params = JSON.parse(exp)
|
|
622
|
-
if (params.pageBean) {
|
|
623
|
-
this.pagination = {
|
|
624
|
-
...params.pageBean,
|
|
625
|
-
}
|
|
448
|
+
if (!customDialog || !customDialog.alias) {
|
|
449
|
+
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
450
|
+
return
|
|
626
451
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
if (bindList.length > 0) {
|
|
633
|
-
bindList.forEach((ele) => {
|
|
634
|
-
//绑定表单字段
|
|
635
|
-
if (
|
|
636
|
-
ele.bind &&
|
|
637
|
-
(ele.defaultType == '3' || ele.bind.startsWith('data.searchForm'))
|
|
638
|
-
) {
|
|
452
|
+
if (customDialog.style == 1) {
|
|
453
|
+
var displaylist = JSON.parse(customDialog.displayfield)
|
|
454
|
+
this_.nodeKey = displaylist.id
|
|
455
|
+
}
|
|
456
|
+
if (customDialog.needPage && customDialog.requestType === 'POST') {
|
|
639
457
|
let obj = {}
|
|
640
|
-
obj.
|
|
641
|
-
obj.
|
|
642
|
-
obj.
|
|
643
|
-
|
|
458
|
+
this.getLastKeyByPath(obj, customDialog.pageKey, 1)
|
|
459
|
+
this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
|
|
460
|
+
this.getLastKeyByPath(obj, customDialog.totalKey, true)
|
|
461
|
+
const exp = utils.parseExp(customDialog.dataParam, obj, true)
|
|
462
|
+
if (exp) {
|
|
463
|
+
const params = JSON.parse(exp)
|
|
464
|
+
if (params.pageBean) {
|
|
465
|
+
this.pagination = {
|
|
466
|
+
...params.pageBean,
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
644
470
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
471
|
+
//对话框按表单字段查询(参数传入的)
|
|
472
|
+
let bindList = this_.custdialog.custDialog.conditions
|
|
473
|
+
this_.param = [] //绑定的表单字段
|
|
474
|
+
if (bindList.length > 0) {
|
|
475
|
+
bindList.forEach((ele) => {
|
|
476
|
+
//绑定表单字段
|
|
477
|
+
if (
|
|
478
|
+
ele.bind &&
|
|
479
|
+
(ele.defaultType == '3' ||
|
|
480
|
+
ele.bind.startsWith('data.searchForm'))
|
|
481
|
+
) {
|
|
482
|
+
let obj = {}
|
|
483
|
+
obj.field = ele.field
|
|
484
|
+
obj.bind = ele.bind
|
|
485
|
+
obj.bindType = ele.bindType
|
|
486
|
+
this_.param.push(obj)
|
|
487
|
+
}
|
|
488
|
+
//取值对象为脚本时获取value
|
|
489
|
+
if (ele.bindType === 3) {
|
|
490
|
+
this_.$requestConfig.executeScript(ele.bind).then((res) => {
|
|
491
|
+
this_.executeScriptResult = res && res.value
|
|
492
|
+
})
|
|
493
|
+
}
|
|
649
494
|
})
|
|
650
495
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
496
|
+
//判断对话框查询是否有条件
|
|
497
|
+
let userInputList = JSON.parse(customDialog.conditionfield)
|
|
498
|
+
this_.quickSearch = '' //填写提示 placeholder
|
|
499
|
+
this_.conditionBind = []
|
|
500
|
+
let queryParams = []
|
|
501
|
+
let placeholders = []
|
|
502
|
+
if (userInputList.length > 0) {
|
|
503
|
+
userInputList.forEach((ele) => {
|
|
504
|
+
var obj = {}
|
|
505
|
+
//条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
|
|
506
|
+
if (ele.defaultType == '1') {
|
|
507
|
+
obj[ele.field] = ''
|
|
508
|
+
queryParams.push(obj)
|
|
509
|
+
// queryParams[ele.field] = "";
|
|
510
|
+
this_.conditionBind.push(ele)
|
|
511
|
+
placeholders.push('请输入' + ele.comment)
|
|
512
|
+
}
|
|
513
|
+
if (ele.defaultType == '2' && ele.defaultValue) {
|
|
514
|
+
this_.fixedParams[ele.field] = ele.defaultValue
|
|
515
|
+
}
|
|
516
|
+
})
|
|
517
|
+
this.$set(this, 'queryParams', queryParams)
|
|
518
|
+
this.$set(this, 'placeholders', placeholders)
|
|
669
519
|
}
|
|
670
|
-
|
|
671
|
-
|
|
520
|
+
//判断是否显示条件查询输入框
|
|
521
|
+
if (this_.quickSearch != '') {
|
|
522
|
+
this_.querysShow = true
|
|
523
|
+
} else {
|
|
524
|
+
this_.querysShow = true
|
|
672
525
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
526
|
+
this_.quickSearch = '请输入' + this.quickSearch + '查询'
|
|
527
|
+
this_.style = 'height:' + customDialog.height + 'px'
|
|
528
|
+
if (window.screen.height && window.screen.height <= 900) {
|
|
529
|
+
this.style = 'height:440px'
|
|
530
|
+
}
|
|
531
|
+
if (customDialog.style == 0 || customDialog.style == 2) {
|
|
532
|
+
//列表
|
|
533
|
+
setTimeout(() => {
|
|
534
|
+
this_.customDialogShow(
|
|
535
|
+
{
|
|
536
|
+
alias: alias,
|
|
537
|
+
customDialog: customDialog,
|
|
538
|
+
},
|
|
539
|
+
isMounted
|
|
540
|
+
)
|
|
541
|
+
}, 100)
|
|
542
|
+
} else if (customDialog.style == 1) {
|
|
543
|
+
//树形
|
|
544
|
+
this_.pageParam = { alias: alias, customDialog: customDialog }
|
|
545
|
+
this_.customDialog = customDialog
|
|
546
|
+
let param = {}
|
|
547
|
+
this_.conditionfieldTree = []
|
|
548
|
+
//判断是否存在条件
|
|
549
|
+
if (customDialog.conditionfield) {
|
|
550
|
+
this_.conditionfieldTree = JSON.parse(
|
|
551
|
+
customDialog.conditionfield
|
|
552
|
+
)
|
|
553
|
+
if (this_.conditionfieldTree.length > 0) {
|
|
554
|
+
for (
|
|
555
|
+
let i = this_.conditionfieldTree.length - 1;
|
|
556
|
+
i >= 0;
|
|
557
|
+
i--
|
|
558
|
+
) {
|
|
559
|
+
//判断条件字段是否是动态传入(defaultType:4:动态传入,2:固定值 )
|
|
560
|
+
if (this_.conditionfieldTree[i].defaultType == '4') {
|
|
561
|
+
param[this_.conditionfieldTree[i].field] =
|
|
562
|
+
this_.conditionfieldTree[i].comment
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
//有动态传入的字段
|
|
568
|
+
if (!isMounted) {
|
|
569
|
+
if (JSON.stringify(param) != '{}') {
|
|
570
|
+
this_.dialogVisible = true
|
|
571
|
+
} else {
|
|
572
|
+
//无动态传入的字段
|
|
573
|
+
this_.customDialogTreeShow(this_.pageParam)
|
|
714
574
|
}
|
|
715
575
|
}
|
|
716
576
|
}
|
|
717
|
-
}
|
|
718
|
-
//有动态传入的字段
|
|
719
|
-
if (!isMounted) {
|
|
720
|
-
if (JSON.stringify(param) != '{}') {
|
|
721
|
-
this_.dialogVisible = true
|
|
722
|
-
} else {
|
|
723
|
-
//无动态传入的字段
|
|
724
|
-
this_.customDialogTreeShow(this_.pageParam)
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
}
|
|
577
|
+
})
|
|
728
578
|
},
|
|
729
579
|
initTableHeight() {
|
|
730
580
|
this.$nextTick(() => {
|
|
@@ -874,22 +724,13 @@
|
|
|
874
724
|
}
|
|
875
725
|
// 添加用户id 岗位id 组织id
|
|
876
726
|
try {
|
|
877
|
-
if (
|
|
878
|
-
this.$requestConfig.getUserId &&
|
|
879
|
-
this.$requestConfig.getUserId()
|
|
880
|
-
) {
|
|
727
|
+
if (this.$requestConfig.getUserId()) {
|
|
881
728
|
ctx.userId = this.$requestConfig.getUserId()
|
|
882
729
|
}
|
|
883
|
-
if (
|
|
884
|
-
this.$requestConfig.getOrgId &&
|
|
885
|
-
this.$requestConfig.getOrgId()
|
|
886
|
-
) {
|
|
730
|
+
if (this.$requestConfig.getOrgId()) {
|
|
887
731
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
888
732
|
}
|
|
889
|
-
if (
|
|
890
|
-
this.$requestConfig.getPostId &&
|
|
891
|
-
this.$requestConfig.getPostId()
|
|
892
|
-
) {
|
|
733
|
+
if (this.$requestConfig.getPostId()) {
|
|
893
734
|
ctx.postId = this.$requestConfig.getPostId()
|
|
894
735
|
}
|
|
895
736
|
} catch (e) {
|
|
@@ -986,21 +827,8 @@
|
|
|
986
827
|
this.selectOrgs = this.convertComment2Field(str, field)
|
|
987
828
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
988
829
|
var val = ''
|
|
989
|
-
str.forEach((item
|
|
990
|
-
|
|
991
|
-
if (
|
|
992
|
-
this.jumpParamKey &&
|
|
993
|
-
this.isHaveJumpUrl &&
|
|
994
|
-
(this.modelName == 'data.' + con['target'][0] ||
|
|
995
|
-
(this.modelName.includes('item.') &&
|
|
996
|
-
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
997
|
-
) {
|
|
998
|
-
val += `${item[con.from]}¯${this.jumpParamKey}:${
|
|
999
|
-
this.selectOrgs[index][this.jumpParamKey]
|
|
1000
|
-
},`
|
|
1001
|
-
} else {
|
|
1002
|
-
val += item[con.from] + ','
|
|
1003
|
-
}
|
|
830
|
+
str.forEach((item) => {
|
|
831
|
+
val += item[con.from] + ','
|
|
1004
832
|
})
|
|
1005
833
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
1006
834
|
utils.setValueByPath(
|
|
@@ -1085,46 +913,19 @@
|
|
|
1085
913
|
pageBean.pageBean = { page: 1, pageSize: 10, showTotal: true }
|
|
1086
914
|
}
|
|
1087
915
|
//用户输入的
|
|
1088
|
-
let flag = false
|
|
1089
916
|
if (this.queryParams.length != 0 && this.queryParams[0] != '') {
|
|
1090
917
|
this.conditionBind.forEach((item, index) => {
|
|
1091
|
-
// 日期范围特殊处理
|
|
1092
|
-
if (item.dbType == 'date' && item.condition == 'BETWEEN') {
|
|
1093
|
-
if (
|
|
1094
|
-
(this.queryParams[index].startDate &&
|
|
1095
|
-
!this.queryParams[index].endDate) ||
|
|
1096
|
-
(!this.queryParams[index].startDate &&
|
|
1097
|
-
this.queryParams[index].endDate)
|
|
1098
|
-
) {
|
|
1099
|
-
flag = true
|
|
1100
|
-
this.$message.info('日期范围未填写完整!')
|
|
1101
|
-
return
|
|
1102
|
-
}
|
|
1103
|
-
if (
|
|
1104
|
-
this.queryParams[index].startDate &&
|
|
1105
|
-
this.queryParams[index].endDate
|
|
1106
|
-
) {
|
|
1107
|
-
this.queryParams[index][
|
|
1108
|
-
item.field
|
|
1109
|
-
] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
|
|
1110
|
-
} else {
|
|
1111
|
-
this.queryParams[index][item.field] = ''
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
918
|
if (this.queryParams[index][item.field]) {
|
|
1115
919
|
querys.push({
|
|
1116
920
|
property: item.field,
|
|
1117
921
|
value: this.queryParams[index][item.field],
|
|
1118
922
|
group: 'main',
|
|
1119
|
-
operation:
|
|
923
|
+
operation: 'LIKE',
|
|
1120
924
|
relation: 'AND',
|
|
1121
925
|
})
|
|
1122
926
|
}
|
|
1123
927
|
})
|
|
1124
928
|
}
|
|
1125
|
-
if (flag) {
|
|
1126
|
-
return
|
|
1127
|
-
}
|
|
1128
929
|
//参数传入的查询拼接
|
|
1129
930
|
if (this.param) {
|
|
1130
931
|
this.param.forEach((item) => {
|
|
@@ -1190,22 +991,13 @@
|
|
|
1190
991
|
queryParamMap.total = pageBean.pageBean.total
|
|
1191
992
|
// 添加用户id 岗位id 组织id
|
|
1192
993
|
try {
|
|
1193
|
-
if (
|
|
1194
|
-
this.$requestConfig.getUserId &&
|
|
1195
|
-
this.$requestConfig.getUserId()
|
|
1196
|
-
) {
|
|
994
|
+
if (this.$requestConfig.getUserId()) {
|
|
1197
995
|
ctx.userId = this.$requestConfig.getUserId()
|
|
1198
996
|
}
|
|
1199
|
-
if (
|
|
1200
|
-
this.$requestConfig.getOrgId &&
|
|
1201
|
-
this.$requestConfig.getOrgId()
|
|
1202
|
-
) {
|
|
997
|
+
if (this.$requestConfig.getOrgId()) {
|
|
1203
998
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
1204
999
|
}
|
|
1205
|
-
if (
|
|
1206
|
-
this.$requestConfig.getPostId &&
|
|
1207
|
-
this.$requestConfig.getPostId()
|
|
1208
|
-
) {
|
|
1000
|
+
if (this.$requestConfig.getPostId()) {
|
|
1209
1001
|
ctx.postId = this.$requestConfig.getPostId()
|
|
1210
1002
|
}
|
|
1211
1003
|
} catch (e) {
|
|
@@ -1230,14 +1022,12 @@
|
|
|
1230
1022
|
value: queryParamMap[bindKey] || ctx[bindKey] || '',
|
|
1231
1023
|
}
|
|
1232
1024
|
})
|
|
1233
|
-
param.querys = queryList
|
|
1025
|
+
param.querys = queryList
|
|
1234
1026
|
if (this.customDialog.needPage) {
|
|
1235
1027
|
param.pageBean = obj
|
|
1236
1028
|
} else {
|
|
1237
1029
|
param.pageBean.pageSize = -1
|
|
1238
1030
|
}
|
|
1239
|
-
// 日期格式的 改成数组
|
|
1240
|
-
// this.changeDateFormat(param)
|
|
1241
1031
|
//构造请求的参数
|
|
1242
1032
|
let requestParam = {
|
|
1243
1033
|
pageBean: param,
|
|
@@ -1277,21 +1067,6 @@
|
|
|
1277
1067
|
}
|
|
1278
1068
|
this.tableRadioVal = ''
|
|
1279
1069
|
},
|
|
1280
|
-
changeDateFormat(param) {
|
|
1281
|
-
let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
|
|
1282
|
-
let dateValidate2 = /^([1-2][0-9][0-9][0-9]-[0-1]{0,1}[0-9]-[0-3]{0,1}[0-9])\s(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
|
|
1283
|
-
Object.keys(param).forEach((key) => {
|
|
1284
|
-
if (
|
|
1285
|
-
param[key] &&
|
|
1286
|
-
typeof param[key] == 'string' &&
|
|
1287
|
-
param[key].includes(',') &&
|
|
1288
|
-
(dateValidate1.test(param[key].split(',')[0]) ||
|
|
1289
|
-
dateValidate2.test(param[key].split(',')[0]))
|
|
1290
|
-
) {
|
|
1291
|
-
param[key] = param[key].split(',')
|
|
1292
|
-
}
|
|
1293
|
-
})
|
|
1294
|
-
},
|
|
1295
1070
|
getSearchValueByKey() {
|
|
1296
1071
|
let queryParamsObj = {}
|
|
1297
1072
|
if (this.queryParams.length > 0) {
|
|
@@ -1546,8 +1321,6 @@
|
|
|
1546
1321
|
},
|
|
1547
1322
|
// 同步选择结果
|
|
1548
1323
|
syncInputValue() {
|
|
1549
|
-
// 对话框跳转url需要两个参数 1当前控件绑定的对象参数modelName 2对话框配置中配置的key名称
|
|
1550
|
-
// 同步值时,如果有绑定url跳转参数,值格式为 名称¯跳转key:跳转value
|
|
1551
1324
|
let thisIndex = null //当前数据所在下标
|
|
1552
1325
|
let parentIndex = null //父节点所在下标
|
|
1553
1326
|
if (this.$parent.$el) {
|
|
@@ -1635,39 +1408,13 @@
|
|
|
1635
1408
|
}
|
|
1636
1409
|
}
|
|
1637
1410
|
}
|
|
1638
|
-
// 如果是查询中使用的对话框
|
|
1639
|
-
if (this.dialogType == 'search') {
|
|
1640
|
-
let returnVal = []
|
|
1641
|
-
str.forEach((item) => {
|
|
1642
|
-
returnVal.push(decodeURIComponent(item[this.modelName]))
|
|
1643
|
-
})
|
|
1644
|
-
this.$emit('updateInput', returnVal.join(','))
|
|
1645
|
-
return
|
|
1646
|
-
}
|
|
1647
1411
|
const pInst = utils.getOnlineFormInstance(this)
|
|
1648
1412
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
1649
1413
|
var val = ''
|
|
1650
1414
|
var from = con.from.toLowerCase()
|
|
1651
1415
|
str.forEach((item) => {
|
|
1652
|
-
// 如果有绑定url跳转参数 需获取跳转参数的key
|
|
1653
1416
|
if (item) {
|
|
1654
|
-
|
|
1655
|
-
this.jumpParamKey &&
|
|
1656
|
-
this.isHaveJumpUrl &&
|
|
1657
|
-
(this.modelName == 'data.' + con['target'][0] ||
|
|
1658
|
-
(this.modelName.includes('item.') &&
|
|
1659
|
-
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
1660
|
-
) {
|
|
1661
|
-
// 需根据key 找到对应 返回数据的返回名称
|
|
1662
|
-
let returnMapKey = returnStr.find((k) => {
|
|
1663
|
-
return k.field == this.jumpParamKey
|
|
1664
|
-
}).comment
|
|
1665
|
-
val += `${decodeURIComponent(item[from])}¯${
|
|
1666
|
-
this.jumpParamKey
|
|
1667
|
-
}:${item[returnMapKey]},`
|
|
1668
|
-
} else {
|
|
1669
|
-
val += decodeURIComponent(item[from]) + ','
|
|
1670
|
-
}
|
|
1417
|
+
val += decodeURIComponent(item[from]) + ','
|
|
1671
1418
|
}
|
|
1672
1419
|
})
|
|
1673
1420
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
@@ -1708,6 +1455,7 @@
|
|
|
1708
1455
|
const _val = val.substring(0, val.length - 1)
|
|
1709
1456
|
if (path) {
|
|
1710
1457
|
if (this.modelName && this.modelName.endsWith(path)) {
|
|
1458
|
+
// this.$emit('input', _val)
|
|
1711
1459
|
this.$emit('updateInput', _val)
|
|
1712
1460
|
}
|
|
1713
1461
|
utils.setValueByPath(
|
|
@@ -2059,56 +1807,19 @@
|
|
|
2059
1807
|
margin-top: 10px;
|
|
2060
1808
|
}
|
|
2061
1809
|
|
|
2062
|
-
|
|
1810
|
+
.middle-header {
|
|
2063
1811
|
height: unset !important;
|
|
2064
1812
|
display: flex;
|
|
2065
1813
|
flex-direction: row;
|
|
2066
1814
|
flex-wrap: wrap;
|
|
2067
|
-
padding-top: 15px;
|
|
2068
1815
|
.search-item {
|
|
2069
1816
|
display: flex;
|
|
2070
1817
|
// width: 33.33%;
|
|
2071
|
-
margin-right:
|
|
1818
|
+
margin-right: 12px;
|
|
2072
1819
|
align-items: center;
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
margin: 0;
|
|
2077
|
-
padding: 0;
|
|
2078
|
-
width: 100px;
|
|
2079
|
-
overflow: hidden;
|
|
2080
|
-
white-space: nowrap;
|
|
2081
|
-
text-overflow: ellipsis;
|
|
2082
|
-
text-align: right;
|
|
2083
|
-
margin-right: 5px;
|
|
2084
|
-
font-size: 14px;
|
|
2085
|
-
}
|
|
2086
|
-
.search-item_main {
|
|
2087
|
-
flex: 1;
|
|
2088
|
-
overflow: hidden;
|
|
2089
|
-
.inputs.ht-form-inputs__inline {
|
|
2090
|
-
width: 100%;
|
|
2091
|
-
.inputs.ht-form-inputs__inline {
|
|
2092
|
-
width: 100%;
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
> .el-input {
|
|
2097
|
-
width: 100%;
|
|
2098
|
-
}
|
|
2099
|
-
.search-item_date {
|
|
2100
|
-
display: flex;
|
|
2101
|
-
align-items: center;
|
|
2102
|
-
width: 100%;
|
|
2103
|
-
.inputs.ht-form-inputs__inline {
|
|
2104
|
-
flex: 1;
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
.el-date-editor.el-input,
|
|
2108
|
-
.el-date-editor.el-input__inner {
|
|
2109
|
-
width: 100%;
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
1820
|
+
}
|
|
1821
|
+
.btn-wrap {
|
|
1822
|
+
line-height: 50px;
|
|
2112
1823
|
}
|
|
2113
1824
|
}
|
|
2114
1825
|
|