cnhis-design-vue 2.1.79 → 2.1.81

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 (130) hide show
  1. package/CHANGELOG.md +52 -4
  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 +115 -95
  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 +4328 -1795
  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 +52 -50
  68. package/es/scale-view/style.css +1 -1
  69. package/es/select/index.js +12 -12
  70. package/es/select-label/index.js +36 -34
  71. package/es/select-label/style.css +1 -1
  72. package/es/select-person/index.js +2 -2
  73. package/es/select-tag/index.js +4248 -0
  74. package/es/select-tag/style.css +1 -0
  75. package/es/shortcut-setter/index.js +10 -10
  76. package/es/skeleton/index.js +8 -8
  77. package/es/slider/index.js +8 -8
  78. package/es/space/index.js +8 -8
  79. package/es/spin/index.js +8 -8
  80. package/es/statistic/index.js +8 -8
  81. package/es/steps/index.js +8 -8
  82. package/es/switch/index.js +8 -8
  83. package/es/table-filter/index.js +3158 -1350
  84. package/es/table-filter/style.css +1 -1
  85. package/es/tabs/index.js +8 -8
  86. package/es/tag/index.js +9 -9
  87. package/es/time-picker/index.js +8 -8
  88. package/es/timeline/index.js +8 -8
  89. package/es/tooltip/index.js +8 -8
  90. package/es/transfer/index.js +8 -8
  91. package/es/tree/index.js +8 -8
  92. package/es/tree-select/index.js +8 -8
  93. package/es/upload/index.js +8 -8
  94. package/es/verification-code/index.js +2 -2
  95. package/lib/cui.common.js +4369 -1699
  96. package/lib/cui.umd.js +4369 -1699
  97. package/lib/cui.umd.min.js +82 -82
  98. package/package.json +1 -1
  99. package/packages/big-table/src/BigTable.vue +15 -3
  100. package/packages/big-table/src/assets/style/table-base.less +7 -4
  101. package/packages/index.js +3 -0
  102. package/packages/select-label/select-label.vue +18 -2
  103. package/packages/select-tag/index.js +14 -0
  104. package/packages/select-tag/label-classify.vue +133 -0
  105. package/packages/select-tag/labelFormContent.vue +295 -0
  106. package/packages/select-tag/select-label.vue +274 -0
  107. package/packages/table-filter/src/base-search-com/BaseSearch.vue +11 -15
  108. package/packages/table-filter/src/components/TextOverTooltip.vue +24 -11
  109. package/packages/table-filter/src/components/age-com/index.vue +3 -3
  110. package/packages/table-filter/src/components/checkbox-group/CheckboxGroup.vue +53 -0
  111. package/packages/table-filter/src/components/multi-select/multi-select.vue +7 -1
  112. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +5 -119
  113. package/packages/table-filter/src/components/range-age/index.vue +11 -12
  114. package/packages/table-filter/src/components/render-widget/components/DateRangeQuick.vue +216 -0
  115. package/packages/table-filter/src/components/render-widget/components/Label.vue +209 -0
  116. package/packages/table-filter/src/components/render-widget/components/NumberRange.vue +147 -0
  117. package/packages/table-filter/src/components/render-widget/components/SelectDynamic.vue +280 -0
  118. package/packages/table-filter/src/components/render-widget/components/SelectLabel.vue +80 -0
  119. package/packages/table-filter/src/components/render-widget/components/index.js +6 -4
  120. package/packages/table-filter/src/components/render-widget/enums.js +29 -22
  121. package/packages/table-filter/src/components/render-widget/index.vue +45 -5
  122. package/packages/table-filter/src/components/render-widget/mixins/dynamic-method.js +164 -0
  123. package/packages/table-filter/src/components/render-widget/mixins/label-method.js +23 -0
  124. package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +194 -46
  125. package/packages/table-filter/src/components/search-filter/SearchFilter.vue +3 -1
  126. package/packages/table-filter/src/components/search-modal/set-classification.vue +5 -1
  127. package/packages/table-filter/src/mixins/mixins.js +192 -133
  128. package/packages/table-filter/src/mixins/out-quick-method.js +123 -0
  129. package/packages/table-filter/src/mixins/renderWidget.js +21 -13
  130. package/packages/table-filter/src/quick-search/QuickSearch.vue +201 -133
@@ -0,0 +1,274 @@
1
+ <template>
2
+ <div class="label-page">
3
+ <div class="tag-label">
4
+ <a-tag
5
+ v-for="v in outSelectedList"
6
+ :key="`${v.classifyId}-${v.labelCode}`"
7
+ :closable="true"
8
+ @close="closeTag(v)"
9
+ :style="formatActiveStyle(v)"
10
+ >
11
+ {{ v.labelShowText }}
12
+ </a-tag>
13
+ <span v-if="!explicit" class="form-add-icon form-add-icon-label" @click="handleEditLabel">
14
+ <a-icon class="add-icon" type="plus-circle" />
15
+ 新增
16
+ </span>
17
+ </div>
18
+ <div v-if="explicit">
19
+ <labelFormContent
20
+ ref="labelFormContent"
21
+ :categoryList="categoryList"
22
+ :selectedList="outSelectedList"
23
+ :isChangeWindow="isChangeWindow"
24
+ :explicit="explicit"
25
+ :tagRequestMap="tagRequestMap"
26
+ @explicitOnChange="explicitOnChange"
27
+ ></labelFormContent>
28
+ </div>
29
+
30
+ <!-- 弹窗 -->
31
+ <a-modal
32
+ class="label-form-modal-wrap modal-wrap select-tag-standard-modal standard-modal-white"
33
+ v-model="labelVisible"
34
+ @ok="handleSaveLabel"
35
+ @cancel="handleLabelCancel"
36
+ :maskClosable="false"
37
+ :destroyOnClose="true"
38
+ :width="modalWidth"
39
+ :cancelText="'取消'"
40
+ :okText="'确定'"
41
+ :bodyStyle="{
42
+ height: modalHeight,
43
+ maxHeight,
44
+ position: 'relative'
45
+ }"
46
+ :class="{ 'modal-screen': isChangeWindow }"
47
+ :closable="false"
48
+ centered
49
+ wrapClassName="crm-form-label-modal"
50
+ >
51
+ <template slot="title">
52
+ <div>
53
+ 选择标签
54
+ </div>
55
+ <div class="svg-wrap">
56
+ <svg-icon
57
+ @click="changeModalWindow"
58
+ :icon-class="
59
+ isChangeWindow
60
+ ? 'xitongtubiaodaohangtubiaozuixiaohua'
61
+ : 'xitongtubiaodaohangtubiaozuidahua'
62
+ "
63
+ ></svg-icon>
64
+ <svg-icon
65
+ :icon-class="'xitongtubiaodaohangtubiaoguanbi'"
66
+ @click="handleLabelCancel"
67
+ ></svg-icon>
68
+ </div>
69
+ </template>
70
+ <labelFormContent
71
+ ref="labelFormContent"
72
+ :categoryList="categoryList"
73
+ :selectedList="outSelectedList"
74
+ :isChangeWindow="isChangeWindow"
75
+ :explicit="explicit"
76
+ :tagRequestMap="tagRequestMap"
77
+ @explicitOnChange="explicitOnChange"
78
+ ></labelFormContent>
79
+ </a-modal>
80
+ </div>
81
+ </template>
82
+
83
+ <script>
84
+ import { Tooltip, Icon, Button, Input, Tag, Modal } from 'ant-design-vue';
85
+ import labelFormContent from './labelFormContent';
86
+ import SvgIcon from '@/component/svg/index.vue';
87
+ import utils from '@/utils/utils-map';
88
+ import create from '@/core/create';
89
+ /**
90
+ * @onChange="xxx" 获取保存的值
91
+ */
92
+ export default create({
93
+ name: 'select-tag',
94
+ components: {
95
+ labelFormContent,
96
+ SvgIcon,
97
+ [Input.name]: Input,
98
+ [Icon.name]: Icon,
99
+ [Tooltip.name]: Tooltip,
100
+ [Button.name]: Button,
101
+ AModal: Modal,
102
+ [Tag.name]: Tag,
103
+ [Tag.CheckableTag.name]: Tag.CheckableTag
104
+ },
105
+ data() {
106
+ return {
107
+ labelVisible: false,
108
+ isChangeWindow: false,
109
+ modalWidth: '763px',
110
+ modalHeight: '404px',
111
+ maxHeight: '404px',
112
+
113
+ outSelectedList: [],
114
+ };
115
+ },
116
+ props: {
117
+ // 选中的标签
118
+ selectedList: {
119
+ type: Array,
120
+ default: () => []
121
+ },
122
+ // 标签列表
123
+ categoryList: {
124
+ type: Array,
125
+ default: () => []
126
+ },
127
+ // 标签是否外显
128
+ explicit:{
129
+ type: Boolean,
130
+ default: false
131
+ },
132
+ // 接口请求状态
133
+ tagRequestMap: {
134
+ type: Object,
135
+ default: () => ({
136
+ status: true,
137
+ resultMsg: ''
138
+ })
139
+ }
140
+ },
141
+
142
+ watch: {
143
+ selectedList: {
144
+ immediate: true,
145
+ deep: true,
146
+ handler(val) {
147
+ if (val) {
148
+ let list = Array.isArray(val) ? val : [];
149
+ this.outSelectedList = JSON.parse(JSON.stringify(list));
150
+ }
151
+ }
152
+ }
153
+ },
154
+ methods: {
155
+ formatActiveStyle(activeItem) {
156
+ return {
157
+ background: activeItem.backgroundColor,
158
+ color: '#fff',
159
+ borderColor: activeItem.backgroundColor
160
+ }
161
+ },
162
+ closeTag(selectItem) {
163
+ const selectedList = this.outSelectedList || [];
164
+ const fdIndex = selectedList.findIndex(sItem => sItem.classifyId == selectItem.classifyId && sItem.labelCode == selectItem.labelCode);
165
+ if (fdIndex > -1) {
166
+ selectedList.splice(fdIndex, 1);
167
+ }
168
+ this.outSelectedList = selectedList;
169
+ this.$emit('onChange', [...selectedList]);
170
+ },
171
+ handleEditLabel(type) {
172
+ if(!this.explicit) {
173
+ this.labelVisible = true;
174
+ }
175
+ },
176
+ handleLabelCancel() {
177
+ if(this.explicit) return;
178
+ this.modalWidth = '763px';
179
+ this.modalHeight = '404px';
180
+ this.maxHeight = '404px';
181
+ this.isChangeWindow = false;
182
+ this.labelVisible = false;
183
+ },
184
+ changeModalWindow() {
185
+ this.isChangeWindow = !this.isChangeWindow;
186
+ let docHeight = document.body.clientHeight;
187
+ this.modalWidth = this.modalWidth === '763px' ? `100%` : '763px';
188
+ this.modalHeight = this.modalHeight === '404px' ? `${docHeight - 110}px` : '404px';
189
+ this.maxHeight = this.modalHeight === 'auto' ? '404px' : 'none';
190
+ },
191
+ handleSaveLabel() {
192
+ this.$refs.labelFormContent?.handleLabelForm(selectList => {
193
+ this.$emit('onChange', [...selectList]);
194
+ this.outSelectedList = selectList;
195
+ this.handleLabelCancel();
196
+ });
197
+ },
198
+ // 标签外显发生变化
199
+ explicitOnChange(){
200
+ this.handleSaveLabel();
201
+ }
202
+ }
203
+ });
204
+ </script>
205
+ <style lang="less" scoped>
206
+ .tag-label {
207
+ /deep/ .ant-tag {
208
+ margin-bottom: 4px;
209
+ border: 1px solid #f1f1f1;
210
+ .anticon-close {
211
+ color: #fff;
212
+ }
213
+ }
214
+ .form-add-icon-label {
215
+ color: #2d7aff;
216
+ cursor: pointer;
217
+ }
218
+ }
219
+
220
+
221
+ </style>
222
+ <style lang="less">
223
+ // 弹框规范
224
+ .select-tag-standard-modal {
225
+ box-shadow: 0px 5px 13px 0px rgba(0, 0, 0, 0.14);
226
+ border-radius: 8px;
227
+ padding-bottom: 0px;
228
+ .ant-modal-content {
229
+ border-radius: 8px;
230
+ }
231
+ .ant-modal-header {
232
+ padding: 14px 16px;
233
+ height: 52px;
234
+ border-radius: 8px 8px 0 0;
235
+
236
+ .ant-modal-title {
237
+ display: flex;
238
+ justify-content: space-between;
239
+ align-items: center;
240
+ color: #000000;
241
+ font-size: 16px;
242
+ .svg-wrap {
243
+ right: 16px;
244
+ svg {
245
+ font-size: 14px;
246
+ cursor: pointer;
247
+ }
248
+ svg + svg {
249
+ margin-left: 16px;
250
+ }
251
+ }
252
+ }
253
+ }
254
+ .ant-modal-footer {
255
+ box-sizing: border-box;
256
+ height: 52px;
257
+ border-radius: 0 0 8px 8px;
258
+ .ant-btn {
259
+ padding: 0 12px;
260
+ }
261
+ }
262
+ .ant-modal-close-x {
263
+ height: 54px;
264
+ }
265
+ .change-screen-svg {
266
+ top: -1px;
267
+ }
268
+ &.has-mask {
269
+ .ant-modal-close-icon {
270
+ color: #666;
271
+ }
272
+ }
273
+ }
274
+ </style>
@@ -54,7 +54,7 @@
54
54
  <!-- start--筛选外显--start -->
55
55
  <template v-for="item in outSearchFieldList">
56
56
  <li class="outQuickSearch-li" v-if="item.isRender" :key="item._frontId">
57
- <RenderWidget style="margin: 0 8px 8px 0" :cfg="item" v-model="item.value" @outFilterChange="outFilterChange" />
57
+ <RenderWidget style="margin: 0 8px 8px 0" :cfg="item" v-model="item.value" source="baseSearch" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange" />
58
58
  </li>
59
59
  <outQuickSearch v-else :key="item.id + item.random_key" :item="item" :ref="item.columnName + item.random_key" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
60
60
  </template>
@@ -412,8 +412,10 @@ import PrintBtn from '~/button/src/ButtonPrint/index';
412
412
 
413
413
  import outQuickSearch from '../components/out-quick-search/out-quick-search';
414
414
  import utils from '@/utils/utils-map';
415
- import { durationMixin, $utils, filterApiFn, outQuickSearchFn } from '../mixins/mixins';
415
+ import { durationMixin, $utils, filterApiFn, outQuickSearchFn, outQuickSearchDefCommon } from '../mixins/mixins';
416
416
  import tableSearchCon from '../mixins/tableSearchCon';
417
+ import OutQuickMethod from '../mixins/out-quick-method'
418
+ import dynamicMethod from '../components/render-widget/mixins/dynamic-method'
417
419
  import svgIcon from '@/component/svg/index.vue';
418
420
  import 'text-security/text-security.css';
419
421
  import create from '@/core/create';
@@ -466,7 +468,7 @@ const BTNOBJ = {
466
468
 
467
469
  export default create({
468
470
  name: 'base-search',
469
- mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, outQuickSearchFn],
471
+ mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, outQuickSearchFn, outQuickSearchDefCommon, OutQuickMethod, dynamicMethod],
470
472
  directives: { resize, preventReClick },
471
473
  props: {
472
474
  width: {
@@ -1763,6 +1765,10 @@ export default create({
1763
1765
  inputDom.blur();
1764
1766
  },
1765
1767
  handleRequestedLabel(v) {
1768
+ let requestedLabel = this.filterApiConfig?.requestedLabel
1769
+ if(requestedLabel && typeof requestedLabel === 'function') {
1770
+ return this.handleGetConfigApi(v, 'requestedLabel')
1771
+ }
1766
1772
  let params = { type: v, pageSize: 10000 };
1767
1773
  return this.axios.get('/label/list', { params: params });
1768
1774
  },
@@ -1801,18 +1807,8 @@ export default create({
1801
1807
  }
1802
1808
 
1803
1809
  // 如有配置默认值
1804
- const isSetDefVal = this.outSearchFieldList.some(v => {
1805
- if (this.isRender(v)) {
1806
- return this.isExistDefValByRenderWidget(v);
1807
- }
1808
- return !!v.explicitDefaultVal
1809
- });
1810
- if (isSetDefVal) {
1811
- this.$emit('outSearchInit');
1812
- if ('reset' != config?.type) {
1813
- this.outFilterChange({ type: 'outSearchInit' });
1814
- }
1815
- }
1810
+ this.isOut = true;
1811
+ this.handleDefVal(config)
1816
1812
  },
1817
1813
  dealOutFilterHideBtn() {
1818
1814
  if (!this.isShowSetting('buttonAdaption') && this.outSearchFieldList.length > 0) {
@@ -1,7 +1,17 @@
1
1
  <template>
2
2
  <div class="text-over-tooltip-components">
3
- <a-tooltip :effect="effect" :disabled="isDisabledTooltip" :title="curContent" :placement="placement">
4
- <div class="ellipsis" :class="className" @mouseover="onMouseOver(refName)">
3
+ <a-tooltip
4
+ :effect="effect"
5
+ :visible="isDisabledTooltip"
6
+ :title="curContent"
7
+ :placement="placement"
8
+ >
9
+ <div
10
+ class="ellipsis"
11
+ :class="className"
12
+ @mouseover="onMouseOver(refName)"
13
+ @mouseout="onMouseOut"
14
+ >
5
15
  <i :ref="refName">
6
16
  <slot></slot>
7
17
  <i>{{ content }}</i>
@@ -12,10 +22,10 @@
12
22
  </template>
13
23
 
14
24
  <script>
15
- import { Tooltip } from 'ant-design-vue';
25
+ import { Tooltip } from "ant-design-vue";
16
26
  import vexutils from '@/utils/vexutils';
17
27
  export default {
18
- name: 'TextOverTooltip',
28
+ name: "TextOverTooltip",
19
29
  components: {
20
30
  [Tooltip.name]: Tooltip
21
31
  },
@@ -30,27 +40,27 @@ export default {
30
40
  effect: {
31
41
  type: String,
32
42
  default: () => {
33
- return 'dark';
43
+ return "dark";
34
44
  }
35
45
  },
36
46
  // Tooltip 的出现位置top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end
37
47
  placement: {
38
48
  type: String,
39
49
  default: () => {
40
- return 'top';
50
+ return "top";
41
51
  }
42
52
  },
43
- tooltipTitle: { type: [Number, String], default: '' },
53
+ tooltipTitle: { type: [Number, String], default: "" },
44
54
  isAlias: Boolean
45
55
  },
46
56
  data() {
47
57
  return {
48
- isDisabledTooltip: true // 是否需要禁止提示
58
+ isDisabledTooltip: false // 是否需要禁止提示
49
59
  };
50
60
  },
51
61
  computed: {
52
62
  curContent() {
53
- let res = this.tooltipTitle || this.content || '';
63
+ let res = this.tooltipTitle || this.content || "";
54
64
  if (vexutils.isNumber(res)) {
55
65
  return res.toString();
56
66
  }
@@ -61,13 +71,16 @@ export default {
61
71
  // 移入事件: 判断内容的宽度contentWidth是否大于父级的宽度
62
72
  onMouseOver(str) {
63
73
  if (this.isAlias) {
64
- this.isDisabledTooltip = false;
74
+ this.isDisabledTooltip = true;
65
75
  return;
66
76
  }
67
77
  let parentWidth = this.$refs[str].parentNode.offsetWidth;
68
78
  let contentWidth = this.$refs[str].offsetWidth;
69
79
  // 判断是否禁用tooltip功能
70
- this.isDisabledTooltip = contentWidth <= parentWidth;
80
+ this.isDisabledTooltip = contentWidth > parentWidth;
81
+ },
82
+ onMouseOut() {
83
+ this.isDisabledTooltip = false;
71
84
  }
72
85
  }
73
86
  };
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div class="container age-com" :class="{ 'form-item-disabled': isDetail }">
3
3
  <template v-if="showType.includes('YYYY')">
4
- <a-input-number :value="ageValue.year" @change="handleYearChange" :disabled="isDisabled || isDetail" :min="0" />
4
+ <a-input-number :value="ageValue.year" @change="handleYearChange" :disabled="isDisabled || isDetail" :min="0" placeholder="请输入岁" />
5
5
  <span class="age-com-suffix">岁</span>
6
6
  </template>
7
7
  <template v-if="showType.includes('MM')">
8
- <a-input-number :value="ageValue.month" @change="handleMonthChange" :disabled="isDisabled || isDetail" :min="0" />
8
+ <a-input-number :value="ageValue.month" @change="handleMonthChange" :disabled="isDisabled || isDetail" :min="0" placeholder="请输入月" />
9
9
  <span class="age-com-suffix">月</span>
10
10
  </template>
11
11
  <template v-if="showType.includes('DD')">
12
- <a-input-number v-if="showType.includes('DD')" :value="ageValue.day" @change="handleDayChange" :disabled="isDisabled || isDetail" :min="0" />
12
+ <a-input-number v-if="showType.includes('DD')" :value="ageValue.day" @change="handleDayChange" :disabled="isDisabled || isDetail" :min="0" placeholder="请输入日" />
13
13
  <span class="age-com-suffix">日</span>
14
14
  </template>
15
15
  </div>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <CheckboxGroup v-bind="$attrs" :value="valueCp" @change="onChange"></CheckboxGroup>
3
+ </template>
4
+
5
+ <script>
6
+ import { Checkbox } from 'ant-design-vue';
7
+
8
+ export default {
9
+ inheritAttrs: false,
10
+ components: {
11
+ CheckboxGroup: Checkbox.Group,
12
+ },
13
+ props: {
14
+ value: {
15
+ type: [Array, String, Number],
16
+ },
17
+ multiple: {
18
+ type: Boolean,
19
+ default: false,
20
+ }
21
+ },
22
+ model: {
23
+ prop: "value",
24
+ event: "update:value"
25
+ },
26
+ computed: {
27
+ valueCp: {
28
+ set(val) {
29
+ this.$emit("update:value", val);
30
+ },
31
+ get() {
32
+ return Array.isArray(this.value) ? this.value : this.value ? [this.value] : [];
33
+ }
34
+ }
35
+ },
36
+ methods: {
37
+ filterNewVal(val) {
38
+ return val.filter((v) => !this.valueCp.includes(v));
39
+ },
40
+ onChange(val) {
41
+ if (!this.multiple && Array.isArray(val)) {
42
+ let res = this.filterNewVal(val)?.[0]
43
+ this.valueCp = res ? [res]: [];
44
+ return;
45
+ }
46
+ this.valueCp = val;
47
+ },
48
+ },
49
+ }
50
+
51
+ </script>
52
+ <style lang='less'>
53
+ </style>
@@ -3,7 +3,7 @@
3
3
  :mode="mode"
4
4
  v-if="item.com == 'SelectMui'"
5
5
  :placeholder="item.placeholder || `请选择${item.alias || item.title}`"
6
- :style="{width: `${item.advanceColWidth||160}px`}"
6
+ :style="selectWidth"
7
7
  :dropdownMatchSelectWidth="false"
8
8
  :maxTagCount="handleMaxTagCount(item)"
9
9
  :maxTagPlaceholder="handleMaxTag(item)"
@@ -85,6 +85,12 @@ export default {
85
85
  },
86
86
 
87
87
  computed: {
88
+ selectWidth(){
89
+ if(this.source !== 'quickSearch' || this.item?.advanceColWidth) {
90
+ return {width: `${this.item?.advanceColWidth || 160}px`}
91
+ }
92
+ return {width: '100%'}
93
+ },
88
94
  handleMaxTagCount() {
89
95
  return function(item) {
90
96
  let len = this.maxTagPlaceholder(item);
@@ -42,7 +42,7 @@
42
42
  @change="value => rangePickerChange(value, item)"
43
43
  @ok="outFilterChange"
44
44
  v-model="item.value"
45
- :placeholder="[`${item.alias || item.title}起始日期`, `${item.alias || item.title}截止日期`]"
45
+ :placeholder="[`起始${item.alias || item.title}`, `截止${item.alias || item.title}`]"
46
46
  v-if="item.com == 'DatePicker'"
47
47
  style="margin: 0 8px 8px 0"
48
48
  :showTime="handlePickerShowTime(item)"
@@ -116,7 +116,8 @@
116
116
  import multiSelect from '../multi-select/multi-select';
117
117
  import cTreeSelect from '../c-tree-select/tree-select';
118
118
  import { filterApiFn } from '../../mixins/mixins';
119
- import wordBookutils from '../../mixins/wordBookutils';
119
+ // import wordBookutils from '../../mixins/wordBookutils';
120
+ import OutQuickMethod from '../../mixins/out-quick-method'
120
121
  import moment from 'moment';
121
122
  import { Input, DatePicker} from 'ant-design-vue';
122
123
  const EVALUATEList = [
@@ -148,7 +149,7 @@ const EVALUATEList = [
148
149
  ];
149
150
  export default {
150
151
  name: "OutQuickSearch",
151
- mixins: [filterApiFn],
152
+ mixins: [filterApiFn, OutQuickMethod],
152
153
  components: {
153
154
  multiSelect,
154
155
  cTreeSelect,
@@ -180,126 +181,11 @@ export default {
180
181
  watch: {},
181
182
  // 生命周期
182
183
  created() {},
183
- mounted() {
184
- this.init();
185
- },
184
+ mounted() {},
186
185
 
187
186
  // 方法
188
187
  methods: {
189
188
 
190
- init(){
191
- let item = this.item;
192
- let df = item.explicitDefaultVal;
193
- if(item.com == 'SelectMui' && df){
194
- this.dropdownVisibleChange(true, item, {type:'hasDefaultInit'})
195
- }
196
- },
197
-
198
- handleWordBookSearch(value, item, config = {}) {
199
- if (item.comType != "SelectMuiWordBook") return;
200
- let curAutograph = item.settingObj.wordbook && item.settingObj.wordbook.autograph;
201
- let params = {
202
- keyword: value,
203
- autograph: curAutograph
204
- };
205
- let obj = {};
206
- let p = item?.setting?.wordbook?.params || undefined;
207
- if (p) {
208
- item.setting.wordbook.params.forEach(item => {
209
- obj[item.p_name] = item.p_value;
210
- });
211
- }
212
- let rp = { ...params, ...obj, ...config }
213
- this.getWordbookData(item.setting.wordbook, rp).then(({ data }) => {
214
- this.handleWordbookData(item, data, rp);
215
- });
216
- },
217
- dropdownVisibleChange(open, item, config={}) {
218
- if (item.comType != "SelectMuiWordBook") return;
219
- if (open) {
220
- let obj = {};
221
- if (item.setting.wordbook.params) {
222
- item.setting.wordbook.params.forEach(item => {
223
- obj[item.p_name] = item.p_value;
224
- });
225
- }
226
- if (item.settingObj.wordbook) {
227
- obj.autograph = item.settingObj.wordbook.autograph;
228
- }
229
- let df = item.explicitDefaultVal;
230
- if(df != 'firstOption'){
231
- obj.keyword = df;
232
- }
233
- this.getWordbookData(item.setting.wordbook, obj).then(({ data }) => {
234
- this.handleWordbookData(item, data, obj);
235
- if('hasDefaultInit' == config?.type){
236
- this.outFilterChange({type:'outSearchInit'});
237
- }
238
- });
239
- }
240
- },
241
- handleWordbookData(item, data, params) {
242
- this.$set(item, "hasFieldList", false);
243
- const {rows,hasFieldList,searchPageConfig} = wordBookutils.handleWordbookData(item,data,params);
244
- this.$set(item, "hasFieldList", hasFieldList);
245
- this.$set(item, "dataSource", rows);
246
- let showKeys = item?.setting?.wordbook?.showKeys || [];
247
- item.searchPageConfig = Object.assign(item.searchPageConfig, searchPageConfig);
248
- // 初始化获取值
249
- if(!this.initSearch){
250
- let df = item.explicitDefaultVal;
251
- if(df){
252
- let defval = [];
253
- if(df === 'firstOption'){
254
- let [v,k] = rows;
255
- // 如果有添加提示标题,取第二个
256
- if(showKeys.length > 0 && item.hasFieldList){
257
- v = k;
258
- }
259
- v && (defval = [v.myName])
260
- } else {
261
- let f = rows.find(v => v.myName.includes(df));
262
- if(f){
263
- defval = [f.myName]
264
- }
265
- }
266
- item.value = [...defval]
267
- item.search_DefaultValue= [...defval]
268
- }
269
- this.initSearch = true;
270
- }
271
- },
272
- getWordbookData(o, obj) {
273
- let { id, filterKeys, wordbookType } = o;
274
- this.fetchingWordbook = true;
275
- let resFieldKeys = Array.isArray(filterKeys) ? JSON.stringify(filterKeys) : filterKeys;
276
- let url = `/tableReader/getWordbookData`;
277
- let params = {
278
- wordbookId: id,
279
- fieldKeys: resFieldKeys,
280
- wordbookType: wordbookType || "WORDBOOK",
281
- asyncCount: 1, // 开启性能模式
282
- ...obj
283
- };
284
- return this.handleGetConfigApi(params, 'requestGetWordbookData', { fields: o }).then(res => {
285
- this.fetchingWordbook = false;
286
- if(typeof res.data === 'object'){
287
- res.data.reqParams = params;
288
- }
289
- return res;
290
- }).catch(() => {
291
- this.fetchingWordbook = false;
292
- });
293
- // return this.axios
294
- // .post(url, this.$qs.stringify(params))
295
- // .then(res => {
296
- // this.fetchingWordbook = false;
297
- // return res;
298
- // })
299
- // .catch(() => {
300
- // this.fetchingWordbook = false;
301
- // });
302
- },
303
189
  rangePickerChange(value, item) {
304
190
  if (item.showTime) {
305
191
  if (!value.length && item.showTime) {