cnhis-design-vue 2.1.58 → 2.1.59

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