cnhis-design-vue 2.1.66 → 2.1.69

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 (124) hide show
  1. package/CHANGELOG.md +51 -2
  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 +244 -164
  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 +368 -353
  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 +2195 -1114
  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 +53 -53
  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 +1293 -293
  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 +2286 -1215
  93. package/lib/cui.umd.js +2286 -1215
  94. package/lib/cui.umd.min.js +45 -45
  95. package/package.json +1 -1
  96. package/packages/big-table/src/BigTable.vue +23 -4
  97. package/packages/big-table/src/assets/style/table-base.less +2 -1
  98. package/packages/big-table/src/components/AutoLayoutButton.vue +59 -31
  99. package/packages/big-table/src/utils/eventBroadcast.js +24 -0
  100. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +128 -110
  101. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +27 -20
  102. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +9 -8
  103. package/packages/fabric-chart/src/mixins/eventCommon.js +4 -4
  104. package/packages/fabric-chart/src/mixins/fabricCommon.js +8 -22
  105. package/packages/scale-view/formitem/r-choice.vue +29 -14
  106. package/packages/table-filter/src/base-search-com/BaseSearch.vue +54 -6
  107. package/packages/table-filter/src/classification/Classification-com.vue +5 -1
  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 +1 -1
  110. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +2 -2
  111. package/packages/table-filter/src/components/render-widget/components/CheckboxGroup.vue +52 -0
  112. package/packages/table-filter/src/components/render-widget/components/Select.vue +51 -0
  113. package/packages/table-filter/src/components/render-widget/components/index.js +7 -0
  114. package/packages/table-filter/src/components/render-widget/enums.js +29 -0
  115. package/packages/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +68 -0
  116. package/packages/table-filter/src/components/render-widget/index.vue +92 -0
  117. package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +140 -0
  118. package/packages/table-filter/src/components/search-modal/set-classification.vue +48 -22
  119. package/packages/table-filter/src/components/table-modal/TableModal.vue +6 -2
  120. package/packages/table-filter/src/const/dataOptions.js +8 -8
  121. package/packages/table-filter/src/mixins/mixins.js +24 -4
  122. package/packages/table-filter/src/mixins/renderWidget.js +89 -0
  123. package/packages/table-filter/src/mixins/tableSearchCon.js +4 -4
  124. package/packages/table-filter/src/quick-search/QuickSearch.vue +46 -14
@@ -9,7 +9,7 @@
9
9
  :key="item.sid"
10
10
  :class="{
11
11
  'quick-block':
12
- item.con == 'DATE' || item.con == 'BIRTHDAY' || item.con == 'CONVERT' || item.LABELAttr
12
+ item.con == 'DATE' || item.con == 'BIRTHDAY' || item.con == 'CONVERT' || item.LABELAttr || item._isBlock
13
13
  }"
14
14
  >
15
15
  <div class="quick-row">
@@ -28,9 +28,11 @@
28
28
  </a-tooltip>
29
29
  </div>
30
30
  <div class="quick-item-col" :class="{ 'quick-item-col-default': source !== 'editTable' }">
31
+ <!-- 直接渲染组件 -->
32
+ <RenderWidget v-if="item.isRender" :cfg="item" v-model="item.value" />
31
33
  <!-- age -->
32
34
  <!-- TODO: 清除,跨表 -->
33
- <div v-if="item.AGEAttr" class="age-container">
35
+ <div v-else-if="item.AGEAttr" class="age-container">
34
36
  <range-age
35
37
  :ref="`${item.columnName}_AGEAttr`"
36
38
  :format="item.format"
@@ -162,6 +164,7 @@
162
164
  :min="0"
163
165
  :max="100"
164
166
  allowClear
167
+ :placeholder="item.placeholder"
165
168
  />
166
169
  </template>
167
170
  <template v-else>
@@ -174,6 +177,7 @@
174
177
  v-model="item.CL"
175
178
  :class="{ 'psw-icon': item.comAttr == 'PASSWORD' }"
176
179
  allowClear
180
+ :placeholder="item.placeholder"
177
181
  >
178
182
  <template slot="suffix" v-if="item.comAttr == 'PASSWORD'">
179
183
  <svg-icon
@@ -195,6 +199,7 @@
195
199
  :min="0"
196
200
  :max="100"
197
201
  allowClear
202
+ :placeholder="item.placeholder"
198
203
  />
199
204
  </template>
200
205
  <template v-else>
@@ -206,7 +211,7 @@
206
211
  'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
207
212
  }"
208
213
  v-model="item.EQ"
209
- :placeholder="item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
214
+ :placeholder="item.placeholder || item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
210
215
  allowClear
211
216
  >
212
217
  <template slot="suffix" v-if="item.comAttr == 'PASSWORD'">
@@ -517,7 +522,7 @@
517
522
  class="EQ-input"
518
523
  :style="`width: ${getEleWidth(item)}`"
519
524
  v-model="item.EQ"
520
- :placeholder="item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
525
+ :placeholder="item.placeholder || item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
521
526
  allowClear
522
527
  >
523
528
  </a-input>
@@ -728,7 +733,7 @@ import tableSearchCon from "../mixins/tableSearchCon";
728
733
  import moment from 'moment';
729
734
  import 'moment/locale/zh-cn';
730
735
  // antd
731
- import _ from 'lodash';
736
+ import cloneDeep from 'lodash/cloneDeep';
732
737
  import { Button, Icon, Dropdown, Select, Upload, DatePicker, Input, Menu, Radio, Checkbox, Row, Tag, InputNumber, Col, Form, Modal, Tooltip } from 'ant-design-vue';
733
738
  import rangeAge from '../components/range-age/index';
734
739
  import multiSelect from '../components/multi-select/multi-select';
@@ -736,13 +741,17 @@ import resize from 'vue-resize-directive';
736
741
  import { durationMixin, $utils, filterApiFn } from '../mixins/mixins';
737
742
  import vexutils from '@/utils/vexutils';
738
743
  import wordBookutils from '../mixins/wordBookutils';
744
+ import renderWidget from '../mixins/renderWidget';
739
745
  import cTreeSelect from '../components/c-tree-select/tree-select';
740
746
  import create from '@/core/create';
741
747
  import utils from '@/utils/utils-map';
742
748
  import {dataOptions} from '../const/dataOptions'
749
+
750
+ import RenderWidget from '../components/render-widget/index.vue';
751
+
743
752
  export default create({
744
753
  name: "quick-search",
745
- mixins: [durationMixin, $utils, filterApiFn, tableSearchCon],
754
+ mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, renderWidget],
746
755
  props: {
747
756
  visible: Boolean,
748
757
  searchFieldList: {
@@ -763,6 +772,7 @@ export default create({
763
772
  getFilterData: Function
764
773
  },
765
774
  components: {
775
+ RenderWidget,
766
776
  rangeAge,
767
777
  [Button.name]: Button,
768
778
  [Icon.name]: Icon,
@@ -840,16 +850,16 @@ export default create({
840
850
  { con: 'YESTERDAY', title: '1.1.4.39', name: '昨天' },
841
851
  { con: 'THIS_WEEK', title: '1.1.4.40', name: '本周' },
842
852
  { con: 'NEXT_WEEK', title: '1.1.4.41', name: '下周' },
843
- { con: 'UP_WEEK', title: '1.1.4.42', name: '上周' },
853
+ { con: 'LAST_WEEK', title: '1.1.4.42', name: '上周' },
844
854
  { con: 'THIS_MONTH', title: '1.1.4.43', name: '本月' },
845
855
  { con: 'NEXT_MONTH', title: '1.1.4.44', name: '下月' },
846
- { con: 'UP_MONTH', title: '1.1.4.45', name: '上月' },
856
+ { con: 'LAST_MONTH', title: '1.1.4.45', name: '上月' },
847
857
  { con: 'THIS_SEASON', title: '1.1.4.46', name: '本季度' },
848
858
  { con: 'NEXT_SEASON', title: '1.1.4.47', name: '下季度' },
849
- { con: 'UP_SEASON', title: '1.1.4.48', name: '上季度' },
859
+ { con: 'LAST_SEASON', title: '1.1.4.48', name: '上季度' },
850
860
  { con: 'THIS_YEAR', title: '1.1.4.49', name: '本年' },
851
861
  { con: 'NEXT_YEAR', title: '1.1.4.50', name: '下年' },
852
- { con: 'UP_YEAR', title: '1.1.4.51', name: '上年' }
862
+ { con: 'LAST_YEAR', title: '1.1.4.51', name: '上年' }
853
863
  ],
854
864
  birthdayTeam: [],
855
865
  limit_date: "",
@@ -917,7 +927,7 @@ export default create({
917
927
  deep: true,
918
928
  handler(newVal) {
919
929
  if (newVal && this.lastQuickSearchData.length > 0) {
920
- this.quickSearch = _.cloneDeep(this.lastQuickSearchData);
930
+ this.quickSearch = cloneDeep(this.lastQuickSearchData);
921
931
  }
922
932
  }
923
933
  }
@@ -937,12 +947,12 @@ export default create({
937
947
  this.quickSearch = [];
938
948
  this.relationQuickSearch = [];
939
949
  this.birthdayTeam = this.dateTeam.filter(
940
- item => item.con != "THIS_YEAR" && item.con != "NEXT_YEAR" && item.con != "UP_YEAR"
950
+ item => item.con != "THIS_YEAR" && item.con != "NEXT_YEAR" && item.con != "LAST_YEAR"
941
951
  );
942
- let copyList = _.cloneDeep(this.searchFieldList);
952
+ let copyList = cloneDeep(this.searchFieldList);
943
953
  let mySearchFieldList = copyList.filter(i => i.isShowSearch == 1 && i.filterExplicit != 1) || [];
944
954
  // let relationTableList = JSON.parse(JSON.stringify(this.relationTableList));
945
- let relationTableList = _.cloneDeep(this.relationTableList);
955
+ let relationTableList = cloneDeep(this.relationTableList);
946
956
 
947
957
  // 跨表
948
958
  let relationQuickSearch = relationTableList.map(item => {
@@ -989,6 +999,11 @@ export default create({
989
999
  setDefaultCon(val) {
990
1000
  if (!val.length) {
991
1001
  this.quickSearch.forEach((item, index) => {
1002
+ if (this.isRender(item)) {
1003
+ this.$set(this.quickSearch[index], "value", this.getDefValByRenderWidget(item));
1004
+ return;
1005
+ }
1006
+
992
1007
  let advanceOptionSetting = item?.advanceOptionSetting;
993
1008
  // 单选
994
1009
  let optionSetting0 =String(advanceOptionSetting) == '0';
@@ -1010,6 +1025,11 @@ export default create({
1010
1025
  let optionSetting0 =String(advanceOptionSetting) == '0';
1011
1026
  let find = val.find(valItem => valItem.field_key === item.columnName);
1012
1027
  if (find) {
1028
+ if (this.isRender(item)) {
1029
+ this.$set(this.quickSearch[index], "value", this.getDefValByRenderConObj(find, item));
1030
+ return;
1031
+ }
1032
+
1013
1033
  let value = find?.value
1014
1034
  let isTrance = item.CONVERT && Array.isArray(item.CONVERT) || item.comType == "SelectMui" && item.con == "CONVERT"
1015
1035
  // wordbook多选
@@ -1036,6 +1056,9 @@ export default create({
1036
1056
  handlerInitSearchItem(arr) {
1037
1057
  if (!Array.isArray(arr)) return;
1038
1058
  arr.forEach(el => {
1059
+ // 直接渲染相应组件,不经过下面的字段判断
1060
+ if (this.initRenderWidgetCfg(el)) return;
1061
+
1039
1062
  const isPreciseSearch = el?.settingObj?.isPreciseSearch || "";
1040
1063
 
1041
1064
  if (el.setting) {
@@ -1359,6 +1382,13 @@ export default create({
1359
1382
  let conObj = [];
1360
1383
  for (let i = 0; i < arr.length; i++) {
1361
1384
  let item = arr[i];
1385
+
1386
+ const renderConObj = this.getRenderSearchConObj(item);
1387
+ if (renderConObj) {
1388
+ conObj.push(renderConObj);
1389
+ continue;
1390
+ }
1391
+
1362
1392
  let value = "";
1363
1393
  let limit_date = "";
1364
1394
  let advanceOptionSetting = item?.advanceOptionSetting;
@@ -1656,6 +1686,8 @@ export default create({
1656
1686
  return;
1657
1687
  }
1658
1688
  arr.forEach(item => {
1689
+ if (this.resetRenderWidgetValue(item)) return;
1690
+
1659
1691
  let advanceOptionSetting = item?.advanceOptionSetting;
1660
1692
  // 单选
1661
1693
  let optionSetting0 =String(advanceOptionSetting) === '0';