three-trees-ui 1.0.7 → 1.0.8

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.
@@ -32,6 +32,7 @@
32
32
  class="search-item"
33
33
  >
34
34
  <p>{{ condition.comment }}:</p>
35
+ <!-- 单行文本输入框 -->
35
36
  <div v-if="condition.controllerType == '1'">
36
37
  <el-input
37
38
  v-model="queryParams[index][condition.field]"
@@ -42,10 +43,8 @@
42
43
  @keyup.enter.native="hideSearch"
43
44
  ></el-input>
44
45
  </div>
45
- <div
46
- v-if="condition.controllerType == '2'"
47
- style="margin-right: 10px"
48
- >
46
+ <!-- 单选框 -->
47
+ <div v-if="condition.controllerType == '2'">
49
48
  <el-radio
50
49
  v-for="(itemR, $index1) in condition.config.options"
51
50
  :key="$index1"
@@ -55,45 +54,145 @@
55
54
  {{ itemR.value }}
56
55
  </el-radio>
57
56
  </div>
58
- <div
59
- v-if="condition.controllerType == '3'"
60
- style="margin-right: 10px"
61
- >
57
+ <!-- 下拉框 -->
58
+ <div v-if="condition.controllerType == '3'">
59
+ <!-- 静态选项 -->
62
60
  <ht-select
63
61
  v-if="condition.config.choiceType == 'static'"
64
62
  v-model="queryParams[index][condition.field]"
63
+ :multiple="condition.config.multiple"
65
64
  :options="condition.config.options"
65
+ popper-class="dialog-select"
66
66
  ></ht-select>
67
- <eip-select-dia
67
+ <!-- 动态选项时展示数据字典 -->
68
+ <ht-dictionary
68
69
  v-else
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>
70
+ v-model="queryParams[index][condition.field]"
71
+ :dickey="condition.config.dic"
72
+ :filterable="condition.config.filterable"
73
+ popper-class="dialog-select"
74
+ ></ht-dictionary>
84
75
  </div>
85
- <div
86
- v-if="condition.controllerType == '4'"
87
- style="margin-right: 10px"
88
- >
76
+ <!-- 标签 -->
77
+ <div v-if="condition.controllerType == '4'">
89
78
  <eip-tag
90
79
  v-model="queryParams[index][condition.field]"
91
80
  :tag-key="condition.config.tag"
92
- :placeholder="quickSearch"
93
81
  :filterable="condition.config.filterable"
94
82
  :expand="condition.config.expand"
95
83
  ></eip-tag>
96
84
  </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-model="queryParams[index].selectName"
117
+ v-if="condition.config.alias == 'user'"
118
+ append-to-body
119
+ @change="
120
+ (data) => {
121
+ queryParams[index][condition.field] = getSelectId(data)
122
+ }
123
+ "
124
+ ></ht-user-selector-input>
125
+ <ht-org-selector-input
126
+ v-model="queryParams[index].selectName"
127
+ v-if="condition.config.alias == 'org'"
128
+ append-to-body
129
+ @change="
130
+ (data) => {
131
+ queryParams[index][condition.field] = getSelectId(data)
132
+ }
133
+ "
134
+ ></ht-org-selector-input>
135
+ <ht-role-selector-input
136
+ v-model="queryParams[index].selectName"
137
+ v-if="condition.config.alias == 'role'"
138
+ append-to-body
139
+ @change="
140
+ (data) => {
141
+ queryParams[index][condition.field] = getSelectId(data)
142
+ }
143
+ "
144
+ ></ht-role-selector-input>
145
+ <ht-job-selector-input
146
+ v-model="queryParams[index].selectName"
147
+ v-if="condition.config.alias == 'job'"
148
+ append-to-body
149
+ @change="
150
+ (data) => {
151
+ queryParams[index][condition.field] = getSelectId(data)
152
+ }
153
+ "
154
+ ></ht-job-selector-input>
155
+ <ht-post-selector-input
156
+ v-model="queryParams[index].selectName"
157
+ v-if="condition.config.alias == 'post'"
158
+ append-to-body
159
+ @change="
160
+ (data) => {
161
+ queryParams[index][condition.field] = getSelectId(data)
162
+ }
163
+ "
164
+ ></ht-post-selector-input>
165
+ <ht-dimension-selector-input
166
+ v-model="queryParams[index].selectName"
167
+ v-if="condition.config.alias == 'dimension'"
168
+ append-to-body
169
+ @change="
170
+ (data) => {
171
+ queryParams[index][condition.field] = getSelectId(data)
172
+ }
173
+ "
174
+ ></ht-dimension-selector-input>
175
+ </div>
176
+ <!-- 对话框 -->
177
+ <div v-if="condition.controllerType == '5'">
178
+ <ht-custom-dialog
179
+ v-model="queryParams[index][condition.field]"
180
+ :model-name="condition.config.keyBind"
181
+ dialogType="search"
182
+ :custdialog="{
183
+ name: '请选择',
184
+ icon: '',
185
+ custDialog: {
186
+ selectNum: 1,
187
+ conditions: [],
188
+ mappingConf: [],
189
+ custQueryJson: [],
190
+ alias: condition.config.alias,
191
+ type: 'custDialog',
192
+ },
193
+ }"
194
+ ></ht-custom-dialog>
195
+ </div>
97
196
  </div>
98
197
  <div v-show="isShowMoreSearch" class="search-btns">
99
198
  <el-button
@@ -171,7 +270,7 @@
171
270
  </template>
172
271
  <div class="custom-mobile_box">
173
272
  <div
174
- v-for="field in displayfield"
273
+ v-for="field in sortDisplayfield"
175
274
  :key="field.field"
176
275
  class="custom-mobile_box_item"
177
276
  >
@@ -254,6 +353,23 @@
254
353
  @check-change="getChecked"
255
354
  ></el-tree>
256
355
  </van-action-sheet>
356
+ <!-- 修改时间 -->
357
+ <van-popup
358
+ v-model="isShowDatePop"
359
+ v-if="isShowDatePop"
360
+ position="bottom"
361
+ round
362
+ >
363
+ <!-- 日期选择控件 -->
364
+ <van-datetime-picker
365
+ v-model="currentDate"
366
+ :type="dateType"
367
+ title="选择日期"
368
+ :show-toolbar="true"
369
+ @cancel="isShowDatePop = false"
370
+ @confirm="confirmFn"
371
+ />
372
+ </van-popup>
257
373
  </div>
258
374
  </template>
259
375
  <script>
@@ -278,9 +394,14 @@
278
394
  sunIndex: Number,
279
395
  subPath: String,
280
396
  currentSubData: Array,
397
+ dialogConfig: Object,
398
+ dialogType: String,
281
399
  },
282
400
  data() {
283
401
  return {
402
+ dateType: 'date',
403
+ currentDate: '', // 当前日期
404
+ isShowDatePop: false, // 是否显示日期选择控件
284
405
  isShowMoreSearch: false,
285
406
  treeSelectText: '', // 组合树时选中的查询条件
286
407
  isSelectTreeShow: false, // 组合树显示隐藏
@@ -349,8 +470,58 @@
349
470
  this.selectIds.length > 0 ? `(${this.selectIds.length})` : ''
350
471
  return `${this.$t('ht.common.confirm')}${selectedText}`
351
472
  },
473
+ jumpParamKey() {
474
+ return this.dialogConfig && this.dialogConfig.jumpParamKey
475
+ ? this.dialogConfig.jumpParamKey
476
+ : ''
477
+ },
478
+ // 是否保存成跳转url参数
479
+ isHaveJumpUrl() {
480
+ return (
481
+ this.dialogConfig &&
482
+ ((this.isMobile && this.dialogConfig.mobileUrl) ||
483
+ (!this.isMobile && this.dialogConfig.pcUrl))
484
+ )
485
+ },
486
+ sortDisplayfield() {
487
+ return this.displayfield.sort((a, b) => {
488
+ return a.sort > b.sort ? 1 : -1
489
+ })
490
+ },
352
491
  },
353
492
  methods: {
493
+ // 获取已选择的选择器数据id
494
+ getSelectId(data) {
495
+ if (!data || !data.length) {
496
+ return ''
497
+ }
498
+ let ids = []
499
+ data.forEach((item) => {
500
+ ids.push(item.id)
501
+ })
502
+ return ids.join(',')
503
+ },
504
+ showDate(index, key) {
505
+ this.dateType = this.conditionBind[index].config.inputFormat.includes(
506
+ 'mm:'
507
+ )
508
+ ? 'datetime'
509
+ : 'date'
510
+ this.currentDateData = { index, key }
511
+ this.currentDate = this.queryParams[index][key]
512
+ ? new Date(this.queryParams[index][key].replace(/-/g, '/'))
513
+ : new Date()
514
+ this.isShowDatePop = true
515
+ },
516
+ // 日期确认
517
+ confirmFn() {
518
+ let currentConfig = this.conditionBind[this.currentDateData.index]
519
+ this.queryParams[this.currentDateData.index][
520
+ this.currentDateData.key
521
+ ] = this.currentDate.format(currentConfig.config.inputFormat)
522
+
523
+ this.isShowDatePop = false
524
+ },
354
525
  searchInputChange() {
355
526
  if (!this.isShowMoreSearch) {
356
527
  this.search(true)
@@ -396,122 +567,124 @@
396
567
  this.search(true)
397
568
  },
398
569
  showDialog() {
399
- const this_ = this
400
570
  this.fixedParams = {}
571
+ // 如果已存在配置信息就不去请求配置信息 直接初始化数据
572
+ if (this.dialogConfig) {
573
+ this.initDialog(this.dialogConfig)
574
+ return
575
+ }
401
576
  var alias = this.custdialog.custDialog.alias
402
577
  this.$requestConfig
403
578
  .getCustomDialogByAlias(alias)
404
579
  .then((customDialog) => {
405
- if (!customDialog || !customDialog.alias) {
406
- this.$message.error('对话框别名【' + alias + '】不存在!')
407
- return
408
- }
409
- if (customDialog.style == 1) {
410
- var displaylist = JSON.parse(customDialog.displayfield)
411
- this_.nodeKey = displaylist.id
580
+ this.initDialog(customDialog)
581
+ })
582
+ },
583
+ initDialog(customDialog) {
584
+ let alias = this.custdialog.custDialog.alias
585
+ const this_ = this
586
+ if (!customDialog || !customDialog.alias) {
587
+ this.$message.error('对话框别名【' + alias + '】不存在!')
588
+ return
589
+ }
590
+ if (customDialog.style == 1) {
591
+ var displaylist = JSON.parse(customDialog.displayfield)
592
+ this_.nodeKey = displaylist.id
593
+ }
594
+ if (customDialog.needPage && customDialog.requestType === 'POST') {
595
+ let obj = {}
596
+ this.getLastKeyByPath(obj, customDialog.pageKey, 1)
597
+ this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
598
+ this.getLastKeyByPath(obj, customDialog.totalKey, true)
599
+ const exp = utils.parseExp(customDialog.dataParam, obj, true)
600
+ if (exp) {
601
+ const params = JSON.parse(exp)
602
+ if (params.pageBean) {
603
+ this.pagination = {
604
+ ...params.pageBean,
605
+ }
412
606
  }
413
- if (customDialog.needPage && customDialog.requestType === 'POST') {
607
+ }
608
+ }
609
+ //对话框按表单字段查询(参数传入的)
610
+ let bindList = this_.custdialog.custDialog.conditions
611
+ this_.param = [] //绑定的表单字段
612
+ if (bindList.length > 0) {
613
+ bindList.forEach((ele) => {
614
+ //绑定表单字段
615
+ if (
616
+ ele.bind &&
617
+ (ele.defaultType == '3' || ele.bind.startsWith('data.searchForm'))
618
+ ) {
414
619
  let obj = {}
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
- }
620
+ obj.field = ele.field
621
+ obj.bind = ele.bind
622
+ obj.bindType = ele.bindType
623
+ this_.param.push(obj)
427
624
  }
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
- })
625
+ // bindType 1 表单字段 2固定 3脚本
626
+ if (ele.defaultType == '3' && ele.bindType === 2) {
627
+ this_.fixedParams[ele.field] = ele.bind || ''
450
628
  }
629
+ })
630
+ }
451
631
 
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)
632
+ //判断对话框查询是否有条件
633
+ let userInputList = JSON.parse(customDialog.conditionfield)
634
+ this_.conditionBind = []
635
+ let queryParams = []
636
+ let placeholders = []
637
+ if (userInputList.length > 0) {
638
+ userInputList.forEach((ele) => {
639
+ var obj = {}
640
+ //条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
641
+ if (ele.defaultType == '1') {
642
+ obj[ele.field] = ''
643
+ queryParams.push(obj)
644
+ // queryParams[ele.field] = "";
645
+ this_.conditionBind.push(ele)
646
+ placeholders.push('请输入' + ele.comment)
474
647
  }
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
- }
648
+ if (ele.defaultType == '2' && ele.defaultValue) {
649
+ this_.fixedParams[ele.field] = ele.defaultValue
650
+ }
651
+ })
652
+ this.$set(this, 'queryParams', queryParams)
653
+ this.$set(this, 'placeholders', placeholders)
654
+ }
655
+ if (customDialog.style == 0 || customDialog.style == 2) {
656
+ //列表
657
+ this_.customDialogShow({
658
+ alias: alias,
659
+ customDialog: customDialog,
660
+ })
661
+ } else if (customDialog.style == 1) {
662
+ //树形
663
+ this_.pageParam = { alias: alias, customDialog: customDialog }
664
+ this_.customDialog = customDialog
665
+ let param = {}
666
+ this_.conditionfieldTree = []
667
+ //判断是否存在条件
668
+ if (customDialog.conditionfield) {
669
+ this_.conditionfieldTree = JSON.parse(customDialog.conditionfield)
670
+ if (this_.conditionfieldTree.length > 0) {
671
+ for (let i = this_.conditionfieldTree.length - 1; i >= 0; i--) {
672
+ //判断条件字段是否是动态传入(defaultType4:动态传入,2:固定值
673
+ if (this_.conditionfieldTree[i].defaultType == '4') {
674
+ param[this_.conditionfieldTree[i].field] =
675
+ this_.conditionfieldTree[i].comment
504
676
  }
505
677
  }
506
- //有动态传入的字段
507
- if (JSON.stringify(param) != '{}') {
508
- this_.dialogVisible = true
509
- } else {
510
- //无动态传入的字段
511
- this_.customDialogTreeShow(this_.pageParam)
512
- }
513
678
  }
514
- })
679
+ }
680
+ //有动态传入的字段
681
+ if (JSON.stringify(param) != '{}') {
682
+ this_.dialogVisible = true
683
+ } else {
684
+ //无动态传入的字段
685
+ this_.customDialogTreeShow(this_.pageParam)
686
+ }
687
+ }
515
688
  },
516
689
  treeClick(data) {
517
690
  // 单选
@@ -648,13 +821,22 @@
648
821
  }
649
822
  // 添加用户id 岗位id 组织id
650
823
  try {
651
- if (this.$requestConfig.getUserId()) {
824
+ if (
825
+ this.$requestConfig.getUserId &&
826
+ this.$requestConfig.getUserId()
827
+ ) {
652
828
  ctx.userId = this.$requestConfig.getUserId()
653
829
  }
654
- if (this.$requestConfig.getOrgId()) {
830
+ if (
831
+ this.$requestConfig.getOrgId &&
832
+ this.$requestConfig.getOrgId()
833
+ ) {
655
834
  ctx.orgId = this.$requestConfig.getOrgId()
656
835
  }
657
- if (this.$requestConfig.getPostId()) {
836
+ if (
837
+ this.$requestConfig.getPostId &&
838
+ this.$requestConfig.getPostId()
839
+ ) {
658
840
  ctx.postId = this.$requestConfig.getPostId()
659
841
  }
660
842
  } catch (e) {
@@ -751,8 +933,19 @@
751
933
  this.selectOrgs = this.convertComment2Field(str, field)
752
934
  this.custdialog.custDialog.mappingConf.forEach((con) => {
753
935
  var val = ''
754
- str.forEach((item) => {
755
- val += item[con.from] + ','
936
+ str.forEach((item, index) => {
937
+ // 此处添加url跳转参数保存逻辑
938
+ if (
939
+ this.jumpParamKey &&
940
+ this.isHaveJumpUrl &&
941
+ this.modelName == 'data.' + con['target'][0]
942
+ ) {
943
+ val += `${item[con.from]}¯${this.jumpParamKey}:${
944
+ this.selectOrgs[index][this.jumpParamKey]
945
+ },`
946
+ } else {
947
+ val += item[con.from] + ','
948
+ }
756
949
  })
757
950
  if (this.modelName == 'data.' + con['target'][0]) {
758
951
  utils.setValueByPath(
@@ -839,6 +1032,29 @@
839
1032
  //用户输入的
840
1033
  if (this.queryParams.length != 0 && this.queryParams[0] != '') {
841
1034
  this.conditionBind.forEach((item, index) => {
1035
+ // 日期范围特殊处理
1036
+ if (item.dbType == 'date' && item.condition == 'BETWEEN') {
1037
+ if (
1038
+ (this.queryParams[index].startDate &&
1039
+ !this.queryParams[index].endDate) ||
1040
+ (!this.queryParams[index].startDate &&
1041
+ this.queryParams[index].endDate)
1042
+ ) {
1043
+ flag = true
1044
+ this.$message.info('日期范围未填写完整!')
1045
+ return
1046
+ }
1047
+ if (
1048
+ this.queryParams[index].startDate &&
1049
+ this.queryParams[index].endDate
1050
+ ) {
1051
+ this.queryParams[index][
1052
+ item.field
1053
+ ] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
1054
+ } else {
1055
+ this.queryParams[index][item.field] = ''
1056
+ }
1057
+ }
842
1058
  if (this.queryParams[index][item.field]) {
843
1059
  querys.push({
844
1060
  property: item.field,
@@ -912,13 +1128,22 @@
912
1128
  ctx.total = pageBean.pageBean.total
913
1129
  // 添加用户id 岗位id 组织id
914
1130
  try {
915
- if (this.$requestConfig.getUserId()) {
1131
+ if (
1132
+ this.$requestConfig.getUserId &&
1133
+ this.$requestConfig.getUserId()
1134
+ ) {
916
1135
  ctx.userId = this.$requestConfig.getUserId()
917
1136
  }
918
- if (this.$requestConfig.getOrgId()) {
1137
+ if (
1138
+ this.$requestConfig.getOrgId &&
1139
+ this.$requestConfig.getOrgId()
1140
+ ) {
919
1141
  ctx.orgId = this.$requestConfig.getOrgId()
920
1142
  }
921
- if (this.$requestConfig.getPostId()) {
1143
+ if (
1144
+ this.$requestConfig.getPostId &&
1145
+ this.$requestConfig.getPostId()
1146
+ ) {
922
1147
  ctx.postId = this.$requestConfig.getPostId()
923
1148
  }
924
1149
  } catch (e) {
@@ -951,6 +1176,8 @@
951
1176
  } else {
952
1177
  param.pageBean.pageSize = -1
953
1178
  }
1179
+ // 日期格式的 改成数组
1180
+ // this.changeDateFormat(param)
954
1181
  //构造请求的参数
955
1182
  let requestParam = {
956
1183
  pageBean: param,
@@ -986,6 +1213,21 @@
986
1213
  }
987
1214
  }
988
1215
  },
1216
+ changeDateFormat(param) {
1217
+ let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
1218
+ 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$/
1219
+ Object.keys(param).forEach((key) => {
1220
+ if (
1221
+ param[key] &&
1222
+ typeof param[key] == 'string' &&
1223
+ param[key].includes(',') &&
1224
+ (dateValidate1.test(param[key].split(',')[0]) ||
1225
+ dateValidate2.test(param[key].split(',')[0]))
1226
+ ) {
1227
+ param[key] = param[key].split(',')
1228
+ }
1229
+ })
1230
+ },
989
1231
  getSearchValueByKey() {
990
1232
  let queryParamsObj = {}
991
1233
  if (this.queryParams.length > 0) {
@@ -1205,13 +1447,32 @@
1205
1447
  }
1206
1448
  }
1207
1449
  }
1450
+ // 如果是查询中使用的对话框
1451
+ if (this.dialogType == 'search') {
1452
+ let returnVal = []
1453
+ str.forEach((item) => {
1454
+ returnVal.push(decodeURIComponent(item[this.modelName]))
1455
+ })
1456
+ this.$emit('updateInput', returnVal.join(','))
1457
+ return
1458
+ }
1208
1459
  const pInst = utils.getOnlineFormInstance(this)
1209
1460
  this.custdialog.custDialog.mappingConf.forEach((con) => {
1210
1461
  var val = ''
1211
1462
  var from = con.from.toLowerCase()
1212
1463
  str.forEach((item) => {
1213
1464
  if (item) {
1214
- val += decodeURIComponent(item[from]) + ','
1465
+ if (
1466
+ this.jumpParamKey &&
1467
+ this.isHaveJumpUrl &&
1468
+ this.modelName == 'data.' + con['target'][0]
1469
+ ) {
1470
+ val += `${decodeURIComponent(item[from])}¯${
1471
+ this.jumpParamKey
1472
+ }:${item[this.jumpParamKey]},`
1473
+ } else {
1474
+ val += decodeURIComponent(item[from]) + ','
1475
+ }
1215
1476
  }
1216
1477
  })
1217
1478
  if (this.modelName == 'data.' + con['target'][0]) {
@@ -1279,20 +1540,6 @@
1279
1540
  }
1280
1541
  }
1281
1542
  },
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
- // },
1296
1543
  calacInputSuffixHeight() {
1297
1544
  this.$emit('calacInputSuffixHeight')
1298
1545
  },
@@ -1616,4 +1863,50 @@
1616
1863
  padding: 10px 5px;
1617
1864
  overflow-y: auto;
1618
1865
  }
1866
+ .dialog-select {
1867
+ z-index: 2500 !important;
1868
+ }
1869
+ .mobile-van-action {
1870
+ &.min-height-action {
1871
+ min-height: 50%;
1872
+ }
1873
+ .dialog-mobile__title {
1874
+ font-size: 18px;
1875
+ color: #1a1a1a;
1876
+ }
1877
+ .dialog-mobile__close {
1878
+ float: right;
1879
+ }
1880
+ .van-action-sheet__cancel {
1881
+ padding: 8px 5px;
1882
+ background: $base-color-blue;
1883
+ color: $base-color-white;
1884
+ }
1885
+ .search-box {
1886
+ padding-right: 60px;
1887
+ position: relative;
1888
+ > .unfold-icon {
1889
+ position: absolute;
1890
+ right: 20px;
1891
+ top: 17px;
1892
+ }
1893
+ .search-item {
1894
+ display: flex;
1895
+ align-items: center;
1896
+ > p {
1897
+ width: 90px;
1898
+ font-size: 14px;
1899
+ text-align: right;
1900
+ margin-right: 10px;
1901
+ }
1902
+ > div {
1903
+ flex: 1;
1904
+ overflow: hidden;
1905
+ }
1906
+ }
1907
+ .search-btns {
1908
+ text-align: center;
1909
+ }
1910
+ }
1911
+ }
1619
1912
  </style>