three-trees-ui 1.0.13 → 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 +464 -1036
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +464 -1036
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/CustomDialog/src/customDialog.vue +165 -475
- package/packages/CustomDialog/src/customMobileDialog.vue +155 -453
- package/packages/CustomDialog/src/main.vue +8 -150
- 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,142 +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="
|
|
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>
|
|
248
114
|
</div>
|
|
249
115
|
<div
|
|
250
116
|
v-if="conditionBind && conditionBind.length > 0"
|
|
@@ -308,11 +174,12 @@
|
|
|
308
174
|
label="序号"
|
|
309
175
|
></el-table-column>
|
|
310
176
|
<el-table-column
|
|
311
|
-
v-for="field in
|
|
177
|
+
v-for="field in displayfield"
|
|
312
178
|
:key="field.field"
|
|
179
|
+
:show-overflow-tooltip="true"
|
|
313
180
|
:prop="field.field"
|
|
314
181
|
:label="field.comment"
|
|
315
|
-
|
|
182
|
+
style="width: 100%"
|
|
316
183
|
></el-table-column>
|
|
317
184
|
</el-table>
|
|
318
185
|
</el-main>
|
|
@@ -461,13 +328,9 @@
|
|
|
461
328
|
type: Boolean,
|
|
462
329
|
default: false,
|
|
463
330
|
},
|
|
464
|
-
dialogConfig: Object,
|
|
465
|
-
dialogType: String,
|
|
466
331
|
},
|
|
467
332
|
data() {
|
|
468
333
|
return {
|
|
469
|
-
startDate: '', // 日期控件
|
|
470
|
-
endDate: '', // 日期控件
|
|
471
334
|
tableHeight: 350,
|
|
472
335
|
isEditInputShow: false,
|
|
473
336
|
customValue: '',
|
|
@@ -539,24 +402,6 @@
|
|
|
539
402
|
}
|
|
540
403
|
return []
|
|
541
404
|
},
|
|
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
|
-
},
|
|
560
405
|
},
|
|
561
406
|
watch: {
|
|
562
407
|
dialogData: {
|
|
@@ -593,156 +438,143 @@
|
|
|
593
438
|
})
|
|
594
439
|
},
|
|
595
440
|
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
|
-
},
|
|
607
441
|
showDialog(isMounted = false) {
|
|
442
|
+
const this_ = this
|
|
608
443
|
this.fixedParams = {}
|
|
609
|
-
// 如果已存在配置信息就不去请求配置信息 直接初始化数据
|
|
610
|
-
if (this.dialogConfig) {
|
|
611
|
-
this.initDialog(this.dialogConfig, isMounted)
|
|
612
|
-
return
|
|
613
|
-
}
|
|
614
444
|
var alias = this.custdialog.custDialog.alias
|
|
615
445
|
this.$requestConfig
|
|
616
446
|
.getCustomDialogByAlias(alias)
|
|
617
447
|
.then((customDialog) => {
|
|
618
|
-
|
|
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,
|
|
643
|
-
}
|
|
448
|
+
if (!customDialog || !customDialog.alias) {
|
|
449
|
+
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
450
|
+
return
|
|
644
451
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
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
|
-
) {
|
|
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') {
|
|
657
457
|
let obj = {}
|
|
658
|
-
obj.
|
|
659
|
-
obj.
|
|
660
|
-
obj.
|
|
661
|
-
|
|
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
|
+
}
|
|
662
470
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
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
|
+
}
|
|
667
494
|
})
|
|
668
495
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
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)
|
|
687
519
|
}
|
|
688
|
-
|
|
689
|
-
|
|
520
|
+
//判断是否显示条件查询输入框
|
|
521
|
+
if (this_.quickSearch != '') {
|
|
522
|
+
this_.querysShow = true
|
|
523
|
+
} else {
|
|
524
|
+
this_.querysShow = true
|
|
690
525
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
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)
|
|
732
574
|
}
|
|
733
575
|
}
|
|
734
576
|
}
|
|
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
|
-
}
|
|
577
|
+
})
|
|
746
578
|
},
|
|
747
579
|
initTableHeight() {
|
|
748
580
|
this.$nextTick(() => {
|
|
@@ -892,22 +724,13 @@
|
|
|
892
724
|
}
|
|
893
725
|
// 添加用户id 岗位id 组织id
|
|
894
726
|
try {
|
|
895
|
-
if (
|
|
896
|
-
this.$requestConfig.getUserId &&
|
|
897
|
-
this.$requestConfig.getUserId()
|
|
898
|
-
) {
|
|
727
|
+
if (this.$requestConfig.getUserId()) {
|
|
899
728
|
ctx.userId = this.$requestConfig.getUserId()
|
|
900
729
|
}
|
|
901
|
-
if (
|
|
902
|
-
this.$requestConfig.getOrgId &&
|
|
903
|
-
this.$requestConfig.getOrgId()
|
|
904
|
-
) {
|
|
730
|
+
if (this.$requestConfig.getOrgId()) {
|
|
905
731
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
906
732
|
}
|
|
907
|
-
if (
|
|
908
|
-
this.$requestConfig.getPostId &&
|
|
909
|
-
this.$requestConfig.getPostId()
|
|
910
|
-
) {
|
|
733
|
+
if (this.$requestConfig.getPostId()) {
|
|
911
734
|
ctx.postId = this.$requestConfig.getPostId()
|
|
912
735
|
}
|
|
913
736
|
} catch (e) {
|
|
@@ -1004,21 +827,8 @@
|
|
|
1004
827
|
this.selectOrgs = this.convertComment2Field(str, field)
|
|
1005
828
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
1006
829
|
var val = ''
|
|
1007
|
-
str.forEach((item
|
|
1008
|
-
|
|
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
|
-
val += `${item[con.from]}¯${this.jumpParamKey}:${
|
|
1017
|
-
this.selectOrgs[index][this.jumpParamKey]
|
|
1018
|
-
},`
|
|
1019
|
-
} else {
|
|
1020
|
-
val += item[con.from] + ','
|
|
1021
|
-
}
|
|
830
|
+
str.forEach((item) => {
|
|
831
|
+
val += item[con.from] + ','
|
|
1022
832
|
})
|
|
1023
833
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
1024
834
|
utils.setValueByPath(
|
|
@@ -1103,46 +913,19 @@
|
|
|
1103
913
|
pageBean.pageBean = { page: 1, pageSize: 10, showTotal: true }
|
|
1104
914
|
}
|
|
1105
915
|
//用户输入的
|
|
1106
|
-
let flag = false
|
|
1107
916
|
if (this.queryParams.length != 0 && this.queryParams[0] != '') {
|
|
1108
917
|
this.conditionBind.forEach((item, index) => {
|
|
1109
|
-
// 日期范围特殊处理
|
|
1110
|
-
if (item.dbType == 'date' && item.condition == 'BETWEEN') {
|
|
1111
|
-
if (
|
|
1112
|
-
(this.queryParams[index].startDate &&
|
|
1113
|
-
!this.queryParams[index].endDate) ||
|
|
1114
|
-
(!this.queryParams[index].startDate &&
|
|
1115
|
-
this.queryParams[index].endDate)
|
|
1116
|
-
) {
|
|
1117
|
-
flag = true
|
|
1118
|
-
this.$message.info('日期范围未填写完整!')
|
|
1119
|
-
return
|
|
1120
|
-
}
|
|
1121
|
-
if (
|
|
1122
|
-
this.queryParams[index].startDate &&
|
|
1123
|
-
this.queryParams[index].endDate
|
|
1124
|
-
) {
|
|
1125
|
-
this.queryParams[index][
|
|
1126
|
-
item.field
|
|
1127
|
-
] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
|
|
1128
|
-
} else {
|
|
1129
|
-
this.queryParams[index][item.field] = ''
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
918
|
if (this.queryParams[index][item.field]) {
|
|
1133
919
|
querys.push({
|
|
1134
920
|
property: item.field,
|
|
1135
921
|
value: this.queryParams[index][item.field],
|
|
1136
922
|
group: 'main',
|
|
1137
|
-
operation:
|
|
923
|
+
operation: 'LIKE',
|
|
1138
924
|
relation: 'AND',
|
|
1139
925
|
})
|
|
1140
926
|
}
|
|
1141
927
|
})
|
|
1142
928
|
}
|
|
1143
|
-
if (flag) {
|
|
1144
|
-
return
|
|
1145
|
-
}
|
|
1146
929
|
//参数传入的查询拼接
|
|
1147
930
|
if (this.param) {
|
|
1148
931
|
this.param.forEach((item) => {
|
|
@@ -1208,22 +991,13 @@
|
|
|
1208
991
|
queryParamMap.total = pageBean.pageBean.total
|
|
1209
992
|
// 添加用户id 岗位id 组织id
|
|
1210
993
|
try {
|
|
1211
|
-
if (
|
|
1212
|
-
this.$requestConfig.getUserId &&
|
|
1213
|
-
this.$requestConfig.getUserId()
|
|
1214
|
-
) {
|
|
994
|
+
if (this.$requestConfig.getUserId()) {
|
|
1215
995
|
ctx.userId = this.$requestConfig.getUserId()
|
|
1216
996
|
}
|
|
1217
|
-
if (
|
|
1218
|
-
this.$requestConfig.getOrgId &&
|
|
1219
|
-
this.$requestConfig.getOrgId()
|
|
1220
|
-
) {
|
|
997
|
+
if (this.$requestConfig.getOrgId()) {
|
|
1221
998
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
1222
999
|
}
|
|
1223
|
-
if (
|
|
1224
|
-
this.$requestConfig.getPostId &&
|
|
1225
|
-
this.$requestConfig.getPostId()
|
|
1226
|
-
) {
|
|
1000
|
+
if (this.$requestConfig.getPostId()) {
|
|
1227
1001
|
ctx.postId = this.$requestConfig.getPostId()
|
|
1228
1002
|
}
|
|
1229
1003
|
} catch (e) {
|
|
@@ -1248,14 +1022,12 @@
|
|
|
1248
1022
|
value: queryParamMap[bindKey] || ctx[bindKey] || '',
|
|
1249
1023
|
}
|
|
1250
1024
|
})
|
|
1251
|
-
param.querys = queryList
|
|
1025
|
+
param.querys = queryList
|
|
1252
1026
|
if (this.customDialog.needPage) {
|
|
1253
1027
|
param.pageBean = obj
|
|
1254
1028
|
} else {
|
|
1255
1029
|
param.pageBean.pageSize = -1
|
|
1256
1030
|
}
|
|
1257
|
-
// 日期格式的 改成数组
|
|
1258
|
-
// this.changeDateFormat(param)
|
|
1259
1031
|
//构造请求的参数
|
|
1260
1032
|
let requestParam = {
|
|
1261
1033
|
pageBean: param,
|
|
@@ -1295,21 +1067,6 @@
|
|
|
1295
1067
|
}
|
|
1296
1068
|
this.tableRadioVal = ''
|
|
1297
1069
|
},
|
|
1298
|
-
changeDateFormat(param) {
|
|
1299
|
-
let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
|
|
1300
|
-
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$/
|
|
1301
|
-
Object.keys(param).forEach((key) => {
|
|
1302
|
-
if (
|
|
1303
|
-
param[key] &&
|
|
1304
|
-
typeof param[key] == 'string' &&
|
|
1305
|
-
param[key].includes(',') &&
|
|
1306
|
-
(dateValidate1.test(param[key].split(',')[0]) ||
|
|
1307
|
-
dateValidate2.test(param[key].split(',')[0]))
|
|
1308
|
-
) {
|
|
1309
|
-
param[key] = param[key].split(',')
|
|
1310
|
-
}
|
|
1311
|
-
})
|
|
1312
|
-
},
|
|
1313
1070
|
getSearchValueByKey() {
|
|
1314
1071
|
let queryParamsObj = {}
|
|
1315
1072
|
if (this.queryParams.length > 0) {
|
|
@@ -1564,8 +1321,6 @@
|
|
|
1564
1321
|
},
|
|
1565
1322
|
// 同步选择结果
|
|
1566
1323
|
syncInputValue() {
|
|
1567
|
-
// 对话框跳转url需要两个参数 1当前控件绑定的对象参数modelName 2对话框配置中配置的key名称
|
|
1568
|
-
// 同步值时,如果有绑定url跳转参数,值格式为 名称¯跳转key:跳转value
|
|
1569
1324
|
let thisIndex = null //当前数据所在下标
|
|
1570
1325
|
let parentIndex = null //父节点所在下标
|
|
1571
1326
|
if (this.$parent.$el) {
|
|
@@ -1653,42 +1408,13 @@
|
|
|
1653
1408
|
}
|
|
1654
1409
|
}
|
|
1655
1410
|
}
|
|
1656
|
-
// 如果是查询中使用的对话框
|
|
1657
|
-
if (this.dialogType == 'search') {
|
|
1658
|
-
let returnVal = []
|
|
1659
|
-
str.forEach((item) => {
|
|
1660
|
-
returnVal.push(decodeURIComponent(item[this.modelName]))
|
|
1661
|
-
})
|
|
1662
|
-
this.$emit('updateInput', returnVal.join(','))
|
|
1663
|
-
return
|
|
1664
|
-
}
|
|
1665
1411
|
const pInst = utils.getOnlineFormInstance(this)
|
|
1666
1412
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
1667
1413
|
var val = ''
|
|
1668
1414
|
var from = con.from.toLowerCase()
|
|
1669
1415
|
str.forEach((item) => {
|
|
1670
|
-
// 如果有绑定url跳转参数 需获取跳转参数的key
|
|
1671
1416
|
if (item) {
|
|
1672
|
-
|
|
1673
|
-
this.jumpParamKey &&
|
|
1674
|
-
this.isHaveJumpUrl &&
|
|
1675
|
-
(this.modelName == 'data.' + con['target'][0] ||
|
|
1676
|
-
(this.modelName.includes('item.') &&
|
|
1677
|
-
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
1678
|
-
) {
|
|
1679
|
-
// 需根据key 找到对应 返回数据的返回名称
|
|
1680
|
-
let returnMap = returnStr.find((k) => {
|
|
1681
|
-
return (
|
|
1682
|
-
k.field.toLowerCase() == this.jumpParamKey.toLowerCase()
|
|
1683
|
-
)
|
|
1684
|
-
})
|
|
1685
|
-
let returnMapKey = returnMap ? returnMap.comment : ''
|
|
1686
|
-
val += `${decodeURIComponent(item[from])}¯${
|
|
1687
|
-
this.jumpParamKey
|
|
1688
|
-
}:${decodeURIComponent(item[returnMapKey])},`
|
|
1689
|
-
} else {
|
|
1690
|
-
val += decodeURIComponent(item[from]) + ','
|
|
1691
|
-
}
|
|
1417
|
+
val += decodeURIComponent(item[from]) + ','
|
|
1692
1418
|
}
|
|
1693
1419
|
})
|
|
1694
1420
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
@@ -1729,6 +1455,7 @@
|
|
|
1729
1455
|
const _val = val.substring(0, val.length - 1)
|
|
1730
1456
|
if (path) {
|
|
1731
1457
|
if (this.modelName && this.modelName.endsWith(path)) {
|
|
1458
|
+
// this.$emit('input', _val)
|
|
1732
1459
|
this.$emit('updateInput', _val)
|
|
1733
1460
|
}
|
|
1734
1461
|
utils.setValueByPath(
|
|
@@ -2080,56 +1807,19 @@
|
|
|
2080
1807
|
margin-top: 10px;
|
|
2081
1808
|
}
|
|
2082
1809
|
|
|
2083
|
-
|
|
1810
|
+
.middle-header {
|
|
2084
1811
|
height: unset !important;
|
|
2085
1812
|
display: flex;
|
|
2086
1813
|
flex-direction: row;
|
|
2087
1814
|
flex-wrap: wrap;
|
|
2088
|
-
padding-top: 15px;
|
|
2089
1815
|
.search-item {
|
|
2090
1816
|
display: flex;
|
|
2091
1817
|
// width: 33.33%;
|
|
2092
|
-
margin-right:
|
|
1818
|
+
margin-right: 12px;
|
|
2093
1819
|
align-items: center;
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
margin: 0;
|
|
2098
|
-
padding: 0;
|
|
2099
|
-
width: 100px;
|
|
2100
|
-
overflow: hidden;
|
|
2101
|
-
white-space: nowrap;
|
|
2102
|
-
text-overflow: ellipsis;
|
|
2103
|
-
text-align: right;
|
|
2104
|
-
margin-right: 5px;
|
|
2105
|
-
font-size: 14px;
|
|
2106
|
-
}
|
|
2107
|
-
.search-item_main {
|
|
2108
|
-
flex: 1;
|
|
2109
|
-
overflow: hidden;
|
|
2110
|
-
.inputs.ht-form-inputs__inline {
|
|
2111
|
-
width: 100%;
|
|
2112
|
-
.inputs.ht-form-inputs__inline {
|
|
2113
|
-
width: 100%;
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
> .el-input {
|
|
2118
|
-
width: 100%;
|
|
2119
|
-
}
|
|
2120
|
-
.search-item_date {
|
|
2121
|
-
display: flex;
|
|
2122
|
-
align-items: center;
|
|
2123
|
-
width: 100%;
|
|
2124
|
-
.inputs.ht-form-inputs__inline {
|
|
2125
|
-
flex: 1;
|
|
2126
|
-
}
|
|
2127
|
-
}
|
|
2128
|
-
.el-date-editor.el-input,
|
|
2129
|
-
.el-date-editor.el-input__inner {
|
|
2130
|
-
width: 100%;
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
1820
|
+
}
|
|
1821
|
+
.btn-wrap {
|
|
1822
|
+
line-height: 50px;
|
|
2133
1823
|
}
|
|
2134
1824
|
}
|
|
2135
1825
|
|