cnhis-design-vue 3.1.40-beta.0 → 3.1.40-beta.10

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 (200) hide show
  1. package/README.md +12 -48
  2. package/es/components/big-table/style/index.css +1 -1
  3. package/es/components/button-print/src/utils/print.js +6 -1
  4. package/es/components/form-config/index.d.ts +66 -148
  5. package/es/components/form-config/src/FormConfig.vue.d.ts +66 -148
  6. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +33 -74
  7. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +33 -74
  8. package/es/components/form-render/index.d.ts +33 -74
  9. package/es/components/form-render/index.js +1 -1
  10. package/es/components/form-render/src/FormRender.vue.d.ts +33 -74
  11. package/es/components/form-render/src/FormRender.vue.js +37 -20
  12. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +33 -74
  13. package/es/components/form-render/src/components/renderer/searchCascade.js +2 -0
  14. package/es/components/form-render/src/components/renderer/select.js +5 -2
  15. package/es/components/form-render/src/hooks/index.js +1 -1
  16. package/es/components/form-render/src/hooks/useAnchor.d.ts +6 -3
  17. package/es/components/form-render/src/hooks/useAnchor.js +26 -26
  18. package/es/components/form-render/src/hooks/useAutoHidden.d.ts +4 -0
  19. package/es/components/form-render/src/hooks/useAutoHidden.js +43 -0
  20. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +7 -10
  21. package/es/components/form-render/src/hooks/useBusinessBinding.js +38 -36
  22. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -6
  23. package/es/components/form-render/src/hooks/useFormContext.d.ts +1 -2
  24. package/es/components/form-render/src/hooks/useFormContext.js +2 -2
  25. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  26. package/es/components/form-render/src/hooks/useFormRenderOptions.js +25 -21
  27. package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
  28. package/es/components/form-render/style/index.css +1 -1
  29. package/es/components/form-render/test/basic-config.spec.d.ts +1 -0
  30. package/es/components/form-render/test/renderer.spec.d.ts +1 -0
  31. package/es/components/iho-table/index.d.ts +121 -121
  32. package/es/components/iho-table/src/IhoTable.vue.d.ts +121 -121
  33. package/es/components/iho-table/src/IhoTable.vue.js +2 -1
  34. package/es/components/iho-table/src/constants/index.d.ts +2 -2
  35. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +59 -59
  36. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
  37. package/es/components/index.css +1 -1
  38. package/es/components/index.d.ts +3 -1
  39. package/es/components/index.js +7 -1
  40. package/es/components/info-header/index.d.ts +18 -3
  41. package/es/components/info-header/src/HiddenContent.vue.d.ts +2 -2
  42. package/es/components/info-header/src/InfoEllipsis.vue.d.ts +1 -1
  43. package/es/components/info-header/src/InfoHeader.vue.d.ts +18 -3
  44. package/es/components/info-header/src/InfoHeader.vue.js +40 -19
  45. package/es/components/keyboard/index.d.ts +20 -2
  46. package/es/components/keyboard/src/Keyboard.vue.d.ts +20 -2
  47. package/es/components/keyboard/src/components/InputNumber.vue.d.ts +19 -2
  48. package/es/components/keyboard/src/components/InputNumber.vue.js +15 -5
  49. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +20 -2
  50. package/es/components/keyboard/src/components/NumberPanel.vue.js +14 -10
  51. package/es/components/recommend-search/index.d.ts +14 -14
  52. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +14 -14
  53. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +2 -2
  54. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +4 -4
  55. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -4
  56. package/es/components/scale-view/index.d.ts +5 -2
  57. package/es/components/scale-view/src/ScaleView.vue.d.ts +8 -2
  58. package/es/components/scale-view/src/ScaleView.vue.js +4 -3
  59. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  60. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  61. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
  62. package/es/components/scale-view/src/hooks/scaleview-computed.js +76 -31
  63. package/es/components/scale-view/src/hooks/use-evaluate.js +13 -13
  64. package/es/components/shortcut-provider/index.d.ts +15 -1
  65. package/es/components/shortcut-provider/src/ShortcutProvider.vue.d.ts +15 -1
  66. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +8 -2
  67. package/es/components/shortcut-setter/index.d.ts +33 -74
  68. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +33 -74
  69. package/es/components/steps-wheel/index.d.ts +1 -1
  70. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
  71. package/es/components/table-filter/index.d.ts +8933 -0
  72. package/es/components/table-filter/index.js +21 -0
  73. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +3841 -0
  74. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +2272 -0
  75. package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +3198 -0
  76. package/es/components/table-filter/src/classification/Classification-com.vue.js +1315 -0
  77. package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +71 -0
  78. package/es/components/table-filter/src/classification/search-class-name.vue.js +195 -0
  79. package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +1119 -0
  80. package/es/components/table-filter/src/classification/search-professional-model.vue.js +594 -0
  81. package/es/components/table-filter/src/components/age-com/index.vue.d.ts +119 -0
  82. package/es/components/table-filter/src/components/age-com/index.vue.js +185 -0
  83. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +199 -0
  84. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +86 -0
  85. package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +2 -0
  86. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +30 -0
  87. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +90 -0
  88. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +253 -0
  89. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +112 -0
  90. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +114 -0
  91. package/es/components/table-filter/src/components/classify-filter/helpers/options.d.ts +4 -0
  92. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +14 -0
  93. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +20 -0
  94. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +87 -0
  95. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +59 -0
  96. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +147 -0
  97. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +278 -0
  98. package/es/components/table-filter/src/components/classify-filter/index.vue.js +304 -0
  99. package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +113 -0
  100. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +153 -0
  101. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +266 -0
  102. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +310 -0
  103. package/es/components/table-filter/src/components/range-age/index.vue.d.ts +248 -0
  104. package/es/components/table-filter/src/components/range-age/index.vue.js +137 -0
  105. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +104 -0
  106. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +64 -0
  107. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +34 -0
  108. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +45 -0
  109. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -0
  110. package/es/components/table-filter/src/components/render-widget/components/index.js +2 -0
  111. package/es/components/table-filter/src/components/render-widget/enums.d.ts +25 -0
  112. package/es/components/table-filter/src/components/render-widget/enums.js +27 -0
  113. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +1 -0
  114. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +70 -0
  115. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +32 -0
  116. package/es/components/table-filter/src/components/render-widget/index.vue.js +107 -0
  117. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +199 -0
  118. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +152 -0
  119. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.d.ts +789 -0
  120. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1520 -0
  121. package/es/components/table-filter/src/components/search-condition/fieldTypeList.d.ts +18 -0
  122. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +171 -0
  123. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +1217 -0
  124. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +199 -0
  125. package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +1624 -0
  126. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +241 -0
  127. package/es/components/table-filter/src/components/table-modal/TableModal.vue.d.ts +292 -0
  128. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +526 -0
  129. package/es/components/table-filter/src/const/dataOptions.d.ts +36 -0
  130. package/es/components/table-filter/src/const/dataOptions.js +107 -0
  131. package/es/components/table-filter/src/const/index.d.ts +5 -0
  132. package/es/components/table-filter/src/const/index.js +5 -0
  133. package/es/components/table-filter/src/directive/flexibleResize.d.ts +28 -0
  134. package/es/components/table-filter/src/directive/flexibleResize.js +157 -0
  135. package/es/components/table-filter/src/directive/preventReClick.d.ts +4 -0
  136. package/es/components/table-filter/src/directive/preventReClick.js +14 -0
  137. package/es/components/table-filter/src/directive/resize.d.ts +4 -0
  138. package/es/components/table-filter/src/directive/resize.js +12 -0
  139. package/es/components/table-filter/src/hooks/export.d.ts +1 -0
  140. package/es/components/table-filter/src/hooks/export.js +1 -0
  141. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +28 -0
  142. package/es/components/table-filter/src/hooks/useAdvanced.js +64 -0
  143. package/es/components/table-filter/src/hooks/useMixins.d.ts +60 -0
  144. package/es/components/table-filter/src/hooks/useMixins.js +532 -0
  145. package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +15 -0
  146. package/es/components/table-filter/src/hooks/useRenderWidget.js +94 -0
  147. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +8 -0
  148. package/es/components/table-filter/src/hooks/useTableSearchCon.js +131 -0
  149. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +12 -0
  150. package/es/components/table-filter/src/hooks/useWordBookutils.js +91 -0
  151. package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +1942 -0
  152. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +2038 -0
  153. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +14 -0
  154. package/es/components/table-filter/src/tool/generateDefOptions.js +65 -0
  155. package/es/components/table-filter/src/tool/getWidgetType.d.ts +1 -0
  156. package/es/components/table-filter/src/tool/getWidgetType.js +27 -0
  157. package/es/components/table-filter/src/tool/options.d.ts +18 -0
  158. package/es/components/table-filter/src/tool/options.js +200 -0
  159. package/es/components/table-filter/src/tool/resizeSensor.d.ts +16 -0
  160. package/es/components/table-filter/src/tool/resizeSensor.js +123 -0
  161. package/es/components/table-filter/src/tool/time-domain.d.ts +39 -0
  162. package/es/components/table-filter/src/tool/time-domain.js +100 -0
  163. package/es/components/table-filter/src/tool/transformData.d.ts +92 -0
  164. package/es/components/table-filter/src/tool/transformData.js +169 -0
  165. package/es/components/table-filter/src/tool/utils.d.ts +4 -0
  166. package/es/components/table-filter/src/tool/utils.js +29 -0
  167. package/es/components/table-filter/src/types/enums.d.ts +65 -0
  168. package/es/components/table-filter/src/types/enums.js +67 -0
  169. package/es/components/table-filter/src/types/index.d.ts +483 -0
  170. package/es/components/table-filter/src/types/index.js +1 -0
  171. package/es/components/table-filter/src/types/tool.d.ts +7 -0
  172. package/es/components/table-filter/src/types/tool.js +1 -0
  173. package/es/components/table-filter/style/index.css +1 -0
  174. package/es/shared/assets/img/failure.js +1 -1
  175. package/es/shared/assets/img/failure.png.js +1 -1
  176. package/es/shared/assets/img/icon-asc.js +1 -1
  177. package/es/shared/assets/img/icon-desc.js +1 -1
  178. package/es/shared/assets/img/no-permission.js +1 -1
  179. package/es/shared/assets/img/no-permission.png.js +1 -1
  180. package/es/shared/assets/img/nodata.js +1 -1
  181. package/es/shared/assets/img/nodata.png.js +1 -1
  182. package/es/shared/assets/img/notfound.js +1 -1
  183. package/es/shared/assets/img/notfound.png.js +1 -1
  184. package/es/shared/assets/img/qr.js +1 -1
  185. package/es/shared/assets/img/qr.png.js +1 -1
  186. package/es/shared/assets/img/success.js +1 -1
  187. package/es/shared/assets/img/success.png.js +1 -1
  188. package/es/shared/assets/img/video.js +1 -1
  189. package/es/shared/assets/img/video.png.js +1 -1
  190. package/es/shared/assets/img/video_default_cover.js +1 -1
  191. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  192. package/es/shared/assets/img/video_hover.js +1 -1
  193. package/es/shared/assets/img/video_play_hover.js +1 -1
  194. package/es/shared/assets/img/xb_big.js +1 -1
  195. package/es/shared/assets/img/xb_big.png.js +1 -1
  196. package/es/shared/assets/img/xb_small.js +1 -1
  197. package/es/shared/assets/img/xb_small.png.js +1 -1
  198. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  199. package/es/shared/utils/utilExpand.js +66 -0
  200. package/package.json +3 -3
@@ -0,0 +1,90 @@
1
+ import { PropType } from 'vue';
2
+ import { ISearchType } from '../../../../../../es/components/table-filter/src/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ item: {
5
+ type: PropType<ISearchType>;
6
+ default: () => {
7
+ value: never[];
8
+ };
9
+ };
10
+ handleGetConfigApi: {
11
+ type: FunctionConstructor;
12
+ default: () => void;
13
+ };
14
+ filterApiConfig: {
15
+ type: ObjectConstructor;
16
+ };
17
+ outFilterChange: {
18
+ type: FunctionConstructor;
19
+ default: () => void;
20
+ };
21
+ }, {
22
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
23
+ item: {
24
+ type: PropType<ISearchType>;
25
+ default: () => {
26
+ value: never[];
27
+ };
28
+ };
29
+ handleGetConfigApi: {
30
+ type: FunctionConstructor;
31
+ default: () => void;
32
+ };
33
+ filterApiConfig: {
34
+ type: ObjectConstructor;
35
+ };
36
+ outFilterChange: {
37
+ type: FunctionConstructor;
38
+ default: () => void;
39
+ };
40
+ }>> & {}>>;
41
+ quickInputSelect: any;
42
+ treeData: import("vue").Ref<{
43
+ label: string;
44
+ key: string;
45
+ selectable: boolean;
46
+ scopedSlots: {
47
+ title: string;
48
+ };
49
+ }[]>;
50
+ handleMaxTagCount: import("vue").ComputedRef<(item: ISearchType) => 0 | 1>;
51
+ showRemoveIcon: import("vue").ComputedRef<boolean>;
52
+ init: () => Promise<void>;
53
+ handleMaxTag: () => string;
54
+ handleRequestedOptions: (item: ISearchType) => Promise<any>;
55
+ getSearchDefParams: (item: ISearchType) => any;
56
+ formatField: (value: any) => any;
57
+ hanldeGetCascadelabel: (v?: never[], k?: {}) => any;
58
+ handleInitTreeData: (list: any, config: ISearchType) => void;
59
+ hanldeSetTreeDef: () => void;
60
+ maxTagPlaceholder: (item: ISearchType) => number;
61
+ treeSelect: (key: string, vnode: any) => void;
62
+ change: () => void;
63
+ handleDisabledTreeData: (list?: any, config?: any) => void;
64
+ createSuffixIcon: () => void;
65
+ NTreeSelect: any;
66
+ NSpin: any;
67
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
68
+ item: {
69
+ type: PropType<ISearchType>;
70
+ default: () => {
71
+ value: never[];
72
+ };
73
+ };
74
+ handleGetConfigApi: {
75
+ type: FunctionConstructor;
76
+ default: () => void;
77
+ };
78
+ filterApiConfig: {
79
+ type: ObjectConstructor;
80
+ };
81
+ outFilterChange: {
82
+ type: FunctionConstructor;
83
+ default: () => void;
84
+ };
85
+ }>>, {
86
+ item: ISearchType;
87
+ handleGetConfigApi: Function;
88
+ outFilterChange: Function;
89
+ }>;
90
+ export default _default;
@@ -0,0 +1,253 @@
1
+ import { defineComponent, ref, computed, onMounted, watch, getCurrentInstance, openBlock, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createElementBlock, createVNode, createCommentVNode } from 'vue';
2
+ import { NTreeSelect, NSpin } from 'naive-ui';
3
+ import XEUtils from 'xe-utils';
4
+ import 'moment';
5
+ import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
6
+
7
+ const _hoisted_1 = {
8
+ key: 0,
9
+ class: "init-key-loading",
10
+ slot: "title",
11
+ style: { "color": "#08c" }
12
+ };
13
+ const _sfc_main = /* @__PURE__ */ defineComponent({
14
+ __name: "tree-select",
15
+ props: {
16
+ item: {
17
+ type: Object,
18
+ default: () => ({ value: [] })
19
+ },
20
+ handleGetConfigApi: {
21
+ type: Function,
22
+ default: () => {
23
+ }
24
+ },
25
+ filterApiConfig: { type: Object },
26
+ outFilterChange: {
27
+ type: Function,
28
+ default: () => {
29
+ }
30
+ }
31
+ },
32
+ setup(__props) {
33
+ const props = __props;
34
+ const quickInputSelect = ref(null);
35
+ const treeData = ref([
36
+ {
37
+ label: "_init_key_",
38
+ key: "_init_key_",
39
+ selectable: false,
40
+ scopedSlots: {
41
+ title: "title"
42
+ }
43
+ }
44
+ ]);
45
+ let handleMaxTagCount = computed(() => {
46
+ return function(item) {
47
+ let len = maxTagPlaceholder(item);
48
+ if (len <= 1)
49
+ return 1;
50
+ return 0;
51
+ };
52
+ });
53
+ let showRemoveIcon = computed(() => {
54
+ var _a;
55
+ let v = props.item.value;
56
+ let f = 1 == ((_a = props == null ? void 0 : props.item) == null ? void 0 : _a.filterExplicit);
57
+ if (Array.isArray(v) && f) {
58
+ let l = v.length;
59
+ if (props.item.explicitRequired == 1) {
60
+ return l > 1;
61
+ }
62
+ }
63
+ return true;
64
+ });
65
+ onMounted(() => {
66
+ init();
67
+ createSuffixIcon();
68
+ });
69
+ async function init() {
70
+ try {
71
+ let res = await handleRequestedOptions(props.item);
72
+ let { result, map } = res.data;
73
+ if (result !== "SUCCESS") {
74
+ treeData.value = [];
75
+ return;
76
+ }
77
+ let rows = map.rows || [];
78
+ if (rows) {
79
+ handleInitTreeData(rows, props.item);
80
+ treeData.value = rows.map((item) => {
81
+ return {
82
+ ...item,
83
+ label: item.value
84
+ };
85
+ });
86
+ }
87
+ } catch (error) {
88
+ console.log(error);
89
+ treeData.value = [];
90
+ } finally {
91
+ hanldeSetTreeDef();
92
+ }
93
+ }
94
+ async function handleRequestedOptions(item) {
95
+ let params = getSearchDefParams(item);
96
+ let res = await props.handleGetConfigApi(params, "requestGetWordbookData", { fields: item }, props.filterApiConfig);
97
+ return res;
98
+ }
99
+ function getSearchDefParams(item) {
100
+ var _a;
101
+ let obj = {};
102
+ let { params = [], autograph, filterKeys, id, wordbookType } = ((_a = item == null ? void 0 : item.settingObj) == null ? void 0 : _a.wordbook) || {};
103
+ if (params) {
104
+ params.forEach((item2) => {
105
+ obj[item2.p_name] = item2.p_value;
106
+ });
107
+ }
108
+ if (autograph) {
109
+ obj.autograph = autograph;
110
+ }
111
+ let resFieldKeys = Array.isArray(filterKeys) ? JSON.stringify(filterKeys) : filterKeys;
112
+ let res = {
113
+ wordbookId: id,
114
+ fieldKeys: resFieldKeys,
115
+ wordbookType: wordbookType || "WORDBOOK",
116
+ isLevelLazyLoad: false,
117
+ ...obj
118
+ };
119
+ return res;
120
+ }
121
+ function formatField(value) {
122
+ let res = value;
123
+ try {
124
+ if (res && typeof res == "string" && res.startsWith("###")) {
125
+ res = res.slice(3);
126
+ res = JSON.parse(res);
127
+ res = res.change_text;
128
+ }
129
+ return res || "";
130
+ } catch (error) {
131
+ return "";
132
+ }
133
+ }
134
+ function hanldeGetCascadelabel(v = [], k = {}) {
135
+ if (Array.isArray(v) && v.length) {
136
+ const l = [];
137
+ v.forEach((i) => {
138
+ let res = formatField(k[i]);
139
+ l.push(res);
140
+ });
141
+ if (l.length == 0) {
142
+ return "";
143
+ }
144
+ return l.join(" ");
145
+ }
146
+ return "";
147
+ }
148
+ function handleInitTreeData(list = [], config) {
149
+ var _a;
150
+ let { showKeys = [], field_key = "" } = ((_a = config == null ? void 0 : config.setting) == null ? void 0 : _a.wordbook) || {};
151
+ list.forEach((item, i) => {
152
+ let val = XEUtils.stringToValue(item[field_key], "value");
153
+ item.myLabel = hanldeGetCascadelabel(showKeys, item) || val;
154
+ item.key = item.theUniqueKey;
155
+ item.title = item.myLabel;
156
+ item.value = `${val}<&=&>${i}<&=&>${item.key}`;
157
+ if (item.children && item.children.length) {
158
+ handleInitTreeData(item.children, config);
159
+ }
160
+ });
161
+ }
162
+ function hanldeSetTreeDef() {
163
+ var _a, _b;
164
+ let f = 1 == ((_a = props == null ? void 0 : props.item) == null ? void 0 : _a.filterExplicit);
165
+ let df = ((_b = props == null ? void 0 : props.item) == null ? void 0 : _b.explicitDefaultVal) || "";
166
+ if (df === "firstOption" && f) {
167
+ let v = treeData.value[0];
168
+ props.item.value = (v == null ? void 0 : v.value) ? [v == null ? void 0 : v.value] : [];
169
+ if (typeof props.outFilterChange === "function") {
170
+ props.outFilterChange({ type: "outSearchInit" });
171
+ }
172
+ }
173
+ }
174
+ function maxTagPlaceholder(item) {
175
+ if (Array.isArray(item.value)) {
176
+ return item.value.length;
177
+ } else {
178
+ return 1;
179
+ }
180
+ }
181
+ function treeSelect(key, vnode) {
182
+ }
183
+ function change() {
184
+ }
185
+ function handleDisabledTreeData(list = [], config = {}) {
186
+ list.forEach((item, i) => {
187
+ let k = config.showRemoveIcon ? false : props.item.value.includes(item.value);
188
+ item.disabled = k;
189
+ if (item.children && item.children.length) {
190
+ handleDisabledTreeData(item.children, config);
191
+ }
192
+ });
193
+ }
194
+ function createSuffixIcon() {
195
+ let refDom = quickInputSelect.value;
196
+ if (!refDom)
197
+ return;
198
+ let selectDom = refDom.$el;
199
+ if (!selectDom)
200
+ return;
201
+ let pDom = selectDom.querySelector(".ant-select-selection--multiple");
202
+ let hasTag = pDom.querySelector(".quick-input-select-span");
203
+ if (!hasTag) {
204
+ let tag = document.createElement("span");
205
+ tag.className = "quick-input-select-span";
206
+ let icon = `<i aria-label="\u56FE\u6807: down" class="anticon anticon-down ant-select-arrow-icon"><svg viewBox="64 64 896 896" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></i>`;
207
+ tag.innerHTML = icon;
208
+ pDom.appendChild(tag);
209
+ }
210
+ }
211
+ watch(
212
+ () => props.item,
213
+ (val) => {
214
+ var _a;
215
+ let ctx = (_a = getCurrentInstance()) == null ? void 0 : _a.ctx;
216
+ handleDisabledTreeData(treeData.value, {
217
+ showRemoveIcon: showRemoveIcon.value
218
+ });
219
+ ctx.$forceUpdate();
220
+ },
221
+ { immediate: true, deep: true }
222
+ );
223
+ return (_ctx, _cache) => {
224
+ return openBlock(), createBlock(unref(NTreeSelect), {
225
+ value: __props.item.value,
226
+ "onUpdate:value": [
227
+ _cache[0] || (_cache[0] = ($event) => __props.item.value = $event),
228
+ change
229
+ ],
230
+ maxTagCount: unref(handleMaxTagCount)(__props.item),
231
+ multiple: "",
232
+ filterable: "",
233
+ clearable: "",
234
+ style: normalizeStyle(`width: ${__props.item.advanceColWidth || 160}px`),
235
+ class: normalizeClass([!unref(showRemoveIcon) && "c-a-tree-select-show-hide-icon", "c-a-quick-input-tree-mul"]),
236
+ options: treeData.value,
237
+ allowClear: __props.item.explicitRequired != 1,
238
+ placeholder: __props.item.placeholder || `\u8BF7\u9009\u62E9${__props.item.alias || __props.item.title}`,
239
+ "onUpdate:indeterminateKeys": treeSelect
240
+ }, {
241
+ action: withCtx(({ key, value }) => [
242
+ key === "_init_key_" ? (openBlock(), createElementBlock("span", _hoisted_1, [
243
+ createVNode(unref(NSpin), { tip: `\u52A0\u8F7D\u4E2D...` }, null, 8, ["tip"])
244
+ ])) : createCommentVNode("v-if", true)
245
+ ]),
246
+ _: 1
247
+ }, 8, ["value", "maxTagCount", "style", "class", "options", "allowClear", "placeholder"]);
248
+ };
249
+ }
250
+ });
251
+ var cTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tree-select.vue"]]);
252
+
253
+ export { cTreeSelect as default };
@@ -0,0 +1,112 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ paramCfg: {
3
+ type: ObjectConstructor;
4
+ default: null;
5
+ };
6
+ modelValue: {
7
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
8
+ default: null;
9
+ };
10
+ presetVal: {
11
+ type: StringConstructor;
12
+ default: null;
13
+ };
14
+ }, {
15
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
16
+ paramCfg: {
17
+ type: ObjectConstructor;
18
+ default: null;
19
+ };
20
+ modelValue: {
21
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
22
+ default: null;
23
+ };
24
+ presetVal: {
25
+ type: StringConstructor;
26
+ default: null;
27
+ };
28
+ }>> & {
29
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
30
+ "onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
31
+ }>>;
32
+ emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
33
+ valueCp: import("vue").WritableComputedRef<unknown>;
34
+ presetValCp: import("vue").WritableComputedRef<unknown>;
35
+ widgetType: import("vue").ComputedRef<any>;
36
+ optionSetting: import("vue").ComputedRef<any>;
37
+ mappingConfig: import("vue").ComputedRef<any>;
38
+ widgetOptions: import("vue").ComputedRef<{
39
+ label: string;
40
+ value: string;
41
+ }[]>;
42
+ NInputNumber: any;
43
+ NInput: any;
44
+ NSelect: any;
45
+ NDatePicker: any;
46
+ WidgetTypeEnums: {
47
+ INPUT_NUMBER: string;
48
+ INPUT: string;
49
+ SELECT: string;
50
+ DATE: string;
51
+ DATE_TIME: string;
52
+ };
53
+ WidgetValEnums: {
54
+ CUSTOM: string;
55
+ FIRST_VAL: string;
56
+ NOW: string;
57
+ TODAY: string;
58
+ TODAY_START: string;
59
+ TODAY_END: string;
60
+ TOMORROW: string;
61
+ TOMORROW_START: string;
62
+ TOMORROW_END: string;
63
+ YESTERDAY: string;
64
+ YESTERDAY_START: string;
65
+ YESTERDAY_END: string;
66
+ THIS_WEEK: string;
67
+ WEEK_START: string;
68
+ WEEK_END: string;
69
+ NEXT_WEEK: string;
70
+ LAST_WEEK: string;
71
+ THIS_MONTH: string;
72
+ MONTH_START: string;
73
+ MONTH_END: string;
74
+ NEXT_MONTH: string;
75
+ LAST_MONTH: string;
76
+ THIS_QUARTER: string;
77
+ NEXT_QUARTER: string;
78
+ LAST_QUARTER: string;
79
+ THIS_YEAR: string;
80
+ NEXT_YEAR: string;
81
+ LAST_YEAR: string;
82
+ };
83
+ WidgetOptionEnums: {
84
+ RADIO: string;
85
+ MULTIPLE: string;
86
+ ALL: string;
87
+ SELECT_TIME: string;
88
+ PAST_TIME: string;
89
+ FUTURE_TIME: string;
90
+ };
91
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal")[], "update:modelValue" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
92
+ paramCfg: {
93
+ type: ObjectConstructor;
94
+ default: null;
95
+ };
96
+ modelValue: {
97
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
98
+ default: null;
99
+ };
100
+ presetVal: {
101
+ type: StringConstructor;
102
+ default: null;
103
+ };
104
+ }>> & {
105
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
106
+ "onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
107
+ }, {
108
+ modelValue: string | number | unknown[];
109
+ presetVal: string;
110
+ paramCfg: Record<string, any>;
111
+ }>;
112
+ export default _default;
@@ -0,0 +1,114 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, unref, createBlock, isRef, createCommentVNode, Fragment, createVNode } from 'vue';
2
+ import { NInputNumber, NInput, NSelect, NDatePicker } from 'naive-ui';
3
+ import { WidgetTypeEnums, WidgetValEnums, WidgetOptionEnums } from '../../types/enums.js';
4
+ import { generateDefOptionsInApi } from '../../tool/generateDefOptions.js';
5
+ import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
6
+
7
+ const _hoisted_1 = { class: "value-cfg_wrapper" };
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "ValueCfg",
10
+ props: {
11
+ paramCfg: {
12
+ type: Object,
13
+ default: null
14
+ },
15
+ modelValue: {
16
+ type: [String, Number, Array],
17
+ default: null
18
+ },
19
+ presetVal: {
20
+ type: String,
21
+ default: null
22
+ }
23
+ },
24
+ emits: [
25
+ "update:modelValue",
26
+ "update:presetVal"
27
+ ],
28
+ setup(__props, { emit }) {
29
+ const props = __props;
30
+ const valueCp = computed({
31
+ set(val) {
32
+ emit("update:modelValue", val);
33
+ },
34
+ get() {
35
+ return props.modelValue;
36
+ }
37
+ });
38
+ const presetValCp = computed({
39
+ set(val) {
40
+ emit("update:presetVal", val);
41
+ },
42
+ get() {
43
+ return props.presetVal;
44
+ }
45
+ });
46
+ const widgetType = computed(() => {
47
+ var _a;
48
+ return (_a = props.paramCfg) == null ? void 0 : _a.type;
49
+ });
50
+ const optionSetting = computed(() => {
51
+ var _a;
52
+ return (_a = props.paramCfg) == null ? void 0 : _a.optionSetting;
53
+ });
54
+ const mappingConfig = computed(() => {
55
+ var _a;
56
+ return (_a = props.paramCfg) == null ? void 0 : _a.mappingConfig;
57
+ });
58
+ const widgetOptions = computed(() => {
59
+ const options = generateDefOptionsInApi(widgetType.value, mappingConfig.value).slice(0);
60
+ if (widgetType.value === WidgetTypeEnums.DATE || widgetType.value === WidgetTypeEnums.DATE_TIME) {
61
+ options.unshift({ label: "\u81EA\u5B9A\u4E49\u8F93\u5165", value: WidgetValEnums.CUSTOM });
62
+ }
63
+ return options;
64
+ });
65
+ return (_ctx, _cache) => {
66
+ return openBlock(), createElementBlock("div", _hoisted_1, [
67
+ unref(widgetType) === unref(WidgetTypeEnums).INPUT_NUMBER ? (openBlock(), createBlock(unref(NInputNumber), {
68
+ key: 0,
69
+ class: "form-item",
70
+ value: unref(valueCp),
71
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(valueCp) ? valueCp.value = $event : null)
72
+ }, null, 8, ["value"])) : createCommentVNode("v-if", true),
73
+ unref(widgetType) === unref(WidgetTypeEnums).INPUT ? (openBlock(), createBlock(unref(NInput), {
74
+ key: 1,
75
+ value: unref(valueCp),
76
+ "onUpdate:value": _cache[1] || (_cache[1] = ($event) => isRef(valueCp) ? valueCp.value = $event : null),
77
+ maxlength: "255",
78
+ clearable: ""
79
+ }, null, 8, ["value"])) : createCommentVNode("v-if", true),
80
+ unref(widgetType) === unref(WidgetTypeEnums).SELECT ? (openBlock(), createBlock(unref(NSelect), {
81
+ key: 2,
82
+ style: { "width": "120px" },
83
+ class: "form-item",
84
+ value: unref(valueCp),
85
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => isRef(valueCp) ? valueCp.value = $event : null),
86
+ filterable: "",
87
+ options: unref(widgetOptions),
88
+ multiple: unref(optionSetting) === unref(WidgetOptionEnums).MULTIPLE,
89
+ maxTagCount: 1
90
+ }, null, 8, ["value", "options", "multiple"])) : createCommentVNode("v-if", true),
91
+ unref(widgetType) === unref(WidgetTypeEnums).DATE || unref(widgetType) === unref(WidgetTypeEnums).DATE_TIME ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
92
+ createVNode(unref(NSelect), {
93
+ style: { "width": "120px" },
94
+ class: "form-item",
95
+ value: unref(presetValCp),
96
+ "onUpdate:value": _cache[3] || (_cache[3] = ($event) => isRef(presetValCp) ? presetValCp.value = $event : null),
97
+ options: unref(widgetOptions)
98
+ }, null, 8, ["value", "options"]),
99
+ unref(presetValCp) === unref(WidgetValEnums).CUSTOM ? (openBlock(), createBlock(unref(NDatePicker), {
100
+ key: 0,
101
+ class: "form-item",
102
+ type: unref(widgetType).toLowerCase(),
103
+ format: "yyyy-MM-dd HH:mm:ss",
104
+ "formatted-value": unref(valueCp),
105
+ "onUpdate:formatted-value": _cache[4] || (_cache[4] = ($event) => isRef(valueCp) ? valueCp.value = $event : null)
106
+ }, null, 8, ["type", "formatted-value"])) : createCommentVNode("v-if", true)
107
+ ], 64)) : createCommentVNode("v-if", true)
108
+ ]);
109
+ };
110
+ }
111
+ });
112
+ var ValueCfg = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "ValueCfg.vue"]]);
113
+
114
+ export { ValueCfg as default };
@@ -0,0 +1,4 @@
1
+ export declare const conditionOptions: {
2
+ label: string;
3
+ value: string;
4
+ }[];
@@ -0,0 +1,14 @@
1
+ import { ConditionEnums } from '../../../types/enums.js';
2
+
3
+ const conditionOptions = [
4
+ {
5
+ label: "\u81EA\u5B9A\u4E49",
6
+ value: ConditionEnums.EQUAL
7
+ },
8
+ {
9
+ label: "\u4E3A\u7A7A",
10
+ value: ConditionEnums.NULL
11
+ }
12
+ ];
13
+
14
+ export { conditionOptions };
@@ -0,0 +1,20 @@
1
+ import { Ref } from 'vue';
2
+ import { ICategoryItemType } from '../../../../../../../es/components/table-filter/src/types';
3
+ export declare const useDisplayCategory: (selectedDisplayCategory: Ref, { conditionList }: any) => {
4
+ State: {
5
+ addDisplayCategory: string;
6
+ displayCategories: {
7
+ disabled: boolean;
8
+ value: string;
9
+ }[];
10
+ displayCategoryOriginLen: number;
11
+ showAdd: boolean;
12
+ };
13
+ isEnableAddDisplayCategory: import("vue").ComputedRef<boolean>;
14
+ editDisplayCategory: (e: any, item: ICategoryItemType) => void;
15
+ handleDisplayCategorySelect: (item: ICategoryItemType) => void;
16
+ handleDisplayCategoryRemove: (index: number, item: ICategoryItemType) => void;
17
+ handleDisplayCategoryAdd: (e: any) => void;
18
+ handlerBlur: () => void;
19
+ initDisplayCategories: (rawDataDisplayCategories: any, displayCategory: any) => void;
20
+ };