cnhis-design-vue 3.2.5-beta.53 → 3.2.5-beta.55

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 (242) hide show
  1. package/es/components/annotation-edit/src/type.d.ts +1 -1
  2. package/es/components/audio-sdk/src/components/recordingDialog.vue.d.ts +1 -1
  3. package/es/components/big-table/index.d.ts +7 -57
  4. package/es/components/big-table/src/BigTable.vue.d.ts +7 -57
  5. package/es/components/big-table/src/components/edit-form/edit-select.d.ts +1 -1
  6. package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
  7. package/es/components/big-table/src/hooks/useEdit.d.ts +27 -27
  8. package/es/components/big-table/src/hooks/useSeparateRow.d.ts +1 -1
  9. package/es/components/biunique-chat/index.d.ts +13 -1027
  10. package/es/components/biunique-chat/src/Index.vue.d.ts +13 -1027
  11. package/es/components/biunique-chat/src/components/ChatFile.vue.d.ts +2 -201
  12. package/es/components/biunique-chat/src/components/ChatFooter.vue.d.ts +1 -9
  13. package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +7 -408
  14. package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +2 -208
  15. package/es/components/biunique-chat/src/components/ChatRecord.vue.d.ts +1 -11
  16. package/es/components/biunique-chat/src/components/ChatSearch.vue.d.ts +2 -2
  17. package/es/components/biunique-chat/src/components/ChatSet.vue.d.ts +2 -187
  18. package/es/components/biunique-chat/src/components/PersonProfile.vue.d.ts +1 -9
  19. package/es/components/biunique-chat/src/types/index.d.ts +1 -1
  20. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.d.ts +1 -1
  21. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomContextPadProvider.d.ts +1 -1
  22. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPalette.d.ts +1 -1
  23. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.d.ts +1 -1
  24. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.d.ts +1 -1
  25. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/index.d.ts +13 -13
  26. package/es/components/bpmn-workflow/src/custom/customOtherModule/CustomPopupMenu.d.ts +2 -2
  27. package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.d.ts +9 -9
  28. package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.d.ts +2 -2
  29. package/es/components/button-print/index.d.ts +13 -2917
  30. package/es/components/button-print/src/ButtonPrint.vue.d.ts +13 -2917
  31. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -1162
  32. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +6 -1458
  33. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +5 -1457
  34. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +5 -1457
  35. package/es/components/calendar/index.d.ts +4 -4
  36. package/es/components/calendar/src/Calendar.vue.d.ts +4 -4
  37. package/es/components/calendar/src/types/index.d.ts +1 -1
  38. package/es/components/callback/src/components/dialog/drawer.vue.d.ts +2 -179
  39. package/es/components/callback/src/components/dialog/modal.vue.d.ts +1 -1
  40. package/es/components/callback/src/components/render/popupMaps.d.ts +120 -1701
  41. package/es/components/callback/src/types/index.d.ts +1 -1
  42. package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +2 -2
  43. package/es/components/card-reader-sdk/src/constants/index.d.ts +56 -56
  44. package/es/components/card-reader-sdk/src/utils/ensureUID2IdCard.d.ts +1 -1
  45. package/es/components/classification/index.d.ts +4 -14
  46. package/es/components/classification/src/components/search-filter/index.vue.d.ts +24 -34
  47. package/es/components/classification/src/components/set-classification/index.vue.d.ts +26 -36
  48. package/es/components/classification/src/components/table-modal/index.vue.d.ts +1 -1
  49. package/es/components/classification/src/index.vue.d.ts +4 -14
  50. package/es/components/config-provider/src/interface.d.ts +2 -2
  51. package/es/components/date-picker/src/DatePicker.vue.d.ts +1 -1
  52. package/es/components/drag-scroll/src/types.d.ts +2 -2
  53. package/es/components/expand-field/index.d.ts +41 -575
  54. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +56 -198
  55. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +36 -168
  56. package/es/components/expand-field/src/components/form.vue.d.ts +41 -526
  57. package/es/components/expand-field/src/index.vue.d.ts +41 -575
  58. package/es/components/expand-field/src/types/index.d.ts +1 -1
  59. package/es/components/fabric-chart/index.d.ts +10 -10
  60. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +10 -10
  61. package/es/components/fabric-chart/src/components/PopupMenu.d.ts +3 -3
  62. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +1 -1
  63. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.d.ts +1 -1
  64. package/es/components/fabric-chart/src/hooks/temperature/useShadow.d.ts +1 -1
  65. package/es/components/fabric-chart/src/interface.d.ts +9 -9
  66. package/es/components/field-set/index.d.ts +5 -52
  67. package/es/components/field-set/src/FieldColor.vue.d.ts +14 -606
  68. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  69. package/es/components/field-set/src/FieldFilter.vue.d.ts +6 -19
  70. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  71. package/es/components/field-set/src/FieldSet.vue.d.ts +8 -9
  72. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  73. package/es/components/field-set/src/Index.vue.d.ts +6 -53
  74. package/es/components/field-set/src/Index.vue2.js +1 -1
  75. package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
  76. package/es/components/field-set/src/components/condition.vue.d.ts +2 -2
  77. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +12 -590
  78. package/es/components/field-set/src/components/edit-filter.vue.d.ts +3 -3
  79. package/es/components/field-set/src/constants/index.d.ts +1 -1
  80. package/es/components/field-set/src/types/index.d.ts +8 -8
  81. package/es/components/field-set/style/index.css +1 -1
  82. package/es/components/form-config/index.d.ts +62 -4785
  83. package/es/components/form-config/src/FormConfig.vue.d.ts +41 -4764
  84. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -98
  85. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +2 -2
  86. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +22 -4651
  87. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +3 -36
  88. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +3 -3
  89. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
  90. package/es/components/form-config/src/hooks/usePresetRenderer.d.ts +1 -1
  91. package/es/components/form-config/src/types/index.d.ts +8 -8
  92. package/es/components/form-render/index.d.ts +15 -75
  93. package/es/components/form-render/src/FormRender.vue.d.ts +10 -70
  94. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +15 -75
  95. package/es/components/form-render/src/components/renderer/combination/combination.d.ts +2 -2
  96. package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +2 -2
  97. package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +1 -1
  98. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  99. package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
  100. package/es/components/form-render/src/components/renderer/index.d.ts +1 -1
  101. package/es/components/form-render/src/components/renderer/inputGroup.d.ts +1 -11
  102. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +4 -4
  103. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +10 -10
  104. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +15 -15
  105. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  106. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +2 -2
  107. package/es/components/form-render/src/components/renderer/select.d.ts +3 -3
  108. package/es/components/form-render/src/hooks/useChangeContext.d.ts +1 -1
  109. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -4
  110. package/es/components/form-render/src/hooks/useFormContext.d.ts +1 -11
  111. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +1 -19
  112. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  113. package/es/components/form-render/src/types/fieldItem.d.ts +10 -10
  114. package/es/components/form-render/src/types/index.d.ts +13 -13
  115. package/es/components/form-render/src/utils/index.d.ts +1 -1
  116. package/es/components/iho-table/index.d.ts +46 -1567
  117. package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -1561
  118. package/es/components/iho-table/src/constants/index.d.ts +2 -2
  119. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -4
  120. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +18 -18
  121. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +61 -61
  122. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -1
  123. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +1 -1
  124. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.d.ts +1 -1
  125. package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
  126. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +2 -335
  127. package/es/components/iho-table/src/plugins/pagerScrollPlugin/types.d.ts +1 -1
  128. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +16 -16
  129. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
  130. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  131. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
  132. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.d.ts +1 -1
  133. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.d.ts +1 -1
  134. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.d.ts +1 -1
  135. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/types.d.ts +1 -1
  136. package/es/components/iho-table/src/types/index.d.ts +17 -17
  137. package/es/components/iho-table/src/types/pluginType.d.ts +13 -13
  138. package/es/components/index.css +1 -1
  139. package/es/components/info-header/index.d.ts +65 -1723
  140. package/es/components/info-header/src/InfoHeader.vue.d.ts +42 -1700
  141. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +27 -1547
  142. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +16 -1554
  143. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -1629
  144. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +59 -119
  145. package/es/components/info-header/src/types/index.d.ts +4 -3
  146. package/es/components/keyboard/index.d.ts +1 -1
  147. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  148. package/es/components/map/src/types/index.d.ts +2 -2
  149. package/es/components/quick-search/index.d.ts +1 -295
  150. package/es/components/quick-search/src/index.vue.d.ts +1 -295
  151. package/es/components/recommend-search/index.d.ts +28 -28
  152. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +28 -28
  153. package/es/components/recommend-search/src/components/BaseSearch.d.ts +4 -4
  154. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +10 -10
  155. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +11 -11
  156. package/es/components/recommend-search/src/types/index.d.ts +2 -2
  157. package/es/components/scale-view/index.d.ts +6 -300
  158. package/es/components/scale-view/src/ScaleView.vue.d.ts +6 -300
  159. package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +2 -2
  160. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +2 -2
  161. package/es/components/scale-view/src/hooks/use-component.d.ts +3 -15
  162. package/es/components/scale-view/src/types/index.d.ts +1 -1
  163. package/es/components/search-cascader/index.d.ts +14 -14
  164. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +15 -15
  165. package/es/components/search-cascader/src/components/SearchMenu.d.ts +3 -3
  166. package/es/components/select-label/index.d.ts +3 -21
  167. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -7
  168. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -7
  169. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts +1 -7
  170. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts +1 -7
  171. package/es/components/select-label/src/index.vue.d.ts +2 -14
  172. package/es/components/select-label/src/types/index.d.ts +3 -3
  173. package/es/components/select-person/index.d.ts +36 -168
  174. package/es/components/select-person/src/SearchMultiple.vue.d.ts +3 -52
  175. package/es/components/select-person/src/SearchOrgAndStaff.vue.d.ts +2 -2
  176. package/es/components/select-person/src/SelectPerson.vue.d.ts +9 -117
  177. package/es/components/shortcut-provider/index.d.ts +1 -1
  178. package/es/components/shortcut-provider/src/types/index.d.ts +1 -1
  179. package/es/components/shortcut-setter/index.d.ts +23 -1606
  180. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +14 -1597
  181. package/es/components/step-notice/index.d.ts +94 -1615
  182. package/es/components/step-notice/src/StepNotice.vue.d.ts +79 -1600
  183. package/es/components/step-notice/src/components/NoticeItem.vue.d.ts +22 -22
  184. package/es/components/step-notice/src/components/NoticeItemAside.vue.d.ts +2 -2
  185. package/es/components/step-notice/src/components/NoticeOperationList.vue.d.ts +16 -16
  186. package/es/components/step-notice/src/hooks/useTheme.d.ts +1 -1
  187. package/es/components/step-notice/src/utils.d.ts +1 -1
  188. package/es/components/steps-wheel/index.d.ts +1 -1
  189. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
  190. package/es/components/table-export-field/index.d.ts +3 -630
  191. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +2 -51
  192. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -581
  193. package/es/components/table-export-field/src/index.vue.d.ts +5 -632
  194. package/es/components/table-export-field/src/types/index.d.ts +1 -1
  195. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +2 -2
  196. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +2 -2
  197. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +2 -2
  198. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +2 -2
  199. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +22 -32
  200. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +2 -2
  201. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +2 -2
  202. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.d.ts +1 -11
  203. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +15 -15
  204. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +1 -1
  205. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +22 -32
  206. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +22 -32
  207. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -50
  208. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +3 -3
  209. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +1 -1
  210. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +1 -1
  211. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +4 -4
  212. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +1 -1
  213. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +2 -2
  214. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.d.ts +1 -11
  215. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +16 -16
  216. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +1 -1
  217. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +60 -119
  218. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +59 -108
  219. package/es/components/table-filter/src/types/index.d.ts +25 -25
  220. package/es/components/time-line/index.d.ts +1 -48
  221. package/es/components/time-line/src/TimeLine.vue.d.ts +4 -51
  222. package/es/components/tooth-bitmap/index.d.ts +3 -3
  223. package/es/components/tooth-bitmap/src/ToothBitmap.vue.d.ts +1 -1
  224. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +3 -3
  225. package/es/shared/components/SlotRender/SlotRender.d.ts +4 -4
  226. package/es/shared/components/VueDraggable/src/core/renderHelper.d.ts +1 -1
  227. package/es/shared/hooks/useTheme.d.ts +2 -2
  228. package/es/shared/package.json.js +1 -1
  229. package/es/shared/types/business.d.ts +1 -1
  230. package/es/shared/types/index.d.ts +15 -15
  231. package/es/shared/utils/tapable/AsyncParallelBailHook.d.ts +1 -1
  232. package/es/shared/utils/tapable/AsyncParallelHook.d.ts +1 -1
  233. package/es/shared/utils/tapable/AsyncSeriesBailHook.d.ts +1 -1
  234. package/es/shared/utils/tapable/AsyncSeriesHook.d.ts +1 -1
  235. package/es/shared/utils/tapable/AsyncSeriesLoopHook.d.ts +1 -1
  236. package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.d.ts +1 -1
  237. package/es/shared/utils/tapable/SyncBailHook.d.ts +1 -1
  238. package/es/shared/utils/tapable/SyncHook.d.ts +1 -1
  239. package/es/shared/utils/tapable/SyncLoopHook.d.ts +1 -1
  240. package/es/shared/utils/tapable/SyncWaterfallHook.d.ts +1 -1
  241. package/es/shared/utils/vexutils.d.ts +2 -2
  242. package/package.json +5 -5
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,reactive as t,openBlock as i,createElementBlock as o,createElementVNode as a,Fragment as s,renderList as r,normalizeStyle as u,unref as d,toDisplayString as n,createCommentVNode as f,createVNode as c,withCtx as p,mergeProps as m,renderSlot as v,createTextVNode as y,createBlock as b}from"vue";import{NButton as h}from"naive-ui";import g from"../../../shared/components/VueDraggable/src/vuedraggable.js";import x from"./components/Row.vue.js";import k from"./components/edit-dialog.vue.js";import{cloneDeep as w,omit as _}from"lodash-es";import{setColorInfo as C,setStyle as F}from"./utils/index.js";import{uuidGenerator as j}from"../../../shared/utils/index.js";import{format as A}from"date-fns";const D={class:"main-wrapper"},S={class:"main-wrapper__table-header"},V={class:"main-wrapper__table-body",ref:"tableBodyRef"},B=["tabindex"],E={key:0,class:"main-wrapper__table-footer"};var R=e({__name:"FieldColor",props:{rowHeight:{type:Number,default:52},footerFlag:{type:Boolean,default:!0},isFieldColor:{type:Boolean,default:!0},defaultList:{type:Array,default:()=>[]}},emits:["save","close"],setup(e,{expose:R,emit:H}){const L=e,M=l(!1),N=l(null),U=l([]),Y=l([{title:"名称",type:"text",field:"name"},{title:"字段",type:"text",field:"title"},{title:"创建时间",type:"text",field:"createDate"},{title:"效果",type:"text",field:"result"},{title:"颜色",type:"color",field:"color"},{title:"颜色应用于",type:"select",checkedAll:!1,disabledAll:!1,field:"colorScope"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"status"},{title:"操作",type:"custom",field:"opt"}]),I=t({columns:Y,data:U,onEdit:function(e){N.value=w(e),M.value=!0},isHighlightRow:!L.isFieldColor});function T(){H("save")}function $(){H("close")}function q(){N.value=null,M.value=!0}function z(e){if(C(e),N.value){const l=U.value.findIndex((l=>l.uuid===e.uuid));U.value.splice(l,1,e)}else{const l=A(new Date,"yyyy-MM-dd");U.value.push({...e,createDate:l,uuid:j()})}}return Y.value.forEach((e=>{e.isShow=function(e){return!("result"===e.field&&L.isFieldColor||"title"===e.field&&!L.isFieldColor)}(e)})),U.value=L.defaultList.concat(U.value),U.value.forEach((e=>{e.uuid=j(),e.status="Y"===e.status,C(e)})),R({getTableFields:function(){return U.value.map((e=>{const l=w(e);return l.status=l.status?"Y":"N",_(l,["uuid","style","result"])}))}}),(l,t)=>(i(),o("div",D,[a("div",S,[(i(!0),o(s,null,r(Y.value,((e,l)=>(i(),o(s,{key:l},[e.isShow?(i(),o("span",{key:0,class:"table-cell",style:u(d(F)(e,l))},n(e.title),5)):f("v-if",!0)],64)))),128))]),a("div",V,[c(d(g),{modelValue:U.value,"onUpdate:modelValue":t[0]||(t[0]=e=>U.value=e),animation:"150","item-key":"id",draggable:".item"},{item:p((({element:e,index:l})=>[e.hide?f("v-if",!0):(i(),o("div",{key:0,class:"item",tabindex:l},[c(x,m(I,{element:e,index:l}),null,16,["element","index"])],8,B))])),_:1},8,["modelValue"])],512),e.footerFlag?(i(),o("div",E,[f(" 底部按钮插槽 "),v(l.$slots,"colorSetFooter",{},(()=>[c(d(h),{style:{"margin-right":"8px"},onClick:$},{default:p((()=>[y("取消")])),_:1}),c(d(h),{style:{"margin-right":"8px"},onClick:q},{default:p((()=>[y("新增")])),_:1}),c(d(h),{type:"primary",onClick:T},{default:p((()=>[y("保存")])),_:1})]))])):f("v-if",!0),M.value?(i(),b(k,{key:1,visible:M.value,"onUpdate:visible":t[1]||(t[1]=e=>M.value=e),"is-field-color":e.isFieldColor,row:N.value,onConfirm:z},null,8,["visible","is-field-color","row"])):f("v-if",!0)]))}});export{R as default};
1
+ import{defineComponent as e,ref as l,reactive as t,openBlock as i,createElementBlock as o,createElementVNode as a,Fragment as s,renderList as r,normalizeStyle as u,unref as d,toDisplayString as n,createCommentVNode as f,createVNode as c,withCtx as p,mergeProps as m,renderSlot as v,createTextVNode as y,createBlock as b}from"vue";import{NButton as h}from"naive-ui";import x from"../../../shared/components/VueDraggable/src/vuedraggable.js";import g from"./components/Row.vue.js";import k from"./components/edit-dialog.vue.js";import{cloneDeep as _,omit as w}from"lodash-es";import{setColorInfo as C,setStyle as F}from"./utils/index.js";import{uuidGenerator as j}from"../../../shared/utils/index.js";import{format as A}from"date-fns";const D={class:"main-wrapper"},S={class:"main-wrapper__table-header"},V={class:"main-wrapper__table-body",ref:"tableBodyRef"},B=["tabindex"],E={key:0,class:"main-wrapper__table-footer"};var R=e({__name:"FieldColor",props:{footerFlag:{type:Boolean,default:!0},isFieldColor:{type:Boolean,default:!0},defaultList:{type:Array,default:()=>[]}},emits:["save","close"],setup(e,{expose:R,emit:L}){const M=e,U=l(!1),Y=l(null),H=l([]),I=l([{title:"名称",type:"text",field:"name"},{title:"字段",type:"text",field:"title"},{title:"创建时间",type:"text",field:"createDate"},{title:"效果",type:"text",field:"result"},{title:"颜色",type:"color",field:"color"},{title:"颜色应用于",type:"select",checkedAll:!1,disabledAll:!1,field:"colorScope"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"status"},{title:"操作",type:"custom",field:"opt"}]),N=t({columns:I,data:H,onEdit:function(e){Y.value=_(e),U.value=!0},isHighlightRow:!M.isFieldColor});function T(){L("save")}function $(){L("close")}function q(){Y.value=null,U.value=!0}function z(e){if(C(e),Y.value){const l=H.value.findIndex((l=>l.uuid===e.uuid));H.value.splice(l,1,e)}else{const l=A(new Date,"yyyy-MM-dd");H.value.push({...e,createDate:l,uuid:j()})}}return I.value.forEach((e=>{e.isShow=function(e){return!("result"===e.field&&M.isFieldColor||"title"===e.field&&!M.isFieldColor)}(e)})),H.value=M.defaultList.concat(H.value),H.value.forEach((e=>{e.uuid=j(),e.status="Y"===e.status,C(e)})),R({getTableFields:function(){return H.value.map((e=>{const l=_(e);return l.status=l.status?"Y":"N",w(l,["uuid","style","result"])}))}}),(l,t)=>(i(),o("div",D,[a("div",S,[(i(!0),o(s,null,r(I.value,((e,l)=>(i(),o(s,{key:l},[e.isShow?(i(),o("span",{key:0,class:"table-cell",style:u(d(F)(e,l))},n(e.title),5)):f("v-if",!0)],64)))),128))]),a("div",V,[c(d(x),{modelValue:H.value,"onUpdate:modelValue":t[0]||(t[0]=e=>H.value=e),animation:"150","item-key":"id",draggable:".item"},{item:p((({element:e,index:l})=>[e.hide?f("v-if",!0):(i(),o("div",{key:0,class:"item",tabindex:l},[c(g,m(N,{element:e,index:l}),null,16,["element","index"])],8,B))])),_:1},8,["modelValue"])],512),e.footerFlag?(i(),o("div",E,[f(" 底部按钮插槽 "),v(l.$slots,"colorSetFooter",{},(()=>[c(d(h),{style:{"margin-right":"8px"},onClick:$},{default:p((()=>[y("取消")])),_:1}),c(d(h),{style:{"margin-right":"8px"},onClick:q},{default:p((()=>[y("新增")])),_:1}),c(d(h),{type:"primary",onClick:T},{default:p((()=>[y("保存")])),_:1})]))])):f("v-if",!0),U.value?(i(),b(k,{key:1,visible:U.value,"onUpdate:visible":t[1]||(t[1]=e=>U.value=e),"is-field-color":e.isFieldColor,row:Y.value,onConfirm:z},null,8,["visible","is-field-color","row"])):f("v-if",!0)]))}});export{R as default};
@@ -4,10 +4,6 @@ import { FilterSetItem, FieldSetColumnItem } from '../../../components/field-set
4
4
  import { AnyObject } from '../../../shared/types';
5
5
  import { COLUMNLIST_MAP } from './constants/filter';
6
6
  declare const _default: import("vue").DefineComponent<{
7
- rowHeight: {
8
- type: NumberConstructor;
9
- default: number;
10
- };
11
7
  footerFlag: {
12
8
  type: BooleanConstructor;
13
9
  default: boolean;
@@ -18,10 +14,6 @@ declare const _default: import("vue").DefineComponent<{
18
14
  };
19
15
  }, {
20
16
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
21
- rowHeight: {
22
- type: NumberConstructor;
23
- default: number;
24
- };
25
17
  footerFlag: {
26
18
  type: BooleanConstructor;
27
19
  default: boolean;
@@ -31,15 +23,15 @@ declare const _default: import("vue").DefineComponent<{
31
23
  default: () => never[];
32
24
  };
33
25
  }>> & {
34
- onReset?: ((...args: any[]) => any) | undefined;
35
26
  onSave?: ((...args: any[]) => any) | undefined;
36
27
  onClose?: ((...args: any[]) => any) | undefined;
28
+ onReset?: ((...args: any[]) => any) | undefined;
37
29
  }>>;
38
30
  emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
39
31
  columns: import("vue").Ref<{
40
32
  [x: string]: any;
41
33
  title: string;
42
- type: "color" | "checkbox" | "text" | "input" | "select" | "custom" | "inputNumber";
34
+ type: "color" | "text" | "checkbox" | "input" | "select" | "custom" | "inputNumber";
43
35
  field: string;
44
36
  checkedAll?: boolean | undefined;
45
37
  disabledAll?: boolean | undefined;
@@ -66,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
66
58
  columns: {
67
59
  [x: string]: any;
68
60
  title: string;
69
- type: "color" | "checkbox" | "text" | "input" | "select" | "custom" | "inputNumber";
61
+ type: "color" | "text" | "checkbox" | "input" | "select" | "custom" | "inputNumber";
70
62
  field: string;
71
63
  checkedAll?: boolean | undefined;
72
64
  disabledAll?: boolean | undefined;
@@ -102,7 +94,7 @@ declare const _default: import("vue").DefineComponent<{
102
94
  checked: boolean;
103
95
  column: AnyObject;
104
96
  }) => void;
105
- getType: (field: keyof typeof COLUMNLIST_MAP) => "checkbox" | "text" | "input" | "select" | "inputNumber";
97
+ getType: (field: keyof typeof COLUMNLIST_MAP) => "text" | "checkbox" | "input" | "select" | "inputNumber";
106
98
  initColumns: () => void;
107
99
  isNoAllCheck: (field: string) => boolean;
108
100
  NButton: any;
@@ -475,8 +467,8 @@ declare const _default: import("vue").DefineComponent<{
475
467
  requiredDisable: boolean;
476
468
  hide: boolean;
477
469
  }>[];
478
- columns: FieldSetColumnItem[];
479
470
  index: number;
471
+ columns: FieldSetColumnItem[];
480
472
  element: Partial<{
481
473
  [key: string]: any;
482
474
  id: string;
@@ -504,10 +496,6 @@ declare const _default: import("vue").DefineComponent<{
504
496
  }>;
505
497
  setStyle: typeof setStyle;
506
498
  }, 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<{
507
- rowHeight: {
508
- type: NumberConstructor;
509
- default: number;
510
- };
511
499
  footerFlag: {
512
500
  type: BooleanConstructor;
513
501
  default: boolean;
@@ -517,12 +505,11 @@ declare const _default: import("vue").DefineComponent<{
517
505
  default: () => never[];
518
506
  };
519
507
  }>> & {
520
- onReset?: ((...args: any[]) => any) | undefined;
521
508
  onSave?: ((...args: any[]) => any) | undefined;
522
509
  onClose?: ((...args: any[]) => any) | undefined;
510
+ onReset?: ((...args: any[]) => any) | undefined;
523
511
  }, {
524
512
  defaultList: FilterSetItem[];
525
- rowHeight: number;
526
513
  footerFlag: boolean;
527
514
  }>;
528
515
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,reactive as i,watch as l,openBlock as a,createElementBlock as d,createElementVNode as r,Fragment as o,renderList as c,normalizeStyle as s,unref as n,createBlock as u,withCtx as p,createTextVNode as m,toDisplayString as f,createCommentVNode as h,createVNode as v,mergeProps as k,renderSlot as b}from"vue";import{NCheckbox as x,NPopconfirm as y,NButton as g}from"naive-ui";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import w from"./components/Row.vue.js";import{cloneDeep as A}from"lodash-es";import{isShowExplicitRequired as F,setStyle as R}from"./utils/index.js";import{COLUMNLIST_MAP as j}from"./constants/filter.js";const C={class:"main-wrapper"},q={class:"main-wrapper__table-header"},H={class:"main-wrapper__table-body",ref:"tableBodyRef"},V=["tabindex"],S={key:0,class:"main-wrapper__table-footer"};var U=e({__name:"FieldFilter",props:{rowHeight:{type:Number,default:52},footerFlag:{type:Boolean,default:!0},defaultList:{type:Array,default:()=>[]}},emits:["save","close","reset"],setup(e,{expose:U,emit:E}){const L=e,B=t([]),N=t([]),O=i({columns:B,data:N,onUpdateChecked:function({checked:e,column:t}){const i=!e||z(t.field);t.checkedAll=!i}}),T=()=>{E("save")},D=()=>{E("close")};function P(){N.value=A(L.defaultList),$(),E("reset")}function $(){B.value=Object.entries(j).map((([e,t])=>{const i=function(e){return e?["isShowSearch","filterExplicit","explicitRequired"].includes(e)?"checkbox":["defaultValue"].includes(e)?"select":["customTitle"].includes(e)?"input":["width"].includes(e)?"inputNumber":"text":"text"}(e),l={isShow:!0,title:t,type:i,field:e};return"checkbox"===i&&Object.assign(l,{checkedAll:!z(e),disabledAll:!1,isHeadCheckHide:["filterExplicit","explicitRequired"].includes(e)}),l}))}function z(e){return N.value.some((t=>("explicitRequired"!==e||F(t))&&!t[e]))}return l((()=>L.defaultList),(e=>{e.length>0&&(N.value=A(e),$())}),{immediate:!0,deep:!0}),U({getTableFields:()=>N.value}),(t,i)=>(a(),d("div",C,[r("div",q,[(a(!0),d(o,null,c(B.value,((e,t)=>(a(),d(o,{key:t},[e.isShow?(a(),d("span",{key:0,class:"table-cell",style:s(n(R)(e,t))},["checkbox"!==e.type||e.isHeadCheckHide?(a(),d(o,{key:1},[m(f(e.title),1)],64)):(a(),u(n(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[t=>e.checkedAll=t,t=>{return i=t,l=e.field,void N.value.forEach((e=>{("explicitRequired"!==l||"explicitRequired"===l&&F(e))&&(e[l]=i)}));var i,l}],disabled:e.disabledAll},{default:p((()=>[m(f(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"]))],4)):h("v-if",!0)],64)))),128))]),r("div",H,[v(n(_),{modelValue:N.value,"onUpdate:modelValue":i[0]||(i[0]=e=>N.value=e),animation:"150","item-key":"id",draggable:".item"},{item:p((({element:e,index:t})=>[e.hide?h("v-if",!0):(a(),d("div",{key:0,class:"item",tabindex:t},[v(w,k(O,{element:e,idx:t+1}),null,16,["element","idx"])],8,V))])),_:1},8,["modelValue"])],512),e.footerFlag?(a(),d("div",S,[h(" 底部按钮插槽 "),b(t.$slots,"fieldFilterFooter",{},(()=>[v(n(y),{onPositiveClick:P},{trigger:p((()=>[v(n(g),{style:{"margin-right":"8px"}},{default:p((()=>[m("恢复默认设置")])),_:1})])),default:p((()=>[m(" 确认要恢复系统默认设置吗? ")])),_:1}),v(n(g),{style:{"margin-right":"8px"},onClick:D},{default:p((()=>[m("取消")])),_:1}),v(n(g),{type:"primary",onClick:T},{default:p((()=>[m("保存")])),_:1})]))])):h("v-if",!0)]))}});export{U as default};
1
+ import{defineComponent as e,ref as t,reactive as i,watch as l,openBlock as a,createElementBlock as d,createElementVNode as r,Fragment as c,renderList as o,normalizeStyle as s,unref as n,createBlock as u,withCtx as p,createTextVNode as m,toDisplayString as f,createCommentVNode as h,createVNode as v,mergeProps as k,renderSlot as b}from"vue";import{NCheckbox as x,NPopconfirm as y,NButton as g}from"naive-ui";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import w from"./components/Row.vue.js";import{cloneDeep as A}from"lodash-es";import{isShowExplicitRequired as F,setStyle as R}from"./utils/index.js";import{COLUMNLIST_MAP as j}from"./constants/filter.js";const C={class:"main-wrapper"},q={class:"main-wrapper__table-header"},V={class:"main-wrapper__table-body",ref:"tableBodyRef"},H=["tabindex"],S={key:0,class:"main-wrapper__table-footer"};var U=e({__name:"FieldFilter",props:{footerFlag:{type:Boolean,default:!0},defaultList:{type:Array,default:()=>[]}},emits:["save","close","reset"],setup(e,{expose:U,emit:E}){const L=e,B=t([]),O=t([]),T=i({columns:B,data:O,onUpdateChecked:function({checked:e,column:t}){const i=!e||z(t.field);t.checkedAll=!i}}),D=()=>{E("save")},N=()=>{E("close")};function P(){O.value=A(L.defaultList),$(),E("reset")}function $(){B.value=Object.entries(j).map((([e,t])=>{const i=function(e){return e?["isShowSearch","filterExplicit","explicitRequired"].includes(e)?"checkbox":["defaultValue"].includes(e)?"select":["customTitle"].includes(e)?"input":["width"].includes(e)?"inputNumber":"text":"text"}(e),l={isShow:!0,title:t,type:i,field:e};return"checkbox"===i&&Object.assign(l,{checkedAll:!z(e),disabledAll:!1,isHeadCheckHide:["filterExplicit","explicitRequired"].includes(e)}),l}))}function z(e){return O.value.some((t=>("explicitRequired"!==e||F(t))&&!t[e]))}return l((()=>L.defaultList),(e=>{e.length>0&&(O.value=A(e),$())}),{immediate:!0,deep:!0}),U({getTableFields:()=>O.value}),(t,i)=>(a(),d("div",C,[r("div",q,[(a(!0),d(c,null,o(B.value,((e,t)=>(a(),d(c,{key:t},[e.isShow?(a(),d("span",{key:0,class:"table-cell",style:s(n(R)(e,t))},["checkbox"!==e.type||e.isHeadCheckHide?(a(),d(c,{key:1},[m(f(e.title),1)],64)):(a(),u(n(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[t=>e.checkedAll=t,t=>{return i=t,l=e.field,void O.value.forEach((e=>{("explicitRequired"!==l||"explicitRequired"===l&&F(e))&&(e[l]=i)}));var i,l}],disabled:e.disabledAll},{default:p((()=>[m(f(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"]))],4)):h("v-if",!0)],64)))),128))]),r("div",V,[v(n(_),{modelValue:O.value,"onUpdate:modelValue":i[0]||(i[0]=e=>O.value=e),animation:"150","item-key":"id",draggable:".item"},{item:p((({element:e,index:t})=>[e.hide?h("v-if",!0):(a(),d("div",{key:0,class:"item",tabindex:t},[v(w,k(T,{element:e,idx:t+1}),null,16,["element","idx"])],8,H))])),_:1},8,["modelValue"])],512),e.footerFlag?(a(),d("div",S,[h(" 底部按钮插槽 "),b(t.$slots,"fieldFilterFooter",{},(()=>[v(n(y),{onPositiveClick:P},{trigger:p((()=>[v(n(g),{style:{"margin-right":"8px"}},{default:p((()=>[m("恢复默认设置")])),_:1})])),default:p((()=>[m(" 确认要恢复系统默认设置吗? ")])),_:1}),v(n(g),{style:{"margin-right":"8px"},onClick:N},{default:p((()=>[m("取消")])),_:1}),v(n(g),{type:"primary",onClick:D},{default:p((()=>[m("保存")])),_:1})]))])):h("v-if",!0)]))}});export{U as default};
@@ -1,4 +1,3 @@
1
- /// <reference types="lodash" />
2
1
  import { PropType } from 'vue';
3
2
  import { setStyle, isDraggableItem } from './utils';
4
3
  import { FieldSetItem, FieldSetColumnName, FieldSetColumnItem } from '../../../components/field-set/src/types';
@@ -151,9 +150,9 @@ declare const _default: import("vue").DefineComponent<{
151
150
  default: string;
152
151
  };
153
152
  }>> & {
154
- onReset?: ((...args: any[]) => any) | undefined;
155
153
  onSave?: ((...args: any[]) => any) | undefined;
156
154
  onClose?: ((...args: any[]) => any) | undefined;
155
+ onReset?: ((...args: any[]) => any) | undefined;
157
156
  }>>;
158
157
  emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
159
158
  keyword: import("vue").Ref<string>;
@@ -162,7 +161,7 @@ declare const _default: import("vue").DefineComponent<{
162
161
  columns: import("vue").Ref<{
163
162
  [x: string]: any;
164
163
  title: string;
165
- type: "color" | "checkbox" | "text" | "input" | "select" | "custom" | "inputNumber";
164
+ type: "color" | "text" | "checkbox" | "input" | "select" | "custom" | "inputNumber";
166
165
  field: string;
167
166
  checkedAll?: boolean | undefined;
168
167
  disabledAll?: boolean | undefined;
@@ -178,7 +177,7 @@ declare const _default: import("vue").DefineComponent<{
178
177
  columns: {
179
178
  [x: string]: any;
180
179
  title: string;
181
- type: "color" | "checkbox" | "text" | "input" | "select" | "custom" | "inputNumber";
180
+ type: "color" | "text" | "checkbox" | "input" | "select" | "custom" | "inputNumber";
182
181
  field: string;
183
182
  checkedAll?: boolean | undefined;
184
183
  disabledAll?: boolean | undefined;
@@ -206,8 +205,8 @@ declare const _default: import("vue").DefineComponent<{
206
205
  onCancle: () => void;
207
206
  reset: () => void;
208
207
  getShowColumn: (column: AnyObject) => boolean;
209
- initFields: () => AnyObject[];
210
- handleGroup: (fields: AnyObject[]) => AnyObject[];
208
+ initFields: () => (AnyObject | AnyObject[])[];
209
+ handleGroup: (fields: AnyObject[]) => (AnyObject | AnyObject[])[];
211
210
  getTableFields: () => import("lodash").Omit<never, "uuid">[];
212
211
  handleSearch: () => void;
213
212
  isHighlight: (element: FieldSetItem) => boolean | undefined;
@@ -592,8 +591,8 @@ declare const _default: import("vue").DefineComponent<{
592
591
  requiredDisable: boolean;
593
592
  hide: boolean;
594
593
  }>[];
595
- columns: FieldSetColumnItem[];
596
594
  index: number;
595
+ columns: FieldSetColumnItem[];
597
596
  element: Partial<{
598
597
  [key: string]: any;
599
598
  id: string;
@@ -698,11 +697,12 @@ declare const _default: import("vue").DefineComponent<{
698
697
  default: string;
699
698
  };
700
699
  }>> & {
701
- onReset?: ((...args: any[]) => any) | undefined;
702
700
  onSave?: ((...args: any[]) => any) | undefined;
703
701
  onClose?: ((...args: any[]) => any) | undefined;
702
+ onReset?: ((...args: any[]) => any) | undefined;
704
703
  }, {
705
704
  type: string;
705
+ isEdit: boolean;
706
706
  fields: Partial<{
707
707
  [key: string]: any;
708
708
  id: string;
@@ -721,7 +721,6 @@ declare const _default: import("vue").DefineComponent<{
721
721
  requiredDisable: boolean;
722
722
  hide: boolean;
723
723
  }>[];
724
- isEdit: boolean;
725
724
  rowDraggable: boolean;
726
725
  showSeq: boolean;
727
726
  footerFlag: boolean;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,ref as t,computed as i,reactive as o,watch as d,openBlock as a,createElementBlock as r,createBlock as s,unref as n,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 k,normalizeClass as x,mergeProps as w,renderSlot as S}from"vue";import{NInput as A,NCheckbox as _,NTooltip as C,NIcon as D,NPopconfirm as F,NButton as W}from"naive-ui";import E from"../../../shared/components/VueDraggable/src/vuedraggable.js";import H from"./components/Row.vue.js";import{isArray as M,cloneDeep as N,isString as P,omit as q}from"lodash-es";import{isDisable as B,setStyle as R,isDraggableItem as V,isDraggable as j,getGroupTree as I}from"./utils/index.js";import{uuidGenerator as U}from"../../../shared/utils/index.js";import{HelpCircleSharp as O}from"@vicons/ionicons5";const T={class:"main-wrapper"},K={class:"main-wrapper__table-header"},G=h("span",null,"数值越小,优先级越高",-1),L=["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"}},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(),Z=t(""),ee=t(),le=t([]),te=t([{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"}]),ie=i((()=>le.value.flat())),oe=i((()=>ie.value.some((e=>e.feildDescribe)))),de=o({columns:te,data:ie,onUpdateChecked:function({checked:e,column:l}){const t=!e||pe(l.field);l.checkedAll=!t},draggable:Q.rowDraggable,isFieldSet:!0,fieldDescribeMode:Q.fieldDescribeMode}),ae={keyword:Z.value,idx:0,startIdx:0},re=()=>{J("save")},se=()=>{J("close")};function ne(){le.value=ue(),he(),J("reset")}function ue(){const e=N(Q.fields).map((e=>({...e,uuid:U()})));return Object.keys(X).forEach((l=>{e.forEach((e=>{"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=!!j(e)}))})),function(e){if(Q.groupSetting){return I(Q.groupSetting,e).reduce(((t,i)=>{const o=P(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 ce(){const e=ae.keyword!==Z.value;let l=Z.value?ie.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(Z.value))return!!e||t>ae.idx})):0;-1!==l||e||(l=ae.startIdx),ee.value.scrollTop=Y.rowHeight*l,Object.assign(ae,{keyword:Z.value,idx:l},e?{startIdx:l}:{})}function fe(e){var l;return!!Z.value&&(null==(l=e.title)?void 0:l.includes(Z.value))}function he(){var e,l;(null==(e=Q.showColumnNames)?void 0:e.length)&&(te.value=te.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=Q.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=Q.customColumns)?void 0:l.length)&&te.value.push(...Q.customColumns),"column"===Q.fieldDescribeMode&&oe.value&&te.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),Q.showSeq&&te.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),te.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!Q.isEdit||"sortPriority"===e.field&&!Q.showSortPriority||"isShowHeaderFilter"===e.field&&!Q.showHeadFilter)}(e),"checkbox"===e.type){const l=le.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!pe(e.field)&&!l}}))}function pe(e){return le.value.flat().some((l=>!B(l,e)&&!l[e]&&"0001"!=l.id))}function me(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=ue(),he())}),{immediate:!0,deep:!0}),z({getTableFields:function(){let e=[];return e="old"==Q.type?ie.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,...Q.isEdit?{required:e.required,editable:e.editable}:{}}))):ie.value,e.map((e=>q(e,["uuid"])))}}),(l,t)=>(a(),r("div",T,[e.showSearch?(a(),s(n(A),{key:0,class:"main-wrapper__search-wrapper",value:Z.value,"onUpdate:value":t[0]||(t[0]=e=>Z.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(ce,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",K,[(a(!0),r(p,null,m(te.value,((e,l)=>(a(),r(p,{key:l},[e.isShow?(a(),r("span",{key:0,class:"table-cell",style:y(n(R)(e,l))},["checkbox"!==e.type||e.isHeadCheckHide?(a(),r(p,{key:1},[b(g(e.title),1)],64)):(a(),s(n(_),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void ie.value.forEach((e=>{B(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:v((()=>[b(g(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===e.field?(a(),s(n(C),{key:2,trigger:"hover"},{trigger:v((()=>[k(n(D),{component:n(O),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[G])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:ee},[k(n(E),{modelValue:le.value,"onUpdate:modelValue":t[1]||(t[1]=e=>le.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:me,disabled:!e.rowDraggable},{item:v((({element:e,index:l})=>[e.hide?f("v-if",!0):(a(),r("div",{key:0,class:x(["item",n(V)(e)?"":"disabled"]),tabindex:l},[n(M)(e)?(a(!0),r(p,{key:0},m(e,((e,t)=>(a(),s(H,w(de,{key:t,element:e,idx:l+1,"is-highlight":fe(e)}),null,16,["element","idx","is-highlight"])))),128)):(a(),s(H,w({key:1},de,{element:e,idx:l+1,"is-highlight":fe(e)}),null,16,["element","idx","is-highlight"]))],10,L))])),_:1},8,["modelValue","disabled"])],512),e.footerFlag?(a(),r("div",$,[f(" 底部按钮插槽 "),S(l.$slots,"footer",{},(()=>[k(n(F),{onPositiveClick:ne},{trigger:v((()=>[k(n(W),{style:{"margin-right":"8px"}},{default:v((()=>[b("恢复默认设置")])),_:1})])),default:v((()=>[b(" 确认要恢复系统默认设置吗? ")])),_:1}),k(n(W),{style:{"margin-right":"8px"},onClick:se},{default:v((()=>[b("取消")])),_:1}),k(n(W),{type:"primary",onClick:re},{default:v((()=>[b("保存")])),_:1})]))])):f("v-if",!0)]))}});export{z as default};
1
+ import{defineComponent as e,useAttrs as l,ref as t,computed as i,reactive as o,watch as d,openBlock as a,createElementBlock as r,createBlock as s,unref as n,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 k,normalizeClass as x,mergeProps as w,renderSlot as S}from"vue";import{NInput as A,NCheckbox as _,NTooltip as C,NIcon as D,NPopconfirm as F,NButton as W}from"naive-ui";import E from"../../../shared/components/VueDraggable/src/vuedraggable.js";import H from"./components/Row.vue.js";import{isArray as M,cloneDeep as N,isString as P,omit as q}from"lodash-es";import{isDisable as B,setStyle as R,isDraggableItem as V,isDraggable as j,getGroupTree as I}from"./utils/index.js";import{uuidGenerator as U}from"../../../shared/utils/index.js";import{HelpCircleSharp as O}from"@vicons/ionicons5";const T={class:"main-wrapper"},K={class:"main-wrapper__table-header"},G=h("span",null,"数值越小,优先级越高",-1),L=["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"}},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"};l();const Y=t(""),Z=t(),ee=t([]),le=t([{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"}]),te=i((()=>ee.value.flat())),ie=i((()=>te.value.some((e=>e.feildDescribe)))),oe=o({columns:le,data:te,onUpdateChecked:function({checked:e,column:l}){const t=!e||he(l.field);l.checkedAll=!t},draggable:Q.rowDraggable,isFieldSet:!0,fieldDescribeMode:Q.fieldDescribeMode}),de={keyword:Y.value,idx:0,startIdx:0},ae=()=>{J("save")},re=()=>{J("close")};function se(){ee.value=ne(),fe(),J("reset")}function ne(){const e=N(Q.fields).map((e=>({...e,uuid:U()})));return Object.keys(X).forEach((l=>{e.forEach((e=>{"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=!!j(e)}))})),function(e){if(Q.groupSetting){return I(Q.groupSetting,e).reduce(((t,i)=>{const o=P(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 ue(){const e=de.keyword!==Y.value;let l=Y.value?te.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(Y.value))return!!e||t>de.idx})):0;-1!==l||e||(l=de.startIdx),Z.value.scrollTop=52*l,Object.assign(de,{keyword:Y.value,idx:l},e?{startIdx:l}:{})}function ce(e){var l;return!!Y.value&&(null==(l=e.title)?void 0:l.includes(Y.value))}function fe(){var e,l;(null==(e=Q.showColumnNames)?void 0:e.length)&&(le.value=le.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=Q.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=Q.customColumns)?void 0:l.length)&&le.value.push(...Q.customColumns),"column"===Q.fieldDescribeMode&&ie.value&&le.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),Q.showSeq&&le.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),le.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!Q.isEdit||"sortPriority"===e.field&&!Q.showSortPriority||"isShowHeaderFilter"===e.field&&!Q.showHeadFilter)}(e),"checkbox"===e.type){const l=ee.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!he(e.field)&&!l}}))}function he(e){return ee.value.flat().some((l=>!B(l,e)&&!l[e]&&"0001"!=l.id))}function pe(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&&(ee.value=ne(),fe())}),{immediate:!0,deep:!0}),z({getTableFields:function(){let e=[];return e="old"==Q.type?te.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,...Q.isEdit?{required:e.required,editable:e.editable}:{}}))):te.value,e.map((e=>q(e,["uuid"])))}}),(l,t)=>(a(),r("div",T,[e.showSearch?(a(),s(n(A),{key:0,class:"main-wrapper__search-wrapper",value:Y.value,"onUpdate:value":t[0]||(t[0]=e=>Y.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(ue,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",K,[(a(!0),r(p,null,m(le.value,((e,l)=>(a(),r(p,{key:l},[e.isShow?(a(),r("span",{key:0,class:"table-cell",style:y(n(R)(e,l))},["checkbox"!==e.type||e.isHeadCheckHide?(a(),r(p,{key:1},[b(g(e.title),1)],64)):(a(),s(n(_),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void te.value.forEach((e=>{B(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:v((()=>[b(g(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===e.field?(a(),s(n(C),{key:2,trigger:"hover"},{trigger:v((()=>[k(n(D),{component:n(O),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[G])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:Z},[k(n(E),{modelValue:ee.value,"onUpdate:modelValue":t[1]||(t[1]=e=>ee.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:pe,disabled:!e.rowDraggable},{item:v((({element:e,index:l})=>[e.hide?f("v-if",!0):(a(),r("div",{key:0,class:x(["item",n(V)(e)?"":"disabled"]),tabindex:l},[n(M)(e)?(a(!0),r(p,{key:0},m(e,((e,t)=>(a(),s(H,w(oe,{key:t,element:e,idx:l+1,"is-highlight":ce(e)}),null,16,["element","idx","is-highlight"])))),128)):(a(),s(H,w({key:1},oe,{element:e,idx:l+1,"is-highlight":ce(e)}),null,16,["element","idx","is-highlight"]))],10,L))])),_:1},8,["modelValue","disabled"])],512),e.footerFlag?(a(),r("div",$,[f(" 底部按钮插槽 "),S(l.$slots,"footer",{},(()=>[k(n(F),{onPositiveClick:se},{trigger:v((()=>[k(n(W),{style:{"margin-right":"8px"}},{default:v((()=>[b("恢复默认设置")])),_:1})])),default:v((()=>[b(" 确认要恢复系统默认设置吗? ")])),_:1}),k(n(W),{style:{"margin-right":"8px"},onClick:re},{default:v((()=>[b("取消")])),_:1}),k(n(W),{type:"primary",onClick:ae},{default:v((()=>[b("保存")])),_:1})]))])):f("v-if",!0)]))}});export{z as default};
@@ -1,7 +1,7 @@
1
1
  import { PropType } from 'vue';
2
2
  import { ColorSetItem, FieldSetTab, ColorSetWordbook, FilterSetItem } from '../../../components/field-set/src/types';
3
3
  import { AnyObject } from '../../../shared/types';
4
- declare type WordbookOption = {
4
+ type WordbookOption = {
5
5
  label: string;
6
6
  value: string;
7
7
  [key: string]: any;
@@ -30,6 +30,9 @@ declare const _default: import("vue").DefineComponent<{
30
30
  default: () => never[];
31
31
  };
32
32
  }, {
33
+ attrs: {
34
+ [x: string]: unknown;
35
+ };
33
36
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
34
37
  showTabNames: {
35
38
  type: PropType<FieldSetTab[]>;
@@ -59,7 +62,7 @@ declare const _default: import("vue").DefineComponent<{
59
62
  emit: (event: "save", ...args: any[]) => void;
60
63
  setRefs: AnyObject;
61
64
  primaryColor: import("vue").Ref<string>;
62
- rowHeight: number;
65
+ rowHeight: import("vue").ComputedRef<"52px" | "auto">;
63
66
  tabList: import("vue").ComputedRef<{
64
67
  name: FieldSetTab;
65
68
  tab: string;
@@ -69,57 +72,7 @@ declare const _default: import("vue").DefineComponent<{
69
72
  setRef: (e: any, id: string) => void;
70
73
  getTableFields: (type?: 'field' | 'fieldColor' | 'highlightRow' | 'tableStyle' | 'fieldFilter') => any;
71
74
  NTabs: any;
72
- NTabPane: import("vue").DefineComponent<{
73
- readonly tab: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
74
- [key: string]: any;
75
- }> | (() => import("vue").VNodeChild)>;
76
- readonly name: {
77
- readonly type: PropType<string | number>;
78
- readonly required: true;
79
- };
80
- readonly disabled: BooleanConstructor;
81
- readonly displayDirective: {
82
- readonly type: PropType<"if" | "show" | "show:lazy">;
83
- readonly default: "if";
84
- };
85
- readonly closable: {
86
- readonly type: PropType<boolean | undefined>;
87
- readonly default: undefined;
88
- };
89
- readonly tabProps: PropType<import("vue").HTMLAttributes>;
90
- readonly label: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
91
- [key: string]: any;
92
- }> | (() => import("vue").VNodeChild)>;
93
- }, {
94
- style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
95
- class: import("vue").Ref<string | undefined>;
96
- mergedClsPrefix: import("vue").Ref<string>;
97
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
98
- readonly tab: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
99
- [key: string]: any;
100
- }> | (() => import("vue").VNodeChild)>;
101
- readonly name: {
102
- readonly type: PropType<string | number>;
103
- readonly required: true;
104
- };
105
- readonly disabled: BooleanConstructor;
106
- readonly displayDirective: {
107
- readonly type: PropType<"if" | "show" | "show:lazy">;
108
- readonly default: "if";
109
- };
110
- readonly closable: {
111
- readonly type: PropType<boolean | undefined>;
112
- readonly default: undefined;
113
- };
114
- readonly tabProps: PropType<import("vue").HTMLAttributes>;
115
- readonly label: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
116
- [key: string]: any;
117
- }> | (() => import("vue").VNodeChild)>;
118
- }>>, {
119
- readonly disabled: boolean;
120
- readonly closable: boolean | undefined;
121
- readonly displayDirective: "if" | "show" | "show:lazy";
122
- }>;
75
+ NTabPane: any;
123
76
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "save"[], "save", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
124
77
  showTabNames: {
125
78
  type: PropType<FieldSetTab[]>;
@@ -1 +1 @@
1
- import{defineComponent as e,provide as l,reactive as t,ref as i,computed as r,openBlock as a,createElementBlock as o,normalizeStyle as d,unref as s,createBlock as n,withCtx as f,Fragment as m,renderList as u,resolveDynamicComponent as b,mergeProps as y,createSlots as p,renderSlot as v,h}from"vue";import{useThemeVars as F,NTabs as g,NTabPane as c}from"naive-ui";import C from"./FieldSet.vue.js";import L from"./FieldColor.vue.js";import w from"./TableStyle.vue.js";import T from"./FieldFilter.vue.js";import{InjectionFieldList as S,InjectionQueryWordbookData as _}from"./constants/index.js";var j=e({__name:"Index",props:{showTabNames:{type:Array,default:()=>["field"]},fieldColorList:{type:Array,default:()=>[]},highlightRowColorList:{type:Array,default:()=>[]},fieldList:{type:Object},queryWordbookData:{type:Function},fieldFilterList:{type:Array,default:()=>[]}},emits:["save"],setup(e,{expose:j,emit:$}){const k=e;l(S,k.fieldList),l(_,k.queryWordbookData);const x=t({}),R=i(F().value.primaryColor),A=r((()=>[{name:"field",tab:"字段设置",render:()=>h(C,{rowHeight:52})},{name:"fieldColor",tab:"字段颜色",render:()=>h(L,{isFieldColor:!0,defaultList:k.fieldColorList})},{name:"highlightRow",tab:"高亮行",render:()=>h(L,{isFieldColor:!1,defaultList:k.highlightRowColorList})},{name:"tableStyle",tab:"表格样式",render:()=>h(w)},{name:"fieldFilter",tab:"高级筛选",render:()=>h(T,{defaultList:k.fieldFilterList})}].filter((e=>k.showTabNames.includes(e.name)))));function q(){var e,l,t,i,r;$("save",{tableFields:null==(e=x.field)?void 0:e.getTableFields(),tableFieldColors:null==(l=x.fieldColor)?void 0:l.getTableFields(),tableHighlightRows:null==(t=x.highlightRow)?void 0:t.getTableFields(),tableStyle:null==(i=x.tableStyle)?void 0:i.getTableFields(),tableFilters:null==(r=x.fieldFilter)?void 0:r.getTableFields()})}function D(e,l){x[l]=e}return j({getTableFields:function(e){var l;return null==(l=x[e||"field"])?void 0:l.getTableFields()}}),(e,l)=>(a(),o("div",{class:"c-field-set",style:d({"--row-height":"52px","--primary-color":R.value})},[s(A).length>1?(a(),n(s(g),{key:0,type:"line",naimated:""},{default:f((()=>[(a(!0),o(m,null,u(s(A),(l=>(a(),n(s(c),{key:l.name,name:l.name,tab:l.tab,"display-directive":"show"},{default:f((()=>[(a(),n(b(l.render()),y(e.$attrs,{ref_for:!0,ref:e=>D(e,l.name),onSave:q}),p({_:2},[u(e.$slots,((l,t)=>({name:t,fn:f((()=>[v(e.$slots,t)]))})))]),1040))])),_:2},1032,["name","tab"])))),128))])),_:3})):(a(),n(b(s(A)[0].render()),y({key:1},e.$attrs,{ref:e=>D(e,s(A)[0].name),onSave:q}),p({_:2},[u(e.$slots,((l,t)=>({name:t,fn:f((()=>[v(e.$slots,t)]))})))]),1040))],4))}});export{j as default};
1
+ import{defineComponent as e,useAttrs as l,provide as t,reactive as i,ref as a,computed as r,openBlock as o,createElementBlock as s,normalizeStyle as d,unref as n,createBlock as f,withCtx as m,Fragment as u,renderList as b,resolveDynamicComponent as h,mergeProps as y,createSlots as p,renderSlot as v,h as F}from"vue";import{useThemeVars as g,NTabs as c,NTabPane as w}from"naive-ui";import C from"./FieldSet.vue.js";import L from"./FieldColor.vue.js";import T from"./TableStyle.vue.js";import S from"./FieldFilter.vue.js";import{InjectionFieldList as _,InjectionQueryWordbookData as j}from"./constants/index.js";var $=e({__name:"Index",props:{showTabNames:{type:Array,default:()=>["field"]},fieldColorList:{type:Array,default:()=>[]},highlightRowColorList:{type:Array,default:()=>[]},fieldList:{type:Object},queryWordbookData:{type:Function},fieldFilterList:{type:Array,default:()=>[]}},emits:["save"],setup(e,{expose:$,emit:k}){const x=e,R=l();t(_,x.fieldList),t(j,x.queryWordbookData);const A=i({}),q=a(g().value.primaryColor),D=r((()=>"showSearch"in R&&!1!==R.showSearch||"show-search"in R&&!1!==R["show-search"]?"52px":"auto")),N=r((()=>[{name:"field",tab:"字段设置",render:()=>F(C)},{name:"fieldColor",tab:"字段颜色",render:()=>F(L,{isFieldColor:!0,defaultList:x.fieldColorList})},{name:"highlightRow",tab:"高亮行",render:()=>F(L,{isFieldColor:!1,defaultList:x.highlightRowColorList})},{name:"tableStyle",tab:"表格样式",render:()=>F(T)},{name:"fieldFilter",tab:"高级筛选",render:()=>F(S,{defaultList:x.fieldFilterList})}].filter((e=>x.showTabNames.includes(e.name)))));function W(){var e,l,t,i,a;k("save",{tableFields:null==(e=A.field)?void 0:e.getTableFields(),tableFieldColors:null==(l=A.fieldColor)?void 0:l.getTableFields(),tableHighlightRows:null==(t=A.highlightRow)?void 0:t.getTableFields(),tableStyle:null==(i=A.tableStyle)?void 0:i.getTableFields(),tableFilters:null==(a=A.fieldFilter)?void 0:a.getTableFields()})}function H(e,l){A[l]=e}return $({getTableFields:function(e){var l;return null==(l=A[e||"field"])?void 0:l.getTableFields()}}),(e,l)=>(o(),s("div",{class:"c-field-set",style:d({"--row-height":n(D),"--primary-color":q.value})},[n(N).length>1?(o(),f(n(c),{key:0,type:"line",naimated:""},{default:m((()=>[(o(!0),s(u,null,b(n(N),(l=>(o(),f(n(w),{key:l.name,name:l.name,tab:l.tab,"display-directive":"show"},{default:m((()=>[(o(),f(h(l.render()),y(e.$attrs,{ref_for:!0,ref:e=>H(e,l.name),onSave:W}),p({_:2},[b(e.$slots,((l,t)=>({name:t,fn:m((()=>[v(e.$slots,t)]))})))]),1040))])),_:2},1032,["name","tab"])))),128))])),_:3})):(o(),f(h(n(N)[0].render()),y({key:1},e.$attrs,{ref:e=>H(e,n(N)[0].name),onSave:W}),p({_:2},[b(e.$slots,((l,t)=>({name:t,fn:m((()=>[v(e.$slots,t)]))})))]),1040))],4))}});export{$ as default};
@@ -296,8 +296,8 @@ declare const _default: import("vue").DefineComponent<{
296
296
  requiredDisable: boolean;
297
297
  hide: boolean;
298
298
  }>[];
299
- columns: FieldSetColumnItem[];
300
299
  index: number;
300
+ columns: FieldSetColumnItem[];
301
301
  element: Partial<{
302
302
  [key: string]: any;
303
303
  id: string;
@@ -1,7 +1,7 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
2
  import { PropType } from 'vue';
3
3
  import { ColorSetConditionItem } from '../../../../components/field-set';
4
- declare type ColorSetConditionItem2 = ColorSetConditionItem & {
4
+ type ColorSetConditionItem2 = ColorSetConditionItem & {
5
5
  numberValue: number | null;
6
6
  dateValue: string | [string, string] | null;
7
7
  fieldType: string;
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  };
19
19
  }, {
20
20
  customValue: string;
21
- cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
21
+ cssVars: import("vue").ComputedRef<AnyObject>;
22
22
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
23
23
  data: {
24
24
  type: PropType<AnyObject>;