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,2630 +1,2630 @@
1
- <template>
2
- <div class="base-search">
3
- <div class="base-container">
4
- <div class="bease-left" ref="baseLeft" v-resize="onResize">
5
- <!-- 行内编辑对应生成的(保存、取消)按钮 -->
6
- <template v-if="visibleInlineOperateBtn">
7
- <div class="btn-custom-wrap">
8
- <a-button
9
- v-preventReClick="preventReTime"
10
- :style="{ display: isInlineOperating ? 'inline-block' : 'none' }"
11
- @click="inlineEditClick"
12
- class="btn-custom-class"
13
- style="margin: 8px 8px 8px 0"
14
- type="primary"
15
- >
16
- 保存
17
- </a-button>
18
- <a-button
19
- v-preventReClick="preventReTime"
20
- :style="{ display: isInlineOperating ? 'inline-block' : 'none' }"
21
- @click="inlineEditCancel"
22
- class="btn-custom-class"
23
- style="margin: 8px 8px 8px 0"
24
- >
25
- 取消
26
- </a-button>
27
- </div>
28
- </template>
29
- <ul v-if="!visibleInlineOperateBtn && !isRowEditing">
30
- <div ref="btnRow" class="btn-row" v-if="isShowSettingBtn">
31
- <a-button class="btn-setting" v-show="currentTempId != '0' && isShowSetting('hideSettingBtn')" icon="setting" @click="handlerSetting">
32
- 设置
33
- <!-- {{ $t("1.1.5.3") }} -->
34
- </a-button>
35
- <a-dropdown overlayClassName="viewList-dropdown" v-if="showViewList">
36
- <a-button class="viewList-button">
37
- <svg-icon :icon-class="'anniuqiehuanmoshi'" style="font-size: 22px"></svg-icon>
38
- </a-button>
39
- <a-menu slot="overlay">
40
- <a-menu-item v-for="(item, index) in viewList" :value="item.id" :key="index" @click="handlerSelectTemp(item.id)" :class="{ 'menu-active': currentTempId === item.id }">
41
- <span>{{ item.name }}</span>
42
- <!-- <a-icon v-if="currentTempId === item.id" type="check" /> -->
43
- </a-menu-item>
44
- </a-menu>
45
- </a-dropdown>
46
- </div>
47
- <slot name="classification"></slot>
48
- <li v-if="showQuickSearch" ref="quickSearchLi">
49
- <a-button class="search-default" type="default" @click="foldQuickSearch" :class="{'search-default-count': qqConObjCount}">
50
- <svg-icon icon-class="anniushaixuan" style="color: inherit; margin-right: 6px"></svg-icon>
51
- 筛选 {{ qqConObjCount ? `(${qqConObjCount})` : '' }}
52
- </a-button>
53
- </li>
54
- <!-- start--筛选外显--start -->
55
- <template v-for="item in outSearchFieldList">
56
- <li class="outQuickSearch-li" v-if="item.isRender" :key="item._frontId">
57
- <RenderWidget style="margin: 0 8px 8px 0" :cfg="item" v-model="item.value" @outFilterChange="outFilterChange" />
58
- </li>
59
- <outQuickSearch v-else :key="item.id + item.random_key" :item="item" :ref="item.columnName + item.random_key" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
60
- </template>
61
- <!-- end--筛选外显--end -->
62
-
63
- <!-- start--筛选外显 跨表--start -->
64
- <template v-for="relationItem in outRelationQuickSearch">
65
- <template v-for="item in relationItem.fieldList">
66
- <outQuickSearch :key="item.id" :item="item" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
67
- </template>
68
- </template>
69
- <!-- end--筛选外显 跨表--end -->
70
-
71
- <li v-if="isShowInputSearch" ref="inputSearchLi" class="baseSearch-input-search">
72
- <template v-if="outSearchFieldList && outSearchFieldList.length">
73
- <slot name="searchInput" :width="(searchInputWidth || inputSearchW)" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'outSearch'">
74
- <a-input
75
- :style="{ width: (searchInputWidth || inputSearchW) + 'px', margin: '0 8px 8px 0' }"
76
- allowClear
77
- :placeholder="searchPlaceHolder"
78
- :value="currentValue"
79
- @input="$emit('input', $event.target.value)"
80
- @pressEnter="outFilterChange"
81
- class="input-search-com"
82
- >
83
- <template slot="prefix" v-if="showPlaceholderPrefix">
84
- <a-tooltip :title="searchPlaceHolder" overlayClassName="basesearch-placeholder-tooltip">
85
- <a-icon type="info-circle" class="search-placeholder-icon" />
86
- </a-tooltip>
87
- </template>
88
- </a-input>
89
- </slot>
90
- </template>
91
-
92
- <template v-else>
93
- <slot name="searchInput" :width="(searchInputWidth || inputSearchW)" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'default'">
94
- <a-input-search
95
- class="my-input-search input-search-com"
96
- :style="{ width: (searchInputWidth || inputSearchW) + 'px' }"
97
- @search="onSearch"
98
- allowClear
99
- :placeholder="searchPlaceHolder"
100
- :value="currentValue"
101
- @input="$emit('input', $event.target.value)"
102
- >
103
- <template slot="prefix" v-if="showPlaceholderPrefix">
104
- <a-tooltip :title="searchPlaceHolder" overlayClassName="basesearch-placeholder-tooltip">
105
- <a-icon type="info-circle" class="search-placeholder-icon" />
106
- </a-tooltip>
107
- </template>
108
- <a-button slot="enterButton" type="primary">
109
- <svg-icon icon-class="xitongtubiaosousuo"></svg-icon>
110
- </a-button>
111
- </a-input-search>
112
- </slot>
113
- </template>
114
-
115
- </li>
116
- <li v-if="outSearchFieldList && outSearchFieldList.length">
117
- <a-button type="primary" @click="outFilterChange" style="margin: 0 8px 8px 0">
118
- <a-icon type="search" style="margin-right: 6px" />
119
- 查询
120
- </a-button>
121
- </li>
122
- <!-- 无外显字段查询,且隐藏模糊搜索 -->
123
- <li v-if="showApiSearch">
124
- <a-button type="primary" @click="apiSearch" style="margin: 0 8px 8px 0">
125
- <a-icon type="search" style="margin-right: 6px" />
126
- 查询
127
- </a-button>
128
- </li>
129
- <li v-if="showResetFilterBtn">
130
- <a-button @click="handleReset" style="margin: 0 8px 8px 0">
131
- <svg-icon icon-class="xitongtubiaoliebiaocaozuoanniushanchu" style="margin-right: 6px"></svg-icon>
132
- 重置
133
- </a-button>
134
- </li>
135
-
136
- <!-- 批量选择 -->
137
- <li v-if="isCard">
138
- <a-button v-if="isCardNewBatch" type="primary" @click="() =>changeCardNewBatch(false)" style="margin: 0 8px 8px 0">
139
- 取消批量选择
140
- </a-button>
141
- <a-button v-else type="primary" @click="() =>changeCardNewBatch(true)" style="margin: 0 8px 8px 0">
142
- 批量选择
143
- </a-button>
144
- </li>
145
-
146
- <!-- 平铺列表 tree -->
147
- <template v-if="showRelatedTreeBtn">
148
- <li v-if="showRelatedSearch" :class="[isRelatedSearchFold ? 'related-search-input' : 'related-search-input-expand']">
149
- <slot name="searchInput" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'relatedTreeSearch'" :isRelatedSearchFold="isRelatedSearchFold" >
150
- <a-input-search
151
- ref="relatedSearchInput"
152
- class="my-input-search my-input-search-related"
153
- placeholder="请输入关键字搜索"
154
- @search="onRelatedSearch"
155
- allowClear
156
- :value="currentValue"
157
- @input="$emit('input', $event.target.value)"
158
- >
159
- <a-button slot="enterButton" type="primary">
160
- <a-icon type="search" />
161
- <!-- <svg-icon icon-class="xitongtubiaosousuo"></svg-icon> -->
162
- </a-button>
163
- </a-input-search>
164
- </slot>
165
- </li>
166
- <template v-if="rowTileBtnListTree && rowTileBtnListTree.length === 1">
167
- <a-button type="primary" style="margin-right: 8px; margin-bottom: 8px" @click="handleAddType(rowTileBtnListTree[0])">
168
- {{ rowTileBtnListTree[0].alias || rowTileBtnListTree[0].name }}
169
- </a-button>
170
- </template>
171
- <a-dropdown v-if="rowTileBtnListTree.length > 1 && !isInlineOperating">
172
- <a-menu slot="overlay">
173
- <template v-for="b in rowTileBtnListTree">
174
- <a-menu-item :key="b.sid" class="dropdown-btn" v-if="b.type == 'ADD'" @click="handleAddType(b)">
175
- {{ b.alias || b.name }}
176
- <a-icon v-if="b.icon" :type="btnObj[b.icon]" />
177
- <template v-else>
178
- <svg-icon
179
- v-if="b.iconSetting"
180
- :iconClass="JSON.parse(b.iconSetting).icon"
181
- :style="{
182
- marginRight: '8px'
183
- }"
184
- />
185
- </template>
186
- </a-menu-item>
187
- </template>
188
- </a-menu>
189
- <a-button type="primary" ghost style="margin-left: 8px; margin-bottom: 8px">
190
- <!-- 1.1.8.1.6更多 -->
191
- {{ '更多' }} ...
192
- </a-button>
193
- </a-dropdown>
194
- </template>
195
- <template v-if="!nobutton && !showRelatedTreeBtn">
196
- <template v-if="isButtonFolding">
197
- <li class="allBtn" v-if="allBtn && allBtn.length" ref="allBtnLi">
198
- <a-dropdown v-show="!isInlineOperating">
199
- <a-menu slot="overlay">
200
- <template v-for="(b, j) in allBtn">
201
- <a-menu-item :key="b.sid" class="dropdown-btn" v-if="b.type == 'ADD'" @click="showDrawer(b, j)">
202
- {{ b.alias || b.name }}
203
- <getBtnIcon :data="b" :btnObj="btnObj" />
204
- </a-menu-item>
205
- <a-menu-item
206
- :key="b.sid"
207
- v-else-if="showButtonTop == 1 && b.type != 'LINK' && currentTempId == '0'"
208
- class="dropdown-btn"
209
- @click="clickBtn(clickRowData, b, clickRowData.my_index, undefined, j)"
210
- >
211
- {{ b.showStyle === 'only_icon' ? '' : b.alias || b.name }}
212
- <getBtnIcon :data="b" :btnObj="btnObj" />
213
- </a-menu-item>
214
- </template>
215
- </a-menu>
216
- <a-button class="ml12 dropdown-button"
217
- >{{ '更多' }}
218
- <a-icon type="down" />
219
- </a-button>
220
- </a-dropdown>
221
- </li>
222
- </template>
223
- <template v-else>
224
- <!-- start--按钮分组--start -->
225
- <template v-if="isShowGroupBtn">
226
- <template v-for="(key, i) in groupBtnObj">
227
- <li :key="i" v-if="key.list && key.list.length > 1" ref="rowTileBtnItem" :data-key="i" data-source="groupBtn">
228
- <ButtonGroup v-show="!key.isHide" :title="i" :list="key.list" :currentTempId="currentTempId" @showDrawer="showDrawer" @clickGroupBtn="clickGroupBtn"></ButtonGroup>
229
- </li>
230
- </template>
231
- </template>
232
- <!-- end--按钮分组--end -->
233
-
234
- <!-- 平铺按钮列表 -->
235
- <template v-for="(item, j) in rowTileBtnList">
236
- <!-- v-if="item.type == 'ADD'" -->
237
- <li ref="rowTileBtnItem" class="rowTileBtn-item 123" :key="item.sid" v-if="showLi(item)" :data-key="item.sid" data-source="rowTile">
238
- <template v-if="item.type == 'ADD' || item.type == 'BATCH'">
239
- <a-button
240
- v-preventReClick="preventReTime"
241
- v-show="visibleBtn(item) && !item.isHide"
242
- @click.prevent.stop="showDrawer(item, j)"
243
- class="btn-custom-class"
244
- style="margin: 0 8px 8px 0"
245
- :style="$utils.getBtnStyle(item)"
246
- :type="item.showStyle == 'none_bg' || item.showStyle === 'only_icon' ? 'link' : 'primary'"
247
- :ghost="item.showStyle == 'white_bg'"
248
- >
249
- <getBtnIcon :data="item" :btnObj="btnObj" />
250
- <template v-if="item.showStyle !== 'only_icon'">
251
- {{ item.alias || item.name }}
252
- </template>
253
- </a-button>
254
- <a-upload v-if="item.isImportGuage" method="post" :show-upload-list="false" :action="`${axios.defaults.baseURL}/guage/importGuage`" @change="handleUploadChange">
255
- <!-- 上传配置文件 -->
256
- <a-button
257
- class="btn-custom-class"
258
- style="margin: 0 8px 8px 0"
259
- :style="$utils.getBtnStyle(item)"
260
- :type="item.showStyle == 'none_bg' || item.showStyle === 'only_icon' ? 'link' : 'primary'"
261
- :ghost="item.showStyle == 'white_bg'"
262
- >
263
- <a-icon type="upload" />
264
- <template v-if="item.showStyle !== 'only_icon'">
265
- {{ item.alias || item.name }}
266
- </template>
267
- </a-button>
268
- </a-upload>
269
- </template>
270
- <template v-else-if="isShowRowTileBtnItem(item)">
271
- <a-button
272
- v-preventReClick="preventReTime"
273
- v-show="visibleBtn(item) && !item.isHide"
274
- @click.prevent.stop="clickBtn(clickRowData, item, clickRowData.my_index, undefined, j)"
275
- class="btn-custom-class"
276
- style="margin: 0 8px 8px 0"
277
- :style="$utils.getBtnStyle(item)"
278
- :type="item.showStyle == 'none_bg' ? 'link' : 'primary'"
279
- :ghost="item.showStyle == 'white_bg'"
280
- >
281
- <getBtnIcon :data="item" :btnObj="btnObj" />
282
- <template v-if="item.showStyle !== 'only_icon'">
283
- {{ item.alias || item.name }}
284
- </template>
285
- </a-button>
286
- </template>
287
- </li>
288
- </template>
289
- <!-- 打印列表-->
290
- <template v-for="(item, j) in rowPrintBtnList">
291
- <li ref="rowTileBtnItem" class="rowTileBtn-item rowPrintBtn-btn" :key="item.sid" v-if="showLi(item)" :data-key="item.sid" data-source="rowTile">
292
- <template v-if="item.isVisible && !item.isHide">
293
- <PrintBtn
294
- v-bind="$attrs"
295
- :printConfig="printConfig"
296
- :baseUrl="printConfig.printBaseUrl"
297
- :strategy="item.strategy"
298
- :btnText="item.name"
299
- :versionType="item.__printConfig && item.__printConfig.versionType"
300
- :port="item.__printConfig && item.__printConfig.port"
301
- :authorizationKey="item.__printConfig && item.__printConfig.authorizationKey"
302
- :templateNumber="item.__printConfig && item.__printConfig.number"
303
- :hisParams="item.__printConfig && item.__printConfig.hisParams"
304
- :params="getPrintBtnParams(item)"
305
- :prevFn="() => printBtnPrevFn(clickRowData, item, 2, j)"
306
- @success="receivePrintSuccess"
307
- @error="receivePrintError"
308
- ></PrintBtn>
309
- </template>
310
- </li>
311
- </template>
312
- <!-- 折叠按钮列表 -->
313
- <li class="rowFoldBtn" v-if="showRowFoldBtnList(rowFoldBtnList, 'rowFoldBtnList')">
314
- <a-dropdown overlayClassName="baseSearch-fold-dropdown" v-show="!isInlineOperating">
315
- <a-menu slot="overlay">
316
- <template v-for="(b, j) in rowFoldBtnList">
317
- <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-if="showLiAdd(b)" @click="showDrawer(b, j)">
318
- {{ b.alias || b.name }}
319
- <getBtnIcon :data="b" :btnObj="btnObj" />
320
- </a-menu-item>
321
- <template v-else-if="showLiFold(b)">
322
- <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" @click="clickBtn(clickRowData, b, clickRowData.my_index, undefined, j)">
323
- {{ b.alias || b.name }}
324
- <getBtnIcon :data="b" :btnObj="btnObj" />
325
- </a-menu-item>
326
- </template>
327
- </template>
328
- </a-menu>
329
- <a-button class="dropdown-button" style="margin: 0 8px 8px 0"
330
- >{{ '更多' }}
331
- <a-icon type="down" />
332
- </a-button>
333
- </a-dropdown>
334
- </li>
335
- <!-- 自适应折叠 -->
336
- <template v-if="showRowFoldBtnList(rowFoldHideBtnList)">
337
- <a-dropdown overlayClassName="rowFoldHideBtnList-dropdown" v-show="!isInlineOperating">
338
- <a-menu slot="overlay">
339
- <template v-for="(value, key) in rowFoldHideBtnListObj">
340
- <a-menu-item-group :key="key" v-if="showRowFoldBtnList(value.list)">
341
- <template slot="title"></template>
342
- <template v-for="(b, j) in value.list">
343
- <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-if="b.type == 'ADD'" @click="showDrawer(b, j)">
344
- {{ b.alias || b.name }}
345
- <getBtnIcon :data="b" :btnObj="btnObj" />
346
- </a-menu-item>
347
- <template v-else-if="b.type != 'LINK' && currentTempId == '0'">
348
- <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" @click="clickBtn(clickRowData, b, clickRowData.my_index, undefined, j)">
349
- {{ b.alias || b.name }}
350
- <getBtnIcon :data="b" :btnObj="btnObj" />
351
- </a-menu-item>
352
- </template>
353
- </template>
354
- </a-menu-item-group>
355
- </template>
356
- </a-menu>
357
- <a-button class="dropdown-button" style="margin: 0 8px 8px 0"
358
- >{{ '更多' }}
359
- <a-icon type="down" />
360
- </a-button>
361
- </a-dropdown>
362
- </template>
363
- </template>
364
- </template>
365
- </ul>
366
- </div>
367
- </div>
368
- <div class="base-tabs" v-if="showBaseTabs">
369
- <div v-for="(item, index) in tabConditionList" :key="index" :class="tabIndex === index ? 'base-tabs-item base-tabs-item-active' : 'base-tabs-item'" @click="tabClick(index)"
370
- >{{ item.name }} {{ countTabCondition == 1 && (item.digital || item.digital === 0) ? '(' + (item.digital || 0) + ')' : '' }}</div
371
- >
372
- </div>
373
- <!-- palceholder 文字宽度计算 -->
374
- <span class="baseSearchPlaceholderSpan" ref="baseSearchPlaceholderSpan">
375
- {{ searchPlaceHolder }}
376
- </span>
377
- </div>
378
- </template>
379
-
380
- <script>
381
- /**
382
- * 完成搜索组合组件 BaseSearch
383
- * 使用方式:在需要的vue页中引入注册为子组件后直接使用
384
- * 提供函数:
385
- * 1、输入关键字搜索触发函数onSearch;
386
- * 2、左侧下拉选中搜索触发函数changeSearch;
387
- * 3、右侧快速弹框保存搜索函数onSave(obj);
388
- * 完整例子:<BaseSearch :onSearch='onSearch' @changeSearch='changeSearch' @onSave='onSave'/>
389
- */
390
-
391
- /**
392
- * slot:searchInput
393
- * width: {number}宽度
394
- * searchPlaceHolder:{string} 检索 input 的placeHolder
395
- * showPlaceholderPrefix: {boolean} input 是否展示前缀icon
396
- * isRelatedSearchFold: {boolean} 平铺列表树状表的检索框是否收起
397
- * type:{string} relatedTreeSearch(平铺列表树状表)/outSearch(检索外显)/default(默认)
398
- */
399
-
400
- import moment from 'moment';
401
- import 'moment/locale/zh-cn';
402
-
403
- import _ from 'lodash';
404
- import vexutils from '@/utils/vexutils';
405
- import { Button, Icon, Dropdown, Select, Upload, DatePicker, Input, Menu } from 'ant-design-vue';
406
- import resize from 'vue-resize-directive';
407
-
408
- import { GROUP_TITLE_KEY } from '../const';
409
-
410
- import PrintBtn from '~/button/src/ButtonPrint/index';
411
- // import stepRule from "@/components/table/mixins/stepRule";
412
-
413
- import outQuickSearch from '../components/out-quick-search/out-quick-search';
414
- import utils from '@/utils/utils-map';
415
- import { durationMixin, $utils, filterApiFn, outQuickSearchFn } from '../mixins/mixins';
416
- import tableSearchCon from '../mixins/tableSearchCon';
417
- import svgIcon from '@/component/svg/index.vue';
418
- import 'text-security/text-security.css';
419
- import create from '@/core/create';
420
- import preventReClick from '@/directive/preventReClick';
421
- /** 获取按钮 icon */
422
- import getBtnIcon from '../components/button-icon/getBtnIcon.js';
423
- import ButtonGroup from '../components/button-group/ButtonGroup.vue';
424
-
425
- import RenderWidget from '../components/render-widget/index.vue';
426
-
427
- const EVALUATEList = [
428
- {
429
- label: '一星',
430
- value: '1',
431
- isSelect: false
432
- },
433
- {
434
- label: '二星',
435
- value: '2',
436
- isSelect: false
437
- },
438
- {
439
- label: '三星',
440
- value: '3',
441
- isSelect: false
442
- },
443
- {
444
- label: '四星',
445
- value: '4',
446
- isSelect: false
447
- },
448
- {
449
- label: '五星',
450
- value: '5',
451
- isSelect: false
452
- }
453
- ];
454
-
455
- const BTNOBJ = {
456
- // 按钮icon 映射
457
- copy: 'copy',
458
- pencil: 'edit',
459
- delete: 'delete',
460
- add: 'plus-circle',
461
- download: 'download',
462
- label: 'tag',
463
- queding: 'check',
464
- del: 'close'
465
- };
466
-
467
- export default create({
468
- name: 'base-search',
469
- mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, outQuickSearchFn],
470
- directives: { resize, preventReClick },
471
- props: {
472
- width: {
473
- default: '400px'
474
- },
475
- searchInputWidth: {
476
- // 设置检索框的宽度
477
- type: Number,
478
- default: 0
479
- },
480
- searchInputPlaceHolder: {
481
- type: String,
482
- },
483
- onSearch: Function,
484
- rowBtnList: {
485
- type: Array,
486
- default: () => []
487
- },
488
- paramsData: Object,
489
- // downLoad: Function,
490
- showButtonTop: [String, Number],
491
- showSettings: {
492
- type: Object,
493
- default: () => ({})
494
- },
495
- clickRowData: Object,
496
- value: String,
497
- searchFieldList: {
498
- // 搜索的数据
499
- type: Array,
500
- default: () => []
501
- },
502
- searchFieldLimit: {
503
- // 搜索的数据的限制条件
504
- type: Object,
505
- default: () => ({})
506
- },
507
- viewList: {
508
- type: Array,
509
- default: () => []
510
- },
511
- TypeOfDisplay: {
512
- type: String,
513
- default: ''
514
- },
515
- tableAllCheck: {
516
- type: Boolean
517
- },
518
- classificationIndex: Number,
519
- editTableSource: {
520
- default: ''
521
- },
522
- showRelatedTreeBtn: Boolean,
523
- relatedBaseInfo: Object,
524
- onRelatedSearch: Function,
525
- showResetFilterBtn: {
526
- type: Boolean,
527
- default: false
528
- },
529
- qqConObjCount: {
530
- type: Number,
531
- default: 0
532
- },
533
- conditionType: { type: String },
534
- countCondition: { type: [Number, String] },
535
- countTabCondition: { type: Number },
536
- tabConditionNumObj: {
537
- type: Object,
538
- default: () => {}
539
- },
540
- isRelatedSearchFold: {
541
- type: Boolean,
542
- default: true
543
- },
544
- tableId: { type: String },
545
- conditionMap: {
546
- type: Object,
547
- default: () => {}
548
- },
549
- getFilterData: Function,
550
- oldtableData: Array,
551
- isNestTableClick: Boolean,
552
-
553
- isAdmin: {
554
- type: Boolean,
555
- default: false
556
- },
557
-
558
- /**
559
- * 导入量表配置
560
- */
561
- importGuageConfig: {
562
- type: Object,
563
- default: () => ({
564
- action: ''
565
- })
566
- },
567
-
568
- /**
569
- * 打印配置
570
- */
571
- printConfig: {
572
- type: Object,
573
- default: () => ({
574
- printBaseUrl: '/print/assembly',
575
- postStepRule: () => Promise.resolve({})
576
- })
577
- },
578
-
579
- gettersConfig: {
580
- type: Object,
581
- default: () => ({
582
- getIsTile: '',
583
- selectRowObj: [],
584
- isInlineOperating: false,
585
- printNumberCache: {}
586
- })
587
- },
588
-
589
- /**
590
- * 是否展示行编辑的按钮
591
- */
592
- visibleInlineOperateBtn: {
593
- type: Boolean,
594
- default: false
595
- },
596
-
597
- tabConditionList: {
598
- type: Array,
599
- default: () => []
600
- },
601
-
602
- lastOutSearchFieldList: {
603
- type: Array,
604
- default: () => []
605
- },
606
- lastOutRelationQuickSearch: {
607
- type: Array,
608
- default: () => []
609
- },
610
- relationTableList: {
611
- type: Array,
612
- default: () => []
613
- },
614
- /**
615
- * 筛选外显
616
- */
617
- filterApiConfigOutSearch: {
618
- type: Object,
619
- default: () => ({})
620
- },
621
- useFieldList: Array,
622
- editTableUid: [String, Number],
623
-
624
- preventReTime: {
625
- type: Number,
626
- default: 1000
627
- },
628
- isCardNewBatch: {type: Boolean, deafult: false},
629
- isBatchSelect: {type: [Number, Boolean, String], default: ''},
630
- isAvailableApiType: {type: Boolean, deafult: false},
631
- apiSearch: Function,
632
- tableDataType: String
633
- },
634
- components: {
635
- RenderWidget,
636
- [Button.name]: Button,
637
- [Icon.name]: Icon,
638
- [Dropdown.name]: Dropdown,
639
- [Select.name]: Select,
640
- [Upload.name]: Upload,
641
- [DatePicker.name]: DatePicker,
642
- [DatePicker.RangePicker.name]: DatePicker.RangePicker,
643
- [Input.name]: Input,
644
- [Input.Search.name]: Input.Search,
645
- [Menu.name]: Menu,
646
- [Menu.Item.name]: Menu.Item,
647
- [Menu.ItemGroup.name]: Menu.ItemGroup,
648
- getBtnIcon,
649
- PrintBtn,
650
- outQuickSearch,
651
- ButtonGroup,
652
- svgIcon
653
- },
654
- inject: {
655
- editTableWrapper: {
656
- type: Object,
657
- default: () => {}
658
- }
659
- },
660
- computed: {
661
- isOrgAdmin() {
662
- return this.isAdmin;
663
- },
664
- currentValue() {
665
- return this.value;
666
- },
667
- allBtn() {
668
- const { rowTileBtnList, rowFoldBtnList } = this;
669
- let allBtn = [];
670
- allBtn.push(...rowTileBtnList, ...rowFoldBtnList);
671
- return allBtn;
672
- },
673
- isButtonFolding() {
674
- // 首页配置
675
- const { editTableWrapper } = this;
676
- return editTableWrapper?.options?.isButtonFolding || false;
677
- },
678
- isShowSettingBtn() {
679
- const { $attrs, viewList, noSetting } = this;
680
- if (this.showRelatedTreeBtn) return;
681
- return $attrs.isTree != 1 && viewList.length > 0 && !noSetting;
682
- },
683
- showDownCurSelectData() {
684
- return this.selectRowObj.filter(item => !(GROUP_TITLE_KEY in (item || {})))?.length;
685
- },
686
- showRowFoldBtnList() {
687
- return function(list, key) {
688
- if (key === 'rowFoldBtnList' && !this.isShowSetting('buttonAdaption')) return false;
689
- if (!list || !list.length) return false;
690
-
691
- let hasGroupBtnList = list.filter(item => item.buttonGroup);
692
- if (hasGroupBtnList.length) {
693
- let showGroup = hasGroupBtnList.some(item => item.isShowFoldGroupBtn);
694
- if (showGroup) return true;
695
- }
696
-
697
- // 只有一个按钮 分组按钮 非自适应
698
- if (list.length === 1 && list[0].buttonGroup && list[0].isButtonGroup && !list[0].isShowFoldGroupBtn) return false;
699
-
700
- let visibleList = list.filter(item => item.isVisible && !item.buttonGroup);
701
- if (!visibleList || !visibleList.length) return false;
702
- let hasAdd = visibleList.some(item => item.type === 'ADD');
703
- if (hasAdd) {
704
- return true;
705
- } else {
706
- if (this.currentTempId != 0) return false;
707
- let notLinkArr = visibleList.filter(item => item.type !== 'LINK');
708
- if (!notLinkArr || !notLinkArr.length) return false;
709
- }
710
- return true;
711
- };
712
- },
713
- initPageResize() {
714
- let { showSettings, TypeOfDisplay, classificationIndex } = this;
715
- return {
716
- showSettings,
717
- TypeOfDisplay,
718
- classificationIndex
719
- };
720
- },
721
- isShowRowTileBtnItem() {
722
- return function(item) {
723
- return this.showButtonTop == 1 && item.type != 'LINK' && this.currentTempId == '0';
724
- };
725
- },
726
- showRelatedSearchFold() {
727
- if (
728
- !this.isShowSettingBtn &&
729
- !this.isShowSetting('hideQuickSearch') &&
730
- this.outSearchFieldList.length == 0 &&
731
- this.outRelationQuickSearch.length == 0 &&
732
- !this.showResetFilterBtn &&
733
- !this.$slots.classification
734
- ) {
735
- return false;
736
- } else {
737
- return this.isRelatedSearchFold;
738
- }
739
- },
740
- handlePickerShowTime() {
741
- return function(item) {
742
- if (!item.showTime) return false;
743
- return {
744
- defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')]
745
- };
746
- };
747
- },
748
- isShowGroupBtn() {
749
- if (!this.groupBtnObj || !Object.keys(this.groupBtnObj).length) return false;
750
- return true;
751
- },
752
- showLi() {
753
- return function(item) {
754
- if (item.buttonGroup) {
755
- return item.isShow == '1' && item.buttonGroup && !item.isButtonGroup;
756
- }
757
- return item.isShow == '1';
758
- };
759
- },
760
- showLiAdd() {
761
- return function(b) {
762
- if (b.buttonGroup) {
763
- return b.type == 'ADD' && b.buttonGroup && !b.isButtonGroup;
764
- }
765
- return b.type == 'ADD';
766
- };
767
- },
768
- showLiFold() {
769
- return function(b) {
770
- if (b.buttonGroup) {
771
- return b.type != 'LINK' && this.currentTempId == '0' && b.buttonGroup && !b.isButtonGroup;
772
- }
773
- return b.type != 'LINK' && this.currentTempId == '0';
774
- };
775
- },
776
-
777
- getIsTile() {
778
- return this?.gettersConfig?.getIsTile || '';
779
- },
780
- selectRowObj() {
781
- return this?.gettersConfig?.selectRowObj || [];
782
- },
783
- isInlineOperating() {
784
- return this?.gettersConfig?.isInlineOperating || false;
785
- },
786
- printNumberCache() {
787
- return this?.gettersConfig?.printNumberCache || false;
788
- },
789
-
790
- // 全部行编辑
791
- isBatchEditing() {
792
- return this?.gettersConfig?.isBatchEditing || false;
793
- },
794
- curBatchBtnData() {
795
- return this?.gettersConfig?.curBatchBtnData || {};
796
- },
797
- isRowEditing() {
798
- return this?.gettersConfig?.isRowEditing || false;
799
- },
800
- // 是否有高级筛选外显
801
- showOutSearch() {
802
- return this.outSearchFieldList?.length || this.outRelationQuickSearch?.length;
803
- },
804
- showViewList() {
805
- if (this.editTableSource === 'relatedComponent') {
806
- return this.relatedBaseInfo.showType != 'TREE';
807
- }
808
- return !this.optionsValue('hideViewList');
809
- },
810
- optionsValue() {
811
- return function(key) {
812
- return this.$attrs.tableOptions?.[key];
813
- };
814
- },
815
- searchPlaceHolder() {
816
- if (this.searchInputPlaceHolder) return this.searchInputPlaceHolder;
817
-
818
- if (!this.useFieldList?.length || this.showRelatedTreeBtn) return '请输入关键字搜索';
819
- let str = '';
820
- let strList = this.useFieldList
821
- ?.map(item => {
822
- if (item.isSearch != 1) return '';
823
- return item.formTitle || item.alias || item.title;
824
- })
825
- .filter(Boolean);
826
- if (!strList?.length) return '';
827
- str = '输入' + strList.join('/');
828
- return str || '请输入关键字搜索';
829
- },
830
- showRelatedSearch() {
831
- // sql类型的列表, 且有筛选外显的时候不展示平铺列表的search
832
- if (this.relatedSqlOutSearch) return false;
833
- if (this.isAvailableApiType) return false;
834
- return this.showRelatedTreeBtn && this.isShowSetting('hideSearch');
835
- },
836
- showQuickSearch() {
837
- let showQuick = this.isShowSetting('hideQuickSearch');
838
- // 平铺列表, 左侧不为tree, 而是table
839
- if (this.editTableSource == 'relatedComponent' && this.relatedBaseInfo?.showType != 'TREE') return showQuick;
840
- return showQuick && this.isRelatedSearchFold;
841
- },
842
- showBaseTabs() {
843
- return this.conditionType === 'keyword' && this.tabConditionList?.length && !this.visibleInlineOperateBtn && !this.isRowEditing;
844
- },
845
- isCard() {
846
- return this.TypeOfDisplay === 'cardNew' && this.isBatchSelect == 1
847
- },
848
- showApiSearch(){
849
- return !this.outSearchFieldList?.length && this.isAvailableApiType
850
- },
851
- // sql类型的列表, 且有筛选外显的时候不展示平铺列表的search
852
- relatedSqlOutSearch() {
853
- return this.tableDataType === 'SQL' && !!this.outSearchFieldList?.length
854
- },
855
- isShowInputSearch() {
856
- if(!this.isShowSetting('hideSearch')) return false;
857
- if(!this.showRelatedTreeBtn) return true;
858
- return this.relatedSqlOutSearch;
859
- }
860
- },
861
- data() {
862
- return {
863
- modalVisible: false,
864
- currentTempId: '0',
865
- viewCongfigList: [],
866
- isTile: false,
867
- conditionList: [],
868
- displayCategoryList: [],
869
- settingId: '',
870
- searchDefName: '',
871
- rowTileBtnList: [],
872
- rowFoldBtnList: [],
873
- rowPrintBtnList: [],
874
- rowFoldHideBtnList: [], // 按钮自适应折叠list
875
- rowFoldHideBtnListObj: {}, // 按钮自适应折叠分类
876
- batchRelationBtnIds: [], // 批量操作按钮,关联的对应操作按钮id集
877
- relationBtnBatchBtnIds: [], // 有关联对应操作按钮的批量操作按钮id集
878
-
879
- nobutton: false, // 不展示按钮设置 false 展示,true 不展示
880
- noSetting: false, // 不展示按钮设置 false 展示,true 不展示
881
- isChangeWindow: false,
882
- modalWidth: '700px',
883
- modalHeight: '60vh',
884
- label_max_count: 8,
885
- baseLeftWidth: 0,
886
- btnRowWidth: 0,
887
- classificationWidth: 0,
888
- inputSearchWidth: 0,
889
- quickSearchWidth: 0,
890
- downloadDropdownWidth: 0,
891
- diffWidth: 0,
892
- resizeFlag: false,
893
- rowTileBtnListTree: [],
894
- outSearchFieldList: [],
895
- tabIndex: -1,
896
- // tabConditionList: [],
897
-
898
- /* 打印相关 */
899
- printBtnPrevFnWatch: {},
900
- printPrevFinish: false,
901
- printBtnPrevFnWatchTimeoutTimer: null,
902
- printBtn: {},
903
- groupBtnObj: {},
904
- btnObj: BTNOBJ,
905
- printBtnStrategys: [], // 打印按钮组策略list
906
- outRelationQuickSearch: [], // 关联表 筛选外显
907
- inputSearchW: 200,
908
- showPlaceholderPrefix: false
909
- };
910
- },
911
- created() {
912
- if (this.getIsTile !== undefined) {
913
- this.isTile = this.getIsTile;
914
- }
915
- },
916
- destroyed() {},
917
- methods: {
918
- tabClick(index) {
919
- if (this.tabIndex === index) return false;
920
- this.tabIndex = index;
921
- if (index !== -1) this.$emit('tabClick', this.tabConditionList[index]);
922
- },
923
- pageResize(obj) {
924
- if (this.resizeFlag || this.visibleInlineOperateBtn || this.isRowEditing) return;
925
- let baseLeft = this.$refs['baseLeft'];
926
- if (!baseLeft) return;
927
- this.resizeFlag = true;
928
- this.baseLeftWidth = baseLeft.clientWidth;
929
- this.classificationWidth = this.classificationIndex === 2 ? 160 : 0;
930
- this.btnRowWidth = this.$refs['btnRow']?.clientWidth || 0;
931
- this.inputSearchWidth = this.$refs['inputSearchLi']?.clientWidth || 0;
932
- this.quickSearchWidth = this.$refs['quickSearchLi']?.clientWidth || 0;
933
- // this.downloadDropdownWidth = this.$refs["downloadDropdownLi"]?.clientWidth || 0;
934
- let defaultTotal = this.btnRowWidth + this.classificationWidth + this.inputSearchWidth + this.quickSearchWidth;
935
-
936
- let diffWidth = this.baseLeftWidth - defaultTotal;
937
- // 平铺列表占2行
938
- if (this.editTableSource === 'relatedComponent') {
939
- diffWidth += this.baseLeftWidth;
940
- }
941
- this.diffWidth = diffWidth;
942
- if (!obj.type) return;
943
- if (obj.type === 'resize') {
944
- this.handleTileBtnWidth();
945
- }
946
- },
947
- onResize() {
948
- if (this.isButtonFolding || this.isShowSetting('buttonAdaption') || this.relatedIsTree == 1 || this.visibleInlineOperateBtn || this.isRowEditing) return;
949
- utils.debounce(this.pageResize({ type: 'resize' }), 300);
950
- },
951
- async saveListIsTile() {
952
- let url = `/tableList/saveListIsTile`;
953
- let params = {
954
- isTile: this.isTile ? '1' : '0'
955
- };
956
- let res = await this.handleGetConfigApi(params, 'requestSaveListIsTile');
957
- if (res) {
958
- this.$emit('setIsTile', this.isTile);
959
- this.$message.success(this.$t('1.9.23'));
960
- }
961
- },
962
- getTableCondiTionListRequest(first) {
963
- this.getTableCondiTionList(first).then(checked => {
964
- this.reloadList(checked);
965
- });
966
- },
967
- getTableCondiTionList(first, conditionMap = {}) {
968
- let tableId = this.tableId;
969
- if (!tableId) return new Promise(resolve => resolve(false));
970
- let conditionMapTemp = Object.keys(conditionMap).length > 0 ? conditionMap : this.conditionMap;
971
-
972
- return new Promise((resolve, reject) => {
973
- if (Object.keys(conditionMapTemp).length > 0) {
974
- this.conditionList = conditionMapTemp.conditionList || [];
975
- this.displayCategoryList = conditionMapTemp.displayCategoryList || [];
976
- let obj = {
977
- conditionList: this.conditionList,
978
- displayCategoryList: this.displayCategoryList
979
- };
980
- this.$emit('getQuickSearchListObj', obj);
981
- this.settingId = conditionMapTemp.settingId;
982
- const checked = this.conditionList.find(item => item.isDefault) || {
983
- name: '全部数据' || this.$t('1.1.5.1'),
984
- sid: 'all_data'
985
- };
986
- this.searchDefName = checked.name;
987
- // if (this.conditionType === "keyword") {
988
- this.tabConditionList = conditionMapTemp.tabConditionList || []; // 获取页签tab
989
- if (this.tabIndex === -1) {
990
- this.tabIndex = conditionMapTemp.tabConditionList && conditionMapTemp.tabConditionList.findIndex(item => item.isDefault); // 查询默认选中的标签
991
- }
992
- // }
993
- if (this.$attrs.tableOptions?.filterCondition?.displayCategory && first) {
994
- resolve({
995
- name: this.$attrs.tableOptions?.filterCondition?.name,
996
- sid: this.$attrs.tableOptions?.filterCondition?.displayCategory
997
- });
998
- }
999
- resolve(checked);
1000
- } else {
1001
- resolve({});
1002
- }
1003
- });
1004
-
1005
- // }
1006
- // });
1007
- },
1008
- async getTableCondiTionListNew(tableId) {
1009
- if (!tableId) return new Promise(resolve => resolve(false));
1010
- let params = { tableId };
1011
- let url = `/tableList/getTableCondiTionList`;
1012
- return this.axios
1013
- .get(url, { params })
1014
- .then(({ data }) => {
1015
- if (data && data.result == 'SUCCESS') {
1016
- // 设置分类数据,用于优化组件内的多次请求分类
1017
- this.$emit('setConditionMap', data.map);
1018
- return data.map;
1019
- }
1020
- })
1021
- .catch(err => {
1022
- console.log(err);
1023
- });
1024
- },
1025
- foldQuickSearch() {
1026
- this.$emit('foldQuickSearch', true);
1027
- },
1028
- openModal() {
1029
- this.modalVisible = true;
1030
- },
1031
- closeModal() {
1032
- this.resetChangeWindow();
1033
- this.modalVisible = false;
1034
- },
1035
- resetChangeWindow() {
1036
- this.modalWidth = '700px';
1037
- this.modalHeight = '60vh';
1038
- this.isChangeWindow = false;
1039
- },
1040
- changeModalWindow() {
1041
- this.isChangeWindow = !this.isChangeWindow;
1042
- let docHeight = document.body.clientHeight;
1043
- this.modalWidth = this.modalWidth === '700px' ? `100%` : '700px';
1044
- this.modalHeight = this.modalHeight === '60vh' ? `${docHeight - 108}px` : '60vh';
1045
-
1046
- if (this.modalWidth === '700px') {
1047
- this.label_max_count = 8;
1048
- } else {
1049
- this.$nextTick(() => {
1050
- let ele = document.querySelector('.quickSearch_label-container');
1051
- ele && (this.label_max_count = parseInt((ele.clientWidth - 20) / 112) * 2);
1052
- });
1053
- }
1054
- },
1055
- openSaveToCalss() {
1056
- this.$refs.quicksearch?.openSaveToCalss();
1057
- },
1058
- onSaveSearch() {
1059
- this.$refs.quicksearch?.onSave();
1060
- },
1061
- onSave(obj, isOutFilter = false, config = {}) {
1062
- if (!this.validConObj(obj, this.searchFieldList, this.searchFieldLimit)) return false;
1063
- let copy = [];
1064
- if (this.outSearchFieldList.length) {
1065
- copy = _.cloneDeep(this.outSearchFieldList, true);
1066
- }
1067
- let copyRelation = [];
1068
- if (this.outRelationQuickSearch.length) {
1069
- copyRelation = _.cloneDeep(this.outRelationQuickSearch, true);
1070
- }
1071
- this.$emit('onSave', obj, isOutFilter, copy, copyRelation, config);
1072
- this.modalVisible = false;
1073
- },
1074
- // 外部调用
1075
- editTableGetConObj() {
1076
- if (!this.showOutSearch) return;
1077
- let conObj = this.getConObjParams() || [];
1078
- if (!this.validConObj(conObj, this.searchFieldList, this.searchFieldLimit)) return false;
1079
- return conObj;
1080
- },
1081
- clearData() {
1082
- this.$refs.quicksearch?.clearData();
1083
- },
1084
- /**
1085
- * type 1-预览 2-打印
1086
- */
1087
- handlePrint(clickBtn, btn, type, j) {
1088
- btn.printType = type;
1089
- this.clickBtn(clickBtn, btn, clickBtn.my_index, true, j);
1090
- },
1091
- showDrawer(btn, j) {
1092
- let hasSelectRows = this.paramsData.form.selectRows && this.paramsData.form.selectRows.length > 0;
1093
- let isMultiSelect = hasSelectRows || this.tableAllCheck;
1094
-
1095
- if ((btn.name.includes('批量') && btn.type == 'ADD') || btn.type == 'BATCH') {
1096
- // const { settingObj = {} } = btn || {};
1097
- let settingObj = {};
1098
- let settingList = btn.setting || '{}';
1099
- if (utils.isJSON(settingList)) {
1100
- let btnSetting = JSON.parse(settingList);
1101
- if (Array.isArray(btnSetting)) {
1102
- settingObj = btnSetting[0] || {};
1103
- } else {
1104
- settingObj = btnSetting;
1105
- }
1106
- }
1107
- let trigger_type = settingObj?.trigger_type;
1108
-
1109
- // 全部行编辑
1110
- if (trigger_type == 'EDIT_ROW' || settingObj?.editAllRow == 1) {
1111
- this.handleBtnEvent(btn, j);
1112
- return;
1113
- }
1114
-
1115
- if (trigger_type == 'SCAN' && btn.type == 'ADD') {
1116
- this.handleBtnEvent(btn, j);
1117
- return;
1118
- }
1119
-
1120
- if (isMultiSelect) {
1121
- if (settingObj.isTips && settingObj.isTips == 0) {
1122
- this.handleBtnEvent(btn, j);
1123
- return;
1124
- }
1125
- // 批量操作增加确认
1126
- let params = { ...this.paramsData };
1127
- params.table = {};
1128
- if (settingObj.tipsMsg) {
1129
- if (settingObj.tipsMsg.includes('form.selectRows')) {
1130
- settingObj.tipsMsg = utils.handleMultiTips(settingObj.tipsMsg, [...params.form.selectRows]);
1131
- } else {
1132
- settingObj.tipsMsg = utils.handleSysParams(settingObj.tipsMsg, {
1133
- ...params
1134
- });
1135
- }
1136
- }
1137
- const h = this.$createElement;
1138
- this.$confirm({
1139
- title: h(
1140
- 'div',
1141
- {
1142
- directives: [
1143
- {
1144
- name: 'drag-move',
1145
- value: {
1146
- target: 'ant-modal-confirm-body'
1147
- }
1148
- }
1149
- ],
1150
- domProps: {
1151
- innerHTML: settingObj.tipsMsg || `是否确认${btn.name}`
1152
- }
1153
- }
1154
- // settingObj.tipsMsg || `是否确认${btn.name}`
1155
- ),
1156
- okText: '确定',
1157
- cancelText: '取消',
1158
- onOk: () => {
1159
- this.handleBtnEvent(btn, j);
1160
- },
1161
- onCancel() {
1162
- console.log('Cancel');
1163
- },
1164
- class: 'test'
1165
- });
1166
- } else {
1167
- if (!btn.canHandleUniline) {
1168
- // 1.9.295
1169
- this.$message.warning(`请勾选需要${btn.name}的数据`);
1170
- return;
1171
- }
1172
- this.clickBtn(
1173
- this.clickRowData,
1174
- // 找到对应的单行操作按钮
1175
- this.getUnilineBtn(btn),
1176
- this.clickRowData.my_index,
1177
- true,
1178
- j
1179
- );
1180
- }
1181
- } else {
1182
- if (btn.type == 'ADD' || btn.type == 'BATCH') {
1183
- this.handleBtnEvent(btn, j);
1184
- return;
1185
- }
1186
- this.clickBtn(this.clickRowData, btn, this.clickRowData.my_index, j);
1187
- }
1188
- },
1189
- getUnilineBtn(BatchBtn) {
1190
- let unilineBtnId = this.batchRelationBtnIds[this.relationBtnBatchBtnIds.indexOf(BatchBtn.id)];
1191
- let unilineBtnObj = null;
1192
- this.allBtn.forEach(i => {
1193
- if (i.id == unilineBtnId) {
1194
- unilineBtnObj = i;
1195
- }
1196
- });
1197
- return unilineBtnObj;
1198
- },
1199
- handleBtnEvent(btn, j) {
1200
- let indexList = [];
1201
- this.$emit('clearTeamTitleName');
1202
- if (this.paramsData.form.selectRows && this.paramsData.form.selectRows.length > 0) {
1203
- indexList = this.paramsData.form.selectRows.map(item => {
1204
- if (btn.type == 'BATCH') {
1205
- delete item.SHOW_BUTTON_IDS;
1206
- delete item.operatorColumn;
1207
- }
1208
- return item.my_index;
1209
- });
1210
- }
1211
- let setData = JSON.parse(btn.setting);
1212
- let settingList = JSON.parse(btn.setting);
1213
- /** 按钮对象需求:add类型的 setting 可能是 Array/Object*/
1214
- if (btn.type === 'ADD' || btn.type == 'BATCH') {
1215
- if (Array.isArray(settingList)) {
1216
- setData = settingList[0] || {};
1217
- } else {
1218
- setData = settingList;
1219
- }
1220
- this.paramsData.table = {};
1221
- }
1222
- if (setData.trigger_type == 'ABOUT_ITEM') {
1223
- this.$message.error('按钮事件配置有误');
1224
- return;
1225
- }
1226
- let params = setData.params || [];
1227
- if (setData.trigger_type == 'QR_CODE') {
1228
- params.forEach(item => {
1229
- item.p_value = item.p_value?.replace(/\$\{([^}]+)\}/g, (_v, $1) => {
1230
- return $1 || _v;
1231
- });
1232
- });
1233
- }
1234
- let paramsData = utils.setParamsValue(params, this.paramsData);
1235
- Object.assign(btn, {
1236
- _index_: j
1237
- });
1238
- let btnData = {
1239
- btnData: Object.assign(setData, {
1240
- paramsData: paramsData,
1241
- btnName: btn.name,
1242
- _params_data: this.paramsData,
1243
- _type_: btn.type
1244
- }),
1245
- indexList: indexList,
1246
- btnConfig: JSON.parse(JSON.stringify(btn)),
1247
- _params_data: this.paramsData,
1248
- _type_: btn.type
1249
- };
1250
- this.$emit('btnEvent', btnData);
1251
- },
1252
-
1253
- // 筛选分类相关的
1254
- async updateTableCondiTion() {
1255
- await this.getTableCondiTionListNew(this.tableId);
1256
- this.getTableCondiTionListRequest();
1257
- },
1258
- async CondiTionListInit() {
1259
- await this.getTableCondiTionListNew(this.tableId);
1260
- this.getTableCondiTionListRequest();
1261
- },
1262
- async saveGetTableCondiTionList(options) {
1263
- await this.getTableCondiTionListNew(this.tableId);
1264
- this.getTableCondiTionList();
1265
- this.$emit('getClassification', options);
1266
- },
1267
- changeSearch(key, item) {
1268
- if (key == 'all') {
1269
- this.searchDefName = '全部数据' || this.$t('1.1.5.1');
1270
- } else {
1271
- this.searchDefName = item.name;
1272
- }
1273
- this.$refs.quicksearch.clearData();
1274
- this.$emit('changeSearch', key, item);
1275
- },
1276
- changeSearchTile(val) {
1277
- this.isTile = val;
1278
- this.saveListIsTile();
1279
- },
1280
- openSetting() {
1281
- this.$refs.search.handleMenuClick('setting');
1282
- },
1283
- reloadList(item) {
1284
- this.$refs.quicksearch?.clearData();
1285
- this.$emit('reloadList', item);
1286
- },
1287
- clickBtn(data, item, index, skip, j) {
1288
- this.$emit('clearTeamTitleName');
1289
- if ((item.name.includes('批量') && item.type == 'ADD' && !skip) || (item.type == 'BATCH' && !skip)) {
1290
- this.showDrawer(item, j);
1291
- return;
1292
- }
1293
- if (Object.keys(data || {}).length === 0 && !this.isPrintBtn(item)) {
1294
- // 请点击要操作的数据1.9.140
1295
- this.$message.info('请点击要操作的数据' || this.$t('1.9.140'));
1296
- return;
1297
- }
1298
- Object.assign(item, {
1299
- _index_: j
1300
- });
1301
- this.$emit('clickBtn', data, item, index);
1302
- },
1303
- clickGroupBtn(btn, j) {
1304
- this.clickBtn(this.clickRowData, btn, this.clickRowData.my_index, undefined, j);
1305
- },
1306
- handlerSetting() {
1307
- this.$emit('handlerSetting');
1308
- },
1309
- // 请求视图列表
1310
- handlerReqAllConfigView() {
1311
- let params = {
1312
- type: 'PC',
1313
- typeTable: 'TABLE_LIST',
1314
- tableId: this.tableId,
1315
- page: 1,
1316
- rows: 20
1317
- };
1318
- this.axios
1319
- .get('/tableListConfigView/getTableListConfigViewAll', {
1320
- params: params
1321
- })
1322
- .then(({ data }) => {
1323
- if (data.rows) {
1324
- let viewCongfigList = data.rows || [];
1325
- if (viewCongfigList.length > 0) {
1326
- // 查找默认值
1327
- let curItem = viewCongfigList.find(v => v.mark == 1);
1328
- this.currentTempId = curItem ? curItem.id : '0';
1329
- this.$emit('handlerChangeView', this.currentTempId);
1330
- } else {
1331
- this.currentTempId = '0';
1332
- this.$emit('handlerChangeView', this.currentTempId);
1333
- }
1334
-
1335
- this.$set(this, 'viewCongfigList', viewCongfigList);
1336
- }
1337
- });
1338
- },
1339
- handlerSelectTemp(e) {
1340
- if (this.currentTempId === e) return;
1341
- this.currentTempId = e;
1342
- const tab = e == 0 ? 'bigTable' : null;
1343
- this.$emit('handlerChangeView', e, tab);
1344
- let f = this.viewList.findIndex(v => v.id == e);
1345
- this.resetCheckStatus();
1346
- this.$nextTick(() => {
1347
- this.formatRowBtnList();
1348
- });
1349
- },
1350
- isShowSetting(v) {
1351
- if (v == 'hideSettingBtn') {
1352
- return this.isOrgAdmin || this.showSettings[v] == 0;
1353
- } else {
1354
- if (this.showRelatedTreeBtn) {
1355
- return this.relatedBaseInfo[v] == 0;
1356
- }
1357
- return this.showSettings[v] == 0;
1358
- }
1359
- },
1360
- setBatchRelationBtnIds(list) {
1361
- let showButtonTop = !!this.showButtonTop;
1362
- if (!showButtonTop) return false;
1363
-
1364
- list.forEach(item => {
1365
- let relationBtnId = item.setting && JSON.parse(item.setting)?.relationBtnId;
1366
- if (item.type === 'BATCH' && relationBtnId) {
1367
- this.relationBtnBatchBtnIds.push(item.id);
1368
- this.batchRelationBtnIds.push(relationBtnId);
1369
- }
1370
- });
1371
- },
1372
- setBtnStatus(btn) {
1373
- const btnObj = utils.getRowOperatorIdSetting({}, btn);
1374
- const { settingObj = {} } = btnObj || {};
1375
- let isAllSelect = this.tableAllCheck;
1376
- let isMultiSelect = !!this.paramsData.form.selectIds;
1377
- let isBatchBtn = btn.type === 'BATCH';
1378
- let isAddBtn = btn.type === 'ADD';
1379
- let isSQLSAVEBtn = settingObj.trigger_type === 'SQLSAVE';
1380
- let isLineBtn = btn.type === 'EDIT' || btn.type === 'DELETE';
1381
- let isImportGuage = settingObj.trigger_type === 'GUAGE' && settingObj.guage_type == 'importGuage';
1382
-
1383
- let isEditRow = settingObj.trigger_type === 'EDIT_ROW';
1384
- let editAllRow = settingObj.editAllRow == 1;
1385
-
1386
- // 批量&&行编辑&&全部行编辑 直接展示
1387
- if (isBatchBtn && isEditRow && editAllRow) {
1388
- btn.isVisible = true;
1389
- return;
1390
- }
1391
-
1392
- // 默认情况下 只展示新增&下载
1393
- if (!this.showDownCurSelectData) {
1394
- btn.isVisible = isAddBtn ? true : false;
1395
- if (!isImportGuage) return;
1396
- }
1397
-
1398
- // btn.settingObj.guage_type == "importGuage";
1399
- // 全选状态下,只有入口类型的批量按钮展示(因当前版本仅支持入口类型的全选批量操作
1400
- if (isBatchBtn && isAllSelect) {
1401
- btn.isVisible = isSQLSAVEBtn;
1402
- return;
1403
- }
1404
-
1405
- // 批量操作按钮,如果有绑定对应单行操作按钮,则批量按钮开启单行操作
1406
- let relationBtnId = JSON.parse(btn.setting).relationBtnId;
1407
- if (isBatchBtn && relationBtnId) {
1408
- btn.canHandleUniline = true;
1409
- }
1410
-
1411
- // 批量按钮关联的对应按钮
1412
- if (this.showDownCurSelectData > 1 && isLineBtn) {
1413
- btn.isVisible = false;
1414
- } else {
1415
- if (isBatchBtn && btn.chooseTwoData == 1) {
1416
- btn.isVisible = !this.batchRelationBtnIds.includes(btn.id) && this.showDownCurSelectData > 1;
1417
- } else {
1418
- btn.isVisible = !this.batchRelationBtnIds.includes(btn.id);
1419
- }
1420
- }
1421
-
1422
- // 未绑定了行级按钮的批量按钮,默认隐藏, 勾选展示
1423
- if (isBatchBtn && !relationBtnId && this.showDownCurSelectData > 1) {
1424
- btn.isVisible = isMultiSelect;
1425
- }
1426
- // 量表导入按钮
1427
- if (isImportGuage) {
1428
- btn.isImportGuage = true;
1429
- btn.isVisible = false;
1430
- }
1431
- },
1432
- // 处理分组按钮
1433
- handleButtonGroup(buttonList) {
1434
- let useBttonList = buttonList
1435
- .map(v => {
1436
- v.isButtonGroup = false;
1437
- // 有分组名 非隐藏
1438
- if (!v.buttonGroup || !v.isVisible || v.isShow != 1) return null;
1439
- if (v.type === 'ADD' || v.type == 'BATCH') return v;
1440
- if (this.showButtonTop != 1) return null;
1441
- return v;
1442
- })
1443
- .filter(Boolean);
1444
- if (!useBttonList.length) return;
1445
- let groupRes = vexutils.groupBy(useBttonList, 'buttonGroup');
1446
- if (!groupRes || !Object.keys(groupRes).length) return;
1447
- let resObj = {};
1448
- Object.keys(groupRes).forEach(item => {
1449
- let list = groupRes[item];
1450
- // 超过一个才展示
1451
- if (item && list?.length > 1) {
1452
- resObj[item] = {
1453
- key: item,
1454
- isHide: false,
1455
- list: list,
1456
- clientWidth: 0,
1457
- isVisible: true
1458
- };
1459
- list.forEach(v => (v.isButtonGroup = true));
1460
- }
1461
- });
1462
- this.groupBtnObj = resObj;
1463
- },
1464
- async formatRowBtnList() {
1465
- let rowFoldBtnList = [];
1466
- let rowTileBtnList = [];
1467
- let rowPrintBtnList = [];
1468
- this.rowFoldBtnList = [];
1469
- this.rowTileBtnList = [];
1470
- this.rowPrintBtnList = [];
1471
- this.rowFoldHideBtnList = [];
1472
- this.batchRelationBtnIds = [];
1473
- this.relationBtnBatchBtnIds = [];
1474
- this.groupBtnObj = {};
1475
- let useButton = [];
1476
- // let tempBtnList = this.rowBtnList;
1477
- // // 按钮置顶时 过滤掉行级按钮中 仅图标
1478
- // if (this.showButtonTop == 1) {
1479
- // tempBtnList = tempBtnList.filter(v => {
1480
- // if (["EDIT", "DELETE"].includes(v.type)) {
1481
- // if (v.showStyle != "only_icon") return v;
1482
- // } else {
1483
- // return v;
1484
- // }
1485
- // });
1486
- // }
1487
- let rowBtnList = this.rowBtnList;
1488
- // 新卡片视图 有进入批量模式的按钮
1489
- if (this.isCard) {
1490
- if(this.isCardNewBatch) {
1491
- rowBtnList = rowBtnList.map(v => {
1492
- if(v.type == 'BATCH') return v
1493
- return null
1494
- }).filter(Boolean);
1495
- } else {
1496
- rowBtnList = rowBtnList.map(v => {
1497
- if(v.type != 'BATCH') return v;
1498
- return null;
1499
- }).filter(Boolean);
1500
- }
1501
- }
1502
- if (!rowBtnList?.length) return;
1503
- this.setBatchRelationBtnIds(rowBtnList);
1504
-
1505
-
1506
- // 子列表只留下行级按钮
1507
- // if (this.isNestTableClick) {
1508
- // rowBtnList = this.rowBtnList.filter(item => item.type != 'ADD' && item.type != 'BATCH');
1509
- // }
1510
-
1511
- rowBtnList.forEach(btn => {
1512
- if (!(btn.isShow == '1' && btn.type != 'LINK')) return;
1513
- btn.isHide = false;
1514
- btn.isButtonGroup = false;
1515
- let cloneBtn = _.cloneDeep(btn);
1516
- this.setBtnStatus(cloneBtn);
1517
- // 按钮自适应 即使折叠也平铺显示出来
1518
- if (this.isShowSetting('buttonAdaption')) {
1519
- if (btn.toggle == 'fold') {
1520
- if (btn.type != 'ADD' && btn.type != 'BATCH' && this.showButtonTop == 0) return;
1521
- if (!this.isPrintBtn(btn)) {
1522
- rowFoldBtnList.push(cloneBtn);
1523
- }
1524
- } else {
1525
- rowTileBtnList.push(cloneBtn);
1526
- }
1527
- } else {
1528
- rowTileBtnList.push(cloneBtn);
1529
- }
1530
- useButton.push(cloneBtn);
1531
- });
1532
- if (this.isShowSetting('buttonAdaption')) {
1533
- this.rowFoldBtnList = rowFoldBtnList;
1534
- }
1535
-
1536
- this.rowTileBtnList = rowTileBtnList.filter(i => {
1537
- if (this.isPrintBtn(i)) {
1538
- rowPrintBtnList.push(i);
1539
- } else {
1540
- return i;
1541
- }
1542
- });
1543
-
1544
- let printNumberList = (await this.getPrintNumber(rowPrintBtnList)) || [];
1545
- rowPrintBtnList = this.setPrintNumberToBtnList(printNumberList, rowPrintBtnList);
1546
- // this.rowPrintBtnList = rowPrintBtnList;
1547
- // 添加批量打印策略:strategy: MULTI(循环多条, 默认值, 为空时使用该策略) ONCE(聚合一条)
1548
- this.rowPrintBtnList = rowPrintBtnList.map(item => {
1549
- const obj = this.printBtnStrategys.find(v => v.id === item.settingObj[0].trigger_id);
1550
- item.strategy = obj?.setting ? JSON.parse(obj.setting).strategy : 'MULTI';
1551
- return item;
1552
- });
1553
-
1554
- this.hideInlineOperationBtn();
1555
-
1556
- // 分组按钮
1557
- this.handleButtonGroup(useButton);
1558
-
1559
- if (this.isShowSetting('buttonAdaption')) return;
1560
- this.$nextTick(() => {
1561
- this.handleTileBtnWidth();
1562
- this.dealOutFilterHideBtn();
1563
- });
1564
- },
1565
- hideInlineOperationBtn() {
1566
- if (this.TypeOfDisplay === 'table') return;
1567
-
1568
- this.rowFoldBtnList = this.rowFoldBtnList.filter(item => {
1569
- return item.settingObj[0].trigger_type !== 'EDIT_ROW';
1570
- });
1571
- this.rowTileBtnList = this.rowTileBtnList.filter(item => {
1572
- return item.settingObj[0].trigger_type !== 'EDIT_ROW';
1573
- });
1574
- },
1575
- isPrintBtn(btn) {
1576
- const copySettingObj = btn.settingObj;
1577
- let settingObj = {};
1578
- if (Array.isArray(copySettingObj)) {
1579
- settingObj = copySettingObj[0];
1580
- } else {
1581
- settingObj = copySettingObj;
1582
- }
1583
- if (!settingObj) return false;
1584
- return settingObj.trigger_type === 'PRINT';
1585
- },
1586
- handleTileBtnWidth() {
1587
- if (this.outSearchFieldList.length > 0) return; // 存在外显按钮的时候 不触发这个函数
1588
- let rowTileBtnRef = this.$refs.rowTileBtnItem;
1589
- if (!rowTileBtnRef || !rowTileBtnRef.length) return;
1590
- let rowTileBtnList = JSON.parse(JSON.stringify(this.rowTileBtnList));
1591
- let groupBtnObj = JSON.parse(JSON.stringify(this.groupBtnObj));
1592
- let btnTotalWidth = 90;
1593
- let hasHideBtn = false;
1594
- let rowFoldHideBtnWidth = 90;
1595
- let diffWidth = this.diffWidth;
1596
- rowTileBtnRef.forEach((e, index) => {
1597
- let dataKey = e.getAttribute('data-key');
1598
- let dateSource = e.getAttribute('data-source');
1599
- let clientWidth = e.clientWidth;
1600
- let item;
1601
- if (dateSource == 'groupBtn') {
1602
- item = groupBtnObj[dataKey];
1603
- } else {
1604
- item = rowTileBtnList.find(v => v.sid === dataKey);
1605
- }
1606
- if (!item) return;
1607
- if (clientWidth) {
1608
- item.clientWidth = clientWidth;
1609
- }
1610
- if (item.clientWidth) {
1611
- clientWidth = item.clientWidth;
1612
- }
1613
- if (diffWidth <= 0) {
1614
- this.$set(item, 'isHide', true);
1615
- } else if (diffWidth > 0 && item.isVisible) {
1616
- btnTotalWidth += clientWidth;
1617
- if (btnTotalWidth > diffWidth) {
1618
- this.$set(item, 'isHide', true);
1619
- if (!hasHideBtn) {
1620
- hasHideBtn = true;
1621
- diffWidth -= rowFoldHideBtnWidth;
1622
- btnTotalWidth -= rowFoldHideBtnWidth;
1623
- }
1624
- } else {
1625
- this.$set(item, 'isHide', false);
1626
- }
1627
- }
1628
- });
1629
- let hideBtn = rowTileBtnList.filter(item => item.isVisible && item.isHide);
1630
- this.groupBtnObj = groupBtnObj;
1631
- this.rowTileBtnList = rowTileBtnList;
1632
- let rowFoldHideBtnListObj = {
1633
- ADD: { name: '新增按钮', list: [] },
1634
- INLINE: { name: '行级按钮', list: [] },
1635
- BATCH: { name: '批量按钮', list: [] }
1636
- };
1637
-
1638
- hideBtn.forEach(item => {
1639
- item.isShowFoldGroupBtn = false;
1640
- if (item.type === 'ADD') {
1641
- rowFoldHideBtnListObj.ADD.list.push(item);
1642
- } else if (item.type == 'BATCH') {
1643
- rowFoldHideBtnListObj.BATCH.list.push(item);
1644
- } else {
1645
- rowFoldHideBtnListObj.INLINE.list.push(item);
1646
- }
1647
- });
1648
-
1649
- let hideGroupBtnObj = {};
1650
- // 按钮自适应 隐藏的分组 需要在折叠中平铺展示
1651
- for (let key in groupBtnObj) {
1652
- if (groupBtnObj[key].isHide) {
1653
- let list = groupBtnObj[key].list;
1654
- hideGroupBtnObj[key] = {
1655
- name: key,
1656
- list
1657
- };
1658
- list.forEach(item => {
1659
- let matchItem = hideBtn.find(v => v.sid === item.sid);
1660
- if (!matchItem) {
1661
- item.isShowFoldGroupBtn = true;
1662
- hideBtn.push(item);
1663
- } else {
1664
- matchItem.isShowFoldGroupBtn = true;
1665
- }
1666
- });
1667
- }
1668
- }
1669
- if (Object.keys(hideGroupBtnObj).length) {
1670
- Object.assign(rowFoldHideBtnListObj, hideGroupBtnObj);
1671
- }
1672
-
1673
- this.rowFoldHideBtnListObj = rowFoldHideBtnListObj;
1674
- this.rowFoldHideBtnList = hideBtn;
1675
- this.resizeFlag = false;
1676
- },
1677
- resetCheckStatus() {
1678
- this.$emit('pubResetCheckStatus');
1679
- },
1680
- handleReset() {
1681
- this.$emit('handleReset', { targetType: 'outQuickSearchReset' });
1682
- },
1683
- changeCardNewBatch(val) {
1684
- this.$emit('changeCardNewBatch', val)
1685
- },
1686
- handleUploadChange(info) {
1687
- const { file, fileList } = info;
1688
- if (file.status !== 'uploading') {
1689
- console.log(file, fileList);
1690
- }
1691
- if (file.status === 'done') {
1692
- if (file.response?.result == 'SUCCESS') {
1693
- this.$message.success(`${file.name} 导入成功`);
1694
- this.$emit('importUpdate');
1695
- } else {
1696
- this.$message.error(`${file.name} 导入失败`);
1697
- }
1698
- } else if (file.status === 'error') {
1699
- this.$message.error(`${file.name} 导入失败`);
1700
- }
1701
- },
1702
- handleOtherConfigInit() {
1703
- setTimeout(() => {
1704
- let tableOptions = this.$attrs?.tableOptions || this.tableOptions || {};
1705
- const { nobutton = false, TypeOfDisplay = '', noSetting = false } = tableOptions?.config || {};
1706
- this.nobutton = nobutton || false;
1707
- if (TypeOfDisplay === 'table') {
1708
- this.currentTempId = '0';
1709
- }
1710
- if (noSetting) {
1711
- // this.showSettings["hideSettingBtn"] = 1;
1712
- this.noSetting = true;
1713
- }
1714
- }, 16);
1715
- },
1716
-
1717
- handleTopBtnTracher(btn, j) {
1718
- try {
1719
- // 埋点
1720
- this.$_handleTracherLog('列表按钮', {
1721
- 列表ID: this.tableId || '',
1722
- 列表名称: this.tableName || this.$attrs?.tableName || '',
1723
- 按钮名称: btn.name,
1724
- 按钮ID: btn.id,
1725
- 按钮类型: btn.type,
1726
- 按钮顺序位置: j,
1727
- 显示位置: btn.toggle
1728
- });
1729
- } catch (error) {
1730
- console.log(error);
1731
- }
1732
- },
1733
- handleAddType(btn) {
1734
- const btnObj = utils.getRowOperatorIdSetting({}, btn);
1735
- let setData = JSON.parse(btnObj.setting);
1736
- const { editTableWrapper } = this;
1737
- const tableParams = JSON.parse(JSON.stringify(this.paramsData));
1738
-
1739
- if (editTableWrapper.options && utils.isPlainObject(editTableWrapper.options.extendParams)) {
1740
- // 有额外的参数
1741
- editTableWrapper.options?.extendParams && Object.assign(tableParams.form, editTableWrapper.options.extendParams);
1742
- }
1743
- const paramsData = Object.assign(tableParams, {
1744
- table: btn
1745
- });
1746
- const params = utils.setParamsValue(setData.params, paramsData);
1747
- Object.assign(setData, { params, _params_data: paramsData });
1748
- this.$emit('btnEventTree', setData);
1749
- },
1750
- getRowTileBtnList(btnList) {
1751
- this.rowTileBtnListTree = [];
1752
- this.rowTileBtnListTree = btnList.filter(btn => btn.isShow == '1' && btn.type == 'ADD');
1753
- },
1754
- relatedSearchInputBlur() {
1755
- let searchInput = this.$refs.relatedSearchInput;
1756
- if (!searchInput) return;
1757
- if (!searchInput.$el?.children) return;
1758
- if (!searchInput.$el.children[0]?.children) return;
1759
- if (!searchInput.$el.children[0].children[0]) return;
1760
- if (!searchInput.$el.children[0].children[0]?.children) return;
1761
- let inputDom = searchInput.$el.children[0].children[0].children[0];
1762
- if (!inputDom) return;
1763
- inputDom.blur();
1764
- },
1765
- handleRequestedLabel(v) {
1766
- let params = { type: v, pageSize: 10000 };
1767
- return this.axios.get('/label/list', { params: params });
1768
- },
1769
- initOutSearchFieldList(config = {}) {
1770
- this.outSearchFieldList = [];
1771
- this.outRelationQuickSearch = [];
1772
- let mySearchFieldList = JSON.parse(JSON.stringify(this.searchFieldList)).filter(i => ((i.random_key = this.getFiledRandom_key(i)), i.isShowSearch == 1 && i.filterExplicit == 1));
1773
- this.outSearchFieldList = mySearchFieldList;
1774
- // 跨表
1775
- let outRelationQuickSearch = this.relationTableList.map(item => {
1776
- return {
1777
- fieldList: item.fieldList.fieldList.filter(item => item.isShowSearch == 1 && item.filterExplicit == 1) || [],
1778
- tableName: item.tableName,
1779
- primaryField: item.primaryField,
1780
- parameterConversionId: item.parameterConversionId,
1781
- tableId: item.tableId,
1782
- relationField: item.relationField,
1783
- converFun: item.converFun,
1784
- relationOrgId: item.relationOrgId,
1785
- preConObj: item.preConObj,
1786
- preSqlExpression: item.preSqlExpression
1787
- };
1788
- });
1789
- outRelationQuickSearch = outRelationQuickSearch.filter(item => item.fieldList.length);
1790
- this.$set(this, 'outRelationQuickSearch', outRelationQuickSearch);
1791
- this.dealOutFilterHideBtn();
1792
- this.handlerInitSearchItem(this.outSearchFieldList);
1793
- this.outRelationQuickSearch.forEach(item => {
1794
- this.handlerInitSearchItem(item.fieldList);
1795
- });
1796
- if (this.lastOutSearchFieldList.length > 0) {
1797
- this.outSearchFieldList = _.cloneDeep(this.lastOutSearchFieldList);
1798
- }
1799
- if (this.lastOutRelationQuickSearch.length) {
1800
- this.outRelationQuickSearch = this.$utils.clone(this.lastOutRelationQuickSearch, true);
1801
- }
1802
-
1803
- // 如有配置默认值
1804
- const isSetDefVal = this.outSearchFieldList.some(v => {
1805
- if (this.isRender(v)) {
1806
- return this.isExistDefValByRenderWidget(v);
1807
- }
1808
- return !!v.explicitDefaultVal
1809
- });
1810
- if (isSetDefVal) {
1811
- this.$emit('outSearchInit');
1812
- if ('reset' != config?.type) {
1813
- this.outFilterChange({ type: 'outSearchInit' });
1814
- }
1815
- }
1816
- },
1817
- dealOutFilterHideBtn() {
1818
- if (!this.isShowSetting('buttonAdaption') && this.outSearchFieldList.length > 0) {
1819
- // 如果设置了按钮自适应 全部按钮放入折叠按钮
1820
- // 需要考虑按钮是否有分组 过滤掉分组
1821
- let rowTileBtnList = JSON.parse(JSON.stringify(this.rowTileBtnList));
1822
- let hideBtn = rowTileBtnList.filter(item => {
1823
- if (!item.isVisible) return false;
1824
- if (!item.buttonGroup) return true;
1825
- if (this.groupBtnObj && this.groupBtnObj[item.buttonGroup]) return false;
1826
- return true;
1827
- });
1828
- this.rowTileBtnList = rowTileBtnList.map(i => {
1829
- i['isHide'] = true;
1830
- return i;
1831
- });
1832
- let rowFoldHideBtnListObj = {
1833
- ADD: { name: '新增按钮', list: [] },
1834
- INLINE: { name: '行级按钮', list: [] },
1835
- BATCH: { name: '批量按钮', list: [] }
1836
- };
1837
- hideBtn.forEach(item => {
1838
- this.$set(item, 'isHide', true);
1839
- if (item.type === 'ADD') {
1840
- rowFoldHideBtnListObj.ADD.list.push(item);
1841
- } else if (item.type == 'BATCH') {
1842
- rowFoldHideBtnListObj.BATCH.list.push(item);
1843
- } else {
1844
- rowFoldHideBtnListObj.INLINE.list.push(item);
1845
- }
1846
- });
1847
- this.rowFoldHideBtnListObj = rowFoldHideBtnListObj;
1848
- this.rowFoldHideBtnList = hideBtn;
1849
- }
1850
- },
1851
- outFilterChange(config = {}) {
1852
- let conObj = this.getConObjParams() || [];
1853
- this.onSave(conObj, true, config);
1854
- },
1855
- visibleBtn(btn) {
1856
- if (!btn.isVisible) return false;
1857
- if (this.isInlineOperating) return false;
1858
-
1859
- return true;
1860
- },
1861
- /* 打印相关 */
1862
- toSelectPrintObjs(value) {
1863
- let oldtableData = this.oldtableData;
1864
- let selectData = [];
1865
- if (value && value.length) {
1866
- value.forEach(v => {
1867
- let loopNode;
1868
- this.loop(oldtableData, v.my_index, item => {
1869
- loopNode = item;
1870
- });
1871
- selectData.push({
1872
- ...loopNode
1873
- });
1874
- });
1875
- }
1876
- selectData = selectData.map(item => {
1877
- return utils.paramsToPrintValue(item);
1878
- });
1879
-
1880
- return selectData;
1881
- },
1882
- loop(data, theUniqueKey, callback) {
1883
- data.forEach((item, index, arr) => {
1884
- if (item.theUniqueKey === theUniqueKey) {
1885
- return callback(item, index, arr);
1886
- }
1887
- if (item.children) {
1888
- return this.loop(item.children, theUniqueKey, callback);
1889
- }
1890
- });
1891
- },
1892
- getPrintBtnParams(btn) {
1893
- const paramsData = JSON.parse(JSON.stringify(this.paramsData));
1894
- // const selectRows = this.toSelectPrintObjs(paramsData.form.selectRows);
1895
- const setData = JSON.parse(btn.setting);
1896
- let paramsArray = [];
1897
- paramsData.form.selectRows.forEach(i => {
1898
- const obj = {
1899
- table: i
1900
- };
1901
- // paramsArray.push(utils.setParamsValue(setData[0].params, Object.assign(paramsData, { obj })));
1902
- paramsArray.push(utils.setParamsValue(setData[0].params, Object.assign(paramsData, { obj, table: i })));
1903
- });
1904
-
1905
- return paramsArray;
1906
- },
1907
- setPrintNumberToBtnList(printNumberList = [], btnList = []) {
1908
- let cloneList = _.cloneDeep(btnList);
1909
-
1910
- printNumberList.forEach((item, index) => {
1911
- const i = cloneList.findIndex(v => v.settingObj[0].trigger_id == item.id);
1912
- if (i > -1) {
1913
- cloneList[i].__printConfig = {
1914
- number: item.number,
1915
- authorizationKey: item.authorizationKey,
1916
- port: item.port,
1917
- versionType: item.versionType,
1918
- hisParams: { reportid: item.number }
1919
- };
1920
- }
1921
- // cloneList[index].__printConfig = {
1922
- // number: item.number,
1923
- // authorizationKey: item.authorizationKey,
1924
- // port: item.port,
1925
- // versionType: item.versionType,
1926
- // hisParams: { reportid: item.number }
1927
- // };
1928
- });
1929
-
1930
- return cloneList;
1931
- },
1932
- async getPrintNumber(list) {
1933
- if (!list?.length) return;
1934
-
1935
- let ids = list.map(item => item.settingObj[0].trigger_id).join(',');
1936
-
1937
- let printNumberCacheKeys = Object.keys(this.printNumberCache);
1938
- let haveCache = printNumberCacheKeys.includes(ids);
1939
- if (haveCache) {
1940
- let printNumberList = this.printNumberCache[ids];
1941
- this.printBtnStrategys = printNumberList;
1942
- return Promise.resolve(printNumberList);
1943
- }
1944
-
1945
- let res = await this.handleGetConfigApi({ ids }, 'requestGetByIds');
1946
-
1947
- const { status, data } = res;
1948
- if (status) {
1949
- let resList = data?.list || [];
1950
- this.printBtnStrategys = resList;
1951
- list = resList.map(item => {
1952
- return {
1953
- number: item.number,
1954
- authorizationKey: data.authorizationKey,
1955
- versionType: data.versionType,
1956
- port: data.port,
1957
- id: item.id,
1958
- ...item
1959
- };
1960
- });
1961
- let len = list?.length || 0;
1962
- if (len > 0) {
1963
- this.setPrintNumberCache({
1964
- ids,
1965
- list
1966
- });
1967
- }
1968
-
1969
- return list;
1970
- }
1971
- return list;
1972
- },
1973
- async receivePrintSuccessAboutPrint(res, info) {
1974
- const printBtn = this.printBtn;
1975
- const templateId = info.templateId;
1976
- const formatId = info.formatId;
1977
- const number = printBtn.__printConfig.number;
1978
-
1979
- try {
1980
- const print = { formatId, number };
1981
- // 执行打印后置条件
1982
- const result = await this.printConfig.postStepRule(printBtn.settingObj, {
1983
- result: res,
1984
- print: print
1985
- });
1986
-
1987
- if (result.method !== 'sync') return;
1988
- // 同步刷新列表
1989
- this.editTableWrapper?.$refs?.editTable?.getTableList('', false, true, true);
1990
- } catch (error) {
1991
- console.log('error', error);
1992
- }
1993
- },
1994
- async receivePrintSuccess(res, info) {
1995
- if (info.type === 'print') {
1996
- await this.receivePrintSuccessAboutPrint(res, info);
1997
- }
1998
- setTimeout(() => {
1999
- this.$message.success(res.message);
2000
- }, 3500);
2001
- },
2002
- receivePrintError(res) {
2003
- let errorMsg = res.message;
2004
- res.errinfo && (errorMsg += `:${res.errinfo}`);
2005
- this.$message.error(errorMsg);
2006
- },
2007
- resetAllPrintFnWatch() {
2008
- let keys = Object.keys(this.printBtnPrevFnWatch);
2009
- keys.forEach(key => {
2010
- if (!this.printBtnPrevFnWatch[key]) return false;
2011
- this.printBtnPrevFnWatch[key]();
2012
- this.printBtnPrevFnWatch[key] = null;
2013
- delete this.printBtnPrevFnWatch[key];
2014
- });
2015
- },
2016
- printBtnPrevFnWatchSetTimeout(reject) {
2017
- if (this.printBtnPrevFnWatchTimeoutTimer) {
2018
- clearTimeout(this.printBtnPrevFnWatchTimeoutTimer);
2019
- this.printBtnPrevFnWatchTimeoutTimer = null;
2020
- }
2021
-
2022
- this.printBtnPrevFnWatchTimeoutTimer = setTimeout(() => {
2023
- this.resetAllPrintFnWatch();
2024
- reject();
2025
- }, 10000);
2026
- },
2027
- printBtnPrevFn(clickBtn, btn, type, j) {
2028
- return new Promise((resolve, reject) => {
2029
- /*
2030
- 触发原按钮流程,在EditTable中触发原打印按钮节点时,修改[printPrevFinish]状态
2031
- 触发watch,再执行Promise.resolve()
2032
- */
2033
- this.clickBtn(clickBtn, btn, clickBtn.my_index, true, j);
2034
- const timestamp = Date.now();
2035
-
2036
- this.resetAllPrintFnWatch();
2037
- this.printPrevFinish = false;
2038
-
2039
- this.printBtnPrevFnWatch[timestamp] = this.$watch('printPrevFinish', val => {
2040
- if (!this.printBtnPrevFnWatch[timestamp]) return false;
2041
- this.resetAllPrintFnWatch();
2042
- resolve();
2043
- });
2044
-
2045
- this.printBtnPrevFnWatchSetTimeout(reject);
2046
- });
2047
- },
2048
- inlineEditClick() {
2049
- let { btnName, tipsMsg, isTips } = this.curBatchBtnData || {};
2050
- let _this = this;
2051
- // 保存是否需要提示
2052
- if (isTips != 1) {
2053
- this.setBatchSaveRowStatus(true);
2054
- return;
2055
- }
2056
- this.$confirm({
2057
- title: tipsMsg || `是否确认${btnName}`,
2058
- okText: '确定',
2059
- cancelText: '取消',
2060
- onOk: () => {
2061
- _this.setBatchSaveRowStatus(true);
2062
- },
2063
- onCancel() {}
2064
- });
2065
- },
2066
-
2067
- /**
2068
- * 获取外显检索的默认值设置
2069
- */
2070
- handleGetOutSearchInitValue() {
2071
- const isSetDefVal = this.outSearchFieldList.some(v => {
2072
- if (this.isRender(v)) {
2073
- return this.isExistDefValByRenderWidget(v);
2074
- }
2075
- return !!v.explicitDefaultVal
2076
- });
2077
- if (isSetDefVal) {
2078
- let conObj = this.getConObjParams() || [];
2079
- return conObj;
2080
- }
2081
-
2082
- return [];
2083
- },
2084
-
2085
- getFiledRandom_key(el) {
2086
- // 初始化
2087
- const showSetting = el?.settingObj?.showSetting || [];
2088
- let f = !this.$utils.isEmpty(el?.settingObj?.wordbook);
2089
- if (!showSetting?.length && f) {
2090
- return Math.random().toString();
2091
- }
2092
- return '11';
2093
- },
2094
-
2095
- inlineEditCancel() {
2096
- this.setBatchCancelRowStatus(true);
2097
- },
2098
-
2099
- setBatchSaveRowStatus(f) {
2100
- this.$emit('setBatchSaveRowStatus', f);
2101
- },
2102
-
2103
- setBatchCancelRowStatus(f) {
2104
- this.$emit('setBatchCancelRowStatus', f);
2105
- },
2106
-
2107
- setPrintNumberCache(obj) {
2108
- this.$emit('setPrintNumberCache', obj);
2109
- },
2110
-
2111
- getRef(key){
2112
- let ref = this.$refs[key];
2113
- if(Array.isArray(ref)){
2114
- return ref[0];
2115
- }
2116
- return ref;
2117
- },
2118
-
2119
- /**
2120
- * 赋值给检索外显
2121
- */
2122
- async setOutFilterValues(obj){
2123
- if(typeof obj === 'object'){
2124
-
2125
- const outObj = this.outSearchFieldList.reduce((pre,cur)=>{
2126
- cur.columnName && (pre[cur.columnName]=cur)
2127
- return pre;
2128
- },{});
2129
-
2130
- // 遍历对象赋值
2131
- Object.keys(obj).forEach(k=>{
2132
- let val = obj[k];
2133
- let item = outObj[k] || {}
2134
- if(vexutils.isObject(val)){
2135
- let ks = ['bigValue','lessValue'];
2136
- ks.forEach(kk=>{
2137
- this.$set(item,kk,val[kk]);
2138
- })
2139
- } else {
2140
- if (typeof val === 'number') {
2141
- val = String(val);
2142
- }
2143
- this.$set(item,'value',val);
2144
- }
2145
- // 检索组件,触发检索方法
2146
- if (item?.comType == "SelectMuiWordBook"){
2147
- this.setSelectMuiWordBookType(item,val)
2148
- }
2149
- })
2150
-
2151
- await this.$nextTick();
2152
- this.outFilterChange()
2153
- }
2154
- },
2155
-
2156
- setSelectMuiWordBookType(item,val){
2157
- if(Array.isArray(item.dataSource)){
2158
- let f = item.dataSource.find(v=>v.myName == val);
2159
- if(f) return
2160
- }
2161
- let rKey = item.columnName + item.random_key
2162
- let ref = this.getRef(rKey);
2163
- ref && ref.handleWordBookSearch(val,item)
2164
- }
2165
-
2166
- /* */
2167
- },
2168
- watch: {
2169
- // 平铺列表 watch 触发 导致请求发很多次
2170
- // 注释掉tableId 之后有问题请使用另外的方法解决, 不要再使用watch触发
2171
- // tableId: {
2172
- // immediate: true,
2173
- // deep: true,
2174
- // handler(val) {
2175
- // val && this.getTableCondiTionListRequest(true);
2176
- // }
2177
- // },
2178
- viewList: {
2179
- deep: true,
2180
- immediate: true,
2181
- handler() {
2182
- if (this.viewList.length > 0) {
2183
- let curItem;
2184
- let hasListType = true;
2185
- this.viewList.forEach(v => {
2186
- if (v.mark == 1) {
2187
- curItem = v.id;
2188
- }
2189
- if (v.id == '0') {
2190
- hasListType = false;
2191
- }
2192
- });
2193
- hasListType &&
2194
- this.viewList.push({
2195
- id: '0',
2196
- name: '列表模式' || this.$t('1.1.5.4')
2197
- });
2198
- // 查找默认值
2199
- // let curItem = this.viewList.find(v => v.mark == 1);
2200
- this.currentTempId = curItem || '0';
2201
-
2202
- // 按钮打卡视图列表
2203
- let tableViewId = this.optionsValue('tableViewId');
2204
- let onlyOpenView = this.optionsValue('hideViewList') && tableViewId;
2205
- if (onlyOpenView) {
2206
- this.currentTempId = tableViewId;
2207
- }
2208
- // this.handlerSelectTemp(this.currentTempId);
2209
- this.$emit('handlerChangeView', this.currentTempId);
2210
- } else {
2211
- this.currentTempId = '0';
2212
- // this.handlerSelectTemp(this.currentTempId);
2213
- this.editTableSource != 'relatedComponent' && this.$emit('handlerChangeView', this.currentTempId);
2214
- }
2215
- }
2216
- },
2217
- getIsTile: {
2218
- immediate: true,
2219
- handler(val) {
2220
- if (val === undefined) return;
2221
- this.isTile = val;
2222
- }
2223
- },
2224
- rowBtnList: {
2225
- immediate: true,
2226
- deep: true,
2227
- handler() {
2228
- this.formatRowBtnList();
2229
- this.handleOtherConfigInit();
2230
- }
2231
- },
2232
- initPageResize: {
2233
- immediate: true,
2234
- deep: true,
2235
- handler(val) {
2236
- if (!val || !Object.keys(val).length) return;
2237
- if (this.isButtonFolding || this.isShowSetting('buttonAdaption')) return;
2238
- let { classificationIndex } = val;
2239
- if (classificationIndex < 0) return;
2240
- this.pageResize({});
2241
- }
2242
- },
2243
- relatedBaseInfo: {
2244
- immediate: true,
2245
- deep: true,
2246
- handler(val) {
2247
- if (!val || !Object.keys(val).length) return;
2248
- let { buttonList } = val;
2249
- if (!buttonList || !buttonList.length) return;
2250
- this.getRowTileBtnList(buttonList);
2251
- }
2252
- },
2253
- searchFieldList: {
2254
- immediate: true,
2255
- deep: true,
2256
- handler(val) {
2257
- if (val && val.length > 0) {
2258
- this.initOutSearchFieldList();
2259
- }
2260
- }
2261
- },
2262
- tabConditionNumObj: {
2263
- immediate: true,
2264
- deep: true,
2265
- handler(val) {
2266
- if (this.conditionType === 'keyword' && val && Object.keys(val).length > 0) {
2267
- this.tabConditionList.length > 0 &&
2268
- this.tabConditionList.forEach(item => {
2269
- if (val[item.sid] !== undefined) this.$set(item, 'digital', val[item.sid]);
2270
- });
2271
- }
2272
- }
2273
- },
2274
- searchPlaceHolder: {
2275
- immediate: true,
2276
- handler(val) {
2277
- if (!val || this.showRelatedTreeBtn) return;
2278
- this.$nextTick(() => {
2279
- this.showPlaceholderPrefix = false;
2280
- let dom = this.$refs.baseSearchPlaceholderSpan;
2281
- if (!dom) return;
2282
- // input 框有padding 32px ...显示需要多预留一些宽度12px
2283
- let w = dom.offsetWidth + 45;
2284
- // 非筛选外显input 有enterButton 预留宽度
2285
- if (!this.showOutSearch) {
2286
- w += 45;
2287
- }
2288
- let maxW = 300;
2289
- this.inputSearchW = w > maxW ? maxW : w < 200 ? 200 : w;
2290
- if (w > maxW) {
2291
- this.showPlaceholderPrefix = true;
2292
- }
2293
- this.onResize();
2294
- });
2295
- }
2296
- }
2297
- }
2298
- });
2299
- </script>
2300
-
2301
- <style lang="less" scoped>
2302
- .base-search {
2303
- flex: 1;
2304
- .base-container {
2305
- display: flex;
2306
- justify-content: space-between;
2307
- text-align: left;
2308
- background: #fff;
2309
- }
2310
- .bease-left {
2311
- display: flex;
2312
- justify-content: flex-start;
2313
- align-items: flex-start;
2314
- flex: 1;
2315
- .btn-custom-wrap {
2316
- width: 100%;
2317
- display: flex;
2318
- justify-content: flex-end;
2319
- align-items: flex-start;
2320
- }
2321
- }
2322
- .base-tabs {
2323
- display: flex;
2324
- align-items: center;
2325
- border-bottom: 1px solid #d5d5d5;
2326
- margin-bottom: 8px;
2327
- .base-tabs-item {
2328
- padding: 7px 16px;
2329
- font-size: 14px;
2330
- color: #212121;
2331
- font-weight: 400;
2332
- cursor: pointer;
2333
- border-bottom: 1px solid transparent;
2334
- }
2335
- .base-tabs-item-active {
2336
- color: #2d7aff;
2337
- border-bottom: 1px solid #2d7aff;
2338
- }
2339
- }
2340
- ul {
2341
- display: flex;
2342
- align-items: center;
2343
- flex-wrap: wrap;
2344
- margin-top: 8px;
2345
- li {
2346
- display: inline-block;
2347
- /deep/ .search-default {
2348
- height: 32px;
2349
- line-height: 32px;
2350
- margin-bottom: 8px;
2351
- margin-right: 8px;
2352
- border-color: #d5d5d5;
2353
- color: #212121;
2354
- .ant-btn {
2355
- border-color: #d5d5d5;
2356
- color: #212121;
2357
- }
2358
- &.search-default-count {
2359
- border-color: #2d7aff;
2360
- color: #2d7aff;
2361
- .ant-btn {
2362
- color: #2d7aff;
2363
- }
2364
- }
2365
- }
2366
- /deep/ .out-filter-input {
2367
- width: 200px;
2368
- margin: 0 8px 8px 0;
2369
- .ant-input-wrapper {
2370
- .ant-input-group-addon {
2371
- border: 1px solid #d9d9d9 !important;
2372
- border-left: 0 !important;
2373
- }
2374
- }
2375
- }
2376
- .my-input-search {
2377
- vertical-align: middle;
2378
- position: relative;
2379
- top: -1px;
2380
- margin-bottom: 8px;
2381
- margin-right: 8px;
2382
- height: 32px;
2383
- /deep/ .ant-input {
2384
- margin-top: 1px;
2385
- border-right: 0 !important;
2386
- &:hover {
2387
- & + .ant-input-suffix {
2388
- .ant-input-search-icon {
2389
- color: #579aff;
2390
- }
2391
- }
2392
- }
2393
- }
2394
- /deep/ .ant-input-group-addon {
2395
- padding: 0;
2396
- border: 0 !important;
2397
- vertical-align: bottom;
2398
- .ant-btn {
2399
- border-top-left-radius: 0;
2400
- border-bottom-left-radius: 0;
2401
- }
2402
- }
2403
- .svg-icon {
2404
- margin-right: 0;
2405
- font-size: 16px;
2406
- }
2407
- }
2408
- .mr8 {
2409
- margin-right: 8px;
2410
- margin-bottom: 8px;
2411
- }
2412
- .mr12 {
2413
- margin-right: 12px;
2414
- margin-bottom: 8px;
2415
- }
2416
- .ml12 {
2417
- margin-left: 12px;
2418
- margin-bottom: 8px;
2419
- }
2420
- &.related-search-input {
2421
- /deep/ .my-input-search {
2422
- width: 40px;
2423
- .ant-input-affix-wrapper {
2424
- width: 0px;
2425
- .ant-input {
2426
- width: 0;
2427
- outline: none;
2428
- box-shadow: none;
2429
- &:focus {
2430
- outline: none;
2431
- }
2432
- }
2433
- .ant-input:not(:last-child) {
2434
- padding: 0px;
2435
- border: 0px !important;
2436
- }
2437
- .ant-input-suffix {
2438
- i {
2439
- display: none;
2440
- }
2441
- }
2442
- }
2443
- .ant-input-group-addon {
2444
- .ant-btn {
2445
- border-top-left-radius: 4px;
2446
- border-bottom-left-radius: 4px;
2447
- }
2448
- }
2449
- }
2450
- }
2451
- &.related-search-input-expand {
2452
- transition: width 0.2s;
2453
- /deep/ .my-input-search {
2454
- width: 215px;
2455
- .ant-input-affix-wrapper {
2456
- .ant-input-suffix {
2457
- i {
2458
- display: inline-block;
2459
- }
2460
- }
2461
- }
2462
- }
2463
- }
2464
- }
2465
- .dropdown-button {
2466
- color: #212121;
2467
- border-color: #d5d5d5 !important;
2468
- margin-left: 8px;
2469
- margin-bottom: 8px;
2470
- /deep/ .svg-icon {
2471
- margin-right: 4px;
2472
- }
2473
- &.ant-dropdown-trigger {
2474
- i.anticon.anticon-down {
2475
- color: #969696;
2476
- font-size: 14px;
2477
- }
2478
- }
2479
- }
2480
- .baseSearch-input-search {
2481
- .input-search-com {
2482
- input {
2483
- padding: 4px 8px;
2484
- }
2485
- .search-placeholder-icon {
2486
- color: #b4b4b4;
2487
- }
2488
- }
2489
- }
2490
- }
2491
- /deep/ .num-picker {
2492
- position: relative;
2493
- display: flex;
2494
- &.num-picker-unit {
2495
- padding-right: 20px;
2496
- }
2497
- input {
2498
- text-align: left !important;
2499
- }
2500
- &:hover {
2501
- .clear-number-icon {
2502
- display: block;
2503
- }
2504
- }
2505
- /deep/ .ant-calendar-range-picker-input {
2506
- text-align: left;
2507
- }
2508
- .clear-number-icon {
2509
- position: absolute;
2510
- right: 5px;
2511
- top: 6px;
2512
- display: none;
2513
- cursor: pointer;
2514
- z-index: 1000;
2515
- }
2516
- }
2517
- .btn-row {
2518
- display: inline-flex;
2519
- line-height: 32px;
2520
- height: 32px;
2521
- // padding: 0 10px;
2522
- padding-right: 8px;
2523
- margin-bottom: 8px;
2524
- transform: translateZ(0);
2525
- .mgl-10 {
2526
- margin-left: 10px;
2527
- }
2528
- &.min-width {
2529
- min-width: 212px;
2530
- }
2531
- /deep/ .ant-select-selection__rendered {
2532
- color: #212121;
2533
- font-size: 14px;
2534
- }
2535
- /deep/ .ant-select-arrow {
2536
- i {
2537
- color: #969696;
2538
- font-size: 12px;
2539
- }
2540
- }
2541
- .btn-setting {
2542
- margin-right: 4px;
2543
- }
2544
- .viewList-button {
2545
- display: flex;
2546
- align-items: center;
2547
- justify-content: center;
2548
- padding: 0 12px;
2549
- }
2550
- }
2551
- .search-tile {
2552
- max-width: 100%;
2553
- max-height: 74px;
2554
- overflow-x: auto;
2555
- /deep/ .ant-btn {
2556
- margin-right: 10px;
2557
- margin-bottom: 5px;
2558
- }
2559
- }
2560
-
2561
- .psw-icon {
2562
- cursor: pointer;
2563
- &:active {
2564
- color: #5585f5;
2565
- // #2474ff
2566
- }
2567
- color: #969696;
2568
- }
2569
-
2570
- ::-webkit-input-placeholder {
2571
- /* WebKit browsers */
2572
- font-family: 'Avenir', Helvetica, Arial, sans-serif;
2573
- }
2574
-
2575
- ::-moz-placeholder {
2576
- /* Mozilla Firefox 19+ */
2577
- font-family: 'Avenir', Helvetica, Arial, sans-serif;
2578
- }
2579
-
2580
- :-ms-input-placeholder {
2581
- /* Internet Explorer 10+ */
2582
- font-family: 'Avenir', Helvetica, Arial, sans-serif;
2583
- }
2584
- .baseSearchPlaceholderSpan {
2585
- visibility: hidden;
2586
- position: absolute;
2587
- z-index: -1;
2588
- }
2589
- }
2590
- </style>
2591
- <style lang="less">
2592
- .rowFoldHideBtnList-dropdown {
2593
- .ant-dropdown-menu {
2594
- overflow-y: auto;
2595
- max-height: 99vh;
2596
- }
2597
- .ant-dropdown-menu-item-group {
2598
- .ant-dropdown-menu-item-group-title {
2599
- display: none;
2600
- }
2601
- border-bottom: 1px solid #d5d5d5;
2602
- &:last-child {
2603
- border-color: transparent;
2604
- }
2605
- }
2606
- }
2607
- .viewList-dropdown {
2608
- min-width: 120px;
2609
- .ant-dropdown-menu-item {
2610
- display: flex;
2611
- justify-content: space-between;
2612
- align-items: center;
2613
- color: #2e2e2e;
2614
- margin: 1px 0;
2615
- &:hover {
2616
- background: #f2f2f2;
2617
- }
2618
- > span {
2619
- display: inline;
2620
- width: 85%;
2621
- text-overflow: ellipsis;
2622
- white-space: nowrap;
2623
- overflow: hidden;
2624
- }
2625
- }
2626
- .ant-dropdown-menu-item.menu-active {
2627
- color: #2d7aff;
2628
- }
2629
- }
2630
- </style>
1
+ <template>
2
+ <div class="base-search">
3
+ <div class="base-container">
4
+ <div class="bease-left" ref="baseLeft" v-resize="onResize">
5
+ <!-- 行内编辑对应生成的(保存、取消)按钮 -->
6
+ <template v-if="visibleInlineOperateBtn">
7
+ <div class="btn-custom-wrap">
8
+ <a-button
9
+ v-preventReClick="preventReTime"
10
+ :style="{ display: isInlineOperating ? 'inline-block' : 'none' }"
11
+ @click="inlineEditClick"
12
+ class="btn-custom-class"
13
+ style="margin: 8px 8px 8px 0"
14
+ type="primary"
15
+ >
16
+ 保存
17
+ </a-button>
18
+ <a-button
19
+ v-preventReClick="preventReTime"
20
+ :style="{ display: isInlineOperating ? 'inline-block' : 'none' }"
21
+ @click="inlineEditCancel"
22
+ class="btn-custom-class"
23
+ style="margin: 8px 8px 8px 0"
24
+ >
25
+ 取消
26
+ </a-button>
27
+ </div>
28
+ </template>
29
+ <ul v-if="!visibleInlineOperateBtn && !isRowEditing">
30
+ <div ref="btnRow" class="btn-row" v-if="isShowSettingBtn">
31
+ <a-button class="btn-setting" v-show="currentTempId != '0' && isShowSetting('hideSettingBtn')" icon="setting" @click="handlerSetting">
32
+ 设置
33
+ <!-- {{ $t("1.1.5.3") }} -->
34
+ </a-button>
35
+ <a-dropdown overlayClassName="viewList-dropdown" v-if="showViewList">
36
+ <a-button class="viewList-button">
37
+ <svg-icon :icon-class="'anniuqiehuanmoshi'" style="font-size: 22px"></svg-icon>
38
+ </a-button>
39
+ <a-menu slot="overlay">
40
+ <a-menu-item v-for="(item, index) in viewList" :value="item.id" :key="index" @click="handlerSelectTemp(item.id)" :class="{ 'menu-active': currentTempId === item.id }">
41
+ <span>{{ item.name }}</span>
42
+ <!-- <a-icon v-if="currentTempId === item.id" type="check" /> -->
43
+ </a-menu-item>
44
+ </a-menu>
45
+ </a-dropdown>
46
+ </div>
47
+ <slot name="classification"></slot>
48
+ <li v-if="showQuickSearch" ref="quickSearchLi">
49
+ <a-button class="search-default" type="default" @click="foldQuickSearch" :class="{'search-default-count': qqConObjCount}">
50
+ <svg-icon icon-class="anniushaixuan" style="color: inherit; margin-right: 6px"></svg-icon>
51
+ 筛选 {{ qqConObjCount ? `(${qqConObjCount})` : '' }}
52
+ </a-button>
53
+ </li>
54
+ <!-- start--筛选外显--start -->
55
+ <template v-for="item in outSearchFieldList">
56
+ <li class="outQuickSearch-li" v-if="item.isRender" :key="item._frontId">
57
+ <RenderWidget style="margin: 0 8px 8px 0" :cfg="item" v-model="item.value" @outFilterChange="outFilterChange" />
58
+ </li>
59
+ <outQuickSearch v-else :key="item.id + item.random_key" :item="item" :ref="item.columnName + item.random_key" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
60
+ </template>
61
+ <!-- end--筛选外显--end -->
62
+
63
+ <!-- start--筛选外显 跨表--start -->
64
+ <template v-for="relationItem in outRelationQuickSearch">
65
+ <template v-for="item in relationItem.fieldList">
66
+ <outQuickSearch :key="item.id" :item="item" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
67
+ </template>
68
+ </template>
69
+ <!-- end--筛选外显 跨表--end -->
70
+
71
+ <li v-if="isShowInputSearch" ref="inputSearchLi" class="baseSearch-input-search">
72
+ <template v-if="outSearchFieldList && outSearchFieldList.length">
73
+ <slot name="searchInput" :width="(searchInputWidth || inputSearchW)" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'outSearch'">
74
+ <a-input
75
+ :style="{ width: (searchInputWidth || inputSearchW) + 'px', margin: '0 8px 8px 0' }"
76
+ allowClear
77
+ :placeholder="searchPlaceHolder"
78
+ :value="currentValue"
79
+ @input="$emit('input', $event.target.value)"
80
+ @pressEnter="outFilterChange"
81
+ class="input-search-com"
82
+ >
83
+ <template slot="prefix" v-if="showPlaceholderPrefix">
84
+ <a-tooltip :title="searchPlaceHolder" overlayClassName="basesearch-placeholder-tooltip">
85
+ <a-icon type="info-circle" class="search-placeholder-icon" />
86
+ </a-tooltip>
87
+ </template>
88
+ </a-input>
89
+ </slot>
90
+ </template>
91
+
92
+ <template v-else>
93
+ <slot name="searchInput" :width="(searchInputWidth || inputSearchW)" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'default'">
94
+ <a-input-search
95
+ class="my-input-search input-search-com"
96
+ :style="{ width: (searchInputWidth || inputSearchW) + 'px' }"
97
+ @search="onSearch"
98
+ allowClear
99
+ :placeholder="searchPlaceHolder"
100
+ :value="currentValue"
101
+ @input="$emit('input', $event.target.value)"
102
+ >
103
+ <template slot="prefix" v-if="showPlaceholderPrefix">
104
+ <a-tooltip :title="searchPlaceHolder" overlayClassName="basesearch-placeholder-tooltip">
105
+ <a-icon type="info-circle" class="search-placeholder-icon" />
106
+ </a-tooltip>
107
+ </template>
108
+ <a-button slot="enterButton" type="primary">
109
+ <svg-icon icon-class="xitongtubiaosousuo"></svg-icon>
110
+ </a-button>
111
+ </a-input-search>
112
+ </slot>
113
+ </template>
114
+
115
+ </li>
116
+ <li v-if="outSearchFieldList && outSearchFieldList.length">
117
+ <a-button type="primary" @click="outFilterChange" style="margin: 0 8px 8px 0">
118
+ <a-icon type="search" style="margin-right: 6px" />
119
+ 查询
120
+ </a-button>
121
+ </li>
122
+ <!-- 无外显字段查询,且隐藏模糊搜索 -->
123
+ <li v-if="showApiSearch">
124
+ <a-button type="primary" @click="apiSearch" style="margin: 0 8px 8px 0">
125
+ <a-icon type="search" style="margin-right: 6px" />
126
+ 查询
127
+ </a-button>
128
+ </li>
129
+ <li v-if="showResetFilterBtn">
130
+ <a-button @click="handleReset" style="margin: 0 8px 8px 0">
131
+ <svg-icon icon-class="xitongtubiaoliebiaocaozuoanniushanchu" style="margin-right: 6px"></svg-icon>
132
+ 重置
133
+ </a-button>
134
+ </li>
135
+
136
+ <!-- 批量选择 -->
137
+ <li v-if="isCard">
138
+ <a-button v-if="isCardNewBatch" type="primary" @click="() =>changeCardNewBatch(false)" style="margin: 0 8px 8px 0">
139
+ 取消批量选择
140
+ </a-button>
141
+ <a-button v-else type="primary" @click="() =>changeCardNewBatch(true)" style="margin: 0 8px 8px 0">
142
+ 批量选择
143
+ </a-button>
144
+ </li>
145
+
146
+ <!-- 平铺列表 tree -->
147
+ <template v-if="showRelatedTreeBtn">
148
+ <li v-if="showRelatedSearch" :class="[isRelatedSearchFold ? 'related-search-input' : 'related-search-input-expand']">
149
+ <slot name="searchInput" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'relatedTreeSearch'" :isRelatedSearchFold="isRelatedSearchFold" >
150
+ <a-input-search
151
+ ref="relatedSearchInput"
152
+ class="my-input-search my-input-search-related"
153
+ placeholder="请输入关键字搜索"
154
+ @search="onRelatedSearch"
155
+ allowClear
156
+ :value="currentValue"
157
+ @input="$emit('input', $event.target.value)"
158
+ >
159
+ <a-button slot="enterButton" type="primary">
160
+ <a-icon type="search" />
161
+ <!-- <svg-icon icon-class="xitongtubiaosousuo"></svg-icon> -->
162
+ </a-button>
163
+ </a-input-search>
164
+ </slot>
165
+ </li>
166
+ <template v-if="rowTileBtnListTree && rowTileBtnListTree.length === 1">
167
+ <a-button type="primary" style="margin-right: 8px; margin-bottom: 8px" @click="handleAddType(rowTileBtnListTree[0])">
168
+ {{ rowTileBtnListTree[0].alias || rowTileBtnListTree[0].name }}
169
+ </a-button>
170
+ </template>
171
+ <a-dropdown v-if="rowTileBtnListTree.length > 1 && !isInlineOperating">
172
+ <a-menu slot="overlay">
173
+ <template v-for="b in rowTileBtnListTree">
174
+ <a-menu-item :key="b.sid" class="dropdown-btn" v-if="b.type == 'ADD'" @click="handleAddType(b)">
175
+ {{ b.alias || b.name }}
176
+ <a-icon v-if="b.icon" :type="btnObj[b.icon]" />
177
+ <template v-else>
178
+ <svg-icon
179
+ v-if="b.iconSetting"
180
+ :iconClass="JSON.parse(b.iconSetting).icon"
181
+ :style="{
182
+ marginRight: '8px'
183
+ }"
184
+ />
185
+ </template>
186
+ </a-menu-item>
187
+ </template>
188
+ </a-menu>
189
+ <a-button type="primary" ghost style="margin-left: 8px; margin-bottom: 8px">
190
+ <!-- 1.1.8.1.6更多 -->
191
+ {{ '更多' }} ...
192
+ </a-button>
193
+ </a-dropdown>
194
+ </template>
195
+ <template v-if="!nobutton && !showRelatedTreeBtn">
196
+ <template v-if="isButtonFolding">
197
+ <li class="allBtn" v-if="allBtn && allBtn.length" ref="allBtnLi">
198
+ <a-dropdown v-show="!isInlineOperating">
199
+ <a-menu slot="overlay">
200
+ <template v-for="(b, j) in allBtn">
201
+ <a-menu-item :key="b.sid" class="dropdown-btn" v-if="b.type == 'ADD'" @click="showDrawer(b, j)">
202
+ {{ b.alias || b.name }}
203
+ <getBtnIcon :data="b" :btnObj="btnObj" />
204
+ </a-menu-item>
205
+ <a-menu-item
206
+ :key="b.sid"
207
+ v-else-if="showButtonTop == 1 && b.type != 'LINK' && currentTempId == '0'"
208
+ class="dropdown-btn"
209
+ @click="clickBtn(clickRowData, b, clickRowData.my_index, undefined, j)"
210
+ >
211
+ {{ b.showStyle === 'only_icon' ? '' : b.alias || b.name }}
212
+ <getBtnIcon :data="b" :btnObj="btnObj" />
213
+ </a-menu-item>
214
+ </template>
215
+ </a-menu>
216
+ <a-button class="ml12 dropdown-button"
217
+ >{{ '更多' }}
218
+ <a-icon type="down" />
219
+ </a-button>
220
+ </a-dropdown>
221
+ </li>
222
+ </template>
223
+ <template v-else>
224
+ <!-- start--按钮分组--start -->
225
+ <template v-if="isShowGroupBtn">
226
+ <template v-for="(key, i) in groupBtnObj">
227
+ <li :key="i" v-if="key.list && key.list.length > 1" ref="rowTileBtnItem" :data-key="i" data-source="groupBtn">
228
+ <ButtonGroup v-show="!key.isHide" :title="i" :list="key.list" :currentTempId="currentTempId" @showDrawer="showDrawer" @clickGroupBtn="clickGroupBtn"></ButtonGroup>
229
+ </li>
230
+ </template>
231
+ </template>
232
+ <!-- end--按钮分组--end -->
233
+
234
+ <!-- 平铺按钮列表 -->
235
+ <template v-for="(item, j) in rowTileBtnList">
236
+ <!-- v-if="item.type == 'ADD'" -->
237
+ <li ref="rowTileBtnItem" class="rowTileBtn-item 123" :key="item.sid" v-if="showLi(item)" :data-key="item.sid" data-source="rowTile">
238
+ <template v-if="item.type == 'ADD' || item.type == 'BATCH'">
239
+ <a-button
240
+ v-preventReClick="preventReTime"
241
+ v-show="visibleBtn(item) && !item.isHide"
242
+ @click.prevent.stop="showDrawer(item, j)"
243
+ class="btn-custom-class"
244
+ style="margin: 0 8px 8px 0"
245
+ :style="$utils.getBtnStyle(item)"
246
+ :type="item.showStyle == 'none_bg' || item.showStyle === 'only_icon' ? 'link' : 'primary'"
247
+ :ghost="item.showStyle == 'white_bg'"
248
+ >
249
+ <getBtnIcon :data="item" :btnObj="btnObj" />
250
+ <template v-if="item.showStyle !== 'only_icon'">
251
+ {{ item.alias || item.name }}
252
+ </template>
253
+ </a-button>
254
+ <a-upload v-if="item.isImportGuage" method="post" :show-upload-list="false" :action="`${axios.defaults.baseURL}/guage/importGuage`" @change="handleUploadChange">
255
+ <!-- 上传配置文件 -->
256
+ <a-button
257
+ class="btn-custom-class"
258
+ style="margin: 0 8px 8px 0"
259
+ :style="$utils.getBtnStyle(item)"
260
+ :type="item.showStyle == 'none_bg' || item.showStyle === 'only_icon' ? 'link' : 'primary'"
261
+ :ghost="item.showStyle == 'white_bg'"
262
+ >
263
+ <a-icon type="upload" />
264
+ <template v-if="item.showStyle !== 'only_icon'">
265
+ {{ item.alias || item.name }}
266
+ </template>
267
+ </a-button>
268
+ </a-upload>
269
+ </template>
270
+ <template v-else-if="isShowRowTileBtnItem(item)">
271
+ <a-button
272
+ v-preventReClick="preventReTime"
273
+ v-show="visibleBtn(item) && !item.isHide"
274
+ @click.prevent.stop="clickBtn(clickRowData, item, clickRowData.my_index, undefined, j)"
275
+ class="btn-custom-class"
276
+ style="margin: 0 8px 8px 0"
277
+ :style="$utils.getBtnStyle(item)"
278
+ :type="item.showStyle == 'none_bg' ? 'link' : 'primary'"
279
+ :ghost="item.showStyle == 'white_bg'"
280
+ >
281
+ <getBtnIcon :data="item" :btnObj="btnObj" />
282
+ <template v-if="item.showStyle !== 'only_icon'">
283
+ {{ item.alias || item.name }}
284
+ </template>
285
+ </a-button>
286
+ </template>
287
+ </li>
288
+ </template>
289
+ <!-- 打印列表-->
290
+ <template v-for="(item, j) in rowPrintBtnList">
291
+ <li ref="rowTileBtnItem" class="rowTileBtn-item rowPrintBtn-btn" :key="item.sid" v-if="showLi(item)" :data-key="item.sid" data-source="rowTile">
292
+ <template v-if="item.isVisible && !item.isHide">
293
+ <PrintBtn
294
+ v-bind="$attrs"
295
+ :printConfig="printConfig"
296
+ :baseUrl="printConfig.printBaseUrl"
297
+ :strategy="item.strategy"
298
+ :btnText="item.name"
299
+ :versionType="item.__printConfig && item.__printConfig.versionType"
300
+ :port="item.__printConfig && item.__printConfig.port"
301
+ :authorizationKey="item.__printConfig && item.__printConfig.authorizationKey"
302
+ :templateNumber="item.__printConfig && item.__printConfig.number"
303
+ :hisParams="item.__printConfig && item.__printConfig.hisParams"
304
+ :params="getPrintBtnParams(item)"
305
+ :prevFn="() => printBtnPrevFn(clickRowData, item, 2, j)"
306
+ @success="receivePrintSuccess"
307
+ @error="receivePrintError"
308
+ ></PrintBtn>
309
+ </template>
310
+ </li>
311
+ </template>
312
+ <!-- 折叠按钮列表 -->
313
+ <li class="rowFoldBtn" v-if="showRowFoldBtnList(rowFoldBtnList, 'rowFoldBtnList')">
314
+ <a-dropdown overlayClassName="baseSearch-fold-dropdown" v-show="!isInlineOperating">
315
+ <a-menu slot="overlay">
316
+ <template v-for="(b, j) in rowFoldBtnList">
317
+ <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-if="showLiAdd(b)" @click="showDrawer(b, j)">
318
+ {{ b.alias || b.name }}
319
+ <getBtnIcon :data="b" :btnObj="btnObj" />
320
+ </a-menu-item>
321
+ <template v-else-if="showLiFold(b)">
322
+ <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" @click="clickBtn(clickRowData, b, clickRowData.my_index, undefined, j)">
323
+ {{ b.alias || b.name }}
324
+ <getBtnIcon :data="b" :btnObj="btnObj" />
325
+ </a-menu-item>
326
+ </template>
327
+ </template>
328
+ </a-menu>
329
+ <a-button class="dropdown-button" style="margin: 0 8px 8px 0"
330
+ >{{ '更多' }}
331
+ <a-icon type="down" />
332
+ </a-button>
333
+ </a-dropdown>
334
+ </li>
335
+ <!-- 自适应折叠 -->
336
+ <template v-if="showRowFoldBtnList(rowFoldHideBtnList)">
337
+ <a-dropdown overlayClassName="rowFoldHideBtnList-dropdown" v-show="!isInlineOperating">
338
+ <a-menu slot="overlay">
339
+ <template v-for="(value, key) in rowFoldHideBtnListObj">
340
+ <a-menu-item-group :key="key" v-if="showRowFoldBtnList(value.list)">
341
+ <template slot="title"></template>
342
+ <template v-for="(b, j) in value.list">
343
+ <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-if="b.type == 'ADD'" @click="showDrawer(b, j)">
344
+ {{ b.alias || b.name }}
345
+ <getBtnIcon :data="b" :btnObj="btnObj" />
346
+ </a-menu-item>
347
+ <template v-else-if="b.type != 'LINK' && currentTempId == '0'">
348
+ <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" @click="clickBtn(clickRowData, b, clickRowData.my_index, undefined, j)">
349
+ {{ b.alias || b.name }}
350
+ <getBtnIcon :data="b" :btnObj="btnObj" />
351
+ </a-menu-item>
352
+ </template>
353
+ </template>
354
+ </a-menu-item-group>
355
+ </template>
356
+ </a-menu>
357
+ <a-button class="dropdown-button" style="margin: 0 8px 8px 0"
358
+ >{{ '更多' }}
359
+ <a-icon type="down" />
360
+ </a-button>
361
+ </a-dropdown>
362
+ </template>
363
+ </template>
364
+ </template>
365
+ </ul>
366
+ </div>
367
+ </div>
368
+ <div class="base-tabs" v-if="showBaseTabs">
369
+ <div v-for="(item, index) in tabConditionList" :key="index" :class="tabIndex === index ? 'base-tabs-item base-tabs-item-active' : 'base-tabs-item'" @click="tabClick(index)"
370
+ >{{ item.name }} {{ countTabCondition == 1 && (item.digital || item.digital === 0) ? '(' + (item.digital || 0) + ')' : '' }}</div
371
+ >
372
+ </div>
373
+ <!-- palceholder 文字宽度计算 -->
374
+ <span class="baseSearchPlaceholderSpan" ref="baseSearchPlaceholderSpan">
375
+ {{ searchPlaceHolder }}
376
+ </span>
377
+ </div>
378
+ </template>
379
+
380
+ <script>
381
+ /**
382
+ * 完成搜索组合组件 BaseSearch
383
+ * 使用方式:在需要的vue页中引入注册为子组件后直接使用
384
+ * 提供函数:
385
+ * 1、输入关键字搜索触发函数onSearch;
386
+ * 2、左侧下拉选中搜索触发函数changeSearch;
387
+ * 3、右侧快速弹框保存搜索函数onSave(obj);
388
+ * 完整例子:<BaseSearch :onSearch='onSearch' @changeSearch='changeSearch' @onSave='onSave'/>
389
+ */
390
+
391
+ /**
392
+ * slot:searchInput
393
+ * width: {number}宽度
394
+ * searchPlaceHolder:{string} 检索 input 的placeHolder
395
+ * showPlaceholderPrefix: {boolean} input 是否展示前缀icon
396
+ * isRelatedSearchFold: {boolean} 平铺列表树状表的检索框是否收起
397
+ * type:{string} relatedTreeSearch(平铺列表树状表)/outSearch(检索外显)/default(默认)
398
+ */
399
+
400
+ import moment from 'moment';
401
+ import 'moment/locale/zh-cn';
402
+
403
+ import _ from 'lodash';
404
+ import vexutils from '@/utils/vexutils';
405
+ import { Button, Icon, Dropdown, Select, Upload, DatePicker, Input, Menu } from 'ant-design-vue';
406
+ import resize from 'vue-resize-directive';
407
+
408
+ import { GROUP_TITLE_KEY } from '../const';
409
+
410
+ import PrintBtn from '~/button/src/ButtonPrint/index';
411
+ // import stepRule from "@/components/table/mixins/stepRule";
412
+
413
+ import outQuickSearch from '../components/out-quick-search/out-quick-search';
414
+ import utils from '@/utils/utils-map';
415
+ import { durationMixin, $utils, filterApiFn, outQuickSearchFn } from '../mixins/mixins';
416
+ import tableSearchCon from '../mixins/tableSearchCon';
417
+ import svgIcon from '@/component/svg/index.vue';
418
+ import 'text-security/text-security.css';
419
+ import create from '@/core/create';
420
+ import preventReClick from '@/directive/preventReClick';
421
+ /** 获取按钮 icon */
422
+ import getBtnIcon from '../components/button-icon/getBtnIcon.js';
423
+ import ButtonGroup from '../components/button-group/ButtonGroup.vue';
424
+
425
+ import RenderWidget from '../components/render-widget/index.vue';
426
+
427
+ const EVALUATEList = [
428
+ {
429
+ label: '一星',
430
+ value: '1',
431
+ isSelect: false
432
+ },
433
+ {
434
+ label: '二星',
435
+ value: '2',
436
+ isSelect: false
437
+ },
438
+ {
439
+ label: '三星',
440
+ value: '3',
441
+ isSelect: false
442
+ },
443
+ {
444
+ label: '四星',
445
+ value: '4',
446
+ isSelect: false
447
+ },
448
+ {
449
+ label: '五星',
450
+ value: '5',
451
+ isSelect: false
452
+ }
453
+ ];
454
+
455
+ const BTNOBJ = {
456
+ // 按钮icon 映射
457
+ copy: 'copy',
458
+ pencil: 'edit',
459
+ delete: 'delete',
460
+ add: 'plus-circle',
461
+ download: 'download',
462
+ label: 'tag',
463
+ queding: 'check',
464
+ del: 'close'
465
+ };
466
+
467
+ export default create({
468
+ name: 'base-search',
469
+ mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, outQuickSearchFn],
470
+ directives: { resize, preventReClick },
471
+ props: {
472
+ width: {
473
+ default: '400px'
474
+ },
475
+ searchInputWidth: {
476
+ // 设置检索框的宽度
477
+ type: Number,
478
+ default: 0
479
+ },
480
+ searchInputPlaceHolder: {
481
+ type: String,
482
+ },
483
+ onSearch: Function,
484
+ rowBtnList: {
485
+ type: Array,
486
+ default: () => []
487
+ },
488
+ paramsData: Object,
489
+ // downLoad: Function,
490
+ showButtonTop: [String, Number],
491
+ showSettings: {
492
+ type: Object,
493
+ default: () => ({})
494
+ },
495
+ clickRowData: Object,
496
+ value: String,
497
+ searchFieldList: {
498
+ // 搜索的数据
499
+ type: Array,
500
+ default: () => []
501
+ },
502
+ searchFieldLimit: {
503
+ // 搜索的数据的限制条件
504
+ type: Object,
505
+ default: () => ({})
506
+ },
507
+ viewList: {
508
+ type: Array,
509
+ default: () => []
510
+ },
511
+ TypeOfDisplay: {
512
+ type: String,
513
+ default: ''
514
+ },
515
+ tableAllCheck: {
516
+ type: Boolean
517
+ },
518
+ classificationIndex: Number,
519
+ editTableSource: {
520
+ default: ''
521
+ },
522
+ showRelatedTreeBtn: Boolean,
523
+ relatedBaseInfo: Object,
524
+ onRelatedSearch: Function,
525
+ showResetFilterBtn: {
526
+ type: Boolean,
527
+ default: false
528
+ },
529
+ qqConObjCount: {
530
+ type: Number,
531
+ default: 0
532
+ },
533
+ conditionType: { type: String },
534
+ countCondition: { type: [Number, String] },
535
+ countTabCondition: { type: Number },
536
+ tabConditionNumObj: {
537
+ type: Object,
538
+ default: () => {}
539
+ },
540
+ isRelatedSearchFold: {
541
+ type: Boolean,
542
+ default: true
543
+ },
544
+ tableId: { type: String },
545
+ conditionMap: {
546
+ type: Object,
547
+ default: () => {}
548
+ },
549
+ getFilterData: Function,
550
+ oldtableData: Array,
551
+ isNestTableClick: Boolean,
552
+
553
+ isAdmin: {
554
+ type: Boolean,
555
+ default: false
556
+ },
557
+
558
+ /**
559
+ * 导入量表配置
560
+ */
561
+ importGuageConfig: {
562
+ type: Object,
563
+ default: () => ({
564
+ action: ''
565
+ })
566
+ },
567
+
568
+ /**
569
+ * 打印配置
570
+ */
571
+ printConfig: {
572
+ type: Object,
573
+ default: () => ({
574
+ printBaseUrl: '/print/assembly',
575
+ postStepRule: () => Promise.resolve({})
576
+ })
577
+ },
578
+
579
+ gettersConfig: {
580
+ type: Object,
581
+ default: () => ({
582
+ getIsTile: '',
583
+ selectRowObj: [],
584
+ isInlineOperating: false,
585
+ printNumberCache: {}
586
+ })
587
+ },
588
+
589
+ /**
590
+ * 是否展示行编辑的按钮
591
+ */
592
+ visibleInlineOperateBtn: {
593
+ type: Boolean,
594
+ default: false
595
+ },
596
+
597
+ tabConditionList: {
598
+ type: Array,
599
+ default: () => []
600
+ },
601
+
602
+ lastOutSearchFieldList: {
603
+ type: Array,
604
+ default: () => []
605
+ },
606
+ lastOutRelationQuickSearch: {
607
+ type: Array,
608
+ default: () => []
609
+ },
610
+ relationTableList: {
611
+ type: Array,
612
+ default: () => []
613
+ },
614
+ /**
615
+ * 筛选外显
616
+ */
617
+ filterApiConfigOutSearch: {
618
+ type: Object,
619
+ default: () => ({})
620
+ },
621
+ useFieldList: Array,
622
+ editTableUid: [String, Number],
623
+
624
+ preventReTime: {
625
+ type: Number,
626
+ default: 1000
627
+ },
628
+ isCardNewBatch: {type: Boolean, deafult: false},
629
+ isBatchSelect: {type: [Number, Boolean, String], default: ''},
630
+ isAvailableApiType: {type: Boolean, deafult: false},
631
+ apiSearch: Function,
632
+ tableDataType: String
633
+ },
634
+ components: {
635
+ RenderWidget,
636
+ [Button.name]: Button,
637
+ [Icon.name]: Icon,
638
+ [Dropdown.name]: Dropdown,
639
+ [Select.name]: Select,
640
+ [Upload.name]: Upload,
641
+ [DatePicker.name]: DatePicker,
642
+ [DatePicker.RangePicker.name]: DatePicker.RangePicker,
643
+ [Input.name]: Input,
644
+ [Input.Search.name]: Input.Search,
645
+ [Menu.name]: Menu,
646
+ [Menu.Item.name]: Menu.Item,
647
+ [Menu.ItemGroup.name]: Menu.ItemGroup,
648
+ getBtnIcon,
649
+ PrintBtn,
650
+ outQuickSearch,
651
+ ButtonGroup,
652
+ svgIcon
653
+ },
654
+ inject: {
655
+ editTableWrapper: {
656
+ type: Object,
657
+ default: () => {}
658
+ }
659
+ },
660
+ computed: {
661
+ isOrgAdmin() {
662
+ return this.isAdmin;
663
+ },
664
+ currentValue() {
665
+ return this.value;
666
+ },
667
+ allBtn() {
668
+ const { rowTileBtnList, rowFoldBtnList } = this;
669
+ let allBtn = [];
670
+ allBtn.push(...rowTileBtnList, ...rowFoldBtnList);
671
+ return allBtn;
672
+ },
673
+ isButtonFolding() {
674
+ // 首页配置
675
+ const { editTableWrapper } = this;
676
+ return editTableWrapper?.options?.isButtonFolding || false;
677
+ },
678
+ isShowSettingBtn() {
679
+ const { $attrs, viewList, noSetting } = this;
680
+ if (this.showRelatedTreeBtn) return;
681
+ return $attrs.isTree != 1 && viewList.length > 0 && !noSetting;
682
+ },
683
+ showDownCurSelectData() {
684
+ return this.selectRowObj.filter(item => !(GROUP_TITLE_KEY in (item || {})))?.length;
685
+ },
686
+ showRowFoldBtnList() {
687
+ return function(list, key) {
688
+ if (key === 'rowFoldBtnList' && !this.isShowSetting('buttonAdaption')) return false;
689
+ if (!list || !list.length) return false;
690
+
691
+ let hasGroupBtnList = list.filter(item => item.buttonGroup);
692
+ if (hasGroupBtnList.length) {
693
+ let showGroup = hasGroupBtnList.some(item => item.isShowFoldGroupBtn);
694
+ if (showGroup) return true;
695
+ }
696
+
697
+ // 只有一个按钮 分组按钮 非自适应
698
+ if (list.length === 1 && list[0].buttonGroup && list[0].isButtonGroup && !list[0].isShowFoldGroupBtn) return false;
699
+
700
+ let visibleList = list.filter(item => item.isVisible && !item.buttonGroup);
701
+ if (!visibleList || !visibleList.length) return false;
702
+ let hasAdd = visibleList.some(item => item.type === 'ADD');
703
+ if (hasAdd) {
704
+ return true;
705
+ } else {
706
+ if (this.currentTempId != 0) return false;
707
+ let notLinkArr = visibleList.filter(item => item.type !== 'LINK');
708
+ if (!notLinkArr || !notLinkArr.length) return false;
709
+ }
710
+ return true;
711
+ };
712
+ },
713
+ initPageResize() {
714
+ let { showSettings, TypeOfDisplay, classificationIndex } = this;
715
+ return {
716
+ showSettings,
717
+ TypeOfDisplay,
718
+ classificationIndex
719
+ };
720
+ },
721
+ isShowRowTileBtnItem() {
722
+ return function(item) {
723
+ return this.showButtonTop == 1 && item.type != 'LINK' && this.currentTempId == '0';
724
+ };
725
+ },
726
+ showRelatedSearchFold() {
727
+ if (
728
+ !this.isShowSettingBtn &&
729
+ !this.isShowSetting('hideQuickSearch') &&
730
+ this.outSearchFieldList.length == 0 &&
731
+ this.outRelationQuickSearch.length == 0 &&
732
+ !this.showResetFilterBtn &&
733
+ !this.$slots.classification
734
+ ) {
735
+ return false;
736
+ } else {
737
+ return this.isRelatedSearchFold;
738
+ }
739
+ },
740
+ handlePickerShowTime() {
741
+ return function(item) {
742
+ if (!item.showTime) return false;
743
+ return {
744
+ defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')]
745
+ };
746
+ };
747
+ },
748
+ isShowGroupBtn() {
749
+ if (!this.groupBtnObj || !Object.keys(this.groupBtnObj).length) return false;
750
+ return true;
751
+ },
752
+ showLi() {
753
+ return function(item) {
754
+ if (item.buttonGroup) {
755
+ return item.isShow == '1' && item.buttonGroup && !item.isButtonGroup;
756
+ }
757
+ return item.isShow == '1';
758
+ };
759
+ },
760
+ showLiAdd() {
761
+ return function(b) {
762
+ if (b.buttonGroup) {
763
+ return b.type == 'ADD' && b.buttonGroup && !b.isButtonGroup;
764
+ }
765
+ return b.type == 'ADD';
766
+ };
767
+ },
768
+ showLiFold() {
769
+ return function(b) {
770
+ if (b.buttonGroup) {
771
+ return b.type != 'LINK' && this.currentTempId == '0' && b.buttonGroup && !b.isButtonGroup;
772
+ }
773
+ return b.type != 'LINK' && this.currentTempId == '0';
774
+ };
775
+ },
776
+
777
+ getIsTile() {
778
+ return this?.gettersConfig?.getIsTile || '';
779
+ },
780
+ selectRowObj() {
781
+ return this?.gettersConfig?.selectRowObj || [];
782
+ },
783
+ isInlineOperating() {
784
+ return this?.gettersConfig?.isInlineOperating || false;
785
+ },
786
+ printNumberCache() {
787
+ return this?.gettersConfig?.printNumberCache || false;
788
+ },
789
+
790
+ // 全部行编辑
791
+ isBatchEditing() {
792
+ return this?.gettersConfig?.isBatchEditing || false;
793
+ },
794
+ curBatchBtnData() {
795
+ return this?.gettersConfig?.curBatchBtnData || {};
796
+ },
797
+ isRowEditing() {
798
+ return this?.gettersConfig?.isRowEditing || false;
799
+ },
800
+ // 是否有高级筛选外显
801
+ showOutSearch() {
802
+ return this.outSearchFieldList?.length || this.outRelationQuickSearch?.length;
803
+ },
804
+ showViewList() {
805
+ if (this.editTableSource === 'relatedComponent') {
806
+ return this.relatedBaseInfo.showType != 'TREE';
807
+ }
808
+ return !this.optionsValue('hideViewList');
809
+ },
810
+ optionsValue() {
811
+ return function(key) {
812
+ return this.$attrs.tableOptions?.[key];
813
+ };
814
+ },
815
+ searchPlaceHolder() {
816
+ if (this.searchInputPlaceHolder) return this.searchInputPlaceHolder;
817
+
818
+ if (!this.useFieldList?.length || this.showRelatedTreeBtn) return '请输入关键字搜索';
819
+ let str = '';
820
+ let strList = this.useFieldList
821
+ ?.map(item => {
822
+ if (item.isSearch != 1) return '';
823
+ return item.formTitle || item.alias || item.title;
824
+ })
825
+ .filter(Boolean);
826
+ if (!strList?.length) return '';
827
+ str = '输入' + strList.join('/');
828
+ return str || '请输入关键字搜索';
829
+ },
830
+ showRelatedSearch() {
831
+ // sql类型的列表, 且有筛选外显的时候不展示平铺列表的search
832
+ if (this.relatedSqlOutSearch) return false;
833
+ if (this.isAvailableApiType) return false;
834
+ return this.showRelatedTreeBtn && this.isShowSetting('hideSearch');
835
+ },
836
+ showQuickSearch() {
837
+ let showQuick = this.isShowSetting('hideQuickSearch');
838
+ // 平铺列表, 左侧不为tree, 而是table
839
+ if (this.editTableSource == 'relatedComponent' && this.relatedBaseInfo?.showType != 'TREE') return showQuick;
840
+ return showQuick && this.isRelatedSearchFold;
841
+ },
842
+ showBaseTabs() {
843
+ return this.conditionType === 'keyword' && this.tabConditionList?.length && !this.visibleInlineOperateBtn && !this.isRowEditing;
844
+ },
845
+ isCard() {
846
+ return this.TypeOfDisplay === 'cardNew' && this.isBatchSelect == 1
847
+ },
848
+ showApiSearch(){
849
+ return !this.outSearchFieldList?.length && this.isAvailableApiType
850
+ },
851
+ // sql类型的列表, 且有筛选外显的时候不展示平铺列表的search
852
+ relatedSqlOutSearch() {
853
+ return this.tableDataType === 'SQL' && !!this.outSearchFieldList?.length
854
+ },
855
+ isShowInputSearch() {
856
+ if(!this.isShowSetting('hideSearch')) return false;
857
+ if(!this.showRelatedTreeBtn) return true;
858
+ return this.relatedSqlOutSearch;
859
+ }
860
+ },
861
+ data() {
862
+ return {
863
+ modalVisible: false,
864
+ currentTempId: '0',
865
+ viewCongfigList: [],
866
+ isTile: false,
867
+ conditionList: [],
868
+ displayCategoryList: [],
869
+ settingId: '',
870
+ searchDefName: '',
871
+ rowTileBtnList: [],
872
+ rowFoldBtnList: [],
873
+ rowPrintBtnList: [],
874
+ rowFoldHideBtnList: [], // 按钮自适应折叠list
875
+ rowFoldHideBtnListObj: {}, // 按钮自适应折叠分类
876
+ batchRelationBtnIds: [], // 批量操作按钮,关联的对应操作按钮id集
877
+ relationBtnBatchBtnIds: [], // 有关联对应操作按钮的批量操作按钮id集
878
+
879
+ nobutton: false, // 不展示按钮设置 false 展示,true 不展示
880
+ noSetting: false, // 不展示按钮设置 false 展示,true 不展示
881
+ isChangeWindow: false,
882
+ modalWidth: '700px',
883
+ modalHeight: '60vh',
884
+ label_max_count: 8,
885
+ baseLeftWidth: 0,
886
+ btnRowWidth: 0,
887
+ classificationWidth: 0,
888
+ inputSearchWidth: 0,
889
+ quickSearchWidth: 0,
890
+ downloadDropdownWidth: 0,
891
+ diffWidth: 0,
892
+ resizeFlag: false,
893
+ rowTileBtnListTree: [],
894
+ outSearchFieldList: [],
895
+ tabIndex: -1,
896
+ // tabConditionList: [],
897
+
898
+ /* 打印相关 */
899
+ printBtnPrevFnWatch: {},
900
+ printPrevFinish: false,
901
+ printBtnPrevFnWatchTimeoutTimer: null,
902
+ printBtn: {},
903
+ groupBtnObj: {},
904
+ btnObj: BTNOBJ,
905
+ printBtnStrategys: [], // 打印按钮组策略list
906
+ outRelationQuickSearch: [], // 关联表 筛选外显
907
+ inputSearchW: 200,
908
+ showPlaceholderPrefix: false
909
+ };
910
+ },
911
+ created() {
912
+ if (this.getIsTile !== undefined) {
913
+ this.isTile = this.getIsTile;
914
+ }
915
+ },
916
+ destroyed() {},
917
+ methods: {
918
+ tabClick(index) {
919
+ if (this.tabIndex === index) return false;
920
+ this.tabIndex = index;
921
+ if (index !== -1) this.$emit('tabClick', this.tabConditionList[index]);
922
+ },
923
+ pageResize(obj) {
924
+ if (this.resizeFlag || this.visibleInlineOperateBtn || this.isRowEditing) return;
925
+ let baseLeft = this.$refs['baseLeft'];
926
+ if (!baseLeft) return;
927
+ this.resizeFlag = true;
928
+ this.baseLeftWidth = baseLeft.clientWidth;
929
+ this.classificationWidth = this.classificationIndex === 2 ? 160 : 0;
930
+ this.btnRowWidth = this.$refs['btnRow']?.clientWidth || 0;
931
+ this.inputSearchWidth = this.$refs['inputSearchLi']?.clientWidth || 0;
932
+ this.quickSearchWidth = this.$refs['quickSearchLi']?.clientWidth || 0;
933
+ // this.downloadDropdownWidth = this.$refs["downloadDropdownLi"]?.clientWidth || 0;
934
+ let defaultTotal = this.btnRowWidth + this.classificationWidth + this.inputSearchWidth + this.quickSearchWidth;
935
+
936
+ let diffWidth = this.baseLeftWidth - defaultTotal;
937
+ // 平铺列表占2行
938
+ if (this.editTableSource === 'relatedComponent') {
939
+ diffWidth += this.baseLeftWidth;
940
+ }
941
+ this.diffWidth = diffWidth;
942
+ if (!obj.type) return;
943
+ if (obj.type === 'resize') {
944
+ this.handleTileBtnWidth();
945
+ }
946
+ },
947
+ onResize() {
948
+ if (this.isButtonFolding || this.isShowSetting('buttonAdaption') || this.relatedIsTree == 1 || this.visibleInlineOperateBtn || this.isRowEditing) return;
949
+ utils.debounce(this.pageResize({ type: 'resize' }), 300);
950
+ },
951
+ async saveListIsTile() {
952
+ let url = `/tableList/saveListIsTile`;
953
+ let params = {
954
+ isTile: this.isTile ? '1' : '0'
955
+ };
956
+ let res = await this.handleGetConfigApi(params, 'requestSaveListIsTile');
957
+ if (res) {
958
+ this.$emit('setIsTile', this.isTile);
959
+ this.$message.success(this.$t('1.9.23'));
960
+ }
961
+ },
962
+ getTableCondiTionListRequest(first) {
963
+ this.getTableCondiTionList(first).then(checked => {
964
+ this.reloadList(checked);
965
+ });
966
+ },
967
+ getTableCondiTionList(first, conditionMap = {}) {
968
+ let tableId = this.tableId;
969
+ if (!tableId) return new Promise(resolve => resolve(false));
970
+ let conditionMapTemp = Object.keys(conditionMap).length > 0 ? conditionMap : this.conditionMap;
971
+
972
+ return new Promise((resolve, reject) => {
973
+ if (Object.keys(conditionMapTemp).length > 0) {
974
+ this.conditionList = conditionMapTemp.conditionList || [];
975
+ this.displayCategoryList = conditionMapTemp.displayCategoryList || [];
976
+ let obj = {
977
+ conditionList: this.conditionList,
978
+ displayCategoryList: this.displayCategoryList
979
+ };
980
+ this.$emit('getQuickSearchListObj', obj);
981
+ this.settingId = conditionMapTemp.settingId;
982
+ const checked = this.conditionList.find(item => item.isDefault) || {
983
+ name: '全部数据' || this.$t('1.1.5.1'),
984
+ sid: 'all_data'
985
+ };
986
+ this.searchDefName = checked.name;
987
+ // if (this.conditionType === "keyword") {
988
+ this.tabConditionList = conditionMapTemp.tabConditionList || []; // 获取页签tab
989
+ if (this.tabIndex === -1) {
990
+ this.tabIndex = conditionMapTemp.tabConditionList && conditionMapTemp.tabConditionList.findIndex(item => item.isDefault); // 查询默认选中的标签
991
+ }
992
+ // }
993
+ if (this.$attrs.tableOptions?.filterCondition?.displayCategory && first) {
994
+ resolve({
995
+ name: this.$attrs.tableOptions?.filterCondition?.name,
996
+ sid: this.$attrs.tableOptions?.filterCondition?.displayCategory
997
+ });
998
+ }
999
+ resolve(checked);
1000
+ } else {
1001
+ resolve({});
1002
+ }
1003
+ });
1004
+
1005
+ // }
1006
+ // });
1007
+ },
1008
+ async getTableCondiTionListNew(tableId) {
1009
+ if (!tableId) return new Promise(resolve => resolve(false));
1010
+ let params = { tableId };
1011
+ let url = `/tableList/getTableCondiTionList`;
1012
+ return this.axios
1013
+ .get(url, { params })
1014
+ .then(({ data }) => {
1015
+ if (data && data.result == 'SUCCESS') {
1016
+ // 设置分类数据,用于优化组件内的多次请求分类
1017
+ this.$emit('setConditionMap', data.map);
1018
+ return data.map;
1019
+ }
1020
+ })
1021
+ .catch(err => {
1022
+ console.log(err);
1023
+ });
1024
+ },
1025
+ foldQuickSearch() {
1026
+ this.$emit('foldQuickSearch', true);
1027
+ },
1028
+ openModal() {
1029
+ this.modalVisible = true;
1030
+ },
1031
+ closeModal() {
1032
+ this.resetChangeWindow();
1033
+ this.modalVisible = false;
1034
+ },
1035
+ resetChangeWindow() {
1036
+ this.modalWidth = '700px';
1037
+ this.modalHeight = '60vh';
1038
+ this.isChangeWindow = false;
1039
+ },
1040
+ changeModalWindow() {
1041
+ this.isChangeWindow = !this.isChangeWindow;
1042
+ let docHeight = document.body.clientHeight;
1043
+ this.modalWidth = this.modalWidth === '700px' ? `100%` : '700px';
1044
+ this.modalHeight = this.modalHeight === '60vh' ? `${docHeight - 108}px` : '60vh';
1045
+
1046
+ if (this.modalWidth === '700px') {
1047
+ this.label_max_count = 8;
1048
+ } else {
1049
+ this.$nextTick(() => {
1050
+ let ele = document.querySelector('.quickSearch_label-container');
1051
+ ele && (this.label_max_count = parseInt((ele.clientWidth - 20) / 112) * 2);
1052
+ });
1053
+ }
1054
+ },
1055
+ openSaveToCalss() {
1056
+ this.$refs.quicksearch?.openSaveToCalss();
1057
+ },
1058
+ onSaveSearch() {
1059
+ this.$refs.quicksearch?.onSave();
1060
+ },
1061
+ onSave(obj, isOutFilter = false, config = {}) {
1062
+ if (!this.validConObj(obj, this.searchFieldList, this.searchFieldLimit)) return false;
1063
+ let copy = [];
1064
+ if (this.outSearchFieldList.length) {
1065
+ copy = _.cloneDeep(this.outSearchFieldList, true);
1066
+ }
1067
+ let copyRelation = [];
1068
+ if (this.outRelationQuickSearch.length) {
1069
+ copyRelation = _.cloneDeep(this.outRelationQuickSearch, true);
1070
+ }
1071
+ this.$emit('onSave', obj, isOutFilter, copy, copyRelation, config);
1072
+ this.modalVisible = false;
1073
+ },
1074
+ // 外部调用
1075
+ editTableGetConObj() {
1076
+ if (!this.showOutSearch) return;
1077
+ let conObj = this.getConObjParams() || [];
1078
+ if (!this.validConObj(conObj, this.searchFieldList, this.searchFieldLimit)) return false;
1079
+ return conObj;
1080
+ },
1081
+ clearData() {
1082
+ this.$refs.quicksearch?.clearData();
1083
+ },
1084
+ /**
1085
+ * type 1-预览 2-打印
1086
+ */
1087
+ handlePrint(clickBtn, btn, type, j) {
1088
+ btn.printType = type;
1089
+ this.clickBtn(clickBtn, btn, clickBtn.my_index, true, j);
1090
+ },
1091
+ showDrawer(btn, j) {
1092
+ let hasSelectRows = this.paramsData.form.selectRows && this.paramsData.form.selectRows.length > 0;
1093
+ let isMultiSelect = hasSelectRows || this.tableAllCheck;
1094
+
1095
+ if ((btn.name.includes('批量') && btn.type == 'ADD') || btn.type == 'BATCH') {
1096
+ // const { settingObj = {} } = btn || {};
1097
+ let settingObj = {};
1098
+ let settingList = btn.setting || '{}';
1099
+ if (utils.isJSON(settingList)) {
1100
+ let btnSetting = JSON.parse(settingList);
1101
+ if (Array.isArray(btnSetting)) {
1102
+ settingObj = btnSetting[0] || {};
1103
+ } else {
1104
+ settingObj = btnSetting;
1105
+ }
1106
+ }
1107
+ let trigger_type = settingObj?.trigger_type;
1108
+
1109
+ // 全部行编辑
1110
+ if (trigger_type == 'EDIT_ROW' || settingObj?.editAllRow == 1) {
1111
+ this.handleBtnEvent(btn, j);
1112
+ return;
1113
+ }
1114
+
1115
+ if (trigger_type == 'SCAN' && btn.type == 'ADD') {
1116
+ this.handleBtnEvent(btn, j);
1117
+ return;
1118
+ }
1119
+
1120
+ if (isMultiSelect) {
1121
+ if (settingObj.isTips && settingObj.isTips == 0) {
1122
+ this.handleBtnEvent(btn, j);
1123
+ return;
1124
+ }
1125
+ // 批量操作增加确认
1126
+ let params = { ...this.paramsData };
1127
+ params.table = {};
1128
+ if (settingObj.tipsMsg) {
1129
+ if (settingObj.tipsMsg.includes('form.selectRows')) {
1130
+ settingObj.tipsMsg = utils.handleMultiTips(settingObj.tipsMsg, [...params.form.selectRows]);
1131
+ } else {
1132
+ settingObj.tipsMsg = utils.handleSysParams(settingObj.tipsMsg, {
1133
+ ...params
1134
+ });
1135
+ }
1136
+ }
1137
+ const h = this.$createElement;
1138
+ this.$confirm({
1139
+ title: h(
1140
+ 'div',
1141
+ {
1142
+ directives: [
1143
+ {
1144
+ name: 'drag-move',
1145
+ value: {
1146
+ target: 'ant-modal-confirm-body'
1147
+ }
1148
+ }
1149
+ ],
1150
+ domProps: {
1151
+ innerHTML: settingObj.tipsMsg || `是否确认${btn.name}`
1152
+ }
1153
+ }
1154
+ // settingObj.tipsMsg || `是否确认${btn.name}`
1155
+ ),
1156
+ okText: '确定',
1157
+ cancelText: '取消',
1158
+ onOk: () => {
1159
+ this.handleBtnEvent(btn, j);
1160
+ },
1161
+ onCancel() {
1162
+ console.log('Cancel');
1163
+ },
1164
+ class: 'test'
1165
+ });
1166
+ } else {
1167
+ if (!btn.canHandleUniline) {
1168
+ // 1.9.295
1169
+ this.$message.warning(`请勾选需要${btn.name}的数据`);
1170
+ return;
1171
+ }
1172
+ this.clickBtn(
1173
+ this.clickRowData,
1174
+ // 找到对应的单行操作按钮
1175
+ this.getUnilineBtn(btn),
1176
+ this.clickRowData.my_index,
1177
+ true,
1178
+ j
1179
+ );
1180
+ }
1181
+ } else {
1182
+ if (btn.type == 'ADD' || btn.type == 'BATCH') {
1183
+ this.handleBtnEvent(btn, j);
1184
+ return;
1185
+ }
1186
+ this.clickBtn(this.clickRowData, btn, this.clickRowData.my_index, j);
1187
+ }
1188
+ },
1189
+ getUnilineBtn(BatchBtn) {
1190
+ let unilineBtnId = this.batchRelationBtnIds[this.relationBtnBatchBtnIds.indexOf(BatchBtn.id)];
1191
+ let unilineBtnObj = null;
1192
+ this.allBtn.forEach(i => {
1193
+ if (i.id == unilineBtnId) {
1194
+ unilineBtnObj = i;
1195
+ }
1196
+ });
1197
+ return unilineBtnObj;
1198
+ },
1199
+ handleBtnEvent(btn, j) {
1200
+ let indexList = [];
1201
+ this.$emit('clearTeamTitleName');
1202
+ if (this.paramsData.form.selectRows && this.paramsData.form.selectRows.length > 0) {
1203
+ indexList = this.paramsData.form.selectRows.map(item => {
1204
+ if (btn.type == 'BATCH') {
1205
+ delete item.SHOW_BUTTON_IDS;
1206
+ delete item.operatorColumn;
1207
+ }
1208
+ return item.my_index;
1209
+ });
1210
+ }
1211
+ let setData = JSON.parse(btn.setting);
1212
+ let settingList = JSON.parse(btn.setting);
1213
+ /** 按钮对象需求:add类型的 setting 可能是 Array/Object*/
1214
+ if (btn.type === 'ADD' || btn.type == 'BATCH') {
1215
+ if (Array.isArray(settingList)) {
1216
+ setData = settingList[0] || {};
1217
+ } else {
1218
+ setData = settingList;
1219
+ }
1220
+ this.paramsData.table = {};
1221
+ }
1222
+ if (setData.trigger_type == 'ABOUT_ITEM') {
1223
+ this.$message.error('按钮事件配置有误');
1224
+ return;
1225
+ }
1226
+ let params = setData.params || [];
1227
+ if (setData.trigger_type == 'QR_CODE') {
1228
+ params.forEach(item => {
1229
+ item.p_value = item.p_value?.replace(/\$\{([^}]+)\}/g, (_v, $1) => {
1230
+ return $1 || _v;
1231
+ });
1232
+ });
1233
+ }
1234
+ let paramsData = utils.setParamsValue(params, this.paramsData);
1235
+ Object.assign(btn, {
1236
+ _index_: j
1237
+ });
1238
+ let btnData = {
1239
+ btnData: Object.assign(setData, {
1240
+ paramsData: paramsData,
1241
+ btnName: btn.name,
1242
+ _params_data: this.paramsData,
1243
+ _type_: btn.type
1244
+ }),
1245
+ indexList: indexList,
1246
+ btnConfig: JSON.parse(JSON.stringify(btn)),
1247
+ _params_data: this.paramsData,
1248
+ _type_: btn.type
1249
+ };
1250
+ this.$emit('btnEvent', btnData);
1251
+ },
1252
+
1253
+ // 筛选分类相关的
1254
+ async updateTableCondiTion() {
1255
+ await this.getTableCondiTionListNew(this.tableId);
1256
+ this.getTableCondiTionListRequest();
1257
+ },
1258
+ async CondiTionListInit() {
1259
+ await this.getTableCondiTionListNew(this.tableId);
1260
+ this.getTableCondiTionListRequest();
1261
+ },
1262
+ async saveGetTableCondiTionList(options) {
1263
+ await this.getTableCondiTionListNew(this.tableId);
1264
+ this.getTableCondiTionList();
1265
+ this.$emit('getClassification', options);
1266
+ },
1267
+ changeSearch(key, item) {
1268
+ if (key == 'all') {
1269
+ this.searchDefName = '全部数据' || this.$t('1.1.5.1');
1270
+ } else {
1271
+ this.searchDefName = item.name;
1272
+ }
1273
+ this.$refs.quicksearch.clearData();
1274
+ this.$emit('changeSearch', key, item);
1275
+ },
1276
+ changeSearchTile(val) {
1277
+ this.isTile = val;
1278
+ this.saveListIsTile();
1279
+ },
1280
+ openSetting() {
1281
+ this.$refs.search.handleMenuClick('setting');
1282
+ },
1283
+ reloadList(item) {
1284
+ this.$refs.quicksearch?.clearData();
1285
+ this.$emit('reloadList', item);
1286
+ },
1287
+ clickBtn(data, item, index, skip, j) {
1288
+ this.$emit('clearTeamTitleName');
1289
+ if ((item.name.includes('批量') && item.type == 'ADD' && !skip) || (item.type == 'BATCH' && !skip)) {
1290
+ this.showDrawer(item, j);
1291
+ return;
1292
+ }
1293
+ if (Object.keys(data || {}).length === 0 && !this.isPrintBtn(item)) {
1294
+ // 请点击要操作的数据1.9.140
1295
+ this.$message.info('请点击要操作的数据' || this.$t('1.9.140'));
1296
+ return;
1297
+ }
1298
+ Object.assign(item, {
1299
+ _index_: j
1300
+ });
1301
+ this.$emit('clickBtn', data, item, index);
1302
+ },
1303
+ clickGroupBtn(btn, j) {
1304
+ this.clickBtn(this.clickRowData, btn, this.clickRowData.my_index, undefined, j);
1305
+ },
1306
+ handlerSetting() {
1307
+ this.$emit('handlerSetting');
1308
+ },
1309
+ // 请求视图列表
1310
+ handlerReqAllConfigView() {
1311
+ let params = {
1312
+ type: 'PC',
1313
+ typeTable: 'TABLE_LIST',
1314
+ tableId: this.tableId,
1315
+ page: 1,
1316
+ rows: 20
1317
+ };
1318
+ this.axios
1319
+ .get('/tableListConfigView/getTableListConfigViewAll', {
1320
+ params: params
1321
+ })
1322
+ .then(({ data }) => {
1323
+ if (data.rows) {
1324
+ let viewCongfigList = data.rows || [];
1325
+ if (viewCongfigList.length > 0) {
1326
+ // 查找默认值
1327
+ let curItem = viewCongfigList.find(v => v.mark == 1);
1328
+ this.currentTempId = curItem ? curItem.id : '0';
1329
+ this.$emit('handlerChangeView', this.currentTempId);
1330
+ } else {
1331
+ this.currentTempId = '0';
1332
+ this.$emit('handlerChangeView', this.currentTempId);
1333
+ }
1334
+
1335
+ this.$set(this, 'viewCongfigList', viewCongfigList);
1336
+ }
1337
+ });
1338
+ },
1339
+ handlerSelectTemp(e) {
1340
+ if (this.currentTempId === e) return;
1341
+ this.currentTempId = e;
1342
+ const tab = e == 0 ? 'bigTable' : null;
1343
+ this.$emit('handlerChangeView', e, tab);
1344
+ let f = this.viewList.findIndex(v => v.id == e);
1345
+ this.resetCheckStatus();
1346
+ this.$nextTick(() => {
1347
+ this.formatRowBtnList();
1348
+ });
1349
+ },
1350
+ isShowSetting(v) {
1351
+ if (v == 'hideSettingBtn') {
1352
+ return this.isOrgAdmin || this.showSettings[v] == 0;
1353
+ } else {
1354
+ if (this.showRelatedTreeBtn) {
1355
+ return this.relatedBaseInfo[v] == 0;
1356
+ }
1357
+ return this.showSettings[v] == 0;
1358
+ }
1359
+ },
1360
+ setBatchRelationBtnIds(list) {
1361
+ let showButtonTop = !!this.showButtonTop;
1362
+ if (!showButtonTop) return false;
1363
+
1364
+ list.forEach(item => {
1365
+ let relationBtnId = item.setting && JSON.parse(item.setting)?.relationBtnId;
1366
+ if (item.type === 'BATCH' && relationBtnId) {
1367
+ this.relationBtnBatchBtnIds.push(item.id);
1368
+ this.batchRelationBtnIds.push(relationBtnId);
1369
+ }
1370
+ });
1371
+ },
1372
+ setBtnStatus(btn) {
1373
+ const btnObj = utils.getRowOperatorIdSetting({}, btn);
1374
+ const { settingObj = {} } = btnObj || {};
1375
+ let isAllSelect = this.tableAllCheck;
1376
+ let isMultiSelect = !!this.paramsData.form.selectIds;
1377
+ let isBatchBtn = btn.type === 'BATCH';
1378
+ let isAddBtn = btn.type === 'ADD';
1379
+ let isSQLSAVEBtn = settingObj.trigger_type === 'SQLSAVE';
1380
+ let isLineBtn = btn.type === 'EDIT' || btn.type === 'DELETE';
1381
+ let isImportGuage = settingObj.trigger_type === 'GUAGE' && settingObj.guage_type == 'importGuage';
1382
+
1383
+ let isEditRow = settingObj.trigger_type === 'EDIT_ROW';
1384
+ let editAllRow = settingObj.editAllRow == 1;
1385
+
1386
+ // 批量&&行编辑&&全部行编辑 直接展示
1387
+ if (isBatchBtn && isEditRow && editAllRow) {
1388
+ btn.isVisible = true;
1389
+ return;
1390
+ }
1391
+
1392
+ // 默认情况下 只展示新增&下载
1393
+ if (!this.showDownCurSelectData) {
1394
+ btn.isVisible = isAddBtn ? true : false;
1395
+ if (!isImportGuage) return;
1396
+ }
1397
+
1398
+ // btn.settingObj.guage_type == "importGuage";
1399
+ // 全选状态下,只有入口类型的批量按钮展示(因当前版本仅支持入口类型的全选批量操作
1400
+ if (isBatchBtn && isAllSelect) {
1401
+ btn.isVisible = isSQLSAVEBtn;
1402
+ return;
1403
+ }
1404
+
1405
+ // 批量操作按钮,如果有绑定对应单行操作按钮,则批量按钮开启单行操作
1406
+ let relationBtnId = JSON.parse(btn.setting).relationBtnId;
1407
+ if (isBatchBtn && relationBtnId) {
1408
+ btn.canHandleUniline = true;
1409
+ }
1410
+
1411
+ // 批量按钮关联的对应按钮
1412
+ if (this.showDownCurSelectData > 1 && isLineBtn) {
1413
+ btn.isVisible = false;
1414
+ } else {
1415
+ if (isBatchBtn && btn.chooseTwoData == 1) {
1416
+ btn.isVisible = !this.batchRelationBtnIds.includes(btn.id) && this.showDownCurSelectData > 1;
1417
+ } else {
1418
+ btn.isVisible = !this.batchRelationBtnIds.includes(btn.id);
1419
+ }
1420
+ }
1421
+
1422
+ // 未绑定了行级按钮的批量按钮,默认隐藏, 勾选展示
1423
+ if (isBatchBtn && !relationBtnId && this.showDownCurSelectData > 1) {
1424
+ btn.isVisible = isMultiSelect;
1425
+ }
1426
+ // 量表导入按钮
1427
+ if (isImportGuage) {
1428
+ btn.isImportGuage = true;
1429
+ btn.isVisible = false;
1430
+ }
1431
+ },
1432
+ // 处理分组按钮
1433
+ handleButtonGroup(buttonList) {
1434
+ let useBttonList = buttonList
1435
+ .map(v => {
1436
+ v.isButtonGroup = false;
1437
+ // 有分组名 非隐藏
1438
+ if (!v.buttonGroup || !v.isVisible || v.isShow != 1) return null;
1439
+ if (v.type === 'ADD' || v.type == 'BATCH') return v;
1440
+ if (this.showButtonTop != 1) return null;
1441
+ return v;
1442
+ })
1443
+ .filter(Boolean);
1444
+ if (!useBttonList.length) return;
1445
+ let groupRes = vexutils.groupBy(useBttonList, 'buttonGroup');
1446
+ if (!groupRes || !Object.keys(groupRes).length) return;
1447
+ let resObj = {};
1448
+ Object.keys(groupRes).forEach(item => {
1449
+ let list = groupRes[item];
1450
+ // 超过一个才展示
1451
+ if (item && list?.length > 1) {
1452
+ resObj[item] = {
1453
+ key: item,
1454
+ isHide: false,
1455
+ list: list,
1456
+ clientWidth: 0,
1457
+ isVisible: true
1458
+ };
1459
+ list.forEach(v => (v.isButtonGroup = true));
1460
+ }
1461
+ });
1462
+ this.groupBtnObj = resObj;
1463
+ },
1464
+ async formatRowBtnList() {
1465
+ let rowFoldBtnList = [];
1466
+ let rowTileBtnList = [];
1467
+ let rowPrintBtnList = [];
1468
+ this.rowFoldBtnList = [];
1469
+ this.rowTileBtnList = [];
1470
+ this.rowPrintBtnList = [];
1471
+ this.rowFoldHideBtnList = [];
1472
+ this.batchRelationBtnIds = [];
1473
+ this.relationBtnBatchBtnIds = [];
1474
+ this.groupBtnObj = {};
1475
+ let useButton = [];
1476
+ // let tempBtnList = this.rowBtnList;
1477
+ // // 按钮置顶时 过滤掉行级按钮中 仅图标
1478
+ // if (this.showButtonTop == 1) {
1479
+ // tempBtnList = tempBtnList.filter(v => {
1480
+ // if (["EDIT", "DELETE"].includes(v.type)) {
1481
+ // if (v.showStyle != "only_icon") return v;
1482
+ // } else {
1483
+ // return v;
1484
+ // }
1485
+ // });
1486
+ // }
1487
+ let rowBtnList = this.rowBtnList;
1488
+ // 新卡片视图 有进入批量模式的按钮
1489
+ if (this.isCard) {
1490
+ if(this.isCardNewBatch) {
1491
+ rowBtnList = rowBtnList.map(v => {
1492
+ if(v.type == 'BATCH') return v
1493
+ return null
1494
+ }).filter(Boolean);
1495
+ } else {
1496
+ rowBtnList = rowBtnList.map(v => {
1497
+ if(v.type != 'BATCH') return v;
1498
+ return null;
1499
+ }).filter(Boolean);
1500
+ }
1501
+ }
1502
+ if (!rowBtnList?.length) return;
1503
+ this.setBatchRelationBtnIds(rowBtnList);
1504
+
1505
+
1506
+ // 子列表只留下行级按钮
1507
+ // if (this.isNestTableClick) {
1508
+ // rowBtnList = this.rowBtnList.filter(item => item.type != 'ADD' && item.type != 'BATCH');
1509
+ // }
1510
+
1511
+ rowBtnList.forEach(btn => {
1512
+ if (!(btn.isShow == '1' && btn.type != 'LINK')) return;
1513
+ btn.isHide = false;
1514
+ btn.isButtonGroup = false;
1515
+ let cloneBtn = _.cloneDeep(btn);
1516
+ this.setBtnStatus(cloneBtn);
1517
+ // 按钮自适应 即使折叠也平铺显示出来
1518
+ if (this.isShowSetting('buttonAdaption')) {
1519
+ if (btn.toggle == 'fold') {
1520
+ if (btn.type != 'ADD' && btn.type != 'BATCH' && this.showButtonTop == 0) return;
1521
+ if (!this.isPrintBtn(btn)) {
1522
+ rowFoldBtnList.push(cloneBtn);
1523
+ }
1524
+ } else {
1525
+ rowTileBtnList.push(cloneBtn);
1526
+ }
1527
+ } else {
1528
+ rowTileBtnList.push(cloneBtn);
1529
+ }
1530
+ useButton.push(cloneBtn);
1531
+ });
1532
+ if (this.isShowSetting('buttonAdaption')) {
1533
+ this.rowFoldBtnList = rowFoldBtnList;
1534
+ }
1535
+
1536
+ this.rowTileBtnList = rowTileBtnList.filter(i => {
1537
+ if (this.isPrintBtn(i)) {
1538
+ rowPrintBtnList.push(i);
1539
+ } else {
1540
+ return i;
1541
+ }
1542
+ });
1543
+
1544
+ let printNumberList = (await this.getPrintNumber(rowPrintBtnList)) || [];
1545
+ rowPrintBtnList = this.setPrintNumberToBtnList(printNumberList, rowPrintBtnList);
1546
+ // this.rowPrintBtnList = rowPrintBtnList;
1547
+ // 添加批量打印策略:strategy: MULTI(循环多条, 默认值, 为空时使用该策略) ONCE(聚合一条)
1548
+ this.rowPrintBtnList = rowPrintBtnList.map(item => {
1549
+ const obj = this.printBtnStrategys.find(v => v.id === item.settingObj[0].trigger_id);
1550
+ item.strategy = obj?.setting ? JSON.parse(obj.setting).strategy : 'MULTI';
1551
+ return item;
1552
+ });
1553
+
1554
+ this.hideInlineOperationBtn();
1555
+
1556
+ // 分组按钮
1557
+ this.handleButtonGroup(useButton);
1558
+
1559
+ if (this.isShowSetting('buttonAdaption')) return;
1560
+ this.$nextTick(() => {
1561
+ this.handleTileBtnWidth();
1562
+ this.dealOutFilterHideBtn();
1563
+ });
1564
+ },
1565
+ hideInlineOperationBtn() {
1566
+ if (this.TypeOfDisplay === 'table') return;
1567
+
1568
+ this.rowFoldBtnList = this.rowFoldBtnList.filter(item => {
1569
+ return item.settingObj[0].trigger_type !== 'EDIT_ROW';
1570
+ });
1571
+ this.rowTileBtnList = this.rowTileBtnList.filter(item => {
1572
+ return item.settingObj[0].trigger_type !== 'EDIT_ROW';
1573
+ });
1574
+ },
1575
+ isPrintBtn(btn) {
1576
+ const copySettingObj = btn.settingObj;
1577
+ let settingObj = {};
1578
+ if (Array.isArray(copySettingObj)) {
1579
+ settingObj = copySettingObj[0];
1580
+ } else {
1581
+ settingObj = copySettingObj;
1582
+ }
1583
+ if (!settingObj) return false;
1584
+ return settingObj.trigger_type === 'PRINT';
1585
+ },
1586
+ handleTileBtnWidth() {
1587
+ if (this.outSearchFieldList.length > 0) return; // 存在外显按钮的时候 不触发这个函数
1588
+ let rowTileBtnRef = this.$refs.rowTileBtnItem;
1589
+ if (!rowTileBtnRef || !rowTileBtnRef.length) return;
1590
+ let rowTileBtnList = JSON.parse(JSON.stringify(this.rowTileBtnList));
1591
+ let groupBtnObj = JSON.parse(JSON.stringify(this.groupBtnObj));
1592
+ let btnTotalWidth = 90;
1593
+ let hasHideBtn = false;
1594
+ let rowFoldHideBtnWidth = 90;
1595
+ let diffWidth = this.diffWidth;
1596
+ rowTileBtnRef.forEach((e, index) => {
1597
+ let dataKey = e.getAttribute('data-key');
1598
+ let dateSource = e.getAttribute('data-source');
1599
+ let clientWidth = e.clientWidth;
1600
+ let item;
1601
+ if (dateSource == 'groupBtn') {
1602
+ item = groupBtnObj[dataKey];
1603
+ } else {
1604
+ item = rowTileBtnList.find(v => v.sid === dataKey);
1605
+ }
1606
+ if (!item) return;
1607
+ if (clientWidth) {
1608
+ item.clientWidth = clientWidth;
1609
+ }
1610
+ if (item.clientWidth) {
1611
+ clientWidth = item.clientWidth;
1612
+ }
1613
+ if (diffWidth <= 0) {
1614
+ this.$set(item, 'isHide', true);
1615
+ } else if (diffWidth > 0 && item.isVisible) {
1616
+ btnTotalWidth += clientWidth;
1617
+ if (btnTotalWidth > diffWidth) {
1618
+ this.$set(item, 'isHide', true);
1619
+ if (!hasHideBtn) {
1620
+ hasHideBtn = true;
1621
+ diffWidth -= rowFoldHideBtnWidth;
1622
+ btnTotalWidth -= rowFoldHideBtnWidth;
1623
+ }
1624
+ } else {
1625
+ this.$set(item, 'isHide', false);
1626
+ }
1627
+ }
1628
+ });
1629
+ let hideBtn = rowTileBtnList.filter(item => item.isVisible && item.isHide);
1630
+ this.groupBtnObj = groupBtnObj;
1631
+ this.rowTileBtnList = rowTileBtnList;
1632
+ let rowFoldHideBtnListObj = {
1633
+ ADD: { name: '新增按钮', list: [] },
1634
+ INLINE: { name: '行级按钮', list: [] },
1635
+ BATCH: { name: '批量按钮', list: [] }
1636
+ };
1637
+
1638
+ hideBtn.forEach(item => {
1639
+ item.isShowFoldGroupBtn = false;
1640
+ if (item.type === 'ADD') {
1641
+ rowFoldHideBtnListObj.ADD.list.push(item);
1642
+ } else if (item.type == 'BATCH') {
1643
+ rowFoldHideBtnListObj.BATCH.list.push(item);
1644
+ } else {
1645
+ rowFoldHideBtnListObj.INLINE.list.push(item);
1646
+ }
1647
+ });
1648
+
1649
+ let hideGroupBtnObj = {};
1650
+ // 按钮自适应 隐藏的分组 需要在折叠中平铺展示
1651
+ for (let key in groupBtnObj) {
1652
+ if (groupBtnObj[key].isHide) {
1653
+ let list = groupBtnObj[key].list;
1654
+ hideGroupBtnObj[key] = {
1655
+ name: key,
1656
+ list
1657
+ };
1658
+ list.forEach(item => {
1659
+ let matchItem = hideBtn.find(v => v.sid === item.sid);
1660
+ if (!matchItem) {
1661
+ item.isShowFoldGroupBtn = true;
1662
+ hideBtn.push(item);
1663
+ } else {
1664
+ matchItem.isShowFoldGroupBtn = true;
1665
+ }
1666
+ });
1667
+ }
1668
+ }
1669
+ if (Object.keys(hideGroupBtnObj).length) {
1670
+ Object.assign(rowFoldHideBtnListObj, hideGroupBtnObj);
1671
+ }
1672
+
1673
+ this.rowFoldHideBtnListObj = rowFoldHideBtnListObj;
1674
+ this.rowFoldHideBtnList = hideBtn;
1675
+ this.resizeFlag = false;
1676
+ },
1677
+ resetCheckStatus() {
1678
+ this.$emit('pubResetCheckStatus');
1679
+ },
1680
+ handleReset() {
1681
+ this.$emit('handleReset', { targetType: 'outQuickSearchReset' });
1682
+ },
1683
+ changeCardNewBatch(val) {
1684
+ this.$emit('changeCardNewBatch', val)
1685
+ },
1686
+ handleUploadChange(info) {
1687
+ const { file, fileList } = info;
1688
+ if (file.status !== 'uploading') {
1689
+ console.log(file, fileList);
1690
+ }
1691
+ if (file.status === 'done') {
1692
+ if (file.response?.result == 'SUCCESS') {
1693
+ this.$message.success(`${file.name} 导入成功`);
1694
+ this.$emit('importUpdate');
1695
+ } else {
1696
+ this.$message.error(`${file.name} 导入失败`);
1697
+ }
1698
+ } else if (file.status === 'error') {
1699
+ this.$message.error(`${file.name} 导入失败`);
1700
+ }
1701
+ },
1702
+ handleOtherConfigInit() {
1703
+ setTimeout(() => {
1704
+ let tableOptions = this.$attrs?.tableOptions || this.tableOptions || {};
1705
+ const { nobutton = false, TypeOfDisplay = '', noSetting = false } = tableOptions?.config || {};
1706
+ this.nobutton = nobutton || false;
1707
+ if (TypeOfDisplay === 'table') {
1708
+ this.currentTempId = '0';
1709
+ }
1710
+ if (noSetting) {
1711
+ // this.showSettings["hideSettingBtn"] = 1;
1712
+ this.noSetting = true;
1713
+ }
1714
+ }, 16);
1715
+ },
1716
+
1717
+ handleTopBtnTracher(btn, j) {
1718
+ try {
1719
+ // 埋点
1720
+ this.$_handleTracherLog('列表按钮', {
1721
+ 列表ID: this.tableId || '',
1722
+ 列表名称: this.tableName || this.$attrs?.tableName || '',
1723
+ 按钮名称: btn.name,
1724
+ 按钮ID: btn.id,
1725
+ 按钮类型: btn.type,
1726
+ 按钮顺序位置: j,
1727
+ 显示位置: btn.toggle
1728
+ });
1729
+ } catch (error) {
1730
+ console.log(error);
1731
+ }
1732
+ },
1733
+ handleAddType(btn) {
1734
+ const btnObj = utils.getRowOperatorIdSetting({}, btn);
1735
+ let setData = JSON.parse(btnObj.setting);
1736
+ const { editTableWrapper } = this;
1737
+ const tableParams = JSON.parse(JSON.stringify(this.paramsData));
1738
+
1739
+ if (editTableWrapper.options && utils.isPlainObject(editTableWrapper.options.extendParams)) {
1740
+ // 有额外的参数
1741
+ editTableWrapper.options?.extendParams && Object.assign(tableParams.form, editTableWrapper.options.extendParams);
1742
+ }
1743
+ const paramsData = Object.assign(tableParams, {
1744
+ table: btn
1745
+ });
1746
+ const params = utils.setParamsValue(setData.params, paramsData);
1747
+ Object.assign(setData, { params, _params_data: paramsData });
1748
+ this.$emit('btnEventTree', setData);
1749
+ },
1750
+ getRowTileBtnList(btnList) {
1751
+ this.rowTileBtnListTree = [];
1752
+ this.rowTileBtnListTree = btnList.filter(btn => btn.isShow == '1' && btn.type == 'ADD');
1753
+ },
1754
+ relatedSearchInputBlur() {
1755
+ let searchInput = this.$refs.relatedSearchInput;
1756
+ if (!searchInput) return;
1757
+ if (!searchInput.$el?.children) return;
1758
+ if (!searchInput.$el.children[0]?.children) return;
1759
+ if (!searchInput.$el.children[0].children[0]) return;
1760
+ if (!searchInput.$el.children[0].children[0]?.children) return;
1761
+ let inputDom = searchInput.$el.children[0].children[0].children[0];
1762
+ if (!inputDom) return;
1763
+ inputDom.blur();
1764
+ },
1765
+ handleRequestedLabel(v) {
1766
+ let params = { type: v, pageSize: 10000 };
1767
+ return this.axios.get('/label/list', { params: params });
1768
+ },
1769
+ initOutSearchFieldList(config = {}) {
1770
+ this.outSearchFieldList = [];
1771
+ this.outRelationQuickSearch = [];
1772
+ let mySearchFieldList = JSON.parse(JSON.stringify(this.searchFieldList)).filter(i => ((i.random_key = this.getFiledRandom_key(i)), i.isShowSearch == 1 && i.filterExplicit == 1));
1773
+ this.outSearchFieldList = mySearchFieldList;
1774
+ // 跨表
1775
+ let outRelationQuickSearch = this.relationTableList.map(item => {
1776
+ return {
1777
+ fieldList: item.fieldList.fieldList.filter(item => item.isShowSearch == 1 && item.filterExplicit == 1) || [],
1778
+ tableName: item.tableName,
1779
+ primaryField: item.primaryField,
1780
+ parameterConversionId: item.parameterConversionId,
1781
+ tableId: item.tableId,
1782
+ relationField: item.relationField,
1783
+ converFun: item.converFun,
1784
+ relationOrgId: item.relationOrgId,
1785
+ preConObj: item.preConObj,
1786
+ preSqlExpression: item.preSqlExpression
1787
+ };
1788
+ });
1789
+ outRelationQuickSearch = outRelationQuickSearch.filter(item => item.fieldList.length);
1790
+ this.$set(this, 'outRelationQuickSearch', outRelationQuickSearch);
1791
+ this.dealOutFilterHideBtn();
1792
+ this.handlerInitSearchItem(this.outSearchFieldList);
1793
+ this.outRelationQuickSearch.forEach(item => {
1794
+ this.handlerInitSearchItem(item.fieldList);
1795
+ });
1796
+ if (this.lastOutSearchFieldList.length > 0) {
1797
+ this.outSearchFieldList = _.cloneDeep(this.lastOutSearchFieldList);
1798
+ }
1799
+ if (this.lastOutRelationQuickSearch.length) {
1800
+ this.outRelationQuickSearch = this.$utils.clone(this.lastOutRelationQuickSearch, true);
1801
+ }
1802
+
1803
+ // 如有配置默认值
1804
+ const isSetDefVal = this.outSearchFieldList.some(v => {
1805
+ if (this.isRender(v)) {
1806
+ return this.isExistDefValByRenderWidget(v);
1807
+ }
1808
+ return !!v.explicitDefaultVal
1809
+ });
1810
+ if (isSetDefVal) {
1811
+ this.$emit('outSearchInit');
1812
+ if ('reset' != config?.type) {
1813
+ this.outFilterChange({ type: 'outSearchInit' });
1814
+ }
1815
+ }
1816
+ },
1817
+ dealOutFilterHideBtn() {
1818
+ if (!this.isShowSetting('buttonAdaption') && this.outSearchFieldList.length > 0) {
1819
+ // 如果设置了按钮自适应 全部按钮放入折叠按钮
1820
+ // 需要考虑按钮是否有分组 过滤掉分组
1821
+ let rowTileBtnList = JSON.parse(JSON.stringify(this.rowTileBtnList));
1822
+ let hideBtn = rowTileBtnList.filter(item => {
1823
+ if (!item.isVisible) return false;
1824
+ if (!item.buttonGroup) return true;
1825
+ if (this.groupBtnObj && this.groupBtnObj[item.buttonGroup]) return false;
1826
+ return true;
1827
+ });
1828
+ this.rowTileBtnList = rowTileBtnList.map(i => {
1829
+ i['isHide'] = true;
1830
+ return i;
1831
+ });
1832
+ let rowFoldHideBtnListObj = {
1833
+ ADD: { name: '新增按钮', list: [] },
1834
+ INLINE: { name: '行级按钮', list: [] },
1835
+ BATCH: { name: '批量按钮', list: [] }
1836
+ };
1837
+ hideBtn.forEach(item => {
1838
+ this.$set(item, 'isHide', true);
1839
+ if (item.type === 'ADD') {
1840
+ rowFoldHideBtnListObj.ADD.list.push(item);
1841
+ } else if (item.type == 'BATCH') {
1842
+ rowFoldHideBtnListObj.BATCH.list.push(item);
1843
+ } else {
1844
+ rowFoldHideBtnListObj.INLINE.list.push(item);
1845
+ }
1846
+ });
1847
+ this.rowFoldHideBtnListObj = rowFoldHideBtnListObj;
1848
+ this.rowFoldHideBtnList = hideBtn;
1849
+ }
1850
+ },
1851
+ outFilterChange(config = {}) {
1852
+ let conObj = this.getConObjParams() || [];
1853
+ this.onSave(conObj, true, config);
1854
+ },
1855
+ visibleBtn(btn) {
1856
+ if (!btn.isVisible) return false;
1857
+ if (this.isInlineOperating) return false;
1858
+
1859
+ return true;
1860
+ },
1861
+ /* 打印相关 */
1862
+ toSelectPrintObjs(value) {
1863
+ let oldtableData = this.oldtableData;
1864
+ let selectData = [];
1865
+ if (value && value.length) {
1866
+ value.forEach(v => {
1867
+ let loopNode;
1868
+ this.loop(oldtableData, v.my_index, item => {
1869
+ loopNode = item;
1870
+ });
1871
+ selectData.push({
1872
+ ...loopNode
1873
+ });
1874
+ });
1875
+ }
1876
+ selectData = selectData.map(item => {
1877
+ return utils.paramsToPrintValue(item);
1878
+ });
1879
+
1880
+ return selectData;
1881
+ },
1882
+ loop(data, theUniqueKey, callback) {
1883
+ data.forEach((item, index, arr) => {
1884
+ if (item.theUniqueKey === theUniqueKey) {
1885
+ return callback(item, index, arr);
1886
+ }
1887
+ if (item.children) {
1888
+ return this.loop(item.children, theUniqueKey, callback);
1889
+ }
1890
+ });
1891
+ },
1892
+ getPrintBtnParams(btn) {
1893
+ const paramsData = JSON.parse(JSON.stringify(this.paramsData));
1894
+ // const selectRows = this.toSelectPrintObjs(paramsData.form.selectRows);
1895
+ const setData = JSON.parse(btn.setting);
1896
+ let paramsArray = [];
1897
+ paramsData.form.selectRows.forEach(i => {
1898
+ const obj = {
1899
+ table: i
1900
+ };
1901
+ // paramsArray.push(utils.setParamsValue(setData[0].params, Object.assign(paramsData, { obj })));
1902
+ paramsArray.push(utils.setParamsValue(setData[0].params, Object.assign(paramsData, { obj, table: i })));
1903
+ });
1904
+
1905
+ return paramsArray;
1906
+ },
1907
+ setPrintNumberToBtnList(printNumberList = [], btnList = []) {
1908
+ let cloneList = _.cloneDeep(btnList);
1909
+
1910
+ printNumberList.forEach((item, index) => {
1911
+ const i = cloneList.findIndex(v => v.settingObj[0].trigger_id == item.id);
1912
+ if (i > -1) {
1913
+ cloneList[i].__printConfig = {
1914
+ number: item.number,
1915
+ authorizationKey: item.authorizationKey,
1916
+ port: item.port,
1917
+ versionType: item.versionType,
1918
+ hisParams: { reportid: item.number }
1919
+ };
1920
+ }
1921
+ // cloneList[index].__printConfig = {
1922
+ // number: item.number,
1923
+ // authorizationKey: item.authorizationKey,
1924
+ // port: item.port,
1925
+ // versionType: item.versionType,
1926
+ // hisParams: { reportid: item.number }
1927
+ // };
1928
+ });
1929
+
1930
+ return cloneList;
1931
+ },
1932
+ async getPrintNumber(list) {
1933
+ if (!list?.length) return;
1934
+
1935
+ let ids = list.map(item => item.settingObj[0].trigger_id).join(',');
1936
+
1937
+ let printNumberCacheKeys = Object.keys(this.printNumberCache);
1938
+ let haveCache = printNumberCacheKeys.includes(ids);
1939
+ if (haveCache) {
1940
+ let printNumberList = this.printNumberCache[ids];
1941
+ this.printBtnStrategys = printNumberList;
1942
+ return Promise.resolve(printNumberList);
1943
+ }
1944
+
1945
+ let res = await this.handleGetConfigApi({ ids }, 'requestGetByIds');
1946
+
1947
+ const { status, data } = res;
1948
+ if (status) {
1949
+ let resList = data?.list || [];
1950
+ this.printBtnStrategys = resList;
1951
+ list = resList.map(item => {
1952
+ return {
1953
+ number: item.number,
1954
+ authorizationKey: data.authorizationKey,
1955
+ versionType: data.versionType,
1956
+ port: data.port,
1957
+ id: item.id,
1958
+ ...item
1959
+ };
1960
+ });
1961
+ let len = list?.length || 0;
1962
+ if (len > 0) {
1963
+ this.setPrintNumberCache({
1964
+ ids,
1965
+ list
1966
+ });
1967
+ }
1968
+
1969
+ return list;
1970
+ }
1971
+ return list;
1972
+ },
1973
+ async receivePrintSuccessAboutPrint(res, info) {
1974
+ const printBtn = this.printBtn;
1975
+ const templateId = info.templateId;
1976
+ const formatId = info.formatId;
1977
+ const number = printBtn.__printConfig.number;
1978
+
1979
+ try {
1980
+ const print = { formatId, number };
1981
+ // 执行打印后置条件
1982
+ const result = await this.printConfig.postStepRule(printBtn.settingObj, {
1983
+ result: res,
1984
+ print: print
1985
+ });
1986
+
1987
+ if (result.method !== 'sync') return;
1988
+ // 同步刷新列表
1989
+ this.editTableWrapper?.$refs?.editTable?.getTableList('', false, true, true);
1990
+ } catch (error) {
1991
+ console.log('error', error);
1992
+ }
1993
+ },
1994
+ async receivePrintSuccess(res, info) {
1995
+ if (info.type === 'print') {
1996
+ await this.receivePrintSuccessAboutPrint(res, info);
1997
+ }
1998
+ setTimeout(() => {
1999
+ this.$message.success(res.message);
2000
+ }, 3500);
2001
+ },
2002
+ receivePrintError(res) {
2003
+ let errorMsg = res.message;
2004
+ res.errinfo && (errorMsg += `:${res.errinfo}`);
2005
+ this.$message.error(errorMsg);
2006
+ },
2007
+ resetAllPrintFnWatch() {
2008
+ let keys = Object.keys(this.printBtnPrevFnWatch);
2009
+ keys.forEach(key => {
2010
+ if (!this.printBtnPrevFnWatch[key]) return false;
2011
+ this.printBtnPrevFnWatch[key]();
2012
+ this.printBtnPrevFnWatch[key] = null;
2013
+ delete this.printBtnPrevFnWatch[key];
2014
+ });
2015
+ },
2016
+ printBtnPrevFnWatchSetTimeout(reject) {
2017
+ if (this.printBtnPrevFnWatchTimeoutTimer) {
2018
+ clearTimeout(this.printBtnPrevFnWatchTimeoutTimer);
2019
+ this.printBtnPrevFnWatchTimeoutTimer = null;
2020
+ }
2021
+
2022
+ this.printBtnPrevFnWatchTimeoutTimer = setTimeout(() => {
2023
+ this.resetAllPrintFnWatch();
2024
+ reject();
2025
+ }, 10000);
2026
+ },
2027
+ printBtnPrevFn(clickBtn, btn, type, j) {
2028
+ return new Promise((resolve, reject) => {
2029
+ /*
2030
+ 触发原按钮流程,在EditTable中触发原打印按钮节点时,修改[printPrevFinish]状态
2031
+ 触发watch,再执行Promise.resolve()
2032
+ */
2033
+ this.clickBtn(clickBtn, btn, clickBtn.my_index, true, j);
2034
+ const timestamp = Date.now();
2035
+
2036
+ this.resetAllPrintFnWatch();
2037
+ this.printPrevFinish = false;
2038
+
2039
+ this.printBtnPrevFnWatch[timestamp] = this.$watch('printPrevFinish', val => {
2040
+ if (!this.printBtnPrevFnWatch[timestamp]) return false;
2041
+ this.resetAllPrintFnWatch();
2042
+ resolve();
2043
+ });
2044
+
2045
+ this.printBtnPrevFnWatchSetTimeout(reject);
2046
+ });
2047
+ },
2048
+ inlineEditClick() {
2049
+ let { btnName, tipsMsg, isTips } = this.curBatchBtnData || {};
2050
+ let _this = this;
2051
+ // 保存是否需要提示
2052
+ if (isTips != 1) {
2053
+ this.setBatchSaveRowStatus(true);
2054
+ return;
2055
+ }
2056
+ this.$confirm({
2057
+ title: tipsMsg || `是否确认${btnName}`,
2058
+ okText: '确定',
2059
+ cancelText: '取消',
2060
+ onOk: () => {
2061
+ _this.setBatchSaveRowStatus(true);
2062
+ },
2063
+ onCancel() {}
2064
+ });
2065
+ },
2066
+
2067
+ /**
2068
+ * 获取外显检索的默认值设置
2069
+ */
2070
+ handleGetOutSearchInitValue() {
2071
+ const isSetDefVal = this.outSearchFieldList.some(v => {
2072
+ if (this.isRender(v)) {
2073
+ return this.isExistDefValByRenderWidget(v);
2074
+ }
2075
+ return !!v.explicitDefaultVal
2076
+ });
2077
+ if (isSetDefVal) {
2078
+ let conObj = this.getConObjParams() || [];
2079
+ return conObj;
2080
+ }
2081
+
2082
+ return [];
2083
+ },
2084
+
2085
+ getFiledRandom_key(el) {
2086
+ // 初始化
2087
+ const showSetting = el?.settingObj?.showSetting || [];
2088
+ let f = !this.$utils.isEmpty(el?.settingObj?.wordbook);
2089
+ if (!showSetting?.length && f) {
2090
+ return Math.random().toString();
2091
+ }
2092
+ return '11';
2093
+ },
2094
+
2095
+ inlineEditCancel() {
2096
+ this.setBatchCancelRowStatus(true);
2097
+ },
2098
+
2099
+ setBatchSaveRowStatus(f) {
2100
+ this.$emit('setBatchSaveRowStatus', f);
2101
+ },
2102
+
2103
+ setBatchCancelRowStatus(f) {
2104
+ this.$emit('setBatchCancelRowStatus', f);
2105
+ },
2106
+
2107
+ setPrintNumberCache(obj) {
2108
+ this.$emit('setPrintNumberCache', obj);
2109
+ },
2110
+
2111
+ getRef(key){
2112
+ let ref = this.$refs[key];
2113
+ if(Array.isArray(ref)){
2114
+ return ref[0];
2115
+ }
2116
+ return ref;
2117
+ },
2118
+
2119
+ /**
2120
+ * 赋值给检索外显
2121
+ */
2122
+ async setOutFilterValues(obj){
2123
+ if(typeof obj === 'object'){
2124
+
2125
+ const outObj = this.outSearchFieldList.reduce((pre,cur)=>{
2126
+ cur.columnName && (pre[cur.columnName]=cur)
2127
+ return pre;
2128
+ },{});
2129
+
2130
+ // 遍历对象赋值
2131
+ Object.keys(obj).forEach(k=>{
2132
+ let val = obj[k];
2133
+ let item = outObj[k] || {}
2134
+ if(vexutils.isObject(val)){
2135
+ let ks = ['bigValue','lessValue'];
2136
+ ks.forEach(kk=>{
2137
+ this.$set(item,kk,val[kk]);
2138
+ })
2139
+ } else {
2140
+ if (typeof val === 'number') {
2141
+ val = String(val);
2142
+ }
2143
+ this.$set(item,'value',val);
2144
+ }
2145
+ // 检索组件,触发检索方法
2146
+ if (item?.comType == "SelectMuiWordBook"){
2147
+ this.setSelectMuiWordBookType(item,val)
2148
+ }
2149
+ })
2150
+
2151
+ await this.$nextTick();
2152
+ this.outFilterChange()
2153
+ }
2154
+ },
2155
+
2156
+ setSelectMuiWordBookType(item,val){
2157
+ if(Array.isArray(item.dataSource)){
2158
+ let f = item.dataSource.find(v=>v.myName == val);
2159
+ if(f) return
2160
+ }
2161
+ let rKey = item.columnName + item.random_key
2162
+ let ref = this.getRef(rKey);
2163
+ ref && ref.handleWordBookSearch(val,item)
2164
+ }
2165
+
2166
+ /* */
2167
+ },
2168
+ watch: {
2169
+ // 平铺列表 watch 触发 导致请求发很多次
2170
+ // 注释掉tableId 之后有问题请使用另外的方法解决, 不要再使用watch触发
2171
+ // tableId: {
2172
+ // immediate: true,
2173
+ // deep: true,
2174
+ // handler(val) {
2175
+ // val && this.getTableCondiTionListRequest(true);
2176
+ // }
2177
+ // },
2178
+ viewList: {
2179
+ deep: true,
2180
+ immediate: true,
2181
+ handler() {
2182
+ if (this.viewList.length > 0) {
2183
+ let curItem;
2184
+ let hasListType = true;
2185
+ this.viewList.forEach(v => {
2186
+ if (v.mark == 1) {
2187
+ curItem = v.id;
2188
+ }
2189
+ if (v.id == '0') {
2190
+ hasListType = false;
2191
+ }
2192
+ });
2193
+ hasListType &&
2194
+ this.viewList.push({
2195
+ id: '0',
2196
+ name: '列表模式' || this.$t('1.1.5.4')
2197
+ });
2198
+ // 查找默认值
2199
+ // let curItem = this.viewList.find(v => v.mark == 1);
2200
+ this.currentTempId = curItem || '0';
2201
+
2202
+ // 按钮打卡视图列表
2203
+ let tableViewId = this.optionsValue('tableViewId');
2204
+ let onlyOpenView = this.optionsValue('hideViewList') && tableViewId;
2205
+ if (onlyOpenView) {
2206
+ this.currentTempId = tableViewId;
2207
+ }
2208
+ // this.handlerSelectTemp(this.currentTempId);
2209
+ this.$emit('handlerChangeView', this.currentTempId);
2210
+ } else {
2211
+ this.currentTempId = '0';
2212
+ // this.handlerSelectTemp(this.currentTempId);
2213
+ this.editTableSource != 'relatedComponent' && this.$emit('handlerChangeView', this.currentTempId);
2214
+ }
2215
+ }
2216
+ },
2217
+ getIsTile: {
2218
+ immediate: true,
2219
+ handler(val) {
2220
+ if (val === undefined) return;
2221
+ this.isTile = val;
2222
+ }
2223
+ },
2224
+ rowBtnList: {
2225
+ immediate: true,
2226
+ deep: true,
2227
+ handler() {
2228
+ this.formatRowBtnList();
2229
+ this.handleOtherConfigInit();
2230
+ }
2231
+ },
2232
+ initPageResize: {
2233
+ immediate: true,
2234
+ deep: true,
2235
+ handler(val) {
2236
+ if (!val || !Object.keys(val).length) return;
2237
+ if (this.isButtonFolding || this.isShowSetting('buttonAdaption')) return;
2238
+ let { classificationIndex } = val;
2239
+ if (classificationIndex < 0) return;
2240
+ this.pageResize({});
2241
+ }
2242
+ },
2243
+ relatedBaseInfo: {
2244
+ immediate: true,
2245
+ deep: true,
2246
+ handler(val) {
2247
+ if (!val || !Object.keys(val).length) return;
2248
+ let { buttonList } = val;
2249
+ if (!buttonList || !buttonList.length) return;
2250
+ this.getRowTileBtnList(buttonList);
2251
+ }
2252
+ },
2253
+ searchFieldList: {
2254
+ immediate: true,
2255
+ deep: true,
2256
+ handler(val) {
2257
+ if (val && val.length > 0) {
2258
+ this.initOutSearchFieldList();
2259
+ }
2260
+ }
2261
+ },
2262
+ tabConditionNumObj: {
2263
+ immediate: true,
2264
+ deep: true,
2265
+ handler(val) {
2266
+ if (this.conditionType === 'keyword' && val && Object.keys(val).length > 0) {
2267
+ this.tabConditionList.length > 0 &&
2268
+ this.tabConditionList.forEach(item => {
2269
+ if (val[item.sid] !== undefined) this.$set(item, 'digital', val[item.sid]);
2270
+ });
2271
+ }
2272
+ }
2273
+ },
2274
+ searchPlaceHolder: {
2275
+ immediate: true,
2276
+ handler(val) {
2277
+ if (!val || this.showRelatedTreeBtn) return;
2278
+ this.$nextTick(() => {
2279
+ this.showPlaceholderPrefix = false;
2280
+ let dom = this.$refs.baseSearchPlaceholderSpan;
2281
+ if (!dom) return;
2282
+ // input 框有padding 32px ...显示需要多预留一些宽度12px
2283
+ let w = dom.offsetWidth + 45;
2284
+ // 非筛选外显input 有enterButton 预留宽度
2285
+ if (!this.showOutSearch) {
2286
+ w += 45;
2287
+ }
2288
+ let maxW = 300;
2289
+ this.inputSearchW = w > maxW ? maxW : w < 200 ? 200 : w;
2290
+ if (w > maxW) {
2291
+ this.showPlaceholderPrefix = true;
2292
+ }
2293
+ this.onResize();
2294
+ });
2295
+ }
2296
+ }
2297
+ }
2298
+ });
2299
+ </script>
2300
+
2301
+ <style lang="less" scoped>
2302
+ .base-search {
2303
+ flex: 1;
2304
+ .base-container {
2305
+ display: flex;
2306
+ justify-content: space-between;
2307
+ text-align: left;
2308
+ background: #fff;
2309
+ }
2310
+ .bease-left {
2311
+ display: flex;
2312
+ justify-content: flex-start;
2313
+ align-items: flex-start;
2314
+ flex: 1;
2315
+ .btn-custom-wrap {
2316
+ width: 100%;
2317
+ display: flex;
2318
+ justify-content: flex-end;
2319
+ align-items: flex-start;
2320
+ }
2321
+ }
2322
+ .base-tabs {
2323
+ display: flex;
2324
+ align-items: center;
2325
+ border-bottom: 1px solid #d5d5d5;
2326
+ margin-bottom: 8px;
2327
+ .base-tabs-item {
2328
+ padding: 7px 16px;
2329
+ font-size: 14px;
2330
+ color: #212121;
2331
+ font-weight: 400;
2332
+ cursor: pointer;
2333
+ border-bottom: 1px solid transparent;
2334
+ }
2335
+ .base-tabs-item-active {
2336
+ color: #2d7aff;
2337
+ border-bottom: 1px solid #2d7aff;
2338
+ }
2339
+ }
2340
+ ul {
2341
+ display: flex;
2342
+ align-items: center;
2343
+ flex-wrap: wrap;
2344
+ margin-top: 8px;
2345
+ li {
2346
+ display: inline-block;
2347
+ /deep/ .search-default {
2348
+ height: 32px;
2349
+ line-height: 32px;
2350
+ margin-bottom: 8px;
2351
+ margin-right: 8px;
2352
+ border-color: #d5d5d5;
2353
+ color: #212121;
2354
+ .ant-btn {
2355
+ border-color: #d5d5d5;
2356
+ color: #212121;
2357
+ }
2358
+ &.search-default-count {
2359
+ border-color: #2d7aff;
2360
+ color: #2d7aff;
2361
+ .ant-btn {
2362
+ color: #2d7aff;
2363
+ }
2364
+ }
2365
+ }
2366
+ /deep/ .out-filter-input {
2367
+ width: 200px;
2368
+ margin: 0 8px 8px 0;
2369
+ .ant-input-wrapper {
2370
+ .ant-input-group-addon {
2371
+ border: 1px solid #d9d9d9 !important;
2372
+ border-left: 0 !important;
2373
+ }
2374
+ }
2375
+ }
2376
+ .my-input-search {
2377
+ vertical-align: middle;
2378
+ position: relative;
2379
+ top: -1px;
2380
+ margin-bottom: 8px;
2381
+ margin-right: 8px;
2382
+ height: 32px;
2383
+ /deep/ .ant-input {
2384
+ margin-top: 1px;
2385
+ border-right: 0 !important;
2386
+ &:hover {
2387
+ & + .ant-input-suffix {
2388
+ .ant-input-search-icon {
2389
+ color: #579aff;
2390
+ }
2391
+ }
2392
+ }
2393
+ }
2394
+ /deep/ .ant-input-group-addon {
2395
+ padding: 0;
2396
+ border: 0 !important;
2397
+ vertical-align: bottom;
2398
+ .ant-btn {
2399
+ border-top-left-radius: 0;
2400
+ border-bottom-left-radius: 0;
2401
+ }
2402
+ }
2403
+ .svg-icon {
2404
+ margin-right: 0;
2405
+ font-size: 16px;
2406
+ }
2407
+ }
2408
+ .mr8 {
2409
+ margin-right: 8px;
2410
+ margin-bottom: 8px;
2411
+ }
2412
+ .mr12 {
2413
+ margin-right: 12px;
2414
+ margin-bottom: 8px;
2415
+ }
2416
+ .ml12 {
2417
+ margin-left: 12px;
2418
+ margin-bottom: 8px;
2419
+ }
2420
+ &.related-search-input {
2421
+ /deep/ .my-input-search {
2422
+ width: 40px;
2423
+ .ant-input-affix-wrapper {
2424
+ width: 0px;
2425
+ .ant-input {
2426
+ width: 0;
2427
+ outline: none;
2428
+ box-shadow: none;
2429
+ &:focus {
2430
+ outline: none;
2431
+ }
2432
+ }
2433
+ .ant-input:not(:last-child) {
2434
+ padding: 0px;
2435
+ border: 0px !important;
2436
+ }
2437
+ .ant-input-suffix {
2438
+ i {
2439
+ display: none;
2440
+ }
2441
+ }
2442
+ }
2443
+ .ant-input-group-addon {
2444
+ .ant-btn {
2445
+ border-top-left-radius: 4px;
2446
+ border-bottom-left-radius: 4px;
2447
+ }
2448
+ }
2449
+ }
2450
+ }
2451
+ &.related-search-input-expand {
2452
+ transition: width 0.2s;
2453
+ /deep/ .my-input-search {
2454
+ width: 215px;
2455
+ .ant-input-affix-wrapper {
2456
+ .ant-input-suffix {
2457
+ i {
2458
+ display: inline-block;
2459
+ }
2460
+ }
2461
+ }
2462
+ }
2463
+ }
2464
+ }
2465
+ .dropdown-button {
2466
+ color: #212121;
2467
+ border-color: #d5d5d5 !important;
2468
+ margin-left: 8px;
2469
+ margin-bottom: 8px;
2470
+ /deep/ .svg-icon {
2471
+ margin-right: 4px;
2472
+ }
2473
+ &.ant-dropdown-trigger {
2474
+ i.anticon.anticon-down {
2475
+ color: #969696;
2476
+ font-size: 14px;
2477
+ }
2478
+ }
2479
+ }
2480
+ .baseSearch-input-search {
2481
+ .input-search-com {
2482
+ input {
2483
+ padding: 4px 8px;
2484
+ }
2485
+ .search-placeholder-icon {
2486
+ color: #b4b4b4;
2487
+ }
2488
+ }
2489
+ }
2490
+ }
2491
+ /deep/ .num-picker {
2492
+ position: relative;
2493
+ display: flex;
2494
+ &.num-picker-unit {
2495
+ padding-right: 20px;
2496
+ }
2497
+ input {
2498
+ text-align: left !important;
2499
+ }
2500
+ &:hover {
2501
+ .clear-number-icon {
2502
+ display: block;
2503
+ }
2504
+ }
2505
+ /deep/ .ant-calendar-range-picker-input {
2506
+ text-align: left;
2507
+ }
2508
+ .clear-number-icon {
2509
+ position: absolute;
2510
+ right: 5px;
2511
+ top: 6px;
2512
+ display: none;
2513
+ cursor: pointer;
2514
+ z-index: 1000;
2515
+ }
2516
+ }
2517
+ .btn-row {
2518
+ display: inline-flex;
2519
+ line-height: 32px;
2520
+ height: 32px;
2521
+ // padding: 0 10px;
2522
+ padding-right: 8px;
2523
+ margin-bottom: 8px;
2524
+ transform: translateZ(0);
2525
+ .mgl-10 {
2526
+ margin-left: 10px;
2527
+ }
2528
+ &.min-width {
2529
+ min-width: 212px;
2530
+ }
2531
+ /deep/ .ant-select-selection__rendered {
2532
+ color: #212121;
2533
+ font-size: 14px;
2534
+ }
2535
+ /deep/ .ant-select-arrow {
2536
+ i {
2537
+ color: #969696;
2538
+ font-size: 12px;
2539
+ }
2540
+ }
2541
+ .btn-setting {
2542
+ margin-right: 4px;
2543
+ }
2544
+ .viewList-button {
2545
+ display: flex;
2546
+ align-items: center;
2547
+ justify-content: center;
2548
+ padding: 0 12px;
2549
+ }
2550
+ }
2551
+ .search-tile {
2552
+ max-width: 100%;
2553
+ max-height: 74px;
2554
+ overflow-x: auto;
2555
+ /deep/ .ant-btn {
2556
+ margin-right: 10px;
2557
+ margin-bottom: 5px;
2558
+ }
2559
+ }
2560
+
2561
+ .psw-icon {
2562
+ cursor: pointer;
2563
+ &:active {
2564
+ color: #5585f5;
2565
+ // #2474ff
2566
+ }
2567
+ color: #969696;
2568
+ }
2569
+
2570
+ ::-webkit-input-placeholder {
2571
+ /* WebKit browsers */
2572
+ font-family: 'Avenir', Helvetica, Arial, sans-serif;
2573
+ }
2574
+
2575
+ ::-moz-placeholder {
2576
+ /* Mozilla Firefox 19+ */
2577
+ font-family: 'Avenir', Helvetica, Arial, sans-serif;
2578
+ }
2579
+
2580
+ :-ms-input-placeholder {
2581
+ /* Internet Explorer 10+ */
2582
+ font-family: 'Avenir', Helvetica, Arial, sans-serif;
2583
+ }
2584
+ .baseSearchPlaceholderSpan {
2585
+ visibility: hidden;
2586
+ position: absolute;
2587
+ z-index: -1;
2588
+ }
2589
+ }
2590
+ </style>
2591
+ <style lang="less">
2592
+ .rowFoldHideBtnList-dropdown {
2593
+ .ant-dropdown-menu {
2594
+ overflow-y: auto;
2595
+ max-height: 99vh;
2596
+ }
2597
+ .ant-dropdown-menu-item-group {
2598
+ .ant-dropdown-menu-item-group-title {
2599
+ display: none;
2600
+ }
2601
+ border-bottom: 1px solid #d5d5d5;
2602
+ &:last-child {
2603
+ border-color: transparent;
2604
+ }
2605
+ }
2606
+ }
2607
+ .viewList-dropdown {
2608
+ min-width: 120px;
2609
+ .ant-dropdown-menu-item {
2610
+ display: flex;
2611
+ justify-content: space-between;
2612
+ align-items: center;
2613
+ color: #2e2e2e;
2614
+ margin: 1px 0;
2615
+ &:hover {
2616
+ background: #f2f2f2;
2617
+ }
2618
+ > span {
2619
+ display: inline;
2620
+ width: 85%;
2621
+ text-overflow: ellipsis;
2622
+ white-space: nowrap;
2623
+ overflow: hidden;
2624
+ }
2625
+ }
2626
+ .ant-dropdown-menu-item.menu-active {
2627
+ color: #2d7aff;
2628
+ }
2629
+ }
2630
+ </style>