three-trees-ui 1.0.17 → 1.0.19
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 +1625 -962
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +1625 -962
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/Autocomplete/src/main.vue +1 -0
- package/packages/Avatar/src/AvatarImage.vue +1 -1
- package/packages/Button/src/main.vue +1 -0
- package/packages/Cascader/src/main.vue +1 -0
- package/packages/Checkbox/src/main.vue +1 -0
- package/packages/CustomDialog/src/customDialog.vue +488 -165
- package/packages/CustomDialog/src/customMobileDialog.vue +466 -155
- package/packages/CustomDialog/src/main.vue +204 -12
- package/packages/Date/src/main.vue +1 -0
- package/packages/DatePicker/src/main.vue +1 -0
- package/packages/Demension/src/main.vue +1 -1
- package/packages/Dictionary/src/main.vue +1 -0
- package/packages/DimensionSelector/src/main.vue +3 -0
- package/packages/DimensionSelectorInput/src/main.vue +1 -0
- package/packages/Divider/src/main.vue +1 -0
- package/packages/Editor/src/main.vue +7 -7
- package/packages/File/src/main.vue +1 -0
- package/packages/Global/src/GlobalQuery.vue +0 -1
- package/packages/Iframe/src/main.vue +177 -176
- package/packages/Image/src/main.vue +12 -9
- package/packages/Input/src/main.vue +1 -0
- package/packages/JobSelector/src/main.vue +1 -0
- package/packages/JobSelectorInput/src/main.vue +1 -0
- package/packages/OrgSelector/src/main.vue +1 -0
- package/packages/OrgSelectorInput/src/OrgSelectorInput.vue +1 -0
- package/packages/PostSelector/src/main.vue +1 -0
- package/packages/PostSelectorInput/src/PostSelectorInput.vue +1 -0
- package/packages/Radio/src/main.vue +1 -0
- package/packages/Rate/src/main.vue +1 -0
- package/packages/ReadonlyInput/src/main.vue +1 -0
- package/packages/RoleSelector/src/main.vue +1 -0
- package/packages/RoleSelectorInput/src/main.vue +1 -0
- package/packages/Select/src/main.vue +1 -0
- package/packages/SelectTree/src/SelectTree.vue +1 -0
- package/packages/Switch/src/main.vue +1 -0
- package/packages/TimePicker/src/main.vue +1 -0
- package/packages/TimeSelect/src/main.vue +1 -0
- package/packages/Tree/src/main.vue +8 -3
- package/packages/UserDialog/src/main.vue +1 -1
- package/packages/UserSelector/src/main.vue +1 -0
|
@@ -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,26 @@
|
|
|
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
|
+
let reverseArr = JSON.parse(JSON.stringify(this.displayfield))
|
|
557
|
+
reverseArr.reverse()
|
|
558
|
+
return reverseArr.sort((a, b) => {
|
|
559
|
+
return a.sort > b.sort ? 1 : -1
|
|
560
|
+
})
|
|
561
|
+
},
|
|
405
562
|
},
|
|
406
563
|
watch: {
|
|
407
564
|
dialogData: {
|
|
@@ -438,143 +595,156 @@
|
|
|
438
595
|
})
|
|
439
596
|
},
|
|
440
597
|
methods: {
|
|
598
|
+
// 获取已选择的选择器数据id
|
|
599
|
+
getSelectId(data) {
|
|
600
|
+
if (!data || !data.length) {
|
|
601
|
+
return ''
|
|
602
|
+
}
|
|
603
|
+
let ids = []
|
|
604
|
+
data.forEach((item) => {
|
|
605
|
+
ids.push(item.id)
|
|
606
|
+
})
|
|
607
|
+
return ids.join(',')
|
|
608
|
+
},
|
|
441
609
|
showDialog(isMounted = false) {
|
|
442
|
-
const this_ = this
|
|
443
610
|
this.fixedParams = {}
|
|
611
|
+
// 如果已存在配置信息就不去请求配置信息 直接初始化数据
|
|
612
|
+
if (this.dialogConfig) {
|
|
613
|
+
this.initDialog(this.dialogConfig, isMounted)
|
|
614
|
+
return
|
|
615
|
+
}
|
|
444
616
|
var alias = this.custdialog.custDialog.alias
|
|
445
617
|
this.$requestConfig
|
|
446
618
|
.getCustomDialogByAlias(alias)
|
|
447
619
|
.then((customDialog) => {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
620
|
+
this.initDialog(customDialog, isMounted)
|
|
621
|
+
})
|
|
622
|
+
},
|
|
623
|
+
initDialog(customDialog, isMounted) {
|
|
624
|
+
let alias = this.custdialog.custDialog.alias
|
|
625
|
+
const this_ = this
|
|
626
|
+
if (!customDialog || !customDialog.alias) {
|
|
627
|
+
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
628
|
+
return
|
|
629
|
+
}
|
|
630
|
+
if (customDialog.style == 1) {
|
|
631
|
+
var displaylist = JSON.parse(customDialog.displayfield)
|
|
632
|
+
this_.nodeKey = displaylist.id
|
|
633
|
+
}
|
|
634
|
+
if (customDialog.needPage && customDialog.requestType === 'POST') {
|
|
635
|
+
let obj = {}
|
|
636
|
+
this.getLastKeyByPath(obj, customDialog.pageKey, 1)
|
|
637
|
+
this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
|
|
638
|
+
this.getLastKeyByPath(obj, customDialog.totalKey, true)
|
|
639
|
+
const exp = utils.parseExp(customDialog.dataParam, obj, true)
|
|
640
|
+
if (exp) {
|
|
641
|
+
const params = JSON.parse(exp)
|
|
642
|
+
if (params.pageBean) {
|
|
643
|
+
this.pagination = {
|
|
644
|
+
...params.pageBean,
|
|
469
645
|
}
|
|
470
646
|
}
|
|
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
|
-
})
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
//对话框按表单字段查询(参数传入的)
|
|
650
|
+
let bindList = this_.custdialog.custDialog.conditions
|
|
651
|
+
this_.param = [] //绑定的表单字段
|
|
652
|
+
if (bindList.length > 0) {
|
|
653
|
+
bindList.forEach((ele) => {
|
|
654
|
+
//绑定表单字段
|
|
655
|
+
if (
|
|
656
|
+
ele.bind &&
|
|
657
|
+
(ele.defaultType == '3' || ele.bind.startsWith('data.searchForm'))
|
|
658
|
+
) {
|
|
659
|
+
let obj = {}
|
|
660
|
+
obj.field = ele.field
|
|
661
|
+
obj.bind = ele.bind
|
|
662
|
+
obj.bindType = ele.bindType
|
|
663
|
+
this_.param.push(obj)
|
|
495
664
|
}
|
|
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
|
-
}
|
|
665
|
+
//取值对象为脚本时获取value
|
|
666
|
+
if (ele.bindType === 3) {
|
|
667
|
+
this_.$requestConfig.executeScript(ele.bind).then((res) => {
|
|
668
|
+
this_.executeScriptResult = res && res.value
|
|
516
669
|
})
|
|
517
|
-
this.$set(this, 'queryParams', queryParams)
|
|
518
|
-
this.$set(this, 'placeholders', placeholders)
|
|
519
670
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
671
|
+
})
|
|
672
|
+
}
|
|
673
|
+
//判断对话框查询是否有条件
|
|
674
|
+
let userInputList = JSON.parse(customDialog.conditionfield)
|
|
675
|
+
this_.quickSearch = '' //填写提示 placeholder
|
|
676
|
+
this_.conditionBind = []
|
|
677
|
+
let queryParams = []
|
|
678
|
+
let placeholders = []
|
|
679
|
+
if (userInputList.length > 0) {
|
|
680
|
+
userInputList.forEach((ele) => {
|
|
681
|
+
var obj = {}
|
|
682
|
+
//条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
|
|
683
|
+
if (ele.defaultType == '1') {
|
|
684
|
+
obj[ele.field] = ''
|
|
685
|
+
queryParams.push(obj)
|
|
686
|
+
// queryParams[ele.field] = "";
|
|
687
|
+
this_.conditionBind.push(ele)
|
|
688
|
+
placeholders.push('请输入' + ele.comment)
|
|
525
689
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
if (window.screen.height && window.screen.height <= 900) {
|
|
529
|
-
this.style = 'height:440px'
|
|
690
|
+
if (ele.defaultType == '2' && ele.defaultValue) {
|
|
691
|
+
this_.fixedParams[ele.field] = ele.defaultValue
|
|
530
692
|
}
|
|
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)
|
|
693
|
+
})
|
|
694
|
+
this.$set(this, 'queryParams', queryParams)
|
|
695
|
+
this.$set(this, 'placeholders', placeholders)
|
|
696
|
+
}
|
|
697
|
+
//判断是否显示条件查询输入框
|
|
698
|
+
if (this_.quickSearch != '') {
|
|
699
|
+
this_.querysShow = true
|
|
700
|
+
} else {
|
|
701
|
+
this_.querysShow = true
|
|
702
|
+
}
|
|
703
|
+
this_.quickSearch = '请输入' + this.quickSearch + '查询'
|
|
704
|
+
this_.style = 'height:' + customDialog.height + 'px'
|
|
705
|
+
if (window.screen.height && window.screen.height <= 900) {
|
|
706
|
+
this.style = 'height:440px'
|
|
707
|
+
}
|
|
708
|
+
if (customDialog.style == 0 || customDialog.style == 2) {
|
|
709
|
+
//列表
|
|
710
|
+
setTimeout(() => {
|
|
711
|
+
this_.customDialogShow(
|
|
712
|
+
{
|
|
713
|
+
alias: alias,
|
|
714
|
+
customDialog: customDialog,
|
|
715
|
+
},
|
|
716
|
+
isMounted
|
|
717
|
+
)
|
|
718
|
+
}, 100)
|
|
719
|
+
} else if (customDialog.style == 1) {
|
|
720
|
+
//树形
|
|
721
|
+
this_.pageParam = { alias: alias, customDialog: customDialog }
|
|
722
|
+
this_.customDialog = customDialog
|
|
723
|
+
let param = {}
|
|
724
|
+
this_.conditionfieldTree = []
|
|
725
|
+
//判断是否存在条件
|
|
726
|
+
if (customDialog.conditionfield) {
|
|
727
|
+
this_.conditionfieldTree = JSON.parse(customDialog.conditionfield)
|
|
728
|
+
if (this_.conditionfieldTree.length > 0) {
|
|
729
|
+
for (let i = this_.conditionfieldTree.length - 1; i >= 0; i--) {
|
|
730
|
+
//判断条件字段是否是动态传入(defaultType:4:动态传入,2:固定值 )
|
|
731
|
+
if (this_.conditionfieldTree[i].defaultType == '4') {
|
|
732
|
+
param[this_.conditionfieldTree[i].field] =
|
|
733
|
+
this_.conditionfieldTree[i].comment
|
|
574
734
|
}
|
|
575
735
|
}
|
|
576
736
|
}
|
|
577
|
-
}
|
|
737
|
+
}
|
|
738
|
+
//有动态传入的字段
|
|
739
|
+
if (!isMounted) {
|
|
740
|
+
if (JSON.stringify(param) != '{}') {
|
|
741
|
+
this_.dialogVisible = true
|
|
742
|
+
} else {
|
|
743
|
+
//无动态传入的字段
|
|
744
|
+
this_.customDialogTreeShow(this_.pageParam)
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
578
748
|
},
|
|
579
749
|
initTableHeight() {
|
|
580
750
|
this.$nextTick(() => {
|
|
@@ -724,13 +894,22 @@
|
|
|
724
894
|
}
|
|
725
895
|
// 添加用户id 岗位id 组织id
|
|
726
896
|
try {
|
|
727
|
-
if (
|
|
897
|
+
if (
|
|
898
|
+
this.$requestConfig.getUserId &&
|
|
899
|
+
this.$requestConfig.getUserId()
|
|
900
|
+
) {
|
|
728
901
|
ctx.userId = this.$requestConfig.getUserId()
|
|
729
902
|
}
|
|
730
|
-
if (
|
|
903
|
+
if (
|
|
904
|
+
this.$requestConfig.getOrgId &&
|
|
905
|
+
this.$requestConfig.getOrgId()
|
|
906
|
+
) {
|
|
731
907
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
732
908
|
}
|
|
733
|
-
if (
|
|
909
|
+
if (
|
|
910
|
+
this.$requestConfig.getPostId &&
|
|
911
|
+
this.$requestConfig.getPostId()
|
|
912
|
+
) {
|
|
734
913
|
ctx.postId = this.$requestConfig.getPostId()
|
|
735
914
|
}
|
|
736
915
|
} catch (e) {
|
|
@@ -827,8 +1006,27 @@
|
|
|
827
1006
|
this.selectOrgs = this.convertComment2Field(str, field)
|
|
828
1007
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
829
1008
|
var val = ''
|
|
830
|
-
str.forEach((item) => {
|
|
831
|
-
|
|
1009
|
+
str.forEach((item, index) => {
|
|
1010
|
+
// 此处添加url跳转参数保存逻辑
|
|
1011
|
+
if (
|
|
1012
|
+
this.jumpParamKey &&
|
|
1013
|
+
this.isHaveJumpUrl &&
|
|
1014
|
+
(this.modelName == 'data.' + con['target'][0] ||
|
|
1015
|
+
(this.modelName.includes('item.') &&
|
|
1016
|
+
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
1017
|
+
) {
|
|
1018
|
+
let jumpParamKey = this.jumpParamKey
|
|
1019
|
+
let jumpParamValue = this.jumpParamKey
|
|
1020
|
+
if (this.jumpParamKey.includes(':')) {
|
|
1021
|
+
jumpParamKey = this.jumpParamKey.split(':')[0]
|
|
1022
|
+
jumpParamValue = this.jumpParamKey.split(':')[1]
|
|
1023
|
+
}
|
|
1024
|
+
val += `${item[con.from]}¯${jumpParamKey}:${
|
|
1025
|
+
this.selectOrgs[index][jumpParamValue]
|
|
1026
|
+
},`
|
|
1027
|
+
} else {
|
|
1028
|
+
val += item[con.from] + ','
|
|
1029
|
+
}
|
|
832
1030
|
})
|
|
833
1031
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
834
1032
|
utils.setValueByPath(
|
|
@@ -913,19 +1111,46 @@
|
|
|
913
1111
|
pageBean.pageBean = { page: 1, pageSize: 10, showTotal: true }
|
|
914
1112
|
}
|
|
915
1113
|
//用户输入的
|
|
1114
|
+
let flag = false
|
|
916
1115
|
if (this.queryParams.length != 0 && this.queryParams[0] != '') {
|
|
917
1116
|
this.conditionBind.forEach((item, index) => {
|
|
1117
|
+
// 日期范围特殊处理
|
|
1118
|
+
if (item.dbType == 'date' && item.condition == 'BETWEEN') {
|
|
1119
|
+
if (
|
|
1120
|
+
(this.queryParams[index].startDate &&
|
|
1121
|
+
!this.queryParams[index].endDate) ||
|
|
1122
|
+
(!this.queryParams[index].startDate &&
|
|
1123
|
+
this.queryParams[index].endDate)
|
|
1124
|
+
) {
|
|
1125
|
+
flag = true
|
|
1126
|
+
this.$message.info('日期范围未填写完整!')
|
|
1127
|
+
return
|
|
1128
|
+
}
|
|
1129
|
+
if (
|
|
1130
|
+
this.queryParams[index].startDate &&
|
|
1131
|
+
this.queryParams[index].endDate
|
|
1132
|
+
) {
|
|
1133
|
+
this.queryParams[index][
|
|
1134
|
+
item.field
|
|
1135
|
+
] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
|
|
1136
|
+
} else {
|
|
1137
|
+
this.queryParams[index][item.field] = ''
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
918
1140
|
if (this.queryParams[index][item.field]) {
|
|
919
1141
|
querys.push({
|
|
920
1142
|
property: item.field,
|
|
921
1143
|
value: this.queryParams[index][item.field],
|
|
922
1144
|
group: 'main',
|
|
923
|
-
operation:
|
|
1145
|
+
operation: item.condition,
|
|
924
1146
|
relation: 'AND',
|
|
925
1147
|
})
|
|
926
1148
|
}
|
|
927
1149
|
})
|
|
928
1150
|
}
|
|
1151
|
+
if (flag) {
|
|
1152
|
+
return
|
|
1153
|
+
}
|
|
929
1154
|
//参数传入的查询拼接
|
|
930
1155
|
if (this.param) {
|
|
931
1156
|
this.param.forEach((item) => {
|
|
@@ -991,13 +1216,22 @@
|
|
|
991
1216
|
queryParamMap.total = pageBean.pageBean.total
|
|
992
1217
|
// 添加用户id 岗位id 组织id
|
|
993
1218
|
try {
|
|
994
|
-
if (
|
|
1219
|
+
if (
|
|
1220
|
+
this.$requestConfig.getUserId &&
|
|
1221
|
+
this.$requestConfig.getUserId()
|
|
1222
|
+
) {
|
|
995
1223
|
ctx.userId = this.$requestConfig.getUserId()
|
|
996
1224
|
}
|
|
997
|
-
if (
|
|
1225
|
+
if (
|
|
1226
|
+
this.$requestConfig.getOrgId &&
|
|
1227
|
+
this.$requestConfig.getOrgId()
|
|
1228
|
+
) {
|
|
998
1229
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
999
1230
|
}
|
|
1000
|
-
if (
|
|
1231
|
+
if (
|
|
1232
|
+
this.$requestConfig.getPostId &&
|
|
1233
|
+
this.$requestConfig.getPostId()
|
|
1234
|
+
) {
|
|
1001
1235
|
ctx.postId = this.$requestConfig.getPostId()
|
|
1002
1236
|
}
|
|
1003
1237
|
} catch (e) {
|
|
@@ -1022,12 +1256,14 @@
|
|
|
1022
1256
|
value: queryParamMap[bindKey] || ctx[bindKey] || '',
|
|
1023
1257
|
}
|
|
1024
1258
|
})
|
|
1025
|
-
param.querys = queryList
|
|
1259
|
+
param.querys = queryList || []
|
|
1026
1260
|
if (this.customDialog.needPage) {
|
|
1027
1261
|
param.pageBean = obj
|
|
1028
1262
|
} else {
|
|
1029
1263
|
param.pageBean.pageSize = -1
|
|
1030
1264
|
}
|
|
1265
|
+
// 日期格式的 改成数组
|
|
1266
|
+
// this.changeDateFormat(param)
|
|
1031
1267
|
//构造请求的参数
|
|
1032
1268
|
let requestParam = {
|
|
1033
1269
|
pageBean: param,
|
|
@@ -1067,6 +1303,21 @@
|
|
|
1067
1303
|
}
|
|
1068
1304
|
this.tableRadioVal = ''
|
|
1069
1305
|
},
|
|
1306
|
+
changeDateFormat(param) {
|
|
1307
|
+
let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
|
|
1308
|
+
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$/
|
|
1309
|
+
Object.keys(param).forEach((key) => {
|
|
1310
|
+
if (
|
|
1311
|
+
param[key] &&
|
|
1312
|
+
typeof param[key] == 'string' &&
|
|
1313
|
+
param[key].includes(',') &&
|
|
1314
|
+
(dateValidate1.test(param[key].split(',')[0]) ||
|
|
1315
|
+
dateValidate2.test(param[key].split(',')[0]))
|
|
1316
|
+
) {
|
|
1317
|
+
param[key] = param[key].split(',')
|
|
1318
|
+
}
|
|
1319
|
+
})
|
|
1320
|
+
},
|
|
1070
1321
|
getSearchValueByKey() {
|
|
1071
1322
|
let queryParamsObj = {}
|
|
1072
1323
|
if (this.queryParams.length > 0) {
|
|
@@ -1321,6 +1572,8 @@
|
|
|
1321
1572
|
},
|
|
1322
1573
|
// 同步选择结果
|
|
1323
1574
|
syncInputValue() {
|
|
1575
|
+
// 对话框跳转url需要两个参数 1当前控件绑定的对象参数modelName 2对话框配置中配置的key名称
|
|
1576
|
+
// 同步值时,如果有绑定url跳转参数,值格式为 名称¯跳转key:跳转value
|
|
1324
1577
|
let thisIndex = null //当前数据所在下标
|
|
1325
1578
|
let parentIndex = null //父节点所在下标
|
|
1326
1579
|
if (this.$parent.$el) {
|
|
@@ -1408,13 +1661,47 @@
|
|
|
1408
1661
|
}
|
|
1409
1662
|
}
|
|
1410
1663
|
}
|
|
1664
|
+
// 如果是查询中使用的对话框
|
|
1665
|
+
if (this.dialogType == 'search') {
|
|
1666
|
+
let returnVal = []
|
|
1667
|
+
str.forEach((item) => {
|
|
1668
|
+
returnVal.push(decodeURIComponent(item[this.modelName]))
|
|
1669
|
+
})
|
|
1670
|
+
this.$emit('updateInput', returnVal.join(','))
|
|
1671
|
+
return
|
|
1672
|
+
}
|
|
1411
1673
|
const pInst = utils.getOnlineFormInstance(this)
|
|
1412
1674
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
1413
1675
|
var val = ''
|
|
1414
1676
|
var from = con.from.toLowerCase()
|
|
1415
1677
|
str.forEach((item) => {
|
|
1678
|
+
// 如果有绑定url跳转参数 需获取跳转参数的key
|
|
1416
1679
|
if (item) {
|
|
1417
|
-
|
|
1680
|
+
if (
|
|
1681
|
+
this.jumpParamKey &&
|
|
1682
|
+
this.isHaveJumpUrl &&
|
|
1683
|
+
(this.modelName == 'data.' + con['target'][0] ||
|
|
1684
|
+
(this.modelName.includes('item.') &&
|
|
1685
|
+
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
1686
|
+
) {
|
|
1687
|
+
// 如果有冒号 冒号前面是传值key 后面是取值key
|
|
1688
|
+
let jumpParamKey = this.jumpParamKey
|
|
1689
|
+
let jumpParamValue = this.jumpParamKey
|
|
1690
|
+
if (this.jumpParamKey.includes(':')) {
|
|
1691
|
+
jumpParamKey = this.jumpParamKey.split(':')[0]
|
|
1692
|
+
jumpParamValue = this.jumpParamKey.split(':')[1]
|
|
1693
|
+
}
|
|
1694
|
+
// 需根据key 找到对应 返回数据的返回名称
|
|
1695
|
+
let returnMap = returnStr.find((k) => {
|
|
1696
|
+
return k.field.toLowerCase() == jumpParamValue.toLowerCase()
|
|
1697
|
+
})
|
|
1698
|
+
let returnMapKey = returnMap ? returnMap.comment : ''
|
|
1699
|
+
val += `${decodeURIComponent(
|
|
1700
|
+
item[from]
|
|
1701
|
+
)}¯${jumpParamKey}:${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
|
|