cnhis-design-vue 3.1.40-beta.11 → 3.1.40-beta.15

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 (425) hide show
  1. package/README.md +87 -87
  2. package/es/_virtual/plugin-vue_export-helper.js +1 -9
  3. package/es/components/annotation-edit/index.js +1 -10
  4. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
  5. package/es/components/big-table/index.js +1 -15
  6. package/es/components/big-table/src/BigTable.vue.js +1 -6
  7. package/es/components/big-table/src/BigTable.vue2.js +1 -2498
  8. package/es/components/big-table/src/bigTableEmits.js +1 -53
  9. package/es/components/big-table/src/bigTableProps.js +1 -120
  10. package/es/components/big-table/src/bigTableState.js +1 -62
  11. package/es/components/big-table/src/components/NoData.vue.js +1 -74
  12. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
  13. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
  14. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
  15. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
  16. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
  17. package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
  18. package/es/components/big-table/src/components/input-button.vue.js +1 -39
  19. package/es/components/big-table/src/components/separate.vue.js +1 -30
  20. package/es/components/big-table/src/constants/index.js +1 -3
  21. package/es/components/big-table/src/hooks/index.js +1 -9
  22. package/es/components/big-table/src/hooks/useAnchor.js +1 -49
  23. package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
  24. package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
  25. package/es/components/big-table/src/hooks/useEdit.js +1 -133
  26. package/es/components/big-table/src/hooks/useEvent.js +1 -95
  27. package/es/components/big-table/src/hooks/useFormat.js +1 -507
  28. package/es/components/big-table/src/hooks/useNestTable.js +1 -86
  29. package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
  30. package/es/components/big-table/src/hooks/useTableParse.js +1 -142
  31. package/es/components/big-table/src/utils.js +1 -618
  32. package/es/components/bpmn-workflow/index.js +1 -10
  33. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
  34. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
  35. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
  36. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
  37. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
  38. package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
  39. package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
  40. package/es/components/button-print/index.js +1 -12
  41. package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
  42. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
  43. package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
  44. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
  45. package/es/components/button-print/src/components/Preview.vue.js +1 -6
  46. package/es/components/button-print/src/components/Preview.vue2.js +1 -67
  47. package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
  48. package/es/components/button-print/src/utils/browserPrint.js +1 -43
  49. package/es/components/button-print/src/utils/dialog.js +1 -121
  50. package/es/components/button-print/src/utils/index.js +1 -2
  51. package/es/components/button-print/src/utils/print.d.ts +5 -1
  52. package/es/components/button-print/src/utils/print.js +1 -432
  53. package/es/components/editor/index.js +1 -10
  54. package/es/components/editor/src/Editor.js +1 -77
  55. package/es/components/fabric-chart/index.js +1 -10
  56. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
  57. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
  58. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
  59. package/es/components/fabric-chart/src/components/useStyle.js +1 -36
  60. package/es/components/fabric-chart/src/hooks/constant.js +1 -78
  61. package/es/components/fabric-chart/src/hooks/index.js +1 -11
  62. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
  63. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
  64. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
  65. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
  66. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
  67. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
  68. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
  69. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
  70. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
  71. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
  72. package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
  73. package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
  74. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
  75. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
  76. package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
  77. package/es/components/fabric-chart/src/utils/index.js +1 -15624
  78. package/es/components/fabric-chart/src/utils/utils.js +1 -32
  79. package/es/components/field-set/index.js +1 -10
  80. package/es/components/field-set/src/FieldSet.vue.js +1 -470
  81. package/es/components/form-config/index.d.ts +1 -1
  82. package/es/components/form-config/index.js +1 -10
  83. package/es/components/form-config/src/FormConfig.vue.d.ts +1 -1
  84. package/es/components/form-config/src/FormConfig.vue.js +1 -124
  85. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
  86. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
  87. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
  88. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
  89. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
  90. package/es/components/form-config/src/components/index.js +1 -6
  91. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
  92. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
  93. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
  94. package/es/components/form-config/src/components/renderer/index.js +1 -3
  95. package/es/components/form-config/src/constants/index.js +1 -61
  96. package/es/components/form-config/src/hooks/index.js +1 -3
  97. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
  98. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
  99. package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
  100. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
  101. package/es/components/form-config/src/utils/index.js +1 -26
  102. package/es/components/form-render/index.js +1 -30
  103. package/es/components/form-render/src/FormRender.vue.js +1 -239
  104. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
  105. package/es/components/form-render/src/components/renderer/combination.js +1 -114
  106. package/es/components/form-render/src/components/renderer/complex.js +1 -37
  107. package/es/components/form-render/src/components/renderer/date.js +1 -171
  108. package/es/components/form-render/src/components/renderer/formItem.js +1 -128
  109. package/es/components/form-render/src/components/renderer/index.js +1 -43
  110. package/es/components/form-render/src/components/renderer/input.js +1 -50
  111. package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
  112. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
  113. package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
  114. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
  115. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
  116. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
  117. package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
  118. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
  119. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
  120. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
  121. package/es/components/form-render/src/components/renderer/select.js +1 -176
  122. package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
  123. package/es/components/form-render/src/components/renderer/slider.js +1 -38
  124. package/es/components/form-render/src/components/renderer/switch.js +1 -48
  125. package/es/components/form-render/src/components/renderer/textarea.js +1 -36
  126. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
  127. package/es/components/form-render/src/constants/index.js +1 -59
  128. package/es/components/form-render/src/hooks/index.js +1 -15
  129. package/es/components/form-render/src/hooks/useAnchor.js +1 -99
  130. package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
  131. package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
  132. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
  133. package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
  134. package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
  135. package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
  136. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
  137. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
  138. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
  139. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
  140. package/es/components/form-render/src/hooks/useFormContext.js +1 -70
  141. package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
  142. package/es/components/form-render/src/hooks/useFormField.js +1 -13
  143. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
  144. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
  145. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
  146. package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
  147. package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
  148. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
  149. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
  150. package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
  151. package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
  152. package/es/components/form-render/src/types/fieldItem.js +1 -1
  153. package/es/components/form-render/src/types/index.js +1 -1
  154. package/es/components/form-render/src/utils/business.js +1 -114
  155. package/es/components/form-render/src/utils/dom.js +1 -38
  156. package/es/components/form-render/src/utils/index.js +1 -241
  157. package/es/components/form-render/src/utils/schema.js +1 -105
  158. package/es/components/grid/index.js +1 -11
  159. package/es/components/grid/src/Grid.js +1 -28
  160. package/es/components/grid/src/hooks.js +1 -168
  161. package/es/components/iho-table/index.js +1 -36
  162. package/es/components/iho-table/src/IhoTable.vue.js +1 -157
  163. package/es/components/iho-table/src/constants/index.js +1 -157
  164. package/es/components/iho-table/src/hooks/export.js +1 -2
  165. package/es/components/iho-table/src/hooks/index.js +1 -2
  166. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
  167. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
  168. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
  169. package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
  170. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
  171. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
  172. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
  173. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
  174. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
  175. package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
  176. package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
  177. package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
  178. package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
  179. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
  180. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
  181. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
  182. package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
  183. package/es/components/iho-table/src/plugins/index.js +1 -47
  184. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
  185. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
  186. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
  187. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
  188. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
  189. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
  190. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
  191. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
  192. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
  193. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
  194. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
  195. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
  196. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
  197. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
  198. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
  199. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
  200. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
  201. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
  202. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
  203. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
  204. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
  205. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
  206. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
  207. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
  208. package/es/components/iho-table/src/types/index.js +1 -1
  209. package/es/components/iho-table/src/types/pluginType.js +1 -16
  210. package/es/components/iho-table/src/utils/index.js +1 -169
  211. package/es/components/index.js +1 -119
  212. package/es/components/info-header/index.js +1 -10
  213. package/es/components/info-header/src/HiddenContent.vue.js +1 -70
  214. package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
  215. package/es/components/info-header/src/InfoHeader.vue.js +1 -313
  216. package/es/components/insurance-sdk/index.js +1 -1
  217. package/es/components/insurance-sdk/src/constants/index.js +1 -160
  218. package/es/components/insurance-sdk/src/utils/index.js +1 -1
  219. package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
  220. package/es/components/keyboard/index.d.ts +4 -21
  221. package/es/components/keyboard/index.js +1 -10
  222. package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -21
  223. package/es/components/keyboard/src/Keyboard.vue.js +1 -164
  224. package/es/components/keyboard/src/components/InputNumber.vue.d.ts +2 -19
  225. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -94
  226. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +4 -21
  227. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
  228. package/es/components/keyboard/src/utils/index.js +1 -5
  229. package/es/components/map/index.js +1 -10
  230. package/es/components/map/src/Map.vue.js +1 -336
  231. package/es/components/recommend-search/index.js +1 -10
  232. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
  233. package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
  234. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
  235. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
  236. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
  237. package/es/components/recommend-search/src/constant/index.js +1 -7
  238. package/es/components/scale-view/index.js +1 -35
  239. package/es/components/scale-view/src/ScaleView.vue.d.ts +0 -3
  240. package/es/components/scale-view/src/ScaleView.vue.js +1 -429
  241. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
  242. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
  243. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
  244. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
  245. package/es/components/scale-view/src/components/NoData.vue.js +1 -74
  246. package/es/components/scale-view/src/components/ScaleScore.js +1 -63
  247. package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
  248. package/es/components/scale-view/src/components/formitem/address.js +1 -3993
  249. package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
  250. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
  251. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
  252. package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
  253. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
  254. package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
  255. package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
  256. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
  257. package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
  258. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
  259. package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
  260. package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
  261. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
  262. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
  263. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
  264. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
  265. package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
  266. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
  267. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
  268. package/es/components/scale-view/src/hooks/use-component.js +1 -86
  269. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
  270. package/es/components/scale-view/src/hooks/use-event.js +1 -129
  271. package/es/components/scale-view/src/hooks/use-noData.js +1 -41
  272. package/es/components/scale-view/src/utils/judge-types.js +1 -36
  273. package/es/components/search-cascader/index.js +1 -10
  274. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
  275. package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
  276. package/es/components/search-cascader/src/components/index.js +1 -1
  277. package/es/components/search-cascader/src/constants/index.js +1 -11
  278. package/es/components/search-cascader/src/hooks/index.js +1 -1
  279. package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
  280. package/es/components/search-cascader/src/utils/index.js +1 -11
  281. package/es/components/select-label/index.js +1 -15
  282. package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
  283. package/es/components/select-label/src/SelectLabel.vue.js +1 -6
  284. package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
  285. package/es/components/select-label/src/components/label-classify.vue.js +1 -132
  286. package/es/components/select-person/index.js +1 -10
  287. package/es/components/select-person/src/SelectPerson.vue.js +1 -6
  288. package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
  289. package/es/components/select-person/src/utils/index.js +1 -58
  290. package/es/components/shortcut-provider/index.js +1 -12
  291. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
  292. package/es/components/shortcut-provider/src/constants/index.js +1 -8
  293. package/es/components/shortcut-provider/src/hooks/index.js +1 -2
  294. package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
  295. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
  296. package/es/components/shortcut-provider/src/utils/index.js +1 -92
  297. package/es/components/shortcut-setter/index.d.ts +1 -1
  298. package/es/components/shortcut-setter/index.js +1 -10
  299. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  300. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
  301. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
  302. package/es/components/steps-wheel/index.js +1 -10
  303. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
  304. package/es/components/table-filter/index.js +1 -21
  305. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +3 -0
  306. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
  307. package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
  308. package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
  309. package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
  310. package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
  311. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
  312. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
  313. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
  314. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
  315. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
  316. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
  317. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
  318. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
  319. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
  320. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
  321. package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
  322. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
  323. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
  324. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
  325. package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
  326. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
  327. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
  328. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
  329. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
  330. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
  331. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
  332. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
  333. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
  334. package/es/components/table-filter/src/const/dataOptions.js +1 -107
  335. package/es/components/table-filter/src/const/index.js +1 -5
  336. package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
  337. package/es/components/table-filter/src/directive/preventReClick.js +1 -14
  338. package/es/components/table-filter/src/directive/resize.js +1 -12
  339. package/es/components/table-filter/src/hooks/export.js +1 -1
  340. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
  341. package/es/components/table-filter/src/hooks/useMixins.js +1 -532
  342. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
  343. package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
  344. package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
  345. package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +4 -3
  346. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
  347. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
  348. package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
  349. package/es/components/table-filter/src/tool/options.js +1 -200
  350. package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
  351. package/es/components/table-filter/src/tool/time-domain.js +1 -100
  352. package/es/components/table-filter/src/tool/transformData.js +1 -169
  353. package/es/components/table-filter/src/tool/utils.js +1 -29
  354. package/es/components/table-filter/src/types/enums.js +1 -67
  355. package/es/components/time-line/index.js +1 -10
  356. package/es/components/time-line/src/TimeLine.vue.js +1 -70
  357. package/es/components/vod-chunk-upload/index.js +1 -14
  358. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
  359. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
  360. package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
  361. package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
  362. package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
  363. package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
  364. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
  365. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
  366. package/es/env.d.ts +24 -24
  367. package/es/shared/assets/img/failure.png.js +1 -3
  368. package/es/shared/assets/img/no-permission.png.js +1 -3
  369. package/es/shared/assets/img/nodata.png.js +1 -3
  370. package/es/shared/assets/img/notfound.png.js +1 -3
  371. package/es/shared/assets/img/qr.png.js +1 -3
  372. package/es/shared/assets/img/success.png.js +1 -3
  373. package/es/shared/assets/img/video.png.js +1 -3
  374. package/es/shared/assets/img/video_default_cover.png.js +1 -3
  375. package/es/shared/assets/img/xb_big.png.js +1 -3
  376. package/es/shared/assets/img/xb_small.png.js +1 -3
  377. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
  378. package/es/shared/components/SelectPage/index.js +1 -2
  379. package/es/shared/components/SlotRender/SlotRender.js +1 -35
  380. package/es/shared/components/SlotRender/index.js +1 -2
  381. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
  382. package/es/shared/components/SvgIcon/index.js +1 -2
  383. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
  384. package/es/shared/components/TextOverTooltip/index.js +1 -2
  385. package/es/shared/components/VueDraggable/index.js +1 -2
  386. package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
  387. package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
  388. package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
  389. package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
  390. package/es/shared/components/VueDraggable/src/util/console.js +1 -9
  391. package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
  392. package/es/shared/components/VueDraggable/src/util/string.js +1 -11
  393. package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
  394. package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
  395. package/es/shared/components/no-data/NoData.vue.js +1 -74
  396. package/es/shared/components/no-data/index.js +1 -2
  397. package/es/shared/components/player-vod/player.js +1 -121
  398. package/es/shared/components/player-vod/video-modal.js +1 -91
  399. package/es/shared/global/variable.js +1 -3
  400. package/es/shared/utils/anime.js +1 -129
  401. package/es/shared/utils/colorLog.js +1 -53
  402. package/es/shared/utils/index.js +1 -167
  403. package/es/shared/utils/loadViewer.js +1 -11
  404. package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
  405. package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
  406. package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
  407. package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
  408. package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
  409. package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
  410. package/es/shared/utils/tapable/Hook.js +1 -140
  411. package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
  412. package/es/shared/utils/tapable/SyncBailHook.js +1 -19
  413. package/es/shared/utils/tapable/SyncHook.js +1 -34
  414. package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
  415. package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
  416. package/es/shared/utils/utilExpand.js +1 -781
  417. package/es/shared/utils/vexutils.js +1 -59
  418. package/package.json +2 -2
  419. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  420. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  421. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  422. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  423. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  424. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  425. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,1520 +1 @@
1
- import { defineComponent, useAttrs, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createCommentVNode, createVNode, Fragment, renderList, toDisplayString, createBlock, withDirectives, withCtx, createTextVNode, vShow, renderSlot } from 'vue';
2
- import { CloseOutline, AddOutline, AddCircleSharp } from '@vicons/ionicons5';
3
- import moment from 'moment';
4
- import 'moment/locale/zh-cn';
5
- import rangeAge from '../range-age/index.vue.js';
6
- import ageCom from '../age-com/index.vue.js';
7
- import script from '../../../../../shared/components/SvgIcon/SvgIcon.vue.js';
8
- import { useMessage, NInput, NIcon, NButton, NSelect, NInputNumber, NDatePicker, NTooltip } from 'naive-ui';
9
- import XEUtils from 'xe-utils';
10
- import useMixins from '../../hooks/useMixins.js';
11
- import FIELDTYPELIST from './fieldTypeList.js';
12
- import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
13
-
14
- const _hoisted_1 = { class: "inner-content" };
15
- const _hoisted_2 = {
16
- key: 0,
17
- class: "item-name"
18
- };
19
- const _hoisted_3 = /* @__PURE__ */ createElementVNode("span", { class: "label" }, "\u7B5B\u9009\u5206\u7C7B\u540D\u79F0\uFF1A", -1);
20
- const _hoisted_4 = {
21
- key: 1,
22
- class: "parent-names"
23
- };
24
- const _hoisted_5 = /* @__PURE__ */ createElementVNode("span", { class: "label" }, /* @__PURE__ */ toDisplayString("\u7236\u7C7B\u540D\u79F0") + "\uFF1A", -1);
25
- const _hoisted_6 = ["onDblclick", "onClick"];
26
- const _hoisted_7 = {
27
- key: 0,
28
- class: "s-content"
29
- };
30
- const _hoisted_8 = {
31
- key: 2,
32
- class: "item-name"
33
- };
34
- const _hoisted_9 = {
35
- key: 0,
36
- class: "label"
37
- };
38
- const _hoisted_10 = {
39
- key: 3,
40
- class: "item-name"
41
- };
42
- const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", { class: "label" }, "\u9009\u62E9\u7B5B\u9009\u5206\u7C7B\uFF1A", -1);
43
- const _hoisted_12 = {
44
- key: 4,
45
- class: "item-name"
46
- };
47
- const _hoisted_13 = /* @__PURE__ */ createElementVNode("span", { class: "label" }, " \u8FC7\u6EE4\u6761\u4EF6\uFF1A ", -1);
48
- const _hoisted_14 = /* @__PURE__ */ createElementVNode("span", null, "\u6DFB\u52A0", -1);
49
- const _hoisted_15 = { class: "index-span" };
50
- const _hoisted_16 = {
51
- key: 0,
52
- class: "val-input-wrap"
53
- };
54
- const _hoisted_17 = {
55
- key: 2,
56
- class: "date-item val-date-wrap"
57
- };
58
- const _hoisted_18 = {
59
- key: 3,
60
- class: "date-item birthday-item val-birthday-wrap"
61
- };
62
- const _hoisted_19 = { class: "age-wrap" };
63
- const _hoisted_20 = /* @__PURE__ */ createElementVNode("p", null, /* @__PURE__ */ toDisplayString("\u5E74\u9F84"), -1);
64
- const _hoisted_21 = { class: "relation-item" };
65
- const _hoisted_22 = ["onClick"];
66
- const _hoisted_23 = {
67
- key: 4,
68
- class: "range-container val-range-wrap"
69
- };
70
- const _hoisted_24 = {
71
- key: 5,
72
- class: "range-container val-age-wrap"
73
- };
74
- const _hoisted_25 = {
75
- key: 1,
76
- class: "item-error"
77
- };
78
- const _hoisted_26 = { class: "operation" };
79
- const _hoisted_27 = { key: 6 };
80
- const _hoisted_28 = { style: { "margin-bottom": "6px" } };
81
- const _hoisted_29 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
82
- const _hoisted_30 = {
83
- key: 0,
84
- style: { "visibility": "hidden" },
85
- class: "index-span"
86
- };
87
- const _sfc_main = /* @__PURE__ */ defineComponent({
88
- __name: "SearchCondition",
89
- props: {
90
- isSee: { type: Boolean },
91
- visible: { type: Boolean },
92
- actionList_prop: { type: Object, default: () => ({}) },
93
- filterApiConfig: { type: Object, default: () => ({}) },
94
- searchFieldList: {
95
- type: Array,
96
- default: () => []
97
- },
98
- showItemName: {
99
- default: true
100
- },
101
- saveEmpty: {
102
- default: false
103
- },
104
- homeManage: {
105
- default: false
106
- },
107
- tableId: {
108
- default: ""
109
- },
110
- isPersonalizedHome: {
111
- default: false
112
- },
113
- conditionList: {
114
- type: Array
115
- },
116
- source: {
117
- type: String
118
- },
119
- isBI: {
120
- default: false
121
- },
122
- isOnlyCondition: { type: Boolean },
123
- isCnHis: {
124
- type: Boolean,
125
- default: false
126
- },
127
- isAdmin: {
128
- type: Boolean,
129
- default: false
130
- },
131
- showCompareField: {
132
- type: Boolean,
133
- default: false
134
- },
135
- hideAddBtn: {
136
- type: Boolean,
137
- default: false
138
- },
139
- openType: {
140
- type: String,
141
- default: ""
142
- }
143
- },
144
- emits: [
145
- "setConditionMap",
146
- "saveAdd",
147
- "cancelSaveAdd"
148
- ],
149
- setup(__props, { expose, emit }) {
150
- const props = __props;
151
- const { handleGetConfigApi } = useMixins();
152
- const $attrs = useAttrs();
153
- const $message = useMessage();
154
- ref(null);
155
- const start_val = ref("");
156
- const end_val = ref("");
157
- const className = ref("");
158
- const teaValue = ref("");
159
- const classifyId = ref("");
160
- const initConditionsed = ref(false);
161
- const relationVisible = ref(false);
162
- const addVal = ref("");
163
- const showAdd = ref(false);
164
- ref("");
165
- const classify = ref("custom");
166
- ref("");
167
- const clickRelationIndex = ref(-1);
168
- ref(false);
169
- let searchList = ref([]);
170
- let searchChildList = ref([]);
171
- let relationTableList = ref([]);
172
- let isRelationList = ref([]);
173
- let fieldTypeList = ref(FIELDTYPELIST);
174
- let dateList = ref([
175
- { name: "\u5929", value: "DAY" },
176
- { name: "\u5468", value: "WEEK" },
177
- { name: "\u6708", value: "MONTH" },
178
- { name: "\u5B63\u5EA6", value: "QUARTER" },
179
- { name: "\u5E74", value: "YEAR" }
180
- ]);
181
- let dateTimeList = ref({ name: "\u5C0F\u65F6", value: "HOUR" });
182
- let relationSelect = ref([
183
- { desc: "\u5B58\u5728\u8DE8\u8868", name: "QUOTE_IN" },
184
- { desc: "\u4E0D\u5B58\u5728\u8DE8\u8868", name: "QUOTE_NOTIN" }
185
- ]);
186
- let rangeAgeOptions = ref([
187
- { desc: "\u7B49\u4E8E", name: "IN" },
188
- { desc: "\u5927\u4E8E", name: "BIG" },
189
- { desc: "\u5927\u4E8E\u7B49\u4E8E", name: "BIGEQ" },
190
- { desc: "\u5C0F\u4E8E", name: "LESS" },
191
- { desc: "\u5C0F\u4E8E\u7B49\u4E8E", name: "LESSEQ" }
192
- ]);
193
- let relationAction = ref({});
194
- let relationSearchFieldList = ref([]);
195
- let birthdayUnits = ref([
196
- { title: "\u5929", units: 1, con: "DAY" },
197
- { title: "\u5468", units: 2, con: "WEEK" },
198
- { title: "\u6708", units: 1, con: "MONTH" },
199
- { title: "\u5C81", units: 1, con: "YEAR" }
200
- ]);
201
- let parentNames = ref([]);
202
- ref({});
203
- ref(void 0);
204
- let classifyList = ref([]);
205
- let birthdayFilter = ref(["BIG", "LESS", "BIGEQ", "LESSEQ", "IN_THE_PAST_DI", "IN_THE_FUTURE_DI"]);
206
- let actionList = ref([]);
207
- const parentNamesHasAdd = computed(() => parentNames.value.some((v) => v.isAdd));
208
- const showPercent = computed(() => {
209
- return (item) => {
210
- var _a;
211
- return ((_a = item.settingObj) == null ? void 0 : _a.attr) === "PERCENTAGE" || false;
212
- };
213
- });
214
- const searchListKey = computed(() => {
215
- let res = [];
216
- searchList.value.forEach((v) => {
217
- v.fieldId && res.push(v.fieldId);
218
- v.columnName && res.push(v.columnName);
219
- });
220
- return res;
221
- });
222
- computed(() => props.isAdmin);
223
- const is_search_professional = computed(() => props.source == "search-professional");
224
- const noShowListDelIcon = computed(() => {
225
- let len = actionList.value.length || 0;
226
- return !(len === 1 && props.source == "search-professional");
227
- });
228
- function handleInitConditions() {
229
- if (props.homeManage) {
230
- getClassifyList();
231
- classify.value = (props == null ? void 0 : props.actionList_prop.displayCategory) || "custom";
232
- if (props.actionList_prop.displayCategory) {
233
- props.actionList_prop.conObj = [];
234
- props.actionList_prop.preSqlExpression = "";
235
- }
236
- }
237
- relationTableList.value = props.openType === "relationTable" ? [] : $attrs.relationTableList ? $attrs.relationTableList : [];
238
- initData();
239
- backShow(props.actionList_prop);
240
- props.showItemName && getParentNames();
241
- initConditionsed.value = true;
242
- }
243
- async function getClassifyList() {
244
- var _a;
245
- let params = { tableId: props.tableId };
246
- let res = await handleGetConfigApi(params, "requestGetTableCondiTionList", {}, props.filterApiConfig);
247
- if (res.status) {
248
- emit("setConditionMap", res.data);
249
- classifyList.value = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.conditionList) || [];
250
- }
251
- }
252
- function getParentNames() {
253
- let names = [];
254
- let displayCategoryList = ($attrs == null ? void 0 : $attrs.displayCategoryList) || [];
255
- displayCategoryList.forEach((item) => {
256
- if (item !== "\u672A\u5206\u7C7B") {
257
- names.push({
258
- disabled: true,
259
- selected: item === props.actionList_prop.displayCategory,
260
- value: item
261
- });
262
- }
263
- });
264
- parentNames.value = names;
265
- }
266
- function initData(config = {}) {
267
- let mySearchFieldList = JSON.parse(JSON.stringify(props.searchFieldList)).filter((i) => i.columnName !== "operatorColumn" && i.isMerge != 1);
268
- if (mySearchFieldList && mySearchFieldList.length > 0) {
269
- if (props.isPersonalizedHome) {
270
- searchList.value = mySearchFieldList;
271
- } else {
272
- let searchLists = mySearchFieldList.map((item) => {
273
- let { settingObj = {} } = item;
274
- let notParticipatingSearch = false;
275
- if ("notParticipatingSearch" in settingObj) {
276
- notParticipatingSearch = settingObj.notParticipatingSearch != 1;
277
- } else {
278
- notParticipatingSearch = true;
279
- }
280
- const flag = props.isCnHis ? true : item.isSearch == 1 || item.isShowSearch == 1;
281
- if (flag && notParticipatingSearch) {
282
- return item;
283
- }
284
- return null;
285
- }).filter(Boolean);
286
- searchList.value = searchLists;
287
- }
288
- if (searchList.value.length === 0) {
289
- return;
290
- }
291
- fieldTypeList.value.some((item) => {
292
- var _a;
293
- if (((_a = searchList.value[0]) == null ? void 0 : _a.fieldType) == item.name) {
294
- searchChildList.value = item.conList;
295
- return true;
296
- }
297
- });
298
- isRelationList.value = relationTableList.value.map((item) => item.primaryField);
299
- actionList.value = [];
300
- className.value = "";
301
- teaValue.value = "";
302
- let isInitNoAdd = "initNoAdd" == (config == null ? void 0 : config.type) || "";
303
- if (isInitNoAdd)
304
- return;
305
- addAction();
306
- }
307
- }
308
- function backShow(val) {
309
- if (!val || !Object.keys(val || {}).length)
310
- return;
311
- let obj = val;
312
- if (props.source === "customMenuForm" && val.setting && XEUtils.isJSON(val.setting)) {
313
- obj = JSON.parse(val.setting) || {};
314
- }
315
- if (!Object.keys(obj || {}).length)
316
- return;
317
- let relationFieldList = [];
318
- className.value = obj.name;
319
- classifyId.value = obj.from == "edit" ? obj.sid : "";
320
- teaValue.value = obj.sqlExpression;
321
- if (obj.conObj && !Array.isArray(obj.conObj)) {
322
- obj.conObj = JSON.parse(obj.conObj);
323
- }
324
- if (!obj.conObj || !obj.conObj.length)
325
- return;
326
- actionList.value = obj.conObj.map((item) => {
327
- var _a;
328
- let curSet = searchList.value.find((v) => (props.isBI ? v.fieldId : v.columnName) == item.field_key);
329
- if (curSet) {
330
- item.settingObj = curSet == null ? void 0 : curSet.settingObj;
331
- }
332
- if (item.con == "CONVERT") {
333
- item.wordValue = item.value;
334
- } else if (item.con == "QUOTE" || item.con == "QUOTE_NOT") {
335
- item.wordValue = item.value.split("|#|");
336
- } else if (isRelationList.value.includes(item.field_key)) {
337
- item.wordValue = item.tableId;
338
- let curItem = relationTableList.value.find((v) => v.tableId === item.tableId);
339
- if (curItem) {
340
- item.relationField = curItem.relationField;
341
- relationFieldList = JSON.parse(JSON.stringify(curItem.fieldList.fieldList)) || [];
342
- }
343
- }
344
- let start_value = "";
345
- let end_value = "";
346
- let limit_dateval = [];
347
- let ageValue = {};
348
- if (((_a = item == null ? void 0 : item.settingObj) == null ? void 0 : _a.attr) === "PERCENTAGE") {
349
- if (item.value) {
350
- item.value = Number(item.value) * 100;
351
- }
352
- } else if (item && item.settingObj && item.settingObj.attr == "BIRTHDAY") {
353
- start_value = item.start_val ? item.start_val : "";
354
- end_value = item.end_val ? item.end_val : "";
355
- if (item.limit_date) {
356
- let limitString = item.limit_date;
357
- if (Array.isArray(item.limit_date)) {
358
- let res = [];
359
- if (item.limit_date.length > 0) {
360
- item.limit_date.forEach((v) => {
361
- v._d && res.push(moment(v._d).format("MM-dd"));
362
- });
363
- }
364
- if (res.length > 0) {
365
- item.curlimit_date = res.join("~");
366
- }
367
- } else if (XEUtils.isString(limitString)) {
368
- let temp = [];
369
- item.curlimit_date = limitString;
370
- if (XEUtils.isString(limitString)) {
371
- let res = limitString.split("~");
372
- if (res.length > 0) {
373
- for (let i = 0; i < res.length; i++) {
374
- temp.push(moment(res[i], "MM-DD"));
375
- }
376
- limit_dateval = temp;
377
- }
378
- }
379
- }
380
- }
381
- } else if (item && item.settingObj && item.settingObj.attr == "AGE") {
382
- item["AGEAttr"] = true;
383
- start_value = item.start_val;
384
- end_value = item.end_val;
385
- ageValue = diffTime(item.value);
386
- } else {
387
- start_value = item.start_val ? moment(item.start_val).format("YYYY-MM-DD") : "";
388
- end_value = item.end_val ? moment(item.end_val).format("YYYY-MM-DD") : "";
389
- item.curlimit_date = "";
390
- }
391
- item.fieldType = item.fieldType || (curSet == null ? void 0 : curSet.fieldType);
392
- if (item.is_compare_field && props.showCompareField) {
393
- handleSetSelectList(item);
394
- }
395
- return {
396
- field_key: item.field_key,
397
- fieldId: item.field_key,
398
- fieldType: item.fieldType,
399
- con: item.con,
400
- unit: item.unit,
401
- start_val: start_value,
402
- end_val: end_value,
403
- limit_date: limit_dateval,
404
- curlimit_date: item.curlimit_date ? item.curlimit_date : "",
405
- searchList: searchList.value,
406
- searchChildList: searchChildList.value,
407
- dateList: dateList.value,
408
- wordValue: item.wordValue,
409
- word: item.wordValue,
410
- value: XEUtils.isString(item.value) ? item.value : JSON.stringify(item.value),
411
- relationData: isRelationList.value.includes(item.field_key) ? [...relationTableList.value] : [],
412
- relationField: item.valueField || "",
413
- relationFieldList: relationFieldList || [],
414
- quote_con: item.quote_con || {},
415
- ageValue: ageValue || {},
416
- converFun: item.converFun || void 0,
417
- parameterConversionId: item.parameterConversionId || void 0,
418
- relationOrgId: item.relationOrgId || void 0,
419
- preConObj: item.preConObj || void 0,
420
- preSqlExpression: item.preSqlExpression || void 0,
421
- isIllegalField: props.isSee || item.field_key && !searchListKey.value.includes(item.field_key),
422
- wordbookValueList: item.wordbookValueList || [],
423
- wordbookData: [],
424
- is_compare_field: item.is_compare_field || false,
425
- selectList: item.selectList || [],
426
- customInput: false,
427
- compare_field: item.compare_field
428
- };
429
- });
430
- actionList.value.forEach((item) => {
431
- formatData(item.field_key, item);
432
- selectChild(item.con, item, true, { is_compare_field: item.is_compare_field });
433
- });
434
- }
435
- function saveAdd() {
436
- var _a;
437
- if (props.homeManage && classify.value !== "custom") {
438
- let classifyVal = classifyList.value.find((item) => item.sid === classify.value);
439
- let setting = {
440
- displayCategory: classifyVal.sid,
441
- name: classifyVal.name,
442
- sqlExpression: classifyVal.sqlExpression,
443
- conObj: classifyVal.conObj
444
- };
445
- let params = {
446
- id: classifyVal.sid,
447
- tableId: props.tableId,
448
- setting: JSON.stringify(setting)
449
- };
450
- emit("saveAdd", params);
451
- return;
452
- }
453
- if (props.homeManage && classify.value == "custom") {
454
- props.actionList_prop.displayCategory = "";
455
- props.actionList_prop.name = "";
456
- }
457
- if (!className.value && props.showItemName) {
458
- $message.warning(`\u8BF7\u8F93\u5165\u641C\u7D22\u5206\u7C7B\u540D\u79F0!`);
459
- return;
460
- }
461
- if (actionList.value && actionList.value.length > 0) {
462
- let conObj = getConditions();
463
- if (!conObj) {
464
- return;
465
- }
466
- if (props.isOnlyCondition) {
467
- emit("saveAdd", conObj);
468
- return;
469
- }
470
- let displayCategory = (_a = parentNames.value.filter((item) => item.selected)[0]) == null ? void 0 : _a.value;
471
- let setting = {
472
- displayCategory,
473
- name: className.value,
474
- sqlExpression: teaValue.value,
475
- conObj
476
- };
477
- let params = {
478
- id: classifyId.value,
479
- tableId: props.tableId,
480
- setting: JSON.stringify(setting)
481
- };
482
- if (conObj.some((v) => !v.con)) {
483
- return $message.warning("\u8BF7\u5B8C\u5584\u7B5B\u9009\u6761\u4EF6");
484
- }
485
- emit("saveAdd", params);
486
- const { isInSearch } = $attrs || {};
487
- if (!isInSearch) {
488
- cancelSaveAdd();
489
- }
490
- } else {
491
- if (!props.saveEmpty) {
492
- return $message.warning(`\u8BF7\u8BBE\u7F6E\u641C\u7D22\u6761\u4EF6`);
493
- }
494
- emit("saveAdd", {
495
- setting: "{}"
496
- });
497
- cancelSaveAdd();
498
- }
499
- }
500
- function getConditions() {
501
- var _a, _b, _c;
502
- let condition = [];
503
- for (let i = 0; i < actionList.value.length; i++) {
504
- let item = actionList.value[i];
505
- if (item.field_key && !searchListKey.value.includes(item.field_key)) {
506
- $message.error("\u68C0\u6D4B\u5230\u8BE5\u7B5B\u9009\u5B57\u6BB5\u542B\u6709\u975E\u6CD5\u65E0\u6548\u7684,\u8BF7\u79FB\u9664\uFF01");
507
- return;
508
- }
509
- let attrType = ((_a = item == null ? void 0 : item.settingObj) == null ? void 0 : _a.attr) || "";
510
- let value = 0;
511
- if (item.con == "CONVERT") {
512
- value = item.wordValue.map((word) => {
513
- return JSON.parse(word);
514
- });
515
- } else if (item.con == "QUOTE" || item.con == "QUOTE_NOT") {
516
- value = item.wordValue.join("|#|");
517
- } else {
518
- value = item.value;
519
- }
520
- let start_value = "";
521
- let end_value = "";
522
- let limit_dateval = [];
523
- if ((item == null ? void 0 : item.settingObj) && ((_b = item == null ? void 0 : item.settingObj) == null ? void 0 : _b.attr) == "PERCENTAGE") {
524
- value = Number(value) / 100;
525
- } else if ((item == null ? void 0 : item.settingObj) && ((_c = item == null ? void 0 : item.settingObj) == null ? void 0 : _c.attr) == "BIRTHDAY") {
526
- if (item.start_val) {
527
- let res = XEUtils.validateBirthday(item.start_val, item.title, item.unit);
528
- if (!res)
529
- return;
530
- }
531
- if (item.end_val) {
532
- let res = XEUtils.validateBirthday(item.end_val, item.title, item.unit);
533
- if (!res)
534
- return;
535
- }
536
- if (+item.start_val > +item.end_val) {
537
- $message.warning(`${item.title}\u8BF7\u8F93\u5165\u6709\u6548\u8303\u56F4`);
538
- return;
539
- }
540
- start_value = item.start_val ? item.start_val : "";
541
- end_value = item.end_val ? item.end_val : "";
542
- limit_dateval = item.curlimit_date ? item.curlimit_date : "";
543
- } else if (attrType == "AGE") {
544
- start_value = item.start_val;
545
- end_value = item.end_val;
546
- value = item.value;
547
- } else {
548
- start_value = item.start_val ? item.start_val.format("YYYY-MM-DD") : "";
549
- end_value = item.end_val ? item.end_val.format("YYYY-MM-DD") : "";
550
- }
551
- let is_custom = props.showCompareField ? item.compare_field == "_custom__input_" : false;
552
- let temp = {
553
- field_key: item.field_key,
554
- fieldId: item.field_key,
555
- fieldType: item.fieldType,
556
- con: item.con,
557
- value,
558
- start_val: start_value,
559
- end_val: end_value,
560
- unit: item.unit,
561
- limit_date: limit_dateval,
562
- tableId: item.showRelation && item.wordValue || void 0,
563
- valueField: item.relationField || void 0,
564
- quote_con: Object.keys(item.quote_con || {}).length ? item.quote_con : null,
565
- converFun: item.converFun || void 0,
566
- parameterConversionId: item.parameterConversionId || void 0,
567
- relationOrgId: item.relationOrgId || void 0,
568
- preConObj: item.preConObj || void 0,
569
- preSqlExpression: item.preSqlExpression || void 0,
570
- wordbookValueList: item.wordbookValueList,
571
- is_compare_field: is_custom ? false : item.is_compare_field,
572
- compare_field: is_custom ? void 0 : item.compare_field
573
- };
574
- condition.push(temp);
575
- }
576
- return [...condition];
577
- }
578
- function addAction(config = {}) {
579
- if (searchList.value.length === 0) {
580
- return $message.warning("\u6682\u65E0\u5B57\u6BB5\u53EF\u8BBE\u7F6E\uFF01");
581
- }
582
- let noDefault = (config == null ? void 0 : config.noDefault) || is_search_professional.value || false;
583
- let searchListDefaultItem = searchList.value[0];
584
- let searchListDefault = "", setting = {}, settingObj = {};
585
- if (searchListDefaultItem) {
586
- searchListDefault = props.isBI ? searchListDefaultItem.fieldId : searchListDefaultItem.columnName;
587
- setting = searchListDefaultItem.setting;
588
- settingObj = searchListDefaultItem == null ? void 0 : searchListDefaultItem.settingObj;
589
- }
590
- if (noDefault) {
591
- searchListDefaultItem = {};
592
- searchListDefault = "";
593
- }
594
- actionList.value.push({
595
- curKey: Date.now() + Math.random().toString(36).substr(2, 15),
596
- field_key: searchListDefault,
597
- fieldId: searchListDefaultItem.fieldId,
598
- fieldType: searchListDefaultItem.fieldType,
599
- con: void 0,
600
- searchList: searchList.value,
601
- searchChildList: searchChildList.value,
602
- dateList: dateList.value,
603
- wordbookData: [],
604
- relationData: [...relationTableList.value],
605
- relationField: "",
606
- relationFieldList: [],
607
- quote_con: {},
608
- title: "",
609
- unit: "YEAR",
610
- setting,
611
- settingObj,
612
- wordbookValueList: [],
613
- isIllegalField: props.isSee,
614
- is_compare_field: false,
615
- selectList: [],
616
- customInput: false,
617
- compare_field: ""
618
- });
619
- if (noDefault) {
620
- return;
621
- }
622
- let actionInex = actionList.value.length - 1;
623
- changeColumnName(actionList.value[actionInex].field_key, actionList.value[actionInex]);
624
- }
625
- function softDel(index) {
626
- if (props.isSee)
627
- return;
628
- actionList.value.splice(index, 1);
629
- }
630
- function cancelSaveAdd() {
631
- emit("cancelSaveAdd");
632
- actionList.value = [];
633
- showAdd.value = false;
634
- addVal.value = "";
635
- className.value = "";
636
- classifyId.value = "";
637
- teaValue.value = "";
638
- }
639
- function changeColumnName(value, action) {
640
- action.con = void 0;
641
- let f = action.searchList.find((v) => v.columnName == value);
642
- action.fieldType = (f == null ? void 0 : f.fieldType) || void 0;
643
- action["wordValue"] = [];
644
- action["wordbookData"] = [];
645
- formatData(value, action);
646
- handleHideItem(action);
647
- handleHideCompareField(action);
648
- action["isIllegalField"] = value && !searchListKey.value.includes(value);
649
- formatActionData(action);
650
- }
651
- function formatData(value, action) {
652
- action.searchList.some((sea) => {
653
- var _a, _b, _c;
654
- if ((props.isBI ? sea.fieldId : sea.columnName) == value) {
655
- action.fieldType = sea.fieldType;
656
- action.settingObj = sea == null ? void 0 : sea.settingObj;
657
- let attrType = ((_a = sea == null ? void 0 : sea.settingObj) == null ? void 0 : _a.attr) || "";
658
- let format = ((_b = sea == null ? void 0 : sea.settingObj) == null ? void 0 : _b.format) || "";
659
- action.title = sea.title || "";
660
- if (sea.setting) {
661
- XEUtils.isPlainObject(sea.setting) ? "" : sea.setting = JSON.parse(sea.setting);
662
- if (!XEUtils.isEmpty(sea.setting.wordbook)) {
663
- action.searchChildList = [
664
- { desc: "\u5F15\u7528", name: "QUOTE" },
665
- { desc: "\u4E0D\u5F15\u7528", name: "QUOTE_NOT" }
666
- ];
667
- let obj = {};
668
- if (sea.setting.wordbook.params) {
669
- sea.setting.wordbook.params.forEach((item) => {
670
- obj[item.p_name] = item.p_value;
671
- });
672
- }
673
- action["settingWordbook"] = {
674
- params: obj,
675
- id: sea.setting.wordbook.id
676
- };
677
- return true;
678
- } else if (sea.setting.showSetting && sea.setting.showSetting.length > 0) {
679
- action.searchChildList = [{ desc: "\u4E0B\u62C9\u9009\u9879", name: "CONVERT" }];
680
- action["wordValue"] = [];
681
- let showSetting = sea.setting.showSetting;
682
- let dictionItem = handleDictionDef(sea);
683
- if (dictionItem) {
684
- let { defaultValueTitle } = (sea == null ? void 0 : sea.dictionarieObj) || {};
685
- let hasDef = showSetting.find((item) => item.change_text === defaultValueTitle);
686
- !hasDef && showSetting.unshift(dictionItem);
687
- }
688
- let wordbookData = showSetting.map((set, index) => {
689
- if (action.word) {
690
- XEUtils.isString(action.word) ? action.word = JSON.parse(action.word) : "";
691
- let words = action.word.map((w) => JSON.stringify(w));
692
- let filter = JSON.stringify(set.filter);
693
- if (words.includes(filter)) {
694
- action.wordValue.push(filter);
695
- }
696
- }
697
- return {
698
- name: set.change_text,
699
- showKeys: set.change_text,
700
- value: JSON.stringify(set.filter),
701
- myName: JSON.stringify(set.filter),
702
- id: (index + 9).toString(36) + index,
703
- sid: (index + 9).toString(36) + index
704
- };
705
- });
706
- action.wordbookData = wordbookData;
707
- return true;
708
- } else {
709
- let matchItem = fieldTypeList.value.find((item) => sea.fieldType.toUpperCase() == item.name);
710
- let conList = searchChildList.value;
711
- if (matchItem) {
712
- conList = matchItem.conList;
713
- }
714
- if (((_c = action == null ? void 0 : action.settingObj) == null ? void 0 : _c.attr) === "BIRTHDAY") {
715
- conList = conList.filter((v) => !birthdayFilter.value.includes(v.name)) || [];
716
- }
717
- action.searchChildList = conList;
718
- }
719
- if (attrType == "AGE") {
720
- action.searchChildList = rangeAgeOptions.value;
721
- action.format = format.toUpperCase();
722
- }
723
- } else {
724
- fieldTypeList.value.some((item) => {
725
- if (sea.fieldType == item.name) {
726
- action.searchChildList = item.conList.filter((con) => con.name != "QUOTE" && con.name != "CONVERT" && con.name != "QUOTE_NOT");
727
- return true;
728
- }
729
- });
730
- }
731
- if (isRelationList.value.includes(value) && !action.searchChildList.some((v) => v.name == "QUOTE_IN")) {
732
- action.searchChildList.push(...relationSelect.value);
733
- }
734
- return true;
735
- }
736
- });
737
- }
738
- function formatActionData(action) {
739
- const list = actionList.value.map((item) => {
740
- if (action.curKey === item.curKey) {
741
- return action;
742
- }
743
- return item;
744
- });
745
- actionList.value = list;
746
- }
747
- function handleDictionDef(el) {
748
- let { defaultValue, defaultValueTitle } = (el == null ? void 0 : el.dictionarieObj) || {};
749
- let dictionItem = null;
750
- if (defaultValue && defaultValueTitle) {
751
- dictionItem = {
752
- change_text: defaultValueTitle,
753
- filter: [
754
- {
755
- con: "EQ",
756
- field_key: el.columnName,
757
- value: defaultValue
758
- }
759
- ]
760
- };
761
- }
762
- return dictionItem;
763
- }
764
- function handleSelect(value, item) {
765
- if (Array.isArray(value)) {
766
- item.wordbookValueList = value;
767
- }
768
- formatActionData(item);
769
- }
770
- function selectChild(value, item, isInitSet, config) {
771
- var _a, _b, _c, _d;
772
- let attr = ((_a = item == null ? void 0 : item.settingObj) == null ? void 0 : _a.attr) || "";
773
- let arr = [
774
- "TODAY",
775
- "THIS_WEEK",
776
- "THIS_MONTH",
777
- "THIS_SEASON",
778
- "THIS_YEAR",
779
- "NULL",
780
- "NOT_NULL",
781
- "TOMORROW",
782
- "YESTERDAY",
783
- "NEXT_WEEK",
784
- "UP_WEEK",
785
- "NEXT_MONTH",
786
- "UP_MONTH",
787
- "NEXT_SEASON",
788
- "UP_SEASON",
789
- "NEXT_YEAR",
790
- "UP_YEAR"
791
- ];
792
- let ageList = ["BIG", "BIGEQ", "LESS", "LESSEQ"];
793
- const customTypes = ["EQ", "IN", "NEQ"];
794
- const numbercustoms = ["EQ", "NEQ", "BIG", "LESS", "BIGEQ", "LESSEQ"];
795
- item.showRangeAge = false;
796
- item.showAgeCom = false;
797
- let inRelation = ["QUOTE_IN", "QUOTE_NOTIN"];
798
- if (arr.includes(value)) {
799
- item.showInput = false;
800
- item.showSelect = false;
801
- item.showDate = false;
802
- item.showSearch = false;
803
- item.showRelation = false;
804
- initBirthdayParams(item);
805
- } else if (["IN_THE_PAST", "IN_THE_FUTURE", "N_", "L_", "IN_THE_PAST_DI", "IN_THE_FUTURE_DI"].includes(value)) {
806
- item.showSelect = true;
807
- item.showInput = true;
808
- item.showDate = false;
809
- item.showSearch = false;
810
- item.showRelation = false;
811
- if (value == "IN_THE_PAST_DI" || value == "IN_THE_FUTURE_DI") {
812
- item["dateList"] = dateList.value;
813
- } else {
814
- let dates = dateList.value.concat(dateTimeList.value);
815
- item["dateList"] = dates;
816
- }
817
- if (!isInitSet) {
818
- item["unit"] = "DAY";
819
- }
820
- initBirthdayParams(item);
821
- } else if (value == "IN") {
822
- if (attr == "BIRTHDAY") {
823
- item.showBirthdayDate = true;
824
- item.showDate = false;
825
- item.units = birthdayUnits.value.filter((i) => i.units === 1);
826
- } else if (attr == "AGE") {
827
- item.showRangeAge = true;
828
- } else {
829
- item.showDate = true;
830
- initBirthdayParams(item);
831
- }
832
- item.showSelect = false;
833
- item.showInput = false;
834
- item.showSearch = false;
835
- item.showRelation = false;
836
- } else if (value == "CONVERT" || value == "QUOTE" || value == "QUOTE_NOT") {
837
- item.showDate = false;
838
- item.showSelect = false;
839
- item.showInput = false;
840
- item.showSearch = true;
841
- item.showRelation = false;
842
- initBirthdayParams(item);
843
- let showSetting = false;
844
- if ((_c = (_b = item == null ? void 0 : item.settingObj) == null ? void 0 : _b.showSetting) == null ? void 0 : _c.length) {
845
- showSetting = true;
846
- }
847
- if (!showSetting && ((_d = item.wordbookValueList) == null ? void 0 : _d.length)) {
848
- item["wordbookData"] = item.wordbookValueList;
849
- }
850
- } else if (inRelation.includes(value)) {
851
- item.showRelation = true;
852
- item.showInput = false;
853
- item.showSelect = false;
854
- item.showDate = false;
855
- item.showSearch = false;
856
- initBirthdayParams(item);
857
- } else if (attr == "AGE") {
858
- if (ageList.includes(value)) {
859
- item.showAgeCom = true;
860
- }
861
- } else {
862
- item.showSelect = false;
863
- item.showDate = false;
864
- if (item.settingObj && item.settingObj.attr == "BIRTHDAY") {
865
- item.showInput = false;
866
- } else {
867
- item.showInput = true;
868
- }
869
- item.showSearch = false;
870
- item.showRelation = false;
871
- initBirthdayParams(item);
872
- }
873
- if (!props.showCompareField)
874
- return;
875
- let s_type = config == null ? void 0 : config.type;
876
- if (s_type === "_custom__input_")
877
- return;
878
- if (customTypes.includes(value) || ["NUMBER", "DATE", "DATETIME", "TIME"].includes(item.fieldType) && numbercustoms.includes(value)) {
879
- item["is_compare_field"] = true;
880
- item["customInput"] = false;
881
- handleSetSelectList(item);
882
- if (Array.isArray(item.selectList)) {
883
- if (item.selectList.length > 1) {
884
- let [a] = item.selectList;
885
- let compare_val = isInitSet ? item.compare_field || a.value : a.value;
886
- item["compare_field"] = compare_val;
887
- setTimeout(() => {
888
- compare_fieldOnChange(compare_val, item);
889
- }, 100);
890
- } else {
891
- let selectList = (item == null ? void 0 : item.selectList) || [];
892
- let len = (selectList == null ? void 0 : selectList.length) || 0;
893
- let onlyCustomInput = len === 1 ? selectList[0].value === "_custom__input_" : false;
894
- if (onlyCustomInput) {
895
- item["customInput"] = true;
896
- item.compare_field = "_custom__input_";
897
- return;
898
- }
899
- }
900
- }
901
- if (isInitSet) {
902
- if (config.is_compare_field && item.compare_field) {
903
- item["is_compare_field"] = true;
904
- } else if (item.start_val || item.end_val || item.value || item.wordValue || item.showSelect) {
905
- item["customInput"] = true;
906
- item.compare_field = "_custom__input_";
907
- return;
908
- }
909
- }
910
- handleHideItem(item, false);
911
- } else {
912
- item.customInput = true;
913
- item.is_compare_field = false;
914
- item["compare_field"] && (item["compare_field"] = void 0);
915
- }
916
- formatActionData(item);
917
- }
918
- function handleHideItem(item, reset = true) {
919
- item.showRangeAge = false;
920
- item.showAgeCom = false;
921
- item.showInput = false;
922
- item.showSelect = false;
923
- item.showDate = false;
924
- item.showSearch = false;
925
- item.showRelation = false;
926
- if (reset)
927
- item["value"] = "";
928
- }
929
- function disabledStartDate(start_value) {
930
- const end_value = end_val.value;
931
- if (!start_value || !end_value) {
932
- return false;
933
- }
934
- return start_value.valueOf() > end_value.valueOf();
935
- }
936
- function disabledEndDate(end_value) {
937
- const start_value = start_val.value;
938
- if (!end_value || !start_value) {
939
- return false;
940
- }
941
- return start_value.valueOf() >= end_value.valueOf();
942
- }
943
- function handleStartOpenChange(open, item) {
944
- if (!open) {
945
- item["endOpen"] = true;
946
- }
947
- }
948
- function handleEndOpenChange(open, item) {
949
- item["endOpen"] = open;
950
- }
951
- function disabledDate(current) {
952
- return current && current < moment().startOf("year") || current > moment().endOf("year");
953
- }
954
- function changeRange(value, item) {
955
- let res = [];
956
- if (value.length > 0) {
957
- value.forEach((item2) => {
958
- item2._d && res.push(XEUtils.formatTime("MOUTH", item2._d));
959
- });
960
- }
961
- if (res.length > 0) {
962
- item.curlimit_date = res.join("~");
963
- }
964
- }
965
- function handlerSelectRelation(e, item) {
966
- var _a;
967
- let curItem = relationTableList.value.find((v) => v.tableId === e);
968
- curItem && (item.relationField = curItem.relationField);
969
- item.relationFieldList = JSON.parse(JSON.stringify(((_a = curItem == null ? void 0 : curItem.fieldList) == null ? void 0 : _a.fieldList) || []));
970
- item.converFun = curItem.converFun || void 0;
971
- item.parameterConversionId = curItem.parameterConversionId || void 0;
972
- item.relationOrgId = curItem.relationOrgId || void 0;
973
- item.preConObj = curItem.preConObj || void 0;
974
- item.preSqlExpression = curItem.preSqlExpression || void 0;
975
- }
976
- function openRelationFilter(data, i) {
977
- clickRelationIndex.value = i;
978
- relationAction.value = data.quote_con;
979
- relationSearchFieldList.value = data.relationFieldList;
980
- relationVisible.value = true;
981
- }
982
- function initBirthdayParams(item) {
983
- item.showBirthdayDate = false;
984
- item.unit = item.unit || "YEAR";
985
- item.units = birthdayUnits.value.filter((i) => i.units === 1);
986
- }
987
- function handleParentNamesAdd(e) {
988
- var _a;
989
- const nextInput = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.nextElementSibling;
990
- setTimeout(() => {
991
- nextInput && nextInput.focus();
992
- });
993
- showAdd.value = true;
994
- }
995
- function hanldeBlur() {
996
- showAdd.value = false;
997
- if (!addVal.value.trim())
998
- return;
999
- parentNames.value.forEach((v) => v.selected = false);
1000
- const newVal = parentNames.value.concat({
1001
- disabled: true,
1002
- value: addVal.value.trim(),
1003
- selected: true,
1004
- isAdd: true
1005
- });
1006
- addVal.value = "";
1007
- parentNames.value = newVal;
1008
- }
1009
- function editParentName(e, item) {
1010
- item.disabled = false;
1011
- setTimeout(() => {
1012
- e.target.focus();
1013
- }, 0);
1014
- }
1015
- function handleParentNameSelect(item, index) {
1016
- if (!item.disabled)
1017
- return;
1018
- const parents = parentNames.value.map((pItem, pIndex) => {
1019
- if (pIndex !== index) {
1020
- pItem.selected = false;
1021
- } else {
1022
- pItem.selected = !pItem.selected;
1023
- }
1024
- return pItem;
1025
- });
1026
- parentNames.value = parents;
1027
- }
1028
- function handleParentNamesRemove(index, item) {
1029
- handleParent(index, item);
1030
- }
1031
- function handleParent(index, item) {
1032
- let { conditionList } = props;
1033
- if (!conditionList || !conditionList.length) {
1034
- parentNames.value.splice(index, 1);
1035
- return;
1036
- }
1037
- let hasItem = conditionList.filter((v) => v.displayCategory === item.value);
1038
- if (!hasItem || !hasItem.length) {
1039
- parentNames.value.splice(index, 1);
1040
- return;
1041
- }
1042
- $message.error("\u8BE5\u5206\u7C7B\u4E0B\u6709\u5DF2\u6709\u6570\u636E\uFF0C\u8BF7\u5220\u9664\u8BE5\u5206\u7C7B\u4E0B\u7684\u7B5B\u9009\u96C6\u540E\u91CD\u8BD5\uFF01");
1043
- }
1044
- function ageRangeOnChange(obj, item) {
1045
- let s = obj.star_val;
1046
- let e = obj.end_val;
1047
- item["start_val"] = isNaN(s) ? void 0 : s;
1048
- item["end_val"] = isNaN(e) ? void 0 : e;
1049
- }
1050
- function agecomOnChange(obj, item) {
1051
- item["value"] = isNaN(obj.days) ? void 0 : obj.days;
1052
- }
1053
- function diffTime(days) {
1054
- let d = +days;
1055
- if (isNaN(d))
1056
- return {};
1057
- if (typeof d == "number") {
1058
- let next = 0;
1059
- let year = Math.floor(d / 365);
1060
- next = d % 365;
1061
- let month = Math.floor(next / 30);
1062
- next = next % 30;
1063
- let day = next;
1064
- return { year, month, day, d };
1065
- }
1066
- return {};
1067
- }
1068
- function handleSetSelectList(item) {
1069
- let list = searchList.value.filter((v) => v.fieldType == item.fieldType && (props.isBI ? v.fieldId : v.columnName) != item.field_key).map((v) => {
1070
- return {
1071
- value: props.isBI ? v.fieldId : v.columnName,
1072
- name: v.alias || v.title
1073
- };
1074
- });
1075
- list.unshift({
1076
- value: "_custom__input_",
1077
- name: "\u81EA\u5B9A\u4E49\u8F93\u5165"
1078
- });
1079
- item["selectList"] = list;
1080
- }
1081
- function compare_fieldOnChange(e, item) {
1082
- if (e === "_custom__input_") {
1083
- item.customInput = true;
1084
- selectChild(item.con, item, false, { type: "_custom__input_" });
1085
- } else {
1086
- item.customInput = false;
1087
- item["value"] = "";
1088
- }
1089
- }
1090
- function checkCustomInput(item) {
1091
- let selectList = (item == null ? void 0 : item.selectList) || [];
1092
- let len = (selectList == null ? void 0 : selectList.length) || 0;
1093
- let onlyCustomInput = len === 1 ? selectList[0].value === "_custom__input_" : false;
1094
- return onlyCustomInput;
1095
- }
1096
- function visibleCompareField(item) {
1097
- if (!props.showCompareField)
1098
- return false;
1099
- let onlyCustomInput = checkCustomInput(item);
1100
- return item.is_compare_field && !onlyCustomInput;
1101
- }
1102
- function visibleDefaultField(item) {
1103
- if (!props.showCompareField)
1104
- return true;
1105
- let onlyCustomInput = checkCustomInput(item);
1106
- return item.customInput || !item.is_compare_field || onlyCustomInput;
1107
- }
1108
- function handleHideCompareField(item) {
1109
- if (!props.showCompareField)
1110
- return;
1111
- item.customInput = false;
1112
- item.is_compare_field = false;
1113
- item.compare_field = void 0;
1114
- }
1115
- function checkActionList() {
1116
- let f = actionList.value.every((v) => !v.field_key);
1117
- return f;
1118
- }
1119
- watch(
1120
- () => props.searchFieldList,
1121
- (val) => {
1122
- if (val && val.length > 0) {
1123
- if (is_search_professional.value && initConditionsed.value) {
1124
- return;
1125
- }
1126
- handleInitConditions();
1127
- }
1128
- },
1129
- { immediate: true, deep: true }
1130
- );
1131
- expose({
1132
- handleInitConditions,
1133
- saveAdd,
1134
- cancelSaveAdd,
1135
- addAction,
1136
- checkActionList
1137
- });
1138
- return (_ctx, _cache) => {
1139
- return openBlock(), createElementBlock("div", {
1140
- class: normalizeClass(["SearchCondition-page-block", unref(is_search_professional) ? "_c_com-search-professional" : ""])
1141
- }, [
1142
- createElementVNode("div", _hoisted_1, [
1143
- __props.showItemName ? (openBlock(), createElementBlock("div", _hoisted_2, [
1144
- _hoisted_3,
1145
- createCommentVNode(" 1.1.6.6\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0 "),
1146
- createVNode(unref(NInput), {
1147
- value: className.value,
1148
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => className.value = $event),
1149
- placeholder: "\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",
1150
- style: { "width": "250px" },
1151
- maxLength: 10
1152
- }, null, 8, ["value"])
1153
- ])) : createCommentVNode("v-if", true),
1154
- props.showItemName ? (openBlock(), createElementBlock("div", _hoisted_4, [
1155
- _hoisted_5,
1156
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(parentNames), (item, index) => {
1157
- return openBlock(), createElementBlock("div", {
1158
- class: normalizeClass(["edit-tag", { "edit-tag-select": item.selected && item.disabled }]),
1159
- key: index,
1160
- onDblclick: (e) => editParentName(e, item),
1161
- onClick: ($event) => handleParentNameSelect(item, index)
1162
- }, [
1163
- item.disabled ? (openBlock(), createElementBlock("div", _hoisted_7, [
1164
- createElementVNode("span", null, toDisplayString(item.value), 1)
1165
- ])) : (openBlock(), createBlock(unref(NInput), {
1166
- key: 1,
1167
- style: { "width": "100px" },
1168
- disabled: item.disabled,
1169
- onBlur: () => item.disabled = true,
1170
- value: item.value,
1171
- "onUpdate:value": ($event) => item.value = $event,
1172
- maxLength: 10
1173
- }, null, 8, ["disabled", "onBlur", "value", "onUpdate:value"])),
1174
- createVNode(unref(NIcon), {
1175
- component: unref(CloseOutline),
1176
- class: "anticon-close",
1177
- size: "20",
1178
- onClick: ($event) => handleParentNamesRemove(index, item)
1179
- }, null, 8, ["component", "onClick"])
1180
- ], 42, _hoisted_6);
1181
- }), 128)),
1182
- !unref(parentNamesHasAdd) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1183
- withDirectives(createVNode(unref(NButton), {
1184
- class: "ant-btn",
1185
- icon: "plus",
1186
- dashed: "",
1187
- onClick: handleParentNamesAdd
1188
- }, {
1189
- default: withCtx(() => [
1190
- createVNode(unref(NIcon), {
1191
- component: unref(AddOutline),
1192
- size: "20"
1193
- }, null, 8, ["component"]),
1194
- createTextVNode(" " + toDisplayString("\u6DFB\u52A0\u7236\u7C7B"))
1195
- ]),
1196
- _: 1
1197
- }, 512), [
1198
- [vShow, !showAdd.value]
1199
- ]),
1200
- withDirectives(createVNode(unref(NInput), {
1201
- class: "edit-tag",
1202
- value: addVal.value,
1203
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => addVal.value = $event),
1204
- style: { "width": "100px" },
1205
- onBlur: hanldeBlur,
1206
- maxLength: 10
1207
- }, null, 8, ["value"]), [
1208
- [vShow, showAdd.value]
1209
- ])
1210
- ], 64)) : createCommentVNode("v-if", true)
1211
- ])) : createCommentVNode("v-if", true),
1212
- classify.value === "custom" && !__props.homeManage && !__props.hideAddBtn ? (openBlock(), createElementBlock("div", _hoisted_8, [
1213
- !__props.isOnlyCondition ? (openBlock(), createElementBlock("span", _hoisted_9, " \u8FC7\u6EE4\u6761\u4EF6\uFF1A ")) : createCommentVNode("v-if", true),
1214
- createElementVNode("div", {
1215
- class: "addAction",
1216
- onClick: addAction,
1217
- style: { "cursor": "pointer" }
1218
- }, [
1219
- createVNode(unref(NIcon), {
1220
- component: unref(AddCircleSharp),
1221
- class: "blue",
1222
- size: "18"
1223
- }, null, 8, ["component"]),
1224
- createElementVNode("span", null, toDisplayString(__props.isOnlyCondition ? "\u6DFB\u52A0\u64CD\u4F5C" : "\u6DFB\u52A0"), 1)
1225
- ])
1226
- ])) : createCommentVNode("v-if", true),
1227
- __props.homeManage ? (openBlock(), createElementBlock("div", _hoisted_10, [
1228
- _hoisted_11,
1229
- createVNode(unref(NSelect), {
1230
- value: classify.value,
1231
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => classify.value = $event),
1232
- placeholder: "\u8BF7\u9009\u62E9",
1233
- filterable: "",
1234
- options: unref(classifyList),
1235
- "label-field": "name",
1236
- "value-field": "sid"
1237
- }, null, 8, ["value", "options"])
1238
- ])) : createCommentVNode("v-if", true),
1239
- classify.value === "custom" && __props.homeManage ? (openBlock(), createElementBlock("div", _hoisted_12, [
1240
- _hoisted_13,
1241
- createElementVNode("span", {
1242
- onClick: addAction,
1243
- style: { "cursor": "pointer" }
1244
- }, [
1245
- createVNode(unref(NIcon), {
1246
- component: unref(AddCircleSharp),
1247
- class: "blue",
1248
- size: "18"
1249
- }, null, 8, ["component"]),
1250
- _hoisted_14
1251
- ])
1252
- ])) : createCommentVNode("v-if", true),
1253
- classify.value === "custom" ? (openBlock(), createElementBlock("ul", {
1254
- key: 5,
1255
- class: normalizeClass(["item-list", { "list-onlyCondition": __props.isOnlyCondition }])
1256
- }, [
1257
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(actionList), (item, index) => {
1258
- return openBlock(), createElementBlock("li", { key: index }, [
1259
- createElementVNode("span", _hoisted_15, toDisplayString(index + 1) + "\xA0\xA0\xA0", 1),
1260
- createCommentVNode(" \u9009\u62E9 field_key "),
1261
- createVNode(unref(NSelect), {
1262
- class: "form-item select-front-item",
1263
- placeholder: "\u8BF7\u9009\u62E9",
1264
- value: item.field_key,
1265
- "onUpdate:value": [($event) => item.field_key = $event, ($event) => changeColumnName($event, item)],
1266
- disabled: item.isIllegalField,
1267
- filterable: "",
1268
- options: item.searchList,
1269
- "label-field": "title",
1270
- "value-field": props.isBI ? "fieldId" : "columnName"
1271
- }, null, 8, ["value", "onUpdate:value", "disabled", "options", "value-field"]),
1272
- createCommentVNode(" \u9009\u62E9 \u5173\u7CFB "),
1273
- createVNode(unref(NSelect), {
1274
- class: "form-item select-front-item",
1275
- placeholder: "\u8BF7\u9009\u62E9",
1276
- value: item.con,
1277
- "onUpdate:value": [($event) => item.con = $event, ($event) => selectChild($event, item)],
1278
- disabled: item.isIllegalField,
1279
- filterable: "",
1280
- options: item.searchChildList,
1281
- "label-field": "desc",
1282
- "value-field": "name"
1283
- }, null, 8, ["value", "onUpdate:value", "disabled", "options"]),
1284
- createCommentVNode(" \u4E0B\u62C9\u6846\u5C55\u793A\u672C\u5217\u8868\u76F8\u540C\u6570\u636E\u7C7B\u578B "),
1285
- visibleCompareField(item) ? (openBlock(), createBlock(unref(NSelect), {
1286
- key: 0,
1287
- class: "form-item",
1288
- placeholder: "\u8BF7\u9009\u62E9",
1289
- value: item.compare_field,
1290
- "onUpdate:value": [($event) => item.compare_field = $event, ($event) => compare_fieldOnChange($event, item)],
1291
- disabled: item.isIllegalField,
1292
- filterable: "",
1293
- options: item.selectList,
1294
- "label-field": "name",
1295
- "value-field": "value"
1296
- }, null, 8, ["value", "onUpdate:value", "disabled", "options"])) : createCommentVNode("v-if", true),
1297
- withDirectives(createElementVNode("div", {
1298
- class: normalizeClass(["in-block def_item_input", [item.showSelect ? "show-small-select" : ""]])
1299
- }, [
1300
- item.showInput ? (openBlock(), createElementBlock("span", _hoisted_16, [
1301
- renderSlot(_ctx.$slots, "showInput", { item }, () => [
1302
- unref(showPercent)(item) ? (openBlock(), createBlock(unref(NInputNumber), {
1303
- key: 0,
1304
- class: "CL-input",
1305
- disabled: item.isIllegalField,
1306
- style: { "width": "200px" },
1307
- value: item.value,
1308
- "onUpdate:value": ($event) => item.value = $event,
1309
- min: 0,
1310
- max: 100
1311
- }, null, 8, ["disabled", "value", "onUpdate:value"])) : (openBlock(), createBlock(unref(NInput), {
1312
- key: 1,
1313
- value: item.value,
1314
- "onUpdate:value": ($event) => item.value = $event,
1315
- disabled: item.isIllegalField,
1316
- class: "form-item"
1317
- }, null, 8, ["value", "onUpdate:value", "disabled"]))
1318
- ])
1319
- ])) : createCommentVNode("v-if", true),
1320
- createCommentVNode(" \u8FD9\u4E00\u90E8\u5206\u591A\u9009\u7684\u529F\u80FD\u9700\u8981\u591A\u770B\u4E00\u4E0B\uFF0C\u524D\u540E\u8FDB\u884C\u5BF9\u6BD4\u4E00\u4E0B "),
1321
- item.showSearch ? (openBlock(), createBlock(unref(NSelect), {
1322
- key: 1,
1323
- style: { "width": "160px" },
1324
- class: "val-select-wrap",
1325
- disabled: item.isIllegalField,
1326
- placeholder: "\u8BF7\u9009\u62E9",
1327
- multiple: "",
1328
- value: item.wordValue,
1329
- "onUpdate:value": [($event) => item.wordValue = $event, ($event) => handleSelect($event, item)],
1330
- filterable: "",
1331
- options: item.wordbookData,
1332
- "label-field": "showKeys",
1333
- "value-field": "myName"
1334
- }, null, 8, ["disabled", "value", "onUpdate:value", "options"])) : createCommentVNode("v-if", true),
1335
- withDirectives(createVNode(unref(NSelect), {
1336
- style: { "width": "66px" },
1337
- class: "val-small-select-wrap",
1338
- placeholder: "\u8BF7\u9009\u62E9",
1339
- value: item.unit,
1340
- "onUpdate:value": ($event) => item.unit = $event,
1341
- disabled: item.isIllegalField,
1342
- filterable: "",
1343
- options: item.dateList,
1344
- "label-field": "name",
1345
- "value-field": "value"
1346
- }, null, 8, ["value", "onUpdate:value", "disabled", "options"]), [
1347
- [vShow, item.showSelect]
1348
- ]),
1349
- item.showDate ? (openBlock(), createElementBlock("div", _hoisted_17, [
1350
- createVNode(unref(NDatePicker), {
1351
- disabled: disabledStartDate || item.isIllegalField,
1352
- format: "YYYY-MM-DD",
1353
- "formatted-value": item.start_val,
1354
- "onUpdate:formatted-value": ($event) => item.start_val = $event,
1355
- placeholder: "\u8BF7\u9009\u62E9",
1356
- "onUpdate:value": ($event) => handleStartOpenChange($event, item),
1357
- style: { "width": "120px" }
1358
- }, null, 8, ["disabled", "formatted-value", "onUpdate:formatted-value", "onUpdate:value"]),
1359
- createVNode(unref(NDatePicker), {
1360
- disabled: disabledEndDate || item.isIllegalField,
1361
- format: "YYYY-MM-DD",
1362
- placeholder: "\u8BF7\u9009\u62E9",
1363
- "formatted-value": item.end_val,
1364
- "onUpdate:formatted-value": ($event) => item.end_val = $event,
1365
- open: item.endOpen,
1366
- "onUpdate:value": ($event) => handleEndOpenChange($event, item),
1367
- style: { "width": "120px" }
1368
- }, null, 8, ["disabled", "formatted-value", "onUpdate:formatted-value", "open", "onUpdate:value"])
1369
- ])) : createCommentVNode("v-if", true),
1370
- createCommentVNode(" \u751F\u65E5 "),
1371
- item.showBirthdayDate ? (openBlock(), createElementBlock("div", _hoisted_18, [
1372
- createCommentVNode(' <n-range-picker v-model="item.limit_date" :disabledDate="disabledDate || item.isIllegalField" @change="changeRange($event, item)" format="MM-DD" style="width: 180px" /> '),
1373
- createVNode(unref(NDatePicker), {
1374
- style: { "width": "180px" },
1375
- value: item.limit_date,
1376
- "onUpdate:value": [($event) => item.limit_date = $event, ($event) => changeRange($event, item)],
1377
- type: "date",
1378
- disabled: disabledDate || item.isIllegalField,
1379
- format: "MM-DD"
1380
- }, null, 8, ["value", "onUpdate:value", "disabled"]),
1381
- createElementVNode("div", _hoisted_19, [
1382
- createCommentVNode(" 1.2.5.34\u5E74\u9F84 "),
1383
- _hoisted_20,
1384
- createVNode(unref(NInput), {
1385
- disabled: item.isIllegalField,
1386
- style: { "width": "60px", "margin-right": "10px" },
1387
- value: item.start_val,
1388
- "onUpdate:value": ($event) => item.start_val = $event
1389
- }, null, 8, ["disabled", "value", "onUpdate:value"]),
1390
- createVNode(unref(NInput), {
1391
- disabled: item.isIllegalField,
1392
- style: { "width": "60px", "margin-right": "10px" },
1393
- value: item.end_val,
1394
- "onUpdate:value": ($event) => item.end_val = $event
1395
- }, null, 8, ["disabled", "value", "onUpdate:value"]),
1396
- createVNode(unref(NSelect), {
1397
- style: { "width": "60px" },
1398
- placeholder: "\u8BF7\u9009\u62E9",
1399
- disabled: item.isIllegalField,
1400
- value: item.unit,
1401
- "onUpdate:value": ($event) => item.unit = $event,
1402
- filterable: "",
1403
- options: item.units,
1404
- "label-field": "title",
1405
- "value-field": "con",
1406
- "default-value": "YEAR"
1407
- }, null, 8, ["disabled", "value", "onUpdate:value", "options"])
1408
- ])
1409
- ])) : createCommentVNode("v-if", true),
1410
- createCommentVNode(" \u8DE8\u8868 "),
1411
- withDirectives(createElementVNode("div", _hoisted_21, [
1412
- withDirectives(createVNode(unref(NSelect), {
1413
- style: { "width": "66px" },
1414
- class: "relation-width",
1415
- placeholder: "\u8BF7\u9009\u62E9",
1416
- value: item.wordValue,
1417
- "onUpdate:value": [($event) => item.wordValue = $event, ($event) => handlerSelectRelation($event, item)],
1418
- disabled: item.isIllegalField,
1419
- filterable: "",
1420
- options: item.relationData,
1421
- "label-field": "tableName",
1422
- "value-field": "tableId"
1423
- }, null, 8, ["value", "onUpdate:value", "disabled", "options"]), [
1424
- [vShow, item.showRelation]
1425
- ]),
1426
- createCommentVNode(" \u5173\u8054\u503C "),
1427
- createVNode(unref(NInput), {
1428
- class: "relation-width",
1429
- disabled: "",
1430
- value: item.relationField,
1431
- "onUpdate:value": ($event) => item.relationField = $event
1432
- }, null, 8, ["value", "onUpdate:value"]),
1433
- createElementVNode("span", {
1434
- class: "relation-width blue relation-btn",
1435
- onClick: ($event) => openRelationFilter(item, index)
1436
- }, [
1437
- createCommentVNode(" 1.1.1.1.6\u70B9\u51FB\u8BBE\u7F6E\u8FC7\u6EE4\u6761\u4EF6 "),
1438
- createTextVNode(toDisplayString("\u70B9\u51FB\u8BBE\u7F6E\u8FC7\u6EE4\u6761\u4EF6"))
1439
- ], 8, _hoisted_22)
1440
- ], 512), [
1441
- [vShow, item.showRelation]
1442
- ]),
1443
- createCommentVNode(" \u5E74\u9F84 "),
1444
- item.showRangeAge ? (openBlock(), createElementBlock("div", _hoisted_23, [
1445
- createVNode(rangeAge, {
1446
- disabled: item.isIllegalField,
1447
- format: item.format,
1448
- defaultValue: {
1449
- start_val: item.start_val,
1450
- end_val: item.end_val
1451
- },
1452
- onChange: ($event) => ageRangeOnChange($event, item)
1453
- }, null, 8, ["disabled", "format", "defaultValue", "onChange"])
1454
- ])) : createCommentVNode("v-if", true),
1455
- item.showAgeCom ? (openBlock(), createElementBlock("div", _hoisted_24, [
1456
- createVNode(ageCom, {
1457
- disabled: item.isIllegalField,
1458
- format: item.format,
1459
- onChange: ($event) => agecomOnChange($event, item),
1460
- value: item.ageValue
1461
- }, null, 8, ["disabled", "format", "onChange", "value"])
1462
- ])) : createCommentVNode("v-if", true)
1463
- ], 2), [
1464
- [vShow, visibleDefaultField(item)]
1465
- ]),
1466
- item.field_key && !unref(searchListKey).includes(item.field_key) ? (openBlock(), createElementBlock("span", _hoisted_25, "\u68C0\u6D4B\u5230\u8BE5\u7B5B\u9009\u5B57\u6BB5\u662F\u975E\u6CD5\u65E0\u6548\u7684,\u8BF7\u79FB\u9664\uFF01")) : createCommentVNode("v-if", true),
1467
- createCommentVNode(" 1.1.1.3.3\u5220\u9664 "),
1468
- createElementVNode("div", _hoisted_26, [
1469
- createVNode(unref(NTooltip), {
1470
- title: "\u5220\u9664",
1471
- trigger: "hover"
1472
- }, {
1473
- trigger: withCtx(() => [
1474
- !__props.isSee ? withDirectives((openBlock(), createBlock(unref(script), {
1475
- key: 0,
1476
- onClick: ($event) => softDel(index),
1477
- "class-name": "svg-icon-btn is-danger form-action",
1478
- "icon-class": "xitongtubiaoliebiaocaozuoanniushanchushixin"
1479
- }, null, 8, ["onClick"])), [
1480
- [vShow, unref(noShowListDelIcon)]
1481
- ]) : createCommentVNode("v-if", true)
1482
- ]),
1483
- default: withCtx(() => [
1484
- createTextVNode(" \u5220\u9664 ")
1485
- ]),
1486
- _: 2
1487
- }, 1024)
1488
- ])
1489
- ]);
1490
- }), 128))
1491
- ], 2)) : createCommentVNode("v-if", true),
1492
- classify.value === "custom" && !__props.isOnlyCondition ? (openBlock(), createElementBlock("div", _hoisted_27, [
1493
- withDirectives(createElementVNode("div", _hoisted_28, [
1494
- createTextVNode(toDisplayString("\u7B5B\u9009\u5668\u903B\u8F91\u7F16\u8F91\uFF0C\u4E0D\u8BBE\u7F6E\u9ED8\u8BA4\u4E3AAND") + " "),
1495
- _hoisted_29,
1496
- createTextVNode(" \u4F8B\u5B50 (1 AND 2) OR 3 ")
1497
- ], 512), [
1498
- [vShow, !unref(is_search_professional)]
1499
- ]),
1500
- createElementVNode("div", null, [
1501
- createCommentVNode(" \u6CA1\u5565\u7528\u6491\u5E03\u5C40\u800C\u5DF2 "),
1502
- unref(is_search_professional) ? (openBlock(), createElementBlock("span", _hoisted_30, toDisplayString(1) + "\xA0\xA0\xA0")) : createCommentVNode("v-if", true),
1503
- createVNode(unref(NInput), {
1504
- class: "teavalue-wrap",
1505
- type: "textarea",
1506
- value: teaValue.value,
1507
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => teaValue.value = $event),
1508
- placeholder: unref(is_search_professional) ? "\u7B5B\u9009\u6761\u4EF6\u8868\u8FBE\u5F0F\uFF0C\u4E0D\u8BBE\u7F6E\u9ED8\u8BA4\u4E3AAND\uFF0C\u4F8B\u5B50(1 AND 2) OR 3" : "",
1509
- rows: unref(is_search_professional) ? 1 : 3
1510
- }, null, 8, ["value", "placeholder", "rows"])
1511
- ])
1512
- ])) : createCommentVNode("v-if", true)
1513
- ])
1514
- ], 2);
1515
- };
1516
- }
1517
- });
1518
- var SearchCondition = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "SearchCondition.vue"]]);
1519
-
1520
- export { SearchCondition as default };
1
+ import{defineComponent as e,useAttrs as l,ref as a,computed as i,watch as t,openBlock as n,createElementBlock as o,normalizeClass as s,unref as d,createElementVNode as u,createCommentVNode as r,createVNode as v,Fragment as c,renderList as p,toDisplayString as f,createBlock as m,withDirectives as _,withCtx as h,createTextVNode as g,vShow as y,renderSlot as b}from"vue";import{CloseOutline as w,AddOutline as I,AddCircleSharp as O}from"@vicons/ionicons5";import E from"moment";import"moment/locale/zh-cn";import S from"../range-age/index.vue.js";import T from"../age-com/index.vue.js";import N from"../../../../../shared/components/SvgIcon/SvgIcon.vue.js";import{useMessage as k,NInput as C,NIcon as L,NButton as A,NSelect as U,NInputNumber as D,NDatePicker as j,NTooltip as F}from"naive-ui";import x from"xe-utils";import R from"../../hooks/useMixins.js";import M from"./fieldTypeList.js";import Y from"../../../../../_virtual/plugin-vue_export-helper.js";const B={class:"inner-content"},V={key:0,class:"item-name"},Q=u("span",{class:"label"},"筛选分类名称:",-1),H={key:1,class:"parent-names"},q=u("span",{class:"label"},f("父类名称")+":",-1),G=["onDblclick","onClick"],J={key:0,class:"s-content"},P={key:2,class:"item-name"},K={key:0,class:"label"},z={key:3,class:"item-name"},W=u("span",{class:"label"},"选择筛选分类:",-1),X={key:4,class:"item-name"},$=u("span",{class:"label"}," 过滤条件: ",-1),Z=u("span",null,"添加",-1),ee={class:"index-span"},le={key:0,class:"val-input-wrap"},ae={key:2,class:"date-item val-date-wrap"},ie={key:3,class:"date-item birthday-item val-birthday-wrap"},te={class:"age-wrap"},ne=u("p",null,f("年龄"),-1),oe={class:"relation-item"},se=["onClick"],de={key:4,class:"range-container val-range-wrap"},ue={key:5,class:"range-container val-age-wrap"},re={key:1,class:"item-error"},ve={class:"operation"},ce={key:6},pe={style:{"margin-bottom":"6px"}},fe=u("br",null,null,-1),me={key:0,style:{visibility:"hidden"},class:"index-span"};var _e=Y(e({__name:"SearchCondition",props:{isSee:{type:Boolean},visible:{type:Boolean},actionList_prop:{type:Object,default:()=>({})},filterApiConfig:{type:Object,default:()=>({})},searchFieldList:{type:Array,default:()=>[]},showItemName:{default:!0},saveEmpty:{default:!1},homeManage:{default:!1},tableId:{default:""},isPersonalizedHome:{default:!1},conditionList:{type:Array},source:{type:String},isBI:{default:!1},isOnlyCondition:{type:Boolean},isCnHis:{type:Boolean,default:!1},isAdmin:{type:Boolean,default:!1},showCompareField:{type:Boolean,default:!1},hideAddBtn:{type:Boolean,default:!1},openType:{type:String,default:""}},emits:["setConditionMap","saveAdd","cancelSaveAdd"],setup(e,{expose:Y,emit:_e}){const he=e,{handleGetConfigApi:ge}=R(),ye=l(),be=k();a(null);const we=a(""),Ie=a(""),Oe=a(""),Ee=a(""),Se=a(""),Te=a(!1),Ne=a(!1),ke=a(""),Ce=a(!1);a("");const Le=a("custom");a("");const Ae=a(-1);a(!1);let Ue=a([]),De=a([]),je=a([]),Fe=a([]),xe=a(M),Re=a([{name:"天",value:"DAY"},{name:"周",value:"WEEK"},{name:"月",value:"MONTH"},{name:"季度",value:"QUARTER"},{name:"年",value:"YEAR"}]),Me=a({name:"小时",value:"HOUR"}),Ye=a([{desc:"存在跨表",name:"QUOTE_IN"},{desc:"不存在跨表",name:"QUOTE_NOTIN"}]),Be=a([{desc:"等于",name:"IN"},{desc:"大于",name:"BIG"},{desc:"大于等于",name:"BIGEQ"},{desc:"小于",name:"LESS"},{desc:"小于等于",name:"LESSEQ"}]),Ve=a({}),Qe=a([]),He=a([{title:"天",units:1,con:"DAY"},{title:"周",units:2,con:"WEEK"},{title:"月",units:1,con:"MONTH"},{title:"岁",units:1,con:"YEAR"}]),qe=a([]);a({}),a(void 0);let Ge=a([]),Je=a(["BIG","LESS","BIGEQ","LESSEQ","IN_THE_PAST_DI","IN_THE_FUTURE_DI"]),Pe=a([]);const Ke=i((()=>qe.value.some((e=>e.isAdd)))),ze=i((()=>e=>{var l;return"PERCENTAGE"===(null==(l=e.settingObj)?void 0:l.attr)||!1})),We=i((()=>{let e=[];return Ue.value.forEach((l=>{l.fieldId&&e.push(l.fieldId),l.columnName&&e.push(l.columnName)})),e}));i((()=>he.isAdmin));const Xe=i((()=>"search-professional"==he.source)),$e=i((()=>!(1===(Pe.value.length||0)&&"search-professional"==he.source)));function Ze(){he.homeManage&&(!async function(){var e;let l={tableId:he.tableId},a=await ge(l,"requestGetTableCondiTionList",{},he.filterApiConfig);a.status&&(_e("setConditionMap",a.data),Ge.value=(null==(e=null==a?void 0:a.data)?void 0:e.conditionList)||[])}(),Le.value=(null==he?void 0:he.actionList_prop.displayCategory)||"custom",he.actionList_prop.displayCategory&&(he.actionList_prop.conObj=[],he.actionList_prop.preSqlExpression="")),je.value="relationTable"===he.openType?[]:ye.relationTableList?ye.relationTableList:[],function(e={}){let l=JSON.parse(JSON.stringify(he.searchFieldList)).filter((e=>"operatorColumn"!==e.columnName&&1!=e.isMerge));if(l&&l.length>0){if(he.isPersonalizedHome)Ue.value=l;else{let e=l.map((e=>{let{settingObj:l={}}=e,a=!1;a=!("notParticipatingSearch"in l)||1!=l.notParticipatingSearch;return(!!he.isCnHis||(1==e.isSearch||1==e.isShowSearch))&&a?e:null})).filter(Boolean);Ue.value=e}if(0===Ue.value.length)return;if(xe.value.some((e=>{var l;if((null==(l=Ue.value[0])?void 0:l.fieldType)==e.name)return De.value=e.conList,!0})),Fe.value=je.value.map((e=>e.primaryField)),Pe.value=[],Oe.value="",Ee.value="","initNoAdd"==(null==e?void 0:e.type)||"")return;el()}}(),function(e){if(!e||!Object.keys(e||{}).length)return;let l=e;"customMenuForm"===he.source&&e.setting&&x.isJSON(e.setting)&&(l=JSON.parse(e.setting)||{});if(!Object.keys(l||{}).length)return;let a=[];Oe.value=l.name,Se.value="edit"==l.from?l.sid:"",Ee.value=l.sqlExpression,l.conObj&&!Array.isArray(l.conObj)&&(l.conObj=JSON.parse(l.conObj));if(!l.conObj||!l.conObj.length)return;Pe.value=l.conObj.map((e=>{var l;let i=Ue.value.find((l=>(he.isBI?l.fieldId:l.columnName)==e.field_key));if(i&&(e.settingObj=null==i?void 0:i.settingObj),"CONVERT"==e.con)e.wordValue=e.value;else if("QUOTE"==e.con||"QUOTE_NOT"==e.con)e.wordValue=e.value.split("|#|");else if(Fe.value.includes(e.field_key)){e.wordValue=e.tableId;let l=je.value.find((l=>l.tableId===e.tableId));l&&(e.relationField=l.relationField,a=JSON.parse(JSON.stringify(l.fieldList.fieldList))||[])}let t="",n="",o=[],s={};if("PERCENTAGE"===(null==(l=null==e?void 0:e.settingObj)?void 0:l.attr))e.value&&(e.value=100*Number(e.value));else if(e&&e.settingObj&&"BIRTHDAY"==e.settingObj.attr){if(t=e.start_val?e.start_val:"",n=e.end_val?e.end_val:"",e.limit_date){let l=e.limit_date;if(Array.isArray(e.limit_date)){let l=[];e.limit_date.length>0&&e.limit_date.forEach((e=>{e._d&&l.push(E(e._d).format("MM-dd"))})),l.length>0&&(e.curlimit_date=l.join("~"))}else if(x.isString(l)){let a=[];if(e.curlimit_date=l,x.isString(l)){let e=l.split("~");if(e.length>0){for(let l=0;l<e.length;l++)a.push(E(e[l],"MM-DD"));o=a}}}}}else e&&e.settingObj&&"AGE"==e.settingObj.attr?(e.AGEAttr=!0,t=e.start_val,n=e.end_val,s=function(e){let l=+e;if(isNaN(l))return{};if("number"==typeof l){let e=0,a=Math.floor(l/365);e=l%365;let i=Math.floor(e/30);return e%=30,{year:a,month:i,day:e,d:l}}return{}}(e.value)):(t=e.start_val?E(e.start_val).format("YYYY-MM-DD"):"",n=e.end_val?E(e.end_val).format("YYYY-MM-DD"):"",e.curlimit_date="");return e.fieldType=e.fieldType||(null==i?void 0:i.fieldType),e.is_compare_field&&he.showCompareField&&fl(e),{field_key:e.field_key,fieldId:e.field_key,fieldType:e.fieldType,con:e.con,unit:e.unit,start_val:t,end_val:n,limit_date:o,curlimit_date:e.curlimit_date?e.curlimit_date:"",searchList:Ue.value,searchChildList:De.value,dateList:Re.value,wordValue:e.wordValue,word:e.wordValue,value:x.isString(e.value)?e.value:JSON.stringify(e.value),relationData:Fe.value.includes(e.field_key)?[...je.value]:[],relationField:e.valueField||"",relationFieldList:a||[],quote_con:e.quote_con||{},ageValue:s||{},converFun:e.converFun||void 0,parameterConversionId:e.parameterConversionId||void 0,relationOrgId:e.relationOrgId||void 0,preConObj:e.preConObj||void 0,preSqlExpression:e.preSqlExpression||void 0,isIllegalField:he.isSee||e.field_key&&!We.value.includes(e.field_key),wordbookValueList:e.wordbookValueList||[],wordbookData:[],is_compare_field:e.is_compare_field||!1,selectList:e.selectList||[],customInput:!1,compare_field:e.compare_field}})),Pe.value.forEach((e=>{il(e.field_key,e),nl(e.con,e,!0,{is_compare_field:e.is_compare_field})}))}(he.actionList_prop),he.showItemName&&function(){let e=[];((null==ye?void 0:ye.displayCategoryList)||[]).forEach((l=>{"未分类"!==l&&e.push({disabled:!0,selected:l===he.actionList_prop.displayCategory,value:l})})),qe.value=e}(),Te.value=!0}function el(e={}){if(0===Ue.value.length)return be.warning("暂无字段可设置!");let l=(null==e?void 0:e.noDefault)||Xe.value||!1,a=Ue.value[0],i="",t={},n={};if(a&&(i=he.isBI?a.fieldId:a.columnName,t=a.setting,n=null==a?void 0:a.settingObj),l&&(a={},i=""),Pe.value.push({curKey:Date.now()+Math.random().toString(36).substr(2,15),field_key:i,fieldId:a.fieldId,fieldType:a.fieldType,con:void 0,searchList:Ue.value,searchChildList:De.value,dateList:Re.value,wordbookData:[],relationData:[...je.value],relationField:"",relationFieldList:[],quote_con:{},title:"",unit:"YEAR",setting:t,settingObj:n,wordbookValueList:[],isIllegalField:he.isSee,is_compare_field:!1,selectList:[],customInput:!1,compare_field:""}),l)return;let o=Pe.value.length-1;al(Pe.value[o].field_key,Pe.value[o])}function ll(){_e("cancelSaveAdd"),Pe.value=[],Ce.value=!1,ke.value="",Oe.value="",Se.value="",Ee.value=""}function al(e,l){l.con=void 0;let a=l.searchList.find((l=>l.columnName==e));l.fieldType=(null==a?void 0:a.fieldType)||void 0,l.wordValue=[],l.wordbookData=[],il(e,l),ol(l),function(e){if(!he.showCompareField)return;e.customInput=!1,e.is_compare_field=!1,e.compare_field=void 0}(l),l.isIllegalField=e&&!We.value.includes(e),tl(l)}function il(e,l){l.searchList.some((a=>{var i,t,n;if((he.isBI?a.fieldId:a.columnName)==e){l.fieldType=a.fieldType,l.settingObj=null==a?void 0:a.settingObj;let o=(null==(i=null==a?void 0:a.settingObj)?void 0:i.attr)||"",s=(null==(t=null==a?void 0:a.settingObj)?void 0:t.format)||"";if(l.title=a.title||"",a.setting){if(!x.isPlainObject(a.setting)&&(a.setting=JSON.parse(a.setting)),!x.isEmpty(a.setting.wordbook)){l.searchChildList=[{desc:"引用",name:"QUOTE"},{desc:"不引用",name:"QUOTE_NOT"}];let e={};return a.setting.wordbook.params&&a.setting.wordbook.params.forEach((l=>{e[l.p_name]=l.p_value})),l.settingWordbook={params:e,id:a.setting.wordbook.id},!0}if(a.setting.showSetting&&a.setting.showSetting.length>0){l.searchChildList=[{desc:"下拉选项",name:"CONVERT"}],l.wordValue=[];let e=a.setting.showSetting,i=function(e){let{defaultValue:l,defaultValueTitle:a}=(null==e?void 0:e.dictionarieObj)||{},i=null;l&&a&&(i={change_text:a,filter:[{con:"EQ",field_key:e.columnName,value:l}]});return i}(a);if(i){let{defaultValueTitle:l}=(null==a?void 0:a.dictionarieObj)||{};!e.find((e=>e.change_text===l))&&e.unshift(i)}let t=e.map(((e,a)=>{if(l.word){x.isString(l.word)&&(l.word=JSON.parse(l.word));let a=l.word.map((e=>JSON.stringify(e))),i=JSON.stringify(e.filter);a.includes(i)&&l.wordValue.push(i)}return{name:e.change_text,showKeys:e.change_text,value:JSON.stringify(e.filter),myName:JSON.stringify(e.filter),id:(a+9).toString(36)+a,sid:(a+9).toString(36)+a}}));return l.wordbookData=t,!0}{let e=xe.value.find((e=>a.fieldType.toUpperCase()==e.name)),i=De.value;e&&(i=e.conList),"BIRTHDAY"===(null==(n=null==l?void 0:l.settingObj)?void 0:n.attr)&&(i=i.filter((e=>!Je.value.includes(e.name)))||[]),l.searchChildList=i}"AGE"==o&&(l.searchChildList=Be.value,l.format=s.toUpperCase())}else xe.value.some((e=>{if(a.fieldType==e.name)return l.searchChildList=e.conList.filter((e=>"QUOTE"!=e.name&&"CONVERT"!=e.name&&"QUOTE_NOT"!=e.name)),!0}));return Fe.value.includes(e)&&!l.searchChildList.some((e=>"QUOTE_IN"==e.name))&&l.searchChildList.push(...Ye.value),!0}}))}function tl(e){const l=Pe.value.map((l=>e.curKey===l.curKey?e:l));Pe.value=l}function nl(e,l,a,i){var t,n,o,s;let d=(null==(t=null==l?void 0:l.settingObj)?void 0:t.attr)||"",u=["BIG","BIGEQ","LESS","LESSEQ"];l.showRangeAge=!1,l.showAgeCom=!1;if(["TODAY","THIS_WEEK","THIS_MONTH","THIS_SEASON","THIS_YEAR","NULL","NOT_NULL","TOMORROW","YESTERDAY","NEXT_WEEK","UP_WEEK","NEXT_MONTH","UP_MONTH","NEXT_SEASON","UP_SEASON","NEXT_YEAR","UP_YEAR"].includes(e))l.showInput=!1,l.showSelect=!1,l.showDate=!1,l.showSearch=!1,l.showRelation=!1,rl(l);else if(["IN_THE_PAST","IN_THE_FUTURE","N_","L_","IN_THE_PAST_DI","IN_THE_FUTURE_DI"].includes(e)){if(l.showSelect=!0,l.showInput=!0,l.showDate=!1,l.showSearch=!1,l.showRelation=!1,"IN_THE_PAST_DI"==e||"IN_THE_FUTURE_DI"==e)l.dateList=Re.value;else{let e=Re.value.concat(Me.value);l.dateList=e}a||(l.unit="DAY"),rl(l)}else if("IN"==e)"BIRTHDAY"==d?(l.showBirthdayDate=!0,l.showDate=!1,l.units=He.value.filter((e=>1===e.units))):"AGE"==d?l.showRangeAge=!0:(l.showDate=!0,rl(l)),l.showSelect=!1,l.showInput=!1,l.showSearch=!1,l.showRelation=!1;else if("CONVERT"==e||"QUOTE"==e||"QUOTE_NOT"==e){l.showDate=!1,l.showSelect=!1,l.showInput=!1,l.showSearch=!0,l.showRelation=!1,rl(l);let e=!1;(null==(o=null==(n=null==l?void 0:l.settingObj)?void 0:n.showSetting)?void 0:o.length)&&(e=!0),!e&&(null==(s=l.wordbookValueList)?void 0:s.length)&&(l.wordbookData=l.wordbookValueList)}else["QUOTE_IN","QUOTE_NOTIN"].includes(e)?(l.showRelation=!0,l.showInput=!1,l.showSelect=!1,l.showDate=!1,l.showSearch=!1,rl(l)):"AGE"==d?u.includes(e)&&(l.showAgeCom=!0):(l.showSelect=!1,l.showDate=!1,l.settingObj&&"BIRTHDAY"==l.settingObj.attr?l.showInput=!1:l.showInput=!0,l.showSearch=!1,l.showRelation=!1,rl(l));if(he.showCompareField&&"_custom__input_"!==(null==i?void 0:i.type)){if(["EQ","IN","NEQ"].includes(e)||["NUMBER","DATE","DATETIME","TIME"].includes(l.fieldType)&&["EQ","NEQ","BIG","LESS","BIGEQ","LESSEQ"].includes(e)){if(l.is_compare_field=!0,l.customInput=!1,fl(l),Array.isArray(l.selectList))if(l.selectList.length>1){let[e]=l.selectList,i=a&&l.compare_field||e.value;l.compare_field=i,setTimeout((()=>{ml(i,l)}),100)}else{let e=(null==l?void 0:l.selectList)||[];if(1===((null==e?void 0:e.length)||0)&&"_custom__input_"===e[0].value)return l.customInput=!0,void(l.compare_field="_custom__input_")}if(a)if(i.is_compare_field&&l.compare_field)l.is_compare_field=!0;else if(l.start_val||l.end_val||l.value||l.wordValue||l.showSelect)return l.customInput=!0,void(l.compare_field="_custom__input_");ol(l,!1)}else l.customInput=!0,l.is_compare_field=!1,l.compare_field&&(l.compare_field=void 0);tl(l)}}function ol(e,l=!0){e.showRangeAge=!1,e.showAgeCom=!1,e.showInput=!1,e.showSelect=!1,e.showDate=!1,e.showSearch=!1,e.showRelation=!1,l&&(e.value="")}function sl(e){const l=Ie.value;return!(!e||!l)&&e.valueOf()>l.valueOf()}function dl(e){const l=we.value;return!(!e||!l)&&l.valueOf()>=e.valueOf()}function ul(e){return e&&e<E().startOf("year")||e>E().endOf("year")}function rl(e){e.showBirthdayDate=!1,e.unit=e.unit||"YEAR",e.units=He.value.filter((e=>1===e.units))}function vl(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),Ce.value=!0}function cl(){if(Ce.value=!1,!ke.value.trim())return;qe.value.forEach((e=>e.selected=!1));const e=qe.value.concat({disabled:!0,value:ke.value.trim(),selected:!0,isAdd:!0});ke.value="",qe.value=e}function pl(e,l){!function(e,l){let{conditionList:a}=he;if(!a||!a.length)return void qe.value.splice(e,1);let i=a.filter((e=>e.displayCategory===l.value));if(!i||!i.length)return void qe.value.splice(e,1);be.error("该分类下有已有数据,请删除该分类下的筛选集后重试!")}(e,l)}function fl(e){let l=Ue.value.filter((l=>l.fieldType==e.fieldType&&(he.isBI?l.fieldId:l.columnName)!=e.field_key)).map((e=>({value:he.isBI?e.fieldId:e.columnName,name:e.alias||e.title})));l.unshift({value:"_custom__input_",name:"自定义输入"}),e.selectList=l}function ml(e,l){"_custom__input_"===e?(l.customInput=!0,nl(l.con,l,!1,{type:"_custom__input_"})):(l.customInput=!1,l.value="")}function _l(e){let l=(null==e?void 0:e.selectList)||[];return 1===((null==l?void 0:l.length)||0)&&"_custom__input_"===l[0].value}function hl(e){if(!he.showCompareField)return!1;let l=_l(e);return e.is_compare_field&&!l}function gl(e){if(!he.showCompareField)return!0;let l=_l(e);return e.customInput||!e.is_compare_field||l}return t((()=>he.searchFieldList),(e=>{if(e&&e.length>0){if(Xe.value&&Te.value)return;Ze()}}),{immediate:!0,deep:!0}),Y({handleInitConditions:Ze,saveAdd:function(){var e;if(he.homeManage&&"custom"!==Le.value){let e=Ge.value.find((e=>e.sid===Le.value)),l={displayCategory:e.sid,name:e.name,sqlExpression:e.sqlExpression,conObj:e.conObj},a={id:e.sid,tableId:he.tableId,setting:JSON.stringify(l)};_e("saveAdd",a)}else if(he.homeManage&&"custom"==Le.value&&(he.actionList_prop.displayCategory="",he.actionList_prop.name=""),Oe.value||!he.showItemName)if(Pe.value&&Pe.value.length>0){let l=function(){var e,l,a;let i=[];for(let t=0;t<Pe.value.length;t++){let n=Pe.value[t];if(n.field_key&&!We.value.includes(n.field_key))return void be.error("检测到该筛选字段含有非法无效的,请移除!");let o=(null==(e=null==n?void 0:n.settingObj)?void 0:e.attr)||"",s=0;s="CONVERT"==n.con?n.wordValue.map((e=>JSON.parse(e))):"QUOTE"==n.con||"QUOTE_NOT"==n.con?n.wordValue.join("|#|"):n.value;let d="",u="",r=[];if((null==n?void 0:n.settingObj)&&"PERCENTAGE"==(null==(l=null==n?void 0:n.settingObj)?void 0:l.attr))s=Number(s)/100;else if((null==n?void 0:n.settingObj)&&"BIRTHDAY"==(null==(a=null==n?void 0:n.settingObj)?void 0:a.attr)){if(n.start_val){if(!x.validateBirthday(n.start_val,n.title,n.unit))return}if(n.end_val){if(!x.validateBirthday(n.end_val,n.title,n.unit))return}if(+n.start_val>+n.end_val)return void be.warning(`${n.title}请输入有效范围`);d=n.start_val?n.start_val:"",u=n.end_val?n.end_val:"",r=n.curlimit_date?n.curlimit_date:""}else"AGE"==o?(d=n.start_val,u=n.end_val,s=n.value):(d=n.start_val?n.start_val.format("YYYY-MM-DD"):"",u=n.end_val?n.end_val.format("YYYY-MM-DD"):"");let v=!!he.showCompareField&&"_custom__input_"==n.compare_field,c={field_key:n.field_key,fieldId:n.field_key,fieldType:n.fieldType,con:n.con,value:s,start_val:d,end_val:u,unit:n.unit,limit_date:r,tableId:n.showRelation&&n.wordValue||void 0,valueField:n.relationField||void 0,quote_con:Object.keys(n.quote_con||{}).length?n.quote_con:null,converFun:n.converFun||void 0,parameterConversionId:n.parameterConversionId||void 0,relationOrgId:n.relationOrgId||void 0,preConObj:n.preConObj||void 0,preSqlExpression:n.preSqlExpression||void 0,wordbookValueList:n.wordbookValueList,is_compare_field:!v&&n.is_compare_field,compare_field:v?void 0:n.compare_field};i.push(c)}return[...i]}();if(!l)return;if(he.isOnlyCondition)return void _e("saveAdd",l);let a={displayCategory:null==(e=qe.value.filter((e=>e.selected))[0])?void 0:e.value,name:Oe.value,sqlExpression:Ee.value,conObj:l},i={id:Se.value,tableId:he.tableId,setting:JSON.stringify(a)};if(l.some((e=>!e.con)))return be.warning("请完善筛选条件");_e("saveAdd",i);const{isInSearch:t}=ye||{};t||ll()}else{if(!he.saveEmpty)return be.warning("请设置搜索条件");_e("saveAdd",{setting:"{}"}),ll()}else be.warning("请输入搜索分类名称!")},cancelSaveAdd:ll,addAction:el,checkActionList:function(){return Pe.value.every((e=>!e.field_key))}}),(l,a)=>(n(),o("div",{class:s(["SearchCondition-page-block",d(Xe)?"_c_com-search-professional":""])},[u("div",B,[e.showItemName?(n(),o("div",V,[Q,r(" 1.1.6.6请输入分类名称 "),v(d(C),{value:Oe.value,"onUpdate:value":a[0]||(a[0]=e=>Oe.value=e),placeholder:"请输入分类名称",style:{width:"250px"},maxLength:10},null,8,["value"])])):r("v-if",!0),he.showItemName?(n(),o("div",H,[q,(n(!0),o(c,null,p(d(qe),((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((()=>{e.target.focus()}),0)}(l,e),onClick:a=>function(e,l){if(!e.disabled)return;const a=qe.value.map(((e,a)=>(e.selected=a===l&&!e.selected,e)));qe.value=a}(e,l)},[e.disabled?(n(),o("div",J,[u("span",null,f(e.value),1)])):(n(),m(d(C),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":l=>e.value=l,maxLength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),v(d(L),{component:d(w),class:"anticon-close",size:"20",onClick:a=>pl(l,e)},null,8,["component","onClick"])],42,G)))),128)),d(Ke)?r("v-if",!0):(n(),o(c,{key:0},[_(v(d(A),{class:"ant-btn",icon:"plus",dashed:"",onClick:vl},{default:h((()=>[v(d(L),{component:d(I),size:"20"},null,8,["component"]),g(" "+f("添加父类"))])),_:1},512),[[y,!Ce.value]]),_(v(d(C),{class:"edit-tag",value:ke.value,"onUpdate:value":a[1]||(a[1]=e=>ke.value=e),style:{width:"100px"},onBlur:cl,maxLength:10},null,8,["value"]),[[y,Ce.value]])],64))])):r("v-if",!0),"custom"!==Le.value||e.homeManage||e.hideAddBtn?r("v-if",!0):(n(),o("div",P,[e.isOnlyCondition?r("v-if",!0):(n(),o("span",K," 过滤条件: ")),u("div",{class:"addAction",onClick:el,style:{cursor:"pointer"}},[v(d(L),{component:d(O),class:"blue",size:"18"},null,8,["component"]),u("span",null,f(e.isOnlyCondition?"添加操作":"添加"),1)])])),e.homeManage?(n(),o("div",z,[W,v(d(U),{value:Le.value,"onUpdate:value":a[2]||(a[2]=e=>Le.value=e),placeholder:"请选择",filterable:"",options:d(Ge),"label-field":"name","value-field":"sid"},null,8,["value","options"])])):r("v-if",!0),"custom"===Le.value&&e.homeManage?(n(),o("div",X,[$,u("span",{onClick:el,style:{cursor:"pointer"}},[v(d(L),{component:d(O),class:"blue",size:"18"},null,8,["component"]),Z])])):r("v-if",!0),"custom"===Le.value?(n(),o("ul",{key:5,class:s(["item-list",{"list-onlyCondition":e.isOnlyCondition}])},[(n(!0),o(c,null,p(d(Pe),((a,i)=>(n(),o("li",{key:i},[u("span",ee,f(i+1)+"   ",1),r(" 选择 field_key "),v(d(U),{class:"form-item select-front-item",placeholder:"请选择",value:a.field_key,"onUpdate:value":[e=>a.field_key=e,e=>al(e,a)],disabled:a.isIllegalField,filterable:"",options:a.searchList,"label-field":"title","value-field":he.isBI?"fieldId":"columnName"},null,8,["value","onUpdate:value","disabled","options","value-field"]),r(" 选择 关系 "),v(d(U),{class:"form-item select-front-item",placeholder:"请选择",value:a.con,"onUpdate:value":[e=>a.con=e,e=>nl(e,a)],disabled:a.isIllegalField,filterable:"",options:a.searchChildList,"label-field":"desc","value-field":"name"},null,8,["value","onUpdate:value","disabled","options"]),r(" 下拉框展示本列表相同数据类型 "),hl(a)?(n(),m(d(U),{key:0,class:"form-item",placeholder:"请选择",value:a.compare_field,"onUpdate:value":[e=>a.compare_field=e,e=>ml(e,a)],disabled:a.isIllegalField,filterable:"",options:a.selectList,"label-field":"name","value-field":"value"},null,8,["value","onUpdate:value","disabled","options"])):r("v-if",!0),_(u("div",{class:s(["in-block def_item_input",[a.showSelect?"show-small-select":""]])},[a.showInput?(n(),o("span",le,[b(l.$slots,"showInput",{item:a},(()=>[d(ze)(a)?(n(),m(d(D),{key:0,class:"CL-input",disabled:a.isIllegalField,style:{width:"200px"},value:a.value,"onUpdate:value":e=>a.value=e,min:0,max:100},null,8,["disabled","value","onUpdate:value"])):(n(),m(d(C),{key:1,value:a.value,"onUpdate:value":e=>a.value=e,disabled:a.isIllegalField,class:"form-item"},null,8,["value","onUpdate:value","disabled"]))]))])):r("v-if",!0),r(" 这一部分多选的功能需要多看一下,前后进行对比一下 "),a.showSearch?(n(),m(d(U),{key:1,style:{width:"160px"},class:"val-select-wrap",disabled:a.isIllegalField,placeholder:"请选择",multiple:"",value:a.wordValue,"onUpdate:value":[e=>a.wordValue=e,e=>function(e,l){Array.isArray(e)&&(l.wordbookValueList=e),tl(l)}(e,a)],filterable:"",options:a.wordbookData,"label-field":"showKeys","value-field":"myName"},null,8,["disabled","value","onUpdate:value","options"])):r("v-if",!0),_(v(d(U),{style:{width:"66px"},class:"val-small-select-wrap",placeholder:"请选择",value:a.unit,"onUpdate:value":e=>a.unit=e,disabled:a.isIllegalField,filterable:"",options:a.dateList,"label-field":"name","value-field":"value"},null,8,["value","onUpdate:value","disabled","options"]),[[y,a.showSelect]]),a.showDate?(n(),o("div",ae,[v(d(j),{disabled:sl||a.isIllegalField,format:"YYYY-MM-DD","formatted-value":a.start_val,"onUpdate:formatted-value":e=>a.start_val=e,placeholder:"请选择","onUpdate:value":e=>function(e,l){e||(l.endOpen=!0)}(e,a),style:{width:"120px"}},null,8,["disabled","formatted-value","onUpdate:formatted-value","onUpdate:value"]),v(d(j),{disabled:dl||a.isIllegalField,format:"YYYY-MM-DD",placeholder:"请选择","formatted-value":a.end_val,"onUpdate:formatted-value":e=>a.end_val=e,open:a.endOpen,"onUpdate:value":e=>function(e,l){l.endOpen=e}(e,a),style:{width:"120px"}},null,8,["disabled","formatted-value","onUpdate:formatted-value","open","onUpdate:value"])])):r("v-if",!0),r(" 生日 "),a.showBirthdayDate?(n(),o("div",ie,[r(' <n-range-picker v-model="item.limit_date" :disabledDate="disabledDate || item.isIllegalField" @change="changeRange($event, item)" format="MM-DD" style="width: 180px" /> '),v(d(j),{style:{width:"180px"},value:a.limit_date,"onUpdate:value":[e=>a.limit_date=e,e=>function(e,l){let a=[];e.length>0&&e.forEach((e=>{e._d&&a.push(x.formatTime("MOUTH",e._d))})),a.length>0&&(l.curlimit_date=a.join("~"))}(e,a)],type:"date",disabled:ul||a.isIllegalField,format:"MM-DD"},null,8,["value","onUpdate:value","disabled"]),u("div",te,[r(" 1.2.5.34年龄 "),ne,v(d(C),{disabled:a.isIllegalField,style:{width:"60px","margin-right":"10px"},value:a.start_val,"onUpdate:value":e=>a.start_val=e},null,8,["disabled","value","onUpdate:value"]),v(d(C),{disabled:a.isIllegalField,style:{width:"60px","margin-right":"10px"},value:a.end_val,"onUpdate:value":e=>a.end_val=e},null,8,["disabled","value","onUpdate:value"]),v(d(U),{style:{width:"60px"},placeholder:"请选择",disabled:a.isIllegalField,value:a.unit,"onUpdate:value":e=>a.unit=e,filterable:"",options:a.units,"label-field":"title","value-field":"con","default-value":"YEAR"},null,8,["disabled","value","onUpdate:value","options"])])])):r("v-if",!0),r(" 跨表 "),_(u("div",oe,[_(v(d(U),{style:{width:"66px"},class:"relation-width",placeholder:"请选择",value:a.wordValue,"onUpdate:value":[e=>a.wordValue=e,e=>function(e,l){var a;let i=je.value.find((l=>l.tableId===e));i&&(l.relationField=i.relationField),l.relationFieldList=JSON.parse(JSON.stringify((null==(a=null==i?void 0:i.fieldList)?void 0:a.fieldList)||[])),l.converFun=i.converFun||void 0,l.parameterConversionId=i.parameterConversionId||void 0,l.relationOrgId=i.relationOrgId||void 0,l.preConObj=i.preConObj||void 0,l.preSqlExpression=i.preSqlExpression||void 0}(e,a)],disabled:a.isIllegalField,filterable:"",options:a.relationData,"label-field":"tableName","value-field":"tableId"},null,8,["value","onUpdate:value","disabled","options"]),[[y,a.showRelation]]),r(" 关联值 "),v(d(C),{class:"relation-width",disabled:"",value:a.relationField,"onUpdate:value":e=>a.relationField=e},null,8,["value","onUpdate:value"]),u("span",{class:"relation-width blue relation-btn",onClick:e=>{return l=a,t=i,Ae.value=t,Ve.value=l.quote_con,Qe.value=l.relationFieldList,void(Ne.value=!0);var l,t}},[r(" 1.1.1.1.6点击设置过滤条件 "),g(f("点击设置过滤条件"))],8,se)],512),[[y,a.showRelation]]),r(" 年龄 "),a.showRangeAge?(n(),o("div",de,[v(S,{disabled:a.isIllegalField,format:a.format,defaultValue:{start_val:a.start_val,end_val:a.end_val},onChange:e=>function(e,l){let a=e.star_val,i=e.end_val;l.start_val=isNaN(a)?void 0:a,l.end_val=isNaN(i)?void 0:i}(e,a)},null,8,["disabled","format","defaultValue","onChange"])])):r("v-if",!0),a.showAgeCom?(n(),o("div",ue,[v(T,{disabled:a.isIllegalField,format:a.format,onChange:e=>function(e,l){l.value=isNaN(e.days)?void 0:e.days}(e,a),value:a.ageValue},null,8,["disabled","format","onChange","value"])])):r("v-if",!0)],2),[[y,gl(a)]]),a.field_key&&!d(We).includes(a.field_key)?(n(),o("span",re,"检测到该筛选字段是非法无效的,请移除!")):r("v-if",!0),r(" 1.1.1.3.3删除 "),u("div",ve,[v(d(F),{title:"删除",trigger:"hover"},{trigger:h((()=>[e.isSee?r("v-if",!0):_((n(),m(d(N),{key:0,onClick:e=>function(e){he.isSee||Pe.value.splice(e,1)}(i),"class-name":"svg-icon-btn is-danger form-action","icon-class":"xitongtubiaoliebiaocaozuoanniushanchushixin"},null,8,["onClick"])),[[y,d($e)]])])),default:h((()=>[g(" 删除 ")])),_:2},1024)])])))),128))],2)):r("v-if",!0),"custom"!==Le.value||e.isOnlyCondition?r("v-if",!0):(n(),o("div",ce,[_(u("div",pe,[g(f("筛选器逻辑编辑,不设置默认为AND")+" "),fe,g(" 例子 (1 AND 2) OR 3 ")],512),[[y,!d(Xe)]]),u("div",null,[r(" 没啥用撑布局而已 "),d(Xe)?(n(),o("span",me,f(1)+"   ")):r("v-if",!0),v(d(C),{class:"teavalue-wrap",type:"textarea",value:Ee.value,"onUpdate:value":a[3]||(a[3]=e=>Ee.value=e),placeholder:d(Xe)?"筛选条件表达式,不设置默认为AND,例子(1 AND 2) OR 3":"",rows:d(Xe)?1:3},null,8,["value","placeholder","rows"])])]))])],2))}}),[["__file","SearchCondition.vue"]]);export{_e as default};