cnhis-design-vue 3.1.42-beta.0 → 3.1.42-release.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/big-table/index.d.ts +3 -4
  4. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  5. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  6. package/es/components/big-table/style/index.css +1 -1
  7. package/es/components/button-print/index.d.ts +6 -7
  8. package/es/components/button-print/src/ButtonPrint.vue.d.ts +6 -7
  9. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  10. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  11. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  12. package/es/components/button-print/src/utils/print.js +1 -1
  13. package/es/components/fabric-chart/index.d.ts +2 -2
  14. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  15. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  18. package/es/components/field-set/index.d.ts +2 -2
  19. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  20. package/es/components/form-config/index.d.ts +37 -46
  21. package/es/components/form-config/src/FormConfig.vue.d.ts +37 -46
  22. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  23. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +16 -16
  24. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -19
  25. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +1 -9
  26. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  27. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +6 -33
  28. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  29. package/es/components/form-config/style/index.css +1 -1
  30. package/es/components/form-render/index.d.ts +16 -16
  31. package/es/components/form-render/src/FormRender.vue.d.ts +16 -16
  32. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +16 -16
  33. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  34. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  35. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  36. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  37. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  38. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  39. package/es/components/form-render/src/components/renderer/select.js +1 -1
  40. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
  41. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  42. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -4
  43. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  44. package/es/components/form-render/style/index.css +1 -1
  45. package/es/components/iho-table/index.d.ts +0 -3
  46. package/es/components/iho-table/src/IhoTable.vue.d.ts +0 -3
  47. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  48. package/es/components/iho-table/src/constants/index.d.ts +4 -4
  49. package/es/components/iho-table/src/constants/index.js +1 -1
  50. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  51. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +7 -20
  52. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  53. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -18
  54. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  55. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.d.ts +2 -0
  56. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.js +1 -0
  57. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  59. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  60. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  61. package/es/components/iho-table/src/types/index.d.ts +0 -1
  62. package/es/components/iho-table/src/utils/index.d.ts +0 -1
  63. package/es/components/iho-table/src/utils/index.js +1 -1
  64. package/es/components/iho-table/style/index.css +1 -1
  65. package/es/components/index.css +1 -1
  66. package/es/components/index.d.ts +2 -8
  67. package/es/components/index.js +1 -1
  68. package/es/components/info-header/index.d.ts +156 -3799
  69. package/es/components/info-header/src/InfoHeader.vue.d.ts +156 -3800
  70. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  71. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  72. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  73. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  74. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +139 -2669
  75. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  76. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +0 -745
  77. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  78. package/es/components/info-header/src/types/index.d.ts +3 -17
  79. package/es/components/info-header/style/index.css +1 -1
  80. package/es/components/keyboard/index.d.ts +2 -4
  81. package/es/components/keyboard/src/Keyboard.vue.d.ts +2 -4
  82. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  83. package/es/components/keyboard/style/index.css +1 -1
  84. package/es/components/recommend-search/index.d.ts +2 -2
  85. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  86. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  87. package/es/components/scale-view/src/components/formitem/sign-com.d.ts +1 -1
  88. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  89. package/es/components/scale-view/src/hooks/use-component.d.ts +116 -69
  90. package/es/components/search-cascader/index.d.ts +2 -2
  91. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
  92. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  93. package/es/components/select-label/index.d.ts +169 -70
  94. package/es/components/select-label/src/LabelFormContent.vue.d.ts +53 -1
  95. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  96. package/es/components/select-label/src/SelectLabel.vue.d.ts +116 -70
  97. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  98. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  99. package/es/components/select-label/style/index.css +1 -1
  100. package/es/components/select-person/index.d.ts +1 -1
  101. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  102. package/es/components/shortcut-setter/index.d.ts +17 -17
  103. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +17 -17
  104. package/es/components/steps-wheel/index.d.ts +0 -1
  105. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +0 -1
  106. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  107. package/es/components/steps-wheel/style/index.css +1 -1
  108. package/es/components/table-filter/index.d.ts +2385 -0
  109. package/es/components/table-filter/index.js +1 -1
  110. package/es/components/{base-search/src/index.vue.d.ts → table-filter/src/base-search-com/BaseSearch.vue.d.ts} +91 -26
  111. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -0
  112. package/es/components/{classification/src/index.vue.d.ts → table-filter/src/classification/Classification-com.vue.d.ts} +291 -57
  113. package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -0
  114. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +0 -1
  115. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  116. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +42 -1
  117. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  118. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  119. package/es/components/table-filter/src/components/render-widget/enums.d.ts +8 -0
  120. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  121. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +1 -2
  122. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  123. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  124. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  125. package/es/components/{classification → table-filter}/src/components/search-filter/index.vue.d.ts +93 -10
  126. package/es/components/table-filter/src/components/search-filter/index.vue.js +1 -0
  127. package/es/components/{classification → table-filter}/src/components/set-classification/index.vue.d.ts +130 -5
  128. package/es/components/table-filter/src/components/set-classification/index.vue.js +1 -0
  129. package/es/components/{classification → table-filter}/src/components/table-modal/index.vue.d.ts +42 -0
  130. package/es/components/table-filter/src/components/table-modal/index.vue.js +1 -0
  131. package/es/components/table-filter/src/const/index.d.ts +5 -0
  132. package/es/components/table-filter/src/const/index.js +1 -0
  133. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -4
  134. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  135. package/es/components/table-filter/src/hooks/useMixins.d.ts +54 -1
  136. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  137. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  138. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +8 -0
  139. package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -0
  140. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +12 -0
  141. package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -0
  142. package/es/components/{quick-search/src/index.vue.d.ts → table-filter/src/quick-search/QuickSearch.vue.d.ts} +120 -31
  143. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -0
  144. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  145. package/es/components/table-filter/src/tool/time-domain.d.ts +39 -0
  146. package/es/components/table-filter/src/tool/time-domain.js +1 -0
  147. package/es/components/table-filter/src/tool/transformData.d.ts +37 -1
  148. package/es/components/table-filter/src/tool/transformData.js +1 -1
  149. package/es/components/table-filter/src/tool/utils.d.ts +4 -0
  150. package/es/components/table-filter/src/tool/utils.js +1 -0
  151. package/es/components/table-filter/src/types/enums.d.ts +0 -1
  152. package/es/components/table-filter/src/types/enums.js +1 -1
  153. package/es/components/table-filter/src/types/index.d.ts +169 -13
  154. package/es/components/table-filter/style/index.css +1 -0
  155. package/es/shared/utils/index.d.ts +0 -1
  156. package/es/shared/utils/index.js +1 -1
  157. package/package.json +2 -2
  158. package/es/components/base-search/index.d.ts +0 -293
  159. package/es/components/base-search/index.js +0 -1
  160. package/es/components/base-search/src/index.vue.js +0 -1
  161. package/es/components/base-search/style/iconfont.ttf +0 -0
  162. package/es/components/base-search/style/index.css +0 -1
  163. package/es/components/button-print/src/api.d.ts +0 -3
  164. package/es/components/button-print/src/api.js +0 -1
  165. package/es/components/classification/index.d.ts +0 -995
  166. package/es/components/classification/index.js +0 -1
  167. package/es/components/classification/src/components/search-filter/index.vue.js +0 -1
  168. package/es/components/classification/src/components/set-classification/index.vue.js +0 -1
  169. package/es/components/classification/src/components/table-modal/index.vue.js +0 -1
  170. package/es/components/classification/src/const/index.d.ts +0 -2
  171. package/es/components/classification/src/const/index.js +0 -1
  172. package/es/components/classification/src/index.vue.js +0 -1
  173. package/es/components/classification/style/iconfont.ttf +0 -0
  174. package/es/components/classification/style/index.css +0 -1
  175. package/es/components/config-provider/index.d.ts +0 -14
  176. package/es/components/config-provider/index.js +0 -1
  177. package/es/components/config-provider/src/ConfigProvider.d.ts +0 -14
  178. package/es/components/config-provider/src/ConfigProvider.js +0 -1
  179. package/es/components/config-provider/src/interface.d.ts +0 -19
  180. package/es/components/config-provider/src/interface.js +0 -1
  181. package/es/components/config-provider/src/utils/index.d.ts +0 -2
  182. package/es/components/config-provider/src/utils/index.js +0 -1
  183. package/es/components/date-picker/index.d.ts +0 -20
  184. package/es/components/date-picker/index.js +0 -1
  185. package/es/components/date-picker/src/DatePicker.vue.d.ts +0 -20
  186. package/es/components/date-picker/src/DatePicker.vue.js +0 -1
  187. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +0 -1842
  188. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +0 -1
  189. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +0 -1972
  190. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +0 -1
  191. package/es/components/info-header/src/constants/index.d.ts +0 -4
  192. package/es/components/info-header/src/constants/index.js +0 -1
  193. package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +0 -4
  194. package/es/components/info-header/src/hooks/useThemeOverrides.js +0 -1
  195. package/es/components/keyboard/src/constants/index.d.ts +0 -2
  196. package/es/components/keyboard/src/constants/index.js +0 -1
  197. package/es/components/quick-search/index.d.ts +0 -713
  198. package/es/components/quick-search/index.js +0 -1
  199. package/es/components/quick-search/src/index.vue.js +0 -1
  200. package/es/components/quick-search/style/index.css +0 -1
  201. package/es/components/select-label/style/iconfont.ttf +0 -0
  202. package/es/components/steps-wheel/src/constants/index.d.ts +0 -2
  203. package/es/components/steps-wheel/src/constants/index.js +0 -1
  204. package/es/components/time-picker/index.d.ts +0 -18
  205. package/es/components/time-picker/index.js +0 -1
  206. package/es/components/time-picker/src/TimePicker.vue.d.ts +0 -18
  207. package/es/components/time-picker/src/TimePicker.vue.js +0 -1
  208. package/es/shared/mixins/index.d.ts +0 -1
  209. package/es/shared/mixins/index.js +0 -1
  210. package/es/shared/mixins/useTheme.d.ts +0 -3
  211. package/es/shared/mixins/useTheme.js +0 -1
  212. /package/es/components/{classification → table-filter}/src/directive/flexibleResize.d.ts +0 -0
  213. /package/es/components/{classification → table-filter}/src/directive/flexibleResize.js +0 -0
  214. /package/es/components/{base-search → table-filter}/src/directive/resize.d.ts +0 -0
  215. /package/es/components/{base-search → table-filter}/src/directive/resize.js +0 -0
  216. /package/es/components/table-filter/src/tool/{baseOptions.d.ts → options.d.ts} +0 -0
  217. /package/es/components/table-filter/src/tool/{baseOptions.js → options.js} +0 -0
  218. /package/es/components/{base-search → table-filter}/src/tool/resizeSensor.d.ts +0 -0
  219. /package/es/components/{base-search → table-filter}/src/tool/resizeSensor.js +0 -0
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as t,computed as i,ref as l,inject as a,watch as n,openBlock as o,createBlock as s,unref as r,normalizeClass as u,withCtx as c,createVNode as d,normalizeStyle as p,createSlots as m,createElementVNode as v,createElementBlock as h,createCommentVNode as f,withDirectives as g,vShow as y,createTextVNode as C,toDisplayString as w,withModifiers as k,renderSlot as x}from"vue";import{useMessage as b,useDialog as S,NModal as _,NCard as z,NTooltip as D,NIcon as I,NSwitch as E,NPopconfirm as M,NButton as P}from"naive-ui";import{ReorderTwo as U,Brush as N,DocumentOutline as V}from"@vicons/ionicons5";import O from"../../../../../shared/components/SvgIcon/SvgIcon.vue.js";import F from"../../../../../shared/components/VueDraggable/src/vuedraggable.js";import{root_isShowResetButton as j}from"../../const/index.js";import B from"axios";import A from"../../../../../_virtual/plugin-vue_export-helper.js";const H={class:"svg-wrap"},R={class:"flex_between"},$={key:0},J={class:"table-modal-list"},T={class:"list-title"},Y=v("span",{class:"list-title-item",style:{width:"6%"}},null,-1),q=v("span",{class:"list-title-item"}," 名称 ",-1),G=v("span",{class:"list-title-item"}," 父类名称 ",-1),K=v("span",{class:"list-title-item"}," 是否显示 ",-1),L=v("span",{class:"list-title-item"}," 设置为默认 ",-1),Q={class:"list-title-item"},W=v("span",{class:"list-title-item"}," 操作 ",-1),X=["onClick"],Z={class:"list-content-item",style:{width:"6%","text-align":"center",overflow:"initial"}},ee=["title"],te=["title"],ie={class:"list-content-item list-content-switch"},le={class:"list-content-item list-content-radio"},ae={class:"list-content-item"},ne={class:"list-content-item"},oe={key:0},se=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),re={key:1},ue=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1);var ce=A(e({__name:"index",props:{visibleIn:{type:Boolean},loading:{type:Boolean},confirm:{type:Function},edit:{type:Function,defdault:()=>{}},copy:{type:Function,defdault:()=>{}},delItem:{type:Function,defdault:()=>{}},dataSource:{type:Array,default:()=>[]},type:{type:String},transitionName:{type:String},getContainer:{type:Function,default:()=>document.body}},emits:["handleOk","close","changeData","resetPopconfirm","finishSubmit"],setup(e,{emit:A}){const ce=e,de=B.create({}),pe=t(),me=b(),ve=S(),he=i((()=>(null==pe?void 0:pe.isOrgAdmin)||!1)),fe=l(ce.dataSource),ge=l(ce.visibleIn),ye=l(!1),Ce=l("other"==ce.type?"100%":"860px"),we=l("654px"),ke=a(j);function xe(){ce.type&&(_e(),A("handleOk",function(e){if("search"==e||"other"==e)return{id:"",tableId:"",setting:JSON.stringify(fe.value.map((e=>({isDefault:e.isDefault,isShow:e.isShow,name:e.name,type:e.type,classifyId:e.sid}))))};if("mananger"==e){let e={};return fe.value.forEach(((t,i)=>{const l=(null==t?void 0:t.id)||"";e[l]={id:l,index:i,default:t.isDefault?1:0,isHide:t.isShow?0:1}})),{type:"HOMEPAGE",tableId:"10001",setting:JSON.stringify({pageConfig:e})}}return}(ce.type)))}function be(){Se()}function Se(){ge.value=!1,_e(),A("close")}function _e(){Ce.value="860px",we.value="654px",ye.value=!1}function ze(){A("changeData",fe.value)}function De(){ye.value=!ye.value;let e=document.body.clientHeight;Ce.value="860px"===Ce.value?"100%":"860px",we.value="654px"===we.value?`${e}px`:"654px"}function Ie(e){A("resetPopconfirm",e)}function Ee(e,t,i){const l=ce[e];l&&l(t,i)}return n((()=>ce.visibleIn),(e=>{ge.value=e})),n((()=>ce.dataSource),(e=>{fe.value=e}),{immediate:!0,deep:!0}),(t,i)=>(o(),s(r(_),{show:ge.value,bodyStyle:{height:we.value,overflowY:"auto"},width:Ce.value,maskClosable:!1,class:u(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":ye.value}]),closable:!1,centered:"",transitionName:e.transitionName,getContainer:e.getContainer,"positive-text":"保存","negative-text":"取消",onPositiveClick:xe,onNegativeClick:Se},{default:c((()=>[d(r(z),{style:p({width:Ce.value,height:we.value,overflowY:"auto"}),title:"设置分类",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},m({"header-extra":c((()=>[v("div",H,[d(r(O),{onClick:De,"icon-class":ye.value?"xitongtubiaodaohangtubiaozuixiaohua":"xitongtubiaodaohangtubiaozuidahua"},null,8,["icon-class"]),d(r(O),{"icon-class":"xitongtubiaodaohangtubiaoguanbi",onClick:Se})])])),default:c((()=>[r(he)&&"mananger"==e.type?(o(),h("p",$,[v("span",{onClick:be}," 添加首页 ")])):f("v-if",!0),v("div",J,[v("div",T,[Y,q,G,K,L,g(v("span",Q," 设置公共首页 ",512),[[y,r(he)&&"mananger"==e.type]]),W]),d(r(F),{class:"list-content",tag:"ul",list:fe.value,"item-key":"sid",onEnd:ze,animation:"300"},{item:c((({element:t})=>[g(v("li",{class:u({checked:t.checked}),onClick:e=>{return i=t,fe.value.forEach((e=>{e.sid==i.sid?e.checked=!0:e.checked=!1})),void A("changeData",fe.value,i);var i}},[v("span",Z,[d(r(D),{mouseEnterDelay:1},{trigger:c((()=>[d(r(I),{component:r(U),size:"24"},null,8,["component"])])),default:c((()=>[C(" 拖拽调整顺序 ")])),_:1})]),v("span",{title:t.displayCategory,class:"list-content-item"},w(t.name),9,ee),v("span",{title:t.name,class:"list-content-item"},w(t.displayCategory),9,te),v("span",ie,[d(r(E),{"onUpdate:value":e=>{return i=t,void fe.value.forEach((e=>{e.sid==i.sid&&(e.isShow=!e.isShow,e.isShow||(i.isDefault=!1))}));var i},size:"small",value:t.isShow},null,8,["onUpdate:value","value"])]),v("span",le,[d(r(E),{"onUpdate:value":e=>{var i;(i=t).isShow&&fe.value.forEach((e=>{e.sid==i.sid?e.isDefault=!e.isDefault:e.isDefault=!1}))},size:"small",value:t.isDefault},null,8,["onUpdate:value","value"])]),g(v("span",ae,[d(r(E),{"onUpdate:value":e=>function(e){function t(e){let t="";for(const i in e)t+=encodeURIComponent(i)+"="+encodeURIComponent(e[i])+"&";return t=t.slice(0,-1),t}ve.warning({title:`是否确定${e.isCommon?"取消":"设置"}公共首页?`,positiveText:"确定",negativeText:"取消",maskClosable:!1,onPositiveClick:()=>{let i={id:e.id,setCommon:!e.isCommon};de({url:"homePage/updateCommon",method:"post",data:i,transformRequest:[t]}).then((t=>{"SUCCESS"===t.data.result?(me.success(t.data.resultMsg),e.isCommon=!e.isCommon,A("finishSubmit")):me.error(t.data.resultMsg)})).catch((e=>{console.log(e)}))},onNegativeClick:()=>{}})}(t),size:"small",value:t.isCommon},null,8,["onUpdate:value","value"])],512),[[y,r(he)&&"mananger"==e.type]]),v("span",ne,["mananger"==e.type&&r(he)?(o(),h("span",oe,[d(r(M),{onPositiveClick:e=>Ee("confirm",t)},{trigger:c((()=>[d(r(I),null,{default:c((()=>[se])),_:1})])),default:c((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0),f(" 编辑 "),g(v("span",null,[d(r(D),null,{trigger:c((()=>[d(r(I),{component:r(N),onClick:k((e=>Ee("edit",t,"编辑")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[C(" 编辑 ")])),_:2},1024)],512),[[y,"other"==e.type||"search"==e.type&&t.isEdit||"mananger"==e.type&&r(he)]]),f(" 复制 "),g(v("span",null,[d(r(D),null,{trigger:c((()=>[d(r(I),{component:r(V),onClick:k((e=>Ee("copy",t,"复制")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[C(" 复制 ")])),_:2},1024)],512),[[y,"search"==e.type||"other"==e.type]]),f(" 删除 "),t.isEdit?(o(),h("span",re,[d(r(M),{onPositiveClick:e=>Ee("delItem",t,"删除")},{trigger:c((()=>[d(r(I),null,{default:c((()=>[ue])),_:1})])),default:c((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0)])],10,X),[[y,"line"!=t.type]])])),_:1},8,["list"])])])),_:2},["search"==e.type?{name:"footer",fn:c((()=>[v("div",R,[v("div",null,[r(ke)?(o(),s(r(M),{key:0,placement:"top-start","positive-text":"确认","negative-text":"取消",onPositiveClick:Ie},{trigger:c((()=>[d(r(P),null,{default:c((()=>[C("恢复默认设置")])),_:1})])),default:c((()=>[C(" 确认要恢复系统默认设置吗? ")])),_:1})):f("v-if",!0)]),v("div",null,[d(r(P),{onClick:Se},{default:c((()=>[C("取消")])),_:1}),x(t.$slots,"add"),d(r(P),{type:"info",onClick:xe},{default:c((()=>[C("保存")])),_:1})])])])),key:"0"}:void 0]),1032,["style"])])),_:3},8,["show","bodyStyle","width","class","transitionName","getContainer"]))}}),[["__file","index.vue"]]);export{ce as default};
@@ -0,0 +1,5 @@
1
+ import { Ref, InjectionKey } from 'vue';
2
+ import { IeditTableWrapperItem } from '../types';
3
+ export declare const GROUP_TITLE_KEY = "group-show-title";
4
+ export declare const root_isShowResetButton: InjectionKey<Ref<boolean>>;
5
+ export declare const InjecteditTableWrapper: InjectionKey<Ref<IeditTableWrapperItem>>;
@@ -0,0 +1 @@
1
+ const o="group-show-title",t=Symbol("root_isShowResetButton"),e=Symbol("editTableWrapper");export{o as GROUP_TITLE_KEY,e as InjecteditTableWrapper,t as root_isShowResetButton};
@@ -1,4 +1,4 @@
1
- import { IApiServerType, ISearchType } from '../../../../../es/components/table-filter/src/types';
1
+ import { IApiServerType } from '../../../../../es/components/table-filter/src/types';
2
2
  export default function useAdvanced(): {
3
3
  transformData: (advancedFilterData: IApiServerType[]) => {
4
4
  fieldType: string;
@@ -25,7 +25,4 @@ 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) => {};
31
28
  };
@@ -1 +1 @@
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
+ 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,8 +1,61 @@
1
- import { ISearchType } from '../../../../../es/components/table-filter/src/types';
1
+ import { AnyObject } from '../../../../../es/shared/types';
2
+ import { ISearchType, IbtnType } from '../../../../../es/components/table-filter/src/types';
2
3
  export default function (): {
3
4
  filterApiConfig: import("vue").Ref<{}>;
4
5
  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
+ };
5
55
  outQuickSearchFn: {
56
+ handleRequestedLabel(v: any): Promise<import("axios").AxiosResponse<any, any>>;
6
57
  handlerInitSearchItem(arr: ISearchType[]): void;
58
+ handleSetLabelOptions(labelType: any, el: ISearchType): void;
59
+ getConObj(arr: any): any;
7
60
  };
8
61
  };
@@ -1 +1 @@
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
+ 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 +1 @@
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
+ 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};
@@ -0,0 +1,8 @@
1
+ import moment from 'moment';
2
+ import 'moment/locale/zh-cn';
3
+ import { ISearchType } from '../../../../../es/components/table-filter/src/types';
4
+ export default function (): {
5
+ validConObj: (conObj: any, fieldList: ISearchType[], fieldSearchLimit: any) => any;
6
+ getSearchDefValueByLimit: (field: ISearchType, searchLimit?: any) => "" | moment.Moment[];
7
+ formatSearchLimit: (limitList: any, freeze?: boolean) => any;
8
+ };
@@ -0,0 +1 @@
1
+ import e from"moment";import"moment/locale/zh-cn";import{useMessage as t}from"naive-ui";const n=t();function r(){function t(e){e=Number(e)||0;const t=Math.floor(e/12),n=e%12;return(t?`${t}年`:"")+(n?6==n?"半"+(t?"":"年"):`${n}个月`:"")}return{validConObj:function(r,o,i){if(!i||!(null==r?void 0:r.length)||!(null==o?void 0:o.length))return!0;const u=o.reduce(((e,t,n)=>(e[t.columnName]=n,e)),{});return r.every((r=>{const c=r.field_key,l=o[u[c]],a=i[c];return!l||!a||("time"!==a.type||((r,o,i)=>{let u=i.value,c=0;const l=u;if(!u)return!0;const a={TODAY:1/30,TOMORROW:1/30,YESTERDAY:1/30,THIS_WEEK:7/30,NEXT_WEEK:7/30,LAST_WEEK:7/30,THIS_MONTH:1,NEXT_MONTH:1,LAST_MONTH:1,THIS_SEASON:3,NEXT_SEASON:3,LAST_SEASON:3,THIS_YEAR:12,NEXT_YEAR:12,LAST_YEAR:12},f={HOUR:1/24/30,DAY:1/30,WEEK:7/30,MONTH:1,QUARTER:3,YEAR:12},E=r.con;if("IN"===E){const{start_val:t,end_val:i}=r;if(!t&&i||t&&!i)return void n.warning(`请选择${o.title}${t?"截止":"起始"}日期`);t&&i&&(c=e(i).valueOf(),u=e(t).add(l,"month").valueOf())}else if(a[E])c=a[E];else if(",IN_THE_PAST,IN_THE_FUTURE,".includes(`,${E},`)){const{value:e,unit:t}=r,n=f[t]||1;c=Math.floor(Number(e)*Number(n)*100)/100}else if(",IN_THE_PAST_DI,IN_THE_FUTURE_DI,".includes(`,${E},`)){const{unit:e}=r;c=f[e]||0}const T=c<=u;if(!T){const e=o.title||"";n.warning(`${e}最大查询跨度${t(i.value)}`)}return T})(r,l,a))}))},getSearchDefValueByLimit:function(t,n){if(n){const r=n[t.columnName];if(r&&"time"===r.type){const{way:t,defValue:n}=r,o=1==t,i=e(),u=i.clone().add("month",n*(o?-1:1));return o?[u,i]:[i,u]}}return""},formatSearchLimit:function(e,n=!0){const r={time(e){const{value:n,defValue:r}=e;return`默认查询${t(r)},最大查询跨度${t(n)}`}},o=e.reduce(((e,t)=>{const{key:n}=t;if(n){const o=r[t.type]?r[t.type](t):"";e[n]={...t,tips:o}}return e}),{});return n?Object.freeze(o):o}}}export{r as default};
@@ -0,0 +1,12 @@
1
+ import { ISearchType } from '../../../../../es/components/table-filter/src/types';
2
+ export default function (): {
3
+ wordBookutils: {
4
+ hasArray: (arr: ISearchType[]) => boolean;
5
+ handleWordbookData(item: any, data: any, params: any): {
6
+ rows: never[];
7
+ hasFieldList: boolean;
8
+ searchPageConfig: {};
9
+ };
10
+ getTitleHeader(fieldList: ISearchType[], renderKey: any): any;
11
+ };
12
+ };
@@ -0,0 +1 @@
1
+ import e from"xe-utils";import"moment";function t(){const t="<&=&>",a={hasArray:e=>Array.isArray(e)&&e.length>0,handleWordbookData(o,s,r){const{setting:n={}}=o,{showKeys:i=[],defaultValue:l,defaultValueTitle:u}=n.wordbook||{};let h=null,d=[],m=!1,c={};if(l&&u&&(h={myName:l,showKeys:u}),s&&s.result){const n=(null==s?void 0:s.reqParams)||{},{page:l,hasNextPage:u,fieldList:y}=s.map;c=Object.assign(o.searchPageConfig,{page:l,hasNextPage:u,isRequest:!0,keyword:(null==r?void 0:r.keyword)||void 0,asyncCount:(null==n?void 0:n.asyncCount)||void 0});const g=s.map.rows.map((a=>{const s=[];i.forEach((t=>{const o=e.stringToValue(a[t],"change_text");s.push(o)}));const r=e.stringToValue(a[o.setting.wordbook.field_key],"value");return Object.assign(a,{myName:r,showKeys:s.join(t),_show_title:s.join(" ")})})),f={};if(d=g.reduce(((e,t)=>(!f[t.myName]&&(f[t.myName]=e.push(t)),e)),[]),h&&d.unshift(h),a.hasArray(y)&&a.hasArray(i)&&i.length>1){const e=a.getTitleHeader(y,i);d.unshift({myName:e,showKeys:e,sid:Math.random()}),m=!0}}return{rows:d,hasFieldList:m,searchPageConfig:c}},getTitleHeader(e,a){const o=[];let s=[];s=Array.isArray(a)?[...a]:[a],s.forEach((t=>{for(let a=0;a<e.length;a++)if(t===e[a].columnName){o.push(`${e[a].title}`);break}}));return o.join(t)}};return{wordBookutils:a}}export{t as default};
@@ -1,19 +1,23 @@
1
1
  import { PropType } from 'vue';
2
- import { IParentNamesType, ISearchType, ISaveType, IApiServerType, ISearchParamsType } from '../../../../es/components/table-filter/src/types';
3
2
  import 'moment/locale/zh-cn';
3
+ import { IParentNamesType, ISearchType, ISaveType, IConditionMapType, IApiServerType } from '../../../../../es/components/table-filter/src/types';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  searchFieldList: {
6
6
  type: PropType<IApiServerType[]>;
7
7
  default: () => never[];
8
8
  };
9
- quickSearchConfig: {
10
- type: PropType<ISearchParamsType[]>;
11
- default: () => never[];
12
- };
13
9
  tableId: {
14
10
  type: StringConstructor;
15
11
  default: string;
16
12
  };
13
+ source: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ quickSearchListObj: {
18
+ type: PropType<IConditionMapType>;
19
+ default: () => {};
20
+ };
17
21
  filterApiConfig: {
18
22
  type: ObjectConstructor;
19
23
  };
@@ -25,12 +29,16 @@ declare const _default: import("vue").DefineComponent<{
25
29
  trigger: string[];
26
30
  };
27
31
  };
32
+ attrs: any;
28
33
  $message: import("naive-ui").MessageApi;
29
34
  handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
30
35
  outQuickSearchFn: {
36
+ handleRequestedLabel(v: any): Promise<import("axios").AxiosResponse<any, any>>;
31
37
  handlerInitSearchItem(arr: ISearchType[]): void;
38
+ handleSetLabelOptions(labelType: any, el: ISearchType): void;
39
+ getConObj(arr: any): any;
32
40
  };
33
- getDefValByRenderWidget: (cfg: ISearchType) => any;
41
+ initRenderWidgetCfg: (cfg: ISearchType) => any;
34
42
  getRenderSearchConObj: (cfg: ISearchType) => {
35
43
  field_key: string;
36
44
  con: string | undefined;
@@ -38,7 +46,6 @@ declare const _default: import("vue").DefineComponent<{
38
46
  unit: null;
39
47
  } | null;
40
48
  resetRenderWidgetValue: (cfg: ISearchType) => any;
41
- isRender: (cfg: ISearchType) => any;
42
49
  transformData: (advancedFilterData: IApiServerType[]) => {
43
50
  fieldType: string;
44
51
  columnName: string;
@@ -64,30 +71,36 @@ declare const _default: import("vue").DefineComponent<{
64
71
  placeholder: string | undefined;
65
72
  advanceColWidth: string;
66
73
  }[];
67
- getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
68
- transformParams: (paramsList: any) => {};
69
74
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
70
75
  searchFieldList: {
71
76
  type: PropType<IApiServerType[]>;
72
77
  default: () => never[];
73
78
  };
74
- quickSearchConfig: {
75
- type: PropType<ISearchParamsType[]>;
76
- default: () => never[];
77
- };
78
79
  tableId: {
79
80
  type: StringConstructor;
80
81
  default: string;
81
82
  };
83
+ source: {
84
+ type: StringConstructor;
85
+ default: string;
86
+ };
87
+ quickSearchListObj: {
88
+ type: PropType<IConditionMapType>;
89
+ default: () => {};
90
+ };
82
91
  filterApiConfig: {
83
92
  type: ObjectConstructor;
84
93
  };
85
94
  }>> & {
86
- onOnFilterSearch?: ((...args: any[]) => any) | undefined;
87
- onGetFilterParam?: ((...args: any[]) => any) | undefined;
95
+ onOnSave?: ((...args: any[]) => any) | undefined;
96
+ onGetParam?: ((...args: any[]) => any) | undefined;
97
+ onFilterCountChange?: ((...args: any[]) => any) | undefined;
98
+ onCloseModal?: ((...args: any[]) => any) | undefined;
99
+ onUpdateTableCondiTion?: ((...args: any[]) => any) | undefined;
88
100
  onClearQuickSearchConfig?: ((...args: any[]) => any) | undefined;
89
101
  }>>;
90
- emit: (event: "onFilterSearch" | "getFilterParam" | "clearQuickSearchConfig", ...args: any[]) => void;
102
+ emit: (event: "onSave" | "getParam" | "filterCountChange" | "closeModal" | "updateTableCondiTion" | "clearQuickSearchConfig", ...args: any[]) => void;
103
+ ageAttrDomList: any;
91
104
  formRef: any;
92
105
  formValue: import("vue").Ref<{
93
106
  classname: string;
@@ -103,6 +116,32 @@ declare const _default: import("vue").DefineComponent<{
103
116
  settingObj?: any;
104
117
  placeholder?: string | undefined;
105
118
  AGEAttr?: boolean | undefined;
119
+ BIRTHDAY?: {
120
+ con: any;
121
+ limit_date?: any;
122
+ start_val: any;
123
+ end_val: any;
124
+ unit?: string | undefined;
125
+ units?: {
126
+ con: string;
127
+ title: string;
128
+ name: string;
129
+ units?: number | undefined;
130
+ }[] | undefined;
131
+ } | undefined;
132
+ DATE?: {
133
+ con: any;
134
+ limit_date?: any;
135
+ start_val: any;
136
+ end_val: any;
137
+ unit?: string | undefined;
138
+ units?: {
139
+ con: string;
140
+ title: string;
141
+ name: string;
142
+ units?: number | undefined;
143
+ }[] | undefined;
144
+ } | undefined;
106
145
  CL?: string | undefined;
107
146
  CONVERT?: any;
108
147
  EVALUATEAttr?: boolean | undefined;
@@ -126,6 +165,12 @@ declare const _default: import("vue").DefineComponent<{
126
165
  comAttr?: string | undefined;
127
166
  con?: string | undefined;
128
167
  dataSource?: any;
168
+ dateTeam?: {
169
+ con: string;
170
+ title: string;
171
+ name: string;
172
+ units?: number | undefined;
173
+ }[] | undefined;
129
174
  dictionarieObj?: any;
130
175
  explicitRequired?: number | undefined;
131
176
  explicitDefaultVal?: string | undefined;
@@ -209,6 +254,9 @@ declare const _default: import("vue").DefineComponent<{
209
254
  hasFieldList?: any;
210
255
  search_DefaultValue?: any;
211
256
  }[]>;
257
+ isChangeWindow: import("vue").Ref<boolean>;
258
+ modalWidth: import("vue").Ref<string>;
259
+ modalHeight: import("vue").Ref<string>;
212
260
  parentNames: import("vue").Ref<{
213
261
  disabled: boolean;
214
262
  isAdd?: boolean | undefined;
@@ -220,7 +268,8 @@ declare const _default: import("vue").DefineComponent<{
220
268
  parentNamesHasAdd: import("vue").ComputedRef<boolean>;
221
269
  handleName: import("vue").ComputedRef<(item: ISearchType, key?: string) => any>;
222
270
  init: () => void;
223
- onFilterSearch: () => {
271
+ handleParentName: () => void;
272
+ onSave: () => {
224
273
  columnName: string;
225
274
  title: string;
226
275
  fieldType?: string | undefined;
@@ -230,6 +279,32 @@ declare const _default: import("vue").DefineComponent<{
230
279
  settingObj?: any;
231
280
  placeholder?: string | undefined;
232
281
  AGEAttr?: boolean | undefined;
282
+ BIRTHDAY?: {
283
+ con: any;
284
+ limit_date?: any;
285
+ start_val: any;
286
+ end_val: any;
287
+ unit?: string | undefined;
288
+ units?: {
289
+ con: string;
290
+ title: string;
291
+ name: string;
292
+ units?: number | undefined;
293
+ }[] | undefined;
294
+ } | undefined;
295
+ DATE?: {
296
+ con: any;
297
+ limit_date?: any;
298
+ start_val: any;
299
+ end_val: any;
300
+ unit?: string | undefined;
301
+ units?: {
302
+ con: string;
303
+ title: string;
304
+ name: string;
305
+ units?: number | undefined;
306
+ }[] | undefined;
307
+ } | undefined;
233
308
  CL?: string | undefined;
234
309
  CONVERT?: any;
235
310
  EVALUATEAttr?: boolean | undefined;
@@ -253,6 +328,12 @@ declare const _default: import("vue").DefineComponent<{
253
328
  comAttr?: string | undefined;
254
329
  con?: string | undefined;
255
330
  dataSource?: any;
331
+ dateTeam?: {
332
+ con: string;
333
+ title: string;
334
+ name: string;
335
+ units?: number | undefined;
336
+ }[] | undefined;
256
337
  dictionarieObj?: any;
257
338
  explicitRequired?: number | undefined;
258
339
  explicitDefaultVal?: string | undefined;
@@ -336,10 +417,12 @@ declare const _default: import("vue").DefineComponent<{
336
417
  hasFieldList?: any;
337
418
  search_DefaultValue?: any;
338
419
  }[];
339
- getMergeConObj: () => ISearchParamsType[];
340
- getConObjParams: () => ISearchParamsType[];
420
+ getMergeConObj: () => any;
421
+ getConObjParams: () => any;
422
+ closeModal: () => void;
423
+ resetChangeWindow: () => void;
341
424
  openSaveToCalss: () => void;
342
- getConObj: (arr: ISearchType[]) => ISearchParamsType[];
425
+ getConObj: (arr: ISearchType[]) => any;
343
426
  saveToCalss: () => void;
344
427
  handleParentNamesAdd: (e: Event) => void;
345
428
  hanldeBlur: () => void;
@@ -351,7 +434,6 @@ declare const _default: import("vue").DefineComponent<{
351
434
  cancelSaveToCalss: () => void;
352
435
  clearData: () => void;
353
436
  handlerReset: (arr: ISearchType[]) => void;
354
- setDefaultCon: (widgetArr: ISearchParamsType[]) => void;
355
437
  NForm: any;
356
438
  NFormItem: import("vue").DefineComponent<{
357
439
  readonly label: StringConstructor;
@@ -675,7 +757,7 @@ declare const _default: import("vue").DefineComponent<{
675
757
  [key: string]: any;
676
758
  }> | null;
677
759
  handleUpdate(val: any, widgetType: any, defValueUnit: any): void;
678
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange")[], "update:modelValue" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
760
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
679
761
  cfg: {
680
762
  type: ObjectConstructor;
681
763
  required: true;
@@ -685,31 +767,38 @@ declare const _default: import("vue").DefineComponent<{
685
767
  };
686
768
  }>> & {
687
769
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
688
- onOutFilterChange?: ((...args: any[]) => any) | undefined;
689
770
  }, {}>;
690
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onFilterSearch" | "getFilterParam" | "clearQuickSearchConfig")[], "onFilterSearch" | "getFilterParam" | "clearQuickSearchConfig", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
771
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "getParam" | "filterCountChange" | "closeModal" | "updateTableCondiTion" | "clearQuickSearchConfig")[], "onSave" | "getParam" | "filterCountChange" | "closeModal" | "updateTableCondiTion" | "clearQuickSearchConfig", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
691
772
  searchFieldList: {
692
773
  type: PropType<IApiServerType[]>;
693
774
  default: () => never[];
694
775
  };
695
- quickSearchConfig: {
696
- type: PropType<ISearchParamsType[]>;
697
- default: () => never[];
698
- };
699
776
  tableId: {
700
777
  type: StringConstructor;
701
778
  default: string;
702
779
  };
780
+ source: {
781
+ type: StringConstructor;
782
+ default: string;
783
+ };
784
+ quickSearchListObj: {
785
+ type: PropType<IConditionMapType>;
786
+ default: () => {};
787
+ };
703
788
  filterApiConfig: {
704
789
  type: ObjectConstructor;
705
790
  };
706
791
  }>> & {
707
- onOnFilterSearch?: ((...args: any[]) => any) | undefined;
708
- onGetFilterParam?: ((...args: any[]) => any) | undefined;
792
+ onOnSave?: ((...args: any[]) => any) | undefined;
793
+ onGetParam?: ((...args: any[]) => any) | undefined;
794
+ onFilterCountChange?: ((...args: any[]) => any) | undefined;
795
+ onCloseModal?: ((...args: any[]) => any) | undefined;
796
+ onUpdateTableCondiTion?: ((...args: any[]) => any) | undefined;
709
797
  onClearQuickSearchConfig?: ((...args: any[]) => any) | undefined;
710
798
  }, {
711
- quickSearchConfig: ISearchParamsType[];
799
+ source: string;
712
800
  searchFieldList: IApiServerType[];
713
801
  tableId: string;
802
+ quickSearchListObj: IConditionMapType;
714
803
  }>;
715
804
  export default _default;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as l,ref as a,computed as t,watch as i,openBlock as n,createElementBlock as o,createElementVNode as u,normalizeClass as s,Fragment as c,renderList as r,unref as d,createCommentVNode as v,toDisplayString as f,createBlock as m,createVNode as p,withCtx as h,createTextVNode as g,withDirectives as k,vShow as b,isRef as y}from"vue";import{useMessage as C,NModal as S,NCard as x,NIcon as q,NButton as _,NForm as T,NFormItem as j,NInput as w}from"naive-ui";import{CloseOutline as L,AddOutline as A}from"@vicons/ionicons5";import O from"../hooks/useMixins.js";import I from"../hooks/useRenderWidget.js";import E from"../hooks/useAdvanced.js";import"moment/locale/zh-cn";import{cloneDeep as Q}from"lodash-es";import R from"../components/render-widget/index.vue.js";import U from"../../../../_virtual/plugin-vue_export-helper.js";const V={class:"quick-row"},z={class:"svg-wrap"},M={class:"flex_right"},B={class:"class-filter-content"},D={class:"quickSearch-content"},F=u("span",{class:"label"},"父类名称:",-1),N=["onDblclick","onClick"],P={key:0,class:"s-content"};var W=U(e({__name:"QuickSearch",props:{searchFieldList:{type:Array,default:()=>[]},tableId:{type:String,default:""},source:{type:String,default:"editTable"},quickSearchListObj:{type:Object,default:()=>({})},filterApiConfig:{type:Object}},emits:["filterCountChange","onSave","closeModal","updateTableCondiTion","clearQuickSearchConfig","getParam"],setup(e,{expose:U,emit:W}){const G=e,J={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},H=l(),K=C(),{handleGetConfigApi:X,outQuickSearchFn:Y}=O(),{initRenderWidgetCfg:Z,getRenderSearchConObj:$,resetRenderWidgetValue:ee}=I(),{transformData:le}=E();a(new Map);const ae=a(null),te=a({classname:""});let ie=a(!1),ne=a([]),oe=a(!1),ue=a("700px"),se=a("60vh"),ce=a([]),re=a(!1),de=a(""),ve=t((()=>!!ce.value.length&&ce.value.some((e=>e.isAdd)))),fe=t((()=>(e,l="name")=>e.alias||e[l]));function me(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=$(t);i&&l.push(i)}return l.filter((e=>e.value))}(ne.value)||[]}function pe(){ue.value="700px",se.value="60vh",oe.value=!1}function he(){var e;null==(e=ae.value)||e.validate((e=>{var l;if(e)return;let a=me();a.length||(a=[]);let t=null==(l=ce.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await X(e,"requestSaveTableCondiTion",{},G.filterApiConfig))return;ie.value=!1,null==(l=ae.value)||l.restoreValidation(),te.value.classname="",ce.value=[],W("updateTableCondiTion"),Ce(),pe(),W("closeModal")}catch(e){console.log(e)}}({tableId:G.tableId||"",setting:JSON.stringify({displayCategory:t,name:te.value.classname,conObj:a}),conditionList:"[]"})}))}function ge(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),re.value=!0}function ke(){re.value=!1,de.value&&(ce.value.forEach((e=>e.selected=!1)),ce.value.push({disabled:!0,value:de.value,selected:!0,isAdd:!0}),de.value="")}function be(e,l){!function(e,l){let{conditionList:a=[]}=G.quickSearchListObj||{};if(!a||a&&0===(null==a?void 0:a.length))return void ce.value.splice(e,1);let t=a.filter((e=>e.displayCategory===l.value));if(!t||!t.length)return void ce.value.splice(e,1);K.error("该分类下有已有数据,请删除该分类下的筛选集后重试!")}(e,l)}function ye(){ie.value=!1}function Ce(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{ee(e)})),Y.handlerInitSearchItem(ne.value)}(ne.value),"editTable"!==G.source?null==H||H.clearQuickSearchConfig():W("clearQuickSearchConfig")}return i((()=>G.searchFieldList),(e=>{e&&e.length>0&&function(){let e=Q(le(G.searchFieldList)).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];setTimeout((()=>{ne.value=e||[],Y.handlerInitSearchItem(ne.value)}))}()}),{immediate:!0,deep:!0}),i((()=>G.quickSearchListObj),(e=>{e&&Object.keys(e).length?function(){let e=[],{displayCategoryList:l=[]}=G.quickSearchListObj;l&&l.length?(l.forEach((l=>{"未分类"!==l&&e.push({disabled:!0,selected:!1,value:l})})),ce.value=e):ce.value=[]}():ce.value=[]}),{immediate:!0,deep:!0}),i((()=>ne),(()=>{const e=me()||[];W("filterCountChange",e.length),W("getParam",e)}),{deep:!0}),U({openSaveToCalss:function(){let e=me();e&&(e.length>0?ie.value=!0:K.warning("请设置搜索条件"))},clearData:Ce,onSave:function(){let e=me()||[];return pe(),W("onSave",e),ne.value}}),(l,a)=>(n(),o("div",null,[u("div",{class:s(["quick-search-block",{"quick-search-table":"editTable"===e.source}])},[(n(!0),o(c,null,r(d(ne),(l=>(n(),o("div",{class:s(["quick-item",{"quick-block":l._isBlock}]),key:l.sid||l.columnName},[u("div",V,[v(" title "),u("div",{class:s(["quick-item-title",{"quick-item-title-default":"editTable"!==e.source}])},[u("span",null,f(d(fe)(l,"title"))+"  ",1)],2),v(" content "),u("div",{class:s(["quick-item-col",{"quick-item-col-default":"editTable"!==e.source}])},[v(" 直接渲染组件 "),l.isRender?(n(),m(R,{key:0,cfg:l,modelValue:l.value,"onUpdate:modelValue":e=>l.value=e},null,8,["cfg","modelValue","onUpdate:modelValue"])):v("v-if",!0)],2)])],2)))),128))],2),v(" 保存到分类的弹窗 "),p(d(S),{show:d(ie),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:he,onNegativeClick:ye,class:"classification-modal-block"},{default:h((()=>[p(d(x),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":h((()=>[u("div",z,[p(d(q),{component:d(L),size:"24",onClick:ye},null,8,["component"])])])),footer:h((()=>[u("div",M,[p(d(_),{onClick:ye},{default:h((()=>[g("取消")])),_:1}),p(d(_),{type:"info",onClick:he},{default:h((()=>[g("确认")])),_:1})])])),default:h((()=>[u("div",B,[p(d(T),{ref_key:"formRef",ref:ae,"label-placement":"left",rules:J,model:te.value},{default:h((()=>[p(d(j),{label:"筛选集名称",path:"classname"},{default:h((()=>[p(d(w),{value:te.value.classname,"onUpdate:value":a[0]||(a[0]=e=>te.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),u("div",D,[F,(n(!0),o(c,null,r(d(ce),((e,l)=>(n(),o("div",{class:s(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:a=>function(e,l){e.disabled&&(ce.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(n(),o("div",P,[u("span",null,f(e.value),1)])):(n(),m(d(w),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),p(d(q),{component:d(L),class:"anticon-close",size:"20",onClick:a=>be(l,e)},null,8,["component","onClick"])],42,N)))),128)),d(ve)?v("v-if",!0):(n(),o(c,{key:0},[k(p(d(_),{dashed:"",icon:"plus",class:"ant-btn",onClick:ge},{default:h((()=>[p(d(q),{component:d(A),size:"20"},null,8,["component"]),g("添加分类 ")])),_:1},512),[[b,!d(re)]]),k(p(d(w),{style:{width:"100px"},class:"edit-tag",value:d(de),"onUpdate:value":a[1]||(a[1]=e=>y(de)?de.value=e:de=e),valueModifiers:{trim:!0},onBlur:ke,maxLength:10},null,8,["value"]),[[b,d(re)]])],64))])])])),_:1})])),_:1},8,["show"])]))}}),[["__file","QuickSearch.vue"]]);export{W as default};
@@ -1 +1 @@
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
+ 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};
@@ -0,0 +1,39 @@
1
+ import moment from 'moment';
2
+ declare const timeDomain: {
3
+ TODAY(): moment.Moment[];
4
+ TOMORROW(): moment.Moment[];
5
+ YESTERDAY(): moment.Moment[];
6
+ THIS_WEEK(): moment.Moment[];
7
+ NEXT_WEEK(): moment.Moment[];
8
+ UP_WEEK(): moment.Moment[];
9
+ THIS_MONTH(): moment.Moment[];
10
+ NEXT_MONTH(): moment.Moment[];
11
+ UP_MONTH(): moment.Moment[];
12
+ THIS_SEASON(): moment.Moment[];
13
+ NEXT_SEASON(): moment.Moment[];
14
+ UP_SEASON(): moment.Moment[];
15
+ THIS_YEAR(): moment.Moment[];
16
+ UP_YEAR(): moment.Moment[];
17
+ NEXT_YEAR(): moment.Moment[];
18
+ getMonth(difference?: number): moment.Moment[];
19
+ getQuarter(difference?: number): moment.Moment[];
20
+ getYear(difference?: number): moment.Moment[];
21
+ /**
22
+ * 获取前 i 周的周一和周日日期,并以数组的方式返回。
23
+ * 当 i=1,获取的是上周一和上周日的日期;
24
+ * 当 i=2,获取的是上上周一和上上周日的日期
25
+ * ...以此类推
26
+ * @param i
27
+ */
28
+ getLastWeek(i: number): moment.Moment[];
29
+ /**
30
+ * 获取后 i 周的周一和周日日期,并以数组的方式返回。
31
+ * 当 i=1,获取的是下周一和下周日的日期;
32
+ * 当 i=2,获取的是下下周一和下下周日的日期
33
+ * ...以此类推
34
+ * @param i
35
+ */
36
+ getNextWeek(i: number): moment.Moment[];
37
+ getTimeDomain(type: string, format?: string): any;
38
+ };
39
+ export default timeDomain;
@@ -0,0 +1 @@
1
+ import t from"moment";const e={TODAY:()=>[t().startOf("day"),t().endOf("day")],TOMORROW:()=>[t().add(1,"days").startOf("days"),t().add(1,"days").endOf("days")],YESTERDAY:()=>[t().subtract(1,"days").startOf("days"),t().subtract(1,"days").endOf("days")],THIS_WEEK:()=>[t().startOf("week"),t().endOf("week")],NEXT_WEEK:()=>e.getNextWeek(1),UP_WEEK:()=>e.getLastWeek(1),THIS_MONTH:()=>e.getMonth(0),NEXT_MONTH:()=>e.getMonth(1),UP_MONTH:()=>e.getMonth(-1),THIS_SEASON:()=>e.getQuarter(0),NEXT_SEASON:()=>e.getQuarter(1),UP_SEASON:()=>e.getQuarter(-1),THIS_YEAR:()=>e.getYear(0),UP_YEAR:()=>e.getYear(-1),NEXT_YEAR:()=>e.getYear(1),getMonth(e=0){const a=t().month()+e;return[t().month(a).startOf("month"),t().month(a).endOf("month")]},getQuarter(e=0){const a=t().quarter()+e;return[t().quarter(a).startOf("quarter"),t().quarter(a).endOf("quarter")]},getYear(e=0){const a=t().year()+e;return[t().year(a).startOf("year"),t().year(a).endOf("year")]},getLastWeek(e){const a=parseInt(t().format("E"));return[t().subtract(a+7*e-1,"days").startOf("days"),t().subtract(a+7*(e-1),"days").endOf("days")]},getNextWeek(e){const a=parseInt(t().format("E"));return[t().add(7-a+7*(e-1)+1,"days").startOf("days"),t().add(7-a+7*e,"days").endOf("days")]},getTimeDomain(t,a){if(e[t]){const r=e[t]();return"string"==typeof a?r.map((e=>e.format(t))):r}return[]}};export{e as default};
@@ -1,5 +1,4 @@
1
1
  import { IFilterConditionType } from '../../../../../es/components/table-filter/src/types';
2
- export declare const isNil: (val: any) => boolean;
3
2
  /**
4
3
  * 高级筛选数据转换
5
4
  */
@@ -25,6 +24,26 @@ export declare const transformDataToFront: (dataType: string, rawData?: any[]) =
25
24
  };
26
25
  remark: any;
27
26
  _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;
28
47
  }[];
29
48
  export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
30
49
  name: string | undefined;
@@ -46,6 +65,23 @@ export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
46
65
  list: any;
47
66
  };
48
67
  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;
49
85
  } | null)[];
50
86
  export declare const transformConditions: (rawConditions: any, params: any[]) => any;
51
87
  export declare const transformRawConditions: (conditions: any[]) => {
@@ -1 +1 @@
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};
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};