cnhis-design-vue 3.2.9-beta.2 → 3.2.9-beta.23

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 (111) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  3. package/es/components/ai-chat/src/types/index.d.ts +8 -7
  4. package/es/components/base-search/index.d.ts +2 -0
  5. package/es/components/base-search/src/index.vue.d.ts +2 -0
  6. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  7. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  8. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  9. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  10. package/es/components/button-print/index.d.ts +7 -45
  11. package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -45
  12. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  13. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +6 -35
  14. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  15. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -5
  16. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  17. package/es/components/button-print/src/utils/print.d.ts +5 -4
  18. package/es/components/button-print/src/utils/print.js +1 -1
  19. package/es/components/expand-field/index.d.ts +1 -1
  20. package/es/components/expand-field/src/components/form.vue.d.ts +1 -1
  21. package/es/components/expand-field/src/index.vue.d.ts +1 -1
  22. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  23. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  24. package/es/components/field-set/src/FieldColor.vue.d.ts +29 -6
  25. package/es/components/field-set/src/FieldFilter.vue.d.ts +29 -6
  26. package/es/components/field-set/src/FieldSet.vue.d.ts +68 -28
  27. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  28. package/es/components/field-set/src/components/table-row.vue.d.ts +28 -1
  29. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  30. package/es/components/field-set/src/types/index.d.ts +3 -3
  31. package/es/components/field-set/src/utils/index.js +1 -1
  32. package/es/components/form-render/src/components/renderer/select.d.ts +2 -1
  33. package/es/components/form-render/src/components/renderer/select.js +1 -1
  34. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  35. package/es/components/iho-chat/index.d.ts +270 -2
  36. package/es/components/iho-chat/src/Index.vue.d.ts +270 -2
  37. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  38. package/es/components/iho-chat/src/api/index.js +1 -1
  39. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +5 -0
  40. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  41. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +121 -1
  42. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  43. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
  44. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  45. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +131 -2
  46. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +122 -0
  47. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  48. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  49. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +6 -1
  50. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  51. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  52. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
  53. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  54. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  55. package/es/components/iho-chat/src/constants/index.d.ts +2 -1
  56. package/es/components/iho-chat/src/constants/index.js +1 -1
  57. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  58. package/es/components/iho-chat/src/hooks/useSession.js +1 -1
  59. package/es/components/iho-chat/src/hooks/useState.d.ts +5 -0
  60. package/es/components/iho-chat/src/hooks/useState.js +1 -1
  61. package/es/components/iho-chat/src/types/index.d.ts +1 -0
  62. package/es/components/iho-chat/src/utils/chatSock.js +1 -1
  63. package/es/components/iho-chat/style/index.css +1 -1
  64. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
  65. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
  66. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
  67. package/es/components/iho-table/src/types/index.d.ts +3 -0
  68. package/es/components/iho-table/style/index.css +1 -1
  69. package/es/components/index.css +1 -1
  70. package/es/components/quick-search/index.d.ts +3 -0
  71. package/es/components/quick-search/src/index.vue.d.ts +3 -0
  72. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  73. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
  74. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  75. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  76. package/es/components/table-filter/src/types/index.d.ts +2 -0
  77. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  78. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  79. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  80. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  81. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  82. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  83. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  84. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  85. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  86. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  87. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  88. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  89. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  90. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  91. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  92. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  93. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  94. package/es/shared/assets/img/failure.png.js +1 -1
  95. package/es/shared/assets/img/no-permission.png.js +1 -1
  96. package/es/shared/assets/img/nodata.png.js +1 -1
  97. package/es/shared/assets/img/notfound.png.js +1 -1
  98. package/es/shared/assets/img/qr.png.js +1 -1
  99. package/es/shared/assets/img/success.png.js +1 -1
  100. package/es/shared/assets/img/table_style_2.png.js +1 -1
  101. package/es/shared/assets/img/video.png.js +1 -1
  102. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  103. package/es/shared/assets/img/xb_big.png.js +1 -1
  104. package/es/shared/assets/img/xb_small.png.js +1 -1
  105. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  106. package/es/shared/package.json.js +1 -1
  107. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  108. package/es/shared/utils/index.d.ts +1 -0
  109. package/es/shared/utils/index.js +1 -1
  110. package/es/shared/utils/tapable/index.d.ts +139 -0
  111. package/package.json +2 -2
@@ -46,9 +46,7 @@ declare const _default: import("vue").DefineComponent<{
46
46
  disabledAll?: boolean | undefined;
47
47
  isHeadCheckHide?: boolean | undefined;
48
48
  isShow?: boolean | undefined;
49
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
50
- [key: string]: any;
51
- }>) | undefined;
49
+ contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
52
50
  }[]>;
53
51
  rowProps: {
54
52
  columns: {
@@ -60,9 +58,7 @@ declare const _default: import("vue").DefineComponent<{
60
58
  disabledAll?: boolean | undefined;
61
59
  isHeadCheckHide?: boolean | undefined;
62
60
  isShow?: boolean | undefined;
63
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
64
- [key: string]: any;
65
- }>) | undefined;
61
+ contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
66
62
  }[];
67
63
  data: AnyObject[];
68
64
  onEdit: (row: AnyObject) => void;
@@ -235,6 +231,13 @@ declare const _default: import("vue").DefineComponent<{
235
231
  type: PropType<AnyObject[]>;
236
232
  default: () => never[];
237
233
  };
234
+ primaryKey: {
235
+ type: StringConstructor;
236
+ default: string;
237
+ };
238
+ titleRender: {
239
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
240
+ };
238
241
  }, {
239
242
  fixedWayOptions: {
240
243
  label: string;
@@ -333,6 +336,13 @@ declare const _default: import("vue").DefineComponent<{
333
336
  type: PropType<AnyObject[]>;
334
337
  default: () => never[];
335
338
  };
339
+ primaryKey: {
340
+ type: StringConstructor;
341
+ default: string;
342
+ };
343
+ titleRender: {
344
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
345
+ };
336
346
  }>> & {
337
347
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
338
348
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -346,10 +356,12 @@ declare const _default: import("vue").DefineComponent<{
346
356
  isMultiple: (field: string) => boolean;
347
357
  isRender: (field: string) => boolean;
348
358
  isShow: (field: string) => any;
359
+ showRelation: (field: string) => boolean;
349
360
  getSortPriorityOptions: () => {
350
361
  label: string;
351
362
  value: number;
352
363
  }[];
364
+ getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
353
365
  selectProps: (field: string) => {
354
366
  valueField: string;
355
367
  labelField: string;
@@ -367,12 +379,15 @@ declare const _default: import("vue").DefineComponent<{
367
379
  NIcon: any;
368
380
  NColorPicker: any;
369
381
  NPopconfirm: any;
382
+ NPopover: any;
383
+ NSpace: any;
370
384
  setStyle: typeof setStyle;
371
385
  setColorInfo: typeof setColorInfo;
372
386
  ReorderTwoOutline: 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<{}>>, {}>;
373
387
  TrashOutline: 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<{}>>, {}>;
374
388
  CreateOutline: 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<{}>>, {}>;
375
389
  HelpCircleOutline: 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<{}>>, {}>;
390
+ CaretDownOutline: 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<{}>>, {}>;
376
391
  isFunction: (value: any) => value is (...args: any[]) => any;
377
392
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
378
393
  element: {
@@ -458,6 +473,13 @@ declare const _default: import("vue").DefineComponent<{
458
473
  type: PropType<AnyObject[]>;
459
474
  default: () => never[];
460
475
  };
476
+ primaryKey: {
477
+ type: StringConstructor;
478
+ default: string;
479
+ };
480
+ titleRender: {
481
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
482
+ };
461
483
  }>> & {
462
484
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
463
485
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -480,6 +502,7 @@ declare const _default: import("vue").DefineComponent<{
480
502
  requiredDisable: boolean;
481
503
  hide: boolean;
482
504
  }>[];
505
+ primaryKey: string;
483
506
  index: number;
484
507
  columns: FieldSetColumnItem[];
485
508
  element: Partial<{
@@ -37,9 +37,7 @@ declare const _default: import("vue").DefineComponent<{
37
37
  disabledAll?: boolean | undefined;
38
38
  isHeadCheckHide?: boolean | undefined;
39
39
  isShow?: boolean | undefined;
40
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
41
- [key: string]: any;
42
- }>) | undefined;
40
+ contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
43
41
  }[]>;
44
42
  data: import("vue").Ref<{
45
43
  [x: string]: any;
@@ -64,9 +62,7 @@ declare const _default: import("vue").DefineComponent<{
64
62
  disabledAll?: boolean | undefined;
65
63
  isHeadCheckHide?: boolean | undefined;
66
64
  isShow?: boolean | undefined;
67
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
68
- [key: string]: any;
69
- }>) | undefined;
65
+ contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
70
66
  }[];
71
67
  data: {
72
68
  [x: string]: any;
@@ -257,6 +253,13 @@ declare const _default: import("vue").DefineComponent<{
257
253
  type: PropType<AnyObject[]>;
258
254
  default: () => never[];
259
255
  };
256
+ primaryKey: {
257
+ type: StringConstructor;
258
+ default: string;
259
+ };
260
+ titleRender: {
261
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
262
+ };
260
263
  }, {
261
264
  fixedWayOptions: {
262
265
  label: string;
@@ -355,6 +358,13 @@ declare const _default: import("vue").DefineComponent<{
355
358
  type: PropType<AnyObject[]>;
356
359
  default: () => never[];
357
360
  };
361
+ primaryKey: {
362
+ type: StringConstructor;
363
+ default: string;
364
+ };
365
+ titleRender: {
366
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
367
+ };
358
368
  }>> & {
359
369
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
360
370
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -368,10 +378,12 @@ declare const _default: import("vue").DefineComponent<{
368
378
  isMultiple: (field: string) => boolean;
369
379
  isRender: (field: string) => boolean;
370
380
  isShow: (field: string) => any;
381
+ showRelation: (field: string) => boolean;
371
382
  getSortPriorityOptions: () => {
372
383
  label: string;
373
384
  value: number;
374
385
  }[];
386
+ getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
375
387
  selectProps: (field: string) => {
376
388
  valueField: string;
377
389
  labelField: string;
@@ -389,12 +401,15 @@ declare const _default: import("vue").DefineComponent<{
389
401
  NIcon: any;
390
402
  NColorPicker: any;
391
403
  NPopconfirm: any;
404
+ NPopover: any;
405
+ NSpace: any;
392
406
  setStyle: typeof setStyle;
393
407
  setColorInfo: typeof import("./utils").setColorInfo;
394
408
  ReorderTwoOutline: 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<{}>>, {}>;
395
409
  TrashOutline: 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<{}>>, {}>;
396
410
  CreateOutline: 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<{}>>, {}>;
397
411
  HelpCircleOutline: 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<{}>>, {}>;
412
+ CaretDownOutline: 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<{}>>, {}>;
398
413
  isFunction: (value: any) => value is (...args: any[]) => any;
399
414
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
400
415
  element: {
@@ -480,6 +495,13 @@ declare const _default: import("vue").DefineComponent<{
480
495
  type: PropType<AnyObject[]>;
481
496
  default: () => never[];
482
497
  };
498
+ primaryKey: {
499
+ type: StringConstructor;
500
+ default: string;
501
+ };
502
+ titleRender: {
503
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
504
+ };
483
505
  }>> & {
484
506
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
485
507
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -502,6 +524,7 @@ declare const _default: import("vue").DefineComponent<{
502
524
  requiredDisable: boolean;
503
525
  hide: boolean;
504
526
  }>[];
527
+ primaryKey: string;
505
528
  index: number;
506
529
  columns: FieldSetColumnItem[];
507
530
  element: Partial<{
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, VNodeChild } from 'vue';
2
2
  import { setStyle, isDraggableItem } from './utils';
3
3
  import { FieldSetItem, FieldSetColumnName, FieldSetColumnItem } from '../../../components/field-set/src/types';
4
4
  import { AnyObject } from '../../../shared/types';
@@ -79,18 +79,21 @@ declare const _default: import("vue").DefineComponent<{
79
79
  columnWidthProps: {
80
80
  type: ObjectConstructor;
81
81
  };
82
- showHideExpression: {
83
- type: BooleanConstructor;
82
+ hideExpressionConfig: {
83
+ type: PropType<{
84
+ show: boolean;
85
+ option: AnyObject[];
86
+ }>;
84
87
  };
85
- hideExpressionOption: {
86
- type: PropType<AnyObject[]>;
87
- default: () => never[];
88
+ primaryKey: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ titleRender: {
93
+ type: PropType<(row: FieldSetItem) => VNodeChild>;
88
94
  };
89
95
  }, {
90
96
  fieldsMapping: Record<string, string>;
91
- attrs: {
92
- [x: string]: unknown;
93
- };
94
97
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
95
98
  fields: {
96
99
  type: PropType<Partial<{
@@ -168,12 +171,18 @@ declare const _default: import("vue").DefineComponent<{
168
171
  columnWidthProps: {
169
172
  type: ObjectConstructor;
170
173
  };
171
- showHideExpression: {
172
- type: BooleanConstructor;
174
+ hideExpressionConfig: {
175
+ type: PropType<{
176
+ show: boolean;
177
+ option: AnyObject[];
178
+ }>;
173
179
  };
174
- hideExpressionOption: {
175
- type: PropType<AnyObject[]>;
176
- default: () => never[];
180
+ primaryKey: {
181
+ type: StringConstructor;
182
+ default: string;
183
+ };
184
+ titleRender: {
185
+ type: PropType<(row: FieldSetItem) => VNodeChild>;
177
186
  };
178
187
  }>> & {
179
188
  onSave?: ((...args: any[]) => any) | undefined;
@@ -186,6 +195,7 @@ declare const _default: import("vue").DefineComponent<{
186
195
  tableBodyRef: import("vue").Ref<HTMLDivElement | undefined>;
187
196
  newFields: import("vue").Ref<AnyObject[]>;
188
197
  defaultColumns: FieldSetColumnItem[];
198
+ otherColumns: FieldSetColumnItem[];
189
199
  columns: import("vue").Ref<{
190
200
  [x: string]: any;
191
201
  title: string;
@@ -195,9 +205,7 @@ declare const _default: import("vue").DefineComponent<{
195
205
  disabledAll?: boolean | undefined;
196
206
  isHeadCheckHide?: boolean | undefined;
197
207
  isShow?: boolean | undefined;
198
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
199
- [key: string]: any;
200
- }>) | undefined;
208
+ contentRender?: ((column: AnyObject, row: AnyObject) => VNodeChild) | undefined;
201
209
  }[]>;
202
210
  fieldList: import("vue").ComputedRef<AnyObject[]>;
203
211
  hasFieldDescribe: import("vue").ComputedRef<boolean>;
@@ -211,9 +219,7 @@ declare const _default: import("vue").DefineComponent<{
211
219
  disabledAll?: boolean | undefined;
212
220
  isHeadCheckHide?: boolean | undefined;
213
221
  isShow?: boolean | undefined;
214
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
215
- [key: string]: any;
216
- }>) | undefined;
222
+ contentRender?: ((column: AnyObject, row: AnyObject) => VNodeChild) | undefined;
217
223
  }[];
218
224
  data: AnyObject[];
219
225
  onUpdateChecked: ({ checked, column }: {
@@ -225,7 +231,9 @@ declare const _default: import("vue").DefineComponent<{
225
231
  fieldDescribeMode: "column" | "tooltip";
226
232
  developMode: boolean;
227
233
  columnWidthProps: Record<string, any> | undefined;
228
- hideExpressionOption: AnyObject[];
234
+ hideExpressionOption: AnyObject[] | never[];
235
+ primaryKey: string;
236
+ titleRender: ((row: FieldSetItem) => VNodeChild) | undefined;
229
237
  };
230
238
  searchData: {
231
239
  keyword: string;
@@ -412,6 +420,13 @@ declare const _default: import("vue").DefineComponent<{
412
420
  type: PropType<AnyObject[]>;
413
421
  default: () => never[];
414
422
  };
423
+ primaryKey: {
424
+ type: StringConstructor;
425
+ default: string;
426
+ };
427
+ titleRender: {
428
+ type: PropType<(row: AnyObject) => VNodeChild>;
429
+ };
415
430
  }, {
416
431
  fixedWayOptions: {
417
432
  label: string;
@@ -510,6 +525,13 @@ declare const _default: import("vue").DefineComponent<{
510
525
  type: PropType<AnyObject[]>;
511
526
  default: () => never[];
512
527
  };
528
+ primaryKey: {
529
+ type: StringConstructor;
530
+ default: string;
531
+ };
532
+ titleRender: {
533
+ type: PropType<(row: AnyObject) => VNodeChild>;
534
+ };
513
535
  }>> & {
514
536
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
515
537
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -523,10 +545,12 @@ declare const _default: import("vue").DefineComponent<{
523
545
  isMultiple: (field: string) => boolean;
524
546
  isRender: (field: string) => boolean;
525
547
  isShow: (field: string) => any;
548
+ showRelation: (field: string) => boolean;
526
549
  getSortPriorityOptions: () => {
527
550
  label: string;
528
551
  value: number;
529
552
  }[];
553
+ getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
530
554
  selectProps: (field: string) => {
531
555
  valueField: string;
532
556
  labelField: string;
@@ -544,12 +568,15 @@ declare const _default: import("vue").DefineComponent<{
544
568
  NIcon: any;
545
569
  NColorPicker: any;
546
570
  NPopconfirm: any;
571
+ NPopover: any;
572
+ NSpace: any;
547
573
  setStyle: typeof setStyle;
548
574
  setColorInfo: typeof import("./utils").setColorInfo;
549
575
  ReorderTwoOutline: 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<{}>>, {}>;
550
576
  TrashOutline: 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<{}>>, {}>;
551
577
  CreateOutline: 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<{}>>, {}>;
552
578
  HelpCircleOutline: 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<{}>>, {}>;
579
+ CaretDownOutline: 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<{}>>, {}>;
553
580
  isFunction: (value: any) => value is (...args: any[]) => any;
554
581
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
555
582
  element: {
@@ -635,6 +662,13 @@ declare const _default: import("vue").DefineComponent<{
635
662
  type: PropType<AnyObject[]>;
636
663
  default: () => never[];
637
664
  };
665
+ primaryKey: {
666
+ type: StringConstructor;
667
+ default: string;
668
+ };
669
+ titleRender: {
670
+ type: PropType<(row: AnyObject) => VNodeChild>;
671
+ };
638
672
  }>> & {
639
673
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
640
674
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -657,6 +691,7 @@ declare const _default: import("vue").DefineComponent<{
657
691
  requiredDisable: boolean;
658
692
  hide: boolean;
659
693
  }>[];
694
+ primaryKey: string;
660
695
  index: number;
661
696
  columns: FieldSetColumnItem[];
662
697
  element: Partial<{
@@ -770,18 +805,25 @@ declare const _default: import("vue").DefineComponent<{
770
805
  columnWidthProps: {
771
806
  type: ObjectConstructor;
772
807
  };
773
- showHideExpression: {
774
- type: BooleanConstructor;
808
+ hideExpressionConfig: {
809
+ type: PropType<{
810
+ show: boolean;
811
+ option: AnyObject[];
812
+ }>;
775
813
  };
776
- hideExpressionOption: {
777
- type: PropType<AnyObject[]>;
778
- default: () => never[];
814
+ primaryKey: {
815
+ type: StringConstructor;
816
+ default: string;
817
+ };
818
+ titleRender: {
819
+ type: PropType<(row: FieldSetItem) => VNodeChild>;
779
820
  };
780
821
  }>> & {
781
822
  onSave?: ((...args: any[]) => any) | undefined;
782
823
  onClose?: ((...args: any[]) => any) | undefined;
783
824
  onReset?: ((...args: any[]) => any) | undefined;
784
825
  }, {
826
+ primaryKey: string;
785
827
  type: string;
786
828
  isEdit: boolean;
787
829
  fields: Partial<{
@@ -807,11 +849,9 @@ declare const _default: import("vue").DefineComponent<{
807
849
  developMode: boolean;
808
850
  footerFlag: boolean;
809
851
  fieldDescribeMode: "column" | "tooltip";
810
- hideExpressionOption: AnyObject[];
811
852
  showSearch: boolean;
812
853
  customColumns: FieldSetColumnItem[];
813
854
  showSortPriority: boolean;
814
855
  showHeadFilter: boolean;
815
- showHideExpression: boolean;
816
856
  }>;
817
857
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,ref as t,computed as i,reactive as o,toRef as d,watch as a,openBlock as r,createElementBlock as s,createBlock as n,unref as u,withKeys as c,withModifiers as f,createCommentVNode as p,createElementVNode as h,Fragment as m,renderList as y,normalizeStyle as v,withCtx as b,createTextVNode as x,toDisplayString as g,createVNode as k,normalizeClass as w,mergeProps as S,renderSlot as A}from"vue";import{NInput as _,NCheckbox as E,NTooltip as D,NIcon as W,NPopconfirm as C,NButton as P}from"naive-ui";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import M from"./components/table-row.vue.js";import{isArray as H,cloneDeep as B,isString as N,omit as j}from"lodash-es";import{isDisable as q,setStyle as O,isDraggableItem as V,isDraggable as R,getGroupTree as I}from"./utils/index.js";import{uuidGenerator as U}from"../../../shared/utils/index.js";import{HelpCircleSharp as T}from"@vicons/ionicons5";const K={class:"main-wrapper"},G={class:"main-wrapper__table-header"},L=h("span",null,"数值越小,优先级越高",-1),$=["tabindex"],z={key:1,class:"main-wrapper__table-footer"};var J=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1},fieldShowMaxValue:{type:Number},rowDraggable:{type:Boolean,default:!0},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},showHideExpression:{type:Boolean},hideExpressionOption:{type:Array,default:()=>[]}},emits:["save","close","reset"],setup(e,{expose:J,emit:Q}){const X=e,Y={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"};l();const Z=t(Date.now()),ee=t(""),le=t(),te=t([]),ie=[{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!!X.fieldShowMaxValue,field:"show",fieldShowMaxValue:X.fieldShowMaxValue},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"},{title:"脱敏配置",type:"select",field:"hideExpression"}],oe=t([]),de=i((()=>te.value.flat())),ae=i((()=>de.value.some((e=>e.feildDescribe)))),re=o({columns:oe,data:de,onUpdateChecked:function({checked:e,column:l}){const t=!e||ye(l.field);l.checkedAll=!t},draggable:X.rowDraggable,isFieldSet:!0,fieldDescribeMode:X.fieldDescribeMode,developMode:X.developMode,columnWidthProps:X.columnWidthProps,hideExpressionOption:d(X,"hideExpressionOption")}),se={keyword:ee.value,idx:0,startIdx:0},ne=()=>{Q("save")},ue=()=>{Q("close")};function ce(){te.value=fe(),me(),Z.value=Date.now(),Q("reset")}function fe(){const e=B(X.fields).map((e=>({...e,uuid:U()})));return Object.keys(Y).forEach((l=>{e.forEach((e=>{"old"==X.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[Y[l]]=1==e[l]:e[Y[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1),e.draggable=!!R(e)}))})),function(e){if(X.groupSetting){return I(X.groupSetting,e).reduce(((t,i)=>{const o=N(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function pe(){const e=se.keyword!==ee.value;let l=ee.value?de.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(ee.value))return!!e||t>se.idx})):0;-1!==l||e||(l=se.startIdx),le.value.scrollTop=52*l,Object.assign(se,{keyword:ee.value,idx:l},e?{startIdx:l}:{})}function he(e){var l;return!!ee.value&&(null==(l=e.title)?void 0:l.includes(ee.value))}function me(){var e,l;oe.value=B(ie),(null==(e=X.showColumnNames)?void 0:e.length)&&(oe.value=ie.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=X.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=X.customColumns)?void 0:l.length)&&oe.value.push(...X.customColumns),"column"===X.fieldDescribeMode&&ae.value&&oe.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),X.showSeq&&oe.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),oe.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!X.isEdit||"sortPriority"===e.field&&!X.showSortPriority||"isShowHeaderFilter"===e.field&&!X.showHeadFilter||"hideExpression"===e.field&&!X.showHideExpression)}(e),"checkbox"===e.type){const l=te.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ye(e.field)&&!l}}))}function ye(e){return te.value.flat().some((l=>!q(l,e)&&!l[e]&&"0001"!=l.id))}function ve(e){return!!V(e.relatedContext.element)}return a([()=>X.fields,()=>{var e;return null==(e=X.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(te.value=fe(),me())}),{immediate:!0,deep:!0}),J({getTableFields:function(){let e=[];return e="old"==X.type?de.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,sortPriority:e.sortPriority,...X.isEdit?{required:e.required,editable:e.editable}:{}}))):de.value,e.map((e=>j(e,["uuid"])))}}),(l,t)=>(r(),s("div",K,[e.showSearch?(r(),n(u(_),{key:0,class:"main-wrapper__search-wrapper",value:ee.value,"onUpdate:value":t[0]||(t[0]=e=>ee.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:c(f(pe,["prevent"]),["enter"])},null,8,["value","onKeydown"])):p("v-if",!0),h("div",G,[(r(!0),s(m,null,y(oe.value,((l,t)=>(r(),s(m,{key:t},[l.isShow?(r(),s("span",{key:0,class:"table-cell",style:v(u(O)(l,t,e.columnWidthProps))},["checkbox"!==l.type||l.isHeadCheckHide?(r(),s(m,{key:1},[x(g(l.title),1)],64)):(r(),n(u(E),{key:0,checked:l.checkedAll,"onUpdate:checked":[e=>l.checkedAll=e,e=>{return t=e,i=l.field,void de.value.forEach((e=>{q(e,i)||(e[i]=t)}));var t,i}],disabled:l.disabledAll},{default:b((()=>[x(g(l.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===l.field?(r(),n(u(D),{key:2,trigger:"hover"},{trigger:b((()=>[k(u(W),{component:u(T),style:{top:"2px"}},null,8,["component"])])),default:b((()=>[L])),_:1})):p("v-if",!0)],4)):p("v-if",!0)],64)))),128))]),h("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:le},[(r(),n(u(F),{modelValue:te.value,"onUpdate:modelValue":t[1]||(t[1]=e=>te.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:ve,disabled:!e.rowDraggable,key:Z.value},{item:b((({element:e,index:l})=>[e.hide?p("v-if",!0):(r(),s("div",{key:0,class:w(["item",u(V)(e)?"":"disabled"]),tabindex:l},[u(H)(e)?(r(!0),s(m,{key:0},y(e,((e,t)=>(r(),n(M,S(re,{key:t,element:e,idx:l+1,"is-highlight":he(e)}),null,16,["element","idx","is-highlight"])))),128)):(r(),n(M,S({key:1},re,{element:e,idx:l+1,"is-highlight":he(e)}),null,16,["element","idx","is-highlight"]))],10,$))])),_:1},8,["modelValue","disabled"]))],512),e.footerFlag?(r(),s("div",z,[p(" 底部按钮插槽 "),A(l.$slots,"footer",{},(()=>[k(u(C),{onPositiveClick:ce},{trigger:b((()=>[k(u(P),{style:{"margin-right":"8px"}},{default:b((()=>[x("恢复默认设置")])),_:1})])),default:b((()=>[x(" 确认要恢复系统默认设置吗? ")])),_:1}),k(u(P),{style:{"margin-right":"8px"},onClick:ue},{default:b((()=>[x("取消")])),_:1}),k(u(P),{type:"primary",onClick:ne},{default:b((()=>[x("保存")])),_:1})]))])):p("v-if",!0)]))}});export{J as default};
1
+ import{defineComponent as e,ref as l,computed as i,reactive as t,toRef as o,watch as d,openBlock as a,createElementBlock as r,createBlock as n,unref as s,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,normalizeStyle as y,withCtx as v,createTextVNode as b,toDisplayString as g,createVNode as x,normalizeClass as k,mergeProps as w,renderSlot as S}from"vue";import{NInput as C,NCheckbox as A,NTooltip as _,NIcon as W,NPopconfirm as E,NButton as H}from"naive-ui";import D from"../../../shared/components/VueDraggable/src/vuedraggable.js";import F from"./components/table-row.vue.js";import{isArray as M,cloneDeep as P,isString as N,omit as R}from"lodash-es";import{isDisable as j,setStyle as B,isDraggableItem as V,isDraggable as O,getGroupTree as q}from"./utils/index.js";import{uuidGenerator as I}from"../../../shared/utils/index.js";import{HelpCircleSharp as K}from"@vicons/ionicons5";const U={class:"main-wrapper"},T={class:"main-wrapper__table-header"},L=h("span",null,"数值越小,优先级越高",-1),G=["tabindex"],$={key:1,class:"main-wrapper__table-footer"};var z=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1},fieldShowMaxValue:{type:Number},rowDraggable:{type:Boolean,default:!0},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionConfig:{type:Object},primaryKey:{type:String,default:"id"},titleRender:{type:Function}},emits:["save","close","reset"],setup(e,{expose:z,emit:J}){const Q=e,X={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},Y=l(Date.now()),Z=l(""),ee=l(),le=l([]),ie=[{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!!Q.fieldShowMaxValue,field:"show",fieldShowMaxValue:Q.fieldShowMaxValue},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"},{title:"脱敏配置",type:"select",field:"hideExpression"}],te=[{title:"搜索",type:"checkbox",isHeadCheckHide:!0,field:"isSearch"},{title:"求和",type:"checkbox",isHeadCheckHide:!0,field:"isSum"},{title:"平均值",type:"checkbox",isHeadCheckHide:!0,field:"isAvg"}],oe=l([]),de=i((()=>le.value.flat())),ae=i((()=>de.value.some((e=>e.feildDescribe)))),re=t({columns:oe,data:de,onUpdateChecked:function({checked:e,column:l}){const i=!e||ye(l.field);l.checkedAll=!i},draggable:Q.rowDraggable,isFieldSet:!0,fieldDescribeMode:Q.fieldDescribeMode,developMode:Q.developMode,columnWidthProps:Q.columnWidthProps,hideExpressionOption:o(Q.hideExpressionConfig||{option:[]},"option"),primaryKey:o(Q,"primaryKey"),titleRender:Q.titleRender}),ne={keyword:Z.value,idx:0,startIdx:0},se=()=>{J("save")},ue=()=>{J("close")};function ce(){le.value=fe(),me(),Y.value=Date.now(),J("reset")}function fe(){const e=P(Q.fields).map((e=>({...e,uuid:I()})));return Object.keys(X).forEach((l=>{e.forEach((e=>{var i;"old"==Q.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[X[l]]=1==e[l]:e[X[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1),e.draggable=!!O(e),M(null==(i=e.relation)?void 0:i.fieldList)&&e.relation.fieldList.forEach((e=>{1==e.isSearch&&(e.checked=!0)}))}))})),function(e){if(Q.groupSetting){return q(Q.groupSetting,e).reduce(((i,t)=>{const o=N(t)?e.find((e=>e.name===t)):l(t.children);return o&&i.push(o),i}),[])}return e;function l(i){const t=[];return i.forEach((i=>{if(i.children)t.push(...l(i.children));else{const l=e.find((e=>e.name===i));l&&t.push(l)}})),t}}(e)}function he(){const e=ne.keyword!==Z.value;let l=Z.value?de.value.findIndex(((l,i)=>{var t;if(null==(t=l.title)?void 0:t.includes(Z.value))return!!e||i>ne.idx})):0;-1!==l||e||(l=ne.startIdx),ee.value.scrollTop=52*l,Object.assign(ne,{keyword:Z.value,idx:l},e?{startIdx:l}:{})}function pe(e){var l;return!!Z.value&&(null==(l=e.title)?void 0:l.includes(Z.value))}function me(){var e,l;oe.value=P(ie),(null==(e=Q.showColumnNames)?void 0:e.length)&&(oe.value=ie.concat(te).filter((e=>{var l,i;return"title"===e.field||(null==(i=null==(l=Q.showColumnNames)?void 0:l.includes)?void 0:i.call(l,e.field))}))),(null==(l=Q.customColumns)?void 0:l.length)&&oe.value.push(...Q.customColumns),"column"===Q.fieldDescribeMode&&ae.value&&oe.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),Q.showSeq&&oe.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),oe.value.forEach((e=>{if(e.isShow=function(e){var l,i;if(!(null==(l=Q.showColumnNames)?void 0:l.length)&&(["editable","required"].includes(e.field)&&!Q.isEdit||"sortPriority"===e.field&&!Q.showSortPriority||"isShowHeaderFilter"===e.field&&!Q.showHeadFilter||"hideExpression"===e.field&&!(null==(i=Q.hideExpressionConfig)?void 0:i.show)))return!1;return!0}(e),"checkbox"===e.type){const l=le.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ye(e.field)&&!l}}))}function ye(e){return le.value.flat().some((l=>!j(l,e)&&!l[e]&&"0001"!=l.id))}function ve(e){return!!V(e.relatedContext.element)}return d([()=>Q.fields,()=>{var e;return null==(e=Q.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(le.value=fe(),me())}),{immediate:!0,deep:!0}),z({getTableFields:function(){let e=[];return e="old"==Q.type?de.value.map(((e,l)=>R({...e,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth},["name","show","sort","alias","fixedWay","columnWidth"]))):de.value,e.map((e=>R(e,["uuid"])))}}),(l,i)=>(a(),r("div",U,[e.showSearch?(a(),n(s(C),{key:0,class:"main-wrapper__search-wrapper",value:Z.value,"onUpdate:value":i[0]||(i[0]=e=>Z.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(he,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",T,[(a(!0),r(p,null,m(oe.value,((l,i)=>(a(),r(p,{key:i},[l.isShow?(a(),r("span",{key:0,class:"table-cell",style:y(s(B)(l,i,e.columnWidthProps))},["checkbox"!==l.type||l.isHeadCheckHide?(a(),r(p,{key:1},[b(g(l.title),1)],64)):(a(),n(s(A),{key:0,checked:l.checkedAll,"onUpdate:checked":[e=>l.checkedAll=e,e=>{return i=e,t=l.field,void de.value.forEach((e=>{j(e,t)||(e[t]=i)}));var i,t}],disabled:l.disabledAll},{default:v((()=>[b(g(l.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===l.field?(a(),n(s(_),{key:2,trigger:"hover"},{trigger:v((()=>[x(s(W),{component:s(K),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[L])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:ee},[(a(),n(s(D),{modelValue:le.value,"onUpdate:modelValue":i[1]||(i[1]=e=>le.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:ve,disabled:!e.rowDraggable,key:Y.value},{item:v((({element:e,index:l})=>[e.hide?f("v-if",!0):(a(),r("div",{key:0,class:k(["item",s(V)(e)?"":"disabled"]),tabindex:l},[s(M)(e)?(a(!0),r(p,{key:0},m(e,((e,i)=>(a(),n(F,w(re,{key:i,element:e,idx:l+1,"is-highlight":pe(e)}),null,16,["element","idx","is-highlight"])))),128)):(a(),n(F,w({key:1},re,{element:e,idx:l+1,"is-highlight":pe(e)}),null,16,["element","idx","is-highlight"]))],10,G))])),_:1},8,["modelValue","disabled"]))],512),e.footerFlag?(a(),r("div",$,[f(" 底部按钮插槽 "),S(l.$slots,"footer",{},(()=>[x(s(E),{onPositiveClick:ce},{trigger:v((()=>[x(s(H),{style:{"margin-right":"8px"}},{default:v((()=>[b("恢复默认设置")])),_:1})])),default:v((()=>[b(" 确认要恢复系统默认设置吗? ")])),_:1}),x(s(H),{style:{"margin-right":"8px"},onClick:ue},{default:v((()=>[b("取消")])),_:1}),x(s(H),{type:"primary",onClick:se},{default:v((()=>[b("保存")])),_:1})]))])):f("v-if",!0)]))}});export{z as default};
@@ -1,4 +1,4 @@
1
- import { PropType, CSSProperties } from 'vue';
1
+ import { PropType, CSSProperties, VNodeChild } from 'vue';
2
2
  import { AnyObject } from '../../../../shared/types';
3
3
  import { FieldSetColumnItem } from '../../../../components/field-set';
4
4
  import { setStyle, setColorInfo } from '../utils';
@@ -86,6 +86,13 @@ declare const _default: import("vue").DefineComponent<{
86
86
  type: PropType<AnyObject[]>;
87
87
  default: () => never[];
88
88
  };
89
+ primaryKey: {
90
+ type: StringConstructor;
91
+ default: string;
92
+ };
93
+ titleRender: {
94
+ type: PropType<(row: AnyObject) => VNodeChild>;
95
+ };
89
96
  }, {
90
97
  fixedWayOptions: {
91
98
  label: string;
@@ -184,6 +191,13 @@ declare const _default: import("vue").DefineComponent<{
184
191
  type: PropType<AnyObject[]>;
185
192
  default: () => never[];
186
193
  };
194
+ primaryKey: {
195
+ type: StringConstructor;
196
+ default: string;
197
+ };
198
+ titleRender: {
199
+ type: PropType<(row: AnyObject) => VNodeChild>;
200
+ };
187
201
  }>> & {
188
202
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
189
203
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -197,10 +211,12 @@ declare const _default: import("vue").DefineComponent<{
197
211
  isMultiple: (field: string) => boolean;
198
212
  isRender: (field: string) => boolean;
199
213
  isShow: (field: string) => any;
214
+ showRelation: (field: string) => boolean;
200
215
  getSortPriorityOptions: () => {
201
216
  label: string;
202
217
  value: number;
203
218
  }[];
219
+ getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
204
220
  selectProps: (field: string) => {
205
221
  valueField: string;
206
222
  labelField: string;
@@ -218,12 +234,15 @@ declare const _default: import("vue").DefineComponent<{
218
234
  NIcon: any;
219
235
  NColorPicker: any;
220
236
  NPopconfirm: any;
237
+ NPopover: any;
238
+ NSpace: any;
221
239
  setStyle: typeof setStyle;
222
240
  setColorInfo: typeof setColorInfo;
223
241
  ReorderTwoOutline: 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<{}>>, {}>;
224
242
  TrashOutline: 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<{}>>, {}>;
225
243
  CreateOutline: 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<{}>>, {}>;
226
244
  HelpCircleOutline: 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<{}>>, {}>;
245
+ CaretDownOutline: 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<{}>>, {}>;
227
246
  isFunction: (value: any) => value is (...args: any[]) => any;
228
247
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
229
248
  element: {
@@ -309,6 +328,13 @@ declare const _default: import("vue").DefineComponent<{
309
328
  type: PropType<AnyObject[]>;
310
329
  default: () => never[];
311
330
  };
331
+ primaryKey: {
332
+ type: StringConstructor;
333
+ default: string;
334
+ };
335
+ titleRender: {
336
+ type: PropType<(row: AnyObject) => VNodeChild>;
337
+ };
312
338
  }>> & {
313
339
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
314
340
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -331,6 +357,7 @@ declare const _default: import("vue").DefineComponent<{
331
357
  requiredDisable: boolean;
332
358
  hide: boolean;
333
359
  }>[];
360
+ primaryKey: string;
334
361
  index: number;
335
362
  columns: FieldSetColumnItem[];
336
363
  element: Partial<{
@@ -1 +1 @@
1
- import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as o,unref as a,createBlock as r,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as c,toDisplayString as f,normalizeClass as p,withDirectives as m,vShow as v,mergeProps as y,resolveDynamicComponent as b,createTextVNode as h}from"vue";import{NTooltip as g,NIcon as k,NCheckbox as x,NSelect as E,NColorPicker as S,NInput as D,NInputNumber as T,NPopconfirm as w}from"naive-ui";import{setStyle as O,setColorInfo as j,isShowExplicitRequired as C,isDisable as M}from"../utils/index.js";import{ReorderTwoOutline as N,HelpCircleOutline as U,CreateOutline as F,TrashOutline as _}from"@vicons/ionicons5";import{isFunction as P,isArray as A,range as H}from"lodash-es";import{COLOR_MAP as L}from"../constants/index.js";import{WIDGET_TYPE as R,SELECT_MAP as V,WIDGET_MAP as B,SELECT_TYPE as I,SELECT_DEFAULT_MAP as W,DATE_MAP as q,DATETIME_MAP as G}from"../constants/filter.js";const z={class:"row"},J=["title"],K=c("span",null,"拖拽调整顺序",-1);var Q=e({__name:"table-row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},isFieldSet:{type:Boolean,default:!1},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionOption:{type:Array,default:()=>[]}},emits:["updateChecked","edit"],setup(e,{emit:Q}){const X=e,Y=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],Z=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],$=[{label:"字体",value:"font"},{label:"背景",value:"background"}],ee=Object.entries(L).map((([e])=>e));function le(){X.data.splice(X.index,1)}function te(){Q("edit",X.element)}function ie(){var e;return X.element.feildDescribe||(null==(e=X.element.settingObj)?void 0:e.fieldDescDev)}function ne(e){return"seq"===e?X.idx:"optionType"===e?X.element[e]&&X.element.type===R.SELECT?V[X.element[e]]:"":"type"===e?B[X.element[e]]:X.element[e]}function oe(e){if("defaultValue"===e){const{optionType:e}=X.element;return e===I.SELECT_MULTIPLE}return!1}function ae(e){if("0001"==X.element.id&&"fixedWay"!=e)return!1;const{isConfiguredHeaderFilter:l}=X.element;return"isShowHeaderFilter"===e?!!l:!(["explicitRequired","defaultValue"].includes(e)&&![R.DATE,R.DATETIME,R.SELECT].includes(X.element.type))}function re(e){return!["explicitRequired","defaultValue"].includes(e)||C(X.element)}function de(e){const l={valueField:"value",labelField:"label"};return"hideExpression"===e&&(l.valueField="id",l.labelField="name"),l}function ue(e){switch(e.field){case"fixedWay":return Y;case"sortDirection":return Z;case"sortPriority":return function(){const e=H(1,X.data.length+1).map((e=>({label:e.toString(),value:e}))),l=X.data.filter((e=>!!e.sortPriority&&e.uuid!==X.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();case"colorScope":return $;case"hideExpression":return X.hideExpressionOption;case"defaultValue":{const{type:e,optionInfo:l}=X.element;return e===R.SELECT?A(null==l?void 0:l.list)&&l.list.length>0?l.list.map((e=>({...e,label:e.name}))):Object.entries(W).map((([e,l])=>({value:e,label:l}))):e===R.DATE?Object.entries(q).map((([e,l])=>({value:e,label:l}))):e===R.DATETIME?Object.entries(G).map((([e,l])=>({value:e,label:l}))):[]}default:return[]}}function se(e){var l;if(1==X.element.defaultMark||"color"===e.type&&X.isHighlightRow)return!0;if("checkbox"===e.type)return"show"===e.field&&e.fieldShowMaxValue?!X.element[e.field]&&(null==(l=X.data.filter((l=>l[e.field])))?void 0:l.length)===e.fieldShowMaxValue:M(X.element,e.field);if("sortPriority"!==e.field)return!1;const{sortDirection:t}=X.element;return!t||"NONE"===t}function ce(e){return["title","result"].includes(e.field)&&X.element.style||{}}return(C,M)=>(l(),t("div",z,[(l(!0),t(i,null,n(e.columns,((n,C)=>{return l(),t(i,{key:C},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:o(a(O)(n,C,e.columnWidthProps))},["text"===n.type?(l(),t(i,{key:0},[0===C?(l(),t(i,{key:0},[!e.isFieldSet||e.draggable&&e.isFieldSet?(l(),r(a(g),{key:0,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(N)},null,8,["component"])])),default:d((()=>[K])),_:1})):s("v-if",!0),(A=n.field,"title"===A&&("tooltip"===X.fieldDescribeMode&&X.element.feildDescribe||X.developMode&&(null==(H=X.element.settingObj)?void 0:H.fieldDescDev))?(l(),r(a(g),{key:1,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(U)},null,8,["component"])])),default:d((()=>[c("span",null,f(ie()),1)])),_:1})):s("v-if",!0))],64)):s("v-if",!0),c("span",{class:p([e.isHighlight&&"title"===n.field?"highlight":""]),style:o(ce(n))},f(ne(n.field)),7)],64)):s("v-if",!0),"checkbox"===n.type&&ae(n.field)?m((l(),r(a(x),{key:1,disabled:se(n),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){Q("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,re(n.field)]]):s("v-if",!0),"select"===n.type&&ae(n.field)?m((l(),r(a(E),y({key:2},de(n.field),{clearable:"",multiple:oe(n.field),disabled:se(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(X.element.sortPriority=null),"colorScope"===l.field&&j(X.element)}(e,n)],options:ue(n)}),null,16,["multiple","disabled","value","onUpdate:value","options"])),[[v,re(n.field)]]):s("v-if",!0),"color"===n.type?(l(),r(a(S),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:se(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,M[0]||(M[0]=l=>a(j)(e.element))],"show-preview":"",modes:["hex"],swatches:a(ee)},null,8,["disabled","value","onUpdate:value","swatches"])):s("v-if",!0),"input"===n.type?m((l(),r(a(D),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===n.type?(l(),r(a(T),{key:5,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):s("v-if",!0),"custom"===n.type&&a(P)(n.contentRender)?(l(),r(b((()=>n.contentRender(n,e.element))),{key:6})):s("v-if",!0),"custom"===n.type&&"opt"===n.field&&1!=e.element.defaultMark?(l(),t(i,{key:7},[u(a(g),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(F),onClick:te},null,8,["component"])])),default:d((()=>[h(" 编辑 ")])),_:1}),u(a(w),{onPositiveClick:le},{trigger:d((()=>[u(a(g),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(_)},null,8,["component"])])),default:d((()=>[h(" 删除 ")])),_:1})])),default:d((()=>[h(" 是否确认删除? ")])),_:1})],64)):s("v-if",!0)],12,J)):s("v-if",!0)],64);var A,H})),128))]))}});export{Q as default};
1
+ import{defineComponent as e,openBlock as t,createElementBlock as l,Fragment as i,renderList as n,normalizeStyle as r,unref as a,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as c,toDisplayString as f,resolveDynamicComponent as p,normalizeClass as m,withDirectives as v,vShow as y,mergeProps as h,createTextVNode as g}from"vue";import{NTooltip as b,NIcon as k,NCheckbox as x,NPopover as E,NSpace as S,NSelect as D,NColorPicker as w,NInput as T,NInputNumber as O,NPopconfirm as R}from"naive-ui";import{setStyle as M,setColorInfo as N,isShowExplicitRequired as U,isDisable as P}from"../utils/index.js";import{ReorderTwoOutline as _,HelpCircleOutline as j,CaretDownOutline as A,CreateOutline as C,TrashOutline as F}from"@vicons/ionicons5";import{isFunction as L,isArray as H,range as I}from"lodash-es";import{COLOR_MAP as B}from"../constants/index.js";import{WIDGET_TYPE as V,SELECT_MAP as W,WIDGET_MAP as q,SELECT_TYPE as K,SELECT_DEFAULT_MAP as $,DATE_MAP as z,DATETIME_MAP as G}from"../constants/filter.js";const J={class:"row"},Q=["title"],X=c("span",null,"拖拽调整顺序",-1),Y={key:0};var Z=e({__name:"table-row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},isFieldSet:{type:Boolean,default:!1},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionOption:{type:Array,default:()=>[]},primaryKey:{type:String,default:"id"},titleRender:{type:Function}},emits:["updateChecked","edit"],setup(e,{emit:Z}){const ee=e,te=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],le=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],ie=[{label:"字体",value:"font"},{label:"背景",value:"background"}],ne=Object.entries(B).map((([e])=>e));function re(){ee.data.splice(ee.index,1)}function ae(){Z("edit",ee.element)}function oe(){var e;return ee.element.feildDescribe||(null==(e=ee.element.settingObj)?void 0:e.fieldDescDev)}function de(e){return"seq"===e?ee.idx:"optionType"===e?ee.element[e]&&ee.element.type===V.SELECT?W[ee.element[e]]:"":"type"===e?q[ee.element[e]]:ee.element[e]}function ue(e){if("defaultValue"===e){const{optionType:e}=ee.element;return e===K.SELECT_MULTIPLE}return!1}function se(e){if("0001"==ee.element.id&&"fixedWay"!=e)return!1;const{isConfiguredHeaderFilter:t}=ee.element;return"isShowHeaderFilter"===e?!!t:!(["explicitRequired","defaultValue"].includes(e)&&![V.DATE,V.DATETIME,V.SELECT].includes(ee.element.type)||["editable"].includes(e)&&ee.element[`${e}Hide`])}function ce(e){return["explicitRequired","defaultValue"].includes(e)?U(ee.element):!["isSum","isAvg"].includes(e)||"NUMBER"===ee.element.fieldType}function fe(e){const{relation:t}=ee.element;return"isSearch"===e&&H(null==t?void 0:t.fieldList)&&t.fieldList.length>0}function pe(e){if("hideExpression"===e)return"PASSWORD"===ee.element.attrType?"密码无需设置":ee.element.name===ee.primaryKey||ee.element.columnName===ee.primaryKey?"主键不可设置":ee.element.disableDesensitization||ee.element[`${e}Disabled`]?"不支持脱敏设置":void 0}function me(e){const t={valueField:"value",labelField:"label"};return"hideExpression"===e&&(t.valueField="ruleId",t.labelField="name"),t}function ve(e){var t;switch(e.field){case"fixedWay":return te;case"sortDirection":return le;case"sortPriority":return function(){const e=I(1,ee.data.length+1).map((e=>({label:e.toString(),value:e}))),t=ee.data.filter((e=>!!e.sortPriority&&e.uuid!==ee.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!t.includes(e.value)))}();case"colorScope":return ie;case"hideExpression":return null==(t=ee.hideExpressionOption)?void 0:t.map((e=>({...e,ruleId:`ruleId#${e.code}`})));case"defaultValue":{const{type:e,optionInfo:t}=ee.element;return e===V.SELECT?H(null==t?void 0:t.list)&&t.list.length>0?t.list.map((e=>({...e,label:e.name}))):Object.entries($).map((([e,t])=>({value:e,label:t}))):e===V.DATE?Object.entries(z).map((([e,t])=>({value:e,label:t}))):e===V.DATETIME?Object.entries(G).map((([e,t])=>({value:e,label:t}))):[]}default:return[]}}function ye(e){var t;if(1==ee.element.defaultMark||"color"===e.type&&ee.isHighlightRow)return!0;if("checkbox"===e.type){if("show"===e.field&&e.fieldShowMaxValue)return!ee.element[e.field]&&(null==(t=ee.data.filter((t=>t[e.field])))?void 0:t.length)===e.fieldShowMaxValue;if(["isSearch","isSum","isAvg"].includes(e.field)){if(Reflect.has(ee.element,"isMerge"))return 1==ee.element.isMerge;if("isSearch"===e.field&&Reflect.has(ee.element,"notParticipatingSearch"))return 1==ee.element.notParticipatingSearch}return P(ee.element,e.field)}if("sortPriority"===e.field){const{sortDirection:e}=ee.element;return!e||"NONE"===e}return P(ee.element,e.field)}function he(e){return["title","result"].includes(e.field)&&ee.element.style||{}}return(U,P)=>(t(),l("div",J,[(t(!0),l(i,null,n(e.columns,((U,H)=>{return t(),l(i,{key:H},[U.isShow?(t(),l("span",{key:0,class:"table-cell",title:e.element[U.field],style:r(a(M)(U,H,e.columnWidthProps))},["text"===U.type?(t(),l(i,{key:0},[0===H?(t(),l(i,{key:0},[!e.isFieldSet||e.draggable&&e.isFieldSet?(t(),o(a(b),{key:0,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(_)},null,8,["component"])])),default:d((()=>[X])),_:1})):s("v-if",!0),(I=U.field,"title"===I&&("tooltip"===ee.fieldDescribeMode&&ee.element.feildDescribe||ee.developMode&&(null==(B=ee.element.settingObj)?void 0:B.fieldDescDev))?(t(),o(a(b),{key:1,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(j)},null,8,["component"])])),default:d((()=>[c("span",null,f(oe()),1)])),_:1})):s("v-if",!0)),a(L)(e.titleRender)?(t(),o(p((()=>e.titleRender(e.element))),{key:2})):s("v-if",!0)],64)):s("v-if",!0),0===H&&a(L)(e.titleRender)?s("v-if",!0):(t(),l("span",{key:1,class:m([e.isHighlight&&"title"===U.field?"highlight":""]),style:r(he(U))},f(de(U.field)),7))],64)):s("v-if",!0),"checkbox"===U.type&&se(U.field)?(t(),l(i,{key:1},[v(u(a(x),{disabled:ye(U),checked:e.element[U.field],"onUpdate:checked":[t=>e.element[U.field]=t,e=>function(e,t){Z("updateChecked",{checked:e,column:t})}(e,U)]},null,8,["disabled","checked","onUpdate:checked"]),[[y,ce(U.field)]]),fe(U.field)?(t(),o(a(E),{key:0,placement:"right-start","show-arrow":!1},{trigger:d((()=>[u(a(k),{style:{"margin-left":"5px",top:"2px"},component:a(A)},null,8,["component"])])),default:d((()=>[c("div",null,[c("span",null,f(e.element.relation.tableName),1),u(a(S),{"wrap-item":!1,vertical:""},{default:d((()=>[(t(!0),l(i,null,n(e.element.relation.fieldList,(e=>v((t(),o(a(x),{key:e.id,checked:e.checked,"onUpdate:checked":t=>e.checked=t,label:e.title},null,8,["checked","onUpdate:checked","label"])),[[y,"0001"!==e.sid]]))),128))])),_:1})])])),_:1})):s("v-if",!0)],64)):s("v-if",!0),"select"===U.type&&se(U.field)?(t(),l(i,{key:2},[pe(U.field)?(t(),l("span",Y,f(pe(U.field)),1)):v((t(),o(a(D),h({key:1},me(U.field),{clearable:"",multiple:ue(U.field),disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,e=>function(e,t){"sortDirection"!==t.field||"NONE"!==e&&e||(ee.element.sortPriority=null),"colorScope"===t.field&&N(ee.element)}(e,U)],options:ve(U)}),null,16,["multiple","disabled","value","onUpdate:value","options"])),[[y,ce(U.field)]])],64)):s("v-if",!0),"color"===U.type?(t(),o(a(w),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,P[0]||(P[0]=t=>a(N)(e.element))],"show-preview":"",modes:["hex"],swatches:a(ne)},null,8,["disabled","value","onUpdate:value","swatches"])):s("v-if",!0),"input"===U.type?v((t(),o(a(T),{key:4,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===U.type?(t(),o(a(O),{key:5,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t},null,8,["value","onUpdate:value"])):s("v-if",!0),"custom"===U.type&&a(L)(U.contentRender)?(t(),o(p((()=>U.contentRender(U,e.element))),{key:6})):s("v-if",!0),"custom"===U.type&&"opt"===U.field&&1!=e.element.defaultMark?(t(),l(i,{key:7},[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(C),onClick:ae},null,8,["component"])])),default:d((()=>[g(" 编辑 ")])),_:1}),u(a(R),{onPositiveClick:re},{trigger:d((()=>[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(F)},null,8,["component"])])),default:d((()=>[g(" 删除 ")])),_:1})])),default:d((()=>[g(" 是否确认删除? ")])),_:1})],64)):s("v-if",!0)],12,Q)):s("v-if",!0)],64);var I,B})),128))]))}});export{Z as default};