cnhis-design-vue 2.1.64 → 2.1.66

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 (97) hide show
  1. package/CHANGELOG.md +31 -12
  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 +114 -94
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +22 -22
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/carousel/index.js +8 -8
  19. package/es/cascader/index.js +8 -8
  20. package/es/checkbox/index.js +9 -9
  21. package/es/col/index.js +8 -8
  22. package/es/collapse/index.js +8 -8
  23. package/es/color-picker/index.js +1 -1
  24. package/es/comment/index.js +8 -8
  25. package/es/config-provider/index.js +8 -8
  26. package/es/date-picker/index.js +8 -8
  27. package/es/descriptions/index.js +8 -8
  28. package/es/divider/index.js +8 -8
  29. package/es/drag-layout/index.js +3 -3
  30. package/es/drawer/index.js +8 -8
  31. package/es/dropdown/index.js +8 -8
  32. package/es/editor/index.js +1 -1
  33. package/es/ellipsis/index.js +1 -1
  34. package/es/empty/index.js +8 -8
  35. package/es/fabric-chart/index.js +9 -9
  36. package/es/form/index.js +8 -8
  37. package/es/form-model/index.js +8 -8
  38. package/es/form-table/index.js +66 -66
  39. package/es/index/index.js +501 -467
  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 +76 -76
  51. package/es/multi-chat-client/index.js +70 -70
  52. package/es/multi-chat-history/index.js +4 -4
  53. package/es/multi-chat-record/index.js +14 -14
  54. package/es/multi-chat-setting/index.js +22 -22
  55. package/es/multi-chat-sip/index.js +1 -1
  56. package/es/notification/index.js +8 -8
  57. package/es/page-header/index.js +8 -8
  58. package/es/pagination/index.js +8 -8
  59. package/es/popconfirm/index.js +8 -8
  60. package/es/popover/index.js +8 -8
  61. package/es/progress/index.js +8 -8
  62. package/es/radio/index.js +9 -9
  63. package/es/rate/index.js +8 -8
  64. package/es/result/index.js +8 -8
  65. package/es/row/index.js +8 -8
  66. package/es/scale-container/index.js +1 -1
  67. package/es/scale-view/index.js +90 -76
  68. package/es/scale-view/style.css +1 -1
  69. package/es/select/index.js +12 -12
  70. package/es/select-label/index.js +11 -11
  71. package/es/select-person/index.js +2 -2
  72. package/es/shortcut-setter/index.js +10 -10
  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 +47 -47
  81. package/es/tabs/index.js +8 -8
  82. package/es/tag/index.js +9 -9
  83. package/es/time-picker/index.js +8 -8
  84. package/es/timeline/index.js +8 -8
  85. package/es/tooltip/index.js +8 -8
  86. package/es/transfer/index.js +8 -8
  87. package/es/tree/index.js +8 -8
  88. package/es/tree-select/index.js +8 -8
  89. package/es/upload/index.js +8 -8
  90. package/es/verification-code/index.js +2 -2
  91. package/lib/cui.common.js +503 -469
  92. package/lib/cui.umd.js +503 -469
  93. package/lib/cui.umd.min.js +23 -23
  94. package/package.json +1 -1
  95. package/packages/big-table/src/BigTable.vue +16 -5
  96. package/packages/scale-view/formitem/r-choice.vue +62 -57
  97. package/packages/scale-view/scaleView.vue +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.64",
3
+ "version": "2.1.66",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -44,7 +44,7 @@
44
44
  </div>
45
45
  <c-grid
46
46
  border
47
- show-overflow
47
+ :show-overflow="isShowOverflow"
48
48
  show-header-overflow
49
49
  highlight-hover-row
50
50
  highlight-current-row
@@ -88,8 +88,8 @@
88
88
  }"
89
89
  :row-style="getRowStyle"
90
90
  :edit-config="{ trigger: 'manual', mode: 'row', autoClear: false, showIcon: false }"
91
- :scroll-x="{ gt: 25 }"
92
- :scroll-y="{ gt: 50, mode: 'wheel' }"
91
+ :scroll-x="scrollXConfig"
92
+ :scroll-y="scrollYConfig"
93
93
  :expand-config="{
94
94
  lazy: true,
95
95
  accordion: columnConfig && columnConfig.accordion,
@@ -265,7 +265,10 @@ export default create({
265
265
  del: 'close'
266
266
  },
267
267
  tableHeight: '100%',
268
- allCheckedRows: []
268
+ allCheckedRows: [],
269
+ scrollXConfig: { enabled: true, gt: 25 },
270
+ scrollYConfig: { enabled: true, gt: 50, mode: 'wheel' },
271
+ isShowOverflow: true
269
272
  };
270
273
  },
271
274
  computed: {
@@ -1238,11 +1241,17 @@ export default create({
1238
1241
  // 配置列表
1239
1242
  let { selectType } = this.getOtherConfigInit() || {};
1240
1243
  let { tableNoSetting } = this;
1241
- let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable } = map;
1244
+ let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable, autoCellHeight } = map;
1242
1245
  if (selectType) {
1243
1246
  // 有设置 selectType 强制可选。
1244
1247
  isBatchSelect = 1;
1245
1248
  }
1249
+ // 如果表格单行需要内容撑开, 则把虚拟滚动关掉
1250
+ if (autoCellHeight) {
1251
+ this.scrollXConfig.enabled = false;
1252
+ this.scrollYConfig.enabled = false;
1253
+ this.isShowOverflow = false;
1254
+ }
1246
1255
  selectType = selectType || 'checkbox';
1247
1256
  // 扫码弹框 设置为radio
1248
1257
  let { listType } = this.tableOptions;
@@ -1400,6 +1409,8 @@ export default create({
1400
1409
  },
1401
1410
  // 2022/12/1 沈培均/方晶晶要求新增 如果有自定义提示就不显示表格自带的提示
1402
1411
  handleShowOverflow(item) {
1412
+ // 2023/03/17 新增单行高度由内容撑开, 不需要缺省
1413
+ if (!this.isShowOverflow) return false
1403
1414
  if (item.columnName == "operatorColumn") return false;
1404
1415
  // 选人组件 自己的tooltip
1405
1416
  if (item.attrType === "CANDIDATE_COMPONENTS") return false;
@@ -6,18 +6,20 @@
6
6
  @change="radioChange"
7
7
  class="choice-wrap"
8
8
  :class="['choice-wrap-' + (item.setting.chooseStyleSetting || 1)]"
9
+ >
10
+ <div
11
+ v-for="(o, i) in curOptions"
12
+ :key="o.key + i + o.label"
13
+ class="choice-radio-div"
9
14
  >
10
15
  <a-radio
11
- v-for="(o, i) in curOptions"
12
16
  class="choice-radio"
13
17
  :value="o[choiceUseKey]"
14
- :key="o.key + i + o.label"
15
- :class="{ 'block-radio': !item.setting.isHorizontal }"
16
18
  :disabled="isLock"
17
19
  :style="{ color: choiceColor(o) }"
18
20
  >
19
21
  <template v-if="showImgWrap(o)">
20
- <span class="scale-choice-img-wrap">
22
+ <span class="scale-choice-img-wrap" @click.stop.prevent>
21
23
  <img class="show-picture" :src="o.imageUrl" />
22
24
  <div class="scale-preview-wrap">
23
25
  <a-icon type="zoom-in" @click.stop.prevent="handlePreview(o.imageUrl, i)" />
@@ -55,6 +57,7 @@
55
57
  />
56
58
  </template>
57
59
  </a-radio>
60
+ </div>
58
61
  </a-radio-group>
59
62
  <a-checkbox-group
60
63
  v-else-if="item.type == 'CHECKBOX_BLOCK' || item.type === 'EVALUATE_CHECKBOX_BLOCK'"
@@ -63,58 +66,61 @@
63
66
  class="choice-wrap"
64
67
  :class="['choice-wrap-' + (item.setting.chooseStyleSetting || 1)]"
65
68
  >
66
- <a-checkbox
67
- class="choice-checkbox"
69
+ <div
68
70
  v-for="(o, i) in curOptions"
69
71
  :key="o.key + i + o.label"
70
- :value="o[choiceUseKey]"
71
- :class="{ 'block-checkbox': !item.setting.isHorizontal }"
72
- :disabled="isLock"
73
- :style="{ color: choiceColor(o) }"
72
+ class="choice-radio-div"
74
73
  >
75
- <template v-if="showImgWrap(o)">
76
- <span class="scale-choice-img-wrap">
77
- <img class="show-picture" :src="o.imageUrl" />
78
- <div class="scale-preview-wrap">
79
- <a-icon type="zoom-in" @click.stop.prevent="handlePreview(o.imageUrl, i)" />
80
- </div>
81
- </span>
82
- </template>
83
- <template>
84
- <template v-if="isCheckboxItem && showPreSuffix(o)">
74
+ <a-checkbox
75
+ class="choice-checkbox"
76
+ :value="o[choiceUseKey]"
77
+ :disabled="isLock"
78
+ :style="{ color: choiceColor(o) }"
79
+ >
80
+ <template v-if="showImgWrap(o)">
81
+ <span class="scale-choice-img-wrap" @click.stop.prevent>
82
+ <img class="show-picture" :src="o.imageUrl" />
83
+ <div class="scale-preview-wrap">
84
+ <a-icon type="zoom-in" @click.stop.prevent="handlePreview(o.imageUrl, i)" />
85
+ </div>
86
+ </span>
87
+ </template>
88
+ <template>
89
+ <template v-if="isCheckboxItem && showPreSuffix(o)">
90
+ <span
91
+ v-if="o.prefix"
92
+ class="prefix-span"
93
+ :style="{ color: choiceColor(o) }"
94
+ >{{ o.prefix }}</span>
95
+ <a-input
96
+ v-model="optionsPreSuffixObj[o.key]"
97
+ :disabled="isLock || inputLock"
98
+ @change="inputPreSuffixCheckboxChange(o, i)"
99
+ :style="{ color: choiceColor(o) }"
100
+ placeholder="请输入"
101
+ />
102
+ <span
103
+ v-if="o.suffix"
104
+ class="suffix-span"
105
+ :style="{ color: choiceColor(o) }"
106
+ >{{ o.suffix }}</span>
107
+ </template>
85
108
  <span
86
- v-if="o.prefix"
87
- class="prefix-span"
109
+ v-else
110
+ style="white-space: initial;"
88
111
  :style="{ color: choiceColor(o) }"
89
- >{{ o.prefix }}</span>
112
+ >{{ o.label }}</span>
90
113
  <a-input
91
- v-model="optionsPreSuffixObj[o.key]"
114
+ v-if="o.importability"
115
+ v-model="othersText"
92
116
  :disabled="isLock || inputLock"
93
- @change="inputPreSuffixCheckboxChange(o, i)"
94
117
  :style="{ color: choiceColor(o) }"
118
+ @change="inputCheckboxChange"
95
119
  placeholder="请输入"
96
120
  />
97
- <span
98
- v-if="o.suffix"
99
- class="suffix-span"
100
- :style="{ color: choiceColor(o) }"
101
- >{{ o.suffix }}</span>
102
121
  </template>
103
- <span
104
- v-else
105
- style="white-space: initial;"
106
- :style="{ color: choiceColor(o) }"
107
- >{{ o.label }}</span>
108
- <a-input
109
- v-if="o.importability"
110
- v-model="othersText"
111
- :disabled="isLock || inputLock"
112
- :style="{ color: choiceColor(o) }"
113
- @change="inputCheckboxChange"
114
- placeholder="请输入"
115
- />
116
- </template>
117
- </a-checkbox>
122
+ </a-checkbox>
123
+ </div>
118
124
  </a-checkbox-group>
119
125
  <a-select
120
126
  v-else-if="cloneItem.type == 'SELECT' || item.type === 'EVALUATE_SELECT'"
@@ -163,7 +169,7 @@
163
169
  * getSearchOptions 关键字检索的 function
164
170
  * getCascadeOptions 获取级联数据的 furnction
165
171
  */
166
- import { Select, Input, Radio, Checkbox, Cascader } from 'ant-design-vue';
172
+ import { Select, Input, Radio, Checkbox, Cascader, Icon } from 'ant-design-vue';
167
173
  import { judgeTypes } from '../mixin/judgeTypes';
168
174
  // import format from "@/components/table/mixins/format";
169
175
  // import TextOverTooltip from "./text-over-tooltip/TextOverTooltip.vue";
@@ -195,6 +201,7 @@ export default {
195
201
  },
196
202
  components: {
197
203
  Viewer,
204
+ [Icon.name]: Icon,
198
205
  [Input.name]: Input,
199
206
  [Cascader.name]: Cascader,
200
207
  [Checkbox.name]: Checkbox,
@@ -611,7 +618,6 @@ export default {
611
618
  margin-right: 8px;
612
619
  margin-left: 0px;
613
620
  > span:last-child {
614
- flex: 1;
615
621
  display: inline-flex;
616
622
  align-items: center;
617
623
  word-break: break-all;
@@ -631,12 +637,6 @@ export default {
631
637
  padding-left: 8px;
632
638
  }
633
639
  }
634
-
635
- /deep/ .block-radio,
636
- /deep/ .block-checkbox {
637
- display: flex;
638
- margin-left: 8px;
639
- }
640
640
  /deep/ .ant-select {
641
641
  min-width: 160px;
642
642
  }
@@ -647,6 +647,11 @@ export default {
647
647
  top: 0px !important;
648
648
  left: 1px !important;
649
649
  }
650
+ .choice-radio-div {
651
+ display: flex;
652
+ flex-wrap: wrap;
653
+ align-items: center;
654
+ }
650
655
  .choice-wrap {
651
656
  display: flex;
652
657
  flex-wrap: wrap;
@@ -699,19 +704,19 @@ export default {
699
704
  align-items: center;
700
705
  white-space: initial;
701
706
  }
702
- &.choice-wrap-1 label {
707
+ &.choice-wrap-1 .choice-radio-div {
703
708
  width: 100%;
704
709
  /deep/ input {
705
710
  max-width: 300px;
706
711
  }
707
712
  }
708
- &.choice-wrap-2 label {
713
+ &.choice-wrap-2 .choice-radio-div {
709
714
  width: 50%;
710
715
  }
711
- &.choice-wrap-3 label {
716
+ &.choice-wrap-3 .choice-radio-div {
712
717
  width: 33%;
713
718
  }
714
- &.choice-wrap-4 label {
719
+ &.choice-wrap-4 .choice-radio-div {
715
720
  width: 25%;
716
721
  }
717
722
  /deep/ .ant-checkbox {
@@ -406,6 +406,7 @@ export default create({
406
406
  return function (item) {
407
407
  let { type } = item || {};
408
408
  let tempTile = this.config?.autoQuestionNumber === false ? item.showTitle : `${item.softcode}、${item.showTitle}`;
409
+ tempTile = this.html2Escape(tempTile);
409
410
  if (!this.isEvaluation(type)) return tempTile;
410
411
 
411
412
  let score = this.handleEvaluationScore(item);
@@ -1848,6 +1849,12 @@ export default create({
1848
1849
  handleEvaluationScore(ele) {
1849
1850
  let { minScore = 0, maxScore = 0, scoreType } = ele.scoreConfigs || {};
1850
1851
  return `(${maxScore}分)`;
1852
+ },
1853
+ html2Escape(sHtml) {
1854
+ if(!sHtml || typeof sHtml != 'string') return sHtml;
1855
+ return sHtml.replace(/[<>&"]/g,function(c){
1856
+ return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];
1857
+ });
1851
1858
  }
1852
1859
  }
1853
1860
  });