cnhis-design-vue 3.1.41 → 3.1.42-beta.0

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 (219) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/annotation-edit/style/index.css +1 -1
  3. package/es/components/base-search/index.d.ts +293 -0
  4. package/es/components/base-search/index.js +1 -0
  5. package/es/components/{table-filter/src/base-search-com/BaseSearch.vue.d.ts → base-search/src/index.vue.d.ts} +26 -91
  6. package/es/components/base-search/src/index.vue.js +1 -0
  7. package/es/components/base-search/style/iconfont.ttf +0 -0
  8. package/es/components/base-search/style/index.css +1 -0
  9. package/es/components/big-table/index.d.ts +4 -3
  10. package/es/components/big-table/src/BigTable.vue.d.ts +4 -3
  11. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  12. package/es/components/big-table/style/index.css +1 -1
  13. package/es/components/button-print/index.d.ts +7 -6
  14. package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -6
  15. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  16. package/es/components/button-print/src/api.d.ts +3 -0
  17. package/es/components/button-print/src/api.js +1 -0
  18. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  19. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  20. package/es/components/button-print/src/utils/print.js +1 -1
  21. package/es/components/classification/index.d.ts +995 -0
  22. package/es/components/classification/index.js +1 -0
  23. package/es/components/{table-filter → classification}/src/components/search-filter/index.vue.d.ts +10 -93
  24. package/es/components/classification/src/components/search-filter/index.vue.js +1 -0
  25. package/es/components/{table-filter → classification}/src/components/set-classification/index.vue.d.ts +5 -130
  26. package/es/components/classification/src/components/set-classification/index.vue.js +1 -0
  27. package/es/components/{table-filter → classification}/src/components/table-modal/index.vue.d.ts +0 -42
  28. package/es/components/classification/src/components/table-modal/index.vue.js +1 -0
  29. package/es/components/classification/src/const/index.d.ts +2 -0
  30. package/es/components/classification/src/const/index.js +1 -0
  31. package/es/components/{table-filter/src/classification/Classification-com.vue.d.ts → classification/src/index.vue.d.ts} +57 -291
  32. package/es/components/classification/src/index.vue.js +1 -0
  33. package/es/components/classification/style/iconfont.ttf +0 -0
  34. package/es/components/classification/style/index.css +1 -0
  35. package/es/components/config-provider/index.d.ts +14 -0
  36. package/es/components/config-provider/index.js +1 -0
  37. package/es/components/config-provider/src/ConfigProvider.d.ts +14 -0
  38. package/es/components/config-provider/src/ConfigProvider.js +1 -0
  39. package/es/components/config-provider/src/interface.d.ts +19 -0
  40. package/es/components/config-provider/src/interface.js +1 -0
  41. package/es/components/config-provider/src/utils/index.d.ts +2 -0
  42. package/es/components/config-provider/src/utils/index.js +1 -0
  43. package/es/components/date-picker/index.d.ts +20 -0
  44. package/es/components/date-picker/index.js +1 -0
  45. package/es/components/date-picker/src/DatePicker.vue.d.ts +20 -0
  46. package/es/components/date-picker/src/DatePicker.vue.js +1 -0
  47. package/es/components/fabric-chart/index.d.ts +2 -2
  48. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  49. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  51. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  52. package/es/components/field-set/index.d.ts +2 -2
  53. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  54. package/es/components/form-config/index.d.ts +46 -37
  55. package/es/components/form-config/src/FormConfig.vue.d.ts +46 -37
  56. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  57. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +16 -16
  58. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -19
  59. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +9 -1
  60. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  61. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +33 -6
  62. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  63. package/es/components/form-config/style/index.css +1 -1
  64. package/es/components/form-render/index.d.ts +16 -16
  65. package/es/components/form-render/src/FormRender.vue.d.ts +16 -16
  66. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +16 -16
  67. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  68. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  69. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  70. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  71. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  72. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  73. package/es/components/form-render/src/components/renderer/select.js +1 -1
  74. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
  75. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  76. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -2
  77. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  78. package/es/components/form-render/style/index.css +1 -1
  79. package/es/components/iho-table/index.d.ts +3 -0
  80. package/es/components/iho-table/src/IhoTable.vue.d.ts +3 -0
  81. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  82. package/es/components/iho-table/src/constants/index.d.ts +4 -4
  83. package/es/components/iho-table/src/constants/index.js +1 -1
  84. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +20 -7
  86. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  87. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +18 -1
  88. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  89. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  90. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  91. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  92. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  93. package/es/components/iho-table/src/types/index.d.ts +1 -0
  94. package/es/components/iho-table/src/utils/index.d.ts +1 -0
  95. package/es/components/iho-table/src/utils/index.js +1 -1
  96. package/es/components/iho-table/style/index.css +1 -1
  97. package/es/components/index.css +1 -1
  98. package/es/components/index.d.ts +8 -2
  99. package/es/components/index.js +1 -1
  100. package/es/components/info-header/index.d.ts +3799 -156
  101. package/es/components/info-header/src/InfoHeader.vue.d.ts +3800 -156
  102. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  103. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1842 -0
  104. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -0
  105. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1972 -0
  106. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -0
  107. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  108. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  109. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  110. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +2669 -139
  111. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  112. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +745 -0
  113. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  114. package/es/components/info-header/src/constants/index.d.ts +4 -0
  115. package/es/components/info-header/src/constants/index.js +1 -0
  116. package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +4 -0
  117. package/es/components/info-header/src/hooks/useThemeOverrides.js +1 -0
  118. package/es/components/info-header/src/types/index.d.ts +17 -3
  119. package/es/components/info-header/style/index.css +1 -1
  120. package/es/components/keyboard/index.d.ts +4 -2
  121. package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -2
  122. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  123. package/es/components/keyboard/src/constants/index.d.ts +2 -0
  124. package/es/components/keyboard/src/constants/index.js +1 -0
  125. package/es/components/keyboard/style/index.css +1 -1
  126. package/es/components/quick-search/index.d.ts +713 -0
  127. package/es/components/quick-search/index.js +1 -0
  128. package/es/components/{table-filter/src/quick-search/QuickSearch.vue.d.ts → quick-search/src/index.vue.d.ts} +31 -120
  129. package/es/components/quick-search/src/index.vue.js +1 -0
  130. package/es/components/quick-search/style/index.css +1 -0
  131. package/es/components/recommend-search/index.d.ts +2 -2
  132. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  133. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  134. package/es/components/scale-view/src/components/formitem/sign-com.d.ts +1 -1
  135. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  136. package/es/components/scale-view/src/hooks/use-component.d.ts +69 -116
  137. package/es/components/search-cascader/index.d.ts +2 -2
  138. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
  139. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  140. package/es/components/select-label/index.d.ts +70 -169
  141. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -53
  142. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  143. package/es/components/select-label/src/SelectLabel.vue.d.ts +70 -116
  144. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  145. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  146. package/es/components/select-label/style/iconfont.ttf +0 -0
  147. package/es/components/select-label/style/index.css +1 -1
  148. package/es/components/select-person/index.d.ts +1 -1
  149. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  150. package/es/components/shortcut-setter/index.d.ts +17 -17
  151. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +17 -17
  152. package/es/components/steps-wheel/index.d.ts +1 -0
  153. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -0
  154. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  155. package/es/components/steps-wheel/src/constants/index.d.ts +2 -0
  156. package/es/components/steps-wheel/src/constants/index.js +1 -0
  157. package/es/components/steps-wheel/style/index.css +1 -1
  158. package/es/components/table-filter/index.d.ts +0 -2385
  159. package/es/components/table-filter/index.js +1 -1
  160. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
  161. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  162. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -42
  163. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  164. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  165. package/es/components/table-filter/src/components/render-widget/enums.d.ts +0 -8
  166. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  167. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +2 -1
  168. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  169. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  170. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  171. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +4 -1
  172. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  173. package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -54
  174. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  175. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  176. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  177. package/es/components/table-filter/src/tool/transformData.d.ts +1 -37
  178. package/es/components/table-filter/src/tool/transformData.js +1 -1
  179. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  180. package/es/components/table-filter/src/types/enums.js +1 -1
  181. package/es/components/table-filter/src/types/index.d.ts +13 -169
  182. package/es/components/time-picker/index.d.ts +18 -0
  183. package/es/components/time-picker/index.js +1 -0
  184. package/es/components/time-picker/src/TimePicker.vue.d.ts +18 -0
  185. package/es/components/time-picker/src/TimePicker.vue.js +1 -0
  186. package/es/shared/mixins/index.d.ts +1 -0
  187. package/es/shared/mixins/index.js +1 -0
  188. package/es/shared/mixins/useTheme.d.ts +3 -0
  189. package/es/shared/mixins/useTheme.js +1 -0
  190. package/es/shared/utils/index.d.ts +1 -0
  191. package/es/shared/utils/index.js +1 -1
  192. package/package.json +2 -2
  193. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.d.ts +0 -2
  194. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.js +0 -1
  195. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +0 -1
  196. package/es/components/table-filter/src/classification/Classification-com.vue.js +0 -1
  197. package/es/components/table-filter/src/components/search-filter/index.vue.js +0 -1
  198. package/es/components/table-filter/src/components/set-classification/index.vue.js +0 -1
  199. package/es/components/table-filter/src/components/table-modal/index.vue.js +0 -1
  200. package/es/components/table-filter/src/const/index.d.ts +0 -5
  201. package/es/components/table-filter/src/const/index.js +0 -1
  202. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +0 -8
  203. package/es/components/table-filter/src/hooks/useTableSearchCon.js +0 -1
  204. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +0 -12
  205. package/es/components/table-filter/src/hooks/useWordBookutils.js +0 -1
  206. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +0 -1
  207. package/es/components/table-filter/src/tool/time-domain.d.ts +0 -39
  208. package/es/components/table-filter/src/tool/time-domain.js +0 -1
  209. package/es/components/table-filter/src/tool/utils.d.ts +0 -4
  210. package/es/components/table-filter/src/tool/utils.js +0 -1
  211. package/es/components/table-filter/style/index.css +0 -1
  212. /package/es/components/{table-filter → base-search}/src/directive/resize.d.ts +0 -0
  213. /package/es/components/{table-filter → base-search}/src/directive/resize.js +0 -0
  214. /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.d.ts +0 -0
  215. /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.js +0 -0
  216. /package/es/components/{table-filter → classification}/src/directive/flexibleResize.d.ts +0 -0
  217. /package/es/components/{table-filter → classification}/src/directive/flexibleResize.js +0 -0
  218. /package/es/components/table-filter/src/tool/{options.d.ts → baseOptions.d.ts} +0 -0
  219. /package/es/components/table-filter/src/tool/{options.js → baseOptions.js} +0 -0
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as s}from"../../shared/global/variable.js";import{safeComponentRegister as i}from"../../shared/utils/index.js";import"./src/hooks/useAdvanced.js";import c from"./src/base-search-com/BaseSearch.vue.js";import o from"./src/quick-search/QuickSearch.vue.js";import r from"./src/classification/Classification-com.vue.js";const a=c;a.install=function(c){i(c,a,s+"BaseSearch")};const t=o;t.install=function(c){i(c,t,s+"QuickSearch")};const e=r;e.install=function(c){i(c,e,s+"Classification")};export{a as CBaseSearch,e as CClassification,t as CQuickSearch};
1
+ import"./src/hooks/useAdvanced.js";
@@ -49,6 +49,7 @@ declare const _default: import("vue").DefineComponent<{
49
49
  SELECT: string;
50
50
  DATE: string;
51
51
  DATE_TIME: string;
52
+ CHECKBOX_GROUP: string;
52
53
  };
53
54
  WidgetValEnums: {
54
55
  CUSTOM: string;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,openBlock as a,createElementBlock as t,unref as u,createBlock as r,isRef as o,createCommentVNode as p,Fragment as n,createVNode as v}from"vue";import{NInputNumber as i,NInput as m,NSelect as s,NDatePicker as f}from"naive-ui";import{WidgetTypeEnums as d,WidgetValEnums as y,WidgetOptionEnums as g}from"../../types/enums.js";import{generateDefOptionsInApi as T}from"../../tool/generateDefOptions.js";import c from"../../../../../_virtual/plugin-vue_export-helper.js";const C={class:"value-cfg_wrapper"};var U=c(e({__name:"ValueCfg",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:c}){const U=e,E=l({set(e){c("update:modelValue",e)},get:()=>U.modelValue}),V=l({set(e){c("update:presetVal",e)},get:()=>U.presetVal}),_=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.type})),M=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.optionSetting})),x=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.mappingConfig})),S=l((()=>{const e=T(_.value,x.value).slice(0);return _.value!==d.DATE&&_.value!==d.DATE_TIME||e.unshift({label:"自定义输入",value:y.CUSTOM}),e}));return(e,l)=>(a(),t("div",C,[u(_)===u(d).INPUT_NUMBER?(a(),r(u(i),{key:0,class:"form-item",value:u(E),"onUpdate:value":l[0]||(l[0]=e=>o(E)?E.value=e:null)},null,8,["value"])):p("v-if",!0),u(_)===u(d).INPUT?(a(),r(u(m),{key:1,value:u(E),"onUpdate:value":l[1]||(l[1]=e=>o(E)?E.value=e:null),maxlength:"255",clearable:""},null,8,["value"])):p("v-if",!0),u(_)===u(d).SELECT?(a(),r(u(s),{key:2,style:{width:"120px"},class:"form-item",value:u(E),"onUpdate:value":l[2]||(l[2]=e=>o(E)?E.value=e:null),filterable:"",options:u(S),multiple:u(M)===u(g).MULTIPLE,maxTagCount:1},null,8,["value","options","multiple"])):p("v-if",!0),u(_)===u(d).DATE||u(_)===u(d).DATE_TIME?(a(),t(n,{key:3},[v(u(s),{style:{width:"120px"},class:"form-item",value:u(V),"onUpdate:value":l[3]||(l[3]=e=>o(V)?V.value=e:null),options:u(S)},null,8,["value","options"]),u(V)===u(y).CUSTOM?(a(),r(u(f),{key:0,class:"form-item",type:u(_).toLowerCase(),format:"yyyy-MM-dd HH:mm:ss","formatted-value":u(E),"onUpdate:formatted-value":l[4]||(l[4]=e=>o(E)?E.value=e:null)},null,8,["type","formatted-value"])):p("v-if",!0)],64)):p("v-if",!0)]))}}),[["__file","ValueCfg.vue"]]);export{U as default};
1
+ import{defineComponent as e,computed as l,openBlock as a,createElementBlock as t,unref as u,createBlock as o,isRef as r,createCommentVNode as p,Fragment as n,createVNode as v}from"vue";import{NInputNumber as i,NInput as m,NSelect as s,NDatePicker as f}from"naive-ui";import{WidgetTypeEnums as d,WidgetValEnums as y,WidgetOptionEnums as g}from"../../types/enums.js";import{generateDefOptionsInApi as T}from"../../tool/generateDefOptions.js";import c from"../../../../../_virtual/plugin-vue_export-helper.js";const C={class:"value-cfg_wrapper"};var U=c(e({__name:"ValueCfg",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:c}){const U=e,E=l({set(e){c("update:modelValue",e)},get:()=>U.modelValue}),V=l({set(e){c("update:presetVal",e)},get:()=>U.presetVal}),_=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.type})),b=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.optionSetting})),M=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.mappingConfig})),x=l((()=>{const e=T(_.value,M.value).slice(0);return _.value!==d.DATE&&_.value!==d.DATE_TIME||e.unshift({label:"自定义输入",value:y.CUSTOM}),e}));return(e,l)=>(a(),t("div",C,[u(_)===u(d).INPUT_NUMBER?(a(),o(u(i),{key:0,class:"form-item",value:u(E),"onUpdate:value":l[0]||(l[0]=e=>r(E)?E.value=e:null)},null,8,["value"])):p("v-if",!0),u(_)===u(d).INPUT?(a(),o(u(m),{key:1,value:u(E),"onUpdate:value":l[1]||(l[1]=e=>r(E)?E.value=e:null),maxlength:"255",clearable:""},null,8,["value"])):p("v-if",!0),u(_)===u(d).SELECT?(a(),o(u(s),{key:2,style:{width:"120px"},class:"form-item",value:u(E),"onUpdate:value":l[2]||(l[2]=e=>r(E)?E.value=e:null),to:"body",filterable:"",options:u(x),multiple:u(b)===u(g).MULTIPLE,maxTagCount:1},null,8,["value","options","multiple"])):p("v-if",!0),u(_)===u(d).DATE||u(_)===u(d).DATE_TIME?(a(),t(n,{key:3},[v(u(s),{style:{width:"120px"},class:"form-item",to:"body",value:u(V),"onUpdate:value":l[3]||(l[3]=e=>r(V)?V.value=e:null),options:u(x)},null,8,["value","options"]),u(V)===u(y).CUSTOM?(a(),o(u(f),{key:0,class:"form-item",type:u(_).toLowerCase(),format:"yyyy-MM-dd HH:mm:ss","formatted-value":u(E),"onUpdate:formatted-value":l[4]||(l[4]=e=>r(E)?E.value=e:null),to:"body"},null,8,["type","formatted-value"])):p("v-if",!0)],64)):p("v-if",!0)]))}}),[["__file","ValueCfg.vue"]]);export{U as default};
@@ -118,48 +118,6 @@ declare const _default: import("vue").DefineComponent<{
118
118
  AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
119
119
  AddCircleSharp: 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<{}>>, {}>;
120
120
  CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
121
- SvgIcon: import("vue").DefineComponent<{
122
- iconClass: {
123
- type: StringConstructor;
124
- required: true;
125
- default: string;
126
- };
127
- title: {
128
- type: StringConstructor;
129
- required: false;
130
- default: string;
131
- };
132
- className: {
133
- type: StringConstructor;
134
- required: false;
135
- };
136
- }, {
137
- props: {
138
- iconClass: string;
139
- title: string;
140
- className?: string | undefined;
141
- };
142
- iconName: import("vue").ComputedRef<string>;
143
- svgClass: import("vue").ComputedRef<string>;
144
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
145
- iconClass: {
146
- type: StringConstructor;
147
- required: true;
148
- default: string;
149
- };
150
- title: {
151
- type: StringConstructor;
152
- required: false;
153
- default: string;
154
- };
155
- className: {
156
- type: StringConstructor;
157
- required: false;
158
- };
159
- }>>, {
160
- title: string;
161
- iconClass: string;
162
- }>;
163
121
  ValueCfg: import("vue").DefineComponent<{
164
122
  paramCfg: {
165
123
  type: ObjectConstructor;
@@ -211,6 +169,7 @@ declare const _default: import("vue").DefineComponent<{
211
169
  SELECT: string;
212
170
  DATE: string;
213
171
  DATE_TIME: string;
172
+ CHECKBOX_GROUP: string;
214
173
  };
215
174
  WidgetValEnums: {
216
175
  CUSTOM: string;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as a,reactive as i,ref as t,toRef as l,openBlock as o,createElementBlock as n,createVNode as s,unref as d,withCtx as r,createElementVNode as c,createCommentVNode as p,Fragment as u,renderList as m,normalizeClass as y,toDisplayString as v,createBlock as f,withDirectives as g,createTextVNode as C,vShow as h}from"vue";import{useMessage as k,NSpin as b,NInput as A,NIcon as L,NButton as _,NSelect as w,NTooltip as x}from"naive-ui";import{CloseOutline as U,AddOutline as N,AddCircleSharp as I}from"@vicons/ionicons5";import V from"../../../../../shared/components/SvgIcon/SvgIcon.vue.js";import D from"./ValueCfg.vue.js";import{DataTypeEnums as S,ConditionEnums as j}from"../../types/enums.js";import{useDisplayCategory as B}from"./hooks/useDisplayCategory.js";import{useFilterConditions as F}from"./hooks/useFilterConditions.js";import{conditionOptions as O}from"./helpers/options.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const P={class:"searchConditionByApi_wrapper"},E={class:"class-filter-content"},R={key:0,class:"item-name"},q=c("span",{class:"label"},"筛选分类名称:",-1),J={key:1,class:"quickSearch-content"},K=c("span",{class:"label"},"父类名称:",-1),M=["onDblclick","onClick"],Q={key:0,class:"s-content"},G={key:2,class:"item-name"},H=c("span",{class:"label"}," 过滤条件: ",-1),T=c("span",null,"添加",-1),W={class:"select-item-list"},X={class:"index-span"};var Y=z(e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:z,emit:Y}){const Z=e,$=k(),ee=a(),ae=i({className:"",displayCategory:"",filterConditions:[]}),ie=t(!1),{State:te,isEnableAddDisplayCategory:le,editDisplayCategory:oe,handleDisplayCategorySelect:ne,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:ce}=B(l(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:pe,paramOptions:ue,addFilterCondition:me,delFilterCondition:ye,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=F(l(ae,"filterConditions"),Z.searchFieldList,S.API);function ke(){ae.className="",ae.displayCategory="",ae.filterConditions=[]}async function be(){var e;try{if(ke(),ie.value=!0,ce(ee.displayCategoryList,Z.actionList_prop.displayCategory||"custom"),Z.actionList_prop){ae.className=Z.actionList_prop.name,await Ce(Z.tableId,null!=(e=Z.actionList_prop.conObj)?e:[]);ae.filterConditions.length<1&&ue.value&&ue.value.length>0&&me()}}finally{ie.value=!1}}return be(),z({handleInitConditions:be,saveAdd:function(){new Promise((e=>{ae.className||!Z.showItemName?0!==ae.filterConditions.length?ae.filterConditions.some((({key:e,condition:a,value:i,presetVal:t})=>!e||!a||a===j.EQUAL&&!i&&!t))?$.warning("请补充完整条件内容"):e(!0):$.warning("请至少添加一个条件"):$.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===Z.actionList_prop.from&&(a=Z.actionList_prop.displayCategory,e=null==Z?void 0:Z.conditionList.find((e=>e.displayCategory===a)));const i={displayCategory:ae.displayCategory,name:ae.className||"",conObj:he()},t={id:e?e.sid:"",tableId:Z.tableId,setting:JSON.stringify(i)};Y("saveAdd",t,!1)}))},cancelSaveAdd:function(){ke(),Y("cancelSaveAdd")},addAction:me,checkActionList:function(){return ae.filterConditions.every((e=>!e.field_key))}}),(a,i)=>(o(),n("div",P,[s(d(b),{show:ie.value},{default:r((()=>[c("div",E,[e.showItemName?(o(),n("div",R,[q,s(d(A),{value:ae.className,"onUpdate:value":i[0]||(i[0]=e=>ae.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):p("v-if",!0),e.showItemName?(o(),n("div",J,[K,(o(!0),n(u,null,m(d(te).displayCategories,((e,a)=>(o(),n("div",{class:y(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(oe)(a,e),onClick:a=>function(e){ne(e)}(e)},[e.disabled?(o(),n("div",Q,[c("span",null,v(e.value),1)])):(o(),f(d(A),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),s(d(L),{component:d(U),class:"anticon-close",size:"20",onClick:i=>d(se)(a,e)},null,8,["component","onClick"])],42,M)))),128)),d(le)?(o(),n(u,{key:0},[g(s(d(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(L),{component:d(N),size:"20"},null,8,["component"]),C(" "+v("添加父类"))])),_:1},8,["onClick"]),[[h,!d(te).showAdd]]),g(s(d(A),{class:"edit-tag",value:d(te).addDisplayCategory,"onUpdate:value":i[1]||(i[1]=e=>d(te).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:d(re),maxLength:10},null,8,["value","onBlur"]),[[h,d(te).showAdd]])],64)):p("v-if",!0)])):p("v-if",!0),e.hideAddBtn?p("v-if",!0):(o(),n("div",G,[H,c("span",{class:"addAction",onClick:i[2]||(i[2]=(...e)=>d(me)&&d(me)(...e)),style:{cursor:"pointer"}},[s(d(L),{component:d(I),class:"blue",size:"18"},null,8,["component"]),T])])),c("ul",W,[(o(!0),n(u,null,m(ae.filterConditions,((e,a)=>(o(),n("li",{key:a},[c("span",X,v(a+1)+"   ",1),p(" 选择 field_key "),s(d(w),{class:"form-item",placeholder:"请选择",value:e.key,filterable:"",options:d(ue),"onUpdate:value":e=>d(ve)(a,e)},null,8,["value","options","onUpdate:value"]),p(" 选择 关系 "),e.key?(o(),f(d(w),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,filterable:"",options:d(O),"onUpdate:value":e=>d(fe)(a,e)},null,8,["value","options","onUpdate:value"])):p("v-if",!0),p(" 自定义 "),e.key&&e.condition&&e.condition!==d(j).NULL?(o(),f(D,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":d(ge)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):p("v-if",!0),s(d(x),{title:"删除",trigger:"hover"},{trigger:r((()=>[s(d(V),{onClick:e=>d(ye)(a),"class-name":"svg-icon-btn is-danger form-action","icon-class":"xitongtubiaoliebiaocaozuoanniushanchushixin"},null,8,["onClick"])])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{Y as default};
1
+ import{defineComponent as e,useAttrs as a,reactive as t,ref as l,toRef as i,openBlock as o,createElementBlock as n,createVNode as s,unref as d,withCtx as r,createElementVNode as p,createCommentVNode as c,Fragment as u,renderList as y,normalizeClass as m,toDisplayString as v,createBlock as f,withDirectives as g,createTextVNode as C,vShow as h}from"vue";import{useMessage as k,NSpin as b,NInput as A,NIcon as L,NButton as _,NSelect as w,NTooltip as U}from"naive-ui";import{CloseOutline as N,AddOutline as x,AddCircleSharp as V}from"@vicons/ionicons5";import D from"./ValueCfg.vue.js";import{DataTypeEnums as B,ConditionEnums as I}from"../../types/enums.js";import{useDisplayCategory as j}from"./hooks/useDisplayCategory.js";import{useFilterConditions as S}from"./hooks/useFilterConditions.js";import{conditionOptions as F}from"./helpers/options.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const O={class:"searchConditionByApi_wrapper"},P={class:"class-filter-content"},q={key:0,class:"item-name"},E=p("span",{class:"label"},"筛选分类名称:",-1),R={key:1,class:"quickSearch-content"},J=p("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],M={key:0,class:"s-content"},Q={key:2,class:"item-name"},G=p("span",{class:"label"}," 过滤条件: ",-1),H=p("span",null,"添加",-1),T={class:"select-item-list"},W={class:"index-span"},X=["onClick"];var Y=z(e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:z,emit:Y}){const Z=e,$=k(),ee=a(),ae=t({className:"",displayCategory:"",filterConditions:[]}),te=l(!1),{State:le,isEnableAddDisplayCategory:ie,editDisplayCategory:oe,handleDisplayCategorySelect:ne,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:pe}=j(i(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:ce,paramOptions:ue,addFilterCondition:ye,delFilterCondition:me,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=S(i(ae,"filterConditions"),Z.searchFieldList,B.API);function ke(){ae.className="",ae.displayCategory="",ae.filterConditions=[]}async function be(){var e;try{if(ke(),te.value=!0,pe(ee.displayCategoryList,Z.actionList_prop.displayCategory||"custom"),Z.actionList_prop){ae.className=Z.actionList_prop.name,await Ce(Z.tableId,null!=(e=Z.actionList_prop.conObj)?e:[]);ae.filterConditions.length<1&&ue.value&&ue.value.length>0&&ye()}}finally{te.value=!1}}return be(),z({handleInitConditions:be,saveAdd:function(){new Promise((e=>{ae.className||!Z.showItemName?0!==ae.filterConditions.length?ae.filterConditions.some((({key:e,condition:a,value:t,presetVal:l})=>!e||!a||a===I.EQUAL&&!t&&!l))?$.warning("请补充完整条件内容"):e(!0):$.warning("请至少添加一个条件"):$.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===Z.actionList_prop.from&&(a=Z.actionList_prop.displayCategory,e=null==Z?void 0:Z.conditionList.find((e=>e.displayCategory===a)));const t={displayCategory:ae.displayCategory,name:ae.className||"",conObj:he()},l={id:e?e.sid:"",tableId:Z.tableId,setting:JSON.stringify(t)};Y("saveAdd",l,!1)}))},cancelSaveAdd:function(){ke(),Y("cancelSaveAdd")},addAction:ye,checkActionList:function(){return ae.filterConditions.every((e=>!e.field_key))}}),(a,t)=>(o(),n("div",O,[s(d(b),{show:te.value},{default:r((()=>[p("div",P,[e.showItemName?(o(),n("div",q,[E,s(d(A),{value:ae.className,"onUpdate:value":t[0]||(t[0]=e=>ae.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):c("v-if",!0),e.showItemName?(o(),n("div",R,[J,(o(!0),n(u,null,y(d(le).displayCategories,((e,a)=>(o(),n("div",{class:m(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(oe)(a,e),onClick:a=>function(e){ne(e)}(e)},[e.disabled?(o(),n("div",M,[p("span",null,v(e.value),1)])):(o(),f(d(A),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),s(d(L),{component:d(N),class:"anticon-close",size:"20",onClick:t=>d(se)(a,e)},null,8,["component","onClick"])],42,K)))),128)),d(ie)?(o(),n(u,{key:0},[g(s(d(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(L),{component:d(x),size:"20"},null,8,["component"]),C(" "+v("添加父类"))])),_:1},8,["onClick"]),[[h,!d(le).showAdd]]),g(s(d(A),{class:"edit-tag",value:d(le).addDisplayCategory,"onUpdate:value":t[1]||(t[1]=e=>d(le).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:d(re),maxLength:10},null,8,["value","onBlur"]),[[h,d(le).showAdd]])],64)):c("v-if",!0)])):c("v-if",!0),e.hideAddBtn?c("v-if",!0):(o(),n("div",Q,[G,p("span",{class:"addAction",onClick:t[2]||(t[2]=(...e)=>d(ye)&&d(ye)(...e)),style:{cursor:"pointer"}},[s(d(L),{component:d(V),class:"blue",size:"18"},null,8,["component"]),H])])),p("ul",T,[(o(!0),n(u,null,y(ae.filterConditions,((e,a)=>(o(),n("li",{key:a},[p("span",W,v(a+1)+"   ",1),c(" 选择 field_key "),s(d(w),{class:"form-item",placeholder:"请选择",value:e.key,to:"body",filterable:"",options:d(ue),"onUpdate:value":e=>d(ve)(a,e)},null,8,["value","options","onUpdate:value"]),c(" 选择 关系 "),e.key?(o(),f(d(w),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:d(F),"onUpdate:value":e=>d(fe)(a,e)},null,8,["value","options","onUpdate:value"])):c("v-if",!0),c(" 自定义 "),e.key&&e.condition&&e.condition!==d(I).NULL?(o(),f(D,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":d(ge)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):c("v-if",!0),s(d(U),{title:"删除",trigger:"hover"},{trigger:r((()=>[p("i",{onClick:e=>d(me)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,X)])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{Y as default};
@@ -98,7 +98,7 @@ declare const _default: import("vue").DefineComponent<{
98
98
  }>> & {
99
99
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
100
100
  }, {
101
- value: string | number | unknown[];
102
101
  multiple: boolean;
102
+ value: string | number | unknown[];
103
103
  }>;
104
104
  export default _default;
@@ -1,11 +1,3 @@
1
- export declare const WidgetTypeEnums: {
2
- INPUT_NUMBER: string;
3
- INPUT: string;
4
- SELECT: string;
5
- DATE: string;
6
- DATE_TIME: string;
7
- CHECKBOX_GROUP: string;
8
- };
9
1
  export declare const DatePresetValEnums: {
10
2
  CUSTOM: string;
11
3
  NOW: string;
@@ -1 +1 @@
1
- const T={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME",CHECKBOX_GROUP:"CHECKBOX_GROUP"},E={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"};export{E as DatePresetValEnums,T as WidgetTypeEnums};
1
+ const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"};export{T as DatePresetValEnums};
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  [key: string]: any;
19
19
  }> | null;
20
20
  handleUpdate(val: any, widgetType: any, defValueUnit: any): void;
21
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange")[], "update:modelValue" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  cfg: {
23
23
  type: ObjectConstructor;
24
24
  required: true;
@@ -28,5 +28,6 @@ declare const _default: import("vue").DefineComponent<{
28
28
  };
29
29
  }>> & {
30
30
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
31
+ onOutFilterChange?: ((...args: any[]) => any) | undefined;
31
32
  }, {}>;
32
33
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"./enums.js";import{WidgetCfgMaps as r,formatItemData as a}from"./widgetCfgMaps.js";import l from"moment";import s from"../../../../../_virtual/plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var o=s(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue"],computed:{valueCp(){const{widgetType:e}=this.cfg;return[i.DATE,i.DATE_TIME].includes(e)?this.cfg.value?l(this.cfg.value).valueOf():null:this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t}=e;if(!n.includes(t))return`${e.advanceColWidth||200}px`},initComponentProps(e){const{widgetType:t,alias:i,title:a,placeholder:l,widgetCfg:s}=e,{props:n,handlerProps:o}=r.get(t);let p={...n};o&&(p=o(p,{...s,title:i||a})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e,{defValueUnit:a}=e.widgetCfg||{};if(!r.has(i))return null;const{value:l}=e,{component:s,style:n,eventsBySearch:o=[]}=r.get(i),p={...this.initialProps,value:l},u=o.reduce(((e,t)=>{const{name:i,handler:r}=t;let a=this.search;return r&&(a=e=>{r(e,this.search,p)}),{...e,[`on${i}`]:a}}),{});return t(s,{...n,...p,style:{width:this.getEleWidth(e)},value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e,i,a),...u})},handleUpdate(e,t,i){const r=a(e,t);this.$emit("update:modelValue",r)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{o as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r,formatItemData as a}from"./widgetCfgMaps.js";import l from"moment";import s from"../../../../../_virtual/plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var o=s(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","outFilterChange"],computed:{valueCp(){const{widgetType:e}=this.cfg;return[i.DATE,i.DATE_TIME].includes(e)?this.cfg.value?l(this.cfg.value).valueOf():null:this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t}=e;if(!n.includes(t))return`${e.advanceColWidth||200}px`},initComponentProps(e){const{widgetType:t,alias:i,title:a,placeholder:l,widgetCfg:s}=e,{props:n,handlerProps:o}=r.get(t);let p={...n};o&&(p=o(p,{...s,title:i||a})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e,{defValueUnit:a}=e.widgetCfg||{};if(!r.has(i))return null;const{value:l}=e,{component:s,style:n,eventsBySearch:o=[]}=r.get(i),p={...this.initialProps,value:l},u=o.reduce(((e,t)=>{const{name:i,handler:r}=t;let a=this.search;return r&&(a=e=>{r(e,this.search,p)}),{...e,[`on${i}`]:a}}),{});return t(s,{...n,...p,style:{width:this.getEleWidth(e)},value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e,i,a),...u})},handleUpdate(e,t,i){const r=a(e,t);this.$emit("update:modelValue",r)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{o as default};
@@ -178,8 +178,8 @@ export declare const WidgetCfgMaps: Map<string, {
178
178
  }>> & {
179
179
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
180
180
  }, {
181
- value: string | number | unknown[];
182
181
  multiple: boolean;
182
+ value: string | number | unknown[];
183
183
  }>;
184
184
  props: {
185
185
  clearable?: undefined;
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e,DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as o}from"naive-ui";import r from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import n from"moment";import{presetValToTimestamp as s}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&(console.log("点击keyup>>>>>",l),l())}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const o={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(o.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(o.multiple=!0),o},setDefaultValue:m}],[e.DATE,{component:o,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?s(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:o,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?s(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:r,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>!l||t!==e.DATE&&t!==e.DATE_TIME?l:n(l).format("YYYY-MM-DD HH:mm:ss");export{u as WidgetCfgMaps,i as formatItemData};
1
+ import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as o}from"naive-ui";import r from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import s from"moment";import{presetValToTimestamp as n}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&(console.log("点击keyup>>>>>",l),l())}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const o={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(o.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(o.multiple=!0),o},setDefaultValue:m}],[e.DATE,{component:o,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:o,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:r,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>!l||t!==e.DATE&&t!==e.DATE_TIME?l:s(l).format("YYYY-MM-DD HH:mm:ss");export{u as WidgetCfgMaps,i as formatItemData};
@@ -1,4 +1,4 @@
1
- import { IApiServerType } from '../../../../../es/components/table-filter/src/types';
1
+ import { IApiServerType, ISearchType } from '../../../../../es/components/table-filter/src/types';
2
2
  export default function useAdvanced(): {
3
3
  transformData: (advancedFilterData: IApiServerType[]) => {
4
4
  fieldType: string;
@@ -25,4 +25,7 @@ export default function useAdvanced(): {
25
25
  placeholder: string | undefined;
26
26
  advanceColWidth: string;
27
27
  }[];
28
+ getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
29
+ transformClassifyChild: (conObjList: any) => {};
30
+ transformParams: (paramsList: any) => {};
28
31
  };
@@ -1 +1 @@
1
- import{WidgetOptionEnums as t,WidgetTypeEnums as e}from"../types/enums.js";const i={[t.RADIO]:"0",[t.MULTIPLE]:"1",[t.ALL]:"0",[t.SELECT_TIME]:"1",[t.PAST_TIME]:"2",[t.FUTURE_TIME]:"3"};function l(){return{transformData:function(l){return l.map((l=>{var n,a;const{optionInfo:o={list:[]},type:u,defaultValue:r,optionType:d,filterExplicit:p}=l,s={},T={title:(c=l).title,alias:c.customTitle,isShowSearch:c.isShowSearch?1:0,filterExplicit:c.filterExplicit?1:0,explicitRequired:c.explicitRequired?1:0,advanceOptionSetting:c.optionType?i[c.optionType]:"",placeholder:c.remark,advanceColWidth:String(c.width)};var c;let v,E,f=u;p?(v=u===e.SELECT&&d===t.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],E=null==r?void 0:r.unit):u===e.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(f="CHECKBOX_GROUP");const L={isRender:!0,widgetType:f,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:t,value:e})=>({value:e,label:t}))),defaultValue:v,defValueUnit:E,multiple:d===t.MULTIPLE};return{...T,fieldType:l.dataType,columnName:l.name,settingObj:s,setting:JSON.stringify(s),widgetCfg:L}}))}}}export{l as default};
1
+ import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as l}from"../components/render-widget/enums.js";const n={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function o(){return{transformData:function(i){return i.map((i=>{var l,o;const{optionInfo:a={list:[]},type:r,defaultValue:u,optionType:s,filterExplicit:d}=i,p={},c={title:(f=i).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?n[f.optionType]:"",placeholder:f.remark,advanceColWidth:String(f.width)};var f;let m,v,T=r;d?(m=r===t.SELECT&&s===e.MULTIPLE?null==u?void 0:u.valueList:null==(l=null==u?void 0:u.valueList)?void 0:l[0],v=null==u?void 0:u.unit):r===t.SELECT&&(null==a?void 0:a.list)&&(null==a?void 0:a.list.length)<10&&(T="CHECKBOX_GROUP");const g={isRender:!0,widgetType:T,valueList:null==(o=null==a?void 0:a.list)?void 0:o.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:m,defValueUnit:v,multiple:s===e.MULTIPLE};return{...c,fieldType:i.dataType,columnName:i.name,settingObj:p,setting:JSON.stringify(p),widgetCfg:g}}))},getCacheDef:function(e,i){const{widgetType:l,widgetCfg:n}=e;return l===t.SELECT&&n.multiple?i:i[0]},transformClassifyChild:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const n=e.field_key,o=e.value&&e.value.length>1?e.value:e.value.toString();if(t[n]=o,e.unit&&e.unit!==l.CUSTOM){const l=i(e.unit,"YYYY-MM-DD HH:mm:ss");t[n]=l}})),t},transformParams:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,l=e.value&&e.value.length>1?e.value:e.value.toString();t[i]=l})),t}}}export{o as default};
@@ -1,61 +1,8 @@
1
- import { AnyObject } from '../../../../../es/shared/types';
2
- import { ISearchType, IbtnType } from '../../../../../es/components/table-filter/src/types';
1
+ import { ISearchType } from '../../../../../es/components/table-filter/src/types';
3
2
  export default function (): {
4
3
  filterApiConfig: import("vue").Ref<{}>;
5
4
  handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
6
- $utils: {
7
- /**
8
- * 获取按钮自定义颜色
9
- * @param {string} v
10
- */
11
- getBtnStyle(v: IbtnType): {
12
- 'border-color': string;
13
- color: string;
14
- 'background-color'?: undefined;
15
- } | {
16
- color: string;
17
- 'border-color'?: undefined;
18
- 'background-color'?: undefined;
19
- } | {
20
- 'background-color': string;
21
- 'border-color': string;
22
- color?: undefined;
23
- };
24
- /**
25
- * @param: 获取按钮的操作对象
26
- * @param {Object} row 行对象
27
- * @param {Object} btn 按钮
28
- */
29
- getRowOperatorIdSetting(row: any, btn: AnyObject): any;
30
- getAlphafloat(a: any, alpha?: any): number;
31
- hexToRGBA(hex: string, alpha?: any): "" | {
32
- r: any;
33
- g: any;
34
- b: any;
35
- a: number;
36
- };
37
- handleLabelColor(item: any, isSelect: boolean): {
38
- color: string;
39
- background: string;
40
- borderColor: string;
41
- };
42
- /**
43
- *
44
- * 时间转换
45
- * @param {type} type 时间戳类型
46
- * @param {time} time 时间戳
47
- */
48
- formatTime(type: string, time: any): string;
49
- isJSON(str: any): boolean;
50
- isArray(val: any): boolean;
51
- isEmpty(val: any): boolean;
52
- isString(val: any): boolean;
53
- isPlainObject(val: any): boolean;
54
- };
55
5
  outQuickSearchFn: {
56
- handleRequestedLabel(v: any): Promise<import("axios").AxiosResponse<any, any>>;
57
6
  handlerInitSearchItem(arr: ISearchType[]): void;
58
- handleSetLabelOptions(labelType: any, el: ISearchType): void;
59
- getConObj(arr: any): any;
60
7
  };
61
8
  };
@@ -1 +1 @@
1
- import{ref as e}from"vue";import r from"moment";import t from"./useRenderWidget.js";import a from"axios";import o from"xe-utils";const{initRenderWidgetCfg:n,getRenderSearchConObj:l}=t();function i(){const t=e({});return{filterApiConfig:t,handleGetConfigApi:async function(e,r,a={},o){try{o&&(t.value=o);const n=t.value[r]||null;if("function"==typeof n){const r=await n(e,a);return Promise.resolve(r)}return Promise.reject(new Error(`${r} Is not a function`))}catch(e){return Promise.reject(e)}},$utils:{getBtnStyle:e=>"white_bg"==e.showStyle?{"border-color":e.color,color:e.color}:"none_bg"==e.showStyle?{color:e.color}:(e.showStyle,{"background-color":e.color,"border-color":e.color}),getRowOperatorIdSetting(e={},r){if(e.operatorColumn){const t=e.operatorColumn.find((e=>e.includes(r.sid)));if(r.setting&&"string"==typeof t&&t.includes("###")){const[e,a]=t.split("###");if(e&&a){const e=JSON.parse(r.setting);if(Array.isArray(e)){const t=e.find((e=>e.obj_id==a));if(t){const e=JSON.parse(JSON.stringify(r));return e.settingObj={...t},e.setting=JSON.stringify(t),e}}}}}const t=JSON.parse(JSON.stringify(r));if(this.isJSON(t.setting)){const e=JSON.parse(t.setting);if(Array.isArray(e)){const r=e[0]||{};return t.settingObj={...r},t.setting=JSON.stringify(r),t}return t}return r},getAlphafloat(e,r){if(void 0!==e)return parseFloat((e/256).toFixed(2));if(void 0!==r){if(1<r&&r<=100)return parseFloat((r/100).toFixed(2));if(0<=r&&r<=1)return parseFloat(r.toFixed(2))}return 1},hexToRGBA(e,r){if(!/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e))return console.log("Invalid HEX"),"";const t=Math.floor((e.length-1)/3),a=(o=e.slice(1),n=t,o.match(new RegExp(`.{${n}}`,"g")));var o,n;const[l,i,s,u]=a.map((e=>parseInt(e.repeat(2/e.length),16)));return{r:l,g:i,b:s,a:this.getAlphafloat(u,r)}},handleLabelColor(e,r){var t;let a="#5585f5";const o={blue:"#0000ff",sky:"#87ceeb",azure:"#f0ffff",palegreen:"#98fb98",yellow:"#ffff00",darkorange:"#ff8c00",magenta:"#ff00ff",purple:"#800080",maroon:"#800000",orange:"#ffa500",green:"#008000",red:"#ff0000",grey:"#808080"};if(null==(t=null==e?void 0:e.color)?void 0:t.includes("-")){a=o[e.color.split("-")[1]]||"#5585f5"}else a=e.color||"#5585f5";const n=this.hexToRGBA(a)||{r:85,g:133,b:245,a:1};if(r)return{color:"#fff",background:`rgba(${n.r}, ${n.g}, ${n.b})`,borderColor:`rgba(${n.r}, ${n.g}, ${n.b})`};if(e.isSelect)return{color:"#fff",background:`rgba(${n.r}, ${n.g}, ${n.b})`,borderColor:`rgba(${n.r}, ${n.g}, ${n.b})`};return{color:!(e.isPublic&&1==e.isPublic)?"rgba(28, 28, 28, 1)":"rgba(33, 33, 33, 0.6)",background:"rgba(250, 250, 250, 1)",borderColor:"rgba(213, 213, 213, 0.8)"}},formatTime(e,t){let a="";if(!t)return"";switch(e){case"DATE":a="yyyy-MM-dd";break;case"DATETIME":a="yyyy-MM-dd HH:mm:ss";break;case"TIME":a="HH:mm:ss";break;case"MOUTH":a="MM-dd";break;case"DATETIMESTR":a="yyyy年M月dd日 HH:mm";break;case"MOUTHTIME":a="M月d日 HH:mm";break;case"HM":a=" HH:mm"}return r(t).format(a)},isJSON(e){if("string"==typeof e)try{const r=JSON.parse(e);return!("object"!=typeof r||!r)}catch(e){return!1}return!1},isArray:e=>Array.isArray(e),isEmpty(e){for(const r in e)return!1;return!0},isString:e=>"string"==typeof e,isPlainObject:e=>"object"==typeof e},outQuickSearchFn:{handleRequestedLabel(e){const r={type:e,pageSize:1e4};return a.get("/label/list",{params:r})},handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{n(e)}))},handleSetLabelOptions(e,r){this.handleRequestedLabel(e||"").then((({data:e})=>{if("SUCCESS"===e.result){const t=e.map.rows||[];r.labelList=t}})).catch((e=>console.log(e)))},getConObj(e){if(!Array.isArray(e))return[];const r=[];e.forEach((e=>{var t,a,n;const i=l(e);if(i)return void r.push(i);const s={field_key:e.columnName,con:e.con,value:"",limit_date:"",start_val:e.start_val||"",end_val:e.end_val||"",unit:e.unit||"",id:e.id};"Text"===e.com&&e.value&&(s.value=e.value,r.push(s));const u=e.advanceOptionSetting;if("SelectMui"===e.com&&o.anyNotEmpty(e.value)){"0"===String(u)&&(Array.isArray(e.value)||(e.value=[e.value]));const t=Array.isArray(e.value)&&e.value.length>0;if("SelectMuiWordBook"==e.comType&&t)s.value=e.value.join("|#|");else if("treeSelect"==e.comType){let r=e.value;"string"==typeof r?[r]=r.split("<&=&>"):Array.isArray(r)&&(r=r.map((e=>{const[r]="string"==typeof e?e.split("<&=&>"):[];return r})),r=r.join("|#|")),s.value=r}else if(t)if("CONVERT"==e.con){let r=[];r=e.value.map((r=>e.labelList[r].filter)),s.value=r}else{let r=[];r=e.value.map((r=>e.labelList[r].labelName)),s.value=r.join("|#|")}r.push(s)}if("DatePicker"===e.com&&e.value.length){const t=e.value[0].format(e.showFormat),a=e.value[1].format(e.showFormat);"BIRTHDAY"===e.settingObj.attr?s.limit_date=`${t}~${a}`:(s.start_val=t,s.end_val=a),r.push(s)}if("DayPicker"===e.com&&e.value){const t=e.value.startOf("day").format("YYYY-MM-DD HH:mm:ss"),a=e.value.endOf("day").format("YYYY-MM-DD HH:mm:ss");"BIRTHDAY"===e.settingObj.attr?s.limit_date=`${t}~${a}`:(s.start_val=t,s.end_val=a),r.push(s)}if(e.AGEAttr){s.value="",s.con="IN";const t=365*Number(e.lessValue),a=365*Number(e.bigValue);(t||0===t)&&a&&(s.start_val=t,s.end_val=a,r.push(JSON.parse(JSON.stringify(s))))}else if("Number"===e.com){let o=null!=(t=e.lessValue)?t:"",l=null!=(a=e.bigValue)?a:"";(o||l)&&("PERCENTAGE"===(null==(n=e.settingObj)?void 0:n.attr)&&(o=(o||0===o)&&Number(o)/100||"",l=(l||0===l)&&Number(l)/100),s.value=`${o}~${l}`),s.con="EQ",r.push(JSON.parse(JSON.stringify(s)))}"SelectQuote"===e.com&&e.value.length&&(s.value=e.value.join("|#|"),r.push(s))}));return r.filter((e=>e.value||e.limit_date||e.start_val||e.end_val))}}}}export{i as default};
1
+ import{ref as e}from"vue";import r from"./useRenderWidget.js";const{initRenderWidgetCfg:t,getRenderSearchConObj:n}=r();function o(){const r=e({});return{filterApiConfig:r,handleGetConfigApi:async function(e,t,n={},o){try{o&&(r.value=o);const i=r.value[t]||null;if("function"==typeof i){const r=await i(e,n);return Promise.resolve(r)}return Promise.reject(new Error(`${t} Is not a function`))}catch(e){return Promise.reject(e)}},outQuickSearchFn:{handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{t(e)}))}}}}export{o as default};
@@ -1 +1 @@
1
- import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{WidgetTypeEnums as n,DatePresetValEnums as t}from"../components/render-widget/enums.js";const r=[n.CHECKBOX_GROUP];function i(){function i(e){var n;return null==(n=e.widgetCfg)?void 0:n.isRender}function u(n){const{widgetType:t,defaultValue:r,defValueUnit:i}=n.widgetCfg||{},u=e.get(t);let l;if(u){const{setDefaultValue:e}=u;e&&(l=e(r,i))}return l}return{isRender:i,getDefValByRenderWidget:u,initRenderWidgetCfg:function(e){const n=i(e);if(!n)return n;const{widgetType:t}=e.widgetCfg||{};return e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})),e.isRender=n,e.widgetType=t,e.con="EQ",r.includes(t)&&(e._isBlock=!0),e.value=u(e),n},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:r,con:u,value:l,widgetType:d}=e;let o=null;[n.DATE,n.DATE_TIME].includes(d)&&(o=t.CUSTOM);const x=Array.isArray(l)?l:l?[l]:[];return{field_key:r,con:u,value:x.length>0?x:null,unit:o}},getDefValByRenderConObj:function(e,t){if(!i(t))return null;const{widgetType:r,multiple:u}=t.widgetCfg||{},{value:l}=e;return r!==n.SELECT&&r!==n.CHECKBOX_GROUP||!u?Array.isArray(l)?l[0]:l:Array.isArray(l)?l:l?[l]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:n,defValueUnit:t}=e.widgetCfg||{};return!(!n&&!t)},resetRenderWidgetValue:function(e){const n=i(e);return n?(e.value=null,n):n}}}export{i as default};
1
+ import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";import{WidgetTypeEnums as t}from"../types/enums.js";const r=[t.CHECKBOX_GROUP];function i(){function i(e){var n;return null==(n=e.widgetCfg)?void 0:n.isRender}function u(n){const{widgetType:t,defaultValue:r,defValueUnit:i}=n.widgetCfg||{},u=e.get(t);let l;if(u){const{setDefaultValue:e}=u;e&&(l=e(r,i))}return l}return{isRender:i,getDefValByRenderWidget:u,initRenderWidgetCfg:function(e){const n=i(e);if(!n)return n;const{widgetType:t}=e.widgetCfg||{};return e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})),e.isRender=n,e.widgetType=t,e.con="EQ",r.includes(t)&&(e._isBlock=!0),e.value=u(e),n},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:r,con:u,value:l,widgetType:o}=e;let d=null;[t.DATE,t.DATE_TIME].includes(o)&&(d=n.CUSTOM);const s=Array.isArray(l)?l:l?[l]:[];return{field_key:r,con:u,value:s.length>0?s:null,unit:d}},getDefValByRenderConObj:function(e,n){if(!i(n))return null;const{widgetType:r,multiple:u}=n.widgetCfg||{},{value:l}=e;return r!==t.SELECT&&r!==t.CHECKBOX_GROUP||!u?Array.isArray(l)?l[0]:l:Array.isArray(l)?l:l?[l]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:n,defValueUnit:t}=e.widgetCfg||{};return!(!n&&!t)},resetRenderWidgetValue:function(e){const n=i(e);return n?(e.value=null,n):n}}}export{i as default};
@@ -1 +1 @@
1
- import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as i,WidgetOptionEnums as l}from"../types/enums.js";import{widgetValOptions as t}from"./options.js";import{isNil as r}from"./utils.js";const e=(e,p={mappingMethod:null,mapping:[]},u=null)=>{var o,_;if(r(e))return[];if(e===T.SELECT){const{mapping:T,mappingMethod:i}=p;if(T&&i)return i===n.DICT?[{label:"默认选中第一项",value:E.FIRST_VAL}]:T}let A=null!=(_=null==(o=t[i.SQL])?void 0:o[e])?_:[];if(u===l.FUTURE_TIME){const T=[E.TODAY,E.TOMORROW,E.THIS_WEEK,E.NEXT_WEEK,E.THIS_MONTH,E.NEXT_MONTH,E.THIS_QUARTER,E.NEXT_QUARTER,E.THIS_YEAR,E.NEXT_YEAR];A=A.filter((({value:n})=>T.includes(n)))}if(u===l.PAST_TIME){const T=[E.TODAY,E.YESTERDAY,E.THIS_WEEK,E.LAST_WEEK,E.THIS_MONTH,E.LAST_MONTH,E.THIS_QUARTER,E.LAST_QUARTER,E.THIS_YEAR,E.LAST_YEAR];A=A.filter((({value:n})=>T.includes(n)))}return A},p=(n,E={mappingMethod:null,mapping:[]})=>{var l,e;if(r(n))return[];if(n===T.SELECT){const{mapping:T}=E;return T}return null!=(e=null==(l=t[i.API])?void 0:l[n])?e:[]};export{p as generateDefOptionsInApi,e as generateDefOptionsInSql};
1
+ import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as r,WidgetOptionEnums as t}from"../types/enums.js";import{widgetValOptions as i}from"./baseOptions.js";import{isNil as l}from"./transformData.js";const e=(e,p={mappingMethod:null,mapping:[]},o=null)=>{var u,_;if(l(e))return[];if(e===T.SELECT){const{mapping:T,mappingMethod:r}=p;if(T&&r)return r===n.DICT?[{label:"默认选中第一项",value:E.FIRST_VAL}]:T}let A=null!=(_=null==(u=i[r.SQL])?void 0:u[e])?_:[];if(o===t.FUTURE_TIME){const T=[E.TODAY,E.TOMORROW,E.THIS_WEEK,E.NEXT_WEEK,E.THIS_MONTH,E.NEXT_MONTH,E.THIS_QUARTER,E.NEXT_QUARTER,E.THIS_YEAR,E.NEXT_YEAR];A=A.filter((({value:n})=>T.includes(n)))}if(o===t.PAST_TIME){const T=[E.TODAY,E.YESTERDAY,E.THIS_WEEK,E.LAST_WEEK,E.THIS_MONTH,E.LAST_MONTH,E.THIS_QUARTER,E.LAST_QUARTER,E.THIS_YEAR,E.LAST_YEAR];A=A.filter((({value:n})=>T.includes(n)))}return A},p=(n,E={mappingMethod:null,mapping:[]})=>{var t,e;if(l(n))return[];if(n===T.SELECT){const{mapping:T}=E;return T}return null!=(e=null==(t=i[r.API])?void 0:t[n])?e:[]};export{p as generateDefOptionsInApi,e as generateDefOptionsInSql};
@@ -1,4 +1,5 @@
1
1
  import { IFilterConditionType } from '../../../../../es/components/table-filter/src/types';
2
+ export declare const isNil: (val: any) => boolean;
2
3
  /**
3
4
  * 高级筛选数据转换
4
5
  */
@@ -24,26 +25,6 @@ export declare const transformDataToFront: (dataType: string, rawData?: any[]) =
24
25
  };
25
26
  remark: any;
26
27
  _rawData: any;
27
- }[] | {
28
- dataType: string;
29
- fieldType: any;
30
- title: any;
31
- customTitle: any;
32
- optionSetting: any;
33
- openAdvancedFilter: any;
34
- filterOutDisplay: any;
35
- filterOutRequired: any;
36
- width: any;
37
- defValCfg: {
38
- value: any;
39
- presetVal: any;
40
- };
41
- mappingConfig: {
42
- mappingMethod: null;
43
- mapping: any;
44
- };
45
- remark: any;
46
- _rawData: any;
47
28
  }[];
48
29
  export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
49
30
  name: string | undefined;
@@ -65,23 +46,6 @@ export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
65
46
  list: any;
66
47
  };
67
48
  remark: string | undefined;
68
- } | {
69
- name: string | undefined;
70
- title: string;
71
- customTitle: string;
72
- type: string | undefined;
73
- dataType: string | undefined;
74
- isShowSearch: boolean;
75
- filterExplicit: boolean;
76
- explicitRequired: boolean;
77
- width: string | undefined;
78
- optionType: string | undefined;
79
- defaultValue: {
80
- valueList: any[];
81
- unit: any;
82
- };
83
- optionInfo: any;
84
- remark: string | undefined;
85
49
  } | null)[];
86
50
  export declare const transformConditions: (rawConditions: any, params: any[]) => any;
87
51
  export declare const transformRawConditions: (conditions: any[]) => {
@@ -1 +1 @@
1
- import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t,MappingMethodEnums as i}from"../types/enums.js";import{getWidgetTypeInSql as a}from"./getWidgetType.js";import{isNil as n}from"./utils.js";const u=(u,p=[])=>u===l.API?p.map((l=>{var i,a,n,p,o,r,d,y,f,m,v;const s=null!=(a=null==(i=l.optionInfo)?void 0:i.list)?a:[];return{dataType:u,p_name:l.name,p_type:l.dataType,title:l.title,customTitle:l.customTitle,type:l.type,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:l.type===e.SELECT&&l.optionType===t.MULTIPLE?null!=(p=null==(n=l.defaultValue)?void 0:n.valueList)?p:[]:null!=(d=null==(r=null==(o=l.defaultValue)?void 0:o.valueList)?void 0:r[0])?d:null,presetVal:l.type===e.SELECT&&l.optionType===t.MULTIPLE?(null==(y=l.defaultValue)?void 0:y.unit)?[null==(f=l.defaultValue)?void 0:f.unit]:[]:null!=(v=null==(m=l.defaultValue)?void 0:m.unit)?v:null},mappingConfig:{mappingMethod:null,mapping:s.map((({name:l,value:e})=>({label:l,value:e})))},remark:l.remark,_rawData:l}})):u===l.SQL?p.map((l=>{var p,o,r,d,y,f,m,v,s,T,c,g,L;let V=null;n(null==(p=l.optionInfo)?void 0:p.manualMapping)||(V=(null==(o=null==l?void 0:l.optionInfo)?void 0:o.manualMapping)?i.MANUAL:i.DICT);const A={mappingMethod:V,mapping:(null!=(d=null==(r=l.optionInfo)?void 0:r.list)?d:[]).map((({name:l,value:e})=>({label:l,value:e})))},E=a(l.dataType,A);return{dataType:u,fieldType:l.dataType,title:l.title,customTitle:l.customTitle,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:E===e.SELECT&&l.optionType===t.MULTIPLE?null!=(f=null==(y=l.defaultValue)?void 0:y.valueList)?f:[]:null!=(s=null==(v=null==(m=l.defaultValue)?void 0:m.valueList)?void 0:v[0])?s:null,presetVal:E===e.SELECT&&l.optionType===t.MULTIPLE?(null==(T=l.defaultValue)?void 0:T.unit)?[null==(c=l.defaultValue)?void 0:c.unit]:[]:null!=(L=null==(g=l.defaultValue)?void 0:g.unit)?L:null},mappingConfig:A,remark:l.remark,_rawData:l}})):[],p=e=>e.map((e=>{var t;const{title:i,customTitle:a,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:p,width:o,optionSetting:r,defValCfg:d,mappingConfig:y,remark:f,_rawData:m}=e,{value:v,presetVal:s}=d,{mapping:T}=y;if(e.dataType===l.API){const{p_name:l,p_type:d,type:y}=e;return{...m,name:l,title:i,customTitle:a,type:y,dataType:d,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(v)?v:v?[v]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:{manualMapping:null==(t=null==m?void 0:m.optionInfo)?void 0:t.manualMapping,list:T.map((({label:l,value:e})=>({name:l,value:e})))},remark:f}}if(e.dataType===l.SQL){const{title:l,fieldType:t}=e;return{...m,name:m&&m.name,title:l,customTitle:a,type:m&&m.type,dataType:t,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(v)?v:v?[v]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:m&&m.optionInfo,remark:f}}return null})).filter((l=>!!l)),o=(l,i)=>l.map((l=>{var a,n;const u=((l,e)=>e.find((e=>e.p_name===l)))(l.field_key,i);let p=l.value;p&&!Array.isArray(p)&&(p=[p]);const o=(null==u?void 0:u.type)===e.SELECT&&(null==u?void 0:u.optionSetting)===t.MULTIPLE?null!=p?p:[]:null!=(a=null==p?void 0:p[0])?a:null;return{key:l.field_key,condition:l.con,value:o,presetVal:null!=(n=l.unit)?n:null}})),r=l=>l.map((l=>({field_key:l.key,con:l.condition,value:Array.isArray(l.value)?l.value:l.value?[l.value]:[],unit:l.presetVal})));export{o as transformConditions,p as transformDataToEnd,u as transformDataToFront,r as transformRawConditions};
1
+ import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t}from"../types/enums.js";const i=l=>null==l||null==l,a=(i,a=[])=>i===l.API?a.map((l=>{var a,n,u,p,o,r,d,v,y,m,s;const f=null!=(n=null==(a=l.optionInfo)?void 0:a.list)?n:[];return{dataType:i,p_name:l.name,p_type:l.dataType,title:l.title,customTitle:l.customTitle,type:l.type,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:l.type===e.SELECT&&l.optionType===t.MULTIPLE?null!=(p=null==(u=l.defaultValue)?void 0:u.valueList)?p:[]:null!=(d=null==(r=null==(o=l.defaultValue)?void 0:o.valueList)?void 0:r[0])?d:null,presetVal:l.type===e.SELECT&&l.optionType===t.MULTIPLE?(null==(v=l.defaultValue)?void 0:v.unit)?[null==(y=l.defaultValue)?void 0:y.unit]:[]:null!=(s=null==(m=l.defaultValue)?void 0:m.unit)?s:null},mappingConfig:{mappingMethod:null,mapping:f.map((({name:l,value:e})=>({label:l,value:e})))},remark:l.remark,_rawData:l}})):[],n=e=>e.map((e=>{var t;const{title:i,customTitle:a,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:p,width:o,optionSetting:r,defValCfg:d,mappingConfig:v,remark:y,_rawData:m}=e,{value:s,presetVal:f}=d,{mapping:c}=v;if(e.dataType===l.API){const{p_name:l,p_type:d,type:v}=e;return{...m,name:l,title:i,customTitle:a,type:v,dataType:d,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(s)?s:s?[s]:[],unit:Array.isArray(f)?f[0]:f},optionInfo:{manualMapping:null==(t=null==m?void 0:m.optionInfo)?void 0:t.manualMapping,list:c.map((({label:l,value:e})=>({name:l,value:e})))},remark:y}}return null})).filter((l=>!!l)),u=(l,i)=>l.map((l=>{var a,n;const u=((l,e)=>e.find((e=>e.p_name===l)))(l.field_key,i);let p=l.value;p&&!Array.isArray(p)&&(p=[p]);const o=(null==u?void 0:u.type)===e.SELECT&&(null==u?void 0:u.optionSetting)===t.MULTIPLE?null!=p?p:[]:null!=(a=null==p?void 0:p[0])?a:null;return{key:l.field_key,condition:l.con,value:o,presetVal:null!=(n=l.unit)?n:null}})),p=l=>l.map((l=>({field_key:l.key,con:l.condition,value:Array.isArray(l.value)?l.value:l.value?[l.value]:[],unit:l.presetVal})));export{i as isNil,u as transformConditions,n as transformDataToEnd,a as transformDataToFront,p as transformRawConditions};
@@ -20,6 +20,7 @@ export declare const WidgetTypeEnums: {
20
20
  SELECT: string;
21
21
  DATE: string;
22
22
  DATE_TIME: string;
23
+ CHECKBOX_GROUP: string;
23
24
  };
24
25
  export declare const WidgetOptionEnums: {
25
26
  RADIO: string;
@@ -1 +1 @@
1
- const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},S={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},O={NULL:"NULL",EQUAL:"EQ"};export{O as ConditionEnums,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,S as WidgetValEnums};
1
+ const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME",CHECKBOX_GROUP:"CHECKBOX_GROUP"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},S={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},O={NULL:"NULL",EQUAL:"EQ"};export{O as ConditionEnums,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,S as WidgetValEnums};