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.
@@ -7,7 +7,7 @@
7
7
  :before-close="dialogCancel"
8
8
  append-to-body
9
9
  top="6vh"
10
- width="75%"
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 :title="condition.comment">{{ condition.comment }}:</p>
50
- <!-- input输入框 -->
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
- class="search-item_main"
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[index][condition.field]"
95
- :dickey="condition.config.dic"
96
- :filterable="condition.config.filterable"
97
- ></ht-dictionary>
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
- class="search-item_main"
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 sortDisplayfield"
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
- :width="field.width || ''"
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
- this.initDialog(customDialog, isMounted)
619
- })
620
- },
621
- initDialog(customDialog, isMounted) {
622
- let alias = this.custdialog.custDialog.alias
623
- const this_ = this
624
- if (!customDialog || !customDialog.alias) {
625
- this.$message.error('对话框别名【' + alias + '】不存在!')
626
- return
627
- }
628
- if (customDialog.style == 1) {
629
- var displaylist = JSON.parse(customDialog.displayfield)
630
- this_.nodeKey = displaylist.id
631
- }
632
- if (customDialog.needPage && customDialog.requestType === 'POST') {
633
- let obj = {}
634
- this.getLastKeyByPath(obj, customDialog.pageKey, 1)
635
- this.getLastKeyByPath(obj, customDialog.pageSizeKey, 10)
636
- this.getLastKeyByPath(obj, customDialog.totalKey, true)
637
- const exp = utils.parseExp(customDialog.dataParam, obj, true)
638
- if (exp) {
639
- const params = JSON.parse(exp)
640
- if (params.pageBean) {
641
- this.pagination = {
642
- ...params.pageBean,
643
- }
448
+ if (!customDialog || !customDialog.alias) {
449
+ this.$message.error('对话框别名【' + alias + '】不存在!')
450
+ return
644
451
  }
645
- }
646
- }
647
- //对话框按表单字段查询(参数传入的)
648
- let bindList = this_.custdialog.custDialog.conditions
649
- this_.param = [] //绑定的表单字段
650
- if (bindList.length > 0) {
651
- bindList.forEach((ele) => {
652
- //绑定表单字段
653
- if (
654
- ele.bind &&
655
- (ele.defaultType == '3' || ele.bind.startsWith('data.searchForm'))
656
- ) {
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.field = ele.field
659
- obj.bind = ele.bind
660
- obj.bindType = ele.bindType
661
- this_.param.push(obj)
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
- //取值对象为脚本时获取value
664
- if (ele.bindType === 3) {
665
- this_.$requestConfig.executeScript(ele.bind).then((res) => {
666
- this_.executeScriptResult = res && res.value
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
- let userInputList = JSON.parse(customDialog.conditionfield)
673
- this_.quickSearch = '' //填写提示 placeholder
674
- this_.conditionBind = []
675
- let queryParams = []
676
- let placeholders = []
677
- if (userInputList.length > 0) {
678
- userInputList.forEach((ele) => {
679
- var obj = {}
680
- //条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
681
- if (ele.defaultType == '1') {
682
- obj[ele.field] = ''
683
- queryParams.push(obj)
684
- // queryParams[ele.field] = "";
685
- this_.conditionBind.push(ele)
686
- placeholders.push('请输入' + ele.comment)
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
- if (ele.defaultType == '2' && ele.defaultValue) {
689
- this_.fixedParams[ele.field] = ele.defaultValue
520
+ //判断是否显示条件查询输入框
521
+ if (this_.quickSearch != '') {
522
+ this_.querysShow = true
523
+ } else {
524
+ this_.querysShow = true
690
525
  }
691
- })
692
- this.$set(this, 'queryParams', queryParams)
693
- this.$set(this, 'placeholders', placeholders)
694
- }
695
- //判断是否显示条件查询输入框
696
- if (this_.quickSearch != '') {
697
- this_.querysShow = true
698
- } else {
699
- this_.querysShow = true
700
- }
701
- this_.quickSearch = '请输入' + this.quickSearch + '查询'
702
- this_.style = 'height:' + customDialog.height + 'px'
703
- if (window.screen.height && window.screen.height <= 900) {
704
- this.style = 'height:440px'
705
- }
706
- if (customDialog.style == 0 || customDialog.style == 2) {
707
- //列表
708
- setTimeout(() => {
709
- this_.customDialogShow(
710
- {
711
- alias: alias,
712
- customDialog: customDialog,
713
- },
714
- isMounted
715
- )
716
- }, 100)
717
- } else if (customDialog.style == 1) {
718
- //树形
719
- this_.pageParam = { alias: alias, customDialog: customDialog }
720
- this_.customDialog = customDialog
721
- let param = {}
722
- this_.conditionfieldTree = []
723
- //判断是否存在条件
724
- if (customDialog.conditionfield) {
725
- this_.conditionfieldTree = JSON.parse(customDialog.conditionfield)
726
- if (this_.conditionfieldTree.length > 0) {
727
- for (let i = this_.conditionfieldTree.length - 1; i >= 0; i--) {
728
- //判断条件字段是否是动态传入(defaultType:4:动态传入,2:固定值 )
729
- if (this_.conditionfieldTree[i].defaultType == '4') {
730
- param[this_.conditionfieldTree[i].field] =
731
- this_.conditionfieldTree[i].comment
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,27 +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, index) => {
1008
- // 此处添加url跳转参数保存逻辑
1009
- if (
1010
- this.jumpParamKey &&
1011
- this.isHaveJumpUrl &&
1012
- (this.modelName == 'data.' + con['target'][0] ||
1013
- (this.modelName.includes('item.') &&
1014
- con['target'][0].endsWith(this.modelName.split('.')[1])))
1015
- ) {
1016
- let jumpParamKey = this.jumpParamKey
1017
- let jumpParamValue = this.jumpParamKey
1018
- if (this.jumpParamKey.includes(':')) {
1019
- jumpParamKey = this.jumpParamKey.split(':')[0]
1020
- jumpParamValue = this.jumpParamKey.split(':')[1]
1021
- }
1022
- val += `${item[con.from]}¯${jumpParamKey}:${
1023
- this.selectOrgs[index][jumpParamValue]
1024
- },`
1025
- } else {
1026
- val += item[con.from] + ','
1027
- }
830
+ str.forEach((item) => {
831
+ val += item[con.from] + ','
1028
832
  })
1029
833
  if (this.modelName == 'data.' + con['target'][0]) {
1030
834
  utils.setValueByPath(
@@ -1109,46 +913,19 @@
1109
913
  pageBean.pageBean = { page: 1, pageSize: 10, showTotal: true }
1110
914
  }
1111
915
  //用户输入的
1112
- let flag = false
1113
916
  if (this.queryParams.length != 0 && this.queryParams[0] != '') {
1114
917
  this.conditionBind.forEach((item, index) => {
1115
- // 日期范围特殊处理
1116
- if (item.dbType == 'date' && item.condition == 'BETWEEN') {
1117
- if (
1118
- (this.queryParams[index].startDate &&
1119
- !this.queryParams[index].endDate) ||
1120
- (!this.queryParams[index].startDate &&
1121
- this.queryParams[index].endDate)
1122
- ) {
1123
- flag = true
1124
- this.$message.info('日期范围未填写完整!')
1125
- return
1126
- }
1127
- if (
1128
- this.queryParams[index].startDate &&
1129
- this.queryParams[index].endDate
1130
- ) {
1131
- this.queryParams[index][
1132
- item.field
1133
- ] = `${this.queryParams[index].startDate},${this.queryParams[index].endDate}`
1134
- } else {
1135
- this.queryParams[index][item.field] = ''
1136
- }
1137
- }
1138
918
  if (this.queryParams[index][item.field]) {
1139
919
  querys.push({
1140
920
  property: item.field,
1141
921
  value: this.queryParams[index][item.field],
1142
922
  group: 'main',
1143
- operation: item.condition,
923
+ operation: 'LIKE',
1144
924
  relation: 'AND',
1145
925
  })
1146
926
  }
1147
927
  })
1148
928
  }
1149
- if (flag) {
1150
- return
1151
- }
1152
929
  //参数传入的查询拼接
1153
930
  if (this.param) {
1154
931
  this.param.forEach((item) => {
@@ -1214,22 +991,13 @@
1214
991
  queryParamMap.total = pageBean.pageBean.total
1215
992
  // 添加用户id 岗位id 组织id
1216
993
  try {
1217
- if (
1218
- this.$requestConfig.getUserId &&
1219
- this.$requestConfig.getUserId()
1220
- ) {
994
+ if (this.$requestConfig.getUserId()) {
1221
995
  ctx.userId = this.$requestConfig.getUserId()
1222
996
  }
1223
- if (
1224
- this.$requestConfig.getOrgId &&
1225
- this.$requestConfig.getOrgId()
1226
- ) {
997
+ if (this.$requestConfig.getOrgId()) {
1227
998
  ctx.orgId = this.$requestConfig.getOrgId()
1228
999
  }
1229
- if (
1230
- this.$requestConfig.getPostId &&
1231
- this.$requestConfig.getPostId()
1232
- ) {
1000
+ if (this.$requestConfig.getPostId()) {
1233
1001
  ctx.postId = this.$requestConfig.getPostId()
1234
1002
  }
1235
1003
  } catch (e) {
@@ -1254,14 +1022,12 @@
1254
1022
  value: queryParamMap[bindKey] || ctx[bindKey] || '',
1255
1023
  }
1256
1024
  })
1257
- param.querys = queryList || []
1025
+ param.querys = queryList
1258
1026
  if (this.customDialog.needPage) {
1259
1027
  param.pageBean = obj
1260
1028
  } else {
1261
1029
  param.pageBean.pageSize = -1
1262
1030
  }
1263
- // 日期格式的 改成数组
1264
- // this.changeDateFormat(param)
1265
1031
  //构造请求的参数
1266
1032
  let requestParam = {
1267
1033
  pageBean: param,
@@ -1301,21 +1067,6 @@
1301
1067
  }
1302
1068
  this.tableRadioVal = ''
1303
1069
  },
1304
- changeDateFormat(param) {
1305
- let dateValidate1 = /^\d{4}\-\d{2}\-\d{2}$/
1306
- let dateValidate2 = /^([1-2][0-9][0-9][0-9]-[0-1]{0,1}[0-9]-[0-3]{0,1}[0-9])\s(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
1307
- Object.keys(param).forEach((key) => {
1308
- if (
1309
- param[key] &&
1310
- typeof param[key] == 'string' &&
1311
- param[key].includes(',') &&
1312
- (dateValidate1.test(param[key].split(',')[0]) ||
1313
- dateValidate2.test(param[key].split(',')[0]))
1314
- ) {
1315
- param[key] = param[key].split(',')
1316
- }
1317
- })
1318
- },
1319
1070
  getSearchValueByKey() {
1320
1071
  let queryParamsObj = {}
1321
1072
  if (this.queryParams.length > 0) {
@@ -1570,8 +1321,6 @@
1570
1321
  },
1571
1322
  // 同步选择结果
1572
1323
  syncInputValue() {
1573
- // 对话框跳转url需要两个参数 1当前控件绑定的对象参数modelName 2对话框配置中配置的key名称
1574
- // 同步值时,如果有绑定url跳转参数,值格式为 名称¯跳转key:跳转value
1575
1324
  let thisIndex = null //当前数据所在下标
1576
1325
  let parentIndex = null //父节点所在下标
1577
1326
  if (this.$parent.$el) {
@@ -1659,49 +1408,13 @@
1659
1408
  }
1660
1409
  }
1661
1410
  }
1662
- // 如果是查询中使用的对话框
1663
- if (this.dialogType == 'search') {
1664
- let returnVal = []
1665
- str.forEach((item) => {
1666
- returnVal.push(decodeURIComponent(item[this.modelName]))
1667
- })
1668
- this.$emit('updateInput', returnVal.join(','))
1669
- return
1670
- }
1671
1411
  const pInst = utils.getOnlineFormInstance(this)
1672
1412
  this.custdialog.custDialog.mappingConf.forEach((con) => {
1673
1413
  var val = ''
1674
1414
  var from = con.from.toLowerCase()
1675
1415
  str.forEach((item) => {
1676
- // 如果有绑定url跳转参数 需获取跳转参数的key
1677
1416
  if (item) {
1678
- if (
1679
- this.jumpParamKey &&
1680
- this.isHaveJumpUrl &&
1681
- (this.modelName == 'data.' + con['target'][0] ||
1682
- (this.modelName.includes('item.') &&
1683
- con['target'][0].endsWith(this.modelName.split('.')[1])))
1684
- ) {
1685
- // 如果有冒号 冒号前面是传值key 后面是取值key
1686
- let jumpParamKey = this.jumpParamKey
1687
- let jumpParamValue = this.jumpParamKey
1688
- if (this.jumpParamKey.includes(':')) {
1689
- jumpParamKey = this.jumpParamKey.split(':')[0]
1690
- jumpParamValue = this.jumpParamKey.split(':')[1]
1691
- }
1692
- // 需根据key 找到对应 返回数据的返回名称
1693
- let returnMap = returnStr.find((k) => {
1694
- return (
1695
- k.field.toLowerCase() == jumpParamValue.toLowerCase()
1696
- )
1697
- })
1698
- let returnMapKey = returnMap ? returnMap.comment : ''
1699
- val += `${decodeURIComponent(item[from])}¯${
1700
- jumpParamKey
1701
- }:${decodeURIComponent(item[returnMapKey])},`
1702
- } else {
1703
- val += decodeURIComponent(item[from]) + ','
1704
- }
1417
+ val += decodeURIComponent(item[from]) + ','
1705
1418
  }
1706
1419
  })
1707
1420
  if (this.modelName == 'data.' + con['target'][0]) {
@@ -1742,6 +1455,7 @@
1742
1455
  const _val = val.substring(0, val.length - 1)
1743
1456
  if (path) {
1744
1457
  if (this.modelName && this.modelName.endsWith(path)) {
1458
+ // this.$emit('input', _val)
1745
1459
  this.$emit('updateInput', _val)
1746
1460
  }
1747
1461
  utils.setValueByPath(
@@ -2093,56 +1807,19 @@
2093
1807
  margin-top: 10px;
2094
1808
  }
2095
1809
 
2096
- ::v-deep .middle-header {
1810
+ .middle-header {
2097
1811
  height: unset !important;
2098
1812
  display: flex;
2099
1813
  flex-direction: row;
2100
1814
  flex-wrap: wrap;
2101
- padding-top: 15px;
2102
1815
  .search-item {
2103
1816
  display: flex;
2104
1817
  // width: 33.33%;
2105
- margin-right: 10px;
1818
+ margin-right: 12px;
2106
1819
  align-items: center;
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
- }
1820
+ }
1821
+ .btn-wrap {
1822
+ line-height: 50px;
2146
1823
  }
2147
1824
  }
2148
1825