cnhis-design-vue 2.1.11 → 2.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/CHANGELOG.md +45 -18
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +342 -234
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +55 -55
  15. package/es/button/style.css +1 -1
  16. package/es/calendar/index.js +8 -8
  17. package/es/captcha/index.js +3 -3
  18. package/es/card/index.js +8 -8
  19. package/es/carousel/index.js +8 -8
  20. package/es/cascader/index.js +8 -8
  21. package/es/checkbox/index.js +9 -9
  22. package/es/col/index.js +8 -8
  23. package/es/collapse/index.js +8 -8
  24. package/es/color-picker/index.js +1 -1
  25. package/es/comment/index.js +8 -8
  26. package/es/config-provider/index.js +8 -8
  27. package/es/date-picker/index.js +8 -8
  28. package/es/descriptions/index.js +8 -8
  29. package/es/divider/index.js +8 -8
  30. package/es/drag-layout/index.js +3 -3
  31. package/es/drawer/index.js +8 -8
  32. package/es/dropdown/index.js +8 -8
  33. package/es/editor/index.js +1 -1
  34. package/es/empty/index.js +8 -8
  35. package/es/fabric-chart/index.js +88 -92
  36. package/es/form/index.js +8 -8
  37. package/es/form-model/index.js +8 -8
  38. package/es/form-table/index.js +62 -62
  39. package/es/index/index.js +1415 -1024
  40. package/es/index/style.css +1 -1
  41. package/es/input/index.js +9 -9
  42. package/es/input-number/index.js +8 -8
  43. package/es/layout/index.js +8 -8
  44. package/es/list/index.js +8 -8
  45. package/es/locale-provider/index.js +8 -8
  46. package/es/map/index.js +9 -9
  47. package/es/mentions/index.js +8 -8
  48. package/es/menu/index.js +8 -8
  49. package/es/message/index.js +8 -8
  50. package/es/multi-chat/index.js +230 -127
  51. package/es/multi-chat/style.css +1 -1
  52. package/es/multi-chat-client/index.js +255 -147
  53. package/es/multi-chat-client/style.css +1 -1
  54. package/es/multi-chat-history/index.js +4 -4
  55. package/es/multi-chat-record/index.js +14 -14
  56. package/es/multi-chat-setting/index.js +23 -23
  57. package/es/multi-chat-sip/index.js +1 -1
  58. package/es/notification/index.js +8 -8
  59. package/es/page-header/index.js +8 -8
  60. package/es/pagination/index.js +8 -8
  61. package/es/popconfirm/index.js +8 -8
  62. package/es/popover/index.js +8 -8
  63. package/es/progress/index.js +8 -8
  64. package/es/radio/index.js +9 -9
  65. package/es/rate/index.js +8 -8
  66. package/es/result/index.js +8 -8
  67. package/es/row/index.js +8 -8
  68. package/es/scale-view/index.js +132 -218
  69. package/es/scale-view/style.css +1 -1
  70. package/es/select/index.js +11 -11
  71. package/es/select-label/index.js +11 -11
  72. package/es/select-person/index.js +2 -2
  73. package/es/skeleton/index.js +8 -8
  74. package/es/slider/index.js +8 -8
  75. package/es/space/index.js +8 -8
  76. package/es/spin/index.js +8 -8
  77. package/es/statistic/index.js +8 -8
  78. package/es/steps/index.js +8 -8
  79. package/es/switch/index.js +8 -8
  80. package/es/table-filter/index.js +433 -168
  81. package/es/table-filter/style.css +1 -1
  82. package/es/tabs/index.js +8 -8
  83. package/es/tag/index.js +9 -9
  84. package/es/time-picker/index.js +8 -8
  85. package/es/timeline/index.js +8 -8
  86. package/es/tooltip/index.js +8 -8
  87. package/es/transfer/index.js +8 -8
  88. package/es/tree/index.js +8 -8
  89. package/es/tree-select/index.js +8 -8
  90. package/es/upload/index.js +8 -8
  91. package/es/verification-code/index.js +2 -2
  92. package/lib/cui.common.js +1573 -1171
  93. package/lib/cui.umd.js +1573 -1171
  94. package/lib/cui.umd.min.js +45 -45
  95. package/package.json +2 -2
  96. package/packages/big-table/src/BigTable.vue +191 -127
  97. package/packages/big-table/src/assets/style/table-base.less +11 -1
  98. package/packages/big-table/src/utils/bigTableProps.js +2 -1
  99. package/packages/button/src/ButtonPrint/index.vue +5 -4
  100. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +3 -1
  101. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +25 -39
  102. package/packages/multi-chat/chat/chatHeader.vue +9 -4
  103. package/packages/multi-chat/chat/client/clientChat.vue +3 -0
  104. package/packages/multi-chat/chat/quickReply.vue +90 -12
  105. package/packages/multi-chat/store/actions.js +1 -1
  106. package/packages/scale-view/formitem/r-choice.vue +45 -103
  107. package/packages/table-filter/src/base-search-com/BaseSearch.vue +6 -2
  108. package/packages/table-filter/src/components/c-tree-select/tree-select.vue +1 -1
  109. package/packages/table-filter/src/components/multi-select/multi-select.vue +8 -4
  110. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +1 -1
  111. package/packages/table-filter/src/const/dataOptions.js +43 -0
  112. package/packages/table-filter/src/mixins/mixins.js +15 -2
  113. package/packages/table-filter/src/quick-search/QuickSearch.vue +113 -36
@@ -11,22 +11,20 @@
11
11
  <div class="check-wrap" v-if="hasRefresh && !isNestTable">
12
12
  <p class="check-wrap-title">
13
13
  <span>系统检测到有数据更新,</span>
14
- <span class="check-wrap-btn" @click="refreshTable">
15
- 点击查看
16
- </span>
14
+ <span class="check-wrap-btn" @click="refreshTable">点击查看</span>
17
15
  </p>
18
16
  </div>
19
17
  <!-- 全选 选择框 -->
20
18
  <div class="check-wrap" v-show="visibleCheckAllWrap && !isInlineOperating && !isNestTable">
21
19
  <p class="check-wrap-title">
22
- <span> 已勾选数据共{{ allSelectedLength }}条 </span>
23
- <span v-show="visibleCheckAllWrapMore"> (当前页{{ currentPageSelectedLength }}条) </span>
20
+ <span>已勾选数据共{{ allSelectedLength }}条</span>
21
+ <span v-show="visibleCheckAllWrapMore">(当前页{{ currentPageSelectedLength }}条)</span>
24
22
  </p>
25
23
  <template v-if="visibleCheckAllWrapMore">
26
24
 
27
25
  <p v-if="!visibleCancelCheckAllBtn" class="check-wrap-btn" @click="handleCheckAll">
28
- <!-- asyncCount 性能模式也可以“勾选全部” -->
29
- <span v-if="pageVO.total > MAX_CHECK_SIZE">
26
+ <!-- asyncCount 性能模式也可以“勾选全部” -->
27
+ <span v-if="pageVO.total > MAX_CHECK_SIZE">
30
28
  <!-- {{ `最大勾选“${tableName}” ${MAX_CHECK_SIZE}条数据` }} -->
31
29
  {{ `勾选全部页 ${MAX_CHECK_SIZE}条数据` }}
32
30
  </span>
@@ -35,15 +33,13 @@
35
33
  {{ `勾选全部页 ${pageVO.total}条数据` }}
36
34
  </span>
37
35
  </p>
38
- <p v-else class="check-wrap-btn" @click="handleCancelAllCheck">
39
- 取消全部勾选
40
- </p>
36
+ <p v-else class="check-wrap-btn" @click="handleCancelAllCheck">取消全部勾选</p>
41
37
  </template>
42
38
  </div>
43
39
  <!-- 树状表格已选 -->
44
40
  <div v-show="visibleTreeCheck && !isInlineOperating && !isNestTable" class="check-wrap">
45
41
  <p class="check-wrap-title">
46
- <span> 已勾选数据共{{ treeTableLength }}条 </span>
42
+ <span>已勾选数据共{{ treeTableLength }}条</span>
47
43
  </p>
48
44
  </div>
49
45
  <c-grid
@@ -105,7 +101,11 @@
105
101
  >
106
102
  <template v-slot:empty>
107
103
  <div v-if="isShowEmpty">
108
- <NoData :noDataImg="emptyItems.noDataImg" :noDataTip="emptyItems.noDataTip" :showImg="!isNestTable"></NoData>
104
+ <NoData
105
+ :noDataImg="emptyItems.noDataImg"
106
+ :noDataTip="emptyItems.noDataTip"
107
+ :showImg="!isNestTable"
108
+ ></NoData>
109
109
  </div>
110
110
  </template>
111
111
  <!-- 修复 vxe-table升级3.x版本 原自定义checkbox样式失效 -->
@@ -148,7 +148,7 @@
148
148
 
149
149
  <script>
150
150
  import Vue from 'vue';
151
- import VueXss from "vue-xss";
151
+ import VueXss from 'vue-xss';
152
152
  import TextOverTooltip from './components/TextOverTooltip.vue';
153
153
  import AutoLayoutButton from './components/AutoLayoutButton.vue';
154
154
  import { Icon, Tooltip, Progress, Switch, Popover, Button, Dropdown, Menu, Checkbox, Input, Popconfirm } from 'ant-design-vue';
@@ -197,10 +197,7 @@ export default create({
197
197
  mixins: [format, batchEditing, nestTable],
198
198
  props: Object.assign({}, bigTableProps),
199
199
  beforeCreate() {
200
- Vue.use(Button)
201
- .use(Checkbox)
202
- .use(Input)
203
- .use(DomPortal);
200
+ Vue.use(Button).use(Checkbox).use(Input).use(DomPortal);
204
201
  !this.$xss && Vue.use(VueXss);
205
202
  },
206
203
  mounted() {
@@ -295,10 +292,10 @@ export default create({
295
292
  return this.primaryKey || 'theUniqueKey';
296
293
  },
297
294
  handlePrimaryKey() {
298
- return this.isTree > 0 ? this.primaryKey || "theUniqueKey" : "theUniqueKey";
295
+ return this.isTree > 0 ? this.primaryKey || 'theUniqueKey' : 'theUniqueKey';
299
296
  },
300
297
  handleName() {
301
- return function(item, key = 'name') {
298
+ return function (item, key = 'name') {
302
299
  return item.alias || item[key];
303
300
  };
304
301
  },
@@ -358,20 +355,20 @@ export default create({
358
355
  return { startIndex: startIndex < 0 ? 0 : startIndex };
359
356
  },
360
357
  isScanMultiTable() {
361
- return this.columnConfig?.isScanMultiTable
358
+ return this.columnConfig?.isScanMultiTable;
362
359
  },
363
- tableNoSetting(){
360
+ tableNoSetting() {
364
361
  let { noSetting } = this.getOtherConfigInit() || {};
365
362
  return noSetting || this.showSettings?.hideSettingBtn == 1 || this.isTableEdit;
366
363
  },
367
364
  // 行编辑字段map
368
- listFormUnionSettingMap(){
365
+ listFormUnionSettingMap() {
369
366
  let paramsList = this?.listFormUnionSetting?.paramsList || {};
370
367
  let tableFieldMap = {};
371
- paramsList.forEach(v=>{
368
+ paramsList.forEach(v => {
372
369
  tableFieldMap[v.tableField] = v;
373
- })
374
- return tableFieldMap
370
+ });
371
+ return tableFieldMap;
375
372
  }
376
373
  },
377
374
  watch: {
@@ -384,11 +381,11 @@ export default create({
384
381
  const newV = {};
385
382
  for (let i in v) {
386
383
  if (typeof v[i] === 'number') {
387
- newV[i] = v[i]
384
+ newV[i] = v[i];
388
385
  } else {
389
- newV[i] = JSON.parse(JSON.stringify(v[i] || ""));
386
+ newV[i] = JSON.parse(JSON.stringify(v[i] || ''));
390
387
  }
391
- if (newV[i] && typeof v[i] === "string" && !newV[i].includes('security-code')) {
388
+ if (newV[i] && typeof v[i] === 'string' && !newV[i].includes('security-code')) {
392
389
  newV[i] = this.$xss(v[i]);
393
390
  }
394
391
  }
@@ -397,13 +394,13 @@ export default create({
397
394
  this.loadData(list);
398
395
  },
399
396
  quickSearchConfig: {
400
- handler: function() {
397
+ handler: function () {
401
398
  this.setFilterStatus();
402
399
  },
403
400
  deep: true
404
401
  },
405
402
  tableDataCache: {
406
- handler: function(val) {
403
+ handler: function (val) {
407
404
  this.setAllCheckedRows(val);
408
405
  },
409
406
  deep: true
@@ -461,7 +458,7 @@ export default create({
461
458
  }
462
459
  });
463
460
  }
464
- },
461
+ }
465
462
  // isEditAllRow:{
466
463
  // handler(val){
467
464
  // // 全部行编辑需要隐藏“操作”列
@@ -475,7 +472,7 @@ export default create({
475
472
  // }
476
473
  },
477
474
  methods: {
478
- customerInit(){
475
+ customerInit() {
479
476
  this.loadColumn(this.columnConfig);
480
477
  this.loadData(this.data);
481
478
  },
@@ -571,7 +568,7 @@ export default create({
571
568
  resetTableInlineEditStatus() {
572
569
  if (!this.checkOperateCurrentTable()) return false;
573
570
  // 编辑中,不重置样式
574
- if(this.defaultEditAllRow || this.isEditAllRow || this.isInlineEditing|| this.isBatchEditing) return false;
571
+ if (this.defaultEditAllRow || this.isEditAllRow || this.isInlineEditing || this.isBatchEditing) return false;
575
572
  this.handleClickCancelBtnByInline();
576
573
  },
577
574
  setChecklist(list) {
@@ -616,7 +613,6 @@ export default create({
616
613
  this.resetTableInlineEditStatus();
617
614
 
618
615
  this.isLoadColumn = true;
619
-
620
616
  },
621
617
  setTableConfig(config) {
622
618
  this.showButtonTop = config.showButtonTop;
@@ -720,15 +716,15 @@ export default create({
720
716
  // 日期显示格式化
721
717
  getDate(row, item) {
722
718
  let obj = row[item.columnName];
723
- let style = {}
719
+ let style = {};
724
720
  // fillColor 有值代表背景色
725
721
  if (obj?.fillColor) {
726
- style.background = obj.fillColor
727
- style.color = '#fff'
728
- style.padding = "0 2px"
722
+ style.background = obj.fillColor;
723
+ style.color = '#fff';
724
+ style.padding = '0 2px';
729
725
  }
730
726
  if (obj?.background) {
731
- style.color = obj.background
727
+ style.color = obj.background;
732
728
  }
733
729
  if (!vexutils.isEmpty(obj)) {
734
730
  if (vexutils.isObject(obj) && 'tooltip' in obj) {
@@ -877,18 +873,38 @@ export default create({
877
873
  key = temp.tooltip || temp.value; // temp.tooltip 日期的处理
878
874
  }
879
875
  }
880
- let isEdit = (this.isBatchEditing || this.isInlineEditing || this.isInlineAdding);
876
+ let isEdit = this.isBatchEditing || this.isInlineEditing || this.isInlineAdding;
881
877
 
882
- let f = isEdit ? this.listFormUnionSettingMap[item.columnName] ? disabled : true : disabled;
878
+ let f = isEdit ? (this.listFormUnionSettingMap[item.columnName] ? disabled : true) : disabled;
883
879
 
884
- function switchClick(e){
885
- e.stopPropagation();
880
+ function switchClick(e) {
881
+ e.stopPropagation();
886
882
  }
887
- return [<div onClick={switchClick} style="display: inline-block;"><a-switch checked={key == item.btnLinkSwitchDefVal} disabled={f} on-change={e => this.switchBtnOnChange(e, row, item, index)} /></div>];
883
+ return [
884
+ <div onClick={switchClick} style="display: inline-block;">
885
+ <a-switch checked={key == item.btnLinkSwitchDefVal} disabled={f} on-change={e => this.switchBtnOnChange(e, row, item, index)} />
886
+ </div>
887
+ ];
888
+ },
889
+ // 提示文案
890
+ handleValueTips(row, item) {
891
+ let { columnName } = item;
892
+ let { __originItem__ } = row;
893
+ if (__originItem__ && vexutils.isJSON(__originItem__)) {
894
+ __originItem__ = JSON.parse(__originItem__);
895
+ }
896
+ if (!columnName || !__originItem__) return;
897
+ let originValue = __originItem__[columnName];
898
+ if (!originValue) return;
899
+ if (typeof originValue !== 'string' || !originValue.startsWith('###{')) return;
900
+ let temp = JSON.parse(originValue.replace('###', ''));
901
+ if (!temp || !temp.tips) return;
902
+ return temp.tips;
888
903
  },
889
904
  // 字段显示 jsx
890
905
  getField(row, item, index, isLink) {
891
906
  const html = formatFieldText(row, item, this.columnConfig.fieldList, this.fieldListOriginal);
907
+ let tips = this.handleValueTips(row, item);
892
908
 
893
909
  const content = [isLink && html ? <a on-click={e => this.linkDetail(row, item, index, e)} domPropsInnerHTML={html} /> : <span class="domPropsInnerHTML-span" domPropsInnerHTML={html} />];
894
910
 
@@ -907,6 +923,16 @@ export default create({
907
923
  </a-popover>
908
924
  ];
909
925
  } else {
926
+ if (tips) {
927
+ return [
928
+ <a-tooltip>
929
+ <template slot="title">
930
+ <span domPropsInnerHTML={tips}> </span>
931
+ </template>
932
+ {content}
933
+ </a-tooltip>
934
+ ];
935
+ }
910
936
  return [content];
911
937
  }
912
938
  },
@@ -983,7 +1009,7 @@ export default create({
983
1009
  },
984
1010
  // 按钮 jsx
985
1011
  getFoldBtnList(row, index) {
986
- if (this.isRowEditing) return
1012
+ if (this.isRowEditing) return;
987
1013
  return [
988
1014
  (row.foldBtnList?.length && (
989
1015
  <a-dropdown style={{ display: !row.__isInlineEditing ? 'inline-block' : 'none' }} disabled={this.isInlineOperating}>
@@ -1022,30 +1048,16 @@ export default create({
1022
1048
 
1023
1049
  return [
1024
1050
  <span>
1025
- <a-button
1026
- style={{ display: row.__isInlineEditing ? 'inline-block' : 'none' }}
1027
- on-click={this.setBatchSaveRowStatus}
1028
- title="保存"
1029
- class="btn-custom-class row-btn"
1030
- type="link"
1031
- size="small"
1032
- >
1051
+ <a-button style={{ display: row.__isInlineEditing ? 'inline-block' : 'none' }} on-click={this.setBatchSaveRowStatus} title="保存" class="btn-custom-class row-btn" type="link" size="small">
1033
1052
  保存
1034
1053
  </a-button>
1035
- <a-button
1036
- style={{ display: row.__isInlineEditing ? 'inline-block' : 'none' }}
1037
- on-click={this.setBatchCancelRowStatus}
1038
- title="取消"
1039
- class="btn-custom-class row-btn"
1040
- type="link"
1041
- size="small"
1042
- >
1054
+ <a-button style={{ display: row.__isInlineEditing ? 'inline-block' : 'none' }} on-click={this.setBatchCancelRowStatus} title="取消" class="btn-custom-class row-btn" type="link" size="small">
1043
1055
  取消
1044
1056
  </a-button>
1045
1057
  </span>
1046
1058
  ];
1047
1059
  },
1048
- setBatchSaveRowStatus(e){
1060
+ setBatchSaveRowStatus(e) {
1049
1061
  e.stopPropagation();
1050
1062
  let { btnName, tipsMsg, isTips } = this.curBatchBtnData || {};
1051
1063
  let _this = this;
@@ -1061,8 +1073,7 @@ export default create({
1061
1073
  onOk: () => {
1062
1074
  _this.$emit('setBatchSaveRowStatus', true);
1063
1075
  },
1064
- onCancel() {
1065
- }
1076
+ onCancel() {}
1066
1077
  });
1067
1078
  },
1068
1079
  setBatchCancelRowStatus(e) {
@@ -1071,7 +1082,7 @@ export default create({
1071
1082
  },
1072
1083
  checkOperateCurrentTable() {
1073
1084
  if (this.isNestTable) return false;
1074
- if(this.defaultEditAllRow) return true;
1085
+ if (this.defaultEditAllRow) return true;
1075
1086
  let id = this.inlineEditCurrentOperateBtnId;
1076
1087
  let find = this.btnList?.find(item => {
1077
1088
  return item?.settingObj?.[0]?.obj_id === id;
@@ -1231,7 +1242,7 @@ export default create({
1231
1242
  );
1232
1243
  }
1233
1244
  };
1234
- let checkVisible = isBatchSelect == 1 && !this.isNestTable && !isScanMultiTable && !this.isInlineOperating || false;
1245
+ let checkVisible = (isBatchSelect == 1 && !this.isNestTable && !isScanMultiTable && !this.isInlineOperating) || false;
1235
1246
  let columns = [
1236
1247
  {
1237
1248
  fixed: 'left',
@@ -1240,7 +1251,7 @@ export default create({
1240
1251
  width: '50',
1241
1252
  slots: {
1242
1253
  header: () => {
1243
- return "操作";
1254
+ return '操作';
1244
1255
  },
1245
1256
  default: this.scanMultiOperate
1246
1257
  }
@@ -1268,9 +1279,9 @@ export default create({
1268
1279
  // slots: selectType === 'checkbox' ? checkboxSlot : null,
1269
1280
  // 修复 vxe-table升级3.x版本 原自定义checkbox样式失效
1270
1281
  slots:
1271
- selectType === "checkbox"
1282
+ selectType === 'checkbox'
1272
1283
  ? {
1273
- checkbox: "tooltip_checkbox"
1284
+ checkbox: 'tooltip_checkbox'
1274
1285
  }
1275
1286
  : null,
1276
1287
  showOverflow: true
@@ -1293,20 +1304,20 @@ export default create({
1293
1304
  let type = index === 0 && this.showNestTable ? 'expand' : '';
1294
1305
 
1295
1306
  // 扫码打开的table只展示
1296
- if(isScanMultiTable) {
1297
- fixed = "";
1307
+ if (isScanMultiTable) {
1308
+ fixed = '';
1298
1309
  sortable = false;
1299
1310
  treeNode = false;
1300
- type = "";
1311
+ type = '';
1301
1312
  }
1302
1313
  // 行编辑不展示排序
1303
- if(this.isInlineOperating){
1314
+ if (this.isInlineOperating) {
1304
1315
  sortable = false;
1305
1316
  }
1306
1317
 
1307
1318
  const col = Object.assign(item, {
1308
1319
  // 全部行编辑 隐藏“操作”
1309
- visible: item.columnName == 'operatorColumn' ? this.isEditAllRow ? false : showButtonTop == 0 : item.isShow == 1,
1320
+ visible: item.columnName == 'operatorColumn' ? (this.isEditAllRow ? false : showButtonTop == 0) : item.isShow == 1,
1310
1321
  field: item.columnName,
1311
1322
  title: this.handleName(item, 'title'),
1312
1323
  minWidth: item.colWidth,
@@ -1318,7 +1329,7 @@ export default create({
1318
1329
 
1319
1330
  headerClassName: 'mycolumn', // 文本溢出处理('tooltip' vxe-table当前版本存在bug)
1320
1331
  // showHeaderOverflow: "title",
1321
- showOverflow: item.columnName == 'operatorColumn'? false: 'title',
1332
+ showOverflow: item.columnName == 'operatorColumn' ? false : 'title',
1322
1333
  treeNode: treeNode,
1323
1334
  type: type,
1324
1335
  slots: {
@@ -1352,7 +1363,6 @@ export default create({
1352
1363
  col.slots.header = this.toolTipTitle(item);
1353
1364
  }
1354
1365
 
1355
-
1356
1366
  if (!isScanMultiTable) {
1357
1367
  col.slots.footer = 'tooltip_footer';
1358
1368
  }
@@ -1417,7 +1427,7 @@ export default create({
1417
1427
  },
1418
1428
  setFilterStatus() {
1419
1429
  // 表头没有过滤字段 不需要设置
1420
- if(!this.filterFields || !Object.keys(this.filterFields).length) return;
1430
+ if (!this.filterFields || !Object.keys(this.filterFields).length) return;
1421
1431
  let val = this.quickSearchConfig;
1422
1432
 
1423
1433
  if (!val || !val.length) {
@@ -1437,7 +1447,6 @@ export default create({
1437
1447
  let itemKey = item.field_key;
1438
1448
  // 参与搜索的字段必须在 filterFields中
1439
1449
  if (itemKey in this.filterFields) {
1440
-
1441
1450
  if (!this.filterFields[item.field_key]) {
1442
1451
  this.$set(this.filterFields[item.field_key], 'CONVERT', []);
1443
1452
  return false;
@@ -1613,7 +1622,7 @@ export default create({
1613
1622
  return mergeConObj;
1614
1623
  },
1615
1624
  handleFilter(field) {
1616
- let conObj = this.mergeConObjFn()
1625
+ let conObj = this.mergeConObjFn();
1617
1626
  this.$emit('onSave', conObj, false, [], [], { isBigTable: true });
1618
1627
  field.visible = false;
1619
1628
  },
@@ -1622,33 +1631,56 @@ export default create({
1622
1631
  },
1623
1632
  handleFilterEmpty(field, columnName) {
1624
1633
  this.filterFields[columnName].CONVERT = [];
1625
- let conObj = this.mergeConObjFn()
1634
+ let conObj = this.mergeConObjFn();
1626
1635
 
1627
1636
  this.$emit('onSave', conObj, false, [], [], { isBigTable: true });
1628
1637
  field.visible = false;
1629
1638
  },
1630
- toolTipTitle(item, type) {
1631
- // let feildDescribe =
1632
- // (item.fieldSetting && this.$t(item.fieldSetting?.feildDescribeI18n)) ||
1633
- // item.fieldSetting?.feildDescribe ||
1634
- // "";
1639
+ handleCommonTooltipTitle(item, type) {
1635
1640
  let name = item.formTitle || item.alias || item.title;
1636
- // let tooltipTitle = feildDescribe || item.alias;
1637
1641
  let tooltipTitle = item.alias;
1638
1642
  let isAlias = false;
1639
1643
  if (this.tableOptions?.dataSourceType == 'guage') {
1640
1644
  tooltipTitle = item.alias || item.title;
1641
1645
  }
1642
- if (name&& tooltipTitle && name !== tooltipTitle) {
1646
+ if (name && tooltipTitle && name !== tooltipTitle) {
1643
1647
  isAlias = !!tooltipTitle;
1644
1648
  }
1645
- if (type === 'format') return <text-over-tooltip refName={'item-' + item[this.handleRowId]} tooltipTitle={tooltipTitle} content={name} isAlias={isAlias} />;
1646
- return () => {
1647
- return [
1649
+
1650
+ let fieldSetting = item.fieldSetting;
1651
+ if (fieldSetting && vexutils.isJSON(fieldSetting)) {
1652
+ fieldSetting = JSON.parse(fieldSetting);
1653
+ }
1654
+ let { feildDescribeI18n, feildDescribe } = fieldSetting || {};
1655
+
1656
+ let showTitleFeildDescribe = feildDescribe || feildDescribeI18n;
1657
+ let titleFeildDescribe = '';
1658
+ if (showTitleFeildDescribe) {
1659
+ titleFeildDescribe = (feildDescribeI18n && this.$root.$t(feildDescribeI18n)) || feildDescribe;
1660
+ }
1661
+ return (
1662
+ <div class={['table-title-wrap', { 'table-title-wrap-describe': showTitleFeildDescribe }]}>
1663
+ {showTitleFeildDescribe && (
1664
+ <a-tooltip placement="bottom">
1665
+ <template slot="title">
1666
+ <span domPropsInnerHTML={titleFeildDescribe}> </span>
1667
+ </template>
1668
+ <a-icon style="margin-right: 2px" type="question-circle" />
1669
+ </a-tooltip>
1670
+ )}
1648
1671
  <text-over-tooltip refName={'item-' + item[this.handleRowId]} tooltipTitle={tooltipTitle} content={name} isAlias={isAlias}>
1649
- {item.treeNode && this.isTree == 1 ? <a-icon type={this.isExpand && this.total < 1001 ? 'caret-down' : 'caret-right'} onClick={e => this.triggerExpand(e, this.isExpand)} /> : ''}
1672
+ {type !== 'format' && item.treeNode && this.isTree == 1 ? (
1673
+ <a-icon type={this.isExpand && this.total < 1001 ? 'caret-down' : 'caret-right'} onClick={e => this.triggerExpand(e, this.isExpand)} />
1674
+ ) : (
1675
+ ''
1676
+ )}
1650
1677
  </text-over-tooltip>
1651
- ];
1678
+ </div>
1679
+ );
1680
+ },
1681
+ toolTipTitle(item) {
1682
+ return () => {
1683
+ return [this.handleCommonTooltipTitle(item)];
1652
1684
  };
1653
1685
  },
1654
1686
 
@@ -1658,7 +1690,7 @@ export default create({
1658
1690
  return () => {
1659
1691
  return [
1660
1692
  <div class="filter-box">
1661
- {this.toolTipTitle(item, 'format')}
1693
+ {this.handleCommonTooltipTitle(item, 'format')}
1662
1694
  <i
1663
1695
  class={['vxe-filter--icon', 'vxe-filter--btn', 'vxe-icon--funnel', { active: field.visible || field.filterSort }, { checked: field.CONVERT?.length }]}
1664
1696
  onClick={event => this.showFilter(field, item.columnName, event)}
@@ -1707,7 +1739,7 @@ export default create({
1707
1739
  )}
1708
1740
  <div class="checkbox-box">
1709
1741
  <div class="checkbox-wrap js-checkbox-wrap" style={{ height: this.filterHeight + this.distance + 'px' }}>
1710
- {!field.searchFilterText ? (
1742
+ {!field.searchFilterText && (field.advanceOptionSetting) != '0' ? (
1711
1743
  <div class="ant-checkbox-group">
1712
1744
  <a-checkbox
1713
1745
  indeterminate={field.indeterminate}
@@ -1861,8 +1893,10 @@ export default create({
1861
1893
  checkboxWrapEl.scrollTop = tableScrollTop;
1862
1894
  });
1863
1895
  },
1864
- handleFilterChange(value, name, field) {
1896
+ handleFilterChange(newValue, name, field) {
1865
1897
  this.reScrollFilterWrap();
1898
+ let value = newValue;
1899
+ value = this.getSingleConvert(value,this.filterFields[name].CONVERT,field);
1866
1900
  this.filterFields[name].CONVERT = value;
1867
1901
 
1868
1902
  field.checkAll = value.length === field.setting.showSetting.length;
@@ -1876,7 +1910,12 @@ export default create({
1876
1910
  let addItems = value.filter(item => {
1877
1911
  return !beforeSearchConvert.includes(item);
1878
1912
  });
1879
- this.filterFields[columnName].CONVERT.push(...addItems);
1913
+ if(field.advanceOptionSetting == '0'){
1914
+ if(Array.isArray(this.filterFields[columnName].CONVERT)){
1915
+ this.filterFields[columnName].CONVERT.length = 0;
1916
+ }
1917
+ }
1918
+ this.filterFields[columnName].CONVERT.push(...addItems);
1880
1919
  } else {
1881
1920
  let removeItems = beforeSearchConvert.filter(item => {
1882
1921
  return !value.includes(item);
@@ -1886,8 +1925,11 @@ export default create({
1886
1925
  });
1887
1926
  }
1888
1927
 
1889
- field.searchFilterCONVERT = value;
1890
- beforeSearchConvert = vexutils.clone(value, true);
1928
+ let newValue = value;
1929
+ newValue = this.getSingleConvert(newValue,field.searchFilterCONVERT,field);
1930
+
1931
+ field.searchFilterCONVERT = newValue;
1932
+ beforeSearchConvert = vexutils.clone(newValue, true);
1891
1933
  },
1892
1934
  showFilter(field, columnName, event) {
1893
1935
  if (this.isInlineOperating) return false;
@@ -1909,7 +1951,7 @@ export default create({
1909
1951
  field.left = btnRectLeft + 'px';
1910
1952
  }
1911
1953
 
1912
- field.top = (btnRectTop + FILTER_BOX_TOP_OFFSET) + (this.filterTopOffset || 0)+ 'px';
1954
+ field.top = btnRectTop + FILTER_BOX_TOP_OFFSET + (this.filterTopOffset || 0) + 'px';
1913
1955
 
1914
1956
  field.visible = !field.visible;
1915
1957
 
@@ -1918,20 +1960,20 @@ export default create({
1918
1960
  field.indeterminate = !!len && len !== field.setting.showSetting.length;
1919
1961
  field.searchFilterText = '';
1920
1962
  },
1921
- scanMultiOperate(params){
1963
+ scanMultiOperate(params) {
1922
1964
  return [
1923
- <a-popconfirm ok-text={'确认'} cancel-text={'取消'} title={'是否确认删除?'} on-confirm={() =>this.confirmScanMulti(params)}>
1965
+ <a-popconfirm ok-text={'确认'} cancel-text={'取消'} title={'是否确认删除?'} on-confirm={() => this.confirmScanMulti(params)}>
1924
1966
  <svg-icon class="scan-multi-delete" iconClass="shanchu" />
1925
1967
  </a-popconfirm>
1926
- ]
1968
+ ];
1927
1969
  },
1928
1970
  /**
1929
1971
  * 删除选中scan数据
1930
1972
  */
1931
- confirmScanMulti(params){
1932
- let{row, $rowIndex} = params || {}
1933
- if(!row) return;
1934
- this.$emit("scanMultiRemove", $rowIndex, params)
1973
+ confirmScanMulti(params) {
1974
+ let { row, $rowIndex } = params || {};
1975
+ if (!row) return;
1976
+ this.$emit('scanMultiRemove', $rowIndex, params);
1935
1977
  let vxeTable = this.$refs.xGrid;
1936
1978
  vxeTable.remove(row);
1937
1979
  },
@@ -1940,7 +1982,7 @@ export default create({
1940
1982
  let { row, column, $rowIndex } = params;
1941
1983
  let own = column?._own || column?.own || col;
1942
1984
  let attrType = own?.attrType || '';
1943
- let fieldType = own?.fieldType || ""
1985
+ let fieldType = own?.fieldType || '';
1944
1986
  // 批量行编辑
1945
1987
  let formUnionItem = this.showEditForm(row, column, $rowIndex);
1946
1988
  if (formUnionItem) {
@@ -2012,19 +2054,17 @@ export default create({
2012
2054
  return this.getOrCode(row, own, attrType);
2013
2055
  }
2014
2056
  let value = row[own.columnName];
2015
- if(attrType === 'MONEY' && fieldType== "NUMBER" && vexutils.isNumber(value)){
2057
+ if (attrType === 'MONEY' && fieldType == 'NUMBER' && vexutils.isNumber(value)) {
2016
2058
  return value.toFixed(2);
2017
2059
  }
2018
2060
 
2019
2061
  if (column.property === 'operatorColumn') {
2020
2062
  if (this.showButtonTop != 0 || (this.isBatchEditing && !this.isRowEditing)) return;
2021
2063
 
2022
- if(this.rowBtnAutoLayout && !this.isRowEditing){
2023
- // 行内列表按钮改为自适应。
2024
- let filterList = Array.isArray(row.btnList)? row.btnList.filter((btn) => btn.isShow == '1' && btn.type != 'LINK') : [];
2025
- return [
2026
- <AutoLayoutButton btnList={filterList} row={row} index={$rowIndex} on-clickBtn={(...arg)=>this.clickBtn(...arg)} />
2027
- ]
2064
+ if (this.rowBtnAutoLayout && !this.isRowEditing) {
2065
+ // 行内列表按钮改为自适应。
2066
+ let filterList = Array.isArray(row.btnList) ? row.btnList.filter(btn => btn.isShow == '1' && btn.type != 'LINK') : [];
2067
+ return [<AutoLayoutButton btnList={filterList} row={row} index={$rowIndex} on-clickBtn={(...arg) => this.clickBtn(...arg)} />];
2028
2068
  }
2029
2069
  // 行编辑
2030
2070
  const inlineBtnList = this.generateInlineBtnList(row, $rowIndex);
@@ -2032,8 +2072,8 @@ export default create({
2032
2072
  const foldBtnList = this.getFoldBtnList(row, $rowIndex);
2033
2073
  return [
2034
2074
  <span>
2035
- {this.rowBtnAutoLayout? null: tileBtnList}
2036
- {this.rowBtnAutoLayout? null: foldBtnList}
2075
+ {this.rowBtnAutoLayout ? null : tileBtnList}
2076
+ {this.rowBtnAutoLayout ? null : foldBtnList}
2037
2077
  {inlineBtnList}
2038
2078
  </span>
2039
2079
  ];
@@ -2067,7 +2107,7 @@ export default create({
2067
2107
  if (!imageArr || !imageArr.length) return curSrc;
2068
2108
  let matchItem = imageArr.find(item => item.type === type);
2069
2109
  if (!matchItem) return curSrc;
2070
- if(matchItem.suffix) return curSrc + matchItem.suffix
2110
+ if (matchItem.suffix) return curSrc + matchItem.suffix;
2071
2111
  let h = matchItem.h;
2072
2112
  let w = matchItem.w;
2073
2113
  if (matchItem.h === 'adaptive' && matchItem.w != 'adaptive') {
@@ -2622,9 +2662,9 @@ export default create({
2622
2662
  this.$emit('setNestTableClick', this.isNestTable);
2623
2663
  this.$emit('setCurRowIndex', index);
2624
2664
  this.$emit('clickBtn', row, btn, row[this.handlePrimaryKey], index);
2625
- let trigger_type = btn.settingObj?.[0]?.trigger_type
2626
- if(trigger_type === "EDIT_ROW") {
2627
- this.checkedRows = [row]
2665
+ let trigger_type = btn.settingObj?.[0]?.trigger_type;
2666
+ if (trigger_type === 'EDIT_ROW') {
2667
+ this.checkedRows = [row];
2628
2668
  }
2629
2669
  },
2630
2670
  recordClickBtnInfo(row, index) {
@@ -2746,13 +2786,21 @@ export default create({
2746
2786
  };
2747
2787
  if (this.isTree == 2) {
2748
2788
  const { tableId, page, pageSize, autograph, isTreeOrList } = this.tableParams;
2789
+ const { extraParams = {} } = this.listCountParams || {};
2790
+ let tempExtra = {};
2791
+ if (vexutils.isJSON(extraParams)) {
2792
+ tempExtra = JSON.parse(extraParams);
2793
+ }
2794
+ // 20220725 测试要求懒加载树请求时带上父级的extraParams
2749
2795
  const params = {
2750
2796
  levelLazyLoadPrimaryKeyValue: row[this.primaryKey],
2751
2797
  tableId,
2752
2798
  page,
2753
2799
  pageSize,
2754
2800
  autograph,
2755
- isTreeOrList
2801
+ isTreeOrList,
2802
+ extraParams,
2803
+ ...tempExtra
2756
2804
  };
2757
2805
 
2758
2806
  return this.getAsyncTableData(params).then(({ data }) => {
@@ -2827,14 +2875,14 @@ export default create({
2827
2875
  let t = '';
2828
2876
  let IS_MONEY = 'MONEY' === this.getFieldAttrType(column);
2829
2877
  if (vexutils.has(this.sumData, column.property)) {
2830
- let val = vexutils.round(Number(this.sumData[column.property]), 4)
2878
+ let val = vexutils.round(Number(this.sumData[column.property]), 4);
2831
2879
  t += `<p class="table-footer-tooltip-label-wrap">
2832
2880
  <span class="table-footer-tooltip-label">求和:</span>
2833
- ${ IS_MONEY ? val.toFixed(2) : val}
2881
+ ${IS_MONEY ? val.toFixed(2) : val}
2834
2882
  </p>`;
2835
2883
  }
2836
2884
  if (vexutils.has(this.avgData, column.property)) {
2837
- let val = vexutils.round(Number(this.avgData[column.property]), 4)
2885
+ let val = vexutils.round(Number(this.avgData[column.property]), 4);
2838
2886
  t += `<p class="table-footer-tooltip-label-wrap">
2839
2887
  <span class="table-footer-tooltip-label">平均值:</span>
2840
2888
  ${IS_MONEY ? val.toFixed(2) : val}</p>`;
@@ -2845,7 +2893,7 @@ export default create({
2845
2893
  getFooterTitle(column) {
2846
2894
  let IS_MONEY = 'MONEY' === this.getFieldAttrType(column);
2847
2895
  if (vexutils.has(this.sumData, column.property)) {
2848
- let val = vexutils.round(Number(this.sumData[column.property]), 2);
2896
+ let val = vexutils.round(Number(this.sumData[column.property]), 2);
2849
2897
  return IS_MONEY ? val.toFixed(2) : val;
2850
2898
  }
2851
2899
  if (vexutils.has(this.avgData, column.property)) {
@@ -2854,9 +2902,9 @@ export default create({
2854
2902
  }
2855
2903
  return null;
2856
2904
  },
2857
- getFieldAttrType(column){
2905
+ getFieldAttrType(column) {
2858
2906
  let fieldKeyMap = this?.fieldKeyMap || {};
2859
- let field = fieldKeyMap[column.property];
2907
+ let field = fieldKeyMap[column.property];
2860
2908
  return field?.attrType || field?.settingObj?.attr;
2861
2909
  },
2862
2910
  refreshTable() {
@@ -2968,6 +3016,22 @@ export default create({
2968
3016
  vxeTable.loadData(this.originFormatList);
2969
3017
  this.$emit('triggerSpinning', false);
2970
3018
  this.$emit('handlerClickRow', formatData[0], oldIndex);
3019
+ },
3020
+
3021
+ /**
3022
+ * 映射值如果配置了单选,限制只能选一个
3023
+ */
3024
+ getSingleConvert(value,old,field){
3025
+ let cValue = value;
3026
+ if(!Array.isArray(old) || !Array.isArray(value)) return cValue;
3027
+ // 单选
3028
+ if((field.advanceOptionSetting) == '0' && (value?.length || 0)>1){
3029
+ cValue = cValue.filter(v=> !old?.includes?.(v));
3030
+ if(cValue.length > 1){
3031
+ return [cValue[0]]
3032
+ }
3033
+ }
3034
+ return cValue;
2971
3035
  }
2972
3036
  }
2973
3037
  });