cnhis-design-vue 3.1.45-beta.9 → 3.1.45-release.1

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 (204) hide show
  1. package/README.md +87 -87
  2. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  3. package/es/components/base-search/index.d.ts +0 -2
  4. package/es/components/base-search/src/index.vue.d.ts +0 -2
  5. package/es/components/base-search/style/index.css +1 -1
  6. package/es/components/classification/index.d.ts +11 -165
  7. package/es/components/classification/src/components/search-filter/index.vue.d.ts +11 -165
  8. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  9. package/es/components/classification/src/components/set-classification/index.vue.d.ts +11 -165
  10. package/es/components/classification/src/index.vue.d.ts +11 -165
  11. package/es/components/fabric-chart/index.d.ts +5 -40
  12. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +5 -40
  13. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +0 -20
  15. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/temperature/useRight.js +1 -1
  18. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  19. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  20. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  21. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  22. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  23. package/es/components/fabric-chart/src/interface.d.ts +0 -13
  24. package/es/components/fabric-chart/src/utils/index.d.ts +1 -2
  25. package/es/components/fabric-chart/src/utils/index.js +1 -1
  26. package/es/components/field-set/index.d.ts +38 -157
  27. package/es/components/field-set/src/FieldSet.vue.d.ts +23 -160
  28. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  29. package/es/components/field-set/src/types/index.d.ts +0 -1
  30. package/es/components/field-set/style/index.css +1 -1
  31. package/es/components/form-config/index.d.ts +48 -3561
  32. package/es/components/form-config/src/FormConfig.vue.d.ts +48 -3561
  33. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  34. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -31
  35. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -1
  36. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +4 -33
  37. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +1 -11
  38. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  39. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +0 -2
  40. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  41. package/es/components/form-config/src/constants/index.d.ts +0 -1
  42. package/es/components/form-config/src/constants/index.js +1 -1
  43. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  44. package/es/components/form-config/src/types/index.d.ts +0 -2
  45. package/es/components/form-config/style/index.css +1 -1
  46. package/es/components/form-render/index.d.ts +4 -31
  47. package/es/components/form-render/src/FormRender.vue.d.ts +4 -31
  48. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  49. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -31
  50. package/es/components/form-render/src/components/renderer/combination.d.ts +5 -5
  51. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  52. package/es/components/form-render/src/components/renderer/jsonCombination/index.d.ts +5 -5
  53. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
  54. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  55. package/es/components/form-render/src/constants/index.d.ts +0 -2
  56. package/es/components/form-render/src/constants/index.js +1 -1
  57. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  58. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +1 -1
  59. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
  60. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  61. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +1 -3
  62. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  63. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  64. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -1
  65. package/es/components/form-render/src/types/index.d.ts +0 -2
  66. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  67. package/es/components/index.css +1 -1
  68. package/es/components/info-header/index.d.ts +10 -72
  69. package/es/components/info-header/src/InfoHeader.vue.d.ts +10 -72
  70. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +4 -31
  71. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -31
  72. package/es/components/keyboard/index.d.ts +1 -1
  73. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  74. package/es/components/quick-search/index.d.ts +0 -2
  75. package/es/components/quick-search/src/index.vue.d.ts +0 -2
  76. package/es/components/quick-search/style/index.css +1 -1
  77. package/es/components/recommend-search/index.d.ts +2 -2
  78. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  79. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  80. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
  81. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  82. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  83. package/es/components/search-cascader/index.d.ts +3 -16
  84. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +3 -16
  85. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  86. package/es/components/search-cascader/src/hooks/index.d.ts +1 -0
  87. package/es/components/search-cascader/src/hooks/index.js +1 -0
  88. package/es/components/search-cascader/src/hooks/useCssVariable.d.ts +3 -0
  89. package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -0
  90. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  91. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  92. package/es/components/shortcut-setter/index.d.ts +4 -31
  93. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -31
  94. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +10 -165
  95. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  96. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -16
  97. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  98. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +0 -18
  99. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  100. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +10 -128
  101. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
  102. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +0 -1
  103. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -1
  104. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +10 -163
  105. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +10 -165
  106. package/es/components/table-filter/src/components/render-widget/basicData.d.ts +4 -0
  107. package/es/components/table-filter/src/components/render-widget/basicData.js +1 -0
  108. package/es/components/table-filter/src/components/render-widget/components/{DateOut.vue.d.ts → Date.vue.d.ts} +2 -21
  109. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -0
  110. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
  111. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +5 -99
  112. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  113. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +9 -13
  114. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
  115. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts +5 -7
  116. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
  117. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts +5 -6
  118. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -1
  119. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +25 -15
  120. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
  121. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +25 -520
  122. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  123. package/es/components/table-filter/src/components/render-widget/enums.d.ts +3 -10
  124. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  125. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +6 -2
  126. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
  127. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  128. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +24 -548
  129. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  130. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +0 -2
  131. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  132. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  133. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  134. package/es/components/table-filter/src/types/enums.d.ts +0 -2
  135. package/es/components/table-filter/src/types/enums.js +1 -1
  136. package/es/env.d.ts +25 -25
  137. package/es/shared/assets/img/failure.png.js +1 -1
  138. package/es/shared/assets/img/no-permission.png.js +1 -1
  139. package/es/shared/assets/img/nodata.png.js +1 -1
  140. package/es/shared/assets/img/notfound.png.js +1 -1
  141. package/es/shared/assets/img/qr.png.js +1 -1
  142. package/es/shared/assets/img/success.png.js +1 -1
  143. package/es/shared/assets/img/video.png.js +1 -1
  144. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  145. package/es/shared/assets/img/xb_big.png.js +1 -1
  146. package/es/shared/assets/img/xb_small.png.js +1 -1
  147. package/es/shared/hooks/useAsyncQueue.d.ts +1 -3
  148. package/es/shared/hooks/useAsyncQueue.js +1 -1
  149. package/es/shared/package.json.js +1 -1
  150. package/package.json +2 -2
  151. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  152. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  153. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  154. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  155. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.d.ts +0 -2
  156. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.js +0 -1
  157. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +0 -4
  158. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +0 -1
  159. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +0 -4
  160. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +0 -1
  161. package/es/components/field-set/src/components/Row.vue.d.ts +0 -132
  162. package/es/components/field-set/src/components/Row.vue.js +0 -1
  163. package/es/components/field-set/src/components/Row.vue2.js +0 -1
  164. package/es/components/field-set/src/utils/index.d.ts +0 -7
  165. package/es/components/field-set/src/utils/index.js +0 -1
  166. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
  167. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
  168. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
  169. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
  170. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
  171. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
  172. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
  173. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +0 -3
  174. package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
  175. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
  176. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
  177. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
  178. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
  179. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
  180. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic1.vue.d.ts +0 -61
  181. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +0 -218
  182. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.js +0 -1
  183. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +0 -1
  184. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.js +0 -1
  185. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +0 -1
  186. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +0 -71
  187. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.js +0 -1
  188. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +0 -1
  189. package/es/components/table-filter/src/components/render-widget/components/Select1.vue.d.ts +0 -45
  190. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +0 -175
  191. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.js +0 -1
  192. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +0 -1
  193. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +0 -114
  194. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.js +0 -1
  195. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +0 -1
  196. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.d.ts +0 -27
  197. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.js +0 -1
  198. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.d.ts +0 -55
  199. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +0 -1
  200. package/es/components/table-filter/src/components/render-widget/helpers/enums.d.ts +0 -56
  201. package/es/components/table-filter/src/components/render-widget/helpers/enums.js +0 -1
  202. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  203. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  204. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -34,14 +34,16 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
34
34
  type: BooleanConstructor;
35
35
  default: boolean;
36
36
  };
37
- showColumnNames: {
38
- type: import("vue").PropType<import("./src/types").FieldSetColumnName[]>;
39
- };
40
- groupSetting: {
41
- type: import("vue").PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("..").IhoTableRowGroupItem[]>> | undefined>;
42
- };
43
37
  }, {
44
38
  fieldsMapping: Record<string, string>;
39
+ fixedWayOptions: {
40
+ label: string;
41
+ value: string;
42
+ }[];
43
+ sortOptions: {
44
+ label: string;
45
+ value: string;
46
+ }[];
45
47
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
46
48
  fields: {
47
49
  type: import("vue").PropType<Partial<{
@@ -76,12 +78,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
76
78
  type: BooleanConstructor;
77
79
  default: boolean;
78
80
  };
79
- showColumnNames: {
80
- type: import("vue").PropType<import("./src/types").FieldSetColumnName[]>;
81
- };
82
- groupSetting: {
83
- type: import("vue").PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("..").IhoTableRowGroupItem[]>> | undefined>;
84
- };
85
81
  }>> & {
86
82
  onReset?: ((...args: any[]) => any) | undefined;
87
83
  onClose?: ((...args: any[]) => any) | undefined;
@@ -90,24 +86,47 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
90
86
  emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
91
87
  newFields: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
92
88
  columns: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
93
- fieldList: import("vue").ComputedRef<import("../../../es/shared/types").AnyObject[]>;
94
89
  handleFieldSave: () => void;
95
90
  onCancle: () => void;
96
91
  reset: () => void;
92
+ setOptions: (column: import("../../../es/shared/types").AnyObject) => {
93
+ label: string;
94
+ value: string;
95
+ }[];
96
+ setStyle: (column: import("../../../es/shared/types").AnyObject) => import("vue").CSSProperties;
97
97
  isShowColumn: (column: import("../../../es/shared/types").AnyObject) => boolean;
98
98
  initFields: () => import("../../../es/shared/types").AnyObject[];
99
- handleGroup: (fields: import("../../../es/shared/types").AnyObject[]) => import("../../../es/shared/types").AnyObject[];
100
99
  getTableFields: () => import("../../../es/shared/types").AnyObject[];
101
100
  handleAllCheck: (checked: boolean, field: string) => void;
102
- handleCheck: ({ checked, column }: {
103
- checked: boolean;
104
- column: import("../../../es/shared/types").AnyObject;
105
- }) => void;
101
+ handleCheck: (checked: boolean, column: import("../../../es/shared/types").AnyObject) => void;
102
+ isDisable: (item: Partial<{
103
+ [key: string]: any;
104
+ id: string;
105
+ name: string;
106
+ show: boolean;
107
+ sort: boolean;
108
+ sortDirection: "NONE" | "ASC" | "DESC";
109
+ title: string;
110
+ alias: string;
111
+ fixedShow: boolean;
112
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
113
+ columnWidth: number | null;
114
+ editable: boolean;
115
+ editableDisable: boolean;
116
+ required: boolean;
117
+ requiredDisable: boolean;
118
+ hide: boolean;
119
+ }>, key: string) => any;
106
120
  initColumns: () => void;
107
121
  isNoAllCheck: (field: string) => boolean;
108
122
  NButton: any;
109
123
  NCheckbox: any;
124
+ NSelect: any;
125
+ NInput: any;
126
+ NInputNumber: any;
127
+ NTooltip: any;
110
128
  NPopconfirm: any;
129
+ NIcon: any;
111
130
  Draggable: import("vue").DefineComponent<{
112
131
  list: {
113
132
  type: ArrayConstructor;
@@ -181,139 +200,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
181
200
  modelValue: unknown[];
182
201
  componentData: Record<string, any>;
183
202
  }>;
184
- Row: import("vue").DefineComponent<{
185
- element: {
186
- type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
187
- default: () => {};
188
- };
189
- columns: {
190
- type: import("vue").PropType<Partial<{
191
- [key: string]: any;
192
- id: string;
193
- name: string;
194
- show: boolean;
195
- sort: boolean;
196
- sortDirection: "NONE" | "ASC" | "DESC";
197
- title: string;
198
- alias: string;
199
- fixedShow: boolean;
200
- fixedWay: "NONE" | "LEFT" | "RIGHT";
201
- columnWidth: number | null;
202
- editable: boolean;
203
- editableDisable: boolean;
204
- required: boolean;
205
- requiredDisable: boolean;
206
- hide: boolean;
207
- }>[]>;
208
- default: () => never[];
209
- };
210
- }, {
211
- fixedWayOptions: {
212
- label: string;
213
- value: string;
214
- }[];
215
- sortOptions: {
216
- label: string;
217
- value: string;
218
- }[];
219
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
220
- element: {
221
- type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
222
- default: () => {};
223
- };
224
- columns: {
225
- type: import("vue").PropType<Partial<{
226
- [key: string]: any;
227
- id: string;
228
- name: string;
229
- show: boolean;
230
- sort: boolean;
231
- sortDirection: "NONE" | "ASC" | "DESC";
232
- title: string;
233
- alias: string;
234
- fixedShow: boolean;
235
- fixedWay: "NONE" | "LEFT" | "RIGHT";
236
- columnWidth: number | null;
237
- editable: boolean;
238
- editableDisable: boolean;
239
- required: boolean;
240
- requiredDisable: boolean;
241
- hide: boolean;
242
- }>[]>;
243
- default: () => never[];
244
- };
245
- }>> & {
246
- onUpdateChecked?: ((...args: any[]) => any) | undefined;
247
- }>>;
248
- emit: (event: "updateChecked", ...args: any[]) => void;
249
- setOptions: (column: import("../../../es/shared/types").AnyObject) => {
250
- label: string;
251
- value: string;
252
- }[];
253
- onUpdateChecked: (checked: boolean, column: import("../../../es/shared/types").AnyObject) => void;
254
- NCheckbox: any;
255
- NSelect: any;
256
- NInput: any;
257
- NInputNumber: any;
258
- NTooltip: any;
259
- NIcon: any;
260
- setStyle: typeof import("./src/utils").setStyle;
261
- isDisable: typeof import("./src/utils").isDisable;
262
- 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<{}>>, {}>;
263
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
264
- element: {
265
- type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
266
- default: () => {};
267
- };
268
- columns: {
269
- type: import("vue").PropType<Partial<{
270
- [key: string]: any;
271
- id: string;
272
- name: string;
273
- show: boolean;
274
- sort: boolean;
275
- sortDirection: "NONE" | "ASC" | "DESC";
276
- title: string;
277
- alias: string;
278
- fixedShow: boolean;
279
- fixedWay: "NONE" | "LEFT" | "RIGHT";
280
- columnWidth: number | null;
281
- editable: boolean;
282
- editableDisable: boolean;
283
- required: boolean;
284
- requiredDisable: boolean;
285
- hide: boolean;
286
- }>[]>;
287
- default: () => never[];
288
- };
289
- }>> & {
290
- onUpdateChecked?: ((...args: any[]) => any) | undefined;
291
- }, {
292
- columns: Partial<{
293
- [key: string]: any;
294
- id: string;
295
- name: string;
296
- show: boolean;
297
- sort: boolean;
298
- sortDirection: "NONE" | "ASC" | "DESC";
299
- title: string;
300
- alias: string;
301
- fixedShow: boolean;
302
- fixedWay: "NONE" | "LEFT" | "RIGHT";
303
- columnWidth: number | null;
304
- editable: boolean;
305
- editableDisable: boolean;
306
- required: boolean;
307
- requiredDisable: boolean;
308
- hide: boolean;
309
- }>[];
310
- element: import("../../../es/shared/types").AnyObject;
311
- }>;
312
- isArray: {
313
- (value?: any): value is any[];
314
- <T>(value?: any): value is any[];
315
- };
316
- setStyle: typeof import("./src/utils").setStyle;
203
+ 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<{}>>, {}>;
317
204
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
318
205
  fields: {
319
206
  type: import("vue").PropType<Partial<{
@@ -348,12 +235,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
348
235
  type: BooleanConstructor;
349
236
  default: boolean;
350
237
  };
351
- showColumnNames: {
352
- type: import("vue").PropType<import("./src/types").FieldSetColumnName[]>;
353
- };
354
- groupSetting: {
355
- type: import("vue").PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("..").IhoTableRowGroupItem[]>> | undefined>;
356
- };
357
238
  }>> & {
358
239
  onReset?: ((...args: any[]) => any) | undefined;
359
240
  onClose?: ((...args: any[]) => any) | undefined;
@@ -1,6 +1,5 @@
1
- import { PropType } from 'vue';
2
- import { setStyle, isDisable } from './utils';
3
- import { FieldSetColumnName } from '../../../../es/components/field-set/src/types';
1
+ import { PropType, CSSProperties } from 'vue';
2
+ import { FieldSetItem } from '../../../../es/components/field-set/src/types';
4
3
  import { AnyObject } from '../../../../es/shared/types';
5
4
  declare const _default: import("vue").DefineComponent<{
6
5
  fields: {
@@ -36,14 +35,16 @@ declare const _default: import("vue").DefineComponent<{
36
35
  type: BooleanConstructor;
37
36
  default: boolean;
38
37
  };
39
- showColumnNames: {
40
- type: PropType<FieldSetColumnName[]>;
41
- };
42
- groupSetting: {
43
- type: PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("../../../../es/components/iho-table").IhoTableRowGroupItem[]>> | undefined>;
44
- };
45
38
  }, {
46
39
  fieldsMapping: Record<string, string>;
40
+ fixedWayOptions: {
41
+ label: string;
42
+ value: string;
43
+ }[];
44
+ sortOptions: {
45
+ label: string;
46
+ value: string;
47
+ }[];
47
48
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
48
49
  fields: {
49
50
  type: PropType<Partial<{
@@ -78,12 +79,6 @@ declare const _default: import("vue").DefineComponent<{
78
79
  type: BooleanConstructor;
79
80
  default: boolean;
80
81
  };
81
- showColumnNames: {
82
- type: PropType<FieldSetColumnName[]>;
83
- };
84
- groupSetting: {
85
- type: PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("../../../../es/components/iho-table").IhoTableRowGroupItem[]>> | undefined>;
86
- };
87
82
  }>> & {
88
83
  onReset?: ((...args: any[]) => any) | undefined;
89
84
  onClose?: ((...args: any[]) => any) | undefined;
@@ -92,24 +87,30 @@ declare const _default: import("vue").DefineComponent<{
92
87
  emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
93
88
  newFields: import("vue").Ref<AnyObject[]>;
94
89
  columns: import("vue").Ref<AnyObject[]>;
95
- fieldList: import("vue").ComputedRef<AnyObject[]>;
96
90
  handleFieldSave: () => void;
97
91
  onCancle: () => void;
98
92
  reset: () => void;
93
+ setOptions: (column: AnyObject) => {
94
+ label: string;
95
+ value: string;
96
+ }[];
97
+ setStyle: (column: AnyObject) => CSSProperties;
99
98
  isShowColumn: (column: AnyObject) => boolean;
100
99
  initFields: () => AnyObject[];
101
- handleGroup: (fields: AnyObject[]) => AnyObject[];
102
100
  getTableFields: () => AnyObject[];
103
101
  handleAllCheck: (checked: boolean, field: string) => void;
104
- handleCheck: ({ checked, column }: {
105
- checked: boolean;
106
- column: AnyObject;
107
- }) => void;
102
+ handleCheck: (checked: boolean, column: AnyObject) => void;
103
+ isDisable: (item: FieldSetItem, key: string) => any;
108
104
  initColumns: () => void;
109
105
  isNoAllCheck: (field: string) => boolean;
110
106
  NButton: any;
111
107
  NCheckbox: any;
108
+ NSelect: any;
109
+ NInput: any;
110
+ NInputNumber: any;
111
+ NTooltip: any;
112
112
  NPopconfirm: any;
113
+ NIcon: any;
113
114
  Draggable: import("vue").DefineComponent<{
114
115
  list: {
115
116
  type: ArrayConstructor;
@@ -183,139 +184,7 @@ declare const _default: import("vue").DefineComponent<{
183
184
  modelValue: unknown[];
184
185
  componentData: Record<string, any>;
185
186
  }>;
186
- Row: import("vue").DefineComponent<{
187
- element: {
188
- type: PropType<AnyObject>;
189
- default: () => {};
190
- };
191
- columns: {
192
- type: PropType<Partial<{
193
- [key: string]: any;
194
- id: string;
195
- name: string;
196
- show: boolean;
197
- sort: boolean;
198
- sortDirection: "NONE" | "ASC" | "DESC";
199
- title: string;
200
- alias: string;
201
- fixedShow: boolean;
202
- fixedWay: "NONE" | "LEFT" | "RIGHT";
203
- columnWidth: number | null;
204
- editable: boolean;
205
- editableDisable: boolean;
206
- required: boolean;
207
- requiredDisable: boolean;
208
- hide: boolean;
209
- }>[]>;
210
- default: () => never[];
211
- };
212
- }, {
213
- fixedWayOptions: {
214
- label: string;
215
- value: string;
216
- }[];
217
- sortOptions: {
218
- label: string;
219
- value: string;
220
- }[];
221
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
222
- element: {
223
- type: PropType<AnyObject>;
224
- default: () => {};
225
- };
226
- columns: {
227
- type: PropType<Partial<{
228
- [key: string]: any;
229
- id: string;
230
- name: string;
231
- show: boolean;
232
- sort: boolean;
233
- sortDirection: "NONE" | "ASC" | "DESC";
234
- title: string;
235
- alias: string;
236
- fixedShow: boolean;
237
- fixedWay: "NONE" | "LEFT" | "RIGHT";
238
- columnWidth: number | null;
239
- editable: boolean;
240
- editableDisable: boolean;
241
- required: boolean;
242
- requiredDisable: boolean;
243
- hide: boolean;
244
- }>[]>;
245
- default: () => never[];
246
- };
247
- }>> & {
248
- onUpdateChecked?: ((...args: any[]) => any) | undefined;
249
- }>>;
250
- emit: (event: "updateChecked", ...args: any[]) => void;
251
- setOptions: (column: AnyObject) => {
252
- label: string;
253
- value: string;
254
- }[];
255
- onUpdateChecked: (checked: boolean, column: AnyObject) => void;
256
- NCheckbox: any;
257
- NSelect: any;
258
- NInput: any;
259
- NInputNumber: any;
260
- NTooltip: any;
261
- NIcon: any;
262
- setStyle: typeof setStyle;
263
- isDisable: typeof isDisable;
264
- 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<{}>>, {}>;
265
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
266
- element: {
267
- type: PropType<AnyObject>;
268
- default: () => {};
269
- };
270
- columns: {
271
- type: PropType<Partial<{
272
- [key: string]: any;
273
- id: string;
274
- name: string;
275
- show: boolean;
276
- sort: boolean;
277
- sortDirection: "NONE" | "ASC" | "DESC";
278
- title: string;
279
- alias: string;
280
- fixedShow: boolean;
281
- fixedWay: "NONE" | "LEFT" | "RIGHT";
282
- columnWidth: number | null;
283
- editable: boolean;
284
- editableDisable: boolean;
285
- required: boolean;
286
- requiredDisable: boolean;
287
- hide: boolean;
288
- }>[]>;
289
- default: () => never[];
290
- };
291
- }>> & {
292
- onUpdateChecked?: ((...args: any[]) => any) | undefined;
293
- }, {
294
- columns: Partial<{
295
- [key: string]: any;
296
- id: string;
297
- name: string;
298
- show: boolean;
299
- sort: boolean;
300
- sortDirection: "NONE" | "ASC" | "DESC";
301
- title: string;
302
- alias: string;
303
- fixedShow: boolean;
304
- fixedWay: "NONE" | "LEFT" | "RIGHT";
305
- columnWidth: number | null;
306
- editable: boolean;
307
- editableDisable: boolean;
308
- required: boolean;
309
- requiredDisable: boolean;
310
- hide: boolean;
311
- }>[];
312
- element: AnyObject;
313
- }>;
314
- isArray: {
315
- (value?: any): value is any[];
316
- <T>(value?: any): value is any[];
317
- };
318
- setStyle: typeof setStyle;
187
+ 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<{}>>, {}>;
319
188
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
320
189
  fields: {
321
190
  type: PropType<Partial<{
@@ -350,12 +219,6 @@ declare const _default: import("vue").DefineComponent<{
350
219
  type: BooleanConstructor;
351
220
  default: boolean;
352
221
  };
353
- showColumnNames: {
354
- type: PropType<FieldSetColumnName[]>;
355
- };
356
- groupSetting: {
357
- type: PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("../../../../es/components/iho-table").IhoTableRowGroupItem[]>> | undefined>;
358
- };
359
222
  }>> & {
360
223
  onReset?: ((...args: any[]) => any) | undefined;
361
224
  onClose?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as t,watch as i,openBlock as d,createElementBlock as o,createElementVNode as a,Fragment as s,renderList as c,normalizeStyle as n,unref as r,createBlock as u,withCtx as f,createTextVNode as h,toDisplayString as m,createCommentVNode as p,createVNode as y,renderSlot as v}from"vue";import{NCheckbox as b,NPopconfirm as k,NButton as x}from"naive-ui";import g from"../../../shared/components/VueDraggable/src/vuedraggable.js";import A from"./components/Row.vue.js";import{isArray as _,cloneDeep as w}from"lodash-es";import{setStyle as S,getGroupTree as W,isDisable as E}from"./utils/index.js";import{isString as C}from"xe-utils";const F={class:"c-field-set"},N={class:"c-field-set__table-header"},R={class:"c-field-set__table-body"},j=["tabindex"],q={key:0,class:"c-field-set__table-footer"};var U=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}},emits:["save","close","reset"],setup(e,{expose:U,emit:D}){const V=e,O={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},T=l([]),B=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{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:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),P=t((()=>T.value.flat())),G=()=>{D("save",{tableFields:$()})},H=()=>{D("close")};function I(){T.value=L(),J(),D("reset")}function L(){const e=w(V.fields);return Object.keys(O).forEach((l=>{e.forEach((e=>{"old"==V.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[O[l]]=1==e[l]:e[O[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)}))})),function(e){if(V.groupSetting){return W(V.groupSetting,e).reduce(((t,i)=>{const d=C(i)?e.find((e=>e.name===i)):l(i.children);return d&&t.push(d),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)}const $=()=>"old"==V.type?P.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,...V.isEdit?{required:e.required,editable:e.editable}:{}}))):P.value;function z({checked:e,column:l}){const t=!e||K(l.field);l.checkedAll=!t}function J(){var e;(null==(e=V.showColumnNames)?void 0:e.length)&&(B.value=B.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=V.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),B.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&V.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=T.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!K(e.field)&&!l}}))}function K(e){return T.value.flat().some((l=>!E(l,e)&&!l[e]&&"0001"!=l.id))}return i([()=>V.fields,()=>{var e;return null==(e=V.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(T.value=L(),J())}),{immediate:!0,deep:!0}),U({getTableFields:$}),(l,t)=>(d(),o("div",F,[a("div",N,[(d(!0),o(s,null,c(B.value,((e,l)=>(d(),o(s,{key:l},[e.isShow?(d(),o("span",{key:0,class:"table-cell",style:n(r(S)(e))},["checkbox"===e.type?(d(),u(r(b),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void P.value.forEach((e=>{E(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:f((()=>[h(m(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):p("v-if",!0),h(" "+m("checkbox"!==e.type?e.title:""),1)],4)):p("v-if",!0)],64)))),128))]),a("div",R,[y(r(g),{modelValue:T.value,"onUpdate:modelValue":t[0]||(t[0]=e=>T.value=e),animation:"150","item-key":"id",tag:"ul"},{item:f((({element:e,index:l})=>[e.hide?p("v-if",!0):(d(),o("li",{key:0,tabindex:l},[r(_)(e)?(d(!0),o(s,{key:0},c(e,((e,l)=>(d(),u(A,{key:l,element:e,columns:B.value,onUpdateChecked:z},null,8,["element","columns"])))),128)):(d(),u(A,{key:1,element:e,columns:B.value,onUpdateChecked:z},null,8,["element","columns"]))],8,j))])),_:1},8,["modelValue"])]),e.footerFlag?(d(),o("div",q,[p(" 底部按钮插槽 "),v(l.$slots,"footer",{},(()=>[y(r(k),{onPositiveClick:I},{trigger:f((()=>[y(r(x),{style:{"margin-right":"8px"}},{default:f((()=>[h("恢复默认设置")])),_:1})])),default:f((()=>[h(" 确认要恢复系统默认设置吗? ")])),_:1}),y(r(x),{style:{"margin-right":"8px"},onClick:H},{default:f((()=>[h("取消")])),_:1}),y(r(x),{type:"primary",onClick:G},{default:f((()=>[h("保存")])),_:1})]))])):p("v-if",!0)]))}});export{U as default};
1
+ import{defineComponent as e,ref as l,watch as t,openBlock as i,createElementBlock as d,createElementVNode as a,Fragment as o,renderList as c,normalizeStyle as s,createBlock as n,unref as r,withCtx as f,createTextVNode as u,toDisplayString as p,createCommentVNode as h,createVNode as b,withDirectives as v,vShow as y,renderSlot as k}from"vue";import{NCheckbox as x,NTooltip as m,NIcon as g,NSelect as A,NInput as _,NInputNumber as E,NPopconfirm as S,NButton as w}from"naive-ui";import W from"../../../shared/components/VueDraggable/src/vuedraggable.js";import{ReorderTwoOutline as N}from"@vicons/ionicons5";const U={class:"c-field-set"},F={class:"c-field-set__table-header"},O={class:"c-field-set__table-body"},R=["tabindex"],q=["title"],D=a("span",null,"拖拽调整顺序",-1),C={key:0,class:"c-field-set__table-footer"};var T=e({__name:"FieldSet",props:{fields:{type:Array,default:function(){return[]}},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:T,emit:j}){const P=e,B={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},G=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],H=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],I=l([]),J=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{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:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),L=()=>{j("save",{tableFields:Q()})},$=()=>{j("close")};function V(){I.value=M(),Y(),j("reset")}function z(e){return"fixedWay"===e.field?G:H}function K(e){const l={flex:"1 1 90px"};switch(e.type){case"text":Object.assign(l,{flex:"0 0 120px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"});break;case"checkbox":l.flex="1 1 60px";break;case"select":l.flex="1 1 80px";break;case"input":l.flex="1 1 100px"}return l}function M(){const e=JSON.parse(JSON.stringify(P.fields||[]));return Object.keys(B).forEach((l=>{e.forEach((e=>{"old"==P.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[B[l]]=1==e[l]:e[B[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}const Q=()=>{if("old"==P.type){const e=[];return I.value.length>0&&I.value.forEach(((l,t)=>{e.push({id:l.id,field:l.name,visible:l.show,sequence:t,sortable:l.sort,title:l.alias,fixed:l.fixedWay,minWidth:l.columnWidth,bold:l.bold,sortDirection:l.sortDirection,...P.isEdit?{required:l.required,editable:l.editable}:{}})})),e}return I.value};function X(e,l){return["editable","required"].includes(l)&&e[`${l}Disable`]||["sort"].includes(l)&&1==e.notParticipatingSort}function Y(){J.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&P.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=I.value.every((l=>!Reflect.has(l,e.field)));e.checkedAll=!Z(e.field)&&!l}}))}function Z(e){return I.value.some((l=>!X(l,e)&&!l[e]&&"0001"!=l.id))}return t((()=>P.fields),(e=>{(null==e?void 0:e.length)>0&&(I.value=M(),Y())}),{immediate:!0,deep:!0}),T({getTableFields:Q}),(l,t)=>(i(),d("div",U,[a("div",F,[(i(!0),d(o,null,c(J.value,((e,l)=>(i(),d(o,{key:l},[e.isShow?(i(),d("span",{key:0,class:"table-cell",style:s(K(e))},["checkbox"===e.type?(i(),n(r(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void I.value.forEach((e=>{X(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:f((()=>[u(p(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):h("v-if",!0),u(" "+p("checkbox"!==e.type?e.title:""),1)],4)):h("v-if",!0)],64)))),128))]),a("div",O,[b(r(W),{list:I.value,animation:"150","item-key":"id",tag:"ul"},{item:f((({element:e,index:l})=>[e.hide?h("v-if",!0):(i(),d("li",{key:0,tabindex:l},[(i(!0),d(o,null,c(J.value,((l,t)=>(i(),d(o,{key:t},[l.isShow?(i(),d("span",{key:0,class:"table-cell",title:e[l.field],style:s(K(l))},["text"===l.type?(i(),d(o,{key:0},[b(r(m),{trigger:"hover"},{trigger:f((()=>[b(r(g),{style:{"margin-right":"5px",top:"2px"},component:r(N)},null,8,["component"])])),default:f((()=>[D])),_:1}),u(" "+p(e[l.field]),1)],64)):h("v-if",!0),"checkbox"===l.type?v((i(),n(r(x),{key:1,disabled:X(e,l.field),checked:e[l.field],"onUpdate:checked":[t=>e[l.field]=t,e=>function(e,l){const t=!e||Z(l.field);l.checkedAll=!t}(e,l)]},null,8,["disabled","checked","onUpdate:checked"])),[[y,"0001"!=e.id]]):h("v-if",!0),"select"===l.type?v((i(),n(r(A),{key:2,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,options:z(l)},null,8,["value","onUpdate:value","options"])),[[y,"fixedWay"===l.field||"0001"!=e.id]]):h("v-if",!0),"input"===l.type?v((i(),n(r(_),{key:3,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.id]]):h("v-if",!0),"inputNumber"===l.type?(i(),n(r(E),{key:4,value:e[l.field],"onUpdate:value":t=>e[l.field]=t},null,8,["value","onUpdate:value"])):h("v-if",!0)],12,q)):h("v-if",!0)],64)))),128))],8,R))])),_:1},8,["list"])]),e.footerFlag?(i(),d("div",C,[h(" 底部按钮插槽 "),k(l.$slots,"footer",{},(()=>[b(r(S),{onPositiveClick:V},{trigger:f((()=>[b(r(w),{style:{"margin-right":"8px"}},{default:f((()=>[u("恢复默认设置")])),_:1})])),default:f((()=>[u(" 确认要恢复系统默认设置吗? ")])),_:1}),b(r(w),{style:{"margin-right":"8px"},onClick:$},{default:f((()=>[u("取消")])),_:1}),b(r(w),{type:"primary",onClick:L},{default:f((()=>[u("保存")])),_:1})]))])):h("v-if",!0)]))}});export{T as default};
@@ -16,4 +16,3 @@ export declare type FieldSetItem = Partial<{
16
16
  hide: boolean;
17
17
  [key: string]: any;
18
18
  }>;
19
- export declare type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'fixedWay' | 'alias' | 'columnWidth';
@@ -1 +1 @@
1
- .c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set ul{margin:0;padding:0}.c-field-set ul li{background:#fff}.c-field-set ul li:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set ul li:focus{background-color:#f2f2f2}.c-field-set ul li .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:52px;padding:5px 0}.c-field-set .table-cell{box-sizing:border-box;display:inline-block;padding:0 5px}.c-field-set__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set__table-body{flex:1;overflow-y:scroll}.c-field-set__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}
1
+ .c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set ul{margin:0;padding:0}.c-field-set ul li{align-items:center;background:#fff;border-bottom:1px solid #e8e8e8;display:flex;height:52px;padding:5px 0}.c-field-set ul li:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set ul li:focus{background-color:#f2f2f2}.c-field-set .table-cell{box-sizing:border-box;display:inline-block;padding:0 5px}.c-field-set__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set__table-body{flex:1;overflow-y:scroll}.c-field-set__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}