cnhis-design-vue 2.1.78 → 2.1.80

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 (598) hide show
  1. package/.prettierrc.js +27 -27
  2. package/CHANGELOG.md +2953 -2911
  3. package/README.md +90 -90
  4. package/commitlint.config.js +1 -1
  5. package/es/affix/index.js +8 -8
  6. package/es/age/index.js +18 -18
  7. package/es/alert/index.js +8 -8
  8. package/es/anchor/index.js +8 -8
  9. package/es/auto-complete/index.js +8 -8
  10. package/es/avatar/index.js +8 -8
  11. package/es/back-top/index.js +8 -8
  12. package/es/badge/index.js +8 -8
  13. package/es/base/index.js +8 -8
  14. package/es/big-table/index.js +358 -338
  15. package/es/big-table/style.css +1 -1
  16. package/es/breadcrumb/index.js +8 -8
  17. package/es/button/index.js +31 -31
  18. package/es/calendar/index.js +8 -8
  19. package/es/captcha/index.js +7 -7
  20. package/es/card/index.js +8 -8
  21. package/es/carousel/index.js +8 -8
  22. package/es/cascader/index.js +8 -8
  23. package/es/checkbox/index.js +17 -17
  24. package/es/col/index.js +8 -8
  25. package/es/collapse/index.js +8 -8
  26. package/es/color-picker/index.js +5 -5
  27. package/es/comment/index.js +8 -8
  28. package/es/config-provider/index.js +8 -8
  29. package/es/date-picker/index.js +30 -30
  30. package/es/descriptions/index.js +8 -8
  31. package/es/divider/index.js +8 -8
  32. package/es/drag-layout/index.js +5 -5
  33. package/es/drawer/index.js +8 -8
  34. package/es/dropdown/index.js +8 -8
  35. package/es/editor/index.js +1 -1
  36. package/es/ellipsis/index.js +1 -1
  37. package/es/empty/index.js +8 -8
  38. package/es/fabric-chart/index.js +45 -45
  39. package/es/form/index.js +8 -8
  40. package/es/form-model/index.js +8 -8
  41. package/es/form-table/index.js +144 -144
  42. package/es/grid/index.js +4 -4
  43. package/es/index/index.js +3657 -2281
  44. package/es/index/style.css +1 -1
  45. package/es/input/index.js +11 -11
  46. package/es/input-number/index.js +8 -8
  47. package/es/keep-cache/index.js +9 -9
  48. package/es/layout/index.js +8 -8
  49. package/es/list/index.js +8 -8
  50. package/es/locale-provider/index.js +8 -8
  51. package/es/map/index.js +13 -13
  52. package/es/mentions/index.js +8 -8
  53. package/es/menu/index.js +8 -8
  54. package/es/message/index.js +8 -8
  55. package/es/multi-chat/index.js +117 -117
  56. package/es/multi-chat-client/index.js +111 -111
  57. package/es/multi-chat-history/index.js +6 -6
  58. package/es/multi-chat-record/index.js +27 -27
  59. package/es/multi-chat-setting/index.js +43 -43
  60. package/es/multi-chat-sip/index.js +1 -1
  61. package/es/notification/index.js +8 -8
  62. package/es/page-header/index.js +8 -8
  63. package/es/pagination/index.js +8 -8
  64. package/es/popconfirm/index.js +8 -8
  65. package/es/popover/index.js +8 -8
  66. package/es/progress/index.js +8 -8
  67. package/es/radio/index.js +17 -17
  68. package/es/rate/index.js +8 -8
  69. package/es/result/index.js +8 -8
  70. package/es/row/index.js +8 -8
  71. package/es/scale-container/index.js +1 -1
  72. package/es/scale-view/index.js +200 -198
  73. package/es/scale-view/style.css +1 -1
  74. package/es/select/index.js +44 -44
  75. package/es/select-label/index.js +75 -73
  76. package/es/select-label/style.css +1 -1
  77. package/es/select-person/index.js +45 -41
  78. package/es/select-person/style.css +1 -1
  79. package/es/shortcut-setter/index.js +10 -10
  80. package/es/skeleton/index.js +8 -8
  81. package/es/slider/index.js +8 -8
  82. package/es/space/index.js +8 -8
  83. package/es/spin/index.js +8 -8
  84. package/es/statistic/index.js +8 -8
  85. package/es/steps/index.js +8 -8
  86. package/es/switch/index.js +8 -8
  87. package/es/table-filter/index.js +2697 -1347
  88. package/es/table-filter/style.css +1 -1
  89. package/es/tabs/index.js +8 -8
  90. package/es/tag/index.js +9 -9
  91. package/es/time-picker/index.js +8 -8
  92. package/es/timeline/index.js +8 -8
  93. package/es/tooltip/index.js +8 -8
  94. package/es/transfer/index.js +8 -8
  95. package/es/tree/index.js +8 -8
  96. package/es/tree-select/index.js +8 -8
  97. package/es/upload/index.js +8 -8
  98. package/es/utils/clickoutside.js +7 -7
  99. package/es/utils/kty.min-1.0.0.js +5 -5
  100. package/es/utils/time-domain.js +16 -16
  101. package/es/utils/utils-map.js +32 -32
  102. package/es/utils/vexutils.js +27 -27
  103. package/es/verification-code/index.js +2 -2
  104. package/lib/cui.common.js +11438 -9918
  105. package/lib/cui.umd.js +11438 -9918
  106. package/lib/cui.umd.min.js +69 -69
  107. package/package.json +110 -110
  108. package/packages/affix/index.js +12 -12
  109. package/packages/affix/src/Affix.jsx +12 -12
  110. package/packages/age/index.js +27 -27
  111. package/packages/age/src/age/index.vue +139 -139
  112. package/packages/age/src/age-com/index.vue +209 -209
  113. package/packages/alert/index.js +12 -12
  114. package/packages/alert/src/Alert.jsx +11 -11
  115. package/packages/anchor/index.js +18 -18
  116. package/packages/anchor/src/Anchor.jsx +11 -11
  117. package/packages/anchor/src/Link.jsx +11 -11
  118. package/packages/auto-complete/index.js +12 -12
  119. package/packages/auto-complete/src/AutoComplete.jsx +12 -12
  120. package/packages/avatar/index.js +12 -12
  121. package/packages/avatar/src/Avatar.jsx +11 -11
  122. package/packages/back-top/index.js +12 -12
  123. package/packages/back-top/src/BackTop.jsx +11 -11
  124. package/packages/badge/index.js +12 -12
  125. package/packages/badge/src/Badge.jsx +11 -11
  126. package/packages/base/index.js +3 -3
  127. package/packages/big-table/index.js +16 -16
  128. package/packages/big-table/src/BigTable.vue +3205 -3193
  129. package/packages/big-table/src/Fieldset.vue +2067 -2067
  130. package/packages/big-table/src/assets/iconfont/iconfont.css +21 -21
  131. package/packages/big-table/src/assets/style/table-base.less +390 -387
  132. package/packages/big-table/src/assets/style/table-global.less +175 -175
  133. package/packages/big-table/src/components/AutoLayoutButton.vue +307 -307
  134. package/packages/big-table/src/components/NoData.vue +81 -81
  135. package/packages/big-table/src/components/TextOverTooltip.vue +120 -120
  136. package/packages/big-table/src/components/edit-form/EditForm.vue +509 -509
  137. package/packages/big-table/src/components/edit-form/edit-component/config-data/index.js +68 -68
  138. package/packages/big-table/src/components/edit-form/edit-component/edit-date-picker/edit-date-picker.vue +60 -60
  139. package/packages/big-table/src/components/edit-form/edit-component/edit-digital/edit-digital.vue +54 -54
  140. package/packages/big-table/src/components/edit-form/edit-component/edit-input/edit-input.vue +39 -39
  141. package/packages/big-table/src/components/edit-form/edit-component/edit-input-password/edit-input-password.vue +79 -79
  142. package/packages/big-table/src/components/edit-form/edit-component/edit-month-picker/edit-month-picker.vue +37 -37
  143. package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +82 -82
  144. package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +95 -95
  145. package/packages/big-table/src/components/edit-form/edit-component/edit-select/edit-select.vue +40 -40
  146. package/packages/big-table/src/components/edit-form/edit-component/edit-select-multiple/edit-select-multiple.vue +55 -55
  147. package/packages/big-table/src/components/edit-form/edit-component/edit-switch/edit-switch.vue +43 -43
  148. package/packages/big-table/src/components/edit-form/edit-component/edit-textarea/edit-textarea.vue +41 -41
  149. package/packages/big-table/src/components/edit-form/edit-component/edit-time-picker/edit-time-picker.vue +40 -40
  150. package/packages/big-table/src/components/edit-form/edit-component/mixins/bound-date.js +3 -3
  151. package/packages/big-table/src/components/edit-form/edit-component/mixins/dateType.js +217 -217
  152. package/packages/big-table/src/components/edit-form/edit-component/mixins/item-default.js +639 -639
  153. package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +1247 -1247
  154. package/packages/big-table/src/components/edit-form/edit-component/register-com.js +26 -26
  155. package/packages/big-table/src/components/edit-form/edit-item/form-event.js +80 -80
  156. package/packages/big-table/src/components/edit-form/edit-item/global-props.js +33 -33
  157. package/packages/big-table/src/components/edit-form/edit-item/index.js +4 -4
  158. package/packages/big-table/src/components/edit-form/edit-item/render-methods.js +28 -28
  159. package/packages/big-table/src/components/edit-form/edit-item/validate-rules.js +463 -463
  160. package/packages/big-table/src/components/edit-form/edit-mixins/form-commom.js +673 -673
  161. package/packages/big-table/src/components/edit-form/edit-mixins/index.js +3 -3
  162. package/packages/big-table/src/components/edit-form/edit-utils/index.js +112 -112
  163. package/packages/big-table/src/components/password-com.vue +58 -58
  164. package/packages/big-table/src/components/player-vod/index.vue +57 -57
  165. package/packages/big-table/src/components/player-vod/player.vue +193 -193
  166. package/packages/big-table/src/components/player-vod/video-list.vue +265 -265
  167. package/packages/big-table/src/components/player-vod/video-modal.vue +126 -126
  168. package/packages/big-table/src/utils/CustomPagination.vue +86 -86
  169. package/packages/big-table/src/utils/batchEditing.js +610 -610
  170. package/packages/big-table/src/utils/bigTableProps.js +108 -108
  171. package/packages/big-table/src/utils/eventBroadcast.js +24 -24
  172. package/packages/big-table/src/utils/format.js +557 -557
  173. package/packages/big-table/src/utils/nestTable.js +109 -109
  174. package/packages/big-table/src/utils/tableParse.js +234 -234
  175. package/packages/breadcrumb/index.js +21 -21
  176. package/packages/breadcrumb/src/Breadcrumb.jsx +11 -11
  177. package/packages/breadcrumb/src/BreadcrumbItem.jsx +11 -11
  178. package/packages/breadcrumb/src/BreadcrumbSeparator.jsx +11 -11
  179. package/packages/button/index.js +21 -21
  180. package/packages/button/src/Button.jsx +11 -11
  181. package/packages/button/src/ButtonGroup.jsx +11 -11
  182. package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +181 -181
  183. package/packages/button/src/ButtonPrint/index.vue +766 -766
  184. package/packages/button/src/ButtonPrint/mixin/his-print.js +95 -95
  185. package/packages/calendar/index.js +12 -12
  186. package/packages/calendar/src/Calendar.jsx +11 -11
  187. package/packages/captcha/index.js +9 -9
  188. package/packages/captcha/src/Captcha.vue +164 -164
  189. package/packages/captcha/src/Index.vue +47 -47
  190. package/packages/captcha/src/SlideVerify.vue +285 -285
  191. package/packages/card/index.js +21 -21
  192. package/packages/card/src/Card.jsx +12 -12
  193. package/packages/card/src/CardGrid.js +7 -7
  194. package/packages/card/src/CardMeta.js +7 -7
  195. package/packages/carousel/index.js +12 -12
  196. package/packages/carousel/src/Carousel.jsx +12 -12
  197. package/packages/cascader/index.js +12 -12
  198. package/packages/cascader/src/Cascader.jsx +11 -11
  199. package/packages/checkbox/index.js +30 -30
  200. package/packages/checkbox/src/Checkbox.jsx +11 -11
  201. package/packages/checkbox/src/CheckboxImg/index.vue +141 -141
  202. package/packages/checkbox/src/Group.jsx +11 -11
  203. package/packages/col/index.js +13 -13
  204. package/packages/col/src/Col.jsx +11 -11
  205. package/packages/collapse/index.js +18 -18
  206. package/packages/collapse/src/Collapse.jsx +11 -11
  207. package/packages/collapse/src/Panel.jsx +11 -11
  208. package/packages/color-picker/index.js +10 -10
  209. package/packages/color-picker/src/color-picker.vue +191 -191
  210. package/packages/color-picker/src/style.less +109 -109
  211. package/packages/comment/index.js +12 -12
  212. package/packages/comment/src/Comment.jsx +11 -11
  213. package/packages/config-provider/index.js +12 -12
  214. package/packages/config-provider/src/ConfigProvider.jsx +11 -11
  215. package/packages/date-picker/index.js +26 -26
  216. package/packages/date-picker/src/DatePicker.jsx +12 -12
  217. package/packages/date-picker/src/MonthPicker.jsx +11 -11
  218. package/packages/date-picker/src/RangePicker.jsx +11 -11
  219. package/packages/date-picker/src/WeekPicker.jsx +11 -11
  220. package/packages/date-picker/src/utils/index.js +374 -374
  221. package/packages/descriptions/index.js +18 -18
  222. package/packages/descriptions/src/Descriptions.jsx +11 -11
  223. package/packages/descriptions/src/Item.jsx +11 -11
  224. package/packages/divider/index.js +12 -12
  225. package/packages/divider/src/Divider.jsx +11 -11
  226. package/packages/drag-layout/DragFormLeftItem.vue +173 -173
  227. package/packages/drag-layout/DragFormRightItem.vue +284 -284
  228. package/packages/drag-layout/I18n-mixins.js +10 -10
  229. package/packages/drag-layout/drag-layout.vue +778 -778
  230. package/packages/drag-layout/index.js +12 -12
  231. package/packages/drawer/index.js +12 -12
  232. package/packages/drawer/src/Drawer.jsx +11 -11
  233. package/packages/dropdown/index.js +12 -12
  234. package/packages/dropdown/src/Dropdown.jsx +11 -11
  235. package/packages/editor/index.js +9 -9
  236. package/packages/ellipsis/index.js +8 -8
  237. package/packages/ellipsis/src/Ellipsis.vue +65 -65
  238. package/packages/empty/index.js +12 -12
  239. package/packages/empty/src/Empty.jsx +11 -11
  240. package/packages/fabric-chart/index.js +9 -9
  241. package/packages/fabric-chart/src/FabricGrid.vue +67 -67
  242. package/packages/fabric-chart/src/components/DropPopup.vue +90 -90
  243. package/packages/fabric-chart/src/components/MouseRightClick.vue +168 -168
  244. package/packages/fabric-chart/src/components/TimeScaleValue.vue +125 -125
  245. package/packages/fabric-chart/src/const/defaultVaule.js +60 -60
  246. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +617 -617
  247. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +1191 -1191
  248. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +139 -139
  249. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +651 -651
  250. package/packages/fabric-chart/src/mixins/fabricCommon.js +81 -81
  251. package/packages/fabric-chart/src/mixins/fabricObject.js +193 -193
  252. package/packages/fabric-chart/src/mixins/type.js +5 -5
  253. package/packages/fabric-chart/src/utils/bus.js +2 -2
  254. package/packages/form/index.js +16 -16
  255. package/packages/form/src/Form.jsx +11 -11
  256. package/packages/form/src/Item.jsx +11 -11
  257. package/packages/form-model/index.js +14 -14
  258. package/packages/form-model/src/FormModel.jsx +11 -11
  259. package/packages/form-model/src/Item.jsx +11 -11
  260. package/packages/form-table/index.js +16 -16
  261. package/packages/form-table/src/FormTable.vue +1110 -1110
  262. package/packages/form-table/src/components/table-component/config-data/index.js +80 -80
  263. package/packages/form-table/src/components/table-component/global-props.js +22 -22
  264. package/packages/form-table/src/components/table-component/index.js +8 -8
  265. package/packages/form-table/src/components/table-component/mixins/bound-date.js +455 -455
  266. package/packages/form-table/src/components/table-component/mixins/dateType.js +217 -217
  267. package/packages/form-table/src/components/table-component/mixins/item-default.js +257 -257
  268. package/packages/form-table/src/components/table-component/mixins/search.js +1242 -1242
  269. package/packages/form-table/src/components/table-component/register-com.js +30 -30
  270. package/packages/form-table/src/components/table-component/table-age/table-age.vue +175 -175
  271. package/packages/form-table/src/components/table-component/table-date-picker/table-date-picker.vue +87 -87
  272. package/packages/form-table/src/components/table-component/table-digital/table-digital.vue +93 -93
  273. package/packages/form-table/src/components/table-component/table-input/table-input.vue +81 -81
  274. package/packages/form-table/src/components/table-component/table-input-password/table-input-password.vue +126 -126
  275. package/packages/form-table/src/components/table-component/table-month-picker/table-month-picker.vue +55 -55
  276. package/packages/form-table/src/components/table-component/table-search/table-search.vue +174 -174
  277. package/packages/form-table/src/components/table-component/table-search-more/table-search-more.vue +191 -191
  278. package/packages/form-table/src/components/table-component/table-select/table-select.vue +64 -64
  279. package/packages/form-table/src/components/table-component/table-select-multiple/table-select-multiple.vue +81 -81
  280. package/packages/form-table/src/components/table-component/table-textarea/table-textarea.vue +76 -76
  281. package/packages/form-table/src/components/table-component/table-time-picker/table-time-picker.vue +55 -55
  282. package/packages/form-table/src/components/table-component/table-tree-select/table-tree-select.vue +135 -135
  283. package/packages/form-table/src/components/table-component/text-over-tooltip/TextOverTooltip.vue +97 -97
  284. package/packages/form-table/src/components/table-item/form-event.js +81 -81
  285. package/packages/form-table/src/components/table-item/global-props.js +27 -27
  286. package/packages/form-table/src/components/table-item/index.js +4 -4
  287. package/packages/form-table/src/components/table-item/render-methods.js +28 -28
  288. package/packages/form-table/src/components/table-item/validate-rules.js +520 -520
  289. package/packages/form-table/src/components/table-mixins/form-commom.js +98 -98
  290. package/packages/form-table/src/components/table-mixins/index.js +3 -3
  291. package/packages/form-table/src/components/table-utils/index.js +112 -112
  292. package/packages/form-table/src/disabledDetail.less +46 -46
  293. package/packages/grid/index.js +10 -10
  294. package/packages/grid/src/grid.js +28 -28
  295. package/packages/icon/index.js +10 -10
  296. package/packages/icon/src/icon.js +13 -13
  297. package/packages/index.js +313 -313
  298. package/packages/input/index.js +30 -30
  299. package/packages/input/src/Group.jsx +11 -11
  300. package/packages/input/src/Input.jsx +11 -11
  301. package/packages/input/src/Password.jsx +11 -11
  302. package/packages/input/src/Search.jsx +11 -11
  303. package/packages/input/src/TextArea.jsx +11 -11
  304. package/packages/input/src/input-quick/components/quick-item.vue +284 -284
  305. package/packages/input/src/input-quick/components/quick-popover.vue +596 -596
  306. package/packages/input/src/input-quick/index.vue +137 -137
  307. package/packages/input-number/index.js +12 -12
  308. package/packages/input-number/src/InputNumber.jsx +11 -11
  309. package/packages/keep-cache/KeepCache.js +236 -236
  310. package/packages/keep-cache/index.css +2 -2
  311. package/packages/keep-cache/index.js +8 -8
  312. package/packages/layout/index.js +27 -27
  313. package/packages/layout/src/Content.jsx +11 -11
  314. package/packages/layout/src/Footer.jsx +11 -11
  315. package/packages/layout/src/Header.jsx +11 -11
  316. package/packages/layout/src/Layout.jsx +11 -11
  317. package/packages/layout/src/Sider.jsx +11 -11
  318. package/packages/list/index.js +21 -21
  319. package/packages/list/src/Item.jsx +11 -11
  320. package/packages/list/src/ItemMeta.jsx +11 -11
  321. package/packages/list/src/List.jsx +11 -11
  322. package/packages/locale-provider/index.js +12 -12
  323. package/packages/locale-provider/src/LocaleProvider.jsx +11 -11
  324. package/packages/map/index.js +9 -9
  325. package/packages/map/src/Map.vue +484 -484
  326. package/packages/map/src/popup-map.vue +53 -53
  327. package/packages/mentions/index.js +18 -18
  328. package/packages/mentions/src/Mentions.jsx +11 -11
  329. package/packages/mentions/src/Option.jsx +11 -11
  330. package/packages/menu/index.js +27 -27
  331. package/packages/menu/src/Divider.jsx +11 -11
  332. package/packages/menu/src/Item.jsx +11 -11
  333. package/packages/menu/src/ItemGroup.jsx +11 -11
  334. package/packages/menu/src/Menu.jsx +11 -11
  335. package/packages/menu/src/SubMenu.jsx +11 -11
  336. package/packages/message/index.js +8 -8
  337. package/packages/modal/index.js +10 -10
  338. package/packages/modal/src/Modal.js +7 -7
  339. package/packages/multi-chat/chat/addConference.vue +200 -200
  340. package/packages/multi-chat/chat/addMembers.vue +411 -411
  341. package/packages/multi-chat/chat/advancedFilter.vue +372 -372
  342. package/packages/multi-chat/chat/calling.vue +246 -246
  343. package/packages/multi-chat/chat/chatFooter.vue +1647 -1647
  344. package/packages/multi-chat/chat/chatHistory.vue +605 -605
  345. package/packages/multi-chat/chat/chatMain.vue +1490 -1490
  346. package/packages/multi-chat/chat/client/index.vue +149 -149
  347. package/packages/multi-chat/chat/delay.vue +177 -177
  348. package/packages/multi-chat/chat/evaluate.vue +343 -343
  349. package/packages/multi-chat/chat/messageRecord.vue +324 -324
  350. package/packages/multi-chat/chat/mixins/NoData.js +20 -20
  351. package/packages/multi-chat/chat/mixins/base.js +97 -97
  352. package/packages/multi-chat/chat/mixins/uniRTCAPI.js +80 -80
  353. package/packages/multi-chat/chat/mixins/viewerOptions.js +67 -67
  354. package/packages/multi-chat/chat/quickReply.vue +439 -439
  355. package/packages/multi-chat/chat/robot/index.vue +312 -312
  356. package/packages/multi-chat/chat/scrollList.vue +1259 -1259
  357. package/packages/multi-chat/chat/videoVoiceList.vue +348 -348
  358. package/packages/multi-chat/chat/voice.vue +431 -431
  359. package/packages/multi-chat/components/avatar.vue +113 -113
  360. package/packages/multi-chat/components/chat-tabs-header.vue +251 -251
  361. package/packages/multi-chat/components/classify-tabs.vue +185 -185
  362. package/packages/multi-chat/components/empty.vue +24 -24
  363. package/packages/multi-chat/components/modal-refuse-reason.vue +112 -112
  364. package/packages/multi-chat/components/modal-sip.vue +160 -160
  365. package/packages/multi-chat/components/modal-user-transfer.vue +98 -98
  366. package/packages/multi-chat/components/msg-describe.vue +138 -138
  367. package/packages/multi-chat/components/msg-picture.vue +68 -68
  368. package/packages/multi-chat/components/msg-prescription.vue +205 -205
  369. package/packages/multi-chat/components/read-record.vue +133 -133
  370. package/packages/multi-chat/components/read-status.vue +34 -34
  371. package/packages/multi-chat/components/user-status.vue +198 -198
  372. package/packages/multi-chat/components/vuecmf-dialog.vue +322 -322
  373. package/packages/multi-chat/index.js +7 -7
  374. package/packages/multi-chat/setting/authority/index.vue +156 -156
  375. package/packages/multi-chat/setting/authority/roleSetting.vue +204 -204
  376. package/packages/multi-chat/setting/baseInfo/index.vue +1343 -1343
  377. package/packages/multi-chat/setting/customerService/batchSelect.vue +403 -403
  378. package/packages/multi-chat/setting/customerService/index.vue +273 -273
  379. package/packages/multi-chat/setting/event/edit/condition.vue +128 -128
  380. package/packages/multi-chat/setting/event/edit/index.vue +437 -437
  381. package/packages/multi-chat/setting/event/edit/notice.vue +129 -129
  382. package/packages/multi-chat/setting/event/edit/strategy.vue +98 -98
  383. package/packages/multi-chat/setting/event/index.vue +249 -249
  384. package/packages/multi-chat/setting/index.vue +269 -269
  385. package/packages/multi-chat/setting/page.vue +14 -14
  386. package/packages/multi-chat/setting/sessionList/index.vue +412 -412
  387. package/packages/multi-chat/setting/sessionList/messageRecord.vue +372 -372
  388. package/packages/multi-chat/setting/userConfig/index.vue +124 -124
  389. package/packages/multi-chat/setting/worktime/index.vue +274 -274
  390. package/packages/multi-chat/store/actions.js +452 -452
  391. package/packages/multi-chat/store/getters.js +380 -380
  392. package/packages/multi-chat/store/helper.js +66 -66
  393. package/packages/multi-chat/store/index.js +50 -50
  394. package/packages/multi-chat/store/mutation.js +305 -305
  395. package/packages/multi-chat/store/state.js +120 -120
  396. package/packages/multi-chat/style/emoji.css +315 -315
  397. package/packages/multi-chat/style/message.mixin.less +38 -38
  398. package/packages/multi-chat/utils/chatSock.js +93 -93
  399. package/packages/multi-chat/utils/compressImage.js +115 -115
  400. package/packages/multi-chat/utils/emoji.json +68 -68
  401. package/packages/multi-chat/utils/index.js +259 -259
  402. package/packages/multi-chat/utils/observer-scroll.js +49 -49
  403. package/packages/multi-chat/utils/panelsetting.js +48 -48
  404. package/packages/multi-chat-client/index.js +7 -7
  405. package/packages/multi-chat-history/index.js +7 -7
  406. package/packages/multi-chat-record/index.js +7 -7
  407. package/packages/multi-chat-setting/index.js +7 -7
  408. package/packages/multi-chat-sip/index.js +6 -6
  409. package/packages/notification/index.js +8 -8
  410. package/packages/page-header/index.js +12 -12
  411. package/packages/page-header/src/PageHeader.jsx +11 -11
  412. package/packages/pagination/index.js +12 -12
  413. package/packages/pagination/src/Pagination.jsx +11 -11
  414. package/packages/popconfirm/index.js +12 -12
  415. package/packages/popconfirm/src/Popconfirm.jsx +11 -11
  416. package/packages/popover/index.js +12 -12
  417. package/packages/popover/src/Popover.jsx +11 -11
  418. package/packages/progress/index.js +12 -12
  419. package/packages/progress/src/Progress.jsx +11 -11
  420. package/packages/radio/index.js +33 -33
  421. package/packages/radio/src/Group.jsx +11 -11
  422. package/packages/radio/src/Radio.jsx +11 -11
  423. package/packages/radio/src/RadioButton.jsx +11 -11
  424. package/packages/radio/src/RadioImg/index.vue +124 -124
  425. package/packages/rate/index.js +12 -12
  426. package/packages/rate/src/Rate.jsx +11 -11
  427. package/packages/result/index.js +12 -12
  428. package/packages/result/src/Result.jsx +11 -11
  429. package/packages/row/index.js +12 -12
  430. package/packages/row/src/Row.jsx +11 -11
  431. package/packages/scale-container/index.js +8 -8
  432. package/packages/scale-container/src/ScaleContainer.vue +197 -197
  433. package/packages/scale-view/NoData.vue +81 -81
  434. package/packages/scale-view/answerParse.vue +133 -133
  435. package/packages/scale-view/customList.vue +801 -801
  436. package/packages/scale-view/data.js +80 -80
  437. package/packages/scale-view/evaluateCountdown.vue +155 -155
  438. package/packages/scale-view/evaluatePage.vue +202 -202
  439. package/packages/scale-view/formitem/data.js +3991 -3991
  440. package/packages/scale-view/formitem/index.js +7 -7
  441. package/packages/scale-view/formitem/r-address.vue +245 -245
  442. package/packages/scale-view/formitem/r-choice.vue +746 -746
  443. package/packages/scale-view/formitem/r-input.vue +93 -93
  444. package/packages/scale-view/formitem/r-prompt.vue +52 -52
  445. package/packages/scale-view/formitem/r-sign.vue +218 -218
  446. package/packages/scale-view/formitem/r-time.vue +285 -285
  447. package/packages/scale-view/formitem/r-upload-custom-list.vue +242 -242
  448. package/packages/scale-view/formitem/r-upload.vue +287 -287
  449. package/packages/scale-view/formitem/sign-com.vue +316 -316
  450. package/packages/scale-view/formitem/text-over-tooltip/TextOverTooltip.vue +98 -98
  451. package/packages/scale-view/index.js +17 -17
  452. package/packages/scale-view/mixin/NoData.js +38 -38
  453. package/packages/scale-view/mixin/addressVal.js +156 -156
  454. package/packages/scale-view/mixin/evaluate.js +146 -146
  455. package/packages/scale-view/mixin/index.js +337 -337
  456. package/packages/scale-view/mixin/judgeTypes.js +267 -267
  457. package/packages/scale-view/scaleView.vue +2017 -2017
  458. package/packages/select/index.js +27 -27
  459. package/packages/select/src/CustomSelect/index.vue +130 -130
  460. package/packages/select/src/OptGroup.jsx +11 -11
  461. package/packages/select/src/Option.jsx +11 -11
  462. package/packages/select/src/Select/Select.vue +231 -231
  463. package/packages/select/src/Select/index.js +12 -12
  464. package/packages/select/src/TableSelect/index.vue +514 -514
  465. package/packages/select-label/index.js +14 -14
  466. package/packages/select-label/label-classify.vue +129 -129
  467. package/packages/select-label/labelFormContent.vue +787 -787
  468. package/packages/select-label/select-label.vue +597 -581
  469. package/packages/select-person/index.js +10 -10
  470. package/packages/select-person/search-tree.vue +373 -373
  471. package/packages/select-person/select-person.vue +1703 -1696
  472. package/packages/shortcut-setter/index.js +12 -12
  473. package/packages/shortcut-setter/src/ShortcutSetter.vue +55 -55
  474. package/packages/shortcut-setter/src/ShortcutSetterItem.vue +85 -85
  475. package/packages/shortcut-setter/src/utils/index.js +63 -63
  476. package/packages/skeleton/index.js +12 -12
  477. package/packages/skeleton/src/Skeleton.jsx +11 -11
  478. package/packages/slider/index.js +12 -12
  479. package/packages/slider/src/Slider.jsx +11 -11
  480. package/packages/space/index.js +12 -12
  481. package/packages/space/src/Space.jsx +11 -11
  482. package/packages/spin/index.js +12 -12
  483. package/packages/spin/src/Spin.jsx +11 -11
  484. package/packages/statistic/index.js +18 -18
  485. package/packages/statistic/src/Countdown.jsx +11 -11
  486. package/packages/statistic/src/Statistic.jsx +11 -11
  487. package/packages/steps/index.js +18 -18
  488. package/packages/steps/src/Step.jsx +11 -11
  489. package/packages/steps/src/Steps.jsx +11 -11
  490. package/packages/switch/index.js +12 -12
  491. package/packages/switch/src/Switch.jsx +11 -11
  492. package/packages/table-filter/index.js +27 -27
  493. package/packages/table-filter/src/base-search-com/BaseSearch.vue +2622 -2630
  494. package/packages/table-filter/src/classification/Classification-com.vue +1760 -1760
  495. package/packages/table-filter/src/classification/search-class-name.vue +266 -266
  496. package/packages/table-filter/src/classification/search-professional-model.vue +680 -680
  497. package/packages/table-filter/src/components/TextOverTooltip.vue +120 -107
  498. package/packages/table-filter/src/components/age-com/index.vue +205 -205
  499. package/packages/table-filter/src/components/button-group/ButtonGroup.vue +162 -162
  500. package/packages/table-filter/src/components/button-icon/button-icon.js +33 -33
  501. package/packages/table-filter/src/components/button-icon/getBtnIcon.js +34 -34
  502. package/packages/table-filter/src/components/c-tree-select/tree-select.vue +336 -336
  503. package/packages/table-filter/src/components/checkbox-group/CheckboxGroup.vue +53 -0
  504. package/packages/table-filter/src/components/drop-button/drop-button.vue +224 -224
  505. package/packages/table-filter/src/components/drop-button/head-btn-icon.js +33 -33
  506. package/packages/table-filter/src/components/drop-view/drop-view.vue +89 -89
  507. package/packages/table-filter/src/components/multi-select/multi-select.vue +242 -236
  508. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +232 -346
  509. package/packages/table-filter/src/components/range-age/index.vue +171 -172
  510. package/packages/table-filter/src/components/render-widget/components/CheckboxGroup.vue +51 -51
  511. package/packages/table-filter/src/components/render-widget/components/DateRangeQuick.vue +212 -0
  512. package/packages/table-filter/src/components/render-widget/components/NumberRange.vue +145 -0
  513. package/packages/table-filter/src/components/render-widget/components/Select.vue +50 -50
  514. package/packages/table-filter/src/components/render-widget/components/SelectDynamic.vue +304 -0
  515. package/packages/table-filter/src/components/render-widget/components/index.js +7 -7
  516. package/packages/table-filter/src/components/render-widget/enums.js +34 -29
  517. package/packages/table-filter/src/components/render-widget/index.vue +124 -91
  518. package/packages/table-filter/src/components/render-widget/mixins/dynamic-method.js +158 -0
  519. package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +245 -140
  520. package/packages/table-filter/src/components/search-condition/SearchCondition.vue +1907 -1907
  521. package/packages/table-filter/src/components/search-condition/fieldTypeList.js +169 -169
  522. package/packages/table-filter/src/components/search-filter/SearchFilter.vue +280 -278
  523. package/packages/table-filter/src/components/search-modal/set-classification.vue +336 -336
  524. package/packages/table-filter/src/components/table-modal/TableModal.vue +477 -477
  525. package/packages/table-filter/src/const/dataOptions.js +43 -43
  526. package/packages/table-filter/src/const/index.js +1 -1
  527. package/packages/table-filter/src/index.vue +584 -584
  528. package/packages/table-filter/src/mixins/mixins.js +773 -714
  529. package/packages/table-filter/src/mixins/out-quick-method.js +123 -0
  530. package/packages/table-filter/src/mixins/renderWidget.js +97 -89
  531. package/packages/table-filter/src/mixins/tableSearchCon.js +128 -128
  532. package/packages/table-filter/src/mixins/wordBookutils.js +113 -113
  533. package/packages/table-filter/src/quick-search/QuickSearch.vue +2190 -2167
  534. package/packages/tabs/index.js +18 -18
  535. package/packages/tabs/src/TabPane.jsx +11 -11
  536. package/packages/tabs/src/Tabs.jsx +11 -11
  537. package/packages/tag/index.js +21 -21
  538. package/packages/tag/src/CheckableTag.jsx +11 -11
  539. package/packages/tag/src/Tag.jsx +11 -11
  540. package/packages/tag/src/TagGroup.vue +621 -621
  541. package/packages/time-picker/index.js +12 -12
  542. package/packages/time-picker/src/TimePicker.jsx +11 -11
  543. package/packages/timeline/index.js +14 -14
  544. package/packages/timeline/src/Item.jsx +11 -11
  545. package/packages/timeline/src/Timeline.jsx +11 -11
  546. package/packages/tooltip/index.js +12 -12
  547. package/packages/tooltip/src/Tooltip.jsx +11 -11
  548. package/packages/transfer/index.js +12 -12
  549. package/packages/transfer/src/Transfer.jsx +11 -11
  550. package/packages/tree/index.js +18 -18
  551. package/packages/tree/src/Tree.jsx +11 -11
  552. package/packages/tree/src/TreeNode.jsx +11 -11
  553. package/packages/tree-select/index.js +18 -18
  554. package/packages/tree-select/src/TreeNode.jsx +11 -11
  555. package/packages/tree-select/src/TreeSelect.jsx +11 -11
  556. package/packages/upload/chunk-upload/chunk-upload-new.vue +1001 -1001
  557. package/packages/upload/chunk-upload/vod-chunk-upload.vue +749 -749
  558. package/packages/upload/chunk-upload/vod-upload-modal.vue +100 -100
  559. package/packages/upload/index.js +12 -12
  560. package/packages/upload/src/Upload.jsx +11 -11
  561. package/packages/verification-code/SlideVerify.vue +306 -306
  562. package/packages/verification-code/index.js +17 -17
  563. package/packages/verification-code/verification-code.vue +147 -147
  564. package/src/component/player-vod/index.vue +57 -57
  565. package/src/component/player-vod/player.vue +192 -192
  566. package/src/component/player-vod/video-list.vue +262 -262
  567. package/src/component/player-vod/video-modal.vue +128 -128
  568. package/src/component/select-options/index.vue +430 -430
  569. package/src/component/select-pages/index.vue +95 -95
  570. package/src/component/svg/index.vue +59 -59
  571. package/src/core/create.js +6 -6
  572. package/src/core/event.js +23 -23
  573. package/src/core/table-methods.js +444 -444
  574. package/src/directive/flexibleResize.js +151 -151
  575. package/src/directive/preventReClick.js +12 -12
  576. package/src/directive/scroll.js +230 -230
  577. package/src/global/variable.js +2 -2
  578. package/src/style/normalize.css +424 -424
  579. package/src/style/style.less +49 -49
  580. package/src/utils/UniRTCv2.js +626 -626
  581. package/src/utils/chatFetch.js +61 -61
  582. package/src/utils/clickoutside.js +75 -75
  583. package/src/utils/crypto.js +25 -25
  584. package/src/utils/index.js +81 -81
  585. package/src/utils/kty-sdk.js +582 -582
  586. package/src/utils/kty.min-1.0.0.js +14378 -14378
  587. package/src/utils/sip-device.js +79 -79
  588. package/src/utils/time-domain.js +249 -249
  589. package/src/utils/trtc.js +1 -1
  590. package/src/utils/utils-map.js +485 -485
  591. package/src/utils/vexutils.js +836 -836
  592. package/.idea/cnhis-design-vue.iml +0 -12
  593. package/.idea/codeStyles/Project.xml +0 -57
  594. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  595. package/.idea/git_toolbox_prj.xml +0 -15
  596. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  597. package/.idea/modules.xml +0 -8
  598. package/.idea/vcs.xml +0 -6
@@ -1,2167 +1,2190 @@
1
-
2
- <template>
3
- <div>
4
- <div class="form-box" :class="{ 'quick-search-table': source === 'editTable' }">
5
- <p class="module-title" v-if="source === 'editTable' && hasRelationQuickSearch">高级筛选</p>
6
- <div
7
- class="quick-item"
8
- v-for="item in quickSearch"
9
- :key="item.sid"
10
- :class="{
11
- 'quick-block':
12
- item.con == 'DATE' || item.con == 'BIRTHDAY' || item.con == 'CONVERT' || item.LABELAttr || item._isBlock
13
- }"
14
- >
15
- <div class="quick-row">
16
- <!-- title -->
17
- <div
18
- class="quick-item-title"
19
- :class="{ 'quick-item-title-default': source !== 'editTable' }"
20
- >
21
- <span>{{ handleName(item, "title") }}&nbsp;&nbsp;</span>
22
- <a-tooltip
23
- v-if="searchFieldLimit[item.columnName] && searchFieldLimit[item.columnName].tips"
24
- :title="searchFieldLimit[item.columnName].tips"
25
- >
26
- <svg-icon icon-class="xitongtubiaodaohangtubiaowenti" />
27
- &nbsp;&nbsp;
28
- </a-tooltip>
29
- </div>
30
- <div class="quick-item-col" :class="{ 'quick-item-col-default': source !== 'editTable' }">
31
- <!-- 直接渲染组件 -->
32
- <RenderWidget v-if="item.isRender" :cfg="item" v-model="item.value" />
33
- <!-- age -->
34
- <!-- TODO: 清除,跨表 -->
35
- <div v-else-if="item.AGEAttr" class="age-container">
36
- <range-age
37
- :ref="`${item.columnName}_AGEAttr`"
38
- :format="item.format"
39
- @change="ageRangeOnChange($event, item)"
40
- ></range-age>
41
- </div>
42
- <!-- age -->
43
- <!-- label -->
44
- <div v-else-if="item.LABELAttr" class="label-attr-container">
45
- <slot v-if="item.labelObj && Object.keys(item.labelObj || {}).length > 0">
46
- <div v-for="(v, k) in item.labelObj" :key="k" class="edit-label-content">
47
- <div class="edit-label">{{ k }}:</div>
48
-
49
- <div
50
- class="edit-content quickSearch_label-container"
51
- :class="{
52
- 'label-container-height': !v.isUnfold && v.itemList && v.isShowBtn
53
- }"
54
- >
55
- <div class="label-content" v-resize="el => onResize(el, v)">
56
- <a-checkable-tag
57
- v-for="(v, i) in v.itemList"
58
- v-model="v.isSelect"
59
- @change="handleLabelChange($event, v, item)"
60
- :key="i"
61
- :style="handleLabelColor(v)"
62
- >
63
- <a-tooltip placement="topLeft">
64
- <template slot="title">
65
- <span>{{ v.labelName }}</span>
66
- </template>
67
- {{ v.labelName }}
68
- </a-tooltip>
69
- </a-checkable-tag>
70
- </div>
71
- </div>
72
- <div class="label-unfold-btn" v-if="v.itemList && v.isShowBtn">
73
- <!-- {{ v.isUnfold }} -->
74
- <span @click.stop="handleLabelUpfold(v)">
75
- <template v-if="v.isUnfold">
76
- <span>收起</span>
77
- <a-icon
78
- type="up-square"
79
-
80
- />
81
- </template>
82
- <template v-else>
83
- <span>展开</span>
84
- <a-icon
85
- type="down-square"
86
- />
87
- </template>
88
- </span>
89
- </div>
90
- </div>
91
- </slot>
92
- <a-input v-else style="width: 200px" v-model="item.inputVal" allowClear></a-input>
93
- </div>
94
- <!-- label -->
95
-
96
- <!-- EVALUATE -->
97
- <div v-else-if="item.EVALUATEAttr">
98
- <template v-for="tag in EVALUATEList">
99
- <a-checkable-tag
100
- :key="tag.value"
101
- :checked="item.selecteds.indexOf(tag.value) > -1"
102
- @change="checked => handleEvaluateOnChange(tag, checked, item)"
103
- >
104
- {{ tag.label }}
105
- </a-checkable-tag>
106
- </template>
107
- <!-- <a-icon v-if="item.CL" type="close" @click="item.CL = ''" /> -->
108
- </div>
109
- <!-- EVALUATE -->
110
-
111
- <!-- NUMBERFiled -->
112
- <div v-else-if="item.NUMBERFiled" class="ant-calendar-picker" style="width: 300px">
113
- <span
114
- class="ant-calendar-picker-input ant-input num-picker"
115
- :class="{ 'num-picker-unit': item.inputUnit }"
116
- >
117
- <input
118
- v-model="item.lessValue"
119
- @keyup.enter="() => changeFilterNumber(item)"
120
- :title="`起始${item.alias || item.title}`"
121
- :placeholder="`起始${item.alias || item.title}`"
122
- class="ant-calendar-range-picker-input"/>
123
- <span class="ant-calendar-range-picker-separator"> ~ &nbsp;</span>
124
- <input
125
- v-model="item.bigValue"
126
- :title="`截止${item.alias || item.title}`"
127
- @keyup.enter="() => changeFilterNumber(item)"
128
- :placeholder="`截止${item.alias || item.title}`"
129
- class="ant-calendar-range-picker-input"/>
130
- <template v-if="item.inputUnit">&nbsp;{{ item.inputUnit }}</template>
131
- <span
132
- class="ant-input-suffix clear-number-icon"
133
- v-if="item.lessValue || item.bigValue"
134
- @click="clearFilterNumber(item)"
135
- ><i
136
- aria-label="图标: close-circle"
137
- tabindex="-1"
138
- class="anticon anticon-close-circle ant-input-clear-icon"
139
- ><svg
140
- viewBox="64 64 896 896"
141
- data-icon="close-circle"
142
- width="1em"
143
- height="1em"
144
- fill="currentColor"
145
- aria-hidden="true"
146
- focusable="false"
147
- class=""
148
- >
149
- <path
150
- d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
151
- ></path></svg></i></span
152
- ></span>
153
- </div>
154
- <!-- NUMBERFiled -->
155
-
156
- <!-- other -->
157
- <slot v-else>
158
- <template v-if="item.con == 'CL'">
159
- <template v-if="showPercent(item)">
160
- <a-input-number
161
- class="CL-input"
162
- :style="`width: ${getEleWidth(item)}`"
163
- v-model="item.CL"
164
- :min="0"
165
- :max="100"
166
- allowClear
167
- :placeholder="item.placeholder"
168
- />
169
- </template>
170
- <template v-else>
171
- <a-input
172
- class="CL-input"
173
- :style="{
174
- width: `${getEleWidth(item)}`,
175
- 'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
176
- }"
177
- v-model="item.CL"
178
- :class="{ 'psw-icon': item.comAttr == 'PASSWORD' }"
179
- allowClear
180
- :placeholder="item.placeholder"
181
- >
182
- <template slot="suffix" v-if="item.comAttr == 'PASSWORD'">
183
- <svg-icon
184
- class="psw-icon"
185
- @click="item.PASSWORDTYPE = !item.PASSWORDTYPE"
186
- :icon-class="item.PASSWORDTYPE ? 'anniuyincang' : 'chakan'"
187
- style="font-size: 1em;"
188
- />
189
- </template>
190
- </a-input>
191
- </template>
192
- </template>
193
- <template v-if="item.con == 'EQ'">
194
- <template v-if="showPercent(item)">
195
- <a-input-number
196
- class="EQ-input"
197
- :style="`width: ${getEleWidth(item)}`"
198
- v-model="item.EQ"
199
- :min="0"
200
- :max="100"
201
- allowClear
202
- :placeholder="item.placeholder"
203
- />
204
- </template>
205
- <template v-else>
206
- <a-input
207
- :class="{ 'psw-icon': item.comAttr == 'PASSWORD' }"
208
- class="EQ-input"
209
- :style="{
210
- width: `${getEleWidth(item)}`,
211
- 'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
212
- }"
213
- v-model="item.EQ"
214
- :placeholder="item.placeholder || item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
215
- allowClear
216
- >
217
- <template slot="suffix" v-if="item.comAttr == 'PASSWORD'">
218
- <svg-icon
219
- class="psw-icon"
220
- @click="item.PASSWORDTYPE = !item.PASSWORDTYPE"
221
- :icon-class="item.PASSWORDTYPE ? 'anniuyincang' : 'chakan'"
222
- style="font-size: 1em;"
223
- />
224
- </template>
225
- </a-input>
226
- </template>
227
- </template>
228
- <template v-if="showPercent(item)">&nbsp;%</template>
229
- <!-- date -->
230
- <div v-if="item.con == 'DATE'">
231
- <a-radio-group v-model="item.DATE.con" buttonStyle="solid">
232
- <a-radio-button
233
- v-for="date in item.dateTeam"
234
- v-show="!item.showDate"
235
- @click="clickRadioGroup(item.DATE, date.con)"
236
- :key="date.con"
237
- :value="date.con"
238
- >{{ getI18nText(date.title, date.name) }}
239
- </a-radio-button>
240
- <span v-show="item.advanceOptionSetting != 1" :class="['check-date-btn', item.marginx]" @click="checkDate(item)">{{
241
- getI18nText('1.1.4.52', '选择时间')
242
- }}</span>
243
- <div class="check-date" v-show="item.showDate">
244
- <a-date-picker
245
- format="YYYY-MM-DD HH:mm:ss"
246
- v-model="item.DATE.start_val"
247
- :show-time="{
248
- defaultValue: $moment('00:00:00', 'HH:mm:ss')
249
- }"
250
- :placeholder="getI18nText('1.1.4.53', '开始时间')"
251
- style="width: 120px"
252
- allowClear
253
- :disabledDate="current => disabledDatePicker(current, item, 'start')"
254
- />
255
- &nbsp;
256
- <a-date-picker
257
- format="YYYY-MM-DD HH:mm:ss"
258
- :show-time="{
259
- defaultValue: $moment('23:59:59', 'HH:mm:ss')
260
- }"
261
- :placeholder="getI18nText('1.9.147', '结束时间')"
262
- v-model="item.DATE.end_val"
263
- style="width: 120px"
264
- allowClear
265
- :disabledDate="current => disabledDatePicker(current, item, 'end')"
266
- />
267
- </div>
268
- </a-radio-group>
269
- </div>
270
- <!-- BIRTHDAY -->
271
- <div v-if="item.con == 'BIRTHDAY'" :class="{ 'birthday-item': item.showDate }">
272
- <a-radio-group v-model="item.BIRTHDAY.con" buttonStyle="solid">
273
- <template v-if="!item.showDate">
274
- <a-radio-button
275
- v-for="date in birthdayTeam"
276
- @click="clickBirthdayRadioGroup(item.BIRTHDAY, date.con)"
277
- :key="date.con"
278
- :value="date.con"
279
- >{{ getI18nText(date.title, date.name) }}
280
- </a-radio-button>
281
- </template>
282
- <template v-else>
283
- <div>
284
- <a-range-picker
285
- v-model="item.BIRTHDAY.limit_date"
286
- :disabledDate="disabledDate"
287
- @change="changeRange"
288
- format="MM-DD"
289
- />
290
- </div>
291
- <div class="age-wrap">
292
- <p>{{ getI18nText('1.2.5.34', '年龄') }}</p>
293
- <a-input
294
- style="width: 60px; margin-right: 10px"
295
- v-model="item.BIRTHDAY.start_val"
296
- allowClear
297
- />
298
- <a-input
299
- style="width: 60px; margin-right: 10px"
300
- v-model="item.BIRTHDAY.end_val"
301
- allowClear
302
- />
303
- <a-select
304
- v-model="item.BIRTHDAY.unit"
305
- defaultValue="YEAR"
306
- showSearch
307
- :filterOption="filterOption"
308
- allowClear
309
- >
310
- <a-select-option
311
- v-for="v in item.BIRTHDAY.units"
312
- :key="v.con"
313
- :value="v.con"
314
- >
315
- {{ getI18nText(v.title, v.name) }}
316
- </a-select-option>
317
- </a-select>
318
- </div>
319
- </template>
320
- <span :class="['check-date-btn', item.marginx]" @click="checkBirthDay(item)">{{
321
- getI18nText('1.1.5.2', '切换')
322
- }}</span>
323
- </a-radio-group>
324
- </div>
325
- <!-- <a-select
326
- v-if="item.con == 'QUOTE'"
327
- v-model="item.QUOTE"
328
- mode="multiple"
329
- :placeholder="$t('1.1.6.7')"
330
- :tokenSeparators="['|#|']"
331
- style="width: 200px"
332
- :filter-option="false"
333
- @dropdownVisibleChange="dropdownVisibleChange($event, item)"
334
- @search="handleSearch($event, item)"
335
- showSearch
336
- allowClear
337
- >
338
- <a-select-option
339
- v-for="sea in item.dataSource"
340
- :key="item.sid + sea.myName"
341
- :value="sea.myName"
342
- >
343
- {{ sea.showKeys || sea.myName }}
344
- </a-select-option>
345
- </a-select> -->
346
- <template v-if="item.con == 'QUOTE' || item.com == 'SelectMui'">
347
- <c-tree-select
348
- v-if="item.comType === 'treeSelect'"
349
- :item="item"
350
- :handleGetConfigApi="handleGetConfigApi"
351
- style="margin: 0 8px 8px 0"
352
- />
353
- <multiSelect
354
- v-else
355
- :item="item"
356
- source="quickSearch"
357
- :maxTagPlaceholder="maxTagPlaceholder"
358
- :outFilterChange="filterChange"
359
- :handleWordBookSearch="handleSearch"
360
- :dropdownVisibleChange="dropdownVisibleChange"
361
- :fetchingWordbook="fetchingWordbook"
362
- ></multiSelect>
363
- </template>
364
-
365
- <a-checkbox-group
366
- class="check-box"
367
- v-else-if="item.con == 'CONVERT'"
368
- :options="item.setting&&item.setting.showSetting"
369
- v-model="item.CONVERT"
370
- />
371
- </slot>
372
- </div>
373
- </div>
374
- </div>
375
- <!-- 跨表 -->
376
- <template v-for="(relationItem, i) in relationQuickSearch">
377
- <div :key="i" v-if="relationItem.fieldList && relationItem.fieldList.length">
378
- <p class="module-title">{{ relationItem.tableName }}</p>
379
- <div
380
- class="quick-item"
381
- v-for="item in relationItem.fieldList"
382
- :key="item.sid"
383
- :class="{
384
- 'quick-block':
385
- item.con == 'DATE' ||
386
- item.con == 'BIRTHDAY' ||
387
- item.con == 'CONVERT' ||
388
- item.LABELAttr
389
- }"
390
- >
391
- <div class="quick-row">
392
- <!-- title -->
393
- <div
394
- class="quick-item-title"
395
- :class="{ 'quick-item-title-default': source !== 'editTable' }"
396
- >
397
- <span>{{ handleName(item, "title") }}&nbsp;&nbsp;</span>
398
- </div>
399
- <div
400
- class="quick-item-col"
401
- :class="{ 'quick-item-col-default': source !== 'editTable' }"
402
- >
403
- <div v-if="item.LABELAttr">
404
- <slot v-if="item.labelObj && Object.keys(item.labelObj || {}).length > 0">
405
- <div v-for="(v, k) in item.labelObj" :key="k" class="edit-label-content">
406
- <div class="edit-label">{{ k }}:</div>
407
- <div class="edit-content">
408
- <div class="label-content">
409
- <a-checkable-tag
410
- v-for="(v, i) in v.itemList"
411
- v-model="v.isSelect"
412
- @change="handleLabelChange($event, v, item)"
413
- :key="i"
414
- :class="['label-tag-' + handleLabelColorClass(v)]"
415
- >
416
- <a-tooltip placement="topLeft">
417
- <template slot="title">
418
- <span>{{ v.labelName }}</span>
419
- </template>
420
- {{ v.labelName }}
421
- </a-tooltip>
422
- </a-checkable-tag>
423
- </div>
424
- </div>
425
- </div>
426
- </slot>
427
- <a-input v-else style="width: 200px" v-model="item.inputVal"> </a-input>
428
- </div>
429
-
430
- <!-- EVALUATE -->
431
- <div v-else-if="item.EVALUATEAttr">
432
- <template v-for="tag in EVALUATEList">
433
- <a-checkable-tag
434
- :key="tag.value"
435
- :checked="item.selecteds.indexOf(tag.value) > -1"
436
- @change="checked => handleEvaluateOnChange(tag, checked, item)"
437
- >
438
- {{ tag.label }}
439
- </a-checkable-tag>
440
- </template>
441
- <!-- <a-icon v-if="item.CL" type="close" @click="item.CL = ''" /> -->
442
- </div>
443
- <!-- EVALUATE -->
444
-
445
- <!-- NUMBERFiled -->
446
- <div v-else-if="item.NUMBERFiled" class="ant-calendar-picker" style="width: 300px">
447
- <span
448
- class="ant-calendar-picker-input ant-input num-picker"
449
- :class="{ 'num-picker-unit': item.inputUnit }"
450
- >
451
- <input
452
- v-model="item.lessValue"
453
- @keyup.enter="() => changeFilterNumber(item)"
454
- :title="`起始${item.alias || item.title}`"
455
- :placeholder="`起始${item.alias || item.title}`"
456
- class="ant-calendar-range-picker-input"/>
457
- <span class="ant-calendar-range-picker-separator"> ~ &nbsp;</span>
458
- <input
459
- v-model="item.bigValue"
460
- :title="`截止${item.alias || item.title}`"
461
- @keyup.enter="() => changeFilterNumber(item)"
462
- :placeholder="`截止${item.alias || item.title}`"
463
- class="ant-calendar-range-picker-input"/>
464
- <template v-if="item.inputUnit">&nbsp;{{ item.inputUnit }}</template>
465
- <span
466
- class="ant-input-suffix clear-number-icon"
467
- v-if="item.lessValue || item.bigValue"
468
- @click="clearFilterNumber(item)"
469
- ><i
470
- aria-label="图标: close-circle"
471
- tabindex="-1"
472
- class="anticon anticon-close-circle ant-input-clear-icon"
473
- ><svg
474
- viewBox="64 64 896 896"
475
- data-icon="close-circle"
476
- width="1em"
477
- height="1em"
478
- fill="currentColor"
479
- aria-hidden="true"
480
- focusable="false"
481
- class=""
482
- >
483
- <path
484
- d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
485
- ></path></svg></i
486
- ></span>
487
- <span class="ant-calendar-picker-icon"></span
488
- ></span>
489
- </div>
490
- <!-- NUMBERFiled -->
491
-
492
- <slot v-else>
493
- <template v-if="item.con == 'CL'">
494
- <template v-if="showPercent(item)">
495
- <a-input-number
496
- class="CL-input"
497
- :style="`width: ${getEleWidth(item)}`"
498
- v-model="item.CL"
499
- :min="0"
500
- :max="100"
501
- allowClear
502
- />
503
- </template>
504
- <template v-else>
505
- <a-input class="CL-input" :style="`width: ${getEleWidth(item)}`" v-model="item.CL" allowClear>
506
- </a-input>
507
- </template>
508
- </template>
509
- <template v-if="item.con == 'EQ'">
510
- <template v-if="showPercent(item)">
511
- <a-input-number
512
- class="EQ-input"
513
- :style="`width: ${getEleWidth(item)}`"
514
- v-model="item.EQ"
515
- :min="0"
516
- :max="100"
517
- allowClear
518
- />
519
- </template>
520
- <template v-else>
521
- <a-input
522
- class="EQ-input"
523
- :style="`width: ${getEleWidth(item)}`"
524
- v-model="item.EQ"
525
- :placeholder="item.placeholder || item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
526
- allowClear
527
- >
528
- </a-input>
529
- </template>
530
- </template>
531
- <template v-if="showPercent(item)">&nbsp;%</template>
532
- <!-- date -->
533
- <div v-if="item.con == 'DATE'">
534
- <a-radio-group v-model="item.DATE.con" buttonStyle="solid">
535
- <a-radio-button
536
- v-for="date in dateTeam"
537
- v-show="!item.showDate"
538
- @click="clickRadioGroup(item.DATE, date.con)"
539
- :key="date.con"
540
- :value="date.con"
541
- >{{ getI18nText(date.title, date.name) }}
542
- </a-radio-button>
543
- <span :class="['check-date-btn', item.marginx]" @click="checkDate(item)">{{
544
- getI18nText('1.1.4.53', '开始时间')
545
- }}</span>
546
- <div class="check-date" v-show="item.showDate">
547
- <a-date-picker
548
- format="YYYY-MM-DD HH:mm:ss"
549
- v-model="item.DATE.start_val"
550
- :show-time="{
551
- format: 'HH:mm:ss'
552
- }"
553
- :placeholder="'起始日期'"
554
- style="width: 120px"
555
- allowClear
556
- />
557
- &nbsp;
558
- <a-date-picker
559
- format="YYYY-MM-DD HH:mm:ss"
560
- v-model="item.DATE.end_val"
561
- :placeholder="'截止日期'"
562
- :show-time="{
563
- format: 'HH:mm:ss'
564
- }"
565
- style="width: 120px"
566
- allowClear
567
- />
568
- </div>
569
- </a-radio-group>
570
- </div>
571
- <!-- <a-select
572
- v-if="item.con == 'QUOTE'"
573
- v-model="item.QUOTE"
574
- mode="multiple"
575
- :placeholder="$t('1.1.6.7')"
576
- :tokenSeparators="['|#|']"
577
- style="width: 200px"
578
- :filter-option="false"
579
- @dropdownVisibleChange="dropdownVisibleChange($event, item)"
580
- @search="handleSearch($event, item)"
581
- showSearch
582
- allowClear
583
- >
584
- <a-select-option
585
- v-for="sea in item.dataSource"
586
- :key="item.sid + sea.myName"
587
- :value="sea.myName"
588
- >
589
- {{ sea.myName }}
590
- </a-select-option>
591
- </a-select> -->
592
- <template v-if="item.con == 'QUOTE' || item.com == 'SelectMui'">
593
- <c-tree-select
594
- v-if="item.comType === 'treeSelect'"
595
- :item="item"
596
- :handleGetConfigApi="handleGetConfigApi"
597
- style="margin: 0 8px 8px 0"
598
- />
599
- <multiSelect
600
- v-else
601
- :item="item"
602
- source="quickSearch"
603
- :maxTagPlaceholder="maxTagPlaceholder"
604
- :outFilterChange="filterChange"
605
- :handleWordBookSearch="handleSearch"
606
- :dropdownVisibleChange="dropdownVisibleChange"
607
- :fetchingWordbook="fetchingWordbook"
608
- ></multiSelect>
609
- </template>
610
-
611
- <a-checkbox-group
612
- class="check-box"
613
- v-else-if="item.con == 'CONVERT'"
614
- :options="item.setting&&item.setting.showSetting"
615
- v-model="item.CONVERT"
616
- />
617
- </slot>
618
- </div>
619
- </div>
620
- </div>
621
- </div>
622
- </template>
623
- </div>
624
-
625
- <a-modal
626
- :title="'设置筛选分类'"
627
- :visible="showInner"
628
- @ok="saveToCalss"
629
- @cancel="cancelSaveToCalss"
630
- wrapClassName="quickSearch-saveToClass-modal"
631
- >
632
- <a-form :form="formInner" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
633
- <a-form-item :label="'筛选集名称'">
634
- <a-input
635
- v-decorator="[
636
- 'classname',
637
- {
638
- rules: [{ required: true, message: getI18nText('1.1.6.6', '请输入分类名称') }]
639
- }
640
- ]"
641
- />
642
- </a-form-item>
643
- </a-form>
644
- <a-row>
645
- <a-col :span="5" style="text-align: right; color: rgba(0, 0, 0, 0.85)"> 父类名称: </a-col>
646
- <a-col :span="18">
647
- <div
648
- class="edit-tag"
649
- v-for="(item, index) in parentNames"
650
- :key="index"
651
- @dblclick="e => editParentName(e, item)"
652
- @click="handleParentNameSelect(item, index)"
653
- :class="{ 'edit-tag-select': item.selected && item.disabled }"
654
- >
655
- <a-input
656
- style="width: 100px"
657
- :value="item"
658
- :disabled="item.disabled"
659
- @blur="() => (item.disabled = true)"
660
- v-model="item.value"
661
- />
662
- <a-icon slot="suffix" type="close" @click="handleParentNamesRemove(index, item)" />
663
- </div>
664
- <template v-if="!parentNamesHasAdd">
665
- <a-button
666
- v-show="!showAdd"
667
- icon="plus"
668
- type="dashed"
669
- class="add-parent"
670
- @click="handleParentNamesAdd"
671
- >
672
- {{ getI18nText('1.9.363', '添加分类') }}
673
- </a-button>
674
- <a-input
675
- class="edit-tag"
676
- v-model.trim="addVal"
677
- v-show="showAdd"
678
- style="width: 100px"
679
- @blur="hanldeBlur"
680
- />
681
- </template>
682
- </a-col>
683
- </a-row>
684
- </a-modal>
685
- </div>
686
- <!-- </a-modal> -->
687
- </template>
688
-
689
- <script>
690
- const EVALUATEList = [
691
- {
692
- label: "一星",
693
- value: "1",
694
- isSelect: false
695
- },
696
- {
697
- label: "二星",
698
- value: "2",
699
- isSelect: false
700
- },
701
- {
702
- label: "三星",
703
- value: "3",
704
- isSelect: false
705
- },
706
- {
707
- label: "四星",
708
- value: "4",
709
- isSelect: false
710
- },
711
- {
712
- label: "五星",
713
- value: "5",
714
- isSelect: false
715
- }
716
- ];
717
-
718
- const AGEOPTIONS = [
719
- {
720
- label: "岁",
721
- value: "YY"
722
- },
723
- {
724
- label: "月",
725
- value: "MM"
726
- },
727
- {
728
- label: "日",
729
- value: "DD"
730
- }
731
- ];
732
- import tableSearchCon from "../mixins/tableSearchCon";
733
- import moment from 'moment';
734
- import 'moment/locale/zh-cn';
735
- // antd
736
- import cloneDeep from 'lodash/cloneDeep';
737
- import { Button, Icon, Dropdown, Select, Upload, DatePicker, Input, Menu, Radio, Checkbox, Row, Tag, InputNumber, Col, Form, Modal, Tooltip } from 'ant-design-vue';
738
- import rangeAge from '../components/range-age/index';
739
- import multiSelect from '../components/multi-select/multi-select';
740
- import resize from 'vue-resize-directive';
741
- import { durationMixin, $utils, filterApiFn } from '../mixins/mixins';
742
- import vexutils from '@/utils/vexutils';
743
- import wordBookutils from '../mixins/wordBookutils';
744
- import renderWidget from '../mixins/renderWidget';
745
- import cTreeSelect from '../components/c-tree-select/tree-select';
746
- import create from '@/core/create';
747
- import utils from '@/utils/utils-map';
748
- import {dataOptions} from '../const/dataOptions'
749
-
750
- import RenderWidget from '../components/render-widget/index.vue';
751
-
752
- export default create({
753
- name: "quick-search",
754
- mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, renderWidget],
755
- props: {
756
- visible: Boolean,
757
- searchFieldList: {
758
- type: Array,
759
- default: () => []
760
- },
761
- searchFieldLimit: {
762
- type: Object,
763
- default: () => ({})
764
- },
765
- quickSearchConfig: Array,
766
- source: String,
767
- quickSearchListObj: Object,
768
- originConditionList: Array,
769
- isOrgAdmin: Boolean,
770
- lastQuickSearchData: Array,
771
- show: Boolean,
772
- getFilterData: Function
773
- },
774
- components: {
775
- RenderWidget,
776
- rangeAge,
777
- [Button.name]: Button,
778
- [Icon.name]: Icon,
779
- [Dropdown.name]: Dropdown,
780
- [Select.name]: Select,
781
- [Select.Option.name]: Select.Option,
782
- [Upload.name]: Upload,
783
- [DatePicker.name]: DatePicker,
784
- [DatePicker.RangePicker.name]: DatePicker.RangePicker,
785
- [Input.name]: Input,
786
- [Input.Group.name]: Input.Group,
787
- [InputNumber.name]: InputNumber,
788
- [Input.Search.name]: Input.Search,
789
- [Menu.name]: Menu,
790
- [Menu.Item.name]: Menu.Item,
791
- [Menu.ItemGroup.name]: Menu.ItemGroup,
792
- [Radio.name]: Radio,
793
- [Radio.Button.name]: Radio.Button,
794
- [Radio.Group.name]: Radio.Group,
795
- [Checkbox.name]: Checkbox,
796
- [Checkbox.Group.name]: Checkbox.Group,
797
- [Row.name]: Row,
798
- [Col.name]: Col,
799
- [Tag.name]: Tag,
800
- AModal: Modal,
801
- [Form.name]: Form,
802
- [Tooltip.name]: Tooltip,
803
- [Form.Item.name]: Form.Item,
804
- [Tag.CheckableTag.name]: Tag.CheckableTag,
805
- multiSelect,
806
- cTreeSelect
807
- },
808
- computed: {
809
- showPercent() {
810
- return function(item) {
811
- return item.settingObj?.attr === "PERCENTAGE" || false;
812
- };
813
- },
814
- getEleWidth(){
815
- return function(item) {
816
- return `${item.advanceColWidth||200}px`
817
- }
818
- },
819
- hasRelationQuickSearch() {
820
- return this.relationQuickSearch.findIndex(i => i.fieldList && i.fieldList.length) != -1;
821
- },
822
- parentNamesHasAdd() {
823
- if (!this.parentNames.length) return false;
824
- return this.parentNames.some(v => v.isAdd);
825
- },
826
- handleName() {
827
- return function(item, key = "name") {
828
- return item.alias || item[key];
829
- };
830
- },
831
-
832
- $moment() {
833
- return moment;
834
- }
835
- },
836
- data() {
837
- return {
838
- modalVisible: this.visible,
839
- showInner: false,
840
- quickSearch: [],
841
- relationTableList: [], // 跨表查询
842
- relationQuickSearch: [], // 跨表查询检索条件
843
- formData: {},
844
- searchItem: {},
845
- curWordbookData: undefined,
846
- curAutograph: "",
847
- dateTeam: [
848
- { con: 'TODAY', title: '1.1.4.37', name: '今天' },
849
- { con: 'TOMORROW', title: '1.1.4.38', name: '明天' },
850
- { con: 'YESTERDAY', title: '1.1.4.39', name: '昨天' },
851
- { con: 'THIS_WEEK', title: '1.1.4.40', name: '本周' },
852
- { con: 'NEXT_WEEK', title: '1.1.4.41', name: '下周' },
853
- { con: 'LAST_WEEK', title: '1.1.4.42', name: '上周' },
854
- { con: 'THIS_MONTH', title: '1.1.4.43', name: '本月' },
855
- { con: 'NEXT_MONTH', title: '1.1.4.44', name: '下月' },
856
- { con: 'LAST_MONTH', title: '1.1.4.45', name: '上月' },
857
- { con: 'THIS_SEASON', title: '1.1.4.46', name: '本季度' },
858
- { con: 'NEXT_SEASON', title: '1.1.4.47', name: '下季度' },
859
- { con: 'LAST_SEASON', title: '1.1.4.48', name: '上季度' },
860
- { con: 'THIS_YEAR', title: '1.1.4.49', name: '本年' },
861
- { con: 'NEXT_YEAR', title: '1.1.4.50', name: '下年' },
862
- { con: 'LAST_YEAR', title: '1.1.4.51', name: '上年' }
863
- ],
864
- birthdayTeam: [],
865
- limit_date: "",
866
- birthdayUnits: [
867
- { title: '1.2.5.58', units: 1, con: 'DAY', name: '天' },
868
- { title: '1.2.5.59', units: 2, con: 'WEEK', name: '周' },
869
- { title: '1.2.1.11.18', units: 1, con: 'MONTH', name: '月' },
870
- { title: '1.9.273', units: 1, con: 'YEAR', name: '岁' },
871
- ],
872
- isChangeWindow: false,
873
- modalWidth: "700px",
874
- modalHeight: "60vh",
875
- EVALUATEList,
876
- AGEOPTIONS,
877
- label_max_count: 8,
878
- parentNames: [],
879
- showAdd: false,
880
- addVal: "",
881
- fetchingWordbook: false,
882
- ...dataOptions
883
- };
884
- },
885
- watch: {
886
- visible(value) {
887
- this.modalVisible = value;
888
- // this.init();
889
- this.setDefaultCon(this.quickSearchConfig);
890
- },
891
- searchFieldList: {
892
- immediate: true,
893
- deep: true,
894
- handler(val) {
895
- if (val && val.length > 0) {
896
- let { relationTableList = [] } = this.$attrs;
897
- this.relationTableList = relationTableList;
898
- this.init();
899
- }
900
- }
901
- },
902
- quickSearchConfig: {
903
- handler(val) {
904
- this.setDefaultCon(val);
905
- },
906
- deep: true
907
- },
908
- quickSearchListObj: {
909
- immediate: true,
910
- deep: true,
911
- handler(val) {
912
- if (!val || !Object.keys(val).length) {
913
- this.parentNames = [];
914
- return;
915
- }
916
- this.handleParentName();
917
- }
918
- },
919
- quickSearch: {
920
- deep: true,
921
- handler() {
922
- const conObj = this.getConObjParams() || [];
923
- this.$emit("filterCountChange", conObj.length);
924
- }
925
- },
926
- show: {
927
- deep: true,
928
- handler(newVal) {
929
- if (newVal && this.lastQuickSearchData.length > 0) {
930
- this.quickSearch = cloneDeep(this.lastQuickSearchData);
931
- }
932
- }
933
- }
934
- },
935
- beforeCreate() {
936
- this.formInner = this.$form.createForm(this);
937
- },
938
- created() {},
939
- methods: {
940
- filterOption(...arg) {
941
- return utils.filterOption(...arg);
942
- },
943
- handleLabelColor(...arg) {
944
- return utils.handleLabelColor(...arg);
945
- },
946
- init() {
947
- this.quickSearch = [];
948
- this.relationQuickSearch = [];
949
- this.birthdayTeam = this.dateTeam.filter(
950
- item => item.con != "THIS_YEAR" && item.con != "NEXT_YEAR" && item.con != "LAST_YEAR"
951
- );
952
- let copyList = cloneDeep(this.searchFieldList);
953
- let mySearchFieldList = copyList.filter(i => i.isShowSearch == 1 && i.filterExplicit != 1) || [];
954
- // let relationTableList = JSON.parse(JSON.stringify(this.relationTableList));
955
- let relationTableList = cloneDeep(this.relationTableList);
956
-
957
- // 跨表
958
- let relationQuickSearch = relationTableList.map(item => {
959
- return {
960
- fieldList: item.fieldList.fieldList.filter(item => item.isShowSearch == 1 && item.filterExplicit != 1),
961
- tableName: item.tableName,
962
- primaryField: item.primaryField,
963
- parameterConversionId: item.parameterConversionId,
964
- tableId: item.tableId,
965
- relationField: item.relationField,
966
- converFun: item.converFun,
967
- relationOrgId: item.relationOrgId,
968
- preConObj: item.preConObj,
969
- preSqlExpression: item.preSqlExpression
970
- };
971
- });
972
-
973
- this.$set(this, "relationQuickSearch", relationQuickSearch);
974
- // 过滤获取 快速检索的字段
975
- this.quickSearch = mySearchFieldList || [];
976
- this.handlerInitSearchItem(this.quickSearch);
977
- this.relationQuickSearch.forEach(item => {
978
- this.handlerInitSearchItem(item.fieldList);
979
- });
980
- },
981
- handleParentName() {
982
- let parentNames = [];
983
- let { displayCategoryList = [] } = this.quickSearchListObj;
984
- if (!displayCategoryList || !displayCategoryList.length) {
985
- this.parentNames = [];
986
- return;
987
- }
988
- displayCategoryList.forEach(item => {
989
- if (item !== "未分类") {
990
- parentNames.push({
991
- disabled: true,
992
- selected: false,
993
- value: item
994
- });
995
- }
996
- });
997
- this.parentNames = parentNames;
998
- },
999
- setDefaultCon(val) {
1000
- if (!val.length) {
1001
- this.quickSearch.forEach((item, index) => {
1002
- if (this.isRender(item)) {
1003
- this.$set(this.quickSearch[index], "value", this.getDefValByRenderWidget(item));
1004
- return;
1005
- }
1006
-
1007
- let advanceOptionSetting = item?.advanceOptionSetting;
1008
- // 单选
1009
- let optionSetting0 =String(advanceOptionSetting) == '0';
1010
- if(optionSetting0){
1011
- this.$set(this.quickSearch[index], "value", undefined);
1012
- } else {
1013
- if (item.CONVERT && Array.isArray(item.CONVERT)) {
1014
- this.$set(this.quickSearch[index], "CONVERT", []);
1015
- }
1016
- }
1017
-
1018
- });
1019
- return false;
1020
- }
1021
-
1022
- this.quickSearch.forEach((item, index) => {
1023
- let advanceOptionSetting = item?.advanceOptionSetting;
1024
- // 单选
1025
- let optionSetting0 =String(advanceOptionSetting) == '0';
1026
- let find = val.find(valItem => valItem.field_key === item.columnName);
1027
- if (find) {
1028
- if (this.isRender(item)) {
1029
- this.$set(this.quickSearch[index], "value", this.getDefValByRenderConObj(find, item));
1030
- return;
1031
- }
1032
-
1033
- let value = find?.value
1034
- let isTrance = item.CONVERT && Array.isArray(item.CONVERT) || item.comType == "SelectMui" && item.con == "CONVERT"
1035
- // wordbook多选
1036
- let isWordBookMulti = value && item.comType === "SelectMuiWordBook"&& typeof value ==='string' && value.includes('|#|')
1037
- if(isWordBookMulti) {
1038
- value = value.split('|#|')
1039
- }
1040
- if(Array.isArray(value) && isTrance){
1041
- let value = find?.value?.map?.(item => JSON.stringify(item)) || find.value;
1042
- value = value.filter(Boolean)
1043
- this.$set(this.quickSearch[index], "CONVERT", value);
1044
- if(optionSetting0){
1045
- let i = value[0] ? item.labelList.findIndex(v=> v.value== value[0]) : ""
1046
- this.$set(this.quickSearch[index], "value", i);
1047
- }
1048
- } else {
1049
- this.$set(this.quickSearch[index], "value", value);
1050
- }
1051
- } else {
1052
- this.$set(this.quickSearch[index], "CONVERT",optionSetting0?"": []);
1053
- }
1054
- });
1055
- },
1056
- handlerInitSearchItem(arr) {
1057
- if (!Array.isArray(arr)) return;
1058
- arr.forEach(el => {
1059
- // 直接渲染相应组件,不经过下面的字段判断
1060
- if (this.initRenderWidgetCfg(el)) return;
1061
-
1062
- const isPreciseSearch = el?.settingObj?.isPreciseSearch || "";
1063
-
1064
- if (el.setting) {
1065
- // el.seting 可能是 string / object
1066
- el.setting = typeof el.setting == "string" ? JSON.parse(el.setting) : el.setting;
1067
-
1068
- let advanceOptionSetting = el?.advanceOptionSetting;
1069
- // 单选
1070
- let optionSetting0 =String(advanceOptionSetting) == '0';
1071
- let wordbookId = el?.setting?.wordbook?.id;
1072
- if (vexutils.anyNotEmpty(el.setting?.wordbook) && wordbookId) {
1073
- let isTree = "tree" === el?.setting?.wordbook?.showType;
1074
- let comType = isTree ? 'treeSelect' : 'SelectMuiWordBook';
1075
- let defVal = isTree ? [] : [];
1076
- if(optionSetting0){
1077
- defVal = undefined
1078
- }
1079
- this.$set(el, "con", "QUOTE");
1080
- this.$set(el, "dataSource", []);
1081
- this.$set(el, "QUOTE", []);
1082
- this.$set(el, "value", defVal);
1083
- this.$set(el, "com", "SelectMui");
1084
- this.$set(el, "comType", comType);
1085
- this.$set(el, "searchPageConfig", {
1086
- keyword: undefined,
1087
- isRequest: false, // 是否已请求
1088
- page: 1, // 当前页
1089
- total: 1, // 总页数
1090
- hasNextPage: false
1091
- });
1092
- return;
1093
- } else if (el.setting.showSetting && el.setting.showSetting.length > 0) {
1094
- this.$set(el, "con", "CONVERT");
1095
- let showSetting = el.setting.showSetting;
1096
-
1097
- // 字典推荐值
1098
- let dictionItem = this.handleDictionDef(el);
1099
- if (dictionItem) {
1100
- showSetting.unshift(dictionItem);
1101
- }
1102
- showSetting.forEach(set => {
1103
- set.label = set.change_text;
1104
- set.value = JSON.stringify(set.filter);
1105
- });
1106
- // el.setting.showSetting.forEach(set => {
1107
- // this.$set(set, "label", set.change_text);
1108
- // this.$set(set, "value", JSON.stringify(set.filter));
1109
- // });
1110
- /**
1111
- * 映射方式的单选模式
1112
- */
1113
- if(optionSetting0){
1114
- this.$set(el, "com", "SelectMui");
1115
- this.$set(el, "comType", "SelectMui");
1116
- const labelList = el.setting.showSetting.map(i => {
1117
- i.labelName = i.change_text;
1118
- return i;
1119
- });
1120
- this.$set(el, "labelList", labelList);
1121
- }
1122
-
1123
- this.$set(el.setting, "showSetting", showSetting);
1124
- this.$set(el, "CONVERT",optionSetting0? "": []);
1125
- return;
1126
- }
1127
- }
1128
- if (el.setting?.attr === "LABEL") {
1129
- this.$set(el, "con", "CL"); // 2020-09-04 朱亚徽 EQ => CL
1130
- this.$set(el, "LABELAttr", true);
1131
- this.$set(el, "labelSelectList", []);
1132
- this.$set(el, "inputVal", "");
1133
- this.handleSetLabelOptions(el.setting.labelType, el);
1134
- } else if (el.setting?.attr === "EVALUATE") {
1135
- this.$set(el, "con", "CL");
1136
- this.$set(el, "selecteds", []);
1137
- this.$set(el, "EVALUATEAttr", true);
1138
- } else if (el.setting?.attr === "AGE" && el.fieldType != "NUMBER") {
1139
- // 年龄组件
1140
- let format = el.setting.format || "YYYY-MM-DD";
1141
- format = format.toUpperCase();
1142
- this.$set(el, "con", "IN");
1143
- this.$set(el, "ageObj", {});
1144
- this.$set(el, "format", format);
1145
- this.$set(el, "AGEAttr", true);
1146
- } else if (el.setting?.attr === "PASSWORD") {
1147
- this.$set(el, "comAttr", "PASSWORD");
1148
- this.$set(el, "PASSWORDTYPE", true);
1149
- } else if (el.fieldType == "NUMBER") {
1150
- this.$set(el, "con", "EQ");
1151
- this.$set(el, "EQ", "");
1152
- this.$set(el, "NUMBERFiled", true);
1153
- this.$set(el, "lessValue", "");
1154
- this.$set(el, "bigValue", "");
1155
- if (el.setting?.attr == "PERCENTAGE") {
1156
- this.$set(el, "inputUnit", "%");
1157
- }
1158
- } else if (el.fieldType.includes("DATE")) {
1159
- if (el.settingObj && el.settingObj.attr == "BIRTHDAY") {
1160
- this.$set(el, "con", "BIRTHDAY");
1161
- this.$set(el, "showDate", false);
1162
- this.$set(el, "marginx", "ml");
1163
- this.$set(el, "BIRTHDAY", this.initBirthdayParams());
1164
- } else {
1165
- // 判断是否有默认值
1166
- const value = this.getSearchDefValueByLimit(el, this.searchFieldLimit);
1167
- let hasValue = Array.isArray(value);
1168
- let advanceOptionSetting = el?.advanceOptionSetting;
1169
- // 选择时间模式
1170
- let optionSetting1 = String(advanceOptionSetting) == '1';
1171
-
1172
- this.$set(el, "con", "DATE");
1173
- this.$set(el, "showDate", optionSetting1 || hasValue);
1174
- this.$set(el, "marginx",optionSetting1 || hasValue ? "mr" : "ml");
1175
- this.$set(el, "DATE", {
1176
- con: hasValue ? "IN" : null,
1177
- start_val: hasValue ? value[0] : null,
1178
- end_val: hasValue ? value[1] : null
1179
- });
1180
- let dateTeam = optionSetting1 ? [] : this[`dateTeam${advanceOptionSetting}`] || this.dateTeam0;
1181
- this.$set(el, 'dateTeam' , dateTeam)
1182
- }
1183
- } else if (el.fieldType == "TEXT") {
1184
- /**
1185
- * NUMBER和TEXT属性字段
1186
- * 如果 开启了精准搜索,则传条件的时候 要传 EQ
1187
- * isPreciseSearch: 0/1
1188
- */
1189
- let con = isPreciseSearch == 1 ? 'EQ': 'CL';
1190
- this.$set(el, "con", con);
1191
- this.$set(el, "isPreciseSearch", isPreciseSearch == 1);
1192
- this.$set(el, con, "");
1193
- } else if (el.fieldType == "JSONB") {
1194
- this.$set(el, "con", "EQ");
1195
- this.$set(el, "EQ", "");
1196
- }
1197
- });
1198
- },
1199
- // 字典推荐值 item处理
1200
- handleDictionDef(el) {
1201
- let { defaultValue, defaultValueTitle } = el?.dictionarieObj || {};
1202
- let dictionItem = null;
1203
- if (defaultValue && defaultValueTitle) {
1204
- dictionItem = {
1205
- change_text: defaultValueTitle,
1206
- filter: [
1207
- {
1208
- con: "EQ",
1209
- field_key: el.columnName,
1210
- value: defaultValue
1211
- }
1212
- ]
1213
- };
1214
- }
1215
- return dictionItem;
1216
- },
1217
- checkDate(item) {
1218
- item.showDate = !item.showDate;
1219
- item.showDate ? (item.marginx = "mr") : (item.marginx = "ml");
1220
- },
1221
- checkBirthDay(item) {
1222
- item.showDate = !item.showDate;
1223
- },
1224
- getWordbookData(o, obj) {
1225
- let { id, filterKeys, wordbookType } = o;
1226
- this.fetchingWordbook = true;
1227
- let resFieldKeys = Array.isArray(filterKeys) ? JSON.stringify(filterKeys) : filterKeys;
1228
- let url = `/tableReader/getWordbookData`;
1229
- let params = {
1230
- wordbookId: id,
1231
- fieldKeys: resFieldKeys,
1232
- wordbookType: wordbookType || "WORDBOOK",
1233
- asyncCount: 1, // 开启性能模式
1234
- ...obj
1235
- };
1236
- return this.handleGetConfigApi(params, 'requestGetWordbookData', { fields: o }).then(res => {
1237
- this.fetchingWordbook = false;
1238
- if(typeof res.data === 'object'){
1239
- res.data.reqParams = params;
1240
- }
1241
- return res;
1242
- }).catch(() => {
1243
- this.fetchingWordbook = false;
1244
- });
1245
- },
1246
- handleWordbookData(item, data, params) {
1247
- this.$set(item, "hasFieldList", false);
1248
- const {rows,hasFieldList,searchPageConfig} = wordBookutils.handleWordbookData(item,data,params);
1249
- this.$set(item, "hasFieldList", hasFieldList);
1250
- this.$set(item, "dataSource", rows);
1251
- item.searchPageConfig = Object.assign(item.searchPageConfig, searchPageConfig);
1252
- },
1253
- filterChange() {},
1254
- maxTagPlaceholder(item) {
1255
- if (Array.isArray(item.value)) {
1256
- return item.value.length;
1257
- } else {
1258
- return 1;
1259
- }
1260
- },
1261
- dropdownVisibleChange(open, item) {
1262
- if (item.comType == "SelectMui" && String(item.advanceOptionSetting) === '0') return;
1263
- if (open) {
1264
- let obj = {};
1265
- if (item.setting?.wordbook?.params) {
1266
- item.setting?.wordbook?.params?.forEach(item => {
1267
- obj[item.p_name] = item.p_value;
1268
- });
1269
- }
1270
- if (item.settingObj.wordbook) {
1271
- obj.autograph = item.settingObj.wordbook.autograph;
1272
- }
1273
- this.curWordbookData = item.setting?.wordbook;
1274
- this.curAutograph = item.settingObj.wordbook && item.settingObj.wordbook.autograph;
1275
- this.searchItem = item;
1276
- this.getWordbookData(item.setting?.wordbook, obj).then(({ data }) => {
1277
- this.handleWordbookData(item, data, obj);
1278
- });
1279
- }
1280
- },
1281
- /**
1282
- * 输入自动联想
1283
- */
1284
- handleSearch(value, item, config={}) {
1285
- if (item.comType == "SelectMui" && String(item.advanceOptionSetting) === '0') return;
1286
- let params = {
1287
- keyword: value,
1288
- autograph: this.curAutograph
1289
- };
1290
- let obj = {};
1291
- let p = item?.setting?.wordbook?.params || undefined;
1292
- if (p) {
1293
- item.setting?.wordbook?.params?.forEach(item => {
1294
- obj[item.p_name] = item.p_value;
1295
- });
1296
- }
1297
- let rp = { ...params, ...obj, ...config };
1298
- this.getWordbookData(this.curWordbookData, rp).then(({ data }) => {
1299
- this.handleWordbookData(this.searchItem, data, rp);
1300
- });
1301
- },
1302
- onSave() {
1303
- let mergeConObj = this.getMergeConObj();
1304
- this.resetChangeWindow();
1305
-
1306
- if (!this.validConObj(mergeConObj, this.searchFieldList, this.searchFieldLimit)) return false;
1307
- this.$emit("onSave", mergeConObj);
1308
- return this.quickSearch;
1309
- },
1310
- // 方便外部调用
1311
- getMergeConObj() {
1312
- let conObj = this.getConObjParams() || [];
1313
- let mergeConObj = [...conObj];
1314
- // 合并表格表头未设置高级筛选的筛选项
1315
- this.quickSearchConfig.forEach(i => {
1316
- let find = mergeConObj.find(j => {
1317
- return i.field_key === j.field_key;
1318
- });
1319
- if (
1320
- !find &&
1321
- !this.quickSearch.find(item => {
1322
- return item.columnName === i.field_key;
1323
- })
1324
- ) {
1325
- mergeConObj.push(i);
1326
- }
1327
- });
1328
- return mergeConObj || [];
1329
- },
1330
- getConObjParams() {
1331
- let conObj = this.getConObj(this.quickSearch) || [];
1332
- let realation = [];
1333
- this.relationQuickSearch.forEach(item => {
1334
- let curQuote = this.getConObj(item.fieldList);
1335
- if (curQuote && curQuote.length) {
1336
- realation.push({
1337
- field_key: item.primaryField,
1338
- valueField: item.relationField,
1339
- con: "QUOTE_IN",
1340
- tableId: item.tableId,
1341
- parameterConversionId: item.parameterConversionId,
1342
- converFun: item.converFun,
1343
- preConObj: item.preConObj,
1344
- relationOrgId: item.relationOrgId,
1345
- preSqlExpression: item.preSqlExpression,
1346
- quote_con: {
1347
- conObj: this.getConObj(item.fieldList),
1348
- sqlExpression: ""
1349
- }
1350
- });
1351
- }
1352
- });
1353
- conObj.push(...realation);
1354
- return conObj || [];
1355
- },
1356
- closeModal() {
1357
- this.resetChangeWindow();
1358
- this.$emit("closeModal");
1359
- },
1360
- resetChangeWindow() {
1361
- this.modalWidth = "700px";
1362
- this.modalHeight = "60vh";
1363
- this.isChangeWindow = false;
1364
- },
1365
- // 填写搜索设置条件后打开新增搜索分类名称弹框
1366
- openSaveToCalss() {
1367
- let conObj = this.getConObjParams();
1368
- if (!conObj) return;
1369
- if (conObj.length > 0) {
1370
- if (!this.validConObj(conObj, this.searchFieldList, this.searchFieldLimit)) return;
1371
- this.showInner = true;
1372
- } else {
1373
- this.$message.warning(this.getI18nText('1.1.6.18', '请设置搜索条件'), 2);
1374
- }
1375
- },
1376
- // 格式化设置搜索条件参数
1377
- getConObj(arr) {
1378
- // this.quickSearch
1379
- if (!Array.isArray(arr)) {
1380
- return [];
1381
- }
1382
- let conObj = [];
1383
- for (let i = 0; i < arr.length; i++) {
1384
- let item = arr[i];
1385
-
1386
- const renderConObj = this.getRenderSearchConObj(item);
1387
- if (renderConObj) {
1388
- conObj.push(renderConObj);
1389
- continue;
1390
- }
1391
-
1392
- let value = "";
1393
- let limit_date = "";
1394
- let advanceOptionSetting = item?.advanceOptionSetting;
1395
- // 单选
1396
- let optionSetting0 =String(advanceOptionSetting) === '0';
1397
- if (item.EQ || item.CL) {
1398
- value = item.EQ || item.CL;
1399
- if (item.settingObj?.attr === "PERCENTAGE") {
1400
- value = Number(value) / 100;
1401
- }
1402
- if (item.EVALUATEAttr) {
1403
- value = item.selecteds.join("|#|");
1404
- }
1405
- } else if((item.comType == 'SelectMui'&& optionSetting0)){
1406
- // 单选模式
1407
- let i = item.value;
1408
- let c = item?.labelList[i];
1409
- if (item.con == "CONVERT") {
1410
- value = c?.filter ? [c?.filter] : undefined
1411
- } else {
1412
- value= c?.labelName ? [c?.labelName] : undefined;
1413
- }
1414
- } else if (item.con == "QUOTE" && vexutils.anyNotEmpty(item.value)) {
1415
- // value = item.QUOTE.join("|#|");
1416
- if(item.comType == "treeSelect"){
1417
- let cval = item.value;
1418
- if(typeof cval === 'string'){
1419
- [cval] = cval.split('<&=&>');
1420
- value = cval;
1421
- } else if(Array.isArray(cval)) {
1422
- cval = cval.map((v)=>{
1423
- let [k] = typeof v === 'string' ? v.split('<&=&>'): [];
1424
- return k;
1425
- })
1426
- value = cval.join("|#|");
1427
- }
1428
- } else {
1429
- value = item.value
1430
- // 多选有时候数据类型是string join会报错
1431
- if (item.value && Array.isArray(item.value) && !optionSetting0) {
1432
- value = item.value.join("|#|");
1433
- }
1434
- }
1435
- } else if (vexutils.anyNotEmpty(item.CONVERT) && Array.isArray(item.CONVERT)) {
1436
- value = item.CONVERT.map(item => {
1437
- if (item && vexutils.isJSON(item)) {
1438
- return JSON.parse(item);
1439
- }
1440
- return item;
1441
- });
1442
- } else if (item.DATE && !item.AGEAttr) {
1443
- // 年龄组件的不按照 date 类型处理
1444
- if (item.DATE.start_val || item.DATE.end_val) {
1445
- item.DATE.con = "IN";
1446
- }
1447
- item.tempCon = item.DATE.con;
1448
- item.start_val = item.DATE.start_val
1449
- ? item.DATE.start_val.format("YYYY-MM-DD HH:mm:ss")
1450
- : "";
1451
- item.end_val = item.DATE.end_val ? item.DATE.end_val.format("YYYY-MM-DD HH:mm:ss") : "";
1452
- } else if (item.BIRTHDAY) {
1453
- // 生日
1454
- let isChange = false;
1455
- if (
1456
- item.BIRTHDAY.limit_date.length > 0 ||
1457
- item.BIRTHDAY.start_val ||
1458
- item.BIRTHDAY.end_val
1459
- ) {
1460
- item.BIRTHDAY.con = "IN";
1461
- }
1462
- item.tempCon = item.BIRTHDAY.con;
1463
- // 因为年龄下拉有个默认值, 当输入框中有值时才取下拉值
1464
- if (item.BIRTHDAY.start_val || item.BIRTHDAY.end_val) {
1465
- isChange = true;
1466
- } else {
1467
- isChange = false;
1468
- }
1469
-
1470
- // 校验
1471
- if (item.BIRTHDAY.start_val) {
1472
- let res = vexutils.validateBirthday(
1473
- item.BIRTHDAY.start_val,
1474
- item.title,
1475
- item.BIRTHDAY.unit
1476
- );
1477
- if (!res) return;
1478
- }
1479
- if (item.BIRTHDAY.end_val) {
1480
- let res = vexutils.validateBirthday(
1481
- item.BIRTHDAY.end_val,
1482
- item.title,
1483
- item.BIRTHDAY.unit
1484
- );
1485
- if (!res) return;
1486
- }
1487
- if (+item.BIRTHDAY.start_val > +item.BIRTHDAY.end_val) {
1488
- this.$message.warning(this.getI18nText(['1.9.47', { title: item.title }], `${item.title}请输入有效范围`), 2);
1489
- return;
1490
- }
1491
-
1492
- limit_date = this.limit_date || "";
1493
- item.unit = isChange ? item.BIRTHDAY.unit || "" : "";
1494
- item.start_val = item.BIRTHDAY.start_val || "";
1495
- item.end_val = item.BIRTHDAY.end_val || "";
1496
- }
1497
- // 根据属性判断取值
1498
- if (item.LABELAttr) {
1499
- if (Object.keys(item.labelObj || {}).length > 0) {
1500
- let valList = [];
1501
- item.labelSelectList.forEach(v => {
1502
- valList.push(v.labelName);
1503
- });
1504
- value = valList.join("|#|");
1505
- } else {
1506
- value = item.inputVal;
1507
- }
1508
- } else if (item.EVALUATEAttr) {
1509
- value = item.selecteds.join("|#|");
1510
- } else if (item.AGEAttr) {
1511
- value = "";
1512
- } else if (item.NUMBERFiled && (item.lessValue||item.bigValue) ) {
1513
- let lessValue = item.lessValue ?? '';
1514
- let bigValue = item.bigValue ?? '';
1515
- if (item.setting?.attr === "PERCENTAGE") {
1516
- lessValue = (lessValue || lessValue === 0) && Number(lessValue) / 100 || '';
1517
- bigValue = (bigValue || bigValue === 0) && Number(bigValue) / 100;
1518
- }
1519
- value = `${lessValue}~${bigValue}`;
1520
- }
1521
- // 删除字符串前后空格
1522
- if (value && vexutils.isString(value)) {
1523
- value = value.trim();
1524
- }
1525
- let temp = {
1526
- field_key: item.columnName, // 一级value
1527
- con: item.DATE || item.BIRTHDAY ? item.tempCon : item.con, // 二级选择项value
1528
- value: value, // input输入值
1529
- limit_date: limit_date || "", // 生日
1530
- start_val: item.start_val || "", // 开始时间
1531
- end_val: item.end_val || "", // 结束时间
1532
- unit: item.unit || "", // 年龄
1533
- id: item.id
1534
- };
1535
- conObj.push(temp);
1536
- }
1537
- let dateCons = this.dateTeam.map(item => item.con);
1538
- let res = conObj.filter(
1539
- item =>
1540
- item.value ||
1541
- item.limit_date ||
1542
- item.start_val ||
1543
- item.end_val ||
1544
- dateCons.includes(item.con)
1545
- );
1546
- return res;
1547
- },
1548
- range(start, end) {
1549
- const result = [];
1550
- for (let i = start; i < end; i++) {
1551
- result.push(i);
1552
- }
1553
- return result;
1554
- },
1555
- // 日期选择范围
1556
- disabledDate(current) {
1557
- return (
1558
- (current && current < moment().startOf("year")) ||
1559
- current > moment().endOf("year")
1560
- );
1561
- },
1562
- changeRange(date, dateString) {
1563
- // 这里没有使用item中的limit_date, 而是用全局的变量limit_date储存
1564
- // 原因是因为range-picker 要求是个[] 并且v-model中的数据是个moment对象 即item.BIRRHDAY.limit_date = [moment, moment]
1565
- if (dateString[0]) {
1566
- this.limit_date = dateString.join("~");
1567
- } else {
1568
- this.limit_date = "";
1569
- }
1570
- },
1571
- // 填写新增搜索分类名称后保存按钮
1572
- saveToCalss() {
1573
- this.formInner.validateFields((err, values) => {
1574
- if (err) return;
1575
- let conObj = this.getConObjParams();
1576
- if (!conObj.length) {
1577
- conObj = [];
1578
- }
1579
- let displayCategory = this.parentNames.filter(item => item.selected)[0]?.value;
1580
- let params = {
1581
- tableId: this.$attrs.tableId || "",
1582
- setting: JSON.stringify({
1583
- displayCategory,
1584
- name: values.classname,
1585
- conObj: conObj
1586
- }),
1587
- conditionList: JSON.stringify(this.originConditionList)
1588
- };
1589
- this.saveTableCondiTion(params);
1590
-
1591
- });
1592
- },
1593
- handleParentNamesAdd(e) {
1594
- const nextInput = e?.target?.nextElementSibling;
1595
- setTimeout(() => {
1596
- nextInput && nextInput.focus();
1597
- });
1598
- this.showAdd = true;
1599
- },
1600
- hanldeBlur() {
1601
- this.showAdd = false;
1602
- if (!this.addVal) return;
1603
- this.parentNames.forEach(v => (v.selected = false));
1604
- this.parentNames.push({
1605
- disabled: true,
1606
- value: this.addVal,
1607
- selected: true,
1608
- isAdd: true
1609
- });
1610
- this.addVal = "";
1611
- },
1612
- editParentName(e, item) {
1613
- item.disabled = false;
1614
- setTimeout(() => {
1615
- e.target.focus();
1616
- }, 0);
1617
- },
1618
- handleParentNameSelect(item, index) {
1619
- if (!item.disabled) return;
1620
- this.parentNames.forEach((pItem, pIndex) => {
1621
- if (pIndex !== index) {
1622
- pItem.selected = false;
1623
- }
1624
- });
1625
- item.selected = !item.selected;
1626
- },
1627
- handleParentNamesRemove(index, item) {
1628
- this.handleParent(index, item);
1629
- },
1630
- handleParent(index, item) {
1631
- let { conditionList = [] } = this.quickSearchListObj;
1632
- if (!conditionList || !conditionList.length) {
1633
- this.parentNames.splice(index, 1);
1634
- return;
1635
- }
1636
- let hasItem = conditionList.filter(v => v.displayCategory === item.value);
1637
- if (!hasItem || !hasItem.length) {
1638
- this.parentNames.splice(index, 1);
1639
- return;
1640
- }
1641
- this.$message.error("该分类下有已有数据,请删除该分类下的筛选集后重试!");
1642
- },
1643
- // 7.12保存列表搜索分类
1644
- async saveTableCondiTion(params) {
1645
- // let url = `/tableList/saveTableCondiTion`;
1646
- // this.axios.post(url, this.$qs.stringify(params)).then(({ data }) => {
1647
- // if (data.result == "SUCCESS") {
1648
- // this.showInner = false;
1649
- // this.formInner.resetFields();
1650
- // this.$emit("updateTableCondiTion");
1651
- // this.clearData();
1652
- // this.closeModal();
1653
- // } else {
1654
- // this.$message.error(data.resultMsg);
1655
- // }
1656
- // });
1657
- try {
1658
- let res = await this.handleGetConfigApi(params, 'requestSaveTableCondiTion');
1659
- if (!res) return;
1660
- this.showInner = false;
1661
- this.formInner.resetFields();
1662
- this.$emit("updateTableCondiTion");
1663
- this.clearData();
1664
- this.closeModal();
1665
- } catch (error) {
1666
- console.log(error)
1667
- }
1668
- },
1669
- cancelSaveToCalss() {
1670
- this.showInner = false;
1671
- },
1672
- // 清空快速搜索设置条件
1673
- clearData() {
1674
- this.handlerReset(this.quickSearch);
1675
- this.relationQuickSearch.forEach(item => {
1676
- this.handlerReset(item.fieldList);
1677
- });
1678
- if (this.source === "editTable") {
1679
- this.$emit("clearQuickSearchConfig");
1680
- return;
1681
- }
1682
- this.$listeners?.clearQuickSearchConfig();
1683
- },
1684
- handlerReset(arr) {
1685
- if (!Array.isArray(arr)) {
1686
- return;
1687
- }
1688
- arr.forEach(item => {
1689
- if (this.resetRenderWidgetValue(item)) return;
1690
-
1691
- let advanceOptionSetting = item?.advanceOptionSetting;
1692
- // 单选
1693
- let optionSetting0 =String(advanceOptionSetting) === '0';
1694
- if (item.EQ || item.CL) {
1695
- item.EQ = "";
1696
- item.CL = "";
1697
- } else if (item.con == "QUOTE" && vexutils.anyNotEmpty(item.value)) {
1698
- item.QUOTE = [];
1699
- item.value = [];
1700
- } else if(item.com == 'SelectMui' && item.con == 'CONVERT' && optionSetting0){
1701
- item.CONVERT = [];
1702
- item.value = undefined
1703
- } else if (vexutils.anyNotEmpty(item.CONVERT)) {
1704
- item.CONVERT = [];
1705
- } else if (item.DATE) {
1706
- item.showDate = String(advanceOptionSetting) == '1' ? true: false;
1707
- item.marginx = "ml";
1708
- item.DATE = {
1709
- con: null,
1710
- start_val: null,
1711
- end_val: null
1712
- };
1713
- } else if (item.BIRTHDAY) {
1714
- item.showDate = false;
1715
- item.marginx = "ml";
1716
- item.BIRTHDAY = this.initBirthdayParams();
1717
- } else if (item.LABELAttr) {
1718
- this.handleClearLabel(item);
1719
- } else if (item.EVALUATEAttr) {
1720
- item.selecteds = [];
1721
- } else if (item.AGEAttr) {
1722
- this.handleResetAge(item);
1723
- } else if (item.NUMBERFiled) {
1724
- this.clearFilterNumber(item);
1725
- }
1726
- });
1727
- },
1728
- initBirthdayParams() {
1729
- this.limit_date = "";
1730
- return {
1731
- con: null,
1732
- limit_date: [],
1733
- start_val: null,
1734
- end_val: null,
1735
- unit: "YEAR",
1736
- units: this.birthdayUnits.filter(i => i.units === 1)
1737
- };
1738
- },
1739
- // 单选按钮组合点击取消选中状态
1740
- clickRadioGroup(item, con) {
1741
- if (item.con == con) {
1742
- item.con = null;
1743
- } else {
1744
- if (item.con === "IN") {
1745
- item.start_val = null;
1746
- item.end_val = null;
1747
- }
1748
- item.con = con;
1749
- }
1750
- },
1751
- clickBirthdayRadioGroup(item, con) {
1752
- this.limit_date = "";
1753
- Object.assign(item, this.initBirthdayParams());
1754
- this.clickRadioGroup(item, con);
1755
- },
1756
- changeModalWindow() {
1757
- this.isChangeWindow = !this.isChangeWindow;
1758
- let docHeight = document.body.clientHeight;
1759
- this.modalWidth = this.modalWidth === "700px" ? `100%` : "700px";
1760
- this.modalHeight = this.modalHeight === "60vh" ? `${docHeight - 108}px` : "60vh";
1761
-
1762
- if (this.modalWidth === "700px") {
1763
- this.label_max_count = 8;
1764
- } else {
1765
- this.$nextTick(() => {
1766
- let ele = document.querySelector(".quickSearch_label-container");
1767
- ele && (this.label_max_count = parseInt((ele.clientWidth - 20) / 112) * 2);
1768
- });
1769
- }
1770
- },
1771
-
1772
- /* 获取 label */
1773
- handleRequestedLabel(v) {
1774
- let params = { type: v, pageSize: 10000 };
1775
- return this.axios.get("/label/list", { params: params });
1776
- },
1777
-
1778
- async handleSetLabelOptions(labelType, el) {
1779
- let labelObj = {};
1780
- let labelList = await this.handleGetConfigApi(labelType, 'requestedLabel');
1781
- labelList.forEach(n => {
1782
- this.$set(n, 'isSelect', false);
1783
- if (labelObj[n.typeName]) {
1784
- labelObj[n.typeName].itemList.push({ ...n });
1785
- } else {
1786
- labelObj[n.typeName] = {
1787
- itemList: [{ ...n }],
1788
- showAdd: false,
1789
- addVal: '',
1790
- typeName: n.typeName,
1791
- typeId: n.typeId,
1792
- isUnfold: false,
1793
- isShowBtn: false
1794
- };
1795
- }
1796
- });
1797
- this.$set(el, 'labelObj', labelObj);
1798
- this.$set(el, 'labelList', labelList);
1799
- },
1800
-
1801
- handleLabelColorClass(item) {
1802
- return item?.color?.split("-")[1] || "yellow";
1803
- },
1804
-
1805
- handleLabelChange() {
1806
- const args = arguments;
1807
- if (args.length === 3) {
1808
- let [flag, item, options] = [...arguments];
1809
- let selectedList = options.labelSelectList || [];
1810
- if (flag) {
1811
- if (selectedList.some(n => n.labelId == item.labelId)) {
1812
- return;
1813
- }
1814
- selectedList.push(item);
1815
- } else {
1816
- let fdIndex = selectedList.findIndex(n => n.labelId == item.labelId);
1817
- if (fdIndex != -1) {
1818
- selectedList.splice(fdIndex, 1);
1819
- }
1820
- }
1821
- options.labelSelectList = selectedList;
1822
- }
1823
- },
1824
-
1825
- handleClearLabel(v) {
1826
- v.labelSelectList.length = 0;
1827
- v.inputVal = "";
1828
- Object.entries(v.labelObj || {}).forEach(h => {
1829
- let [, item] = h;
1830
- item.itemList.forEach(l => {
1831
- l.isSelect = false;
1832
- });
1833
- });
1834
- },
1835
-
1836
- handleLabelUpfold(v) {
1837
- console.log('触发---isUnfold');
1838
- v.isUnfold = !v.isUnfold;
1839
- },
1840
-
1841
- handleEvaluateOnChange(tag, checked, item) {
1842
- if (checked) {
1843
- item.selecteds.push(tag.value);
1844
- } else {
1845
- let i = item.selecteds.findIndex(v => v === tag.value);
1846
- item.selecteds.splice(i, 1);
1847
- }
1848
- },
1849
-
1850
- // 年龄组件变化
1851
- ageRangeOnChange(obj, item) {
1852
- let s = obj.star_val;
1853
- let e = obj.end_val;
1854
- this.$set(item, "start_val", isNaN(s) ? undefined : s);
1855
- this.$set(item, "end_val", isNaN(e) ? undefined : e);
1856
- },
1857
-
1858
- // 清空年龄组件
1859
- handleResetAge(item) {
1860
- this.$set(item, "start_val", "");
1861
- this.$set(item, "end_val", "");
1862
- let key = `${item.columnName}_AGEAttr`;
1863
- let curRef = this.$refs[key];
1864
- if (Array.isArray(curRef)) {
1865
- curRef = curRef[0] || false;
1866
- }
1867
- curRef?.reset();
1868
- },
1869
-
1870
- onResize(el, v) {
1871
- let height = el.offsetHeight || 0;
1872
- // let ch = el?.firstElementChild?.offsetHeight || 0;
1873
- if (!height) {
1874
- return;
1875
- }
1876
- if (height > 80) {
1877
- v.isShowBtn = true;
1878
- } else {
1879
- v.isShowBtn = false;
1880
- v.isUnfold = false;
1881
- }
1882
- },
1883
- changeFilterNumber(item) {
1884
- if (item.lessValue && item.bigValue) {
1885
- const lessValue = item.lessValue;
1886
- const bigValue = item.bigValue;
1887
- if (bigValue < lessValue) {
1888
- this.$set(item, "lessValue", bigValue);
1889
- this.$set(item, "bigValue", lessValue);
1890
- }
1891
- return;
1892
- }
1893
- },
1894
- clearFilterNumber(item) {
1895
- this.$set(item, "lessValue", "");
1896
- this.$set(item, "bigValue", "");
1897
- },
1898
-
1899
- getI18nText(i, d) {
1900
- if (Array.isArray(i)) {
1901
- return this.$t ? this.$t.apply(this, i) : d;
1902
- }
1903
- return this.$t ? this.$t(i) : d;
1904
- },
1905
-
1906
- /**
1907
- * 限制日期填写
1908
- */
1909
- disabledDatePicker(current, item, t){
1910
- let f = false;
1911
- if(t=== 'start'){
1912
- const end_val = item?.DATE?.end_val;
1913
- f = end_val && current.valueOf() > end_val.valueOf();
1914
- } else if(t=== 'end') {
1915
- const start_val = item?.DATE?.start_val;
1916
- f = start_val && current.valueOf() <= start_val.valueOf();
1917
- }
1918
- /**
1919
- * 2 过去时间
1920
- * 3 未来时间
1921
- */
1922
- let type = String(item?.advanceOptionSetting);
1923
- if(!['2','3'].includes(type)) return f;
1924
- if(type === '2'){
1925
- return current >= this.$moment().endOf('day') || f;
1926
- } else if(type==='3'){
1927
- return current && current < this.$moment().startOf('day') || f;
1928
- }
1929
- return f
1930
- },
1931
- /**
1932
- * 限制时间
1933
- */
1934
- disabledTimePicker(current,item){
1935
-
1936
- }
1937
- },
1938
- directives: { resize }
1939
- });
1940
- </script>
1941
-
1942
- <style lang="less" scoped>
1943
- .form-box {
1944
- .quick-item {
1945
- margin-bottom: 10px;
1946
- min-width: 32px;
1947
-
1948
- .quick-row {
1949
- display: flex;
1950
- > div {
1951
- display: inline-block;
1952
- box-sizing: border-box;
1953
- }
1954
- .quick-item-title {
1955
- min-width: 80px;
1956
- line-height: 32px;
1957
- text-align: right;
1958
- padding-left: 12px;
1959
- color: #000;
1960
- }
1961
- .quick-item-col {
1962
- padding: 0 12px;
1963
- }
1964
- .quick-item-title-default {
1965
- width: 25%;
1966
- }
1967
- .quick-item-col-default {
1968
- width: 75%;
1969
- }
1970
- }
1971
- .check-box {
1972
- line-height: 32px;
1973
- }
1974
- .check-date-btn {
1975
- display: inline-block;
1976
- line-height: 32px;
1977
- height: 32px;
1978
- padding: 0 10px;
1979
- background-color: #ddd;
1980
- cursor: pointer;
1981
- &.ml {
1982
- margin-left: 20px;
1983
- }
1984
- &.mr {
1985
- margin-right: 20px;
1986
- }
1987
- }
1988
- .check-date {
1989
- display: inline-block;
1990
- line-height: 33px;
1991
- }
1992
- .birthday-item {
1993
- > div {
1994
- margin-top: 5px;
1995
- p {
1996
- display: inline-block;
1997
- margin: 0 20px;
1998
- }
1999
- > span {
2000
- margin-top: 5px;
2001
- }
2002
- }
2003
- .age-wrap {
2004
- display: inline-block;
2005
- }
2006
- }
2007
- /deep/ .ant-input-wrapper {
2008
- .ant-input-group-addon {
2009
- border: 1px solid #d9d9d9 !important;
2010
- border-left: 0 !important;
2011
- }
2012
- }
2013
-
2014
- /deep/ .num-picker {
2015
- position: relative;
2016
- display: flex;
2017
- &.num-picker-unit {
2018
- padding-right: 20px;
2019
- }
2020
- input {
2021
- text-align: left !important;
2022
- }
2023
- &:hover {
2024
- .clear-number-icon {
2025
- display: block;
2026
- }
2027
- }
2028
- /deep/ .ant-calendar-range-picker-input {
2029
- text-align: left;
2030
- }
2031
- .clear-number-icon {
2032
- position: absolute;
2033
- right: 5px;
2034
- top: 6px;
2035
- display: none;
2036
- cursor: pointer;
2037
- z-index: 1000;
2038
- }
2039
- }
2040
- }
2041
- .ant-radio-button-wrapper {
2042
- padding: 0 8px;
2043
- height: 30px;
2044
- line-height: 30px;
2045
- margin-top: 5px;
2046
- }
2047
-
2048
- // 标签
2049
- .label-attr-container {
2050
- .edit-label {
2051
- color: #000000;
2052
- font-size: 14px;
2053
- line-height: 32px;
2054
- padding-left: 0;;
2055
- }
2056
- .label-container-height {
2057
- overflow: hidden;
2058
- // width: 380px;
2059
- height: 74px;
2060
- flex: none;
2061
- }
2062
- .edit-content {
2063
- padding: 0;
2064
- }
2065
- .label-unfold-btn {
2066
- margin: 8px 0;
2067
- color: rgba(0, 0, 0, 0.6);
2068
- cursor: pointer;
2069
- >span {
2070
- display: flex;
2071
- align-items: center;
2072
- line-height: 1;
2073
- }
2074
- .anticon {
2075
- font-size: 16px;
2076
- margin-left: 8px;
2077
- }
2078
- &:hover {
2079
- color: #2d7aff;
2080
- }
2081
- &:active {
2082
- color: #2d7aff;
2083
- }
2084
- }
2085
- }
2086
- &.quick-search-table {
2087
- .module-title {
2088
- color: #506493;
2089
- line-height: 20px;
2090
- padding-left: 12px;
2091
- border-left: 4px solid #2d7aff;
2092
- }
2093
- .quick-item {
2094
- display: inline-block;
2095
- &.quick-block {
2096
- display: block;
2097
- }
2098
- }
2099
- }
2100
-
2101
- .psw-icon {
2102
- cursor: pointer;
2103
- &:active {
2104
- color: #5585f5;
2105
- // #2474ff
2106
- }
2107
- color: #969696;
2108
- }
2109
-
2110
- ::-webkit-input-placeholder {
2111
- /* WebKit browsers */
2112
- font-family: "Avenir", Helvetica, Arial, sans-serif;
2113
- }
2114
-
2115
- ::-moz-placeholder {
2116
- /* Mozilla Firefox 19+ */
2117
- font-family: "Avenir", Helvetica, Arial, sans-serif;
2118
- }
2119
-
2120
- :-ms-input-placeholder {
2121
- /* Internet Explorer 10+ */
2122
- font-family: "Avenir", Helvetica, Arial, sans-serif;
2123
- }
2124
- }
2125
- // .age-container {
2126
- // }
2127
- </style>
2128
- <style lang="less">
2129
- .quickSearch-saveToClass-modal {
2130
- .edit-tag {
2131
- position: relative;
2132
- display: inline-block;
2133
- margin-right: 10px;
2134
- margin-bottom: 10px;
2135
- .add-parent {
2136
- border-color: #d9d9d9;
2137
- }
2138
- .anticon-close {
2139
- position: absolute;
2140
- right: 5px;
2141
- line-height: 36px;
2142
- color: #2d7aff;
2143
- }
2144
- .ant-input-disabled {
2145
- color: #2d7aff;
2146
- background-color: rgba(45, 122, 255, 0.1);
2147
- opacity: 1;
2148
- border-color: #2d7aff;
2149
- cursor: pointer;
2150
- }
2151
- .ant-input-group-addon,
2152
- .ant-input:not(:hover),
2153
- .ant-input-number:not(:hover) {
2154
- border-color: #2d7aff !important;
2155
- }
2156
- &.edit-tag-select {
2157
- .ant-input-disabled {
2158
- color: #fff;
2159
- background-color: #2d7aff;
2160
- }
2161
- .anticon-close {
2162
- color: #fff;
2163
- }
2164
- }
2165
- }
2166
- }
2167
- </style>
1
+
2
+ <template>
3
+ <div>
4
+ <div class="form-box" :class="{ 'quick-search-table': source === 'editTable' }">
5
+ <p class="module-title" v-if="source === 'editTable' && hasRelationQuickSearch">高级筛选</p>
6
+ <div
7
+ class="quick-item"
8
+ v-for="item in quickSearch"
9
+ :key="item.sid || item.columnName"
10
+ :class="{ 'quick-block': quickClassName(item) }"
11
+ >
12
+ <div class="quick-row">
13
+ <!-- title -->
14
+ <div
15
+ class="quick-item-title"
16
+ :class="{ 'quick-item-title-default': source !== 'editTable' }"
17
+ >
18
+ <!-- <span>{{ handleName(item, "title") }}&nbsp;&nbsp;</span> -->
19
+ <text-over-tooltip
20
+ :refName="`quick-search-title-${item.columnName}`"
21
+ class="quick-search-title-tool-tip"
22
+ :content="item.alias || item.title"
23
+ ></text-over-tooltip>
24
+ <a-tooltip
25
+ v-if="searchFieldLimit[item.columnName] && searchFieldLimit[item.columnName].tips"
26
+ :title="searchFieldLimit[item.columnName].tips"
27
+ >
28
+ <svg-icon icon-class="xitongtubiaodaohangtubiaowenti" />
29
+ &nbsp;&nbsp;
30
+ </a-tooltip>
31
+ </div>
32
+ <div class="quick-item-col" :class="{ 'quick-item-col-default': source !== 'editTable' }">
33
+ <!-- 直接渲染组件 -->
34
+ <RenderWidget v-if="item.isRender" :cfg="item" v-model="item.value" source="quickSearch" :filterApiConfig="filterApiConfig" />
35
+ <!-- age -->
36
+ <!-- TODO: 清除,跨表 -->
37
+ <div v-else-if="item.AGEAttr" class="age-container">
38
+ <range-age
39
+ :ref="`${item.columnName}_AGEAttr`"
40
+ :format="item.format"
41
+ @change="ageRangeOnChange($event, item)"
42
+ ></range-age>
43
+ </div>
44
+ <!-- age -->
45
+ <!-- label -->
46
+ <div v-else-if="item.LABELAttr" class="label-attr-container">
47
+ <slot v-if="item.labelObj && Object.keys(item.labelObj || {}).length > 0">
48
+ <div v-for="(v, k) in item.labelObj" :key="k" class="edit-label-content">
49
+ <div class="edit-label">{{ k }}:</div>
50
+
51
+ <div
52
+ class="edit-content quickSearch_label-container"
53
+ :class="{
54
+ 'label-container-height': !v.isUnfold && v.itemList && v.isShowBtn
55
+ }"
56
+ >
57
+ <div class="label-content" v-resize="el => onResize(el, v)">
58
+ <a-checkable-tag
59
+ v-for="(v, i) in v.itemList"
60
+ v-model="v.isSelect"
61
+ @change="handleLabelChange($event, v, item)"
62
+ :key="i"
63
+ :style="handleLabelColor(v)"
64
+ >
65
+ <a-tooltip placement="topLeft">
66
+ <template slot="title">
67
+ <span>{{ v.labelName }}</span>
68
+ </template>
69
+ {{ v.labelName }}
70
+ </a-tooltip>
71
+ </a-checkable-tag>
72
+ </div>
73
+ </div>
74
+ <div class="label-unfold-btn" v-if="v.itemList && v.isShowBtn">
75
+ <!-- {{ v.isUnfold }} -->
76
+ <span @click.stop="handleLabelUpfold(v)">
77
+ <template v-if="v.isUnfold">
78
+ <span>收起</span>
79
+ <a-icon
80
+ type="up-square"
81
+
82
+ />
83
+ </template>
84
+ <template v-else>
85
+ <span>展开</span>
86
+ <a-icon
87
+ type="down-square"
88
+ />
89
+ </template>
90
+ </span>
91
+ </div>
92
+ </div>
93
+ </slot>
94
+ <a-input v-else style="width: 100%" v-model="item.inputVal" allowClear :placeholder="item.placeholder || `请输入${item.alias || item.title}`"></a-input>
95
+ </div>
96
+ <!-- label -->
97
+
98
+ <!-- EVALUATE -->
99
+ <div v-else-if="item.EVALUATEAttr" class="evaluate-attr-container">
100
+ <template v-for="tag in EVALUATEList">
101
+ <a-checkable-tag
102
+ :key="tag.value"
103
+ :checked="item.selecteds.indexOf(tag.value) > -1"
104
+ @change="checked => handleEvaluateOnChange(tag, checked, item)"
105
+ >
106
+ {{ tag.label }}
107
+ </a-checkable-tag>
108
+ </template>
109
+ <!-- <a-icon v-if="item.CL" type="close" @click="item.CL = ''" /> -->
110
+ </div>
111
+ <!-- EVALUATE -->
112
+
113
+ <!-- NUMBERFiled -->
114
+ <div v-else-if="item.NUMBERFiled" class="ant-calendar-picker" style="width: 100%">
115
+ <span
116
+ class="ant-calendar-picker-input ant-input num-picker"
117
+ :class="{ 'num-picker-unit': item.inputUnit }"
118
+ >
119
+ <input
120
+ v-model="item.lessValue"
121
+ @keyup.enter="() => changeFilterNumber(item)"
122
+ :title="`起始${item.alias || item.title}`"
123
+ :placeholder="`起始${item.alias || item.title}`"
124
+ class="ant-calendar-range-picker-input"/>
125
+ <span class="ant-calendar-range-picker-separator"> ~ &nbsp;</span>
126
+ <input
127
+ v-model="item.bigValue"
128
+ :title="`截止${item.alias || item.title}`"
129
+ @keyup.enter="() => changeFilterNumber(item)"
130
+ :placeholder="`截止${item.alias || item.title}`"
131
+ class="ant-calendar-range-picker-input"/>
132
+ <template v-if="item.inputUnit">&nbsp;{{ item.inputUnit }}</template>
133
+ <span
134
+ class="ant-input-suffix clear-number-icon"
135
+ v-if="item.lessValue || item.bigValue"
136
+ @click="clearFilterNumber(item)"
137
+ ><i
138
+ aria-label="图标: close-circle"
139
+ tabindex="-1"
140
+ class="anticon anticon-close-circle ant-input-clear-icon"
141
+ ><svg
142
+ viewBox="64 64 896 896"
143
+ data-icon="close-circle"
144
+ width="1em"
145
+ height="1em"
146
+ fill="currentColor"
147
+ aria-hidden="true"
148
+ focusable="false"
149
+ class=""
150
+ >
151
+ <path
152
+ d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
153
+ ></path></svg></i></span
154
+ ></span>
155
+ </div>
156
+ <!-- NUMBERFiled -->
157
+
158
+ <!-- other -->
159
+ <slot v-else>
160
+ <template v-if="item.con == 'CL'">
161
+ <template v-if="showPercent(item)">
162
+ <a-input-number
163
+ class="CL-input"
164
+ :style="`width: 100%`"
165
+ v-model="item.CL"
166
+ :min="0"
167
+ :max="100"
168
+ allowClear
169
+ :placeholder="item.placeholder || `请输入${item.alias || item.title}`"
170
+ />
171
+ </template>
172
+ <template v-else>
173
+ <a-input
174
+ class="CL-input"
175
+ :style="{
176
+ width: `100%`,
177
+ 'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
178
+ }"
179
+ v-model="item.CL"
180
+ :class="{ 'psw-icon': item.comAttr == 'PASSWORD' }"
181
+ allowClear
182
+ :placeholder="item.placeholder || `请输入${item.alias || item.title}`"
183
+ >
184
+ <template slot="suffix" v-if="item.comAttr == 'PASSWORD'">
185
+ <svg-icon
186
+ class="psw-icon"
187
+ @click="item.PASSWORDTYPE = !item.PASSWORDTYPE"
188
+ :icon-class="item.PASSWORDTYPE ? 'anniuyincang' : 'chakan'"
189
+ style="font-size: 1em;"
190
+ />
191
+ </template>
192
+ </a-input>
193
+ </template>
194
+ </template>
195
+ <template v-if="item.con == 'EQ'">
196
+ <template v-if="showPercent(item)">
197
+ <a-input-number
198
+ class="EQ-input"
199
+ :style="`width: 100%`"
200
+ v-model="item.EQ"
201
+ :min="0"
202
+ :max="100"
203
+ allowClear
204
+ :placeholder="item.placeholder|| `请输入${item.alias || item.title}`"
205
+ />
206
+ </template>
207
+ <template v-else>
208
+ <a-input
209
+ :class="{ 'psw-icon': item.comAttr == 'PASSWORD' }"
210
+ class="EQ-input"
211
+ :style="{
212
+ width: `100%`,
213
+ 'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
214
+ }"
215
+ v-model="item.EQ"
216
+ :placeholder="item.placeholder || `请输入${item.alias || item.title}`"
217
+ allowClear
218
+ >
219
+ <template slot="suffix" v-if="item.comAttr == 'PASSWORD'">
220
+ <svg-icon
221
+ class="psw-icon"
222
+ @click="item.PASSWORDTYPE = !item.PASSWORDTYPE"
223
+ :icon-class="item.PASSWORDTYPE ? 'anniuyincang' : 'chakan'"
224
+ style="font-size: 1em;"
225
+ />
226
+ </template>
227
+ </a-input>
228
+ </template>
229
+ </template>
230
+ <template v-if="showPercent(item)">&nbsp;%</template>
231
+ <!-- date -->
232
+ <div v-if="item.con == 'DATE'">
233
+ <a-radio-group v-model="item.DATE.con" buttonStyle="solid">
234
+ <a-radio-button
235
+ v-for="date in item.dateTeam"
236
+ v-show="!item.showDate"
237
+ @click="clickRadioGroup(item.DATE, date.con)"
238
+ :key="date.con"
239
+ :value="date.con"
240
+ >{{ getI18nText(date.title, date.name) }}
241
+ </a-radio-button>
242
+ <span v-show="item.advanceOptionSetting != 1" :class="['check-date-btn', item.marginx]" @click="checkDate(item)">{{
243
+ getI18nText('1.1.4.52', '选择时间')
244
+ }}</span>
245
+ <div class="check-date" v-show="item.showDate">
246
+ <a-date-picker
247
+ format="YYYY-MM-DD HH:mm:ss"
248
+ v-model="item.DATE.start_val"
249
+ :show-time="{
250
+ defaultValue: $moment('00:00:00', 'HH:mm:ss')
251
+ }"
252
+ :placeholder="getI18nText('1.1.4.53', '开始时间')"
253
+ style="width: 120px"
254
+ allowClear
255
+ :disabledDate="current => disabledDatePicker(current, item, 'start')"
256
+ />
257
+ &nbsp;
258
+ <a-date-picker
259
+ format="YYYY-MM-DD HH:mm:ss"
260
+ :show-time="{
261
+ defaultValue: $moment('23:59:59', 'HH:mm:ss')
262
+ }"
263
+ :placeholder="getI18nText('1.9.147', '结束时间')"
264
+ v-model="item.DATE.end_val"
265
+ style="width: 120px"
266
+ allowClear
267
+ :disabledDate="current => disabledDatePicker(current, item, 'end')"
268
+ />
269
+ </div>
270
+ </a-radio-group>
271
+ </div>
272
+ <!-- BIRTHDAY -->
273
+ <div v-if="item.con == 'BIRTHDAY'" :class="{ 'birthday-item': item.showDate }">
274
+ <a-radio-group v-model="item.BIRTHDAY.con" buttonStyle="solid">
275
+ <template v-if="!item.showDate">
276
+ <a-radio-button
277
+ v-for="date in birthdayTeam"
278
+ @click="clickBirthdayRadioGroup(item.BIRTHDAY, date.con)"
279
+ :key="date.con"
280
+ :value="date.con"
281
+ >{{ getI18nText(date.title, date.name) }}
282
+ </a-radio-button>
283
+ </template>
284
+ <template v-else>
285
+ <div>
286
+ <a-range-picker
287
+ v-model="item.BIRTHDAY.limit_date"
288
+ :disabledDate="disabledDate"
289
+ @change="changeRange"
290
+ format="MM-DD"
291
+ />
292
+ </div>
293
+ <div class="age-wrap">
294
+ <p>{{ getI18nText('1.2.5.34', '年龄') }}</p>
295
+ <a-input
296
+ style="width: 60px; margin-right: 10px"
297
+ v-model="item.BIRTHDAY.start_val"
298
+ allowClear
299
+ :placeholder="`开始${item.alias || item.title}`"
300
+ />
301
+ <a-input
302
+ style="width: 60px; margin-right: 10px"
303
+ v-model="item.BIRTHDAY.end_val"
304
+ allowClear
305
+ :placeholder="`截止${item.alias || item.title}`"
306
+ />
307
+ <a-select
308
+ v-model="item.BIRTHDAY.unit"
309
+ defaultValue="YEAR"
310
+ showSearch
311
+ :filterOption="filterOption"
312
+ allowClear
313
+ :placeholder="`请选择${item.alias || item.title}`"
314
+ >
315
+ <a-select-option
316
+ v-for="v in item.BIRTHDAY.units"
317
+ :key="v.con"
318
+ :value="v.con"
319
+ >
320
+ {{ getI18nText(v.title, v.name) }}
321
+ </a-select-option>
322
+ </a-select>
323
+ </div>
324
+ </template>
325
+ <span :class="['check-date-btn', item.marginx]" @click="checkBirthDay(item)">{{
326
+ getI18nText('1.1.5.2', '切换')
327
+ }}</span>
328
+ </a-radio-group>
329
+ </div>
330
+ <template v-if="item.con == 'QUOTE' || item.com == 'SelectMui'">
331
+ <c-tree-select
332
+ v-if="item.comType === 'treeSelect'"
333
+ :item="item"
334
+ :handleGetConfigApi="handleGetConfigApi"
335
+ style="margin: 0 8px 8px 0"
336
+ />
337
+ <multiSelect
338
+ v-else
339
+ :item="item"
340
+ source="quickSearch"
341
+ :maxTagPlaceholder="maxTagPlaceholder"
342
+ :outFilterChange="filterChange"
343
+ :handleWordBookSearch="handleSearch"
344
+ :dropdownVisibleChange="dropdownVisibleChange"
345
+ :fetchingWordbook="fetchingWordbook"
346
+ ></multiSelect>
347
+ </template>
348
+ <CheckboxGroup
349
+ v-else-if="item.con == 'CONVERT'"
350
+ class="check-box"
351
+ v-model="item.CONVERT"
352
+ :options="item.setting && item.setting.showSetting || []"
353
+ :multiple="String(item.advanceOptionSetting) != '0'"
354
+ ></CheckboxGroup>
355
+ </slot>
356
+ </div>
357
+ </div>
358
+ </div>
359
+ <!-- 跨表 -->
360
+ <template v-for="(relationItem, i) in relationQuickSearch">
361
+ <div :key="i" v-if="relationItem.fieldList && relationItem.fieldList.length">
362
+ <p class="module-title">{{ relationItem.tableName }}</p>
363
+ <div
364
+ class="quick-item"
365
+ v-for="item in relationItem.fieldList"
366
+ :key="item.sid"
367
+ :class="{
368
+ 'quick-block':
369
+ item.con == 'DATE' ||
370
+ item.con == 'BIRTHDAY' ||
371
+ item.con == 'CONVERT' ||
372
+ item.LABELAttr
373
+ }"
374
+ >
375
+ <div class="quick-row">
376
+ <!-- title -->
377
+ <div
378
+ class="quick-item-title"
379
+ :class="{ 'quick-item-title-default': source !== 'editTable' }"
380
+ >
381
+ <!-- <span>{{ handleName(item, "title") }}&nbsp;&nbsp;</span> -->
382
+ <text-over-tooltip
383
+ :refName="`quick-search-title-${item.columnName}`"
384
+ class="quick-search-title-tool-tip"
385
+ :content="item.alias || item.title"
386
+ ></text-over-tooltip>
387
+ </div>
388
+ <div
389
+ class="quick-item-col"
390
+ :class="{ 'quick-item-col-default': source !== 'editTable' }"
391
+ >
392
+ <div v-if="item.LABELAttr">
393
+ <slot v-if="item.labelObj && Object.keys(item.labelObj || {}).length > 0">
394
+ <div v-for="(v, k) in item.labelObj" :key="k" class="edit-label-content">
395
+ <div class="edit-label">{{ k }}:</div>
396
+ <div class="edit-content">
397
+ <div class="label-content">
398
+ <a-checkable-tag
399
+ v-for="(v, i) in v.itemList"
400
+ v-model="v.isSelect"
401
+ @change="handleLabelChange($event, v, item)"
402
+ :key="i"
403
+ :class="['label-tag-' + handleLabelColorClass(v)]"
404
+ >
405
+ <a-tooltip placement="topLeft">
406
+ <template slot="title">
407
+ <span>{{ v.labelName }}</span>
408
+ </template>
409
+ {{ v.labelName }}
410
+ </a-tooltip>
411
+ </a-checkable-tag>
412
+ </div>
413
+ </div>
414
+ </div>
415
+ </slot>
416
+ <a-input v-else style="width: 100%" v-model="item.inputVal" :placeholder="item.placeholder || `请输入${item.alias || item.title}`"> </a-input>
417
+ </div>
418
+
419
+ <!-- EVALUATE -->
420
+ <div v-else-if="item.EVALUATEAttr" class="evaluate-attr-container">
421
+ <template v-for="tag in EVALUATEList">
422
+ <a-checkable-tag
423
+ :key="tag.value"
424
+ :checked="item.selecteds.indexOf(tag.value) > -1"
425
+ @change="checked => handleEvaluateOnChange(tag, checked, item)"
426
+ >
427
+ {{ tag.label }}
428
+ </a-checkable-tag>
429
+ </template>
430
+ <!-- <a-icon v-if="item.CL" type="close" @click="item.CL = ''" /> -->
431
+ </div>
432
+ <!-- EVALUATE -->
433
+
434
+ <!-- NUMBERFiled -->
435
+ <div v-else-if="item.NUMBERFiled" class="ant-calendar-picker" style="width: 100%">
436
+ <span
437
+ class="ant-calendar-picker-input ant-input num-picker"
438
+ :class="{ 'num-picker-unit': item.inputUnit }"
439
+ >
440
+ <input
441
+ v-model="item.lessValue"
442
+ @keyup.enter="() => changeFilterNumber(item)"
443
+ :title="`起始${item.alias || item.title}`"
444
+ :placeholder="`起始${item.alias || item.title}`"
445
+ class="ant-calendar-range-picker-input"/>
446
+ <span class="ant-calendar-range-picker-separator"> ~ &nbsp;</span>
447
+ <input
448
+ v-model="item.bigValue"
449
+ :title="`截止${item.alias || item.title}`"
450
+ @keyup.enter="() => changeFilterNumber(item)"
451
+ :placeholder="`截止${item.alias || item.title}`"
452
+ class="ant-calendar-range-picker-input"/>
453
+ <template v-if="item.inputUnit">&nbsp;{{ item.inputUnit }}</template>
454
+ <span
455
+ class="ant-input-suffix clear-number-icon"
456
+ v-if="item.lessValue || item.bigValue"
457
+ @click="clearFilterNumber(item)"
458
+ ><i
459
+ aria-label="图标: close-circle"
460
+ tabindex="-1"
461
+ class="anticon anticon-close-circle ant-input-clear-icon"
462
+ ><svg
463
+ viewBox="64 64 896 896"
464
+ data-icon="close-circle"
465
+ width="1em"
466
+ height="1em"
467
+ fill="currentColor"
468
+ aria-hidden="true"
469
+ focusable="false"
470
+ class=""
471
+ >
472
+ <path
473
+ d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
474
+ ></path></svg></i
475
+ ></span>
476
+ <span class="ant-calendar-picker-icon"></span
477
+ ></span>
478
+ </div>
479
+ <!-- NUMBERFiled -->
480
+
481
+ <slot v-else>
482
+ <template v-if="item.con == 'CL'">
483
+ <template v-if="showPercent(item)">
484
+ <a-input-number
485
+ class="CL-input"
486
+ :style="`width: 100%`"
487
+ v-model="item.CL"
488
+ :min="0"
489
+ :max="100"
490
+ allowClear
491
+ :placeholder="item.placeholder || `请输入${item.alias || item.title}`"
492
+ />
493
+ </template>
494
+ <template v-else>
495
+ <a-input class="CL-input" :style="`width: 100%`" v-model="item.CL" allowClear :placeholder="item.placeholder || `请输入${item.alias || item.title}`">
496
+ </a-input>
497
+ </template>
498
+ </template>
499
+ <template v-if="item.con == 'EQ'">
500
+ <template v-if="showPercent(item)">
501
+ <a-input-number
502
+ class="EQ-input"
503
+ :style="`width: 100%`"
504
+ v-model="item.EQ"
505
+ :min="0"
506
+ :max="100"
507
+ allowClear
508
+ :placeholder="item.placeholder|| `请输入${item.alias || item.title}`"
509
+ />
510
+ </template>
511
+ <template v-else>
512
+ <a-input
513
+ class="EQ-input"
514
+ :style="`width: 100%`"
515
+ v-model="item.EQ"
516
+ :placeholder="item.placeholder || `请输入${item.alias || item.title}`"
517
+ allowClear
518
+ >
519
+ </a-input>
520
+ </template>
521
+ </template>
522
+ <template v-if="showPercent(item)">&nbsp;%</template>
523
+ <!-- date -->
524
+ <div v-if="item.con == 'DATE'">
525
+ <a-radio-group v-model="item.DATE.con" buttonStyle="solid">
526
+ <a-radio-button
527
+ v-for="date in useDateTeam"
528
+ v-show="!item.showDate"
529
+ @click="clickRadioGroup(item.DATE, date.con)"
530
+ :key="date.con"
531
+ :value="date.con"
532
+ >{{ getI18nText(date.title, date.name) }}
533
+ </a-radio-button>
534
+ <span :class="['check-date-btn', item.marginx]" @click="checkDate(item)">{{
535
+ getI18nText('1.1.4.53', '开始时间')
536
+ }}</span>
537
+ <div class="check-date" v-show="item.showDate">
538
+ <a-date-picker
539
+ format="YYYY-MM-DD HH:mm:ss"
540
+ v-model="item.DATE.start_val"
541
+ :show-time="{
542
+ defaultValue: $moment('00:00:00', 'HH:mm:ss')
543
+ }"
544
+ :placeholder="getI18nText('1.1.4.53', '开始时间')"
545
+ style="width: 120px"
546
+ allowClear
547
+ />
548
+ &nbsp;
549
+ <a-date-picker
550
+ format="YYYY-MM-DD HH:mm:ss"
551
+ v-model="item.DATE.end_val"
552
+ :placeholder="getI18nText('1.9.147', '结束时间')"
553
+ :show-time="{
554
+ defaultValue: $moment('23:59:59', 'HH:mm:ss')
555
+ }"
556
+ style="width: 120px"
557
+ allowClear
558
+ />
559
+ </div>
560
+ </a-radio-group>
561
+ </div>
562
+ <template v-if="item.con == 'QUOTE' || item.com == 'SelectMui'">
563
+ <c-tree-select
564
+ v-if="item.comType === 'treeSelect'"
565
+ :item="item"
566
+ :handleGetConfigApi="handleGetConfigApi"
567
+ style="margin: 0 8px 8px 0"
568
+ />
569
+ <multiSelect
570
+ v-else
571
+ :item="item"
572
+ source="quickSearch"
573
+ :maxTagPlaceholder="maxTagPlaceholder"
574
+ :outFilterChange="filterChange"
575
+ :handleWordBookSearch="handleSearch"
576
+ :dropdownVisibleChange="dropdownVisibleChange"
577
+ :fetchingWordbook="fetchingWordbook"
578
+ ></multiSelect>
579
+ </template>
580
+ <CheckboxGroup
581
+ v-else-if="item.con == 'CONVERT'"
582
+ class="check-box"
583
+ v-model="item.CONVERT"
584
+ :options="item.setting && item.setting.showSetting || []"
585
+ :multiple="String(item.advanceOptionSetting) != '0'"
586
+ ></CheckboxGroup>
587
+ </slot>
588
+ </div>
589
+ </div>
590
+ </div>
591
+ </div>
592
+ </template>
593
+ </div>
594
+
595
+ <a-modal
596
+ :title="'设置筛选分类'"
597
+ :visible="showInner"
598
+ @ok="saveToCalss"
599
+ @cancel="cancelSaveToCalss"
600
+ wrapClassName="quickSearch-saveToClass-modal"
601
+ >
602
+ <a-form :form="formInner" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
603
+ <a-form-item :label="'筛选集名称'">
604
+ <a-input
605
+ v-decorator="[
606
+ 'classname',
607
+ {
608
+ rules: [{ required: true, message: getI18nText('1.1.6.6', '请输入分类名称') }]
609
+ }
610
+ ]"
611
+ />
612
+ </a-form-item>
613
+ </a-form>
614
+ <a-row>
615
+ <a-col :span="5" style="text-align: right; color: rgba(0, 0, 0, 0.85)"> 父类名称: </a-col>
616
+ <a-col :span="18">
617
+ <div
618
+ class="edit-tag"
619
+ v-for="(item, index) in parentNames"
620
+ :key="index"
621
+ @dblclick="e => editParentName(e, item)"
622
+ @click="handleParentNameSelect(item, index)"
623
+ :class="{ 'edit-tag-select': item.selected && item.disabled }"
624
+ >
625
+ <a-input
626
+ style="width: 100px"
627
+ :value="item"
628
+ :disabled="item.disabled"
629
+ @blur="() => (item.disabled = true)"
630
+ v-model="item.value"
631
+ />
632
+ <a-icon slot="suffix" type="close" @click="handleParentNamesRemove(index, item)" />
633
+ </div>
634
+ <template v-if="!parentNamesHasAdd">
635
+ <a-button
636
+ v-show="!showAdd"
637
+ icon="plus"
638
+ type="dashed"
639
+ class="add-parent"
640
+ @click="handleParentNamesAdd"
641
+ >
642
+ {{ getI18nText('1.9.363', '添加分类') }}
643
+ </a-button>
644
+ <a-input
645
+ class="edit-tag"
646
+ v-model.trim="addVal"
647
+ v-show="showAdd"
648
+ style="width: 100px"
649
+ @blur="hanldeBlur"
650
+ />
651
+ </template>
652
+ </a-col>
653
+ </a-row>
654
+ </a-modal>
655
+ </div>
656
+ <!-- </a-modal> -->
657
+ </template>
658
+
659
+ <script>
660
+ const EVALUATEList = [
661
+ {
662
+ label: "一星",
663
+ value: "1",
664
+ isSelect: false
665
+ },
666
+ {
667
+ label: "二星",
668
+ value: "2",
669
+ isSelect: false
670
+ },
671
+ {
672
+ label: "三星",
673
+ value: "3",
674
+ isSelect: false
675
+ },
676
+ {
677
+ label: "四星",
678
+ value: "4",
679
+ isSelect: false
680
+ },
681
+ {
682
+ label: "五星",
683
+ value: "5",
684
+ isSelect: false
685
+ }
686
+ ];
687
+
688
+ const AGEOPTIONS = [
689
+ {
690
+ label: "岁",
691
+ value: "YY"
692
+ },
693
+ {
694
+ label: "月",
695
+ value: "MM"
696
+ },
697
+ {
698
+ label: "",
699
+ value: "DD"
700
+ }
701
+ ];
702
+ import tableSearchCon from "../mixins/tableSearchCon";
703
+ import moment from 'moment';
704
+ import 'moment/locale/zh-cn';
705
+ // antd
706
+ import cloneDeep from 'lodash/cloneDeep';
707
+ import { Button, Icon, Dropdown, Select, Upload, DatePicker, Input, Menu, Radio, Checkbox, Row, Tag, InputNumber, Col, Form, Modal, Tooltip } from 'ant-design-vue';
708
+ import rangeAge from '../components/range-age/index';
709
+ import multiSelect from '../components/multi-select/multi-select';
710
+ import resize from 'vue-resize-directive';
711
+ import { durationMixin, $utils, filterApiFn } from '../mixins/mixins';
712
+ import vexutils from '@/utils/vexutils';
713
+ import wordBookutils from '../mixins/wordBookutils';
714
+ import renderWidget from '../mixins/renderWidget';
715
+ import cTreeSelect from '../components/c-tree-select/tree-select';
716
+ import create from '@/core/create';
717
+ import utils from '@/utils/utils-map';
718
+ import {dataOptions} from '../const/dataOptions'
719
+
720
+ import RenderWidget from '../components/render-widget/index.vue';
721
+ import TextOverTooltip from "../components/TextOverTooltip";
722
+ import CheckboxGroup from '../components/checkbox-group/CheckboxGroup.vue'
723
+ import svgIcon from '@/component/svg/index.vue';
724
+
725
+ export default create({
726
+ name: "quick-search",
727
+ mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, renderWidget],
728
+ props: {
729
+ visible: Boolean,
730
+ searchFieldList: {
731
+ type: Array,
732
+ default: () => []
733
+ },
734
+ searchFieldLimit: {
735
+ type: Object,
736
+ default: () => ({})
737
+ },
738
+ quickSearchConfig: Array,
739
+ source: String,
740
+ quickSearchListObj: Object,
741
+ originConditionList: Array,
742
+ isOrgAdmin: Boolean,
743
+ lastQuickSearchData: Array,
744
+ show: Boolean,
745
+ getFilterData: Function,
746
+ libSource: String
747
+ },
748
+ components: {
749
+ RenderWidget,
750
+ rangeAge,
751
+ [Button.name]: Button,
752
+ [Icon.name]: Icon,
753
+ [Dropdown.name]: Dropdown,
754
+ [Select.name]: Select,
755
+ [Select.Option.name]: Select.Option,
756
+ [Upload.name]: Upload,
757
+ [DatePicker.name]: DatePicker,
758
+ [DatePicker.RangePicker.name]: DatePicker.RangePicker,
759
+ [Input.name]: Input,
760
+ [Input.Group.name]: Input.Group,
761
+ [InputNumber.name]: InputNumber,
762
+ [Input.Search.name]: Input.Search,
763
+ [Menu.name]: Menu,
764
+ [Menu.Item.name]: Menu.Item,
765
+ [Menu.ItemGroup.name]: Menu.ItemGroup,
766
+ [Radio.name]: Radio,
767
+ [Radio.Button.name]: Radio.Button,
768
+ [Radio.Group.name]: Radio.Group,
769
+ [Checkbox.name]: Checkbox,
770
+ [Checkbox.Group.name]: Checkbox.Group,
771
+ [Row.name]: Row,
772
+ [Col.name]: Col,
773
+ [Tag.name]: Tag,
774
+ AModal: Modal,
775
+ [Form.name]: Form,
776
+ [Tooltip.name]: Tooltip,
777
+ [Form.Item.name]: Form.Item,
778
+ [Tag.CheckableTag.name]: Tag.CheckableTag,
779
+ multiSelect,
780
+ cTreeSelect,
781
+ TextOverTooltip,
782
+ CheckboxGroup,
783
+ svgIcon
784
+ },
785
+ computed: {
786
+ showPercent() {
787
+ return function(item) {
788
+ return item.settingObj?.attr === "PERCENTAGE" || false;
789
+ };
790
+ },
791
+ getEleWidth(){
792
+ return function(item) {
793
+ return `${item.advanceColWidth || 200}px`
794
+ }
795
+ },
796
+ hasRelationQuickSearch() {
797
+ return this.relationQuickSearch.findIndex(i => i.fieldList && i.fieldList.length) != -1;
798
+ },
799
+ parentNamesHasAdd() {
800
+ if (!this.parentNames.length) return false;
801
+ return this.parentNames.some(v => v.isAdd);
802
+ },
803
+ handleName() {
804
+ return function(item, key = "name") {
805
+ return item.alias || item[key];
806
+ };
807
+ },
808
+
809
+ $moment() {
810
+ return moment;
811
+ },
812
+ useDateTeam() {
813
+ if(this.libSource !== 'crm') return this.dateTeam0;
814
+ return this.dateTeam0.map(v => {
815
+ let obj = {...v}
816
+ if(obj.con.includes('LAST_')) {
817
+ obj.con = obj.con.replace(/LAST_/g, 'UP_')
818
+ }
819
+ return obj
820
+ })
821
+ }
822
+ },
823
+ data() {
824
+ return {
825
+ modalVisible: this.visible,
826
+ showInner: false,
827
+ quickSearch: [],
828
+ relationTableList: [], // 跨表查询
829
+ relationQuickSearch: [], // 跨表查询检索条件
830
+ formData: {},
831
+ searchItem: {},
832
+ curWordbookData: undefined,
833
+ curAutograph: "",
834
+ birthdayTeam: [],
835
+ limit_date: "",
836
+ birthdayUnits: [
837
+ { title: '1.2.5.58', units: 1, con: 'DAY', name: '天' },
838
+ { title: '1.2.5.59', units: 2, con: 'WEEK', name: '周' },
839
+ { title: '1.2.1.11.18', units: 1, con: 'MONTH', name: '月' },
840
+ { title: '1.9.273', units: 1, con: 'YEAR', name: '岁' },
841
+ ],
842
+ isChangeWindow: false,
843
+ modalWidth: "700px",
844
+ modalHeight: "60vh",
845
+ EVALUATEList,
846
+ AGEOPTIONS,
847
+ label_max_count: 8,
848
+ parentNames: [],
849
+ showAdd: false,
850
+ addVal: "",
851
+ fetchingWordbook: false,
852
+ ...dataOptions
853
+ };
854
+ },
855
+ watch: {
856
+ visible(value) {
857
+ this.modalVisible = value;
858
+ // this.init();
859
+ this.setDefaultCon(this.quickSearchConfig);
860
+ },
861
+ searchFieldList: {
862
+ immediate: true,
863
+ deep: true,
864
+ handler(val) {
865
+ if (val && val.length > 0) {
866
+ let { relationTableList = [] } = this.$attrs;
867
+ this.relationTableList = relationTableList;
868
+ this.init();
869
+ }
870
+ }
871
+ },
872
+ quickSearchConfig: {
873
+ handler(val) {
874
+ this.setDefaultCon(val);
875
+ },
876
+ deep: true
877
+ },
878
+ quickSearchListObj: {
879
+ immediate: true,
880
+ deep: true,
881
+ handler(val) {
882
+ if (!val || !Object.keys(val).length) {
883
+ this.parentNames = [];
884
+ return;
885
+ }
886
+ this.handleParentName();
887
+ }
888
+ },
889
+ quickSearch: {
890
+ deep: true,
891
+ handler() {
892
+ const conObj = this.getConObjParams() || [];
893
+ this.$emit("filterCountChange", conObj.length);
894
+ }
895
+ },
896
+ show: {
897
+ deep: true,
898
+ handler(newVal) {
899
+ if (newVal && this.lastQuickSearchData.length > 0) {
900
+ this.quickSearch = cloneDeep(this.lastQuickSearchData);
901
+ }
902
+ }
903
+ }
904
+ },
905
+ beforeCreate() {
906
+ this.formInner = this.$form.createForm(this);
907
+ },
908
+ created() {},
909
+ methods: {
910
+ quickClassName(item) {
911
+ return item.con == 'DATE' || item.con == 'BIRTHDAY' || (item.con == 'CONVERT' && item.com !== 'SelectMui') || item.LABELAttr || item._isBlock || item.AGEAttr
912
+ },
913
+ filterOption(...arg) {
914
+ return utils.filterOption(...arg);
915
+ },
916
+ handleLabelColor(...arg) {
917
+ return utils.handleLabelColor(...arg);
918
+ },
919
+ init() {
920
+ this.quickSearch = [];
921
+ this.relationQuickSearch = [];
922
+ this.birthdayTeam = this.useDateTeam.filter(
923
+ item => {
924
+ if(this.libSource !== 'crm') return item.con != "THIS_YEAR" && item.con != "NEXT_YEAR" && item.con != "LAST_YEAR"
925
+ item.con != "THIS_YEAR" && item.con != "NEXT_YEAR" && item.con != "UP_YEAR"
926
+ }
927
+ );
928
+ let copyList = cloneDeep(this.searchFieldList);
929
+ let mySearchFieldList = copyList.filter(i => {
930
+ let { isRender, rangeFilter, widgetType } = i.widgetCfg || {};
931
+ // 快速搜索中组件不同
932
+ if (isRender && rangeFilter && ['DATETIME_RANGE', 'DATE_RANGE'].includes(widgetType)) {
933
+ i.widgetType = 'DATE_RANGE_QUICK';
934
+ i.widgetCfg.widgetType = 'DATE_RANGE_QUICK';
935
+ }
936
+ return i.isShowSearch == 1 && i.filterExplicit != 1
937
+ }) || [];
938
+ // let relationTableList = JSON.parse(JSON.stringify(this.relationTableList));
939
+ let relationTableList = cloneDeep(this.relationTableList);
940
+
941
+ // 跨表
942
+ let relationQuickSearch = relationTableList.map(item => {
943
+ return {
944
+ fieldList: item.fieldList.fieldList.filter(item => item.isShowSearch == 1 && item.filterExplicit != 1),
945
+ tableName: item.tableName,
946
+ primaryField: item.primaryField,
947
+ parameterConversionId: item.parameterConversionId,
948
+ tableId: item.tableId,
949
+ relationField: item.relationField,
950
+ converFun: item.converFun,
951
+ relationOrgId: item.relationOrgId,
952
+ preConObj: item.preConObj,
953
+ preSqlExpression: item.preSqlExpression
954
+ };
955
+ });
956
+
957
+ this.$set(this, "relationQuickSearch", relationQuickSearch);
958
+ // 过滤获取 快速检索的字段
959
+ this.quickSearch = mySearchFieldList || [];
960
+ this.handlerInitSearchItem(this.quickSearch);
961
+ this.relationQuickSearch.forEach(item => {
962
+ this.handlerInitSearchItem(item.fieldList);
963
+ });
964
+ },
965
+ handleParentName() {
966
+ let parentNames = [];
967
+ let { displayCategoryList = [] } = this.quickSearchListObj;
968
+ if (!displayCategoryList || !displayCategoryList.length) {
969
+ this.parentNames = [];
970
+ return;
971
+ }
972
+ displayCategoryList.forEach(item => {
973
+ if (item !== "未分类") {
974
+ parentNames.push({
975
+ disabled: true,
976
+ selected: false,
977
+ value: item
978
+ });
979
+ }
980
+ });
981
+ this.parentNames = parentNames;
982
+ },
983
+ setDefaultCon(val) {
984
+ if (!val.length) {
985
+ this.quickSearch.forEach((item, index) => {
986
+ if (this.isRender(item)) {
987
+ this.$set(this.quickSearch[index], "value", this.getDefValByRenderWidget(item));
988
+ return;
989
+ }
990
+
991
+ let advanceOptionSetting = item?.advanceOptionSetting;
992
+ // 单选
993
+ let optionSetting0 =String(advanceOptionSetting) == '0';
994
+ let settingLen = item.setting?.showSetting?.length;
995
+ let isCheck = optionSetting0 && settingLen && settingLen < 10;
996
+ if(optionSetting0 && !isCheck){
997
+ this.$set(this.quickSearch[index], "value", undefined);
998
+ } else {
999
+ if (item.CONVERT && Array.isArray(item.CONVERT)) {
1000
+ this.$set(this.quickSearch[index], "CONVERT", []);
1001
+ }
1002
+ }
1003
+
1004
+ });
1005
+ return false;
1006
+ }
1007
+
1008
+ this.quickSearch.forEach((item, index) => {
1009
+ let advanceOptionSetting = item?.advanceOptionSetting;
1010
+ // 单选
1011
+ let optionSetting0 =String(advanceOptionSetting) == '0';
1012
+ let find = val.find(valItem => valItem.field_key === item.columnName);
1013
+ if (find) {
1014
+ if (this.isRender(item)) {
1015
+ this.$set(this.quickSearch[index], "value", this.getDefValByRenderConObj(find, item));
1016
+ return;
1017
+ }
1018
+
1019
+ let value = find?.value
1020
+ let isTrance = item.CONVERT && Array.isArray(item.CONVERT) || item.comType == "SelectMui" && item.con == "CONVERT"
1021
+ // wordbook多选
1022
+ let isWordBookMulti = value && item.comType === "SelectMuiWordBook"&& typeof value ==='string' && value.includes('|#|')
1023
+ if(isWordBookMulti) {
1024
+ value = value.split('|#|')
1025
+ }
1026
+ if(Array.isArray(value) && isTrance){
1027
+ let value = find?.value?.map?.(item => JSON.stringify(item)) || find.value;
1028
+ value = value.filter(Boolean)
1029
+ this.$set(this.quickSearch[index], "CONVERT", value);
1030
+ if(optionSetting0){
1031
+ let i = value[0] ? item.labelList.findIndex(v=> v.value== value[0]) : ""
1032
+ this.$set(this.quickSearch[index], "value", i);
1033
+ }
1034
+ } else {
1035
+ this.$set(this.quickSearch[index], "value", value);
1036
+ }
1037
+ } else {
1038
+ this.$set(this.quickSearch[index], "CONVERT",optionSetting0?"": []);
1039
+ }
1040
+ });
1041
+ },
1042
+ handlerInitSearchItem(arr) {
1043
+ if (!Array.isArray(arr)) return;
1044
+ arr.forEach(el => {
1045
+ // 直接渲染相应组件,不经过下面的字段判断
1046
+ if (this.initRenderWidgetCfg(el)) return;
1047
+
1048
+ const isPreciseSearch = el?.settingObj?.isPreciseSearch || "";
1049
+
1050
+ if (el.setting) {
1051
+ // el.seting 可能是 string / object
1052
+ el.setting = typeof el.setting == "string" ? JSON.parse(el.setting) : el.setting;
1053
+
1054
+ let advanceOptionSetting = el?.advanceOptionSetting;
1055
+ // 单选
1056
+ let optionSetting0 =String(advanceOptionSetting) == '0';
1057
+ let wordbookId = el?.setting?.wordbook?.id;
1058
+ if (vexutils.anyNotEmpty(el.setting?.wordbook) && wordbookId) {
1059
+ let isTree = "tree" === el?.setting?.wordbook?.showType;
1060
+ let comType = isTree ? 'treeSelect' : 'SelectMuiWordBook';
1061
+ let defVal = isTree ? [] : [];
1062
+ if(optionSetting0){
1063
+ defVal = undefined
1064
+ }
1065
+ this.$set(el, "con", "QUOTE");
1066
+ this.$set(el, "dataSource", []);
1067
+ this.$set(el, "QUOTE", []);
1068
+ this.$set(el, "value", defVal);
1069
+ this.$set(el, "com", "SelectMui");
1070
+ this.$set(el, "comType", comType);
1071
+ this.$set(el, "searchPageConfig", {
1072
+ keyword: undefined,
1073
+ isRequest: false, // 是否已请求
1074
+ page: 1, // 当前页
1075
+ total: 1, // 总页数
1076
+ hasNextPage: false
1077
+ });
1078
+ return;
1079
+ } else if (el.setting.showSetting && el.setting.showSetting.length > 0) {
1080
+ this.$set(el, "con", "CONVERT");
1081
+ let showSetting = el.setting.showSetting;
1082
+
1083
+ // 字典推荐值
1084
+ let dictionItem = this.handleDictionDef(el);
1085
+ if (dictionItem) {
1086
+ showSetting.unshift(dictionItem);
1087
+ }
1088
+ showSetting.forEach(set => {
1089
+ set.label = set.change_text;
1090
+ set.value = JSON.stringify(set.filter);
1091
+ });
1092
+ // el.setting.showSetting.forEach(set => {
1093
+ // this.$set(set, "label", set.change_text);
1094
+ // this.$set(set, "value", JSON.stringify(set.filter));
1095
+ // });
1096
+ /**
1097
+ * 映射方式的单选模式
1098
+ */
1099
+ let isCheck = optionSetting0 && showSetting.length && showSetting.length < 10
1100
+ if(optionSetting0 && !isCheck){
1101
+ this.$set(el, "com", "SelectMui");
1102
+ this.$set(el, "comType", "SelectMui");
1103
+ const labelList = el.setting.showSetting.map(i => {
1104
+ i.labelName = i.change_text;
1105
+ return i;
1106
+ });
1107
+ this.$set(el, "labelList", labelList);
1108
+ }
1109
+
1110
+ this.$set(el.setting, "showSetting", showSetting);
1111
+ let convertDef = optionSetting0 ? isCheck ? [] : "" : [];
1112
+ this.$set(el, "CONVERT", convertDef);
1113
+ return;
1114
+ }
1115
+ }
1116
+ if (el.setting?.attr === "LABEL") {
1117
+ this.$set(el, "con", "CL"); // 2020-09-04 朱亚徽 EQ => CL
1118
+ this.$set(el, "LABELAttr", true);
1119
+ this.$set(el, "labelSelectList", []);
1120
+ this.$set(el, "inputVal", "");
1121
+ this.handleSetLabelOptions(el.setting.labelType, el);
1122
+ } else if (el.setting?.attr === "EVALUATE") {
1123
+ this.$set(el, "con", "CL");
1124
+ this.$set(el, "selecteds", []);
1125
+ this.$set(el, "EVALUATEAttr", true);
1126
+ } else if (el.setting?.attr === "AGE" && el.fieldType != "NUMBER") {
1127
+ // 年龄组件
1128
+ let format = el.setting.format || "YYYY-MM-DD";
1129
+ format = format.toUpperCase();
1130
+ this.$set(el, "con", "IN");
1131
+ this.$set(el, "ageObj", {});
1132
+ this.$set(el, "format", format);
1133
+ this.$set(el, "AGEAttr", true);
1134
+ } else if (el.setting?.attr === "PASSWORD") {
1135
+ this.$set(el, "con", "CL");
1136
+ this.$set(el, "comAttr", "PASSWORD");
1137
+ this.$set(el, "PASSWORDTYPE", true);
1138
+ } else if (el.fieldType == "NUMBER") {
1139
+ this.$set(el, "con", "EQ");
1140
+ this.$set(el, "EQ", "");
1141
+ this.$set(el, "NUMBERFiled", true);
1142
+ this.$set(el, "lessValue", "");
1143
+ this.$set(el, "bigValue", "");
1144
+ if (el.setting?.attr == "PERCENTAGE") {
1145
+ this.$set(el, "inputUnit", "%");
1146
+ }
1147
+ } else if (el.fieldType.includes("DATE")) {
1148
+ if (el.settingObj && el.settingObj.attr == "BIRTHDAY") {
1149
+ this.$set(el, "con", "BIRTHDAY");
1150
+ this.$set(el, "showDate", false);
1151
+ this.$set(el, "marginx", "ml");
1152
+ this.$set(el, "BIRTHDAY", this.initBirthdayParams());
1153
+ } else {
1154
+ // 判断是否有默认值
1155
+ const value = this.getSearchDefValueByLimit(el, this.searchFieldLimit);
1156
+ let hasValue = Array.isArray(value);
1157
+ let advanceOptionSetting = el?.advanceOptionSetting;
1158
+ // 选择时间模式
1159
+ let optionSetting1 = String(advanceOptionSetting) == '1';
1160
+
1161
+ this.$set(el, "con", "DATE");
1162
+ this.$set(el, "showDate", optionSetting1 || hasValue);
1163
+ this.$set(el, "marginx",optionSetting1 || hasValue ? "mr" : "ml");
1164
+ this.$set(el, "DATE", {
1165
+ con: hasValue ? "IN" : null,
1166
+ start_val: hasValue ? value[0] : null,
1167
+ end_val: hasValue ? value[1] : null
1168
+ });
1169
+ let dateTeam = optionSetting1 ? [] : this[`dateTeam${advanceOptionSetting}`] || this.dateTeam0;
1170
+ dateTeam = this.handleDateTeam(dateTeam);
1171
+ this.$set(el, 'dateTeam' , dateTeam)
1172
+ }
1173
+ } else if (el.fieldType == "TEXT") {
1174
+ /**
1175
+ * NUMBER和TEXT属性字段
1176
+ * 如果 开启了精准搜索,则传条件的时候 要传 EQ
1177
+ * isPreciseSearch: 0/1
1178
+ */
1179
+ let con = isPreciseSearch == 1 ? 'EQ': 'CL';
1180
+ this.$set(el, "con", con);
1181
+ this.$set(el, "isPreciseSearch", isPreciseSearch == 1);
1182
+ this.$set(el, con, "");
1183
+ } else if (el.fieldType == "JSONB") {
1184
+ this.$set(el, "con", "EQ");
1185
+ this.$set(el, "EQ", "");
1186
+ }
1187
+ });
1188
+ },
1189
+ // 兼容二次开发平台数据
1190
+ handleDateTeam(dateTeam){
1191
+ if(this.libSource !== 'crm') return dateTeam;
1192
+ return dateTeam.map(v => {
1193
+ let obj = {...v}
1194
+ if(obj.con.includes('LAST_')) {
1195
+ obj.con = obj.con.replace(/LAST_/g, 'UP_')
1196
+ }
1197
+ return obj
1198
+ })
1199
+ },
1200
+ // 字典推荐值 item处理
1201
+ handleDictionDef(el) {
1202
+ let { defaultValue, defaultValueTitle } = el?.dictionarieObj || {};
1203
+ let dictionItem = null;
1204
+ if (defaultValue && defaultValueTitle) {
1205
+ dictionItem = {
1206
+ change_text: defaultValueTitle,
1207
+ filter: [
1208
+ {
1209
+ con: "EQ",
1210
+ field_key: el.columnName,
1211
+ value: defaultValue
1212
+ }
1213
+ ]
1214
+ };
1215
+ }
1216
+ return dictionItem;
1217
+ },
1218
+ checkDate(item) {
1219
+ item.showDate = !item.showDate;
1220
+ item.showDate ? (item.marginx = "mr") : (item.marginx = "ml");
1221
+ },
1222
+ checkBirthDay(item) {
1223
+ item.showDate = !item.showDate;
1224
+ },
1225
+ getWordbookData(o, obj) {
1226
+ let { id, filterKeys, wordbookType } = o;
1227
+ this.fetchingWordbook = true;
1228
+ let resFieldKeys = Array.isArray(filterKeys) ? JSON.stringify(filterKeys) : filterKeys;
1229
+ let url = `/tableReader/getWordbookData`;
1230
+ let params = {
1231
+ wordbookId: id,
1232
+ fieldKeys: resFieldKeys,
1233
+ wordbookType: wordbookType || "WORDBOOK",
1234
+ asyncCount: 1, // 开启性能模式
1235
+ ...obj
1236
+ };
1237
+ return this.handleGetConfigApi(params, 'requestGetWordbookData', { fields: o }).then(res => {
1238
+ this.fetchingWordbook = false;
1239
+ if(typeof res.data === 'object'){
1240
+ res.data.reqParams = params;
1241
+ }
1242
+ return res;
1243
+ }).catch(() => {
1244
+ this.fetchingWordbook = false;
1245
+ });
1246
+ },
1247
+ handleWordbookData(item, data, params) {
1248
+ this.$set(item, "hasFieldList", false);
1249
+ const {rows,hasFieldList,searchPageConfig} = wordBookutils.handleWordbookData(item,data,params);
1250
+ this.$set(item, "hasFieldList", hasFieldList);
1251
+ this.$set(item, "dataSource", rows);
1252
+ item.searchPageConfig = Object.assign(item.searchPageConfig, searchPageConfig);
1253
+ },
1254
+ filterChange() {},
1255
+ maxTagPlaceholder(item) {
1256
+ if (Array.isArray(item.value)) {
1257
+ return item.value.length;
1258
+ } else {
1259
+ return 1;
1260
+ }
1261
+ },
1262
+ dropdownVisibleChange(open, item) {
1263
+ if (item.comType == "SelectMui" && String(item.advanceOptionSetting) === '0') return;
1264
+ if (open) {
1265
+ let obj = {};
1266
+ if (item.setting?.wordbook?.params) {
1267
+ item.setting?.wordbook?.params?.forEach(item => {
1268
+ obj[item.p_name] = item.p_value;
1269
+ });
1270
+ }
1271
+ if (item.settingObj.wordbook) {
1272
+ obj.autograph = item.settingObj.wordbook.autograph;
1273
+ }
1274
+ this.curWordbookData = item.setting?.wordbook;
1275
+ this.curAutograph = item.settingObj.wordbook && item.settingObj.wordbook.autograph;
1276
+ this.searchItem = item;
1277
+ this.getWordbookData(item.setting?.wordbook, obj).then(({ data }) => {
1278
+ this.handleWordbookData(item, data, obj);
1279
+ });
1280
+ }
1281
+ },
1282
+ /**
1283
+ * 输入自动联想
1284
+ */
1285
+ handleSearch(value, item, config={}) {
1286
+ if (item.comType == "SelectMui" && String(item.advanceOptionSetting) === '0') return;
1287
+ let params = {
1288
+ keyword: value,
1289
+ autograph: this.curAutograph
1290
+ };
1291
+ let obj = {};
1292
+ let p = item?.setting?.wordbook?.params || undefined;
1293
+ if (p) {
1294
+ item.setting?.wordbook?.params?.forEach(item => {
1295
+ obj[item.p_name] = item.p_value;
1296
+ });
1297
+ }
1298
+ let rp = { ...params, ...obj, ...config };
1299
+ this.getWordbookData(this.curWordbookData, rp).then(({ data }) => {
1300
+ this.handleWordbookData(this.searchItem, data, rp);
1301
+ });
1302
+ },
1303
+ onSave() {
1304
+ let mergeConObj = this.getMergeConObj();
1305
+ this.resetChangeWindow();
1306
+
1307
+ if (!this.validConObj(mergeConObj, this.searchFieldList, this.searchFieldLimit)) return false;
1308
+ this.$emit("onSave", mergeConObj);
1309
+ return this.quickSearch;
1310
+ },
1311
+ // 方便外部调用
1312
+ getMergeConObj() {
1313
+ let conObj = this.getConObjParams() || [];
1314
+ let mergeConObj = [...conObj];
1315
+ // 合并表格表头未设置高级筛选的筛选项
1316
+ this.quickSearchConfig.forEach(i => {
1317
+ let find = mergeConObj.find(j => {
1318
+ return i.field_key === j.field_key;
1319
+ });
1320
+ if (
1321
+ !find &&
1322
+ !this.quickSearch.find(item => {
1323
+ return item.columnName === i.field_key;
1324
+ })
1325
+ ) {
1326
+ mergeConObj.push(i);
1327
+ }
1328
+ });
1329
+ return mergeConObj || [];
1330
+ },
1331
+ getConObjParams() {
1332
+ let conObj = this.getConObj(this.quickSearch) || [];
1333
+ let realation = [];
1334
+ this.relationQuickSearch.forEach(item => {
1335
+ let curQuote = this.getConObj(item.fieldList);
1336
+ if (curQuote && curQuote.length) {
1337
+ realation.push({
1338
+ field_key: item.primaryField,
1339
+ valueField: item.relationField,
1340
+ con: "QUOTE_IN",
1341
+ tableId: item.tableId,
1342
+ parameterConversionId: item.parameterConversionId,
1343
+ converFun: item.converFun,
1344
+ preConObj: item.preConObj,
1345
+ relationOrgId: item.relationOrgId,
1346
+ preSqlExpression: item.preSqlExpression,
1347
+ quote_con: {
1348
+ conObj: this.getConObj(item.fieldList),
1349
+ sqlExpression: ""
1350
+ }
1351
+ });
1352
+ }
1353
+ });
1354
+ conObj.push(...realation);
1355
+ return conObj || [];
1356
+ },
1357
+ closeModal() {
1358
+ this.resetChangeWindow();
1359
+ this.$emit("closeModal");
1360
+ },
1361
+ resetChangeWindow() {
1362
+ this.modalWidth = "700px";
1363
+ this.modalHeight = "60vh";
1364
+ this.isChangeWindow = false;
1365
+ },
1366
+ // 填写搜索设置条件后打开新增搜索分类名称弹框
1367
+ openSaveToCalss() {
1368
+ let conObj = this.getConObjParams();
1369
+ if (!conObj) return;
1370
+ if (conObj.length > 0) {
1371
+ if (!this.validConObj(conObj, this.searchFieldList, this.searchFieldLimit)) return;
1372
+ this.showInner = true;
1373
+ } else {
1374
+ this.$message.warning(this.getI18nText('1.1.6.18', '请设置搜索条件'), 2);
1375
+ }
1376
+ },
1377
+ // 格式化设置搜索条件参数
1378
+ getConObj(arr) {
1379
+ // this.quickSearch
1380
+ if (!Array.isArray(arr)) {
1381
+ return [];
1382
+ }
1383
+ let conObj = [];
1384
+ for (let i = 0; i < arr.length; i++) {
1385
+ let item = arr[i];
1386
+
1387
+ const renderConObj = this.getRenderSearchConObj(item);
1388
+ if (renderConObj) {
1389
+ conObj.push(renderConObj);
1390
+ continue;
1391
+ }
1392
+
1393
+ let value = "";
1394
+ let limit_date = "";
1395
+ let advanceOptionSetting = item?.advanceOptionSetting;
1396
+ // 单选
1397
+ let optionSetting0 =String(advanceOptionSetting) === '0';
1398
+ if (item.EQ || item.CL) {
1399
+ value = item.EQ || item.CL;
1400
+ if (item.settingObj?.attr === "PERCENTAGE") {
1401
+ value = Number(value) / 100;
1402
+ }
1403
+ if (item.EVALUATEAttr) {
1404
+ value = item.selecteds.join("|#|");
1405
+ }
1406
+ } else if((item.comType == 'SelectMui'&& optionSetting0)){
1407
+ // 单选模式
1408
+ let i = item.value;
1409
+ let c = item?.labelList[i];
1410
+ if (item.con == "CONVERT") {
1411
+ value = c?.filter ? [c?.filter] : undefined
1412
+ } else {
1413
+ value= c?.labelName ? [c?.labelName] : undefined;
1414
+ }
1415
+ } else if (item.con == "QUOTE" && vexutils.anyNotEmpty(item.value)) {
1416
+ // value = item.QUOTE.join("|#|");
1417
+ if(item.comType == "treeSelect"){
1418
+ let cval = item.value;
1419
+ if(typeof cval === 'string'){
1420
+ [cval] = cval.split('<&=&>');
1421
+ value = cval;
1422
+ } else if(Array.isArray(cval)) {
1423
+ cval = cval.map((v)=>{
1424
+ let [k] = typeof v === 'string' ? v.split('<&=&>'): [];
1425
+ return k;
1426
+ })
1427
+ value = cval.join("|#|");
1428
+ }
1429
+ } else {
1430
+ value = item.value
1431
+ // 多选有时候数据类型是string join会报错
1432
+ if (item.value && Array.isArray(item.value) && !optionSetting0) {
1433
+ value = item.value.join("|#|");
1434
+ }
1435
+ }
1436
+ } else if (vexutils.anyNotEmpty(item.CONVERT) && Array.isArray(item.CONVERT)) {
1437
+ let optionSetting0 =String(advanceOptionSetting) === '0';
1438
+ let tempConvert = item.CONVERT.map(item => {
1439
+ if (item && vexutils.isJSON(item)) {
1440
+ return JSON.parse(item);
1441
+ }
1442
+ return item;
1443
+ });
1444
+ value = tempConvert
1445
+ if (optionSetting0) {
1446
+ value = tempConvert[0]
1447
+ }
1448
+ } else if (item.DATE && !item.AGEAttr) {
1449
+ // 年龄组件的不按照 date 类型处理
1450
+ if (item.DATE.start_val || item.DATE.end_val) {
1451
+ item.DATE.con = "IN";
1452
+ }
1453
+ item.tempCon = item.DATE.con;
1454
+ item.start_val = item.DATE.start_val
1455
+ ? item.DATE.start_val.format("YYYY-MM-DD HH:mm:ss")
1456
+ : "";
1457
+ item.end_val = item.DATE.end_val ? item.DATE.end_val.format("YYYY-MM-DD HH:mm:ss") : "";
1458
+ } else if (item.BIRTHDAY) {
1459
+ // 生日
1460
+ let isChange = false;
1461
+ if (
1462
+ item.BIRTHDAY.limit_date.length > 0 ||
1463
+ item.BIRTHDAY.start_val ||
1464
+ item.BIRTHDAY.end_val
1465
+ ) {
1466
+ item.BIRTHDAY.con = "IN";
1467
+ }
1468
+ item.tempCon = item.BIRTHDAY.con;
1469
+ // 因为年龄下拉有个默认值, 当输入框中有值时才取下拉值
1470
+ if (item.BIRTHDAY.start_val || item.BIRTHDAY.end_val) {
1471
+ isChange = true;
1472
+ } else {
1473
+ isChange = false;
1474
+ }
1475
+
1476
+ // 校验
1477
+ if (item.BIRTHDAY.start_val) {
1478
+ let res = vexutils.validateBirthday(
1479
+ item.BIRTHDAY.start_val,
1480
+ item.title,
1481
+ item.BIRTHDAY.unit
1482
+ );
1483
+ if (!res) return;
1484
+ }
1485
+ if (item.BIRTHDAY.end_val) {
1486
+ let res = vexutils.validateBirthday(
1487
+ item.BIRTHDAY.end_val,
1488
+ item.title,
1489
+ item.BIRTHDAY.unit
1490
+ );
1491
+ if (!res) return;
1492
+ }
1493
+ if (+item.BIRTHDAY.start_val > +item.BIRTHDAY.end_val) {
1494
+ this.$message.warning(this.getI18nText(['1.9.47', { title: item.title }], `${item.title}请输入有效范围`), 2);
1495
+ return;
1496
+ }
1497
+
1498
+ limit_date = this.limit_date || "";
1499
+ item.unit = isChange ? item.BIRTHDAY.unit || "" : "";
1500
+ item.start_val = item.BIRTHDAY.start_val || "";
1501
+ item.end_val = item.BIRTHDAY.end_val || "";
1502
+ }
1503
+ // 根据属性判断取值
1504
+ if (item.LABELAttr) {
1505
+ if (Object.keys(item.labelObj || {}).length > 0) {
1506
+ let valList = [];
1507
+ item.labelSelectList.forEach(v => {
1508
+ valList.push(v.labelName);
1509
+ });
1510
+ value = valList.join("|#|");
1511
+ } else {
1512
+ value = item.inputVal;
1513
+ }
1514
+ } else if (item.EVALUATEAttr) {
1515
+ value = item.selecteds.join("|#|");
1516
+ } else if (item.AGEAttr) {
1517
+ value = "";
1518
+ } else if (item.NUMBERFiled && (item.lessValue||item.bigValue) ) {
1519
+ let lessValue = item.lessValue ?? '';
1520
+ let bigValue = item.bigValue ?? '';
1521
+ if (item.setting?.attr === "PERCENTAGE") {
1522
+ lessValue = (lessValue || lessValue === 0) && Number(lessValue) / 100 || '';
1523
+ bigValue = (bigValue || bigValue === 0) && Number(bigValue) / 100;
1524
+ }
1525
+ value = `${lessValue}~${bigValue}`;
1526
+ }
1527
+ // 删除字符串前后空格
1528
+ if (value && vexutils.isString(value)) {
1529
+ value = value.trim();
1530
+ }
1531
+ let temp = {
1532
+ field_key: item.columnName, // 一级value
1533
+ con: item.DATE || item.BIRTHDAY ? item.tempCon : item.con, // 二级选择项value
1534
+ value: value, // input输入值
1535
+ limit_date: limit_date || "", // 生日
1536
+ start_val: item.start_val || "", // 开始时间
1537
+ end_val: item.end_val || "", // 结束时间
1538
+ unit: item.unit || "", // 年龄
1539
+ id: item.id
1540
+ };
1541
+ conObj.push(temp);
1542
+ }
1543
+ let dateCons = this.useDateTeam.map(item => item.con);
1544
+ let res = conObj.filter(
1545
+ item =>
1546
+ item.value ||
1547
+ item.limit_date ||
1548
+ item.start_val ||
1549
+ item.end_val ||
1550
+ dateCons.includes(item.con)
1551
+ );
1552
+ return res;
1553
+ },
1554
+ range(start, end) {
1555
+ const result = [];
1556
+ for (let i = start; i < end; i++) {
1557
+ result.push(i);
1558
+ }
1559
+ return result;
1560
+ },
1561
+ // 日期选择范围
1562
+ disabledDate(current) {
1563
+ return (
1564
+ (current && current < moment().startOf("year")) ||
1565
+ current > moment().endOf("year")
1566
+ );
1567
+ },
1568
+ changeRange(date, dateString) {
1569
+ // 这里没有使用item中的limit_date, 而是用全局的变量limit_date储存
1570
+ // 原因是因为range-picker 要求是个[] 并且v-model中的数据是个moment对象 即item.BIRRHDAY.limit_date = [moment, moment]
1571
+ if (dateString[0]) {
1572
+ this.limit_date = dateString.join("~");
1573
+ } else {
1574
+ this.limit_date = "";
1575
+ }
1576
+ },
1577
+ // 填写新增搜索分类名称后保存按钮
1578
+ saveToCalss() {
1579
+ this.formInner.validateFields((err, values) => {
1580
+ if (err) return;
1581
+ let conObj = this.getConObjParams();
1582
+ if (!conObj.length) {
1583
+ conObj = [];
1584
+ }
1585
+ let displayCategory = this.parentNames.filter(item => item.selected)[0]?.value;
1586
+ let params = {
1587
+ tableId: this.$attrs.tableId || "",
1588
+ setting: JSON.stringify({
1589
+ displayCategory,
1590
+ name: values.classname,
1591
+ conObj: conObj
1592
+ }),
1593
+ conditionList: JSON.stringify(this.originConditionList)
1594
+ };
1595
+ this.saveTableCondiTion(params);
1596
+
1597
+ });
1598
+ },
1599
+ handleParentNamesAdd(e) {
1600
+ const nextInput = e?.target?.nextElementSibling;
1601
+ setTimeout(() => {
1602
+ nextInput && nextInput.focus();
1603
+ });
1604
+ this.showAdd = true;
1605
+ },
1606
+ hanldeBlur() {
1607
+ this.showAdd = false;
1608
+ if (!this.addVal) return;
1609
+ this.parentNames.forEach(v => (v.selected = false));
1610
+ this.parentNames.push({
1611
+ disabled: true,
1612
+ value: this.addVal,
1613
+ selected: true,
1614
+ isAdd: true
1615
+ });
1616
+ this.addVal = "";
1617
+ },
1618
+ editParentName(e, item) {
1619
+ item.disabled = false;
1620
+ setTimeout(() => {
1621
+ e.target.focus();
1622
+ }, 0);
1623
+ },
1624
+ handleParentNameSelect(item, index) {
1625
+ if (!item.disabled) return;
1626
+ this.parentNames.forEach((pItem, pIndex) => {
1627
+ if (pIndex !== index) {
1628
+ pItem.selected = false;
1629
+ }
1630
+ });
1631
+ item.selected = !item.selected;
1632
+ },
1633
+ handleParentNamesRemove(index, item) {
1634
+ this.handleParent(index, item);
1635
+ },
1636
+ handleParent(index, item) {
1637
+ let { conditionList = [] } = this.quickSearchListObj;
1638
+ if (!conditionList || !conditionList.length) {
1639
+ this.parentNames.splice(index, 1);
1640
+ return;
1641
+ }
1642
+ let hasItem = conditionList.filter(v => v.displayCategory === item.value);
1643
+ if (!hasItem || !hasItem.length) {
1644
+ this.parentNames.splice(index, 1);
1645
+ return;
1646
+ }
1647
+ this.$message.error("该分类下有已有数据,请删除该分类下的筛选集后重试!");
1648
+ },
1649
+ // 7.12保存列表搜索分类
1650
+ async saveTableCondiTion(params) {
1651
+ // let url = `/tableList/saveTableCondiTion`;
1652
+ // this.axios.post(url, this.$qs.stringify(params)).then(({ data }) => {
1653
+ // if (data.result == "SUCCESS") {
1654
+ // this.showInner = false;
1655
+ // this.formInner.resetFields();
1656
+ // this.$emit("updateTableCondiTion");
1657
+ // this.clearData();
1658
+ // this.closeModal();
1659
+ // } else {
1660
+ // this.$message.error(data.resultMsg);
1661
+ // }
1662
+ // });
1663
+ try {
1664
+ let res = await this.handleGetConfigApi(params, 'requestSaveTableCondiTion');
1665
+ if (!res) return;
1666
+ this.showInner = false;
1667
+ this.formInner.resetFields();
1668
+ this.$emit("updateTableCondiTion");
1669
+ this.clearData();
1670
+ this.closeModal();
1671
+ } catch (error) {
1672
+ console.log(error)
1673
+ }
1674
+ },
1675
+ cancelSaveToCalss() {
1676
+ this.showInner = false;
1677
+ },
1678
+ // 清空快速搜索设置条件
1679
+ clearData() {
1680
+ this.handlerReset(this.quickSearch);
1681
+ this.relationQuickSearch.forEach(item => {
1682
+ this.handlerReset(item.fieldList);
1683
+ });
1684
+ if (this.source === "editTable") {
1685
+ this.$emit("clearQuickSearchConfig");
1686
+ return;
1687
+ }
1688
+ this.$listeners?.clearQuickSearchConfig();
1689
+ },
1690
+ handlerReset(arr) {
1691
+ if (!Array.isArray(arr)) {
1692
+ return;
1693
+ }
1694
+ arr.forEach(item => {
1695
+ if (this.resetRenderWidgetValue(item)) return;
1696
+
1697
+ let advanceOptionSetting = item?.advanceOptionSetting;
1698
+ // 单选
1699
+ let optionSetting0 =String(advanceOptionSetting) === '0';
1700
+ if (item.EQ || item.CL) {
1701
+ item.EQ = "";
1702
+ item.CL = "";
1703
+ } else if (item.con == "QUOTE" && vexutils.anyNotEmpty(item.value)) {
1704
+ item.QUOTE = [];
1705
+ item.value = [];
1706
+ } else if(item.com == 'SelectMui' && item.con == 'CONVERT' && optionSetting0){
1707
+ item.CONVERT = [];
1708
+ item.value = undefined
1709
+ } else if (vexutils.anyNotEmpty(item.CONVERT)) {
1710
+ item.CONVERT = [];
1711
+ } else if (item.DATE) {
1712
+ item.showDate = String(advanceOptionSetting) == '1' ? true: false;
1713
+ item.marginx = "ml";
1714
+ item.DATE = {
1715
+ con: null,
1716
+ start_val: null,
1717
+ end_val: null
1718
+ };
1719
+ } else if (item.BIRTHDAY) {
1720
+ item.showDate = false;
1721
+ item.marginx = "ml";
1722
+ item.BIRTHDAY = this.initBirthdayParams();
1723
+ } else if (item.LABELAttr) {
1724
+ this.handleClearLabel(item);
1725
+ } else if (item.EVALUATEAttr) {
1726
+ item.selecteds = [];
1727
+ } else if (item.AGEAttr) {
1728
+ this.handleResetAge(item);
1729
+ } else if (item.NUMBERFiled) {
1730
+ this.clearFilterNumber(item);
1731
+ }
1732
+ });
1733
+ },
1734
+ initBirthdayParams() {
1735
+ this.limit_date = "";
1736
+ return {
1737
+ con: null,
1738
+ limit_date: [],
1739
+ start_val: null,
1740
+ end_val: null,
1741
+ unit: "YEAR",
1742
+ units: this.birthdayUnits.filter(i => i.units === 1)
1743
+ };
1744
+ },
1745
+ // 单选按钮组合点击取消选中状态
1746
+ clickRadioGroup(item, con) {
1747
+ if (item.con == con) {
1748
+ item.con = null;
1749
+ } else {
1750
+ if (item.con === "IN") {
1751
+ item.start_val = null;
1752
+ item.end_val = null;
1753
+ }
1754
+ item.con = con;
1755
+ }
1756
+ },
1757
+ clickBirthdayRadioGroup(item, con) {
1758
+ this.limit_date = "";
1759
+ Object.assign(item, this.initBirthdayParams());
1760
+ this.clickRadioGroup(item, con);
1761
+ },
1762
+ changeModalWindow() {
1763
+ this.isChangeWindow = !this.isChangeWindow;
1764
+ let docHeight = document.body.clientHeight;
1765
+ this.modalWidth = this.modalWidth === "700px" ? `100%` : "700px";
1766
+ this.modalHeight = this.modalHeight === "60vh" ? `${docHeight - 108}px` : "60vh";
1767
+
1768
+ if (this.modalWidth === "700px") {
1769
+ this.label_max_count = 8;
1770
+ } else {
1771
+ this.$nextTick(() => {
1772
+ let ele = document.querySelector(".quickSearch_label-container");
1773
+ ele && (this.label_max_count = parseInt((ele.clientWidth - 20) / 112) * 2);
1774
+ });
1775
+ }
1776
+ },
1777
+
1778
+ /* 获取 label */
1779
+ handleRequestedLabel(v) {
1780
+ let params = { type: v, pageSize: 10000 };
1781
+ return this.axios.get("/label/list", { params: params });
1782
+ },
1783
+
1784
+ async handleSetLabelOptions(labelType, el) {
1785
+ let labelObj = {};
1786
+ let labelList = await this.handleGetConfigApi(labelType, 'requestedLabel');
1787
+ labelList.forEach(n => {
1788
+ this.$set(n, 'isSelect', false);
1789
+ if (labelObj[n.typeName]) {
1790
+ labelObj[n.typeName].itemList.push({ ...n });
1791
+ } else {
1792
+ labelObj[n.typeName] = {
1793
+ itemList: [{ ...n }],
1794
+ showAdd: false,
1795
+ addVal: '',
1796
+ typeName: n.typeName,
1797
+ typeId: n.typeId,
1798
+ isUnfold: false,
1799
+ isShowBtn: false
1800
+ };
1801
+ }
1802
+ });
1803
+ this.$set(el, 'labelObj', labelObj);
1804
+ this.$set(el, 'labelList', labelList);
1805
+ },
1806
+
1807
+ handleLabelColorClass(item) {
1808
+ return item?.color?.split("-")[1] || "yellow";
1809
+ },
1810
+
1811
+ handleLabelChange() {
1812
+ const args = arguments;
1813
+ if (args.length === 3) {
1814
+ let [flag, item, options] = [...arguments];
1815
+ let selectedList = options.labelSelectList || [];
1816
+ if (flag) {
1817
+ if (selectedList.some(n => n.labelId == item.labelId)) {
1818
+ return;
1819
+ }
1820
+ selectedList.push(item);
1821
+ } else {
1822
+ let fdIndex = selectedList.findIndex(n => n.labelId == item.labelId);
1823
+ if (fdIndex != -1) {
1824
+ selectedList.splice(fdIndex, 1);
1825
+ }
1826
+ }
1827
+ options.labelSelectList = selectedList;
1828
+ }
1829
+ },
1830
+
1831
+ handleClearLabel(v) {
1832
+ v.labelSelectList.length = 0;
1833
+ v.inputVal = "";
1834
+ Object.entries(v.labelObj || {}).forEach(h => {
1835
+ let [, item] = h;
1836
+ item.itemList.forEach(l => {
1837
+ l.isSelect = false;
1838
+ });
1839
+ });
1840
+ },
1841
+
1842
+ handleLabelUpfold(v) {
1843
+ console.log('触发---isUnfold');
1844
+ v.isUnfold = !v.isUnfold;
1845
+ },
1846
+
1847
+ handleEvaluateOnChange(tag, checked, item) {
1848
+ if (checked) {
1849
+ item.selecteds.push(tag.value);
1850
+ } else {
1851
+ let i = item.selecteds.findIndex(v => v === tag.value);
1852
+ item.selecteds.splice(i, 1);
1853
+ }
1854
+ },
1855
+
1856
+ // 年龄组件变化
1857
+ ageRangeOnChange(obj, item) {
1858
+ let s = obj.star_val;
1859
+ let e = obj.end_val;
1860
+ this.$set(item, "start_val", isNaN(s) ? undefined : s);
1861
+ this.$set(item, "end_val", isNaN(e) ? undefined : e);
1862
+ },
1863
+
1864
+ // 清空年龄组件
1865
+ handleResetAge(item) {
1866
+ this.$set(item, "start_val", "");
1867
+ this.$set(item, "end_val", "");
1868
+ let key = `${item.columnName}_AGEAttr`;
1869
+ let curRef = this.$refs[key];
1870
+ if (Array.isArray(curRef)) {
1871
+ curRef = curRef[0] || false;
1872
+ }
1873
+ curRef?.reset();
1874
+ },
1875
+
1876
+ onResize(el, v) {
1877
+ let height = el.offsetHeight || 0;
1878
+ // let ch = el?.firstElementChild?.offsetHeight || 0;
1879
+ if (!height) {
1880
+ return;
1881
+ }
1882
+ if (height > 80) {
1883
+ v.isShowBtn = true;
1884
+ } else {
1885
+ v.isShowBtn = false;
1886
+ v.isUnfold = false;
1887
+ }
1888
+ },
1889
+ changeFilterNumber(item) {
1890
+ if (item.lessValue && item.bigValue) {
1891
+ const lessValue = item.lessValue;
1892
+ const bigValue = item.bigValue;
1893
+ if (bigValue < lessValue) {
1894
+ this.$set(item, "lessValue", bigValue);
1895
+ this.$set(item, "bigValue", lessValue);
1896
+ }
1897
+ return;
1898
+ }
1899
+ },
1900
+ clearFilterNumber(item) {
1901
+ this.$set(item, "lessValue", "");
1902
+ this.$set(item, "bigValue", "");
1903
+ },
1904
+
1905
+ getI18nText(i, d) {
1906
+ if (Array.isArray(i)) {
1907
+ return this.$t ? this.$t.apply(this, i) : d;
1908
+ }
1909
+ return this.$t ? this.$t(i) : d;
1910
+ },
1911
+
1912
+ /**
1913
+ * 限制日期填写
1914
+ */
1915
+ disabledDatePicker(current, item, t){
1916
+ let f = false;
1917
+ if(t=== 'start'){
1918
+ const end_val = item?.DATE?.end_val;
1919
+ f = end_val && current.valueOf() > end_val.valueOf();
1920
+ } else if(t=== 'end') {
1921
+ const start_val = item?.DATE?.start_val;
1922
+ f = start_val && current.valueOf() <= start_val.valueOf();
1923
+ }
1924
+ /**
1925
+ * 2 过去时间
1926
+ * 3 未来时间
1927
+ */
1928
+ let type = String(item?.advanceOptionSetting);
1929
+ if(!['2','3'].includes(type)) return f;
1930
+ if(type === '2'){
1931
+ return current >= this.$moment().endOf('day') || f;
1932
+ } else if(type==='3'){
1933
+ return current && current < this.$moment().startOf('day') || f;
1934
+ }
1935
+ return f
1936
+ },
1937
+ /**
1938
+ * 限制时间
1939
+ */
1940
+ disabledTimePicker(current,item){
1941
+
1942
+ }
1943
+ },
1944
+ directives: { resize }
1945
+ });
1946
+ </script>
1947
+
1948
+ <style lang="less" scoped>
1949
+ .form-box {
1950
+ .quick-item {
1951
+ margin-bottom: 10px;
1952
+ min-width: 32px;
1953
+
1954
+ .quick-row {
1955
+ display: flex;
1956
+ > div {
1957
+ display: inline-block;
1958
+ box-sizing: border-box;
1959
+ }
1960
+ .quick-item-title {
1961
+ min-width: 134px;
1962
+ width: 134px;
1963
+ line-height: 32px;
1964
+ text-align: right;
1965
+ padding-left: 4px;
1966
+ padding-right: 4px;
1967
+ color: #000;
1968
+ box-sizing: border-box;
1969
+ }
1970
+ .quick-item-col {
1971
+ width: calc(100% - 134px);
1972
+ padding: 0 4px;
1973
+ .ant-tag {
1974
+ margin-right: 4px;
1975
+ }
1976
+ .ant-tag:last-child {
1977
+ margin-right: 0;
1978
+ }
1979
+ }
1980
+ .quick-item-title-default {
1981
+ width: 25%;
1982
+ }
1983
+ .quick-item-col-default {
1984
+ width: 75%;
1985
+ }
1986
+ }
1987
+ .check-box {
1988
+ line-height: 32px;
1989
+ }
1990
+ .check-date-btn {
1991
+ display: inline-block;
1992
+ line-height: 32px;
1993
+ height: 32px;
1994
+ padding: 0 10px;
1995
+ background-color: #ddd;
1996
+ cursor: pointer;
1997
+ &.ml {
1998
+ margin-left: 12px;
1999
+ }
2000
+ &.mr {
2001
+ margin-right: 12px;
2002
+ }
2003
+ }
2004
+ .check-date {
2005
+ display: inline-block;
2006
+ line-height: 33px;
2007
+ }
2008
+ .birthday-item {
2009
+ > div {
2010
+ margin-top: 5px;
2011
+ p {
2012
+ display: inline-block;
2013
+ margin: 0 20px;
2014
+ }
2015
+ > span {
2016
+ margin-top: 5px;
2017
+ }
2018
+ }
2019
+ .age-wrap {
2020
+ display: inline-block;
2021
+ }
2022
+ }
2023
+ /deep/ .ant-input-wrapper {
2024
+ .ant-input-group-addon {
2025
+ border: 1px solid #d9d9d9 !important;
2026
+ border-left: 0 !important;
2027
+ }
2028
+ }
2029
+
2030
+ /deep/ .num-picker {
2031
+ position: relative;
2032
+ display: flex;
2033
+ &.num-picker-unit {
2034
+ padding-right: 20px;
2035
+ }
2036
+ input {
2037
+ text-align: left !important;
2038
+ }
2039
+ &:hover {
2040
+ .clear-number-icon {
2041
+ display: block;
2042
+ }
2043
+ }
2044
+ /deep/ .ant-calendar-range-picker-input {
2045
+ text-align: left;
2046
+ }
2047
+ .clear-number-icon {
2048
+ position: absolute;
2049
+ right: 5px;
2050
+ top: 6px;
2051
+ display: none;
2052
+ cursor: pointer;
2053
+ z-index: 1000;
2054
+ }
2055
+ }
2056
+ }
2057
+ .ant-radio-button-wrapper {
2058
+ padding: 0 8px;
2059
+ height: 32px;
2060
+ line-height: 32px;
2061
+ margin-top: 5px;
2062
+ }
2063
+
2064
+ // 标签
2065
+ .label-attr-container {
2066
+ .edit-label {
2067
+ color: #000000;
2068
+ font-size: 14px;
2069
+ line-height: 32px;
2070
+ padding-left: 0;;
2071
+ }
2072
+ .label-container-height {
2073
+ overflow: hidden;
2074
+ // width: 380px;
2075
+ height: 74px;
2076
+ flex: none;
2077
+ }
2078
+ .edit-content {
2079
+ padding: 0;
2080
+ }
2081
+ .label-unfold-btn {
2082
+ margin: 8px 0;
2083
+ color: rgba(0, 0, 0, 0.6);
2084
+ cursor: pointer;
2085
+ >span {
2086
+ display: flex;
2087
+ align-items: center;
2088
+ line-height: 1;
2089
+ }
2090
+ .anticon {
2091
+ font-size: 16px;
2092
+ margin-left: 8px;
2093
+ }
2094
+ &:hover {
2095
+ color: #2d7aff;
2096
+ }
2097
+ &:active {
2098
+ color: #2d7aff;
2099
+ }
2100
+ }
2101
+ }
2102
+ .evaluate-attr-container {
2103
+ line-height: 32px;
2104
+ }
2105
+ &.quick-search-table {
2106
+ .module-title {
2107
+ color: #506493;
2108
+ line-height: 20px;
2109
+ padding-left: 12px;
2110
+ border-left: 4px solid #2d7aff;
2111
+ }
2112
+ .quick-item {
2113
+ display: inline-block;
2114
+ width: 20%;
2115
+ &.quick-block {
2116
+ display: block;
2117
+ width: 100%;
2118
+ }
2119
+
2120
+ }
2121
+ }
2122
+
2123
+ .psw-icon {
2124
+ cursor: pointer;
2125
+ &:active {
2126
+ color: #5585f5;
2127
+ // #2474ff
2128
+ }
2129
+ color: #969696;
2130
+ }
2131
+
2132
+ ::-webkit-input-placeholder {
2133
+ /* WebKit browsers */
2134
+ font-family: "Avenir", Helvetica, Arial, sans-serif;
2135
+ }
2136
+
2137
+ ::-moz-placeholder {
2138
+ /* Mozilla Firefox 19+ */
2139
+ font-family: "Avenir", Helvetica, Arial, sans-serif;
2140
+ }
2141
+
2142
+ :-ms-input-placeholder {
2143
+ /* Internet Explorer 10+ */
2144
+ font-family: "Avenir", Helvetica, Arial, sans-serif;
2145
+ }
2146
+ }
2147
+ .age-container {
2148
+ width: 100%;
2149
+ }
2150
+ </style>
2151
+ <style lang="less">
2152
+ .quickSearch-saveToClass-modal {
2153
+ .edit-tag {
2154
+ position: relative;
2155
+ display: inline-block;
2156
+ margin-right: 10px;
2157
+ margin-bottom: 10px;
2158
+ .add-parent {
2159
+ border-color: #d9d9d9;
2160
+ }
2161
+ .anticon-close {
2162
+ position: absolute;
2163
+ right: 5px;
2164
+ line-height: 36px;
2165
+ color: #2d7aff;
2166
+ }
2167
+ .ant-input-disabled {
2168
+ color: #2d7aff;
2169
+ background-color: rgba(45, 122, 255, 0.1);
2170
+ opacity: 1;
2171
+ border-color: #2d7aff;
2172
+ cursor: pointer;
2173
+ }
2174
+ .ant-input-group-addon,
2175
+ .ant-input:not(:hover),
2176
+ .ant-input-number:not(:hover) {
2177
+ border-color: #2d7aff !important;
2178
+ }
2179
+ &.edit-tag-select {
2180
+ .ant-input-disabled {
2181
+ color: #fff;
2182
+ background-color: #2d7aff;
2183
+ }
2184
+ .anticon-close {
2185
+ color: #fff;
2186
+ }
2187
+ }
2188
+ }
2189
+ }
2190
+ </style>