three-trees-ui 1.0.14 → 1.0.15
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 +1142 -514
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +1142 -514
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/CustomDialog/src/customDialog.vue +488 -165
- package/packages/CustomDialog/src/customMobileDialog.vue +464 -155
- package/packages/CustomDialog/src/main.vue +202 -10
- package/packages/DimensionSelector/src/main.vue +2 -0
- package/packages/Tree/src/main.vue +7 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:before-close="dialogCancel"
|
|
8
8
|
append-to-body
|
|
9
9
|
top="6vh"
|
|
10
|
-
width="
|
|
10
|
+
width="75%"
|
|
11
11
|
@opened="afterOpen"
|
|
12
12
|
>
|
|
13
13
|
<el-container :style="style" style="overflow: auto">
|
|
@@ -39,27 +39,32 @@
|
|
|
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"
|
|
45
46
|
:key="index"
|
|
46
47
|
class="search-item"
|
|
47
48
|
>
|
|
48
|
-
<p
|
|
49
|
-
|
|
49
|
+
<p :title="condition.comment">{{ condition.comment }}:</p>
|
|
50
|
+
<!-- input输入框 -->
|
|
51
|
+
<div
|
|
52
|
+
v-if="condition.controllerType == '1'"
|
|
53
|
+
class="search-item_main"
|
|
54
|
+
>
|
|
50
55
|
<el-input
|
|
51
56
|
v-model="queryParams[index][condition.field]"
|
|
52
57
|
size="small"
|
|
53
|
-
style="width: 180px; padding: 10px 0; margin: 0 5px 0 5px"
|
|
54
58
|
clearable
|
|
55
59
|
:placeholder="placeholders[index]"
|
|
56
60
|
prefix-icon="el-icon-search"
|
|
57
61
|
@keyup.enter.native="searchEnterFun"
|
|
58
62
|
></el-input>
|
|
59
63
|
</div>
|
|
64
|
+
<!-- 单选按钮 -->
|
|
60
65
|
<div
|
|
61
66
|
v-if="condition.controllerType == '2'"
|
|
62
|
-
|
|
67
|
+
class="search-item_main"
|
|
63
68
|
>
|
|
64
69
|
<el-radio
|
|
65
70
|
v-for="(itemR, $index1) in condition.config.options"
|
|
@@ -70,38 +75,31 @@
|
|
|
70
75
|
{{ itemR.value }}
|
|
71
76
|
</el-radio>
|
|
72
77
|
</div>
|
|
78
|
+
<!-- 下拉框 -->
|
|
73
79
|
<div
|
|
80
|
+
class="search-item_main"
|
|
74
81
|
v-if="condition.controllerType == '3'"
|
|
75
|
-
style="margin-right: 10px"
|
|
76
82
|
>
|
|
83
|
+
<!-- 静态选项 -->
|
|
77
84
|
<ht-select
|
|
78
85
|
v-if="condition.config.choiceType == 'static'"
|
|
79
86
|
v-model="queryParams[index][condition.field]"
|
|
80
87
|
:placeholder="quickSearch"
|
|
88
|
+
:multiple="condition.config.multiple"
|
|
81
89
|
:options="condition.config.options"
|
|
82
90
|
></ht-select>
|
|
83
|
-
|
|
91
|
+
<!-- 动态选项时展示数据字典 -->
|
|
92
|
+
<ht-dictionary
|
|
84
93
|
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>
|
|
94
|
+
v-model="queryParams[index][condition.field]"
|
|
95
|
+
:dickey="condition.config.dic"
|
|
96
|
+
:filterable="condition.config.filterable"
|
|
97
|
+
></ht-dictionary>
|
|
101
98
|
</div>
|
|
99
|
+
<!-- 标签 -->
|
|
102
100
|
<div
|
|
103
101
|
v-if="condition.controllerType == '4'"
|
|
104
|
-
|
|
102
|
+
class="search-item_main"
|
|
105
103
|
>
|
|
106
104
|
<eip-tag
|
|
107
105
|
v-model="queryParams[index][condition.field]"
|
|
@@ -111,6 +109,142 @@
|
|
|
111
109
|
:expand="condition.config.expand"
|
|
112
110
|
></eip-tag>
|
|
113
111
|
</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="
|
|
125
|
+
condition.config.inputFormat.includes('mm:ss')
|
|
126
|
+
? 'yyyy-MM-dd HH:mm:ss'
|
|
127
|
+
: condition.config.inputFormat
|
|
128
|
+
"
|
|
129
|
+
:valueFormat="
|
|
130
|
+
condition.config.inputFormat.includes('mm:ss')
|
|
131
|
+
? 'yyyy-MM-dd HH:mm:ss'
|
|
132
|
+
: condition.config.inputFormat
|
|
133
|
+
"
|
|
134
|
+
></ht-date>
|
|
135
|
+
至
|
|
136
|
+
<ht-date
|
|
137
|
+
v-model="queryParams[index].endDate"
|
|
138
|
+
:format="
|
|
139
|
+
condition.config.inputFormat.includes('mm:ss')
|
|
140
|
+
? 'yyyy-MM-dd HH:mm:ss'
|
|
141
|
+
: condition.config.inputFormat
|
|
142
|
+
"
|
|
143
|
+
:valueFormat="
|
|
144
|
+
condition.config.inputFormat.includes('mm:ss')
|
|
145
|
+
? 'yyyy-MM-dd HH:mm:ss'
|
|
146
|
+
: condition.config.inputFormat
|
|
147
|
+
"
|
|
148
|
+
></ht-date>
|
|
149
|
+
</div>
|
|
150
|
+
<ht-date
|
|
151
|
+
v-model="queryParams[index][condition.field]"
|
|
152
|
+
v-else
|
|
153
|
+
:format="
|
|
154
|
+
condition.config.inputFormat.includes('mm:ss')
|
|
155
|
+
? 'yyyy-MM-dd HH:mm:ss'
|
|
156
|
+
: condition.config.inputFormat
|
|
157
|
+
"
|
|
158
|
+
:valueFormat="
|
|
159
|
+
condition.config.inputFormat.includes('mm:ss')
|
|
160
|
+
? 'yyyy-MM-dd HH:mm:ss'
|
|
161
|
+
: condition.config.inputFormat
|
|
162
|
+
"
|
|
163
|
+
></ht-date>
|
|
164
|
+
</div>
|
|
165
|
+
<!-- 选择器 -->
|
|
166
|
+
<div
|
|
167
|
+
v-if="condition.controllerType == '7'"
|
|
168
|
+
class="search-item_main"
|
|
169
|
+
>
|
|
170
|
+
<ht-user-selector-input
|
|
171
|
+
v-if="condition.config.alias == 'user'"
|
|
172
|
+
append-to-body
|
|
173
|
+
@change="
|
|
174
|
+
(data) => {
|
|
175
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
176
|
+
}
|
|
177
|
+
"
|
|
178
|
+
></ht-user-selector-input>
|
|
179
|
+
<ht-org-selector-input
|
|
180
|
+
v-if="condition.config.alias == 'org'"
|
|
181
|
+
append-to-body
|
|
182
|
+
@change="
|
|
183
|
+
(data) => {
|
|
184
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
185
|
+
}
|
|
186
|
+
"
|
|
187
|
+
></ht-org-selector-input>
|
|
188
|
+
<ht-role-selector-input
|
|
189
|
+
v-if="condition.config.alias == 'role'"
|
|
190
|
+
append-to-body
|
|
191
|
+
@change="
|
|
192
|
+
(data) => {
|
|
193
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
194
|
+
}
|
|
195
|
+
"
|
|
196
|
+
></ht-role-selector-input>
|
|
197
|
+
<ht-job-selector-input
|
|
198
|
+
v-if="condition.config.alias == 'job'"
|
|
199
|
+
append-to-body
|
|
200
|
+
@change="
|
|
201
|
+
(data) => {
|
|
202
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
203
|
+
}
|
|
204
|
+
"
|
|
205
|
+
></ht-job-selector-input>
|
|
206
|
+
<ht-post-selector-input
|
|
207
|
+
v-if="condition.config.alias == 'post'"
|
|
208
|
+
append-to-body
|
|
209
|
+
@change="
|
|
210
|
+
(data) => {
|
|
211
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
212
|
+
}
|
|
213
|
+
"
|
|
214
|
+
></ht-post-selector-input>
|
|
215
|
+
<ht-dimension-selector-input
|
|
216
|
+
v-if="condition.config.alias == 'dimension'"
|
|
217
|
+
append-to-body
|
|
218
|
+
@change="
|
|
219
|
+
(data) => {
|
|
220
|
+
queryParams[index][condition.field] = getSelectId(data)
|
|
221
|
+
}
|
|
222
|
+
"
|
|
223
|
+
></ht-dimension-selector-input>
|
|
224
|
+
</div>
|
|
225
|
+
<!-- 对话框 -->
|
|
226
|
+
<div
|
|
227
|
+
v-if="condition.controllerType == '5'"
|
|
228
|
+
class="search-item_main"
|
|
229
|
+
>
|
|
230
|
+
<ht-custom-dialog
|
|
231
|
+
v-model="queryParams[index][condition.field]"
|
|
232
|
+
:model-name="condition.config.keyBind"
|
|
233
|
+
dialogType="search"
|
|
234
|
+
:custdialog="{
|
|
235
|
+
name: '请选择',
|
|
236
|
+
icon: '',
|
|
237
|
+
custDialog: {
|
|
238
|
+
selectNum: 1,
|
|
239
|
+
conditions: [],
|
|
240
|
+
mappingConf: [],
|
|
241
|
+
custQueryJson: [],
|
|
242
|
+
alias: condition.config.alias,
|
|
243
|
+
type: 'custDialog',
|
|
244
|
+
},
|
|
245
|
+
}"
|
|
246
|
+
></ht-custom-dialog>
|
|
247
|
+
</div>
|
|
114
248
|
</div>
|
|
115
249
|
<div
|
|
116
250
|
v-if="conditionBind && conditionBind.length > 0"
|
|
@@ -174,12 +308,11 @@
|
|
|
174
308
|
label="序号"
|
|
175
309
|
></el-table-column>
|
|
176
310
|
<el-table-column
|
|
177
|
-
v-for="field in
|
|
311
|
+
v-for="field in sortDisplayfield"
|
|
178
312
|
:key="field.field"
|
|
179
|
-
:show-overflow-tooltip="true"
|
|
180
313
|
:prop="field.field"
|
|
181
314
|
:label="field.comment"
|
|
182
|
-
|
|
315
|
+
:width="field.width || ''"
|
|
183
316
|
></el-table-column>
|
|
184
317
|
</el-table>
|
|
185
318
|
</el-main>
|
|
@@ -328,9 +461,13 @@
|
|
|
328
461
|
type: Boolean,
|
|
329
462
|
default: false,
|
|
330
463
|
},
|
|
464
|
+
dialogConfig: Object,
|
|
465
|
+
dialogType: String,
|
|
331
466
|
},
|
|
332
467
|
data() {
|
|
333
468
|
return {
|
|
469
|
+
startDate: '', // 日期控件
|
|
470
|
+
endDate: '', // 日期控件
|
|
334
471
|
tableHeight: 350,
|
|
335
472
|
isEditInputShow: false,
|
|
336
473
|
customValue: '',
|
|
@@ -402,6 +539,24 @@
|
|
|
402
539
|
}
|
|
403
540
|
return []
|
|
404
541
|
},
|
|
542
|
+
jumpParamKey() {
|
|
543
|
+
return this.dialogConfig && this.dialogConfig.jumpParamKey
|
|
544
|
+
? this.dialogConfig.jumpParamKey
|
|
545
|
+
: ''
|
|
546
|
+
},
|
|
547
|
+
// 是否保存成跳转url参数
|
|
548
|
+
isHaveJumpUrl() {
|
|
549
|
+
return (
|
|
550
|
+
this.dialogConfig &&
|
|
551
|
+
((this.isMobile && this.dialogConfig.mobileUrl) ||
|
|
552
|
+
(!this.isMobile && this.dialogConfig.pcUrl))
|
|
553
|
+
)
|
|
554
|
+
},
|
|
555
|
+
sortDisplayfield() {
|
|
556
|
+
return this.displayfield.sort((a, b) => {
|
|
557
|
+
return a.sort > b.sort ? 1 : -1
|
|
558
|
+
})
|
|
559
|
+
},
|
|
405
560
|
},
|
|
406
561
|
watch: {
|
|
407
562
|
dialogData: {
|
|
@@ -438,143 +593,156 @@
|
|
|
438
593
|
})
|
|
439
594
|
},
|
|
440
595
|
methods: {
|
|
596
|
+
// 获取已选择的选择器数据id
|
|
597
|
+
getSelectId(data) {
|
|
598
|
+
if (!data || !data.length) {
|
|
599
|
+
return ''
|
|
600
|
+
}
|
|
601
|
+
let ids = []
|
|
602
|
+
data.forEach((item) => {
|
|
603
|
+
ids.push(item.id)
|
|
604
|
+
})
|
|
605
|
+
return ids.join(',')
|
|
606
|
+
},
|
|
441
607
|
showDialog(isMounted = false) {
|
|
442
|
-
const this_ = this
|
|
443
608
|
this.fixedParams = {}
|
|
609
|
+
// 如果已存在配置信息就不去请求配置信息 直接初始化数据
|
|
610
|
+
if (this.dialogConfig) {
|
|
611
|
+
this.initDialog(this.dialogConfig, isMounted)
|
|
612
|
+
return
|
|
613
|
+
}
|
|
444
614
|
var alias = this.custdialog.custDialog.alias
|
|
445
615
|
this.$requestConfig
|
|
446
616
|
.getCustomDialogByAlias(alias)
|
|
447
617
|
.then((customDialog) => {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
618
|
+
this.initDialog(customDialog, isMounted)
|
|
619
|
+
})
|
|
620
|
+
},
|
|
621
|
+
initDialog(customDialog, isMounted) {
|
|
622
|
+
let alias = this.custdialog.custDialog.alias
|
|
623
|
+
const this_ = this
|
|
624
|
+
if (!customDialog || !customDialog.alias) {
|
|
625
|
+
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
626
|
+
return
|
|
627
|
+
}
|
|
628
|
+
if (customDialog.style == 1) {
|
|
629
|
+
var displaylist = JSON.parse(customDialog.displayfield)
|
|
630
|
+
this_.nodeKey = displaylist.id
|
|
631
|
+
}
|
|
632
|
+
if (customDialog.needPage && customDialog.requestType === 'POST') {
|
|
633
|
+
let obj = {}
|
|
634
|
+
this.getLastKeyByPath(obj, customDialog.pageKey, 1)
|
|
635
|
+
this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
|
|
636
|
+
this.getLastKeyByPath(obj, customDialog.totalKey, true)
|
|
637
|
+
const exp = utils.parseExp(customDialog.dataParam, obj, true)
|
|
638
|
+
if (exp) {
|
|
639
|
+
const params = JSON.parse(exp)
|
|
640
|
+
if (params.pageBean) {
|
|
641
|
+
this.pagination = {
|
|
642
|
+
...params.pageBean,
|
|
469
643
|
}
|
|
470
644
|
}
|
|
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
|
-
})
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
//对话框按表单字段查询(参数传入的)
|
|
648
|
+
let bindList = this_.custdialog.custDialog.conditions
|
|
649
|
+
this_.param = [] //绑定的表单字段
|
|
650
|
+
if (bindList.length > 0) {
|
|
651
|
+
bindList.forEach((ele) => {
|
|
652
|
+
//绑定表单字段
|
|
653
|
+
if (
|
|
654
|
+
ele.bind &&
|
|
655
|
+
(ele.defaultType == '3' || ele.bind.startsWith('data.searchForm'))
|
|
656
|
+
) {
|
|
657
|
+
let obj = {}
|
|
658
|
+
obj.field = ele.field
|
|
659
|
+
obj.bind = ele.bind
|
|
660
|
+
obj.bindType = ele.bindType
|
|
661
|
+
this_.param.push(obj)
|
|
495
662
|
}
|
|
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
|
-
}
|
|
663
|
+
//取值对象为脚本时获取value
|
|
664
|
+
if (ele.bindType === 3) {
|
|
665
|
+
this_.$requestConfig.executeScript(ele.bind).then((res) => {
|
|
666
|
+
this_.executeScriptResult = res && res.value
|
|
516
667
|
})
|
|
517
|
-
this.$set(this, 'queryParams', queryParams)
|
|
518
|
-
this.$set(this, 'placeholders', placeholders)
|
|
519
668
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
669
|
+
})
|
|
670
|
+
}
|
|
671
|
+
//判断对话框查询是否有条件
|
|
672
|
+
let userInputList = JSON.parse(customDialog.conditionfield)
|
|
673
|
+
this_.quickSearch = '' //填写提示 placeholder
|
|
674
|
+
this_.conditionBind = []
|
|
675
|
+
let queryParams = []
|
|
676
|
+
let placeholders = []
|
|
677
|
+
if (userInputList.length > 0) {
|
|
678
|
+
userInputList.forEach((ele) => {
|
|
679
|
+
var obj = {}
|
|
680
|
+
//条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
|
|
681
|
+
if (ele.defaultType == '1') {
|
|
682
|
+
obj[ele.field] = ''
|
|
683
|
+
queryParams.push(obj)
|
|
684
|
+
// queryParams[ele.field] = "";
|
|
685
|
+
this_.conditionBind.push(ele)
|
|
686
|
+
placeholders.push('请输入' + ele.comment)
|
|
525
687
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
if (window.screen.height && window.screen.height <= 900) {
|
|
529
|
-
this.style = 'height:440px'
|
|
688
|
+
if (ele.defaultType == '2' && ele.defaultValue) {
|
|
689
|
+
this_.fixedParams[ele.field] = ele.defaultValue
|
|
530
690
|
}
|
|
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)
|
|
691
|
+
})
|
|
692
|
+
this.$set(this, 'queryParams', queryParams)
|
|
693
|
+
this.$set(this, 'placeholders', placeholders)
|
|
694
|
+
}
|
|
695
|
+
//判断是否显示条件查询输入框
|
|
696
|
+
if (this_.quickSearch != '') {
|
|
697
|
+
this_.querysShow = true
|
|
698
|
+
} else {
|
|
699
|
+
this_.querysShow = true
|
|
700
|
+
}
|
|
701
|
+
this_.quickSearch = '请输入' + this.quickSearch + '查询'
|
|
702
|
+
this_.style = 'height:' + customDialog.height + 'px'
|
|
703
|
+
if (window.screen.height && window.screen.height <= 900) {
|
|
704
|
+
this.style = 'height:440px'
|
|
705
|
+
}
|
|
706
|
+
if (customDialog.style == 0 || customDialog.style == 2) {
|
|
707
|
+
//列表
|
|
708
|
+
setTimeout(() => {
|
|
709
|
+
this_.customDialogShow(
|
|
710
|
+
{
|
|
711
|
+
alias: alias,
|
|
712
|
+
customDialog: customDialog,
|
|
713
|
+
},
|
|
714
|
+
isMounted
|
|
715
|
+
)
|
|
716
|
+
}, 100)
|
|
717
|
+
} else if (customDialog.style == 1) {
|
|
718
|
+
//树形
|
|
719
|
+
this_.pageParam = { alias: alias, customDialog: customDialog }
|
|
720
|
+
this_.customDialog = customDialog
|
|
721
|
+
let param = {}
|
|
722
|
+
this_.conditionfieldTree = []
|
|
723
|
+
//判断是否存在条件
|
|
724
|
+
if (customDialog.conditionfield) {
|
|
725
|
+
this_.conditionfieldTree = JSON.parse(customDialog.conditionfield)
|
|
726
|
+
if (this_.conditionfieldTree.length > 0) {
|
|
727
|
+
for (let i = this_.conditionfieldTree.length - 1; i >= 0; i--) {
|
|
728
|
+
//判断条件字段是否是动态传入(defaultType:4:动态传入,2:固定值 )
|
|
729
|
+
if (this_.conditionfieldTree[i].defaultType == '4') {
|
|
730
|
+
param[this_.conditionfieldTree[i].field] =
|
|
731
|
+
this_.conditionfieldTree[i].comment
|
|
574
732
|
}
|
|
575
733
|
}
|
|
576
734
|
}
|
|
577
|
-
}
|
|
735
|
+
}
|
|
736
|
+
//有动态传入的字段
|
|
737
|
+
if (!isMounted) {
|
|
738
|
+
if (JSON.stringify(param) != '{}') {
|
|
739
|
+
this_.dialogVisible = true
|
|
740
|
+
} else {
|
|
741
|
+
//无动态传入的字段
|
|
742
|
+
this_.customDialogTreeShow(this_.pageParam)
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
578
746
|
},
|
|
579
747
|
initTableHeight() {
|
|
580
748
|
this.$nextTick(() => {
|
|
@@ -724,13 +892,22 @@
|
|
|
724
892
|
}
|
|
725
893
|
// 添加用户id 岗位id 组织id
|
|
726
894
|
try {
|
|
727
|
-
if (
|
|
895
|
+
if (
|
|
896
|
+
this.$requestConfig.getUserId &&
|
|
897
|
+
this.$requestConfig.getUserId()
|
|
898
|
+
) {
|
|
728
899
|
ctx.userId = this.$requestConfig.getUserId()
|
|
729
900
|
}
|
|
730
|
-
if (
|
|
901
|
+
if (
|
|
902
|
+
this.$requestConfig.getOrgId &&
|
|
903
|
+
this.$requestConfig.getOrgId()
|
|
904
|
+
) {
|
|
731
905
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
732
906
|
}
|
|
733
|
-
if (
|
|
907
|
+
if (
|
|
908
|
+
this.$requestConfig.getPostId &&
|
|
909
|
+
this.$requestConfig.getPostId()
|
|
910
|
+
) {
|
|
734
911
|
ctx.postId = this.$requestConfig.getPostId()
|
|
735
912
|
}
|
|
736
913
|
} catch (e) {
|
|
@@ -827,8 +1004,27 @@
|
|
|
827
1004
|
this.selectOrgs = this.convertComment2Field(str, field)
|
|
828
1005
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
829
1006
|
var val = ''
|
|
830
|
-
str.forEach((item) => {
|
|
831
|
-
|
|
1007
|
+
str.forEach((item, index) => {
|
|
1008
|
+
// 此处添加url跳转参数保存逻辑
|
|
1009
|
+
if (
|
|
1010
|
+
this.jumpParamKey &&
|
|
1011
|
+
this.isHaveJumpUrl &&
|
|
1012
|
+
(this.modelName == 'data.' + con['target'][0] ||
|
|
1013
|
+
(this.modelName.includes('item.') &&
|
|
1014
|
+
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
1015
|
+
) {
|
|
1016
|
+
let jumpParamKey = this.jumpParamKey
|
|
1017
|
+
let jumpParamValue = this.jumpParamKey
|
|
1018
|
+
if (this.jumpParamKey.includes(':')) {
|
|
1019
|
+
jumpParamKey = this.jumpParamKey.split(':')[0]
|
|
1020
|
+
jumpParamValue = this.jumpParamKey.split(':')[1]
|
|
1021
|
+
}
|
|
1022
|
+
val += `${item[con.from]}¯${jumpParamKey}:${
|
|
1023
|
+
this.selectOrgs[index][jumpParamValue]
|
|
1024
|
+
},`
|
|
1025
|
+
} else {
|
|
1026
|
+
val += item[con.from] + ','
|
|
1027
|
+
}
|
|
832
1028
|
})
|
|
833
1029
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
834
1030
|
utils.setValueByPath(
|
|
@@ -913,19 +1109,46 @@
|
|
|
913
1109
|
pageBean.pageBean = { page: 1, pageSize: 10, showTotal: true }
|
|
914
1110
|
}
|
|
915
1111
|
//用户输入的
|
|
1112
|
+
let flag = false
|
|
916
1113
|
if (this.queryParams.length != 0 && this.queryParams[0] != '') {
|
|
917
1114
|
this.conditionBind.forEach((item, index) => {
|
|
1115
|
+
// 日期范围特殊处理
|
|
1116
|
+
if (item.dbType == 'date' && item.condition == 'BETWEEN') {
|
|
1117
|
+
if (
|
|
1118
|
+
(this.queryParams[index].startDate &&
|
|
1119
|
+
!this.queryParams[index].endDate) ||
|
|
1120
|
+
(!this.queryParams[index].startDate &&
|
|
1121
|
+
this.queryParams[index].endDate)
|
|
1122
|
+
) {
|
|
1123
|
+
flag = true
|
|
1124
|
+
this.$message.info('日期范围未填写完整!')
|
|
1125
|
+
return
|
|
1126
|
+
}
|
|
1127
|
+
if (
|
|
1128
|
+
this.queryParams[index].startDate &&
|
|
1129
|
+
this.queryParams[index].endDate
|
|
1130
|
+
) {
|
|
1131
|
+
this.queryParams[index][
|
|
1132
|
+
item.field
|
|
1133
|
+
] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
|
|
1134
|
+
} else {
|
|
1135
|
+
this.queryParams[index][item.field] = ''
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
918
1138
|
if (this.queryParams[index][item.field]) {
|
|
919
1139
|
querys.push({
|
|
920
1140
|
property: item.field,
|
|
921
1141
|
value: this.queryParams[index][item.field],
|
|
922
1142
|
group: 'main',
|
|
923
|
-
operation:
|
|
1143
|
+
operation: item.condition,
|
|
924
1144
|
relation: 'AND',
|
|
925
1145
|
})
|
|
926
1146
|
}
|
|
927
1147
|
})
|
|
928
1148
|
}
|
|
1149
|
+
if (flag) {
|
|
1150
|
+
return
|
|
1151
|
+
}
|
|
929
1152
|
//参数传入的查询拼接
|
|
930
1153
|
if (this.param) {
|
|
931
1154
|
this.param.forEach((item) => {
|
|
@@ -991,13 +1214,22 @@
|
|
|
991
1214
|
queryParamMap.total = pageBean.pageBean.total
|
|
992
1215
|
// 添加用户id 岗位id 组织id
|
|
993
1216
|
try {
|
|
994
|
-
if (
|
|
1217
|
+
if (
|
|
1218
|
+
this.$requestConfig.getUserId &&
|
|
1219
|
+
this.$requestConfig.getUserId()
|
|
1220
|
+
) {
|
|
995
1221
|
ctx.userId = this.$requestConfig.getUserId()
|
|
996
1222
|
}
|
|
997
|
-
if (
|
|
1223
|
+
if (
|
|
1224
|
+
this.$requestConfig.getOrgId &&
|
|
1225
|
+
this.$requestConfig.getOrgId()
|
|
1226
|
+
) {
|
|
998
1227
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
999
1228
|
}
|
|
1000
|
-
if (
|
|
1229
|
+
if (
|
|
1230
|
+
this.$requestConfig.getPostId &&
|
|
1231
|
+
this.$requestConfig.getPostId()
|
|
1232
|
+
) {
|
|
1001
1233
|
ctx.postId = this.$requestConfig.getPostId()
|
|
1002
1234
|
}
|
|
1003
1235
|
} catch (e) {
|
|
@@ -1022,12 +1254,14 @@
|
|
|
1022
1254
|
value: queryParamMap[bindKey] || ctx[bindKey] || '',
|
|
1023
1255
|
}
|
|
1024
1256
|
})
|
|
1025
|
-
param.querys = queryList
|
|
1257
|
+
param.querys = queryList || []
|
|
1026
1258
|
if (this.customDialog.needPage) {
|
|
1027
1259
|
param.pageBean = obj
|
|
1028
1260
|
} else {
|
|
1029
1261
|
param.pageBean.pageSize = -1
|
|
1030
1262
|
}
|
|
1263
|
+
// 日期格式的 改成数组
|
|
1264
|
+
// this.changeDateFormat(param)
|
|
1031
1265
|
//构造请求的参数
|
|
1032
1266
|
let requestParam = {
|
|
1033
1267
|
pageBean: param,
|
|
@@ -1067,6 +1301,21 @@
|
|
|
1067
1301
|
}
|
|
1068
1302
|
this.tableRadioVal = ''
|
|
1069
1303
|
},
|
|
1304
|
+
changeDateFormat(param) {
|
|
1305
|
+
let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
|
|
1306
|
+
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$/
|
|
1307
|
+
Object.keys(param).forEach((key) => {
|
|
1308
|
+
if (
|
|
1309
|
+
param[key] &&
|
|
1310
|
+
typeof param[key] == 'string' &&
|
|
1311
|
+
param[key].includes(',') &&
|
|
1312
|
+
(dateValidate1.test(param[key].split(',')[0]) ||
|
|
1313
|
+
dateValidate2.test(param[key].split(',')[0]))
|
|
1314
|
+
) {
|
|
1315
|
+
param[key] = param[key].split(',')
|
|
1316
|
+
}
|
|
1317
|
+
})
|
|
1318
|
+
},
|
|
1070
1319
|
getSearchValueByKey() {
|
|
1071
1320
|
let queryParamsObj = {}
|
|
1072
1321
|
if (this.queryParams.length > 0) {
|
|
@@ -1321,6 +1570,8 @@
|
|
|
1321
1570
|
},
|
|
1322
1571
|
// 同步选择结果
|
|
1323
1572
|
syncInputValue() {
|
|
1573
|
+
// 对话框跳转url需要两个参数 1当前控件绑定的对象参数modelName 2对话框配置中配置的key名称
|
|
1574
|
+
// 同步值时,如果有绑定url跳转参数,值格式为 名称¯跳转key:跳转value
|
|
1324
1575
|
let thisIndex = null //当前数据所在下标
|
|
1325
1576
|
let parentIndex = null //父节点所在下标
|
|
1326
1577
|
if (this.$parent.$el) {
|
|
@@ -1408,13 +1659,49 @@
|
|
|
1408
1659
|
}
|
|
1409
1660
|
}
|
|
1410
1661
|
}
|
|
1662
|
+
// 如果是查询中使用的对话框
|
|
1663
|
+
if (this.dialogType == 'search') {
|
|
1664
|
+
let returnVal = []
|
|
1665
|
+
str.forEach((item) => {
|
|
1666
|
+
returnVal.push(decodeURIComponent(item[this.modelName]))
|
|
1667
|
+
})
|
|
1668
|
+
this.$emit('updateInput', returnVal.join(','))
|
|
1669
|
+
return
|
|
1670
|
+
}
|
|
1411
1671
|
const pInst = utils.getOnlineFormInstance(this)
|
|
1412
1672
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
1413
1673
|
var val = ''
|
|
1414
1674
|
var from = con.from.toLowerCase()
|
|
1415
1675
|
str.forEach((item) => {
|
|
1676
|
+
// 如果有绑定url跳转参数 需获取跳转参数的key
|
|
1416
1677
|
if (item) {
|
|
1417
|
-
|
|
1678
|
+
if (
|
|
1679
|
+
this.jumpParamKey &&
|
|
1680
|
+
this.isHaveJumpUrl &&
|
|
1681
|
+
(this.modelName == 'data.' + con['target'][0] ||
|
|
1682
|
+
(this.modelName.includes('item.') &&
|
|
1683
|
+
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
1684
|
+
) {
|
|
1685
|
+
// 如果有冒号 冒号前面是传值key 后面是取值key
|
|
1686
|
+
let jumpParamKey = this.jumpParamKey
|
|
1687
|
+
let jumpParamValue = this.jumpParamKey
|
|
1688
|
+
if (this.jumpParamKey.includes(':')) {
|
|
1689
|
+
jumpParamKey = this.jumpParamKey.split(':')[0]
|
|
1690
|
+
jumpParamValue = this.jumpParamKey.split(':')[1]
|
|
1691
|
+
}
|
|
1692
|
+
// 需根据key 找到对应 返回数据的返回名称
|
|
1693
|
+
let returnMap = returnStr.find((k) => {
|
|
1694
|
+
return (
|
|
1695
|
+
k.field.toLowerCase() == jumpParamValue.toLowerCase()
|
|
1696
|
+
)
|
|
1697
|
+
})
|
|
1698
|
+
let returnMapKey = returnMap ? returnMap.comment : ''
|
|
1699
|
+
val += `${decodeURIComponent(item[from])}¯${
|
|
1700
|
+
jumpParamKey
|
|
1701
|
+
}:${decodeURIComponent(item[returnMapKey])},`
|
|
1702
|
+
} else {
|
|
1703
|
+
val += decodeURIComponent(item[from]) + ','
|
|
1704
|
+
}
|
|
1418
1705
|
}
|
|
1419
1706
|
})
|
|
1420
1707
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
@@ -1455,7 +1742,6 @@
|
|
|
1455
1742
|
const _val = val.substring(0, val.length - 1)
|
|
1456
1743
|
if (path) {
|
|
1457
1744
|
if (this.modelName && this.modelName.endsWith(path)) {
|
|
1458
|
-
// this.$emit('input', _val)
|
|
1459
1745
|
this.$emit('updateInput', _val)
|
|
1460
1746
|
}
|
|
1461
1747
|
utils.setValueByPath(
|
|
@@ -1807,19 +2093,56 @@
|
|
|
1807
2093
|
margin-top: 10px;
|
|
1808
2094
|
}
|
|
1809
2095
|
|
|
1810
|
-
.middle-header {
|
|
2096
|
+
::v-deep .middle-header {
|
|
1811
2097
|
height: unset !important;
|
|
1812
2098
|
display: flex;
|
|
1813
2099
|
flex-direction: row;
|
|
1814
2100
|
flex-wrap: wrap;
|
|
2101
|
+
padding-top: 15px;
|
|
1815
2102
|
.search-item {
|
|
1816
2103
|
display: flex;
|
|
1817
2104
|
// width: 33.33%;
|
|
1818
|
-
margin-right:
|
|
2105
|
+
margin-right: 10px;
|
|
1819
2106
|
align-items: center;
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
2107
|
+
width: 374px;
|
|
2108
|
+
margin-bottom: 15px;
|
|
2109
|
+
> p {
|
|
2110
|
+
margin: 0;
|
|
2111
|
+
padding: 0;
|
|
2112
|
+
width: 100px;
|
|
2113
|
+
overflow: hidden;
|
|
2114
|
+
white-space: nowrap;
|
|
2115
|
+
text-overflow: ellipsis;
|
|
2116
|
+
text-align: right;
|
|
2117
|
+
margin-right: 5px;
|
|
2118
|
+
font-size: 14px;
|
|
2119
|
+
}
|
|
2120
|
+
.search-item_main {
|
|
2121
|
+
flex: 1;
|
|
2122
|
+
overflow: hidden;
|
|
2123
|
+
.inputs.ht-form-inputs__inline {
|
|
2124
|
+
width: 100%;
|
|
2125
|
+
.inputs.ht-form-inputs__inline {
|
|
2126
|
+
width: 100%;
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
> .el-input {
|
|
2131
|
+
width: 100%;
|
|
2132
|
+
}
|
|
2133
|
+
.search-item_date {
|
|
2134
|
+
display: flex;
|
|
2135
|
+
align-items: center;
|
|
2136
|
+
width: 100%;
|
|
2137
|
+
.inputs.ht-form-inputs__inline {
|
|
2138
|
+
flex: 1;
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
.el-date-editor.el-input,
|
|
2142
|
+
.el-date-editor.el-input__inner {
|
|
2143
|
+
width: 100%;
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
1823
2146
|
}
|
|
1824
2147
|
}
|
|
1825
2148
|
|