cnhis-design-vue 3.1.43-beta.0 → 3.1.43-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 (122) hide show
  1. package/es/components/base-search/index.d.ts +46 -114
  2. package/es/components/base-search/src/index.vue.d.ts +46 -114
  3. package/es/components/base-search/src/index.vue.js +1 -1
  4. package/es/components/base-search/style/index.css +1 -1
  5. package/es/components/big-table/src/hooks/useEdit.d.ts +26 -26
  6. package/es/components/big-table/src/utils.js +1 -1
  7. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
  8. package/es/components/button-print/src/utils/print.d.ts +2 -0
  9. package/es/components/button-print/src/utils/print.js +1 -1
  10. package/es/components/classification/index.d.ts +7 -6
  11. package/es/components/classification/src/components/search-filter/index.vue.d.ts +1 -0
  12. package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -5
  13. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  14. package/es/components/classification/src/components/table-modal/index.vue.d.ts +2 -2
  15. package/es/components/classification/src/index.vue.d.ts +7 -6
  16. package/es/components/date-picker/index.d.ts +27 -2
  17. package/es/components/date-picker/src/DatePicker.vue.d.ts +27 -2
  18. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  19. package/es/components/fabric-chart/index.d.ts +1 -1
  20. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  21. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -1
  22. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.d.ts +2 -1
  23. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +4 -4
  24. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  25. package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -1
  26. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
  28. package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +3 -2
  29. package/es/components/form-config/index.d.ts +72 -0
  30. package/es/components/form-config/src/FormConfig.vue.d.ts +72 -0
  31. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +21 -20
  32. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +43 -0
  33. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +1 -1
  34. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
  35. package/es/components/form-render/index.d.ts +1 -0
  36. package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
  37. package/es/components/form-render/src/FormRender.vue.js +1 -1
  38. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
  39. package/es/components/form-render/src/hooks/useChangeContext.d.ts +1 -1
  40. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  41. package/es/components/form-render/src/hooks/useLowCodeEvent.d.ts +6 -0
  42. package/es/components/form-render/src/hooks/useLowCodeEvent.js +1 -0
  43. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  44. package/es/components/form-render/src/types/fieldItem.d.ts +2 -127
  45. package/es/components/form-render/src/types/index.d.ts +1 -2
  46. package/es/components/iho-table/index.d.ts +15 -5
  47. package/es/components/iho-table/src/IhoTable.vue.d.ts +15 -5
  48. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  49. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -2
  50. package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
  51. package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -1
  52. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.d.ts +4 -1
  53. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
  54. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -1
  55. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +28 -3
  56. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -1
  57. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +3 -11
  58. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  59. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  60. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  61. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +27 -2
  62. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  63. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -0
  64. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  65. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  66. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  67. package/es/components/iho-table/src/types/index.d.ts +11 -25
  68. package/es/components/iho-table/src/types/pluginType.d.ts +18 -21
  69. package/es/components/iho-table/style/iconfont.ttf +0 -0
  70. package/es/components/iho-table/style/index.css +1 -1
  71. package/es/components/index.css +1 -1
  72. package/es/components/index.d.ts +1 -0
  73. package/es/components/info-header/index.d.ts +2 -0
  74. package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
  75. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +4 -4
  76. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
  77. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +21 -20
  78. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  79. package/es/components/quick-search/index.d.ts +54 -224
  80. package/es/components/quick-search/src/index.vue.d.ts +54 -224
  81. package/es/components/quick-search/src/index.vue.js +1 -1
  82. package/es/components/quick-search/style/index.css +1 -1
  83. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
  84. package/es/components/select-person/index.d.ts +13 -0
  85. package/es/components/select-person/src/SelectPerson.vue.d.ts +13 -0
  86. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  87. package/es/components/select-person/src/utils/index.d.ts +1 -1
  88. package/es/components/select-person/src/utils/index.js +1 -1
  89. package/es/components/shortcut-setter/index.d.ts +15 -0
  90. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
  91. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
  92. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
  93. package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +109 -0
  94. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -0
  95. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.d.ts +67 -0
  96. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -0
  97. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +27 -7
  98. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  99. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -2
  100. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  101. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +13 -3
  102. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  103. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +134 -15
  104. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  105. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
  106. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  107. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  108. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  109. package/es/components/table-filter/src/types/enums.js +1 -1
  110. package/es/components/table-filter/src/types/index.d.ts +26 -87
  111. package/es/shared/hooks/useDateTime.js +1 -1
  112. package/es/shared/package.json.js +1 -1
  113. package/es/shared/types/business.d.ts +16 -0
  114. package/es/shared/types/business.js +1 -0
  115. package/es/shared/types/index.d.ts +1 -1
  116. package/es/shared/utils/business.d.ts +11 -0
  117. package/es/shared/utils/business.js +1 -0
  118. package/es/shared/utils/index.d.ts +1 -5
  119. package/es/shared/utils/index.js +1 -1
  120. package/package.json +65 -65
  121. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.d.ts +0 -11
  122. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.js +0 -1
@@ -30,7 +30,6 @@ declare const _default: import("vue").DefineComponent<{
30
30
  outQuickSearchFn: {
31
31
  handlerInitSearchItem(arr: ISearchType[]): void;
32
32
  };
33
- getDefValByRenderWidget: (cfg: ISearchType) => any;
34
33
  getRenderSearchConObj: (cfg: ISearchType) => {
35
34
  field_key: string;
36
35
  con: string | undefined;
@@ -46,15 +45,19 @@ declare const _default: import("vue").DefineComponent<{
46
45
  setting: string;
47
46
  widgetCfg: {
48
47
  isRender: boolean;
48
+ isInit: boolean;
49
49
  widgetType: string | null;
50
50
  valueList: {
51
51
  value: any;
52
- label: string;
52
+ label: any;
53
53
  }[] | undefined;
54
54
  defaultValue: any;
55
55
  defValueUnit: any;
56
56
  multiple: boolean;
57
+ manualMapping: boolean | null | undefined;
58
+ dynamicOptionInfo: import("../../../../es/components/table-filter/src/types").dynamicOptionInfoType | {} | undefined;
57
59
  };
60
+ rangeFilter: boolean | undefined;
58
61
  title: string;
59
62
  alias: string | undefined;
60
63
  isShowSearch: number;
@@ -62,7 +65,7 @@ declare const _default: import("vue").DefineComponent<{
62
65
  explicitRequired: number;
63
66
  advanceOptionSetting: string;
64
67
  placeholder: string | undefined;
65
- advanceColWidth: string;
68
+ advanceColWidth: number | null | undefined;
66
69
  }[];
67
70
  getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
68
71
  transformParams: (paramsList: any) => {};
@@ -94,120 +97,28 @@ declare const _default: import("vue").DefineComponent<{
94
97
  }>;
95
98
  showInner: import("vue").Ref<boolean>;
96
99
  quickSearch: import("vue").Ref<{
100
+ isShowSearch?: number | undefined;
101
+ filterExplicit?: number | undefined;
102
+ explicitRequired?: number | undefined;
103
+ advanceOptionSetting?: string | undefined;
104
+ explicitDefaultVal?: string | undefined;
105
+ advanceColWidth?: string | undefined;
106
+ fieldType?: string | undefined;
97
107
  columnName: string;
98
108
  title: string;
99
- fieldType?: string | undefined;
100
- filterExplicit?: number | undefined;
101
- isShowSearch?: number | undefined;
102
- setting?: any;
103
- settingObj?: any;
104
109
  placeholder?: string | undefined;
105
- AGEAttr?: boolean | undefined;
106
- CL?: string | undefined;
107
- CONVERT?: any;
108
- EVALUATEAttr?: boolean | undefined;
109
- EQ?: string | undefined;
110
- LABELAttr?: boolean | undefined;
111
- _isBlock?: boolean | undefined;
110
+ settingObj?: any;
111
+ setting?: any;
112
+ widgetCfg?: any;
113
+ rangeFilter?: boolean | undefined;
112
114
  _frontId?: any;
113
- NUMBERFiled?: boolean | undefined;
114
- PASSWORDTYPE?: boolean | undefined;
115
- advanceColWidth?: string | undefined;
116
- advanceOptionSetting?: string | undefined;
117
- alias?: string | undefined;
118
- ageObj?: any;
119
- attr?: string | undefined;
120
- bigValue?: string | number | undefined;
121
- classify?: string | undefined;
122
- colWidth?: number | undefined;
123
- columnFullName?: string | undefined;
124
- com?: string | undefined;
125
- comType?: string | undefined;
126
- comAttr?: string | undefined;
127
- con?: string | undefined;
128
- dataSource?: any;
129
- dictionarieObj?: any;
130
- explicitRequired?: number | undefined;
131
- explicitDefaultVal?: string | undefined;
132
- extraField?: boolean | undefined;
133
- fieldSetting?: string | undefined;
134
- format?: string | undefined;
135
- i18n?: string | undefined;
136
- id?: string | undefined;
137
- inputVal?: string | undefined;
138
- inputUnit?: string | undefined;
139
- isAvg?: number | undefined;
140
- isEdit?: number | undefined;
141
- isFixed?: number | undefined;
142
- isFixedShow?: number | undefined;
143
- isFontWeight?: number | undefined;
144
- isMerge?: number | undefined;
145
- isOrder?: number | undefined;
146
- isPreciseSearch?: boolean | undefined;
147
115
  isRender?: boolean | undefined;
148
- isSearch?: number | undefined;
149
- isShow?: number | undefined;
150
- isSort?: number | undefined;
151
- isSum?: number | undefined;
152
- labelObj?: any;
153
- labelList?: {
154
- labelId?: string | undefined;
155
- change_text: string;
156
- field_key: string;
157
- filter: {
158
- con: string;
159
- conName?: string | undefined;
160
- field_key: string;
161
- key?: string | undefined;
162
- value: string;
163
- }[];
164
- label: string;
165
- labelName: string;
166
- sqlExpression: string;
167
- value: string;
168
- isSelect?: boolean | undefined;
169
- }[] | undefined;
170
- labelSelectList?: {
171
- labelId?: string | undefined;
172
- change_text: string;
173
- field_key: string;
174
- filter: {
175
- con: string;
176
- conName?: string | undefined;
177
- field_key: string;
178
- key?: string | undefined;
179
- value: string;
180
- }[];
181
- label: string;
182
- labelName: string;
183
- sqlExpression: string;
184
- value: string;
185
- isSelect?: boolean | undefined;
186
- }[] | undefined;
187
- lessValue?: string | number | undefined;
188
- marginx?: string | undefined;
189
- notParticipatingSearch?: number | undefined;
190
- order?: string | undefined;
191
- QUOTE?: any;
192
- searchPageConfig?: any;
193
- selecteds?: any;
194
- sequence?: number | undefined;
195
- showDate?: boolean | undefined;
196
- showFormat?: string | undefined;
197
- showTime?: boolean | undefined;
198
- sid?: string | undefined;
199
- start_val?: number | null | undefined;
200
- end_val?: number | null | undefined;
201
- tempCon?: any;
202
- tableId?: string | undefined;
203
- value?: any;
204
- unit?: string | undefined;
205
- widgetCfg?: any;
206
- formTitle?: string | undefined;
207
- random_key?: string | undefined;
208
116
  widgetType?: any;
209
- hasFieldList?: any;
210
- search_DefaultValue?: any;
117
+ con?: string | undefined;
118
+ _isBlock?: boolean | undefined;
119
+ value?: any;
120
+ sid?: string | undefined;
121
+ alias?: string | undefined;
211
122
  }[]>;
212
123
  parentNames: import("vue").Ref<{
213
124
  disabled: boolean;
@@ -221,120 +132,28 @@ declare const _default: import("vue").DefineComponent<{
221
132
  handleName: import("vue").ComputedRef<(item: ISearchType, key?: string) => any>;
222
133
  init: () => void;
223
134
  onFilterSearch: () => {
135
+ isShowSearch?: number | undefined;
136
+ filterExplicit?: number | undefined;
137
+ explicitRequired?: number | undefined;
138
+ advanceOptionSetting?: string | undefined;
139
+ explicitDefaultVal?: string | undefined;
140
+ advanceColWidth?: string | undefined;
141
+ fieldType?: string | undefined;
224
142
  columnName: string;
225
143
  title: string;
226
- fieldType?: string | undefined;
227
- filterExplicit?: number | undefined;
228
- isShowSearch?: number | undefined;
229
- setting?: any;
230
- settingObj?: any;
231
144
  placeholder?: string | undefined;
232
- AGEAttr?: boolean | undefined;
233
- CL?: string | undefined;
234
- CONVERT?: any;
235
- EVALUATEAttr?: boolean | undefined;
236
- EQ?: string | undefined;
237
- LABELAttr?: boolean | undefined;
238
- _isBlock?: boolean | undefined;
145
+ settingObj?: any;
146
+ setting?: any;
147
+ widgetCfg?: any;
148
+ rangeFilter?: boolean | undefined;
239
149
  _frontId?: any;
240
- NUMBERFiled?: boolean | undefined;
241
- PASSWORDTYPE?: boolean | undefined;
242
- advanceColWidth?: string | undefined;
243
- advanceOptionSetting?: string | undefined;
244
- alias?: string | undefined;
245
- ageObj?: any;
246
- attr?: string | undefined;
247
- bigValue?: string | number | undefined;
248
- classify?: string | undefined;
249
- colWidth?: number | undefined;
250
- columnFullName?: string | undefined;
251
- com?: string | undefined;
252
- comType?: string | undefined;
253
- comAttr?: string | undefined;
254
- con?: string | undefined;
255
- dataSource?: any;
256
- dictionarieObj?: any;
257
- explicitRequired?: number | undefined;
258
- explicitDefaultVal?: string | undefined;
259
- extraField?: boolean | undefined;
260
- fieldSetting?: string | undefined;
261
- format?: string | undefined;
262
- i18n?: string | undefined;
263
- id?: string | undefined;
264
- inputVal?: string | undefined;
265
- inputUnit?: string | undefined;
266
- isAvg?: number | undefined;
267
- isEdit?: number | undefined;
268
- isFixed?: number | undefined;
269
- isFixedShow?: number | undefined;
270
- isFontWeight?: number | undefined;
271
- isMerge?: number | undefined;
272
- isOrder?: number | undefined;
273
- isPreciseSearch?: boolean | undefined;
274
150
  isRender?: boolean | undefined;
275
- isSearch?: number | undefined;
276
- isShow?: number | undefined;
277
- isSort?: number | undefined;
278
- isSum?: number | undefined;
279
- labelObj?: any;
280
- labelList?: {
281
- labelId?: string | undefined;
282
- change_text: string;
283
- field_key: string;
284
- filter: {
285
- con: string;
286
- conName?: string | undefined;
287
- field_key: string;
288
- key?: string | undefined;
289
- value: string;
290
- }[];
291
- label: string;
292
- labelName: string;
293
- sqlExpression: string;
294
- value: string;
295
- isSelect?: boolean | undefined;
296
- }[] | undefined;
297
- labelSelectList?: {
298
- labelId?: string | undefined;
299
- change_text: string;
300
- field_key: string;
301
- filter: {
302
- con: string;
303
- conName?: string | undefined;
304
- field_key: string;
305
- key?: string | undefined;
306
- value: string;
307
- }[];
308
- label: string;
309
- labelName: string;
310
- sqlExpression: string;
311
- value: string;
312
- isSelect?: boolean | undefined;
313
- }[] | undefined;
314
- lessValue?: string | number | undefined;
315
- marginx?: string | undefined;
316
- notParticipatingSearch?: number | undefined;
317
- order?: string | undefined;
318
- QUOTE?: any;
319
- searchPageConfig?: any;
320
- selecteds?: any;
321
- sequence?: number | undefined;
322
- showDate?: boolean | undefined;
323
- showFormat?: string | undefined;
324
- showTime?: boolean | undefined;
325
- sid?: string | undefined;
326
- start_val?: number | null | undefined;
327
- end_val?: number | null | undefined;
328
- tempCon?: any;
329
- tableId?: string | undefined;
330
- value?: any;
331
- unit?: string | undefined;
332
- widgetCfg?: any;
333
- formTitle?: string | undefined;
334
- random_key?: string | undefined;
335
151
  widgetType?: any;
336
- hasFieldList?: any;
337
- search_DefaultValue?: any;
152
+ con?: string | undefined;
153
+ _isBlock?: boolean | undefined;
154
+ value?: any;
155
+ sid?: string | undefined;
156
+ alias?: string | undefined;
338
157
  }[];
339
158
  getMergeConObj: () => ISearchParamsType[];
340
159
  getConObjParams: () => ISearchParamsType[];
@@ -345,8 +164,8 @@ declare const _default: import("vue").DefineComponent<{
345
164
  hanldeBlur: () => void;
346
165
  editParentName: (e: Event, item: IParentNamesType) => void;
347
166
  handleParentNameSelect: (item: IParentNamesType, index: number) => void;
348
- handleParentNamesRemove: (index: number, item: IParentNamesType) => void;
349
- handleParent: (index: number, item: IParentNamesType) => void;
167
+ handleParentNamesRemove: (index: number) => void;
168
+ handleParent: (index: number) => void;
350
169
  saveTableCondiTion: (params: ISaveType) => Promise<void>;
351
170
  cancelSaveToCalss: () => void;
352
171
  clearData: () => void;
@@ -653,6 +472,7 @@ declare const _default: import("vue").DefineComponent<{
653
472
  NIcon: any;
654
473
  NInput: any;
655
474
  NButton: any;
475
+ NPopover: any;
656
476
  CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
657
477
  AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
658
478
  RenderWidget: import("vue").DefineComponent<{
@@ -663,19 +483,25 @@ declare const _default: import("vue").DefineComponent<{
663
483
  modelValue: {
664
484
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
665
485
  };
486
+ filterApiConfig: {
487
+ type: ObjectConstructor;
488
+ };
666
489
  }, any, {
667
490
  initialProps: {};
668
491
  }, {
669
492
  valueCp(): any;
670
493
  }, {
671
494
  search(): void;
672
- getEleWidth(cfg: any): string | undefined;
495
+ getEleWidth(cfg: any): {
496
+ width: string;
497
+ } | undefined;
673
498
  initComponentProps(cfg: any): void;
674
499
  generateWidget(cfg: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
675
500
  [key: string]: any;
676
501
  }> | null;
677
- handleUpdate(val: any, widgetType: any, defValueUnit: any): void;
678
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange")[], "update:modelValue" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
502
+ handleUpdate(val: any): void;
503
+ handleChangeInitState(_frontId: any, bool: any): void;
504
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange" | "changeInit")[], "update:modelValue" | "outFilterChange" | "changeInit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
679
505
  cfg: {
680
506
  type: ObjectConstructor;
681
507
  required: true;
@@ -683,9 +509,13 @@ declare const _default: import("vue").DefineComponent<{
683
509
  modelValue: {
684
510
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
685
511
  };
512
+ filterApiConfig: {
513
+ type: ObjectConstructor;
514
+ };
686
515
  }>> & {
687
516
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
688
517
  onOutFilterChange?: ((...args: any[]) => any) | undefined;
518
+ onChangeInit?: ((...args: any[]) => any) | undefined;
689
519
  }, {}>;
690
520
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onFilterSearch" | "getFilterParam" | "clearQuickSearchConfig")[], "onFilterSearch" | "getFilterParam" | "clearQuickSearchConfig", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
691
521
  searchFieldList: {
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as a,watch as t,onMounted as i,openBlock as n,createElementBlock as o,createElementVNode as s,Fragment as r,renderList as u,unref as c,normalizeClass as d,createCommentVNode as v,toDisplayString as f,createBlock as m,createVNode as p,withCtx as h,createTextVNode as g,withDirectives as k,vShow as b,isRef as y}from"vue";import{useMessage as C,NModal as S,NCard as _,NIcon as x,NButton as q,NForm as A,NFormItem as w,NInput as F}from"naive-ui";import{CloseOutline as j,AddOutline as I}from"@vicons/ionicons5";import R from"../../table-filter/src/hooks/useMixins.js";import V from"../../table-filter/src/hooks/useRenderWidget.js";import D from"../../table-filter/src/hooks/useAdvanced.js";import E from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as L}from"lodash-es";import U from"../../../_virtual/plugin-vue_export-helper.js";const z={class:"quick-search-block quick-search-table"},B={class:"quick-row"},T={class:"quick-item-title"},N={class:"quick-item-col"},O={class:"svg-wrap"},P={class:"flex_right"},Q={class:"class-filter-content"},W={class:"quickSearch-content"},M=s("span",{class:"label"},"父类名称:",-1),G=["onDblclick","onClick"],J={key:0,class:"s-content"};var H=U(e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:U,emit:H}){const K=e,X={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},Y=C(),{handleGetConfigApi:Z,outQuickSearchFn:$}=R(),{getDefValByRenderWidget:ee,getRenderSearchConObj:le,resetRenderWidgetValue:ae,isRender:te}=V(),{transformData:ie,getCacheDef:ne,transformParams:oe}=D(),se=l(null),re=l({classname:""});let ue=l(!1),ce=l([]),de=l([]),ve=l(!1),fe=l(""),me=a((()=>!!de.value.length&&de.value.some((e=>e.isAdd)))),pe=a((()=>(e,l="name")=>e.alias||e[l]));function he(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=le(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ce.value)||[]}function ge(){var e;null==(e=se.value)||e.validate((e=>{var l;if(e)return;let a=he();a.length||(a=[]);let t=null==(l=de.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await Z(e,"requestSaveTableCondiTion",{},K.filterApiConfig))return;ue.value=!1,null==(l=se.value)||l.restoreValidation(),re.value.classname="",de.value=[],Se()}catch(e){console.log(e)}}({tableId:K.tableId||"",setting:JSON.stringify({displayCategory:t,name:re.value.classname,conObj:a}),conditionList:"[]"})}))}function ke(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),ve.value=!0}function be(){ve.value=!1,fe.value&&(de.value.forEach((e=>e.selected=!1)),de.value.push({disabled:!0,value:fe.value,selected:!0,isAdd:!0}),fe.value="")}function ye(e,l){!function(e,l){de.value.splice(e,1)}(e)}function Ce(){ue.value=!1}function Se(){_e(ce.value),H("clearQuickSearchConfig")}function _e(e){Array.isArray(e)&&(e.forEach((e=>{ae(e)})),$.handlerInitSearchItem(ce.value))}return t((()=>K.searchFieldList),(e=>{e&&e.length>0&&function(){let e=L(ie(K.searchFieldList)).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ce.value=e||[],$.handlerInitSearchItem(ce.value)}()}),{immediate:!0,deep:!0}),t((()=>ce),(()=>{const e=he()||[],l=oe(e);H("getFilterParam",e,l)}),{deep:!0}),i((()=>{const e=K.quickSearchConfig;if(e&&e.length>0)return l=e,void ce.value.forEach(((e,a)=>{var t;if(te(e)){const a=l.find((l=>l.field_key===e.columnName));a&&(null==(t=a.value)?void 0:t.length)>0&&(e.value=ne(e,a.value))}}));var l;_e(ce.value)})),U({openSaveToCalss:function(){let e=he();e&&(e.length>0?ue.value=!0:Y.warning("请设置搜索条件"))},clearData:Se,onFilterSearch:function(){let e=he()||[];const l=oe(e);return H("onFilterSearch",e,l,!1),ce.value}}),(e,l)=>(n(),o("div",null,[s("div",z,[(n(!0),o(r,null,u(c(ce),(e=>(n(),o("div",{class:d(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[s("div",B,[v(" title "),s("div",T,[s("span",null,f(c(pe)(e,"title"))+"  ",1)]),v(" content "),s("div",N,[v(" 直接渲染组件 "),e.isRender?(n(),m(E,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l},null,8,["cfg","modelValue","onUpdate:modelValue"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),p(c(S),{show:c(ue),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:ge,onNegativeClick:Ce,class:"classification-modal-block"},{default:h((()=>[p(c(_),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":h((()=>[s("div",O,[p(c(x),{component:c(j),size:"24",onClick:Ce},null,8,["component"])])])),footer:h((()=>[s("div",P,[p(c(q),{onClick:Ce},{default:h((()=>[g("取消")])),_:1}),p(c(q),{type:"info",onClick:ge},{default:h((()=>[g("确认")])),_:1})])])),default:h((()=>[s("div",Q,[p(c(A),{ref_key:"formRef",ref:se,"label-placement":"left",rules:X,model:re.value},{default:h((()=>[p(c(w),{label:"筛选集名称",path:"classname"},{default:h((()=>[p(c(F),{value:re.value.classname,"onUpdate:value":l[0]||(l[0]=e=>re.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),s("div",W,[M,(n(!0),o(r,null,u(c(de),((e,l)=>(n(),o("div",{class:d(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:a=>function(e,l){e.disabled&&(de.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(n(),o("div",J,[s("span",null,f(e.value),1)])):(n(),m(c(F),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),p(c(x),{component:c(j),class:"anticon-close",size:"20",onClick:e=>ye(l)},null,8,["component","onClick"])],42,G)))),128)),c(me)?v("v-if",!0):(n(),o(r,{key:0},[k(p(c(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:ke},{default:h((()=>[p(c(x),{component:c(I),size:"20"},null,8,["component"]),g("添加分类 ")])),_:1},512),[[b,!c(ve)]]),k(p(c(F),{style:{width:"100px"},class:"edit-tag",value:c(fe),"onUpdate:value":l[1]||(l[1]=e=>y(fe)?fe.value=e:fe=e),valueModifiers:{trim:!0},onBlur:be,maxLength:10},null,8,["value"]),[[b,c(ve)]])],64))])])])),_:1})])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{H as default};
1
+ import{defineComponent as e,ref as l,computed as a,watch as t,onMounted as i,openBlock as n,createElementBlock as o,createElementVNode as r,Fragment as s,renderList as u,unref as c,normalizeClass as d,createCommentVNode as v,createVNode as f,withCtx as m,createTextVNode as p,toDisplayString as h,createBlock as g,withDirectives as k,vShow as b,isRef as y}from"vue";import{useMessage as C,NPopover as _,NModal as S,NCard as x,NIcon as A,NButton as q,NForm as w,NFormItem as F,NInput as j}from"naive-ui";import{CloseOutline as I,AddOutline as E}from"@vicons/ionicons5";import L from"../../table-filter/src/hooks/useMixins.js";import R from"../../table-filter/src/hooks/useRenderWidget.js";import U from"../../table-filter/src/hooks/useAdvanced.js";import V from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as z}from"lodash-es";import D from"../../../_virtual/plugin-vue_export-helper.js";const T={class:"quick-search-block quick-search-table"},B={class:"quick-row"},N={class:"quick-item-title"},O={class:"quick-item-col"},P={class:"svg-wrap"},Q={class:"flex_right"},M={class:"class-filter-content"},W={class:"quickSearch-content"},G=r("span",{class:"label"},"父类名称:",-1),J=["onDblclick","onClick"],H={key:0,class:"s-content"};var K=D(e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:D,emit:K}){const X=e,Y={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},Z=C(),{handleGetConfigApi:$,outQuickSearchFn:ee}=L(),{getRenderSearchConObj:le,resetRenderWidgetValue:ae,isRender:te}=R(),{transformData:ie,getCacheDef:ne,transformParams:oe}=U(),re=l(null),se=l({classname:""});let ue=l(!1),ce=l([]),de=l([]),ve=l(!1),fe=l(""),me=a((()=>!!de.value.length&&de.value.some((e=>e.isAdd)))),pe=a((()=>(e,l="name")=>e.alias||e[l]));function he(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=le(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ce.value)||[]}function ge(){var e;null==(e=re.value)||e.validate((e=>{var l;if(e)return;let a=he();a.length||(a=[]);let t=null==(l=de.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await $(e,"requestSaveTableCondiTion",{},X.filterApiConfig))return;ue.value=!1,null==(l=re.value)||l.restoreValidation(),se.value.classname="",de.value=[],_e()}catch(e){console.log(e)}}({tableId:X.tableId||"",setting:JSON.stringify({displayCategory:t,name:se.value.classname,conObj:a}),conditionList:"[]"})}))}function ke(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),ve.value=!0}function be(){ve.value=!1,fe.value&&(de.value.forEach((e=>e.selected=!1)),de.value.push({disabled:!0,value:fe.value,selected:!0,isAdd:!0}),fe.value="")}function ye(e){!function(e){de.value.splice(e,1)}(e)}function Ce(){ue.value=!1}function _e(){Se(ce.value),K("clearQuickSearchConfig")}function Se(e){Array.isArray(e)&&(e.forEach((e=>{ae(e)})),ee.handlerInitSearchItem(ce.value))}return t((()=>X.searchFieldList),(e=>{e&&e.length>0&&function(){let e=z(ie(X.searchFieldList)).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ce.value=e||[],ee.handlerInitSearchItem(ce.value)}()}),{immediate:!0,deep:!0}),t((()=>ce),(()=>{const e=he()||[],l=oe(e);K("getFilterParam",e,l)}),{deep:!0}),i((()=>{const e=X.quickSearchConfig;if(e&&e.length>0)return l=e,void ce.value.forEach((e=>{var a;if(te(e)){const t=l.find((l=>l.field_key===e.columnName));t&&(null==(a=t.value)?void 0:a.length)>0&&(e.value=ne(e,t.value))}}));var l;Se(ce.value)})),D({openSaveToCalss:function(){let e=he();e&&(e.length>0?ue.value=!0:Z.warning("请设置搜索条件"))},clearData:_e,onFilterSearch:function(){let e=he()||[];const l=oe(e);return K("onFilterSearch",e,l,!1),ce.value}}),(l,a)=>(n(),o("div",null,[r("div",T,[(n(!0),o(s,null,u(c(ce),(l=>(n(),o("div",{class:d(["quick-item",{"quick-block":l._isBlock}]),key:l.sid||l.columnName},[r("div",B,[v(" title "),r("div",N,[f(c(_),{trigger:"hover"},{trigger:m((()=>[p(h(c(pe)(l,"title")),1)])),default:m((()=>[r("span",null,h(c(pe)(l,"title")),1)])),_:2},1024)]),v(" content "),r("div",O,[v(" 直接渲染组件 "),l.isRender?(n(),g(V,{key:0,cfg:l,modelValue:l.value,filterApiConfig:e.filterApiConfig,"onUpdate:modelValue":e=>l.value=e},null,8,["cfg","modelValue","filterApiConfig","onUpdate:modelValue"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),f(c(S),{show:c(ue),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:ge,onNegativeClick:Ce,class:"classification-modal-block"},{default:m((()=>[f(c(x),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":m((()=>[r("div",P,[f(c(A),{component:c(I),size:"24",onClick:Ce},null,8,["component"])])])),footer:m((()=>[r("div",Q,[f(c(q),{onClick:Ce},{default:m((()=>[p("取消")])),_:1}),f(c(q),{type:"info",onClick:ge},{default:m((()=>[p("确认")])),_:1})])])),default:m((()=>[r("div",M,[f(c(w),{ref_key:"formRef",ref:re,"label-placement":"left",rules:Y,model:se.value},{default:m((()=>[f(c(F),{label:"筛选集名称",path:"classname"},{default:m((()=>[f(c(j),{value:se.value.classname,"onUpdate:value":a[0]||(a[0]=e=>se.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),r("div",W,[G,(n(!0),o(s,null,u(c(de),((e,l)=>(n(),o("div",{class:d(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:a=>function(e,l){e.disabled&&(de.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(n(),o("div",H,[r("span",null,h(e.value),1)])):(n(),g(c(j),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),f(c(A),{component:c(I),class:"anticon-close",size:"20",onClick:e=>ye(l)},null,8,["component","onClick"])],42,J)))),128)),c(me)?v("v-if",!0):(n(),o(s,{key:0},[k(f(c(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:ke},{default:m((()=>[f(c(A),{component:c(E),size:"20"},null,8,["component"]),p("添加分类 ")])),_:1},512),[[b,!c(ve)]]),k(f(c(j),{style:{width:"100px"},class:"edit-tag",value:c(fe),"onUpdate:value":a[1]||(a[1]=e=>y(fe)?fe.value=e:fe=e),valueModifiers:{trim:!0},onBlur:be,maxLength:10},null,8,["value"]),[[b,c(ve)]])],64))])])])),_:1})])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{K as default};
@@ -1 +1 @@
1
- .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px}.quick-search-block .quick-item .quick-row{align-items:center;display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{line-height:32px;min-width:80px;padding-left:12px;text-align:right}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 12px}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block}
1
+ .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .n-input-number{width:136px}.render-widget-input-number-group .divider{text-align:center;width:26px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px}.quick-search-block .quick-item .quick-row{align-items:center;display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{flex-basis:88px;line-height:32px;overflow:hidden;padding-left:8px;text-align:right;text-overflow:ellipsis;white-space:nowrap;width:88px}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 12px}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block}
@@ -496,7 +496,7 @@ export declare const componentMap: {
496
496
  form: Record<string, any>;
497
497
  locationProp: string;
498
498
  }>>;
499
- LABEL: import("vue").ShallowRef<import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
499
+ LABEL: import("vue").ShallowRef<import("../../..").SFCWithInstall<import("vue").DefineComponent<{
500
500
  selectedList: {
501
501
  type: import("vue").PropType<any[]>;
502
502
  default: () => never[];
@@ -49,6 +49,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
49
49
  type: BooleanConstructor;
50
50
  default: boolean;
51
51
  };
52
+ searchInner: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
52
56
  treeSetting: {
53
57
  type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
54
58
  [k: string]: unknown;
@@ -114,6 +118,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
114
118
  type: BooleanConstructor;
115
119
  default: boolean;
116
120
  };
121
+ searchInner: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
117
125
  treeSetting: {
118
126
  type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
119
127
  [k: string]: unknown;
@@ -463,6 +471,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
463
471
  type: BooleanConstructor;
464
472
  default: boolean;
465
473
  };
474
+ searchInner: {
475
+ type: BooleanConstructor;
476
+ default: boolean;
477
+ };
466
478
  treeSetting: {
467
479
  type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
468
480
  [k: string]: unknown;
@@ -503,6 +515,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
503
515
  showCount: boolean;
504
516
  showClear: boolean;
505
517
  multiple: boolean;
518
+ searchInner: boolean;
506
519
  treeSetting: import("naive-ui/es/tree/src/interface").TreeOptionBase & {
507
520
  [k: string]: unknown;
508
521
  } & import("../../../es/shared/types").AnyObject;
@@ -54,6 +54,10 @@ declare const _default: import("vue").DefineComponent<{
54
54
  type: BooleanConstructor;
55
55
  default: boolean;
56
56
  };
57
+ searchInner: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
57
61
  treeSetting: {
58
62
  type: PropType<ITreeOption>;
59
63
  default: () => {};
@@ -104,6 +108,10 @@ declare const _default: import("vue").DefineComponent<{
104
108
  type: BooleanConstructor;
105
109
  default: boolean;
106
110
  };
111
+ searchInner: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
107
115
  treeSetting: {
108
116
  type: PropType<ITreeOption>;
109
117
  default: () => {};
@@ -426,6 +434,10 @@ declare const _default: import("vue").DefineComponent<{
426
434
  type: BooleanConstructor;
427
435
  default: boolean;
428
436
  };
437
+ searchInner: {
438
+ type: BooleanConstructor;
439
+ default: boolean;
440
+ };
429
441
  treeSetting: {
430
442
  type: PropType<ITreeOption>;
431
443
  default: () => {};
@@ -451,6 +463,7 @@ declare const _default: import("vue").DefineComponent<{
451
463
  showCount: boolean;
452
464
  showClear: boolean;
453
465
  multiple: boolean;
466
+ searchInner: boolean;
454
467
  treeSetting: ITreeOption;
455
468
  queryLoadChildData: (node: TreeOption) => Promise<AnyObject>;
456
469
  queryTreeSearch: (keyWork: string) => Promise<Array<AnyObject>>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as u,unref as i,withCtx as o,createVNode as r,withKeys as c,createTextVNode as d,toDisplayString as s,withDirectives as v,vShow as h,createCommentVNode as p,mergeProps as f,createElementBlock as y,createElementVNode as k,Fragment as m,renderList as g}from"vue";import{NGrid as b,NGi as _,NSpace as w,NInputGroup as C,NInput as x,NButton as L,NCheckbox as S,NTree as j,NIcon as T,NTooltip as N}from"naive-ui";import{CloseCircleSharp as $}from"@vicons/ionicons5";import{filterTree as I,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as q}from"lodash-es";import B from"./SearchMultiple.vue.js";const K={key:0},P={class:"c-select-person__scroll",style:{height:"342px"}};var U=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{emit:U}){const E=e,O=l(""),A=l(!1),F=l([]),W=l([]),M=l([]),R=l([]),z=l([]),G=l(!1),H=q(((J=E.data).forEach((e=>{var l;if(null==(l=e.children)?void 0:l.length){const l=ne(e.children,[]);e.innerItemsNum=l.length}})),ue(J,"")));var J;let Q=[];const V=t((()=>!!E.queryLoadChildData)),X=t((()=>{var e,l;return null!=(l=null==(e=null==E?void 0:E.treeSetting)?void 0:e.checkStrategy)?l:"child"}));function Y(e){e.disabled||e.children||!e.key||Q.push(e.key)}function Z(e){e.disabled||e.tempTitle||!e.key||Q.push(e.key)}async function ee(e){if(E.queryLoadChildData){const l=await E.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function le(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function te({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||V.value&&!(null==e?void 0:e.isLeaf)){const l=E.wordbook.user_count_obj&&e[E.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return r("span",null,[`${e.title}${t}`])}return r(N,{trigger:"hover"},{default:()=>r("span",null,[e.title]),trigger:()=>r("span",null,[e.title])})}function ae(e){return e[E.wordbookChild.user_name_obj]||e[E.wordbook.parent_name_obj]||e.orgName||e.title||""}function ne(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?ne(e.children,l):l.push(e)})),l}function ue(e,l){return e&&0!==e.length?e.map((e=>{var t;const a=ae(e),n=l?`${a}/${l}`:a;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?ue(null==e?void 0:e.children,n):[]}})):[]}async function ie(){G.value=!!O.value.trim(),V.value?M.value=await E.queryTreeSearch(O.value):M.value=I(H,O.value),W.value=M.value.length&&O.value?D(M.value):[]}function oe(){setTimeout((()=>{ie()}))}function re(e,l){var t,a;switch(null!=(a=null==(t=null==E?void 0:E.treeSetting)?void 0:t.checkStrategy)?a:"child"){case"child":!function(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}a.children&&re(a.children,l)}}(e,l);break;case"parent":!function(e,l){F.value=[];for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&!a.tempTitle&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}}}(e,l)}}function ce(e){re(M.value,e)}function de(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t],n=z.value.map((e=>e.key));F.value.includes(a.key)&&!n.includes(a.key)&&R.value.push({key:a.key,name:a.title,parentName:a.tempTitle,innerItemsNum:a.innerItemsNum}),(null==(l=a.children)?void 0:l.length)&&de(a.children)}}function se(e){F.value=e}function ve(){F.value=[]}function he(e){F.value=e}return function e(l,t){var a,n,u,i;for(let o=0,r=l.length;o<r;o++){const r=l[o];switch(r.title=ae(r),r.parentNode=t,r.key||(r.key=r[E.wordbookChild.user_id_obj]||r[E.wordbook.parent_id_obj]||Date.now()),(null==(a=r.children)?void 0:a.length)?(e(r.children,r),le(r)):0===(null==(n=r.children)?void 0:n.length)&&Reflect.deleteProperty(r,"children"),null!=(i=null==(u=null==E?void 0:E.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":Y(r);break;case"parent":Z(r)}}}(H,null),M.value=H,E.defaultList.length>0&&(V.value?(E.defaultList.forEach((e=>F.value.push(e.key))),R.value=q(E.defaultList),z.value=q(E.defaultList)):(E.defaultList.forEach((e=>F.value.push(e))),de(H))),a((()=>F),(e=>{R.value=z.value.filter((l=>e.value.includes(l.key))),e.value.length&&de(V.value?M.value:H),A.value=Q.every((e=>R.value.findIndex((l=>l.key===e))>-1));const l=R.value.filter((l=>e.value.includes(l.key)));U("check",e.value),U("checkWithLevel",l)}),{deep:!0}),(l,t)=>(n(),u(i(b),{cols:2,class:"c-select-person"},{default:o((()=>[r(i(_),null,{default:o((()=>[r(i(w),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:o((()=>[r(i(C),{style:{"margin-bottom":"12px"}},{default:o((()=>[r(i(x),{clearable:"",value:O.value,"onUpdate:value":t[0]||(t[0]=e=>O.value=e),placeholder:e.searchPlaceholder,onClear:oe,onKeyup:c(ie,["enter"])},null,8,["value","placeholder","onKeyup"]),r(i(L),{type:"primary",onClick:ie},{default:o((()=>[d(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!G.value?v((n(),u(i(S),{key:0,checked:A.value,"onUpdate:checked":[t[1]||(t[1]=e=>A.value=e),ce]},{default:o((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[h,i(Q).length<1e3]]):p("v-if",!0),e.multiple&&G.value&&"parent"===i(X)?(n(),u(B,{key:1,treeData:M.value,checkedKeys:F.value,onNotifyCheck:he},null,8,["treeData","checkedKeys"])):(n(),u(i(j),f({key:2,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":F.value,"expanded-keys":W.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>W.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":F.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>F.value=e),data:M.value,"check-strategy":"child","render-label":te},e.treeSetting,{"onUpdate:checkedKeys":se,onLoad:ee}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),r(i(_),null,{default:o((()=>[r(i(w),{vertical:"",style:{"padding-left":"12px"}},{default:o((()=>[r(i(w),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:o((()=>[e.showCount?(n(),y("span",K,"已选择:"+s(R.value.length),1)):p("v-if",!0),e.showClear?(n(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:ve},"清空")):p("v-if",!0)])),_:1}),k("div",P,[(n(!0),y(m,null,g(R.value,(e=>(n(),y("span",{class:"c-select-person__tag-item",key:e.key},[d(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:e.innerItemsNum?`(${e.innerItemsNum})`:"")+" ",1),r(i(T),{class:"tag-close",component:i($),onClick:l=>function(e){F.value=F.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{U as default};
1
+ import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as u,unref as i,withCtx as r,createVNode as c,withKeys as o,createTextVNode as d,toDisplayString as s,withDirectives as h,vShow as v,createCommentVNode as p,mergeProps as f,createElementBlock as y,createElementVNode as k,Fragment as m,renderList as g}from"vue";import{NGrid as b,NGi as _,NSpace as w,NInputGroup as C,NInput as x,NButton as L,NCheckbox as S,NTree as j,NIcon as T,NTooltip as I}from"naive-ui";import{CloseCircleSharp as N}from"@vicons/ionicons5";import{filterTree as $,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as q}from"lodash-es";import B from"./SearchMultiple.vue.js";const K={key:0},P={class:"c-select-person__scroll",style:{height:"342px"}};var U=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{emit:U}){const E=e,O=l(""),A=l(!1),F=l([]),W=l([]),M=l([]),R=l([]),z=l([]),G=l(!1),H=q(((J=E.data).forEach((e=>{var l;if(null==(l=e.children)?void 0:l.length){const l=ne(e.children,[]);e.innerItemsNum=l.length}})),ue(J,"")));var J;let Q=[];const V=t((()=>!!E.queryLoadChildData)),X=t((()=>{var e,l;return null!=(l=null==(e=null==E?void 0:E.treeSetting)?void 0:e.checkStrategy)?l:"child"}));function Y(e){e.disabled||e.children||!e.key||Q.push(e.key)}function Z(e){e.disabled||e.tempTitle||!e.key||Q.push(e.key)}async function ee(e){if(E.queryLoadChildData){const l=await E.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function le(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function te({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||V.value&&!(null==e?void 0:e.isLeaf)){const l=E.wordbook.user_count_obj&&e[E.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}return c(I,{trigger:"hover"},{default:()=>c("span",null,[e.title]),trigger:()=>c("span",null,[e.title])})}function ae(e){return e[E.wordbookChild.user_name_obj]||e[E.wordbook.parent_name_obj]||e.orgName||e.title||""}function ne(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?ne(e.children,l):l.push(e)})),l}function ue(e,l){return e&&0!==e.length?e.map((e=>{var t;const a=ae(e),n=l?`${a}/${l}`:a;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?ue(null==e?void 0:e.children,n):[]}})):[]}async function ie(){G.value=!!O.value.trim(),V.value?M.value=await E.queryTreeSearch(O.value):M.value=$(E.searchInner,H,O.value),W.value=M.value.length&&O.value?D(M.value):[]}function re(){setTimeout((()=>{ie()}))}function ce(e,l){var t,a;switch(null!=(a=null==(t=null==E?void 0:E.treeSetting)?void 0:t.checkStrategy)?a:"child"){case"child":!function(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}a.children&&ce(a.children,l)}}(e,l);break;case"parent":!function(e,l){F.value=[];for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&!a.tempTitle&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}}}(e,l)}}function oe(e){ce(M.value,e)}function de(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t],n=z.value.map((e=>e.key));F.value.includes(a.key)&&!n.includes(a.key)&&R.value.push({key:a.key,name:a.title,parentName:a.tempTitle,innerItemsNum:a.innerItemsNum}),(null==(l=a.children)?void 0:l.length)&&de(a.children)}}function se(e){F.value=e}function he(){F.value=[]}function ve(e){F.value=e}return function e(l,t){var a,n,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];switch(c.title=ae(c),c.parentNode=t,c.key||(c.key=c[E.wordbookChild.user_id_obj]||c[E.wordbook.parent_id_obj]||Date.now()),(null==(a=c.children)?void 0:a.length)?(e(c.children,c),le(c)):0===(null==(n=c.children)?void 0:n.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==E?void 0:E.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":Y(c);break;case"parent":Z(c)}}}(H,null),M.value=H,E.defaultList.length>0&&(V.value?(E.defaultList.forEach((e=>F.value.push(e.key))),R.value=q(E.defaultList),z.value=q(E.defaultList)):(E.defaultList.forEach((e=>F.value.push(e))),de(H))),a((()=>F),(e=>{R.value=z.value.filter((l=>e.value.includes(l.key))),e.value.length&&de(V.value?M.value:H),A.value=Q.every((e=>R.value.findIndex((l=>l.key===e))>-1));const l=R.value.filter((l=>e.value.includes(l.key)));U("check",e.value),U("checkWithLevel",l)}),{deep:!0}),(l,t)=>(n(),u(i(b),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(_),null,{default:r((()=>[c(i(w),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(C),{style:{"margin-bottom":"12px"}},{default:r((()=>[c(i(x),{clearable:"",value:O.value,"onUpdate:value":t[0]||(t[0]=e=>O.value=e),placeholder:e.searchPlaceholder,onClear:re,onKeyup:o(ie,["enter"])},null,8,["value","placeholder","onKeyup"]),c(i(L),{type:"primary",onClick:ie},{default:r((()=>[d(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!G.value?h((n(),u(i(S),{key:0,checked:A.value,"onUpdate:checked":[t[1]||(t[1]=e=>A.value=e),oe]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[v,i(Q).length<1e3]]):p("v-if",!0),e.searchInner&&e.multiple&&G.value&&"parent"===i(X)?(n(),u(B,{key:1,treeData:M.value,checkedKeys:F.value,onNotifyCheck:ve},null,8,["treeData","checkedKeys"])):(n(),u(i(j),f({key:2,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":F.value,"expanded-keys":W.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>W.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":F.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>F.value=e),data:M.value,"check-strategy":"child","render-label":te},e.treeSetting,{"onUpdate:checkedKeys":se,onLoad:ee}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(_),null,{default:r((()=>[c(i(w),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(w),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(n(),y("span",K,"已选择:"+s(R.value.length),1)):p("v-if",!0),e.showClear?(n(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:he},"清空")):p("v-if",!0)])),_:1}),k("div",P,[(n(!0),y(m,null,g(R.value,(e=>(n(),y("span",{class:"c-select-person__tag-item",key:e.key},[d(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:e.innerItemsNum?`(${e.innerItemsNum})`:"")+" ",1),c(i(T),{class:"tag-close",component:i(N),onClick:l=>function(e){F.value=F.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{U as default};
@@ -1,3 +1,3 @@
1
1
  import { type TreeOption } from 'naive-ui';
2
- export declare function filterTree(data: TreeOption[], keyword: string): TreeOption[];
2
+ export declare function filterTree(isInner: boolean, data: TreeOption[], keyword: string): TreeOption[];
3
3
  export declare function getExpandedKeys(tree: TreeOption[]): (string | number)[];
@@ -1 +1 @@
1
- import{cloneDeep as n}from"lodash-es";function i(i,r){const c=n(i);return r.trim()?function(n,i){return e(n,[]).filter((n=>{var l;return null==(l=n.title)?void 0:l.includes(i.trim())}))}(c,r):(l(c,r),t(c))}function l(n,i){n.forEach((n=>{var e,t;if(n.visible=null==(e=n.title)?void 0:e.includes(i.trim()),null==(t=n.children)?void 0:t.length)if(l(n.children,i),n.visible)r(n.children);else{n.children.some((n=>n.visible))&&(n.visible=!0)}}))}function e(n,i){return n.forEach((n=>{var l;(null==(l=n.children)?void 0:l.length)?e(n.children,i):i.push(n)})),i}function r(n){n.forEach((n=>{var i;n.visible=!0,(null==(i=n.children)?void 0:i.length)&&r(n.children)}))}function t(n){return n.filter((n=>{var i;return!!n.visible&&((null==(i=n.children)?void 0:i.length)&&(n.children=t(n.children)),!0)}))}function c(n){const i=[];return function n(l){for(let e=0,r=l.length;e<r;e++){const r=l[e];r.children&&(i.push(r.key),n(r.children))}}(n),i}export{i as filterTree,c as getExpandedKeys};
1
+ import{cloneDeep as n}from"lodash-es";function i(i,r,c){const o=n(r);return i&&c.trim()?function(n,i){return e(n,[]).filter((n=>{var l;return null==(l=n.title)?void 0:l.includes(i.trim())}))}(o,c):(l(o,c),t(o))}function l(n,i){n.forEach((n=>{var e,t;if(n.visible=null==(e=n.title)?void 0:e.includes(i.trim()),null==(t=n.children)?void 0:t.length)if(l(n.children,i),n.visible)r(n.children);else{n.children.some((n=>n.visible))&&(n.visible=!0)}}))}function e(n,i){return n.forEach((n=>{var l;(null==(l=n.children)?void 0:l.length)?e(n.children,i):i.push(n)})),i}function r(n){n.forEach((n=>{var i;n.visible=!0,(null==(i=n.children)?void 0:i.length)&&r(n.children)}))}function t(n){return n.filter((n=>{var i;return!!n.visible&&((null==(i=n.children)?void 0:i.length)&&(n.children=t(n.children)),!0)}))}function c(n){const i=[];return function n(l){for(let e=0,r=l.length;e<r;e++){const r=l[e];r.children&&(i.push(r.key),n(r.children))}}(n),i}export{i as filterTree,c as getExpandedKeys};
@@ -142,6 +142,20 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
142
142
  remark?: string | undefined;
143
143
  free_entry?: import("..").FormCommonState | undefined;
144
144
  initialize_high?: number | undefined;
145
+ bindEventSetting?: {
146
+ [x: string]: unknown;
147
+ event_type: import("../../../es/shared/types").LOW_CODE_EVENT_TYPE;
148
+ event_field?: string | undefined;
149
+ params?: {
150
+ p_value?: string | undefined;
151
+ p_name: string;
152
+ p_select: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
153
+ }[] | undefined;
154
+ results?: {
155
+ p_value: string;
156
+ p_name: string;
157
+ }[] | undefined;
158
+ }[] | undefined;
145
159
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
146
160
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
147
161
  lazyRequest?: boolean | undefined;
@@ -2020,6 +2034,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2020
2034
  observeFormGraph: Record<string, import("@formily/core").GeneralField>;
2021
2035
  setGraph: (field: import("@formily/core").GeneralField) => void;
2022
2036
  removeGraph: (field: import("@formily/core").GeneralField) => void;
2037
+ lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
2023
2038
  formModel: import("@formily/core").Form<{
2024
2039
  [x: string]: any;
2025
2040
  }>;