three-trees-ui 1.0.15 → 1.0.17
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 +455 -1064
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +455 -1064
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/CustomDialog/src/customDialog.vue +165 -488
- package/packages/CustomDialog/src/customMobileDialog.vue +155 -464
- package/packages/CustomDialog/src/main.vue +10 -202
- package/packages/DimensionSelector/src/main.vue +0 -2
- package/packages/Global/src/GlobalQuery.vue +5 -0
- package/packages/Input/src/main.vue +3 -0
- package/packages/Tree/src/main.vue +2 -7
- package/src/directive/formulas.js +8 -0
- package/src/mixins/permission.js +4 -0
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
class="search-item"
|
|
33
33
|
>
|
|
34
34
|
<p>{{ condition.comment }}:</p>
|
|
35
|
-
<!-- 单行文本输入框 -->
|
|
36
35
|
<div v-if="condition.controllerType == '1'">
|
|
37
36
|
<el-input
|
|
38
37
|
v-model="queryParams[index][condition.field]"
|
|
@@ -43,8 +42,10 @@
|
|
|
43
42
|
@keyup.enter.native="hideSearch"
|
|
44
43
|
></el-input>
|
|
45
44
|
</div>
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
<div
|
|
46
|
+
v-if="condition.controllerType == '2'"
|
|
47
|
+
style="margin-right: 10px"
|
|
48
|
+
>
|
|
48
49
|
<el-radio
|
|
49
50
|
v-for="(itemR, $index1) in condition.config.options"
|
|
50
51
|
:key="$index1"
|
|
@@ -54,139 +55,45 @@
|
|
|
54
55
|
{{ itemR.value }}
|
|
55
56
|
</el-radio>
|
|
56
57
|
</div>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
<div
|
|
59
|
+
v-if="condition.controllerType == '3'"
|
|
60
|
+
style="margin-right: 10px"
|
|
61
|
+
>
|
|
60
62
|
<ht-select
|
|
61
63
|
v-if="condition.config.choiceType == 'static'"
|
|
62
64
|
v-model="queryParams[index][condition.field]"
|
|
63
|
-
:multiple="condition.config.multiple"
|
|
64
65
|
:options="condition.config.options"
|
|
65
|
-
popper-class="dialog-select"
|
|
66
66
|
></ht-select>
|
|
67
|
-
|
|
68
|
-
<ht-dictionary
|
|
67
|
+
<eip-select-dia
|
|
69
68
|
v-else
|
|
70
|
-
v-model="queryParams[
|
|
71
|
-
:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
v-model="queryParams[condition.field]"
|
|
70
|
+
:ganged="{
|
|
71
|
+
alias: condition.config.customQuery.alias,
|
|
72
|
+
valueBind: condition.config.customQuery.valueBind,
|
|
73
|
+
noInit: '',
|
|
74
|
+
labelBind: condition.config.customQuery.labelBind,
|
|
75
|
+
gangedBind: '{}',
|
|
76
|
+
bind: condition.config.bind,
|
|
77
|
+
}"
|
|
78
|
+
:multiple="false"
|
|
79
|
+
:filterable="false"
|
|
80
|
+
:allow-create="false"
|
|
81
|
+
:selectlist="[]"
|
|
82
|
+
:query-params="queryParams"
|
|
83
|
+
></eip-select-dia>
|
|
75
84
|
</div>
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
<div
|
|
86
|
+
v-if="condition.controllerType == '4'"
|
|
87
|
+
style="margin-right: 10px"
|
|
88
|
+
>
|
|
78
89
|
<eip-tag
|
|
79
90
|
v-model="queryParams[index][condition.field]"
|
|
80
91
|
:tag-key="condition.config.tag"
|
|
92
|
+
:placeholder="quickSearch"
|
|
81
93
|
:filterable="condition.config.filterable"
|
|
82
94
|
:expand="condition.config.expand"
|
|
83
95
|
></eip-tag>
|
|
84
96
|
</div>
|
|
85
|
-
<!-- 日期 -->
|
|
86
|
-
<div v-if="condition.controllerType == '6'">
|
|
87
|
-
<!-- 根据日期的条件类型来判断展示单个日期还是日期范围 -->
|
|
88
|
-
<div
|
|
89
|
-
v-if="condition.condition == 'BETWEEN'"
|
|
90
|
-
style="display: flex;align-items: center;"
|
|
91
|
-
>
|
|
92
|
-
<ht-input
|
|
93
|
-
v-model="queryParams[index].startDate"
|
|
94
|
-
placeholder="开始日期"
|
|
95
|
-
@click.native="showDate(index, 'startDate')"
|
|
96
|
-
readonly
|
|
97
|
-
></ht-input>
|
|
98
|
-
<span style="margin:0 10px;">至</span>
|
|
99
|
-
<ht-input
|
|
100
|
-
v-model="queryParams[index].endDate"
|
|
101
|
-
placeholder="结束日期"
|
|
102
|
-
@click.native="showDate(index, 'endDate')"
|
|
103
|
-
readonly
|
|
104
|
-
></ht-input>
|
|
105
|
-
</div>
|
|
106
|
-
<ht-input
|
|
107
|
-
v-else
|
|
108
|
-
v-model="queryParams[index][condition.field]"
|
|
109
|
-
@click.native="showDate(index, condition.field)"
|
|
110
|
-
readonly
|
|
111
|
-
></ht-input>
|
|
112
|
-
</div>
|
|
113
|
-
<!-- 选择器 -->
|
|
114
|
-
<div v-if="condition.controllerType == '7'">
|
|
115
|
-
<ht-user-selector-input
|
|
116
|
-
v-if="condition.config.alias == 'user'"
|
|
117
|
-
append-to-body
|
|
118
|
-
@change="
|
|
119
|
-
(data) => {
|
|
120
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
121
|
-
}
|
|
122
|
-
"
|
|
123
|
-
></ht-user-selector-input>
|
|
124
|
-
<ht-org-selector-input
|
|
125
|
-
v-if="condition.config.alias == 'org'"
|
|
126
|
-
append-to-body
|
|
127
|
-
@change="
|
|
128
|
-
(data) => {
|
|
129
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
130
|
-
}
|
|
131
|
-
"
|
|
132
|
-
></ht-org-selector-input>
|
|
133
|
-
<ht-role-selector-input
|
|
134
|
-
v-if="condition.config.alias == 'role'"
|
|
135
|
-
append-to-body
|
|
136
|
-
@change="
|
|
137
|
-
(data) => {
|
|
138
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
139
|
-
}
|
|
140
|
-
"
|
|
141
|
-
></ht-role-selector-input>
|
|
142
|
-
<ht-job-selector-input
|
|
143
|
-
v-if="condition.config.alias == 'job'"
|
|
144
|
-
append-to-body
|
|
145
|
-
@change="
|
|
146
|
-
(data) => {
|
|
147
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
148
|
-
}
|
|
149
|
-
"
|
|
150
|
-
></ht-job-selector-input>
|
|
151
|
-
<ht-post-selector-input
|
|
152
|
-
v-if="condition.config.alias == 'post'"
|
|
153
|
-
append-to-body
|
|
154
|
-
@change="
|
|
155
|
-
(data) => {
|
|
156
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
157
|
-
}
|
|
158
|
-
"
|
|
159
|
-
></ht-post-selector-input>
|
|
160
|
-
<ht-dimension-selector-input
|
|
161
|
-
v-if="condition.config.alias == 'dimension'"
|
|
162
|
-
append-to-body
|
|
163
|
-
@change="
|
|
164
|
-
(data) => {
|
|
165
|
-
queryParams[index][condition.field] = getSelectId(data)
|
|
166
|
-
}
|
|
167
|
-
"
|
|
168
|
-
></ht-dimension-selector-input>
|
|
169
|
-
</div>
|
|
170
|
-
<!-- 对话框 -->
|
|
171
|
-
<div v-if="condition.controllerType == '5'">
|
|
172
|
-
<ht-custom-dialog
|
|
173
|
-
v-model="queryParams[index][condition.field]"
|
|
174
|
-
:model-name="condition.config.keyBind"
|
|
175
|
-
dialogType="search"
|
|
176
|
-
:custdialog="{
|
|
177
|
-
name: '请选择',
|
|
178
|
-
icon: '',
|
|
179
|
-
custDialog: {
|
|
180
|
-
selectNum: 1,
|
|
181
|
-
conditions: [],
|
|
182
|
-
mappingConf: [],
|
|
183
|
-
custQueryJson: [],
|
|
184
|
-
alias: condition.config.alias,
|
|
185
|
-
type: 'custDialog',
|
|
186
|
-
},
|
|
187
|
-
}"
|
|
188
|
-
></ht-custom-dialog>
|
|
189
|
-
</div>
|
|
190
97
|
</div>
|
|
191
98
|
<div v-show="isShowMoreSearch" class="search-btns">
|
|
192
99
|
<el-button
|
|
@@ -264,7 +171,7 @@
|
|
|
264
171
|
</template>
|
|
265
172
|
<div class="custom-mobile_box">
|
|
266
173
|
<div
|
|
267
|
-
v-for="field in
|
|
174
|
+
v-for="field in displayfield"
|
|
268
175
|
:key="field.field"
|
|
269
176
|
class="custom-mobile_box_item"
|
|
270
177
|
>
|
|
@@ -347,23 +254,6 @@
|
|
|
347
254
|
@check-change="getChecked"
|
|
348
255
|
></el-tree>
|
|
349
256
|
</van-action-sheet>
|
|
350
|
-
<!-- 修改时间 -->
|
|
351
|
-
<van-popup
|
|
352
|
-
v-model="isShowDatePop"
|
|
353
|
-
v-if="isShowDatePop"
|
|
354
|
-
position="bottom"
|
|
355
|
-
round
|
|
356
|
-
>
|
|
357
|
-
<!-- 日期选择控件 -->
|
|
358
|
-
<van-datetime-picker
|
|
359
|
-
v-model="currentDate"
|
|
360
|
-
:type="dateType"
|
|
361
|
-
title="选择日期"
|
|
362
|
-
:show-toolbar="true"
|
|
363
|
-
@cancel="isShowDatePop = false"
|
|
364
|
-
@confirm="confirmFn"
|
|
365
|
-
/>
|
|
366
|
-
</van-popup>
|
|
367
257
|
</div>
|
|
368
258
|
</template>
|
|
369
259
|
<script>
|
|
@@ -388,14 +278,9 @@
|
|
|
388
278
|
sunIndex: Number,
|
|
389
279
|
subPath: String,
|
|
390
280
|
currentSubData: Array,
|
|
391
|
-
dialogConfig: Object,
|
|
392
|
-
dialogType: String,
|
|
393
281
|
},
|
|
394
282
|
data() {
|
|
395
283
|
return {
|
|
396
|
-
dateType: 'date',
|
|
397
|
-
currentDate: '', // 当前日期
|
|
398
|
-
isShowDatePop: false, // 是否显示日期选择控件
|
|
399
284
|
isShowMoreSearch: false,
|
|
400
285
|
treeSelectText: '', // 组合树时选中的查询条件
|
|
401
286
|
isSelectTreeShow: false, // 组合树显示隐藏
|
|
@@ -464,58 +349,8 @@
|
|
|
464
349
|
this.selectIds.length > 0 ? `(${this.selectIds.length})` : ''
|
|
465
350
|
return `${this.$t('ht.common.confirm')}${selectedText}`
|
|
466
351
|
},
|
|
467
|
-
jumpParamKey() {
|
|
468
|
-
return this.dialogConfig && this.dialogConfig.jumpParamKey
|
|
469
|
-
? this.dialogConfig.jumpParamKey
|
|
470
|
-
: ''
|
|
471
|
-
},
|
|
472
|
-
// 是否保存成跳转url参数
|
|
473
|
-
isHaveJumpUrl() {
|
|
474
|
-
return (
|
|
475
|
-
this.dialogConfig &&
|
|
476
|
-
((this.isMobile && this.dialogConfig.mobileUrl) ||
|
|
477
|
-
(!this.isMobile && this.dialogConfig.pcUrl))
|
|
478
|
-
)
|
|
479
|
-
},
|
|
480
|
-
sortDisplayfield() {
|
|
481
|
-
return this.displayfield.sort((a, b) => {
|
|
482
|
-
return a.sort > b.sort ? 1 : -1
|
|
483
|
-
})
|
|
484
|
-
},
|
|
485
352
|
},
|
|
486
353
|
methods: {
|
|
487
|
-
// 获取已选择的选择器数据id
|
|
488
|
-
getSelectId(data) {
|
|
489
|
-
if (!data || !data.length) {
|
|
490
|
-
return ''
|
|
491
|
-
}
|
|
492
|
-
let ids = []
|
|
493
|
-
data.forEach((item) => {
|
|
494
|
-
ids.push(item.id)
|
|
495
|
-
})
|
|
496
|
-
return ids.join(',')
|
|
497
|
-
},
|
|
498
|
-
showDate(index, key) {
|
|
499
|
-
this.dateType = this.conditionBind[index].config.inputFormat.includes(
|
|
500
|
-
'mm:'
|
|
501
|
-
)
|
|
502
|
-
? 'datetime'
|
|
503
|
-
: 'date'
|
|
504
|
-
this.currentDateData = { index, key }
|
|
505
|
-
this.currentDate = this.queryParams[index][key]
|
|
506
|
-
? new Date(this.queryParams[index][key].replace(/-/g, '/'))
|
|
507
|
-
: new Date()
|
|
508
|
-
this.isShowDatePop = true
|
|
509
|
-
},
|
|
510
|
-
// 日期确认
|
|
511
|
-
confirmFn() {
|
|
512
|
-
let currentConfig = this.conditionBind[this.currentDateData.index]
|
|
513
|
-
this.queryParams[this.currentDateData.index][
|
|
514
|
-
this.currentDateData.key
|
|
515
|
-
] = this.currentDate.format(currentConfig.config.inputFormat)
|
|
516
|
-
|
|
517
|
-
this.isShowDatePop = false
|
|
518
|
-
},
|
|
519
354
|
searchInputChange() {
|
|
520
355
|
if (!this.isShowMoreSearch) {
|
|
521
356
|
this.search(true)
|
|
@@ -561,124 +396,122 @@
|
|
|
561
396
|
this.search(true)
|
|
562
397
|
},
|
|
563
398
|
showDialog() {
|
|
399
|
+
const this_ = this
|
|
564
400
|
this.fixedParams = {}
|
|
565
|
-
// 如果已存在配置信息就不去请求配置信息 直接初始化数据
|
|
566
|
-
if (this.dialogConfig) {
|
|
567
|
-
this.initDialog(this.dialogConfig)
|
|
568
|
-
return
|
|
569
|
-
}
|
|
570
401
|
var alias = this.custdialog.custDialog.alias
|
|
571
402
|
this.$requestConfig
|
|
572
403
|
.getCustomDialogByAlias(alias)
|
|
573
404
|
.then((customDialog) => {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
initDialog(customDialog) {
|
|
578
|
-
let alias = this.custdialog.custDialog.alias
|
|
579
|
-
const this_ = this
|
|
580
|
-
if (!customDialog || !customDialog.alias) {
|
|
581
|
-
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
582
|
-
return
|
|
583
|
-
}
|
|
584
|
-
if (customDialog.style == 1) {
|
|
585
|
-
var displaylist = JSON.parse(customDialog.displayfield)
|
|
586
|
-
this_.nodeKey = displaylist.id
|
|
587
|
-
}
|
|
588
|
-
if (customDialog.needPage && customDialog.requestType === 'POST') {
|
|
589
|
-
let obj = {}
|
|
590
|
-
this.getLastKeyByPath(obj, customDialog.pageKey, 1)
|
|
591
|
-
this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
|
|
592
|
-
this.getLastKeyByPath(obj, customDialog.totalKey, true)
|
|
593
|
-
const exp = utils.parseExp(customDialog.dataParam, obj, true)
|
|
594
|
-
if (exp) {
|
|
595
|
-
const params = JSON.parse(exp)
|
|
596
|
-
if (params.pageBean) {
|
|
597
|
-
this.pagination = {
|
|
598
|
-
...params.pageBean,
|
|
599
|
-
}
|
|
405
|
+
if (!customDialog || !customDialog.alias) {
|
|
406
|
+
this.$message.error('对话框别名【' + alias + '】不存在!')
|
|
407
|
+
return
|
|
600
408
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
if (bindList.length > 0) {
|
|
607
|
-
bindList.forEach((ele) => {
|
|
608
|
-
//绑定表单字段
|
|
609
|
-
if (
|
|
610
|
-
ele.bind &&
|
|
611
|
-
(ele.defaultType == '3' || ele.bind.startsWith('data.searchForm'))
|
|
612
|
-
) {
|
|
409
|
+
if (customDialog.style == 1) {
|
|
410
|
+
var displaylist = JSON.parse(customDialog.displayfield)
|
|
411
|
+
this_.nodeKey = displaylist.id
|
|
412
|
+
}
|
|
413
|
+
if (customDialog.needPage && customDialog.requestType === 'POST') {
|
|
613
414
|
let obj = {}
|
|
614
|
-
obj.
|
|
615
|
-
obj.
|
|
616
|
-
obj.
|
|
617
|
-
|
|
415
|
+
this.getLastKeyByPath(obj, customDialog.pageKey, 1)
|
|
416
|
+
this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
|
|
417
|
+
this.getLastKeyByPath(obj, customDialog.totalKey, true)
|
|
418
|
+
const exp = utils.parseExp(customDialog.dataParam, obj, true)
|
|
419
|
+
if (exp) {
|
|
420
|
+
const params = JSON.parse(exp)
|
|
421
|
+
if (params.pageBean) {
|
|
422
|
+
this.pagination = {
|
|
423
|
+
...params.pageBean,
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
618
427
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
428
|
+
//对话框按表单字段查询(参数传入的)
|
|
429
|
+
let bindList = this_.custdialog.custDialog.conditions
|
|
430
|
+
this_.param = [] //绑定的表单字段
|
|
431
|
+
if (bindList.length > 0) {
|
|
432
|
+
bindList.forEach((ele) => {
|
|
433
|
+
//绑定表单字段
|
|
434
|
+
if (
|
|
435
|
+
ele.bind &&
|
|
436
|
+
(ele.defaultType == '3' ||
|
|
437
|
+
ele.bind.startsWith('data.searchForm'))
|
|
438
|
+
) {
|
|
439
|
+
let obj = {}
|
|
440
|
+
obj.field = ele.field
|
|
441
|
+
obj.bind = ele.bind
|
|
442
|
+
obj.bindType = ele.bindType
|
|
443
|
+
this_.param.push(obj)
|
|
444
|
+
}
|
|
445
|
+
// bindType 1 表单字段 2固定 3脚本
|
|
446
|
+
if (ele.defaultType == '3' && ele.bindType === 2) {
|
|
447
|
+
this_.fixedParams[ele.field] = ele.bind || ''
|
|
448
|
+
}
|
|
449
|
+
})
|
|
622
450
|
}
|
|
623
|
-
})
|
|
624
|
-
}
|
|
625
451
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
452
|
+
//判断对话框查询是否有条件
|
|
453
|
+
let userInputList = JSON.parse(customDialog.conditionfield)
|
|
454
|
+
this_.conditionBind = []
|
|
455
|
+
let queryParams = []
|
|
456
|
+
let placeholders = []
|
|
457
|
+
if (userInputList.length > 0) {
|
|
458
|
+
userInputList.forEach((ele) => {
|
|
459
|
+
var obj = {}
|
|
460
|
+
//条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
|
|
461
|
+
if (ele.defaultType == '1') {
|
|
462
|
+
obj[ele.field] = ''
|
|
463
|
+
queryParams.push(obj)
|
|
464
|
+
// queryParams[ele.field] = "";
|
|
465
|
+
this_.conditionBind.push(ele)
|
|
466
|
+
placeholders.push('请输入' + ele.comment)
|
|
467
|
+
}
|
|
468
|
+
if (ele.defaultType == '2' && ele.defaultValue) {
|
|
469
|
+
this_.fixedParams[ele.field] = ele.defaultValue
|
|
470
|
+
}
|
|
471
|
+
})
|
|
472
|
+
this.$set(this, 'queryParams', queryParams)
|
|
473
|
+
this.$set(this, 'placeholders', placeholders)
|
|
644
474
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
this_.conditionfieldTree[i].
|
|
475
|
+
if (customDialog.style == 0 || customDialog.style == 2) {
|
|
476
|
+
//列表
|
|
477
|
+
this_.customDialogShow({
|
|
478
|
+
alias: alias,
|
|
479
|
+
customDialog: customDialog,
|
|
480
|
+
})
|
|
481
|
+
} else if (customDialog.style == 1) {
|
|
482
|
+
//树形
|
|
483
|
+
this_.pageParam = { alias: alias, customDialog: customDialog }
|
|
484
|
+
this_.customDialog = customDialog
|
|
485
|
+
let param = {}
|
|
486
|
+
this_.conditionfieldTree = []
|
|
487
|
+
//判断是否存在条件
|
|
488
|
+
if (customDialog.conditionfield) {
|
|
489
|
+
this_.conditionfieldTree = JSON.parse(
|
|
490
|
+
customDialog.conditionfield
|
|
491
|
+
)
|
|
492
|
+
if (this_.conditionfieldTree.length > 0) {
|
|
493
|
+
for (
|
|
494
|
+
let i = this_.conditionfieldTree.length - 1;
|
|
495
|
+
i >= 0;
|
|
496
|
+
i--
|
|
497
|
+
) {
|
|
498
|
+
//判断条件字段是否是动态传入(defaultType:4:动态传入,2:固定值 )
|
|
499
|
+
if (this_.conditionfieldTree[i].defaultType == '4') {
|
|
500
|
+
param[this_.conditionfieldTree[i].field] =
|
|
501
|
+
this_.conditionfieldTree[i].comment
|
|
502
|
+
}
|
|
503
|
+
}
|
|
670
504
|
}
|
|
671
505
|
}
|
|
506
|
+
//有动态传入的字段
|
|
507
|
+
if (JSON.stringify(param) != '{}') {
|
|
508
|
+
this_.dialogVisible = true
|
|
509
|
+
} else {
|
|
510
|
+
//无动态传入的字段
|
|
511
|
+
this_.customDialogTreeShow(this_.pageParam)
|
|
512
|
+
}
|
|
672
513
|
}
|
|
673
|
-
}
|
|
674
|
-
//有动态传入的字段
|
|
675
|
-
if (JSON.stringify(param) != '{}') {
|
|
676
|
-
this_.dialogVisible = true
|
|
677
|
-
} else {
|
|
678
|
-
//无动态传入的字段
|
|
679
|
-
this_.customDialogTreeShow(this_.pageParam)
|
|
680
|
-
}
|
|
681
|
-
}
|
|
514
|
+
})
|
|
682
515
|
},
|
|
683
516
|
treeClick(data) {
|
|
684
517
|
// 单选
|
|
@@ -815,22 +648,13 @@
|
|
|
815
648
|
}
|
|
816
649
|
// 添加用户id 岗位id 组织id
|
|
817
650
|
try {
|
|
818
|
-
if (
|
|
819
|
-
this.$requestConfig.getUserId &&
|
|
820
|
-
this.$requestConfig.getUserId()
|
|
821
|
-
) {
|
|
651
|
+
if (this.$requestConfig.getUserId()) {
|
|
822
652
|
ctx.userId = this.$requestConfig.getUserId()
|
|
823
653
|
}
|
|
824
|
-
if (
|
|
825
|
-
this.$requestConfig.getOrgId &&
|
|
826
|
-
this.$requestConfig.getOrgId()
|
|
827
|
-
) {
|
|
654
|
+
if (this.$requestConfig.getOrgId()) {
|
|
828
655
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
829
656
|
}
|
|
830
|
-
if (
|
|
831
|
-
this.$requestConfig.getPostId &&
|
|
832
|
-
this.$requestConfig.getPostId()
|
|
833
|
-
) {
|
|
657
|
+
if (this.$requestConfig.getPostId()) {
|
|
834
658
|
ctx.postId = this.$requestConfig.getPostId()
|
|
835
659
|
}
|
|
836
660
|
} catch (e) {
|
|
@@ -927,28 +751,8 @@
|
|
|
927
751
|
this.selectOrgs = this.convertComment2Field(str, field)
|
|
928
752
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
929
753
|
var val = ''
|
|
930
|
-
str.forEach((item
|
|
931
|
-
|
|
932
|
-
if (
|
|
933
|
-
this.jumpParamKey &&
|
|
934
|
-
this.isHaveJumpUrl &&
|
|
935
|
-
(this.modelName == 'data.' + con['target'][0] ||
|
|
936
|
-
(this.modelName.includes('item.') &&
|
|
937
|
-
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
938
|
-
) {
|
|
939
|
-
// 如果有冒号 冒号前面是传值key 后面是取值key
|
|
940
|
-
let jumpParamKey = this.jumpParamKey
|
|
941
|
-
let jumpParamValue = this.jumpParamKey
|
|
942
|
-
if (this.jumpParamKey.includes(':')) {
|
|
943
|
-
jumpParamKey = this.jumpParamKey.split(':')[0]
|
|
944
|
-
jumpParamValue = this.jumpParamKey.split(':')[1]
|
|
945
|
-
}
|
|
946
|
-
val += `${item[con.from]}¯${jumpParamKey}:${
|
|
947
|
-
this.selectOrgs[index][jumpParamValue]
|
|
948
|
-
},`
|
|
949
|
-
} else {
|
|
950
|
-
val += item[con.from] + ','
|
|
951
|
-
}
|
|
754
|
+
str.forEach((item) => {
|
|
755
|
+
val += item[con.from] + ','
|
|
952
756
|
})
|
|
953
757
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
954
758
|
utils.setValueByPath(
|
|
@@ -1035,29 +839,6 @@
|
|
|
1035
839
|
//用户输入的
|
|
1036
840
|
if (this.queryParams.length != 0 && this.queryParams[0] != '') {
|
|
1037
841
|
this.conditionBind.forEach((item, index) => {
|
|
1038
|
-
// 日期范围特殊处理
|
|
1039
|
-
if (item.dbType == 'date' && item.condition == 'BETWEEN') {
|
|
1040
|
-
if (
|
|
1041
|
-
(this.queryParams[index].startDate &&
|
|
1042
|
-
!this.queryParams[index].endDate) ||
|
|
1043
|
-
(!this.queryParams[index].startDate &&
|
|
1044
|
-
this.queryParams[index].endDate)
|
|
1045
|
-
) {
|
|
1046
|
-
flag = true
|
|
1047
|
-
this.$message.info('日期范围未填写完整!')
|
|
1048
|
-
return
|
|
1049
|
-
}
|
|
1050
|
-
if (
|
|
1051
|
-
this.queryParams[index].startDate &&
|
|
1052
|
-
this.queryParams[index].endDate
|
|
1053
|
-
) {
|
|
1054
|
-
this.queryParams[index][
|
|
1055
|
-
item.field
|
|
1056
|
-
] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
|
|
1057
|
-
} else {
|
|
1058
|
-
this.queryParams[index][item.field] = ''
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
842
|
if (this.queryParams[index][item.field]) {
|
|
1062
843
|
querys.push({
|
|
1063
844
|
property: item.field,
|
|
@@ -1131,22 +912,13 @@
|
|
|
1131
912
|
ctx.total = pageBean.pageBean.total
|
|
1132
913
|
// 添加用户id 岗位id 组织id
|
|
1133
914
|
try {
|
|
1134
|
-
if (
|
|
1135
|
-
this.$requestConfig.getUserId &&
|
|
1136
|
-
this.$requestConfig.getUserId()
|
|
1137
|
-
) {
|
|
915
|
+
if (this.$requestConfig.getUserId()) {
|
|
1138
916
|
ctx.userId = this.$requestConfig.getUserId()
|
|
1139
917
|
}
|
|
1140
|
-
if (
|
|
1141
|
-
this.$requestConfig.getOrgId &&
|
|
1142
|
-
this.$requestConfig.getOrgId()
|
|
1143
|
-
) {
|
|
918
|
+
if (this.$requestConfig.getOrgId()) {
|
|
1144
919
|
ctx.orgId = this.$requestConfig.getOrgId()
|
|
1145
920
|
}
|
|
1146
|
-
if (
|
|
1147
|
-
this.$requestConfig.getPostId &&
|
|
1148
|
-
this.$requestConfig.getPostId()
|
|
1149
|
-
) {
|
|
921
|
+
if (this.$requestConfig.getPostId()) {
|
|
1150
922
|
ctx.postId = this.$requestConfig.getPostId()
|
|
1151
923
|
}
|
|
1152
924
|
} catch (e) {
|
|
@@ -1179,8 +951,6 @@
|
|
|
1179
951
|
} else {
|
|
1180
952
|
param.pageBean.pageSize = -1
|
|
1181
953
|
}
|
|
1182
|
-
// 日期格式的 改成数组
|
|
1183
|
-
// this.changeDateFormat(param)
|
|
1184
954
|
//构造请求的参数
|
|
1185
955
|
let requestParam = {
|
|
1186
956
|
pageBean: param,
|
|
@@ -1216,21 +986,6 @@
|
|
|
1216
986
|
}
|
|
1217
987
|
}
|
|
1218
988
|
},
|
|
1219
|
-
changeDateFormat(param) {
|
|
1220
|
-
let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
|
|
1221
|
-
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$/
|
|
1222
|
-
Object.keys(param).forEach((key) => {
|
|
1223
|
-
if (
|
|
1224
|
-
param[key] &&
|
|
1225
|
-
typeof param[key] == 'string' &&
|
|
1226
|
-
param[key].includes(',') &&
|
|
1227
|
-
(dateValidate1.test(param[key].split(',')[0]) ||
|
|
1228
|
-
dateValidate2.test(param[key].split(',')[0]))
|
|
1229
|
-
) {
|
|
1230
|
-
param[key] = param[key].split(',')
|
|
1231
|
-
}
|
|
1232
|
-
})
|
|
1233
|
-
},
|
|
1234
989
|
getSearchValueByKey() {
|
|
1235
990
|
let queryParamsObj = {}
|
|
1236
991
|
if (this.queryParams.length > 0) {
|
|
@@ -1450,45 +1205,13 @@
|
|
|
1450
1205
|
}
|
|
1451
1206
|
}
|
|
1452
1207
|
}
|
|
1453
|
-
// 如果是查询中使用的对话框
|
|
1454
|
-
if (this.dialogType == 'search') {
|
|
1455
|
-
let returnVal = []
|
|
1456
|
-
str.forEach((item) => {
|
|
1457
|
-
returnVal.push(decodeURIComponent(item[this.modelName]))
|
|
1458
|
-
})
|
|
1459
|
-
this.$emit('updateInput', returnVal.join(','))
|
|
1460
|
-
return
|
|
1461
|
-
}
|
|
1462
1208
|
const pInst = utils.getOnlineFormInstance(this)
|
|
1463
1209
|
this.custdialog.custDialog.mappingConf.forEach((con) => {
|
|
1464
1210
|
var val = ''
|
|
1465
1211
|
var from = con.from.toLowerCase()
|
|
1466
1212
|
str.forEach((item) => {
|
|
1467
1213
|
if (item) {
|
|
1468
|
-
|
|
1469
|
-
this.jumpParamKey &&
|
|
1470
|
-
this.isHaveJumpUrl &&
|
|
1471
|
-
(this.modelName == 'data.' + con['target'][0] ||
|
|
1472
|
-
(this.modelName.includes('item.') &&
|
|
1473
|
-
con['target'][0].endsWith(this.modelName.split('.')[1])))
|
|
1474
|
-
) {
|
|
1475
|
-
let jumpParamKey = this.jumpParamKey
|
|
1476
|
-
let jumpParamValue = this.jumpParamKey
|
|
1477
|
-
if (this.jumpParamKey.includes(':')) {
|
|
1478
|
-
jumpParamKey = this.jumpParamKey.split(':')[0]
|
|
1479
|
-
jumpParamValue = this.jumpParamKey.split(':')[1]
|
|
1480
|
-
}
|
|
1481
|
-
// 需根据key 找到对应 返回数据的返回名称
|
|
1482
|
-
let returnMap = returnStr.find((k) => {
|
|
1483
|
-
return k.field.toLowerCase() == jumpParamValue.toLowerCase()
|
|
1484
|
-
})
|
|
1485
|
-
let returnMapKey = returnMap ? returnMap.comment : ''
|
|
1486
|
-
val += `${decodeURIComponent(
|
|
1487
|
-
item[from]
|
|
1488
|
-
)}¯${jumpParamKey}:${decodeURIComponent(item[returnMapKey])},`
|
|
1489
|
-
} else {
|
|
1490
|
-
val += decodeURIComponent(item[from]) + ','
|
|
1491
|
-
}
|
|
1214
|
+
val += decodeURIComponent(item[from]) + ','
|
|
1492
1215
|
}
|
|
1493
1216
|
})
|
|
1494
1217
|
if (this.modelName == 'data.' + con['target'][0]) {
|
|
@@ -1556,6 +1279,20 @@
|
|
|
1556
1279
|
}
|
|
1557
1280
|
}
|
|
1558
1281
|
},
|
|
1282
|
+
// getSelected() {
|
|
1283
|
+
// let arr = []
|
|
1284
|
+
// this.selectIds.forEach((item) => {
|
|
1285
|
+
// debugger
|
|
1286
|
+
// let obj = this.dialogData.find((sub) => {
|
|
1287
|
+
// return sub.id_ === item
|
|
1288
|
+
// })
|
|
1289
|
+
// if (obj) {
|
|
1290
|
+
// arr.push(obj)
|
|
1291
|
+
// }
|
|
1292
|
+
// })
|
|
1293
|
+
|
|
1294
|
+
// return arr
|
|
1295
|
+
// },
|
|
1559
1296
|
calacInputSuffixHeight() {
|
|
1560
1297
|
this.$emit('calacInputSuffixHeight')
|
|
1561
1298
|
},
|
|
@@ -1879,50 +1616,4 @@
|
|
|
1879
1616
|
padding: 10px 5px;
|
|
1880
1617
|
overflow-y: auto;
|
|
1881
1618
|
}
|
|
1882
|
-
.dialog-select {
|
|
1883
|
-
z-index: 2500 !important;
|
|
1884
|
-
}
|
|
1885
|
-
.mobile-van-action {
|
|
1886
|
-
&.min-height-action {
|
|
1887
|
-
min-height: 50%;
|
|
1888
|
-
}
|
|
1889
|
-
.dialog-mobile__title {
|
|
1890
|
-
font-size: 18px;
|
|
1891
|
-
color: #1a1a1a;
|
|
1892
|
-
}
|
|
1893
|
-
.dialog-mobile__close {
|
|
1894
|
-
float: right;
|
|
1895
|
-
}
|
|
1896
|
-
.van-action-sheet__cancel {
|
|
1897
|
-
padding: 8px 5px;
|
|
1898
|
-
background: $base-color-blue;
|
|
1899
|
-
color: $base-color-white;
|
|
1900
|
-
}
|
|
1901
|
-
.search-box {
|
|
1902
|
-
padding-right: 60px;
|
|
1903
|
-
position: relative;
|
|
1904
|
-
> .unfold-icon {
|
|
1905
|
-
position: absolute;
|
|
1906
|
-
right: 20px;
|
|
1907
|
-
top: 17px;
|
|
1908
|
-
}
|
|
1909
|
-
.search-item {
|
|
1910
|
-
display: flex;
|
|
1911
|
-
align-items: center;
|
|
1912
|
-
> p {
|
|
1913
|
-
width: 90px;
|
|
1914
|
-
font-size: 14px;
|
|
1915
|
-
text-align: right;
|
|
1916
|
-
margin-right: 10px;
|
|
1917
|
-
}
|
|
1918
|
-
> div {
|
|
1919
|
-
flex: 1;
|
|
1920
|
-
overflow: hidden;
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
.search-btns {
|
|
1924
|
-
text-align: center;
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
1619
|
</style>
|