three-trees-ui 1.0.7 → 1.0.9
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 +920 -396
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +920 -396
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/CustomDialog/src/customDialog.vue +392 -153
- package/packages/CustomDialog/src/customMobileDialog.vue +448 -155
- package/packages/CustomDialog/src/main.vue +120 -5
- package/packages/DimensionSelector/src/main.vue +2 -0
- package/packages/Global/src/GlobalQuery.vue +10 -1
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
direction="vertical"
|
|
40
40
|
></el-divider>
|
|
41
41
|
<el-container>
|
|
42
|
+
<!-- 查询条件 -->
|
|
42
43
|
<el-header v-if="querysShow" class="middle-header">
|
|
43
44
|
<div
|
|
44
45
|
v-for="(condition, index) in conditionBind"
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
class="search-item"
|
|
47
48
|
>
|
|
48
49
|
<p style="font-size: 14px">{{ condition.comment }}:</p>
|
|
50
|
+
<!-- input输入框 -->
|
|
49
51
|
<div v-if="condition.controllerType == '1'">
|
|
50
52
|
<el-input
|
|
51
53
|
v-model="queryParams[index][condition.field]"
|
|
@@ -57,6 +59,7 @@
|
|
|
57
59
|
@keyup.enter.native="searchEnterFun"
|
|
58
60
|
></el-input>
|
|
59
61
|
</div>
|
|
62
|
+
<!-- 单选按钮 -->
|
|
60
63
|
<div
|
|
61
64
|
v-if="condition.controllerType == '2'"
|
|
62
65
|
style="margin-right: 10px"
|
|
@@ -70,35 +73,28 @@
|
|
|
70
73
|
{{ itemR.value }}
|
|
71
74
|
</el-radio>
|
|
72
75
|
</div>
|
|
76
|
+
<!-- 下拉框 -->
|
|
73
77
|
<div
|
|
74
78
|
v-if="condition.controllerType == '3'"
|
|
75
79
|
style="margin-right: 10px"
|
|
76
80
|
>
|
|
81
|
+
<!-- 静态选项 -->
|
|
77
82
|
<ht-select
|
|
78
83
|
v-if="condition.config.choiceType == 'static'"
|
|
79
84
|
v-model="queryParams[index][condition.field]"
|
|
80
85
|
:placeholder="quickSearch"
|
|
86
|
+
:multiple="condition.config.multiple"
|
|
81
87
|
:options="condition.config.options"
|
|
82
88
|
></ht-select>
|
|
83
|
-
|
|
89
|
+
<!-- 动态选项时展示数据字典 -->
|
|
90
|
+
<ht-dictionary
|
|
84
91
|
v-else
|
|
85
|
-
v-model="queryParams[condition.field]"
|
|
86
|
-
:
|
|
87
|
-
:
|
|
88
|
-
|
|
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>
|
|
92
|
+
v-model="queryParams[index][condition.field]"
|
|
93
|
+
:dickey="condition.config.dic"
|
|
94
|
+
:filterable="condition.config.filterable"
|
|
95
|
+
></ht-dictionary>
|
|
101
96
|
</div>
|
|
97
|
+
<!-- 标签 -->
|
|
102
98
|
<div
|
|
103
99
|
v-if="condition.controllerType == '4'"
|
|
104
100
|
style="margin-right: 10px"
|
|
@@ -111,6 +107,121 @@
|
|
|
111
107
|
:expand="condition.config.expand"
|
|
112
108
|
></eip-tag>
|
|
113
109
|
</div>
|
|
110
|
+
<!-- 日期 -->
|
|
111
|
+
<div
|
|
112
|
+
v-if="condition.controllerType == '6'"
|
|
113
|
+
style="margin-right: 10px"
|
|
114
|
+
>
|
|
115
|
+
<!-- 根据日期的条件类型来判断展示单个日期还是日期范围 -->
|
|
116
|
+
<div v-if="condition.condition == 'BETWEEN'">
|
|
117
|
+
<ht-date
|
|
118
|
+
v-model="queryParams[index].startDate"
|
|
119
|
+
:format="condition.config.inputFormat"
|
|
120
|
+
:valueFormat="condition.config.inputFormat"
|
|
121
|
+
></ht-date>
|
|
122
|
+
至
|
|
123
|
+
<ht-date
|
|
124
|
+
v-model="queryParams[index].endDate"
|
|
125
|
+
:format="condition.config.inputFormat"
|
|
126
|
+
:valueFormat="condition.config.inputFormat"
|
|
127
|
+
></ht-date>
|
|
128
|
+
</div>
|
|
129
|
+
<ht-date
|
|
130
|
+
v-model="queryParams[index][condition.field]"
|
|
131
|
+
v-else
|
|
132
|
+
:format="condition.config.inputFormat"
|
|
133
|
+
:valueFormat="condition.config.inputFormat"
|
|
134
|
+
></ht-date>
|
|
135
|
+
</div>
|
|
136
|
+
<!-- 选择器 -->
|
|
137
|
+
<div
|
|
138
|
+
v-if="condition.controllerType == '7'"
|
|
139
|
+
style="margin-right: 10px"
|
|
140
|
+
>
|
|
141
|
+
<ht-user-selector-input
|
|
142
|
+
v-model="queryParams[index].selectName"
|
|
143
|
+
v-if="condition.config.alias == 'user'"
|
|
144
|
+
append-to-body
|
|
145
|
+
@change="
|
|
146
|
+
(data) => {
|
|
147
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
148
|
+
}
|
|
149
|
+
"
|
|
150
|
+
></ht-user-selector-input>
|
|
151
|
+
<ht-org-selector-input
|
|
152
|
+
v-model="queryParams[index].selectName"
|
|
153
|
+
v-if="condition.config.alias == 'org'"
|
|
154
|
+
append-to-body
|
|
155
|
+
@change="
|
|
156
|
+
(data) => {
|
|
157
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
158
|
+
}
|
|
159
|
+
"
|
|
160
|
+
></ht-org-selector-input>
|
|
161
|
+
<ht-role-selector-input
|
|
162
|
+
v-model="queryParams[index].selectName"
|
|
163
|
+
v-if="condition.config.alias == 'role'"
|
|
164
|
+
append-to-body
|
|
165
|
+
@change="
|
|
166
|
+
(data) => {
|
|
167
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
168
|
+
}
|
|
169
|
+
"
|
|
170
|
+
></ht-role-selector-input>
|
|
171
|
+
<ht-job-selector-input
|
|
172
|
+
v-model="queryParams[index].selectName"
|
|
173
|
+
v-if="condition.config.alias == 'job'"
|
|
174
|
+
append-to-body
|
|
175
|
+
@change="
|
|
176
|
+
(data) => {
|
|
177
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
178
|
+
}
|
|
179
|
+
"
|
|
180
|
+
></ht-job-selector-input>
|
|
181
|
+
<ht-post-selector-input
|
|
182
|
+
v-model="queryParams[index].selectName"
|
|
183
|
+
v-if="condition.config.alias == 'post'"
|
|
184
|
+
append-to-body
|
|
185
|
+
@change="
|
|
186
|
+
(data) => {
|
|
187
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
188
|
+
}
|
|
189
|
+
"
|
|
190
|
+
></ht-post-selector-input>
|
|
191
|
+
<ht-dimension-selector-input
|
|
192
|
+
v-model="queryParams[index].selectName"
|
|
193
|
+
v-if="condition.config.alias == 'dimension'"
|
|
194
|
+
append-to-body
|
|
195
|
+
@change="
|
|
196
|
+
(data) => {
|
|
197
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
198
|
+
}
|
|
199
|
+
"
|
|
200
|
+
></ht-dimension-selector-input>
|
|
201
|
+
</div>
|
|
202
|
+
<!-- 对话框 -->
|
|
203
|
+
<div
|
|
204
|
+
v-if="condition.controllerType == '5'"
|
|
205
|
+
style="margin-right: 10px"
|
|
206
|
+
>
|
|
207
|
+
<ht-custom-dialog
|
|
208
|
+
v-model="queryParams[index][condition.field]"
|
|
209
|
+
:model-name="condition.config.keyBind"
|
|
210
|
+
dialogType="search"
|
|
211
|
+
:custdialog="{
|
|
212
|
+
name: '请选择',
|
|
213
|
+
icon: '',
|
|
214
|
+
custDialog: {
|
|
215
|
+
selectNum: 1,
|
|
216
|
+
conditions: [],
|
|
217
|
+
mappingConf: [],
|
|
218
|
+
custQueryJson: [],
|
|
219
|
+
alias: condition.config.alias,
|
|
220
|
+
type: 'custDialog',
|
|
221
|
+
},
|
|
222
|
+
}"
|
|
223
|
+
></ht-custom-dialog>
|
|
224
|
+
</div>
|
|
114
225
|
</div>
|
|
115
226
|
<div
|
|
116
227
|
v-if="conditionBind && conditionBind.length > 0"
|
|
@@ -174,12 +285,11 @@
|
|
|
174
285
|
label="序号"
|
|
175
286
|
></el-table-column>
|
|
176
287
|
<el-table-column
|
|
177
|
-
v-for="field in
|
|
288
|
+
v-for="field in sortDisplayfield"
|
|
178
289
|
:key="field.field"
|
|
179
|
-
:show-overflow-tooltip="true"
|
|
180
290
|
:prop="field.field"
|
|
181
291
|
:label="field.comment"
|
|
182
|
-
|
|
292
|
+
:width="field.width || ''"
|
|
183
293
|
></el-table-column>
|
|
184
294
|
</el-table>
|
|
185
295
|
</el-main>
|
|
@@ -328,9 +438,13 @@
|
|
|
328
438
|
type: Boolean,
|
|
329
439
|
default: false,
|
|
330
440
|
},
|
|
441
|
+
dialogConfig: Object,
|
|
442
|
+
dialogType: String,
|
|
331
443
|
},
|
|
332
444
|
data() {
|
|
333
445
|
return {
|
|
446
|
+
startDate: '', // 日期控件
|
|
447
|
+
endDate: '', // 日期控件
|
|
334
448
|
tableHeight: 350,
|
|
335
449
|
isEditInputShow: false,
|
|
336
450
|
customValue: '',
|
|
@@ -402,6 +516,24 @@
|
|
|
402
516
|
}
|
|
403
517
|
return []
|
|
404
518
|
},
|
|
519
|
+
jumpParamKey() {
|
|
520
|
+
return this.dialogConfig && this.dialogConfig.jumpParamKey
|
|
521
|
+
? this.dialogConfig.jumpParamKey
|
|
522
|
+
: ''
|
|
523
|
+
},
|
|
524
|
+
// 是否保存成跳转url参数
|
|
525
|
+
isHaveJumpUrl() {
|
|
526
|
+
return (
|
|
527
|
+
this.dialogConfig &&
|
|
528
|
+
((this.isMobile && this.dialogConfig.mobileUrl) ||
|
|
529
|
+
(!this.isMobile && this.dialogConfig.pcUrl))
|
|
530
|
+
)
|
|
531
|
+
},
|
|
532
|
+
sortDisplayfield() {
|
|
533
|
+
return this.displayfield.sort((a, b) => {
|
|
534
|
+
return a.sort > b.sort ? 1 : -1
|
|
535
|
+
})
|
|
536
|
+
},
|
|
405
537
|
},
|
|
406
538
|
watch: {
|
|
407
539
|
dialogData: {
|
|
@@ -438,143 +570,156 @@
|
|
|
438
570
|
})
|
|
439
571
|
},
|
|
440
572
|
methods: {
|
|
573
|
+
// 获取已选择的选择器数据id
|
|
574
|
+
getSelectId(data) {
|
|
575
|
+
if (!data || !data.length) {
|
|
576
|
+
return ''
|
|
577
|
+
}
|
|
578
|
+
let ids = []
|
|
579
|
+
data.forEach((item) => {
|
|
580
|
+
ids.push(item.id)
|
|
581
|
+
})
|
|
582
|
+
return ids.join(',')
|
|
583
|
+
},
|
|
441
584
|
showDialog(isMounted = false) {
|
|
442
|
-
const this_ = this
|
|
443
585
|
this.fixedParams = {}
|
|
586
|
+
// 如果已存在配置信息就不去请求配置信息 直接初始化数据
|
|
587
|
+
if (this.dialogConfig) {
|
|
588
|
+
this.initDialog(this.dialogConfig, isMounted)
|
|
589
|
+
return
|
|
590
|
+
}
|
|
444
591
|
var alias = this.custdialog.custDialog.alias
|
|
445
592
|
this.$requestConfig
|
|
446
593
|
.getCustomDialogByAlias(alias)
|
|
447
594
|
.then((customDialog) => {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
595
|
+
this.initDialog(customDialog, isMounted)
|
|
596
|
+
})
|
|
597
|
+
},
|
|
598
|
+
initDialog(customDialog, isMounted) {
|
|
599
|
+
let alias = this.custdialog.custDialog.alias
|
|
600
|
+
const this_ = this
|
|
601
|
+
if (!customDialog || !customDialog.alias) {
|
|
602
|
+
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
603
|
+
return
|
|
604
|
+
}
|
|
605
|
+
if (customDialog.style == 1) {
|
|
606
|
+
var displaylist = JSON.parse(customDialog.displayfield)
|
|
607
|
+
this_.nodeKey = displaylist.id
|
|
608
|
+
}
|
|
609
|
+
if (customDialog.needPage && customDialog.requestType === 'POST') {
|
|
610
|
+
let obj = {}
|
|
611
|
+
this.getLastKeyByPath(obj, customDialog.pageKey, 1)
|
|
612
|
+
this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
|
|
613
|
+
this.getLastKeyByPath(obj, customDialog.totalKey, true)
|
|
614
|
+
const exp = utils.parseExp(customDialog.dataParam, obj, true)
|
|
615
|
+
if (exp) {
|
|
616
|
+
const params = JSON.parse(exp)
|
|
617
|
+
if (params.pageBean) {
|
|
618
|
+
this.pagination = {
|
|
619
|
+
...params.pageBean,
|
|
469
620
|
}
|
|
470
621
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
//取值对象为脚本时获取value
|
|
489
|
-
if (ele.bindType === 3) {
|
|
490
|
-
this_.$requestConfig.executeScript(ele.bind).then((res) => {
|
|
491
|
-
this_.executeScriptResult = res && res.value
|
|
492
|
-
})
|
|
493
|
-
}
|
|
494
|
-
})
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
//对话框按表单字段查询(参数传入的)
|
|
625
|
+
let bindList = this_.custdialog.custDialog.conditions
|
|
626
|
+
this_.param = [] //绑定的表单字段
|
|
627
|
+
if (bindList.length > 0) {
|
|
628
|
+
bindList.forEach((ele) => {
|
|
629
|
+
//绑定表单字段
|
|
630
|
+
if (
|
|
631
|
+
ele.bind &&
|
|
632
|
+
(ele.defaultType == '3' || ele.bind.startsWith('data.searchForm'))
|
|
633
|
+
) {
|
|
634
|
+
let obj = {}
|
|
635
|
+
obj.field = ele.field
|
|
636
|
+
obj.bind = ele.bind
|
|
637
|
+
obj.bindType = ele.bindType
|
|
638
|
+
this_.param.push(obj)
|
|
495
639
|
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
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
|
-
}
|
|
640
|
+
//取值对象为脚本时获取value
|
|
641
|
+
if (ele.bindType === 3) {
|
|
642
|
+
this_.$requestConfig.executeScript(ele.bind).then((res) => {
|
|
643
|
+
this_.executeScriptResult = res && res.value
|
|
516
644
|
})
|
|
517
|
-
this.$set(this, 'queryParams', queryParams)
|
|
518
|
-
this.$set(this, 'placeholders', placeholders)
|
|
519
645
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
646
|
+
})
|
|
647
|
+
}
|
|
648
|
+
//判断对话框查询是否有条件
|
|
649
|
+
let userInputList = JSON.parse(customDialog.conditionfield)
|
|
650
|
+
this_.quickSearch = '' //填写提示 placeholder
|
|
651
|
+
this_.conditionBind = []
|
|
652
|
+
let queryParams = []
|
|
653
|
+
let placeholders = []
|
|
654
|
+
if (userInputList.length > 0) {
|
|
655
|
+
userInputList.forEach((ele) => {
|
|
656
|
+
var obj = {}
|
|
657
|
+
//条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
|
|
658
|
+
if (ele.defaultType == '1') {
|
|
659
|
+
obj[ele.field] = ''
|
|
660
|
+
queryParams.push(obj)
|
|
661
|
+
// queryParams[ele.field] = "";
|
|
662
|
+
this_.conditionBind.push(ele)
|
|
663
|
+
placeholders.push('请输入' + ele.comment)
|
|
525
664
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
if (window.screen.height && window.screen.height <= 900) {
|
|
529
|
-
this.style = 'height:440px'
|
|
665
|
+
if (ele.defaultType == '2' && ele.defaultValue) {
|
|
666
|
+
this_.fixedParams[ele.field] = ele.defaultValue
|
|
530
667
|
}
|
|
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
|
-
if (
|
|
570
|
-
this_.
|
|
571
|
-
|
|
572
|
-
//无动态传入的字段
|
|
573
|
-
this_.customDialogTreeShow(this_.pageParam)
|
|
668
|
+
})
|
|
669
|
+
this.$set(this, 'queryParams', queryParams)
|
|
670
|
+
this.$set(this, 'placeholders', placeholders)
|
|
671
|
+
}
|
|
672
|
+
//判断是否显示条件查询输入框
|
|
673
|
+
if (this_.quickSearch != '') {
|
|
674
|
+
this_.querysShow = true
|
|
675
|
+
} else {
|
|
676
|
+
this_.querysShow = true
|
|
677
|
+
}
|
|
678
|
+
this_.quickSearch = '请输入' + this.quickSearch + '查询'
|
|
679
|
+
this_.style = 'height:' + customDialog.height + 'px'
|
|
680
|
+
if (window.screen.height && window.screen.height <= 900) {
|
|
681
|
+
this.style = 'height:440px'
|
|
682
|
+
}
|
|
683
|
+
if (customDialog.style == 0 || customDialog.style == 2) {
|
|
684
|
+
//列表
|
|
685
|
+
setTimeout(() => {
|
|
686
|
+
this_.customDialogShow(
|
|
687
|
+
{
|
|
688
|
+
alias: alias,
|
|
689
|
+
customDialog: customDialog,
|
|
690
|
+
},
|
|
691
|
+
isMounted
|
|
692
|
+
)
|
|
693
|
+
}, 100)
|
|
694
|
+
} else if (customDialog.style == 1) {
|
|
695
|
+
//树形
|
|
696
|
+
this_.pageParam = { alias: alias, customDialog: customDialog }
|
|
697
|
+
this_.customDialog = customDialog
|
|
698
|
+
let param = {}
|
|
699
|
+
this_.conditionfieldTree = []
|
|
700
|
+
//判断是否存在条件
|
|
701
|
+
if (customDialog.conditionfield) {
|
|
702
|
+
this_.conditionfieldTree = JSON.parse(customDialog.conditionfield)
|
|
703
|
+
if (this_.conditionfieldTree.length > 0) {
|
|
704
|
+
for (let i = this_.conditionfieldTree.length - 1; i >= 0; i--) {
|
|
705
|
+
//判断条件字段是否是动态传入(defaultType:4:动态传入,2:固定值 )
|
|
706
|
+
if (this_.conditionfieldTree[i].defaultType == '4') {
|
|
707
|
+
param[this_.conditionfieldTree[i].field] =
|
|
708
|
+
this_.conditionfieldTree[i].comment
|
|
574
709
|
}
|
|
575
710
|
}
|
|
576
711
|
}
|
|
577
|
-
}
|
|
712
|
+
}
|
|
713
|
+
//有动态传入的字段
|
|
714
|
+
if (!isMounted) {
|
|
715
|
+
if (JSON.stringify(param) != '{}') {
|
|
716
|
+
this_.dialogVisible = true
|
|
717
|
+
} else {
|
|
718
|
+
//无动态传入的字段
|
|
719
|
+
this_.customDialogTreeShow(this_.pageParam)
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
578
723
|
},
|
|
579
724
|
initTableHeight() {
|
|
580
725
|
this.$nextTick(() => {
|
|
@@ -724,13 +869,22 @@
|
|
|
724
869
|
}
|
|
725
870
|
// 添加用户id 岗位id 组织id
|
|
726
871
|
try {
|
|
727
|
-
if (
|
|
872
|
+
if (
|
|
873
|
+
this.$requestConfig.getUserId &&
|
|
874
|
+
this.$requestConfig.getUserId()
|
|
875
|
+
) {
|
|
728
876
|
ctx.userId = this.$requestConfig.getUserId()
|
|
729
877
|
}
|
|
730
|
-
if (
|
|
878
|
+
if (
|
|
879
|
+
this.$requestConfig.getOrgId &&
|
|
880
|
+
this.$requestConfig.getOrgId()
|
|
881
|
+
) {
|
|
731
882
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
732
883
|
}
|
|
733
|
-
if (
|
|
884
|
+
if (
|
|
885
|
+
this.$requestConfig.getPostId &&
|
|
886
|
+
this.$requestConfig.getPostId()
|
|
887
|
+
) {
|
|
734
888
|
ctx.postId = this.$requestConfig.getPostId()
|
|
735
889
|
}
|
|
736
890
|
} catch (e) {
|
|
@@ -827,8 +981,19 @@
|
|
|
827
981
|
this.selectOrgs = this.convertComment2Field(str, field)
|
|
828
982
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
829
983
|
var val = ''
|
|
830
|
-
str.forEach((item) => {
|
|
831
|
-
|
|
984
|
+
str.forEach((item, index) => {
|
|
985
|
+
// 此处添加url跳转参数保存逻辑
|
|
986
|
+
if (
|
|
987
|
+
this.jumpParamKey &&
|
|
988
|
+
this.isHaveJumpUrl &&
|
|
989
|
+
this.modelName == 'data.' + con['target'][0]
|
|
990
|
+
) {
|
|
991
|
+
val += `${item[con.from]}¯${this.jumpParamKey}:${
|
|
992
|
+
this.selectOrgs[index][this.jumpParamKey]
|
|
993
|
+
},`
|
|
994
|
+
} else {
|
|
995
|
+
val += item[con.from] + ','
|
|
996
|
+
}
|
|
832
997
|
})
|
|
833
998
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
834
999
|
utils.setValueByPath(
|
|
@@ -913,19 +1078,46 @@
|
|
|
913
1078
|
pageBean.pageBean = { page: 1, pageSize: 10, showTotal: true }
|
|
914
1079
|
}
|
|
915
1080
|
//用户输入的
|
|
1081
|
+
let flag = false
|
|
916
1082
|
if (this.queryParams.length != 0 && this.queryParams[0] != '') {
|
|
917
1083
|
this.conditionBind.forEach((item, index) => {
|
|
1084
|
+
// 日期范围特殊处理
|
|
1085
|
+
if (item.dbType == 'date' && item.condition == 'BETWEEN') {
|
|
1086
|
+
if (
|
|
1087
|
+
(this.queryParams[index].startDate &&
|
|
1088
|
+
!this.queryParams[index].endDate) ||
|
|
1089
|
+
(!this.queryParams[index].startDate &&
|
|
1090
|
+
this.queryParams[index].endDate)
|
|
1091
|
+
) {
|
|
1092
|
+
flag = true
|
|
1093
|
+
this.$message.info('日期范围未填写完整!')
|
|
1094
|
+
return
|
|
1095
|
+
}
|
|
1096
|
+
if (
|
|
1097
|
+
this.queryParams[index].startDate &&
|
|
1098
|
+
this.queryParams[index].endDate
|
|
1099
|
+
) {
|
|
1100
|
+
this.queryParams[index][
|
|
1101
|
+
item.field
|
|
1102
|
+
] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
|
|
1103
|
+
} else {
|
|
1104
|
+
this.queryParams[index][item.field] = ''
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
918
1107
|
if (this.queryParams[index][item.field]) {
|
|
919
1108
|
querys.push({
|
|
920
1109
|
property: item.field,
|
|
921
1110
|
value: this.queryParams[index][item.field],
|
|
922
1111
|
group: 'main',
|
|
923
|
-
operation:
|
|
1112
|
+
operation: item.condition,
|
|
924
1113
|
relation: 'AND',
|
|
925
1114
|
})
|
|
926
1115
|
}
|
|
927
1116
|
})
|
|
928
1117
|
}
|
|
1118
|
+
if (flag) {
|
|
1119
|
+
return
|
|
1120
|
+
}
|
|
929
1121
|
//参数传入的查询拼接
|
|
930
1122
|
if (this.param) {
|
|
931
1123
|
this.param.forEach((item) => {
|
|
@@ -991,13 +1183,22 @@
|
|
|
991
1183
|
queryParamMap.total = pageBean.pageBean.total
|
|
992
1184
|
// 添加用户id 岗位id 组织id
|
|
993
1185
|
try {
|
|
994
|
-
if (
|
|
1186
|
+
if (
|
|
1187
|
+
this.$requestConfig.getUserId &&
|
|
1188
|
+
this.$requestConfig.getUserId()
|
|
1189
|
+
) {
|
|
995
1190
|
ctx.userId = this.$requestConfig.getUserId()
|
|
996
1191
|
}
|
|
997
|
-
if (
|
|
1192
|
+
if (
|
|
1193
|
+
this.$requestConfig.getOrgId &&
|
|
1194
|
+
this.$requestConfig.getOrgId()
|
|
1195
|
+
) {
|
|
998
1196
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
999
1197
|
}
|
|
1000
|
-
if (
|
|
1198
|
+
if (
|
|
1199
|
+
this.$requestConfig.getPostId &&
|
|
1200
|
+
this.$requestConfig.getPostId()
|
|
1201
|
+
) {
|
|
1001
1202
|
ctx.postId = this.$requestConfig.getPostId()
|
|
1002
1203
|
}
|
|
1003
1204
|
} catch (e) {
|
|
@@ -1022,12 +1223,14 @@
|
|
|
1022
1223
|
value: queryParamMap[bindKey] || ctx[bindKey] || '',
|
|
1023
1224
|
}
|
|
1024
1225
|
})
|
|
1025
|
-
param.querys = queryList
|
|
1226
|
+
param.querys = queryList || []
|
|
1026
1227
|
if (this.customDialog.needPage) {
|
|
1027
1228
|
param.pageBean = obj
|
|
1028
1229
|
} else {
|
|
1029
1230
|
param.pageBean.pageSize = -1
|
|
1030
1231
|
}
|
|
1232
|
+
// 日期格式的 改成数组
|
|
1233
|
+
// this.changeDateFormat(param)
|
|
1031
1234
|
//构造请求的参数
|
|
1032
1235
|
let requestParam = {
|
|
1033
1236
|
pageBean: param,
|
|
@@ -1067,6 +1270,21 @@
|
|
|
1067
1270
|
}
|
|
1068
1271
|
this.tableRadioVal = ''
|
|
1069
1272
|
},
|
|
1273
|
+
changeDateFormat(param) {
|
|
1274
|
+
let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
|
|
1275
|
+
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$/
|
|
1276
|
+
Object.keys(param).forEach((key) => {
|
|
1277
|
+
if (
|
|
1278
|
+
param[key] &&
|
|
1279
|
+
typeof param[key] == 'string' &&
|
|
1280
|
+
param[key].includes(',') &&
|
|
1281
|
+
(dateValidate1.test(param[key].split(',')[0]) ||
|
|
1282
|
+
dateValidate2.test(param[key].split(',')[0]))
|
|
1283
|
+
) {
|
|
1284
|
+
param[key] = param[key].split(',')
|
|
1285
|
+
}
|
|
1286
|
+
})
|
|
1287
|
+
},
|
|
1070
1288
|
getSearchValueByKey() {
|
|
1071
1289
|
let queryParamsObj = {}
|
|
1072
1290
|
if (this.queryParams.length > 0) {
|
|
@@ -1321,6 +1539,8 @@
|
|
|
1321
1539
|
},
|
|
1322
1540
|
// 同步选择结果
|
|
1323
1541
|
syncInputValue() {
|
|
1542
|
+
// 对话框跳转url需要两个参数 1当前控件绑定的对象参数modelName 2对话框配置中配置的key名称
|
|
1543
|
+
// 同步值时,如果有绑定url跳转参数,值格式为 名称¯跳转key:跳转value
|
|
1324
1544
|
let thisIndex = null //当前数据所在下标
|
|
1325
1545
|
let parentIndex = null //父节点所在下标
|
|
1326
1546
|
if (this.$parent.$el) {
|
|
@@ -1408,13 +1628,33 @@
|
|
|
1408
1628
|
}
|
|
1409
1629
|
}
|
|
1410
1630
|
}
|
|
1631
|
+
// 如果是查询中使用的对话框
|
|
1632
|
+
if (this.dialogType == 'search') {
|
|
1633
|
+
let returnVal = []
|
|
1634
|
+
str.forEach((item) => {
|
|
1635
|
+
returnVal.push(decodeURIComponent(item[this.modelName]))
|
|
1636
|
+
})
|
|
1637
|
+
this.$emit('updateInput', returnVal.join(','))
|
|
1638
|
+
return
|
|
1639
|
+
}
|
|
1411
1640
|
const pInst = utils.getOnlineFormInstance(this)
|
|
1412
1641
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
1413
1642
|
var val = ''
|
|
1414
1643
|
var from = con.from.toLowerCase()
|
|
1415
1644
|
str.forEach((item) => {
|
|
1645
|
+
// 如果有绑定url跳转参数 需获取跳转参数的key
|
|
1416
1646
|
if (item) {
|
|
1417
|
-
|
|
1647
|
+
if (
|
|
1648
|
+
this.jumpParamKey &&
|
|
1649
|
+
this.isHaveJumpUrl &&
|
|
1650
|
+
this.modelName == 'data.' + con['target'][0]
|
|
1651
|
+
) {
|
|
1652
|
+
val += `${decodeURIComponent(item[from])}¯${
|
|
1653
|
+
this.jumpParamKey
|
|
1654
|
+
}:${item[this.jumpParamKey]},`
|
|
1655
|
+
} else {
|
|
1656
|
+
val += decodeURIComponent(item[from]) + ','
|
|
1657
|
+
}
|
|
1418
1658
|
}
|
|
1419
1659
|
})
|
|
1420
1660
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
@@ -1455,7 +1695,6 @@
|
|
|
1455
1695
|
const _val = val.substring(0, val.length - 1)
|
|
1456
1696
|
if (path) {
|
|
1457
1697
|
if (this.modelName && this.modelName.endsWith(path)) {
|
|
1458
|
-
// this.$emit('input', _val)
|
|
1459
1698
|
this.$emit('updateInput', _val)
|
|
1460
1699
|
}
|
|
1461
1700
|
utils.setValueByPath(
|