cnhis-design-vue 2.1.78 → 2.1.79

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